[cmucl-imp] ignore-errors for missing foreign functions
Anton Vodonosov
avodonosov at yandex.ru
Mon Jan 28 02:41:47 UTC 2019
Hello CMUCL list,
Code like this:
(ignore-errors
(cffi:defcfun ("SSL_CTX_set_default_verify_dir" ssl-ctx-set-default-verify-dir)
:int
(ctx :pointer)))
fails despite ignore-errors if the foreign function is absent (the libssl.so version loaded doesn't have it).
It fails when the fasl file containing this code is loaded:
KERNEL:SIMPLE-PROGRAM-ERROR: Undefined foreign symbol: "SSL_CTX_set_default_verify_dir"
I wanted to look in the manual, but the manual links provided at https://www.cons.org/cmucl/doc/index.html are broken (e.g. http://common-lisp.net/project/cmucl/doc/cmu-user/, http://common-lisp.net/project/cmucl/doc/cmu-user-html.tgz)
The same failure even if we modify the code this way:
(when nil
(cffi:defcfun ("SSL_CTX_set_default_verify_dir" ssl-ctx-set-default-verify-dir)
:int
(ctx :pointer)))
Is there a way to not fail when the function is absent?
Best regards,
- Anton
More information about the cmucl-imp
mailing list