aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/globals.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/src/globals.cc')
-rw-r--r--libstdc++-v3/src/globals.cc26
1 files changed, 25 insertions, 1 deletions
diff --git a/libstdc++-v3/src/globals.cc b/libstdc++-v3/src/globals.cc
index d85bf3a6369..efbfdbe854b 100644
--- a/libstdc++-v3/src/globals.cc
+++ b/libstdc++-v3/src/globals.cc
@@ -47,7 +47,7 @@
namespace __gnu_cxx
{
using namespace std;
-
+
typedef char fake_facet_name[sizeof(char*)]
__attribute__ ((aligned(__alignof__(char*))));
fake_facet_name facet_name[6 + _GLIBCPP_NUM_CATEGORIES];
@@ -84,6 +84,11 @@ namespace __gnu_cxx
fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS];
_GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9facet_vecE, _ZSt9facet_vec, GLIBCPP_3.2)
+ // To support combined facets and caches in facet array
+ typedef char fake_facet_cache_vec[sizeof(locale::facet*)]
+ __attribute__ ((aligned(__alignof__(locale::facet*))));
+ fake_facet_cache_vec facet_cache_vec[2 * _GLIBCPP_NUM_FACETS];
+
typedef char fake_ctype_c[sizeof(std::ctype<char>)]
__attribute__ ((aligned(__alignof__(std::ctype<char>))));
fake_ctype_c ctype_c;
@@ -224,6 +229,17 @@ namespace __gnu_cxx
_GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10messages_wE, _ZSt10messages_w, GLIBCPP_3.2)
#endif
+ // Storage for static C locale caches
+ typedef char fake_locale_cache_np_c[sizeof(std::__locale_cache<numpunct<char> >)]
+ __attribute__ ((aligned(__alignof__(std::__locale_cache<numpunct<char> >))));
+ fake_locale_cache_np_c locale_cache_np_c;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+ typedef char fake_locale_cache_np_w[sizeof(std::__locale_cache<numpunct<wchar_t> >)]
+ __attribute__ ((aligned(__alignof__(std::__locale_cache<numpunct<wchar_t> >))));
+ fake_locale_cache_np_w locale_cache_np_w;
+#endif
+
typedef char fake_filebuf[sizeof(stdio_filebuf<char>)]
__attribute__ ((aligned(__alignof__(stdio_filebuf<char>))));
fake_filebuf buf_cout;
@@ -266,6 +282,14 @@ namespace __gnu_cxx
_GLIBCPP_mutex_address_init ()
{ __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); }
#endif
+
+ // GLIBCXX_ABI.
+ struct __compat
+ {
+ static const char _S_atoms[];
+ };
+ const char __compat::_S_atoms[] = "0123456789eEabcdfABCDF";
+ _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8__compat8_S_atomsE, _ZNSt10__num_base8_S_atomsE, GLIBCPP_3.2)
} // namespace __gnu_cxx
namespace std