[cfe-commits] [libcxx] r165882 - in /libcxx/trunk/include: __config cstdlib

Howard Hinnant hhinnant at apple.com
Sat Oct 13 11:03:53 PDT 2012


Author: hhinnant
Date: Sat Oct 13 13:03:53 2012
New Revision: 165882

URL: http://llvm.org/viewvc/llvm-project?rev=165882&view=rev
Log:
Dimitry Andric:  FreeBSD only:  Add the C11 aligned_alloc to <cstdlib> and adjust the inclusion of quick_exit.

Modified:
    libcxx/trunk/include/__config
    libcxx/trunk/include/cstdlib

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=165882&r1=165881&r2=165882&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Sat Oct 13 13:03:53 2012
@@ -252,8 +252,9 @@
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
 
-#if __FreeBSD__
+#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
 #define _LIBCPP_HAS_QUICK_EXIT
+#define _LIBCPP_HAS_C11_FEATURES
 #endif
 
 #if (__has_feature(cxx_noexcept))

Modified: libcxx/trunk/include/cstdlib
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cstdlib?rev=165882&r1=165881&r2=165882&view=diff
==============================================================================
--- libcxx/trunk/include/cstdlib (original)
+++ libcxx/trunk/include/cstdlib Sat Oct 13 13:03:53 2012
@@ -74,6 +74,9 @@
 int wctomb(char* s, wchar_t wchar);
 size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
 size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
+int at_quick_exit(void (*func)(void))                                     // C++11
+void quick_exit(int status);                                              // C++11
+void *aligned_alloc(size_t alignment, size_t size);                       // C11
 
 }  // std
 
@@ -135,6 +138,9 @@
 using ::at_quick_exit;
 using ::quick_exit;
 #endif
+#ifdef _LIBCPP_HAS_C11_FEATURES
+using ::aligned_alloc;
+#endif
 
 // MSVC already has the correct prototype in <stdlib.h.h> #ifdef __cplusplus
 #if !defined(_MSC_VER) && !defined(__sun__)





More information about the cfe-commits mailing list