diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-05-21 08:32:23 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-05-21 08:32:23 -0400 |
commit | 6a6027c2cd125cafc7c5a04714049f20a60cfa03 (patch) | |
tree | b080029fa0be56fd4e610e07e6743e2f9225ed65 /misc.h | |
parent | f260be1f426123c897e0d67e4ad67ca751dc1a89 (diff) | |
download | cryptopp-git-6a6027c2cd125cafc7c5a04714049f20a60cfa03.tar.gz |
Include "cpu.h" rather than <immintrin.h> directly to avoid compile error when using GCC and -mno-sse<N>
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -60,7 +60,7 @@ #endif
#if defined(__GNUC__) && defined(__BMI__)
-# include <immintrin.h>
+# include "cpu.h"
#endif
#endif // CRYPTOPP_DOXYGEN_PROCESSING
@@ -81,9 +81,9 @@ // http://stackoverflow.com/questions/30472731/which-c-standard-header-defines-size-max
// Avoid NOMINMAX macro on Windows. http://support.microsoft.com/en-us/kb/143208
#ifndef SIZE_MAX
-# if defined(__SIZE_MAX__)
+# if defined(__SIZE_MAX__) && (__SIZE_MAX__ > 0)
# define SIZE_MAX __SIZE_MAX__
-# elif defined(SIZE_T_MAX)
+# elif defined(SIZE_T_MAX) && (SIZE_T_MAX > 0)
# define SIZE_MAX SIZE_T_MAX
# else
# define SIZE_MAX ((std::numeric_limits<size_t>::max)())
|