summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-05-21 08:32:23 -0400
committerJeffrey Walton <noloader@gmail.com>2016-05-21 08:32:23 -0400
commit6a6027c2cd125cafc7c5a04714049f20a60cfa03 (patch)
treeb080029fa0be56fd4e610e07e6743e2f9225ed65 /misc.h
parentf260be1f426123c897e0d67e4ad67ca751dc1a89 (diff)
downloadcryptopp-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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc.h b/misc.h
index 9e33688e..5fe8f00a 100644
--- a/misc.h
+++ b/misc.h
@@ -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)())