Good catch. That approach won't be very robust when saving images.
Luís
On Mon, May 29, 2017, 04:12 Anton Vodonosov avodonosov@yandex.ru wrote:
It does on SBCL. Is it correct theoretically to call DEFCFUN from inside of IF?
Also, when somebody saves lisp image and the image opened next time, possibly different version of OpenSSL is loaded. The defcfun done before saving the image, will it conflict with the new library?
29.05.2017, 06:02, "Luís Oliveira" luismbo@gmail.com:
That solution looks interesting. Does it work?
On Mon, May 29, 2017, 03:48 Anton Vodonosov avodonosov@yandex.ru
wrote:
29.05.2017, 05:42, "Luís Oliveira" luismbo@gmail.com:
foreign-symbol-pointer should work on Corman, yes.
If so, maybe this is the best solution?
(if (cffi:foreign-symbol-pointer "OpenSSL_version_num") (cffi:defcfun ("OpenSSL_version_num" ssleay) :long) (cffi:defcfun ("SSLeay" ssleay) :long))