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/__config38
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
OpenPOWER on IntegriCloud