Rework the way engines are built
[openssl.git] / engines / e_padlock.c
index 4095513b7a215732b36c6e637a2bf2c4d26b0ccf..381a746058ab75153a5cf667ff5fc16591aabb81 100644 (file)
@@ -123,16 +123,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 <stdlib.h>
 #ifdef _WIN32
 # include <malloc.h>
 # ifndef alloca
 #  define alloca _alloca
 # endif
-#elif defined(NETWARE_CLIB) && defined(__GNUC__)
-  void *alloca(size_t);
-# define alloca(s) __builtin_alloca(s)
-#else
-# include <stdlib.h>
+#elif defined(__GNUC__)
+# ifndef alloca
+#  define alloca(s) __builtin_alloca(s)
+# endif
 #endif
 
 /* Function for ENGINE detection and control */
@@ -1221,6 +1221,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 */