summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/__config
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-10-22 18:25:04 +0000
committerdim <dim@FreeBSD.org>2012-10-22 18:25:04 +0000
commit708d8e446e991358da23bb52ec5320440221f12f (patch)
tree3a061d75674cd5b60d9f6df45d0b8d755da3782f /contrib/libc++/include/__config
parentb8c74d455d2690e710a0802a98a9d310995a52eb (diff)
parent13334223d751d249ccd6475b8cba36ff71ddc972 (diff)
downloadFreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.zip
FreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.tar.gz
Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with compiling certain ports that exercise C++11 mode (i.e. Firefox). Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files, which are referred to in all the source files. MFC after: 1 month
Diffstat (limited to 'contrib/libc++/include/__config')
-rw-r--r--contrib/libc++/include/__config40
1 files changed, 28 insertions, 12 deletions
diff --git a/contrib/libc++/include/__config b/contrib/libc++/include/__config
index 7cd01dc..75b2206 100644
--- a/contrib/libc++/include/__config
+++ b/contrib/libc++/include/__config
@@ -15,7 +15,11 @@
#pragma GCC system_header
#endif
-#define _LIBCPP_VERSION 1001
+#ifdef __GNUC__
+#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
+#endif
+
+#define _LIBCPP_VERSION 1101
#define _LIBCPP_ABI_VERSION 1
@@ -53,7 +57,8 @@
# define _LIBCPP_LITTLE_ENDIAN 1
# define _LIBCPP_BIG_ENDIAN 0
// Compiler intrinsics (GCC or MSVC)
-# if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3)
+# if (defined(_MSC_VER) && _MSC_VER >= 1400) \
+ || (defined(__GNUC__) && _GNUC_VER > 403)
# define _LIBCP_HAS_IS_BASE_OF
# endif
#endif // _WIN32
@@ -145,8 +150,10 @@
#if defined(__clang__)
#if __has_feature(cxx_alignas)
+# define _ALIGNAS_TYPE(x) alignas(x)
# define _ALIGNAS(x) alignas(x)
#else
+# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
# define _ALIGNAS(x) __attribute__((__aligned__(x)))
#endif
@@ -180,9 +187,9 @@ typedef __char32_t char32_t;
#endif
#if __has_feature(cxx_attributes)
-# define _ATTRIBUTE(x) [[x]]
+# define _LIBCPP_NORETURN [[noreturn]]
#else
-# define _ATTRIBUTE(x) __attribute__ ((x))
+# define _LIBCPP_NORETURN __attribute__ ((noreturn))
#endif
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
@@ -245,8 +252,9 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
-#if __FreeBSD__
+#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
#define _LIBCPP_HAS_QUICK_EXIT
+#define _LIBCPP_HAS_C11_FEATURES
#endif
#if (__has_feature(cxx_noexcept))
@@ -274,8 +282,9 @@ namespace std {
#elif defined(__GNUC__)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
+#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x))))
-#define _ATTRIBUTE(x) __attribute__((x))
+#define _LIBCPP_NORETURN __attribute__((noreturn))
#if !__EXCEPTIONS
#define _LIBCPP_NO_EXCEPTIONS
@@ -305,15 +314,15 @@ namespace std {
#define _LIBCPP_HAS_NO_TRAILING_RETURN
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
+#if _GNUC_VER < 403
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
#endif
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
+#if _GNUC_VER < 403
#define _LIBCPP_HAS_NO_STATIC_ASSERT
#endif
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+#if _GNUC_VER < 404
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
#define _LIBCPP_HAS_NO_DECLTYPE
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
@@ -321,9 +330,9 @@ namespace std {
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_VARIADICS
#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
+#endif // _GNUC_VER < 404
-#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
+#if _GNUC_VER < 406
#define _LIBCPP_HAS_NO_NULLPTR
#endif
@@ -347,7 +356,7 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
#define __alignof__ __alignof
-#define _ATTRIBUTE __declspec
+#define _LIBCPP_NORETURN __declspec(noreturn)
#define _ALIGNAS(x) __declspec(align(x))
#define _LIBCPP_HAS_NO_VARIADICS
@@ -389,6 +398,12 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_CONSTEXPR constexpr
#endif
+#ifdef __GNUC__
+#define _NOALIAS __attribute__((malloc))
+#else
+#define _NOALIAS
+#endif
+
#ifndef __has_feature
#define __has_feature(__x) 0
#endif
@@ -404,6 +419,7 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
_ __v_; \
_LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \
+ _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<_>(__v)) {} \
_LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \
};
#else // _LIBCPP_HAS_NO_STRONG_ENUMS
OpenPOWER on IntegriCloud