Finished alloca cleanup under the BSDs

pull/35/head
Jeffrey Walton 2015-07-28 18:18:56 -04:00
parent 697ccb452b
commit e79ae73295
2 changed files with 8 additions and 13 deletions

View File

@ -388,6 +388,10 @@ NAMESPACE_END
#define CRYPTOPP_UNIX_AVAILABLE
#endif
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#define CRYPTOPP_BSD_AVAILABLE
#endif
#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE)
# define HIGHRES_TIMER_AVAILABLE
#endif

View File

@ -44,22 +44,13 @@
#include <vector.cc>
#endif
// for alloca
// #ifdef __sun
// #include <alloca.h>
// #elif defined(__MINGW32__) || defined(__BORLANDC__)
// #include <malloc.h>
// #endif
// Handle alloca...
#if defined(CRYPTOPP_WIN32_AVAILABLE) || defined(__MINGW32__) || defined(__BORLANDC__)
# include <malloc.h>
#else
# ifdef __OpenBSD__
#elif defined(CRYPTOPP_BSD_AVAILABLE)
# include <stdlib.h>
# else
#else // CRYPTOPP_UNIX_AVAILABLE
# include <alloca.h>
# endif
#endif
#ifdef _MSC_VER