summaryrefslogtreecommitdiff
path: root/darn.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-27 20:47:00 -0500
committerJeffrey Walton <noloader@gmail.com>2018-11-27 20:47:00 -0500
commit5685b0fdc4c62ad71c82c756237ef4c7fde15085 (patch)
tree3ca9727752ff1c2ae90d1861ee29234f78a510a3 /darn.cpp
parent7a9970f02e8a873ee4ea5f7c09d62d1203a4dd22 (diff)
downloadcryptopp-git-5685b0fdc4c62ad71c82c756237ef4c7fde15085.tar.gz
Guard GCC_DARN_ASM_AVAILABLE on GCC 4.0
The GCC inline assembler is available at GCC 3.2, but we check for 4.0 for expediency
Diffstat (limited to 'darn.cpp')
-rw-r--r--darn.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/darn.cpp b/darn.cpp
index 5c40ba78..0cc05687 100644
--- a/darn.cpp
+++ b/darn.cpp
@@ -14,7 +14,10 @@
// Platforms that don't support GCC inline assembly or the builtin will fail
// the compile.
-#if defined(__GNUC__) || defined(__IBM_GCC_ASM)
+// Inline assembler available in GCC 3.2 or above. For practical
+// purposes we check for GCC 4.0 or above. GCC imposters claim
+// to be GCC 4.2.1 so it will capture them, too.
+#if (__GNUC__ >= 4) || defined(__IBM_GCC_ASM)
# define GCC_DARN_ASM_AVAILABLE 1
#endif