X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=engines%2Fe_padlock.c;h=9f7a85a8da57a0f2d6ec0ddf4b9e6fe2fe954a10;hb=dcbe723bc5847d598ae5c06a89807cd8e813c605;hp=64a13e754c7801d00ef2c83948ac59c2e0e4e2f4;hpb=dd9557a8ba0e4974fa85d0fc1a86e213290eafe3;p=openssl.git diff --git a/engines/e_padlock.c b/engines/e_padlock.c index 64a13e754c..9f7a85a8da 100644 --- a/engines/e_padlock.c +++ b/engines/e_padlock.c @@ -104,10 +104,14 @@ # if (defined(__GNUC__) && (defined(__i386__) || defined(__i386))) || \ (defined(_MSC_VER) && defined(_M_IX86)) # define COMPILE_HW_PADLOCK -static ENGINE *ENGINE_padlock (void); # endif #endif +#ifdef OPENSSL_NO_DYNAMIC_ENGINE +#ifdef COMPILE_HW_PADLOCK +static ENGINE *ENGINE_padlock (void); +#endif + void ENGINE_load_padlock (void) { /* On non-x86 CPUs it just returns. */ @@ -120,19 +124,21 @@ void ENGINE_load_padlock (void) #endif } +#endif + #ifdef COMPILE_HW_PADLOCK /* We do these includes here to avoid header problems on platforms that do not have the VIA padlock anyway... */ +#include #ifdef _WIN32 # include # ifndef alloca # define alloca _alloca # endif -#elif defined(NETWARE_CLIB) && defined(__GNUC__) - void *alloca(size_t); -# define alloca(s) __builtin_alloca(s) -#else -# include +#elif defined(__GNUC__) +# ifndef alloca +# define alloca(s) __builtin_alloca(s) +# endif #endif /* Function for ENGINE detection and control */ @@ -193,6 +199,8 @@ padlock_bind_helper(ENGINE *e) return 1; } +#ifdef OPENSSL_NO_DYNAMIC_ENGINE + /* Constructor */ static ENGINE * ENGINE_padlock(void) @@ -211,6 +219,8 @@ ENGINE_padlock(void) return eng; } +#endif + /* Check availability of the engine */ static int padlock_init(ENGINE *e) @@ -1215,6 +1225,14 @@ static RAND_METHOD padlock_rand = { padlock_rand_status, /* rand status */ }; +#else /* !COMPILE_HW_PADLOCK */ +#ifndef OPENSSL_NO_DYNAMIC_ENGINE +OPENSSL_EXPORT +int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); +OPENSSL_EXPORT +int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; } +IMPLEMENT_DYNAMIC_CHECK_FN() +#endif #endif /* COMPILE_HW_PADLOCK */ #endif /* !OPENSSL_NO_HW_PADLOCK */