diff options
author | dim <dim@FreeBSD.org> | 2012-10-22 18:25:04 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-10-22 18:25:04 +0000 |
commit | 708d8e446e991358da23bb52ec5320440221f12f (patch) | |
tree | 3a061d75674cd5b60d9f6df45d0b8d755da3782f /contrib/libc++/include/cstdlib | |
parent | b8c74d455d2690e710a0802a98a9d310995a52eb (diff) | |
parent | 13334223d751d249ccd6475b8cba36ff71ddc972 (diff) | |
download | FreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.zip FreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.tar.gz |
Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).
Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.
MFC after: 1 month
Diffstat (limited to 'contrib/libc++/include/cstdlib')
-rw-r--r-- | contrib/libc++/include/cstdlib | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/contrib/libc++/include/cstdlib b/contrib/libc++/include/cstdlib index a5c78e9..7f6c6c8 100644 --- a/contrib/libc++/include/cstdlib +++ b/contrib/libc++/include/cstdlib @@ -74,6 +74,9 @@ int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n); 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,14 +138,17 @@ using ::wcstombs; 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__) -inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) {return labs(__x);} -inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) {return llabs(__x);} +inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} +inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} -inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) {return ldiv(__x, __y);} -inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) {return lldiv(__x, __y);} +inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);} +inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);} #endif // _MSC_VER _LIBCPP_END_NAMESPACE_STD |