summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/__config
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/__config')
-rw-r--r--contrib/libc++/include/__config48
1 files changed, 45 insertions, 3 deletions
diff --git a/contrib/libc++/include/__config b/contrib/libc++/include/__config
index 959390d..ca850d3 100644
--- a/contrib/libc++/include/__config
+++ b/contrib/libc++/include/__config
@@ -56,6 +56,18 @@
# endif // __LONG_LONG_SUPPORTED
#endif // __FreeBSD__
+#ifdef __NetBSD__
+# include <sys/endian.h>
+# if _BYTE_ORDER == _LITTLE_ENDIAN
+# define _LIBCPP_LITTLE_ENDIAN 1
+# define _LIBCPP_BIG_ENDIAN 0
+# else // _BYTE_ORDER == _LITTLE_ENDIAN
+# define _LIBCPP_LITTLE_ENDIAN 0
+# define _LIBCPP_BIG_ENDIAN 1
+# endif // _BYTE_ORDER == _LITTLE_ENDIAN
+# define _LIBCPP_HAS_QUICK_EXIT
+#endif // __NetBSD__
+
#ifdef _WIN32
# define _LIBCPP_LITTLE_ENDIAN 1
# define _LIBCPP_BIG_ENDIAN 0
@@ -135,6 +147,10 @@
#endif // _WIN32
+#ifndef __has_attribute
+#define __has_attribute(__x) 0
+#endif
+
#ifndef _LIBCPP_HIDDEN
#define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
#endif
@@ -212,7 +228,9 @@ typedef __char32_t char32_t;
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
#endif
+#if !(__has_feature(cxx_defaulted_functions))
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#endif // !(__has_feature(cxx_defaulted_functions))
#if !(__has_feature(cxx_deleted_functions))
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
@@ -272,9 +290,19 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
-#if defined(__FreeBSD__) && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
+#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
+#if defined(__FreeBSD__)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
+#elif defined(__linux__)
+#include <features.h>
+#if __GLIBC_PREREQ(2, 15)
+#define _LIBCPP_HAS_QUICK_EXIT
+#endif
+#if __GLIBC_PREREQ(2, 17)
+#define _LIBCPP_HAS_C11_FEATURES
+#endif
+#endif
#endif
#if (__has_feature(cxx_noexcept))
@@ -418,8 +446,14 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_CONSTEXPR constexpr
#endif
+#ifdef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#define _LIBCPP_DEFAULT {}
+#else
+#define _LIBCPP_DEFAULT = default;
+#endif
+
#ifdef __GNUC__
-#define _NOALIAS __attribute__((malloc))
+#define _NOALIAS __attribute__((__malloc__))
#else
#define _NOALIAS
#endif
@@ -451,7 +485,7 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
#ifdef __FreeBSD__
@@ -476,6 +510,14 @@ template <unsigned> struct __static_assert_check {};
# endif
#endif
+#ifndef _LIBCPP_STD_VER
+# if __cplusplus <= 201103L
+# define _LIBCPP_STD_VER 11
+# else
+# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification
+# endif
+#endif // _LIBCPP_STD_VER
+
#ifdef _LIBCPP_DEBUG2
# include <__debug>
#else
OpenPOWER on IntegriCloud