Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2012 14:40:23 +0000 (UTC)
From:      David Chisnall <theraven@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232972 - in head/contrib/libc++: include src
Message-ID:  <201203141440.q2EEeNYv017993@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: theraven
Date: Wed Mar 14 14:40:22 2012
New Revision: 232972
URL: http://svn.freebsd.org/changeset/base/232972

Log:
  Import a slightly newer libc++, with some bugs fixed that were found by running
  the test suite on FreeBSD.
  
  Approved by:	dim (mentor)

Modified:
  head/contrib/libc++/include/__config
  head/contrib/libc++/include/cstdlib
  head/contrib/libc++/src/exception.cpp
  head/contrib/libc++/src/new.cpp
Directory Properties:
  head/contrib/libc++/   (props changed)

Modified: head/contrib/libc++/include/__config
==============================================================================
--- head/contrib/libc++/include/__config	Wed Mar 14 14:39:07 2012	(r232971)
+++ head/contrib/libc++/include/__config	Wed Mar 14 14:40:22 2012	(r232972)
@@ -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)

Modified: head/contrib/libc++/include/cstdlib
==============================================================================
--- head/contrib/libc++/include/cstdlib	Wed Mar 14 14:39:07 2012	(r232971)
+++ head/contrib/libc++/include/cstdlib	Wed Mar 14 14:40:22 2012	(r232972)
@@ -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__)

Modified: head/contrib/libc++/src/exception.cpp
==============================================================================
--- head/contrib/libc++/src/exception.cpp	Wed Mar 14 14:39:07 2012	(r232971)
+++ head/contrib/libc++/src/exception.cpp	Wed Mar 14 14:40:22 2012	(r232972)
@@ -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 
   return "std::bad_exception";
 }
 
-#endif  // _LIBCPPABI_VERSION
-#endif //LIBCXXRT
+#endif
+
 
 exception_ptr::~exception_ptr() _NOEXCEPT
 {

Modified: head/contrib/libc++/src/new.cpp
==============================================================================
--- head/contrib/libc++/src/new.cpp	Wed Mar 14 14:39:07 2012	(r232971)
+++ head/contrib/libc++/src/new.cpp	Wed Mar 14 14:40:22 2012	(r232972)
@@ -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:
     ::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 _NOEX
 }
 
 #endif
-#endif //LIBCXXRT
 
 void
 __throw_bad_alloc()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203141440.q2EEeNYv017993>