On 29.07.2013 14:52, Peter Stuge wrote:
> Daniel Stenberg wrote:
>> But I could also imagine a run-time API so that an application can
>> figure this out on its own...
>
> It can't be runtime, or applications must depend on every single
> crypto lib supported by libssh2, in order to have all symbols
> available.
perhaps something as simple like this would do already?
LIBSSH2_API
uint32_t libssh2_buildinfo()
{
uint32_t buildinfo = 0;
#if defined(LIBSSH2_WINDOWSCRYPT) /* build with Windows native Crypt API */
buildinfo |= 0x00000004;
#elif defined(LIBSSH2_LIBGCRYPT) /* build with libgcrypt */
buildinfo |= 0x00000002;
#else /* must be build with OpenSSL */
buildinfo |= 0x00000001;
#endif
#if defined(LIBSSH2_HAVE_ZLIB) /* build with Zlib support */
buildinfo |= 0x00010000;
#endif
return buildinfo;
}
Gün.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-07-29