summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-08-31 06:29:35 -0400
committerJeffrey Walton <noloader@gmail.com>2017-08-31 06:29:35 -0400
commit67bcdaed9abb442c72ab214d23e8e8e04739e445 (patch)
treef7e9c0c3b72130b3c2745dab2f07bbcd9a8e56b9 /config.h
parent5cd854b2d3cff4f8f521a2ad3cf3f88cd86c487e (diff)
downloadcryptopp-git-67bcdaed9abb442c72ab214d23e8e8e04739e445.tar.gz
Fix compile under AIX 7.1
Diffstat (limited to 'config.h')
-rw-r--r--config.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/config.h b/config.h
index 4f41ba5f..753e9add 100644
--- a/config.h
+++ b/config.h
@@ -809,7 +809,7 @@ NAMESPACE_END
// ************** Instrumentation ***************
-// GCC does not support; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78204
+// GCC does not support; see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=78204
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30700) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000)
# define CRYPTOPP_NO_SANITIZE(x) __attribute__((no_sanitize(x)))
#else
@@ -982,10 +982,20 @@ NAMESPACE_END
#endif // nullptr_t compilers
// TODO: Emplacement, R-values and Move semantics
-// Needed because we are catching warnings with GCC and MSC
#endif // CRYPTOPP_CXX11
+// Hack ahead. New GCC compilers like GCC 6 on AIX 7.0 or earlier don't have the
+// synchronization gear. However, Wakely's test used for Apple does not work
+// on the GCC/AIX combination. Another twist is we need other stuff from C++11,
+// like no-except destructors. Dumping preprocessors shows the following may
+// apply: http://stackoverflow.com/q/14191566/608639.
+#if defined(_AIX) && defined(__GNUC__)
+# if !defined(_GLIBCXX_HAS_GTHREADS)
+# undef CRYPTOPP_CXX11_SYNCHRONIZATION
+# endif
+#endif
+
#if defined(CRYPTOPP_CXX11_NOEXCEPT)
# define CRYPTOPP_THROW noexcept(false)
# define CRYPTOPP_NO_THROW noexcept(true)