summaryrefslogtreecommitdiffstats
path: root/contrib/libc++
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2012-03-14 14:40:22 +0000
committertheraven <theraven@FreeBSD.org>2012-03-14 14:40:22 +0000
commiteccfeea8a5f95c5484d846fba96de60c97d00c2c (patch)
treed9a45c8129e1de9dfacd43f81cfb6e078d747f65 /contrib/libc++
parentff1fc6fb5cf6febb3683f7cb3824ab6b4d7ad43f (diff)
downloadFreeBSD-src-eccfeea8a5f95c5484d846fba96de60c97d00c2c.zip
FreeBSD-src-eccfeea8a5f95c5484d846fba96de60c97d00c2c.tar.gz
Import a slightly newer libc++, with some bugs fixed that were found by running
the test suite on FreeBSD. Approved by: dim (mentor)
Diffstat (limited to 'contrib/libc++')
-rw-r--r--contrib/libc++/include/__config4
-rw-r--r--contrib/libc++/include/cstdlib4
-rw-r--r--contrib/libc++/src/exception.cpp14
-rw-r--r--contrib/libc++/src/new.cpp7
4 files changed, 19 insertions, 10 deletions
diff --git a/contrib/libc++/include/__config b/contrib/libc++/include/__config
index e0b9582..6b29014 100644
--- a/contrib/libc++/include/__config
+++ b/contrib/libc++/include/__config
@@ -245,6 +245,10 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_CONSTEXPR
#endif
+#if __FreeBSD__
+#define _LIBCPP_HAS_QUICK_EXIT
+#endif
+
#if (__has_feature(cxx_noexcept))
# define _NOEXCEPT noexcept
# define _NOEXCEPT_(x) noexcept(x)
diff --git a/contrib/libc++/include/cstdlib b/contrib/libc++/include/cstdlib
index 1158db2..a5c78e9 100644
--- a/contrib/libc++/include/cstdlib
+++ b/contrib/libc++/include/cstdlib
@@ -131,6 +131,10 @@ using ::mbtowc;
using ::wctomb;
using ::mbstowcs;
using ::wcstombs;
+#ifdef _LIBCPP_HAS_QUICK_EXIT
+using ::at_quick_exit;
+using ::quick_exit;
+#endif
// MSVC already has the correct prototype in <stdlib.h.h> #ifdef __cplusplus
#if !defined(_MSC_VER) && !defined(__sun__)
diff --git a/contrib/libc++/src/exception.cpp b/contrib/libc++/src/exception.cpp
index 6b5e698..6a5803d 100644
--- a/contrib/libc++/src/exception.cpp
+++ b/contrib/libc++/src/exception.cpp
@@ -114,13 +114,17 @@ exception::~exception() _NOEXCEPT
{
}
-bad_exception::~bad_exception() _NOEXCEPT
+const char* exception::what() const _NOEXCEPT
{
+ return "std::exception";
}
-const char* exception::what() const _NOEXCEPT
+#endif // _LIBCPPABI_VERSION
+#endif //LIBCXXRT
+#ifndef _LIBCPPABI_VERSION
+
+bad_exception::~bad_exception() _NOEXCEPT
{
- return "std::exception";
}
const char* bad_exception::what() const _NOEXCEPT
@@ -128,8 +132,8 @@ const char* bad_exception::what() const _NOEXCEPT
return "std::bad_exception";
}
-#endif // _LIBCPPABI_VERSION
-#endif //LIBCXXRT
+#endif
+
exception_ptr::~exception_ptr() _NOEXCEPT
{
diff --git a/contrib/libc++/src/new.cpp b/contrib/libc++/src/new.cpp
index 1c171a8..1fb4b2d 100644
--- a/contrib/libc++/src/new.cpp
+++ b/contrib/libc++/src/new.cpp
@@ -24,8 +24,6 @@
static std::new_handler __new_handler;
#endif
-#if !defined (LIBCXXRT) // && !defined(_LIBCPPABI_VERSION)
-
// Implement all new and delete operators as weak definitions
// in this shared library, so that they can be overriden by programs
// that define non-weak copies of the functions.
@@ -134,8 +132,6 @@ operator delete[] (void* ptr, const std::nothrow_t&) _NOEXCEPT
::operator delete[](ptr);
}
-#endif // !_LIBCPPABI_VERSION && !LIBCXXRT
-
namespace std
{
@@ -171,6 +167,8 @@ bad_alloc::what() const _NOEXCEPT
return "std::bad_alloc";
}
+#endif //LIBCXXRT
+
bad_array_new_length::bad_array_new_length() _NOEXCEPT
{
}
@@ -186,7 +184,6 @@ bad_array_new_length::what() const _NOEXCEPT
}
#endif
-#endif //LIBCXXRT
void
__throw_bad_alloc()
OpenPOWER on IntegriCloud