summaryrefslogtreecommitdiff
path: root/stdcpp.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-07-27 19:43:43 -0400
committerJeffrey Walton <noloader@gmail.com>2015-07-27 19:43:43 -0400
commitcffba26fa183fced0edf1dadce6acb1b82f6fe50 (patch)
tree55c4d4a0906377974e259950055eb3a79f8cf788 /stdcpp.h
parent185a2c8e830644a62eaedf21853abb3b7fd1254b (diff)
downloadcryptopp-git-cffba26fa183fced0edf1dadce6acb1b82f6fe50.tar.gz
Fixed compiler error under OpenBSD for missing "alloca"
Diffstat (limited to 'stdcpp.h')
-rw-r--r--stdcpp.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/stdcpp.h b/stdcpp.h
index 851a1d32..2a90f584 100644
--- a/stdcpp.h
+++ b/stdcpp.h
@@ -51,14 +51,15 @@
// #include <malloc.h>
// #endif
-// Nearly everyone gets alloca from <alloca.h>.
-#if defined(CRYPTOPP_UNIX_AVAILABLE) && !defined(__MINGW32__) && !defined(__BORLANDC__)
-# include <alloca.h>
-#endif
-
-// Windows includes alloca in <malloc.h>.
+// Handle alloca...
#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(__MINGW32__) || defined(__BORLANDC__)
-# include <malloc.h>
+# include <malloc.h>
+#else
+# ifdef __OpenBSD__
+# include <stdlib.h>
+# else
+# include <alloca.h>
+# endif
#endif
#ifdef _MSC_VER