summaryrefslogtreecommitdiff
path: root/libcxx/src
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-17 20:45:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-17 20:45:01 +0000
commit706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch)
tree4adf86a776049cbf7f69a1929c4babcbbef925eb /libcxx/src
parent7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff)
Notes
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/algorithm.cpp2
-rw-r--r--libcxx/src/chrono.cpp4
-rw-r--r--libcxx/src/condition_variable.cpp2
-rw-r--r--libcxx/src/debug.cpp2
-rw-r--r--libcxx/src/experimental/memory_resource.cpp2
-rw-r--r--libcxx/src/filesystem/operations.cpp4
-rw-r--r--libcxx/src/locale.cpp4
-rw-r--r--libcxx/src/memory.cpp2
-rw-r--r--libcxx/src/mutex.cpp2
-rw-r--r--libcxx/src/mutex_destructor.cpp1
-rw-r--r--libcxx/src/regex.cpp2
-rw-r--r--libcxx/src/shared_mutex.cpp2
-rw-r--r--libcxx/src/thread.cpp4
13 files changed, 17 insertions, 16 deletions
diff --git a/libcxx/src/algorithm.cpp b/libcxx/src/algorithm.cpp
index ffdcb5fccde7..40669fb9e756 100644
--- a/libcxx/src/algorithm.cpp
+++ b/libcxx/src/algorithm.cpp
@@ -10,7 +10,7 @@
#include "random"
#ifndef _LIBCPP_HAS_NO_THREADS
#include "mutex"
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index c461d19ddb1f..9d448b6a985b 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -37,7 +37,7 @@
#endif
#endif
-#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB)
#pragma comment(lib, "rt")
#endif
@@ -183,7 +183,7 @@ steady_clock::now() _NOEXCEPT
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx says:
// If the function fails, the return value is zero. <snip>
-// On systems that run Windows XP or later, the function will always succeed
+// On systems that run Windows XP or later, the function will always succeed
// and will thus never return zero.
static LARGE_INTEGER
diff --git a/libcxx/src/condition_variable.cpp b/libcxx/src/condition_variable.cpp
index bf89d255dd82..d133b010d71f 100644
--- a/libcxx/src/condition_variable.cpp
+++ b/libcxx/src/condition_variable.cpp
@@ -15,7 +15,7 @@
#include "system_error"
#include "__undef_macros"
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
diff --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp
index 1f5ce1052f87..20055fcf7590 100644
--- a/libcxx/src/debug.cpp
+++ b/libcxx/src/debug.cpp
@@ -15,7 +15,7 @@
#include "__hash_table"
#ifndef _LIBCPP_HAS_NO_THREADS
#include "mutex"
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp
index e98726283173..68c5bc99cc72 100644
--- a/libcxx/src/experimental/memory_resource.cpp
+++ b/libcxx/src/experimental/memory_resource.cpp
@@ -12,7 +12,7 @@
#include "atomic"
#elif !defined(_LIBCPP_HAS_NO_THREADS)
#include "mutex"
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index 4e6cb1427a11..876399fb4d4e 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -44,7 +44,7 @@
#include <sys/time.h> // for gettimeofday and timeval
#endif // !defined(CLOCK_REALTIME)
-#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB)
#pragma comment(lib, "rt")
#endif
@@ -1592,7 +1592,7 @@ static int CompareRootDir(PathParser *LHS, PathParser *RHS) {
static int CompareRelative(PathParser *LHSPtr, PathParser *RHSPtr) {
auto &LHS = *LHSPtr;
auto &RHS = *RHSPtr;
-
+
int res;
while (LHS && RHS) {
if ((res = (*LHS).compare(*RHS)) != 0)
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 5b29ee448685..2757eaa5acda 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -39,7 +39,7 @@
#include "__undef_macros"
// On Linux, wint_t and wchar_t have different signed-ness, and this causes
-// lots of noise in the build log, but no bugs that I know of.
+// lots of noise in the build log, but no bugs that I know of.
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wsign-conversion"
#endif
@@ -770,7 +770,7 @@ const ctype_base::mask ctype_base::xdigit;
const ctype_base::mask ctype_base::blank;
const ctype_base::mask ctype_base::alnum;
const ctype_base::mask ctype_base::graph;
-
+
locale::id ctype<wchar_t>::id;
ctype<wchar_t>::~ctype()
diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp
index e89d94f27e4c..633c9a6f5658 100644
--- a/libcxx/src/memory.cpp
+++ b/libcxx/src/memory.cpp
@@ -10,7 +10,7 @@
#ifndef _LIBCPP_HAS_NO_THREADS
#include "mutex"
#include "thread"
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp
index 7e979cd89041..27a4fd892778 100644
--- a/libcxx/src/mutex.cpp
+++ b/libcxx/src/mutex.cpp
@@ -13,7 +13,7 @@
#include "__undef_macros"
#ifndef _LIBCPP_HAS_NO_THREADS
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/libcxx/src/mutex_destructor.cpp b/libcxx/src/mutex_destructor.cpp
index 3a6b6b55eeb7..2038d2bbe21a 100644
--- a/libcxx/src/mutex_destructor.cpp
+++ b/libcxx/src/mutex_destructor.cpp
@@ -48,4 +48,3 @@ mutex::~mutex() _NOEXCEPT
#endif // !_LIBCPP_HAS_NO_THREADS
_LIBCPP_END_NAMESPACE_STD
-
diff --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp
index a971f646459b..d31e49487432 100644
--- a/libcxx/src/regex.cpp
+++ b/libcxx/src/regex.cpp
@@ -53,6 +53,8 @@ make_error_type_string(regex_constants::error_type ecode)
return "An invalid regex grammar has been requested.";
case regex_constants::__re_err_empty:
return "An empty regex is not allowed in the POSIX grammar.";
+ case regex_constants::__re_err_parse:
+ return "The parser did not consume the entire regular expression.";
default:
break;
}
diff --git a/libcxx/src/shared_mutex.cpp b/libcxx/src/shared_mutex.cpp
index 9e6d5202aafa..5feef9f4889f 100644
--- a/libcxx/src/shared_mutex.cpp
+++ b/libcxx/src/shared_mutex.cpp
@@ -10,7 +10,7 @@
#ifndef _LIBCPP_HAS_NO_THREADS
#include "shared_mutex"
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp
index cee778f6ee85..c0bc1cbbbbc3 100644
--- a/libcxx/src/thread.cpp
+++ b/libcxx/src/thread.cpp
@@ -35,7 +35,7 @@
#include <windows.h>
#endif
-#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
#pragma comment(lib, "pthread")
#endif
@@ -139,7 +139,7 @@ class _LIBCPP_HIDDEN __hidden_allocator
{
public:
typedef T value_type;
-
+
T* allocate(size_t __n)
{return static_cast<T*>(::operator new(__n * sizeof(T)));}
void deallocate(T* __p, size_t) {::operator delete(static_cast<void*>(__p));}