From 44cb63a6ecea58dc21d20843f5af0a006f8b36cd Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 10 Jan 2014 17:32:51 +0700 Subject: Update to current libcxxabi for new exception code. --- system/lib/libcxxabi/src/stdexcept.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'system/lib/libcxxabi/src/stdexcept.cpp') diff --git a/system/lib/libcxxabi/src/stdexcept.cpp b/system/lib/libcxxabi/src/stdexcept.cpp index de859db4..246eea4b 100644 --- a/system/lib/libcxxabi/src/stdexcept.cpp +++ b/system/lib/libcxxabi/src/stdexcept.cpp @@ -47,7 +47,7 @@ private: #if __APPLE__ static const void* - compute_gcc_empty_string_storage() _LIBCPP_CANTTHROW + compute_gcc_empty_string_storage() _NOEXCEPT { void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); if (handle == 0) @@ -57,7 +57,7 @@ private: static const void* - get_gcc_empty_string_storage() _LIBCPP_CANTTHROW + get_gcc_empty_string_storage() _NOEXCEPT { static const void* p = compute_gcc_empty_string_storage(); return p; @@ -66,9 +66,9 @@ private: public: explicit __libcpp_nmstr(const char* msg); - __libcpp_nmstr(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; - __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; - ~__libcpp_nmstr() _LIBCPP_CANTTHROW; + __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT; + __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT; + ~__libcpp_nmstr(); const char* c_str() const _NOEXCEPT {return str_;} }; @@ -80,11 +80,11 @@ __libcpp_nmstr::__libcpp_nmstr(const char* msg) c->len = c->cap = len; str_ += offset; count() = 0; - std::strcpy(const_cast(c_str()), msg); + std::memcpy(const_cast(c_str()), msg, len + 1); } inline -__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) +__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT : str_(s.str_) { #if __APPLE__ @@ -94,7 +94,7 @@ __libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) } __libcpp_nmstr& -__libcpp_nmstr::operator=(const __libcpp_nmstr& s) +__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT { const char* p = str_; str_ = s.str_; -- cgit v1.2.3-70-g09d2