aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2004-09-27 21:59:44 +0000
committerRichard Levitte <levitte@openssl.org>2004-09-27 21:59:44 +0000
commitc38ff58b6bdf78de3a029b19c902bfcc9e961f4c (patch)
tree4d17717ae80a450c9d7e3cd9b59b5052bc9ee6e1 /crypto
parentc29ef588dc34417562dc9338cc3d222f9aea392b (diff)
downloadopenssl-c38ff58b6bdf78de3a029b19c902bfcc9e961f4c.zip
openssl-c38ff58b6bdf78de3a029b19c902bfcc9e961f4c.tar.gz
openssl-c38ff58b6bdf78de3a029b19c902bfcc9e961f4c.tar.bz2
Move the declaration of alloca() so it's ony declared when really
necessary.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/engine/eng_padlock.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/crypto/engine/eng_padlock.c b/crypto/engine/eng_padlock.c
index 81884ef..ca31165 100644
--- a/crypto/engine/eng_padlock.c
+++ b/crypto/engine/eng_padlock.c
@@ -73,16 +73,6 @@
#include <openssl/aes.h>
#include <openssl/rand.h>
-#ifdef OPENSSL_SYS_VMS
-# include <builtins.h>
-# define alloca __ALLOCA
-#else
-# include <malloc.h>
-# ifdef _MSC_VER
-# define alloca _alloca
-# endif
-#endif
-
#ifndef OPENSSL_NO_HW
#ifndef OPENSSL_NO_HW_PADLOCK
@@ -126,6 +116,13 @@ 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 <malloc.h>
+#ifdef _MSC_VER
+# define alloca _alloca
+#endif
+
/* Function for ENGINE detection and control */
static int padlock_available(void);
static int padlock_init(ENGINE *e);