aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-09-02 17:49:21 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-09-02 17:49:21 +0000
commit0f40b62144c2b5a51379b2d27f6412923546eba1 (patch)
tree007b4dbd11c0f344ca49e33588566068f915ebb7
parent9a0ce10deb3f955b5a33b8f8753ca5acf7fef885 (diff)
downloadsrc-vendor/libc++-90.tar.gz
src-vendor/libc++-90.zip
Notes
Notes: svn path=/vendor/libc++/dist-release_90/; revision=351715 svn path=/vendor/libc++/libc++-release_900-r372316/; revision=352527; tag=vendor/libc++/libc++-release_900-r372316
-rw-r--r--include/__locale2
-rw-r--r--include/__threading_support24
2 files changed, 16 insertions, 10 deletions
diff --git a/include/__locale b/include/__locale
index d382e4d8a94b..2b6982fc6810 100644
--- a/include/__locale
+++ b/include/__locale
@@ -409,7 +409,7 @@ public:
static const mask xdigit = _ISxdigit;
static const mask blank = _ISblank;
#if defined(__mips__)
- static const mask __regex_word = static_cast<char_class_type>(_ISbit(15));
+ static const mask __regex_word = static_cast<mask>(_ISbit(15));
#else
static const mask __regex_word = 0x80;
#endif
diff --git a/include/__threading_support b/include/__threading_support
index 0331b7c736de..0d1f1e681f50 100644
--- a/include/__threading_support
+++ b/include/__threading_support
@@ -23,16 +23,11 @@
# include <__external_threading>
#elif !defined(_LIBCPP_HAS_NO_THREADS)
-typedef ::timespec __libcpp_timespec_t;
-
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
# include <pthread.h>
# include <sched.h>
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
#if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL) || \
defined(_LIBCPP_HAS_THREAD_API_WIN32)
@@ -47,8 +42,16 @@ _LIBCPP_PUSH_MACROS
#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
#endif
+typedef ::timespec __libcpp_timespec_t;
+#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
_LIBCPP_BEGIN_NAMESPACE_STD
+#if !defined(_LIBCPP_HAS_NO_THREADS)
+
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
// Mutex
typedef pthread_mutex_t __libcpp_mutex_t;
@@ -76,7 +79,7 @@ typedef pthread_t __libcpp_thread_t;
typedef pthread_key_t __libcpp_tls_key;
#define _LIBCPP_TLS_DESTRUCTOR_CC
-#else
+#elif !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
// Mutex
typedef void* __libcpp_mutex_t;
#define _LIBCPP_MUTEX_INITIALIZER 0
@@ -109,8 +112,9 @@ typedef void* __libcpp_thread_t;
typedef long __libcpp_tls_key;
#define _LIBCPP_TLS_DESTRUCTOR_CC __stdcall
-#endif
+#endif // !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#if !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
// Mutex
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m);
@@ -205,6 +209,8 @@ void *__libcpp_tls_get(__libcpp_tls_key __key);
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
+#endif // !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+
#if (!defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL)) && \
defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
@@ -475,10 +481,10 @@ get_id() _NOEXCEPT
} // this_thread
+#endif // !_LIBCPP_HAS_NO_THREADS
+
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // !_LIBCPP_HAS_NO_THREADS
-
#endif // _LIBCPP_THREADING_SUPPORT