aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libcxx/ios.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib/libcxx/ios.cpp')
-rw-r--r--system/lib/libcxx/ios.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/system/lib/libcxx/ios.cpp b/system/lib/libcxx/ios.cpp
index 732a61bb..004d3183 100644
--- a/system/lib/libcxx/ios.cpp
+++ b/system/lib/libcxx/ios.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
+
#include "ios"
#include "streambuf"
#include "istream"
@@ -61,7 +63,7 @@ __iostream_category::message(int ev) const
}
const error_category&
-iostream_category()
+iostream_category() _NOEXCEPT
{
static __iostream_category s;
return s;
@@ -147,8 +149,11 @@ ios_base::getloc() const
}
// xalloc
-
+#if __has_feature(cxx_atomic) && !defined(__EMSCRIPTEN__)
+atomic<int> ios_base::__xindex_ = ATOMIC_VAR_INIT(0);
+#else
int ios_base::__xindex_ = 0;
+#endif
int
ios_base::xalloc()