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).
This commit is contained in:
Andy Polyakov 2009-05-12 20:19:09 +00:00
parent 804ab1e0a4
commit 3dccfc1e68

View File

@ -126,16 +126,16 @@ void ENGINE_load_padlock (void)
#ifdef COMPILE_HW_PADLOCK #ifdef COMPILE_HW_PADLOCK
/* We do these includes here to avoid header problems on platforms that /* We do these includes here to avoid header problems on platforms that
do not have the VIA padlock anyway... */ do not have the VIA padlock anyway... */
#include <stdlib.h>
#ifdef _WIN32 #ifdef _WIN32
# include <malloc.h> # include <malloc.h>
# ifndef alloca # ifndef alloca
# define alloca _alloca # define alloca _alloca
# endif # endif
#elif defined(NETWARE_CLIB) && defined(__GNUC__) #elif defined(__GNUC__)
void *alloca(size_t); # ifndef alloca
# define alloca(s) __builtin_alloca(s) # define alloca(s) __builtin_alloca((s))
#else # endif
# include <stdlib.h>
#endif #endif
/* Function for ENGINE detection and control */ /* 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; } int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; }
IMPLEMENT_DYNAMIC_CHECK_FN() IMPLEMENT_DYNAMIC_CHECK_FN()
#endif #endif
#endif /* COMPILE_HW_PADLOCK */
#endif /* !OPENSSL_NO_HW_PADLOCK */ #endif /* !OPENSSL_NO_HW_PADLOCK */
#endif /* !OPENSSL_NO_HW */ #endif /* !OPENSSL_NO_HW */