diff options
author | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
commit | 7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19 (patch) | |
tree | 077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/include/__config | |
parent | d83b894ff4280333de5ef40496cfd061b515ba54 (diff) | |
parent | baa75b9984d33ea49ffb76a73507b64d879166cc (diff) | |
download | FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.zip FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.tar.gz |
Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!
Approved by: dim (mentor)
Diffstat (limited to 'contrib/libc++/include/__config')
-rw-r--r-- | contrib/libc++/include/__config | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/contrib/libc++/include/__config b/contrib/libc++/include/__config index 0f6c77d..e0b9582 100644 --- a/contrib/libc++/include/__config +++ b/contrib/libc++/include/__config @@ -58,6 +58,17 @@ # endif #endif // _WIN32 +#ifdef __sun__ +# include <sys/isa_defs.h> +# ifdef _LITTLE_ENDIAN +# define _LIBCPP_LITTLE_ENDIAN 1 +# define _LIBCPP_BIG_ENDIAN 0 +# else +# define _LIBCPP_LITTLE_ENDIAN 0 +# define _LIBCPP_BIG_ENDIAN 1 +# endif +#endif // __sun__ + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include <endian.h> # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -160,6 +171,10 @@ typedef __char32_t char32_t; #define _LIBCPP_NO_RTTI #endif +#if !(__has_feature(cxx_strong_enums)) +#define _LIBCPP_HAS_NO_STRONG_ENUMS +#endif + #if !(__has_feature(cxx_decltype)) #define _LIBCPP_HAS_NO_DECLTYPE #endif @@ -223,6 +238,7 @@ typedef __char32_t char32_t; #if __has_feature(objc_arc_weak) #define _LIBCPP_HAS_OBJC_ARC_WEAK +#define _LIBCPP_HAS_NO_STRONG_ENUMS #endif #if !(__has_feature(cxx_constexpr)) @@ -371,7 +387,25 @@ template <unsigned> struct __static_assert_check {}; #define __has_feature(__x) 0 #endif -#if __APPLE__ || __FreeBSD__ || _WIN32 +#if __has_feature(cxx_explicit_conversions) +# define _LIBCPP_EXPLICIT explicit +#else +# define _LIBCPP_EXPLICIT +#endif + +#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_VISIBLE x { enum _ +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ + _ __v_; \ + _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ + }; +#else // _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_VISIBLE x +#define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) +#endif // _LIBCPP_HAS_NO_STRONG_ENUMS + +#if __APPLE__ || __FreeBSD__ || _WIN32 || __sun__ #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif #if __FreeBSD__ @@ -382,7 +416,7 @@ template <unsigned> struct __static_assert_check {}; #define _LIBCPP_HAS_DEFAULTRUNELOCALE #endif -#if __APPLE__ || __FreeBSD__ +#if __APPLE__ || __FreeBSD__ || __sun__ #define _LIBCPP_WCTYPE_IS_MASK #endif |