diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-27 19:43:43 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-27 19:43:43 -0400 |
commit | cffba26fa183fced0edf1dadce6acb1b82f6fe50 (patch) | |
tree | 55c4d4a0906377974e259950055eb3a79f8cf788 /stdcpp.h | |
parent | 185a2c8e830644a62eaedf21853abb3b7fd1254b (diff) | |
download | cryptopp-git-cffba26fa183fced0edf1dadce6acb1b82f6fe50.tar.gz |
Fixed compiler error under OpenBSD for missing "alloca"
Diffstat (limited to 'stdcpp.h')
-rw-r--r-- | stdcpp.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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 |