From: Andy Polyakov Date: Tue, 12 May 2009 20:19:09 +0000 (+0000) Subject: e_padlock.c: fix typo (missing #endif) and switch to __builtin_alloca X-Git-Tag: OpenSSL-fips-2_0-rc1~1677 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3dccfc1e68c1acc61c8f90ee4a6cf3836db9e087;p=oweals%2Fopenssl.git e_padlock.c: fix typo (missing #endif) and switch to __builtin_alloca (with introduction of 64-bit support alloca must be declared and there is no standard way of doing that, switching to __bultin_alloca is considered appropriate because code explicitly targets gcc anyway). --- diff --git a/engines/e_padlock.c b/engines/e_padlock.c index b89113e3bd..240b1f9b57 100644 --- a/engines/e_padlock.c +++ b/engines/e_padlock.c @@ -126,16 +126,16 @@ void ENGINE_load_padlock (void) #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 */ @@ -1325,6 +1325,7 @@ 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 */ #endif /* !OPENSSL_NO_HW */