summaryrefslogtreecommitdiff
path: root/boost/config/stdlib/libstdcpp3.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/config/stdlib/libstdcpp3.hpp')
-rw-r--r--boost/config/stdlib/libstdcpp3.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/boost/config/stdlib/libstdcpp3.hpp b/boost/config/stdlib/libstdcpp3.hpp
index 205489a920..9adbc8f171 100644
--- a/boost/config/stdlib/libstdcpp3.hpp
+++ b/boost/config/stdlib/libstdcpp3.hpp
@@ -143,6 +143,37 @@
# define BOOST_LIBSTDCXX_VERSION 40300
#endif
+#if (BOOST_LIBSTDCXX_VERSION < 50100)
+// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
+// defining it here is a terrible cludge, but should get things working:
+extern "C" char *gets (char *__s);
+#endif
+//
+// clang is unable to parse some GCC headers, add those workarounds here:
+//
+#if BOOST_LIBSTDCXX_VERSION < 50000
+# define BOOST_NO_CXX11_HDR_REGEX
+#endif
+//
+// GCC 4.7.x has no __cxa_thread_atexit which
+// thread_local objects require for cleanup:
+//
+#if BOOST_LIBSTDCXX_VERSION < 40800
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+//
+// Early clang versions can handle <chrono>, not exactly sure which versions
+// but certainly up to clang-3.8 and gcc-4.6:
+//
+#if (__clang_major__ < 5)
+# if BOOST_LIBSTDCXX_VERSION < 40800
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_CHRONO
+# endif
+#endif
+
//
// GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively.
// However, we have no test for these as the headers were present but broken
@@ -225,6 +256,7 @@
// so 4.7.0 is the first truly conforming one.
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
// C++0x features in GCC 4.8.0 and later
//