Commit a7817e1d by Benjamin Kosnik Committed by Benjamin Kosnik

linker-map.gnu (GLIBCPP_3.2.1): Add.


2002-10-10  Benjamin Kosnik  <bkoz@redhat.com>

	* config/linker-map.gnu (GLIBCPP_3.2.1): Add.
	(GLIBCPP_3.2): Don't export locale::_S_*.
	* src/ios.cc: Move globals into __gnu_cxx. Make old exported
	symbols match.
	* src/locale.cc: Same.
	* src/localename.cc: Same.
	* src/globals.cc: Same.

From-SVN: r58042
parent 349e9f4b
2002-10-10 Benjamin Kosnik <bkoz@redhat.com>
* config/linker-map.gnu (GLIBCPP_3.2.1): Add.
(GLIBCPP_3.2): Don't export locale::_S_*.
* src/ios.cc: Move globals into __gnu_cxx. Make old exported
symbols match.
* src/locale.cc: Same.
* src/localename.cc: Same.
* src/globals.cc: Same.
2002-10-10 Phil Edwards <pme@gcc.gnu.org> 2002-10-10 Phil Edwards <pme@gcc.gnu.org>
* docs/html/21_strings/howto.html: Write #5, char_traits. * docs/html/21_strings/howto.html: Write #5, char_traits.
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA. ## USA.
GLIBCPP_3.2 { GLIBCPP_3.2 {
global: global:
...@@ -29,7 +28,18 @@ GLIBCPP_3.2 { ...@@ -29,7 +28,18 @@ GLIBCPP_3.2 {
# All but the last are terminated with a semicolon. # All but the last are terminated with a semicolon.
extern "C++" extern "C++"
{ {
std::[A-Za-z]*; std::[A-Za-k]*;
std::length_error*;
std::logic_error*;
std::locale::[A-Za-z]*;
std::locale::_Impl*;
std::locale::_S_classic;
std::locale::_S_global;
std::locale::_S_num_categories;
std::locale::facet*;
std::locale::id*;
std::locale::locale*;
std::[A-Zm-z]*;
std::__throw_*; std::__throw_*;
std::__basic_file*; std::__basic_file*;
std::__num_base*; std::__num_base*;
...@@ -43,6 +53,11 @@ GLIBCPP_3.2 { ...@@ -43,6 +53,11 @@ GLIBCPP_3.2 {
# Names not in an 'extern' block are mangled names. # Names not in an 'extern' block are mangled names.
_ZNSt6localeC1E*;
_ZNSt6locale11_M_coalesceERKS_S1_j;
_ZNSt6locale21_S_normalize_categoryEj;
_ZNSt6localeD*;
# std::has_facet* # std::has_facet*
_ZSt9has_facet*; _ZSt9has_facet*;
...@@ -97,6 +112,15 @@ GLIBCPP_3.2 { ...@@ -97,6 +112,15 @@ GLIBCPP_3.2 {
*; *;
}; };
# Symbols added after GLIBCPP_3.2
GLIBCPP_3.2.1 {
_ZNSt7codecvtIcc11__mbstate_tEC1EP15__locale_structj;
_ZNSt7codecvtIcc11__mbstate_tEC2EP15__locale_structj;
_ZNSt7codecvtIwc11__mbstate_tEC1EP15__locale_structj;
_ZNSt7codecvtIwc11__mbstate_tEC2EP15__locale_structj;
} GLIBCPP_3.2;
# Symbols in the support library (libsupc++) have their own tag. # Symbols in the support library (libsupc++) have their own tag.
CXXABI_1.2 { CXXABI_1.2 {
......
...@@ -44,20 +44,32 @@ ...@@ -44,20 +44,32 @@
// Because <iostream> declares the standard streams to be [io]stream // Because <iostream> declares the standard streams to be [io]stream
// types instead of say [io]fstream types, it is also necessary to // types instead of say [io]fstream types, it is also necessary to
// allocate the actual file buffers in this file. // allocate the actual file buffers in this file.
namespace std namespace __gnu_cxx
{ {
// Standard "C" locale. using namespace std;
// NB: The asm directives renames these non-exported, namespace
// __gnu_cxx symbols into the mistakenly exported, namespace std
// symbols in GLIBCPP_3.2.
// The rename syntax is
// asm (".symver currentname,oldname@@GLIBCPP_3.2")
// At the same time, these new __gnu_cxx symbols are not exported.
// In the future, GLIBCXX_ABI > 5 should remove all asm directives
// in this file.
typedef char fake_locale[sizeof(locale)] typedef char fake_locale[sizeof(locale)]
__attribute__ ((aligned(__alignof__(locale)))); __attribute__ ((aligned(__alignof__(locale))));
fake_locale c_locale; fake_locale c_locale;
asm (".symver _ZN9__gnu_cxx8c_localeE,_ZSt8c_locale@@GLIBCPP_3.2");
typedef char fake_locale_Impl[sizeof(locale::_Impl)] typedef char fake_locale_Impl[sizeof(locale::_Impl)]
__attribute__ ((aligned(__alignof__(locale::_Impl)))); __attribute__ ((aligned(__alignof__(locale::_Impl))));
fake_locale_Impl c_locale_impl; fake_locale_Impl c_locale_impl;
asm (".symver _ZN9__gnu_cxx13c_locale_implE,\
_ZSt13c_locale_impl@@GLIBCPP_3.2");
typedef char fake_facet_vec[sizeof(locale::facet*)] typedef char fake_facet_vec[sizeof(locale::facet*)]
__attribute__ ((aligned(__alignof__(locale::facet*)))); __attribute__ ((aligned(__alignof__(locale::facet*))));
fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS]; fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS];
asm (".symver _ZN9__gnu_cxx9facet_vecE,_ZSt9facet_vec@@GLIBCPP_3.2");
typedef char fake_facet_name[sizeof(char*)] typedef char fake_facet_name[sizeof(char*)]
__attribute__ ((aligned(__alignof__(char*)))); __attribute__ ((aligned(__alignof__(char*))));
...@@ -66,142 +78,161 @@ namespace std ...@@ -66,142 +78,161 @@ namespace std
typedef char fake_ctype_c[sizeof(std::ctype<char>)] typedef char fake_ctype_c[sizeof(std::ctype<char>)]
__attribute__ ((aligned(__alignof__(std::ctype<char>)))); __attribute__ ((aligned(__alignof__(std::ctype<char>))));
fake_ctype_c ctype_c; fake_ctype_c ctype_c;
asm (".symver _ZN9__gnu_cxx7ctype_cE,_ZSt7ctype_c@@GLIBCPP_3.2");
typedef char fake_collate_c[sizeof(std::collate<char>)] typedef char fake_collate_c[sizeof(std::collate<char>)]
__attribute__ ((aligned(__alignof__(std::collate<char>)))); __attribute__ ((aligned(__alignof__(std::collate<char>))));
fake_collate_c collate_c; fake_collate_c collate_c;
asm (".symver _ZN9__gnu_cxx9collate_cE,_ZSt9collate_c@@GLIBCPP_3.2");
typedef char fake_numpunct_c[sizeof(numpunct<char>)] typedef char fake_numpunct_c[sizeof(numpunct<char>)]
__attribute__ ((aligned(__alignof__(numpunct<char>)))); __attribute__ ((aligned(__alignof__(numpunct<char>))));
fake_numpunct_c numpunct_c; fake_numpunct_c numpunct_c;
asm (".symver _ZN9__gnu_cxx10numpunct_cE,_ZSt10numpunct_c@@GLIBCPP_3.2");
typedef char fake_num_get_c[sizeof(num_get<char>)] typedef char fake_num_get_c[sizeof(num_get<char>)]
__attribute__ ((aligned(__alignof__(num_get<char>)))); __attribute__ ((aligned(__alignof__(num_get<char>))));
fake_num_get_c num_get_c; fake_num_get_c num_get_c;
asm (".symver _ZN9__gnu_cxx9num_get_cE,_ZSt9num_get_c@@GLIBCPP_3.2");
typedef char fake_num_put_c[sizeof(num_put<char>)] typedef char fake_num_put_c[sizeof(num_put<char>)]
__attribute__ ((aligned(__alignof__(num_put<char>)))); __attribute__ ((aligned(__alignof__(num_put<char>))));
fake_num_put_c num_put_c; fake_num_put_c num_put_c;
asm (".symver _ZN9__gnu_cxx9num_put_cE,_ZSt9num_put_c@@GLIBCPP_3.2");
typedef char fake_codecvt_c[sizeof(codecvt<char, char, mbstate_t>)] typedef char fake_codecvt_c[sizeof(codecvt<char, char, mbstate_t>)]
__attribute__ ((aligned(__alignof__(codecvt<char, char, mbstate_t>)))); __attribute__ ((aligned(__alignof__(codecvt<char, char, mbstate_t>))));
fake_codecvt_c codecvt_c; fake_codecvt_c codecvt_c;
asm (".symver _ZN9__gnu_cxx9codecvt_cE,_ZSt9codecvt_c@@GLIBCPP_3.2");
typedef char fake_moneypunct_c[sizeof(moneypunct<char, true>)] typedef char fake_moneypunct_c[sizeof(moneypunct<char, true>)]
__attribute__ ((aligned(__alignof__(moneypunct<char, true>)))); __attribute__ ((aligned(__alignof__(moneypunct<char, true>))));
fake_moneypunct_c moneypunct_tc; fake_moneypunct_c moneypunct_tc;
fake_moneypunct_c moneypunct_fc; fake_moneypunct_c moneypunct_fc;
asm (".symver _ZN9__gnu_cxx13moneypunct_tcE,\
_ZSt13moneypunct_tc@@GLIBCPP_3.2");
asm (".symver _ZN9__gnu_cxx13moneypunct_fcE,\
_ZSt13moneypunct_fc@@GLIBCPP_3.2");
typedef char fake_money_get_c[sizeof(money_get<char>)] typedef char fake_money_get_c[sizeof(money_get<char>)]
__attribute__ ((aligned(__alignof__(money_get<char>)))); __attribute__ ((aligned(__alignof__(money_get<char>))));
fake_money_get_c money_get_c; fake_money_get_c money_get_c;
asm (".symver _ZN9__gnu_cxx11money_get_cE,_ZSt11money_get_c@@GLIBCPP_3.2");
typedef char fake_money_put_c[sizeof(money_put<char>)] typedef char fake_money_put_c[sizeof(money_put<char>)]
__attribute__ ((aligned(__alignof__(money_put<char>)))); __attribute__ ((aligned(__alignof__(money_put<char>))));
fake_money_put_c money_put_c; fake_money_put_c money_put_c;
asm (".symver _ZN9__gnu_cxx11money_put_cE,_ZSt11money_put_c@@GLIBCPP_3.2");
typedef char fake_timepunct_c[sizeof(__timepunct<char>)] typedef char fake_timepunct_c[sizeof(__timepunct<char>)]
__attribute__ ((aligned(__alignof__(__timepunct<char>)))); __attribute__ ((aligned(__alignof__(__timepunct<char>))));
fake_timepunct_c timepunct_c; fake_timepunct_c timepunct_c;
asm (".symver _ZN9__gnu_cxx11timepunct_cE,_ZSt11timepunct_c@@GLIBCPP_3.2");
typedef char fake_time_get_c[sizeof(time_get<char>)] typedef char fake_time_get_c[sizeof(time_get<char>)]
__attribute__ ((aligned(__alignof__(time_get<char>)))); __attribute__ ((aligned(__alignof__(time_get<char>))));
fake_time_get_c time_get_c; fake_time_get_c time_get_c;
asm (".symver _ZN9__gnu_cxx10time_get_cE,_ZSt10time_get_c@@GLIBCPP_3.2");
typedef char fake_time_put_c[sizeof(time_put<char>)] typedef char fake_time_put_c[sizeof(time_put<char>)]
__attribute__ ((aligned(__alignof__(time_put<char>)))); __attribute__ ((aligned(__alignof__(time_put<char>))));
fake_time_put_c time_put_c; fake_time_put_c time_put_c;
asm (".symver _ZN9__gnu_cxx10time_put_cE,_ZSt10time_put_c@@GLIBCPP_3.2");
typedef char fake_messages_c[sizeof(messages<char>)] typedef char fake_messages_c[sizeof(messages<char>)]
__attribute__ ((aligned(__alignof__(messages<char>)))); __attribute__ ((aligned(__alignof__(messages<char>))));
fake_messages_c messages_c; fake_messages_c messages_c;
asm (".symver _ZN9__gnu_cxx10messages_cE,_ZSt10messages_c@@GLIBCPP_3.2");
#ifdef _GLIBCPP_USE_WCHAR_T #ifdef _GLIBCPP_USE_WCHAR_T
typedef char fake_wtype_w[sizeof(std::ctype<wchar_t>)] typedef char fake_wtype_w[sizeof(std::ctype<wchar_t>)]
__attribute__ ((aligned(__alignof__(std::ctype<wchar_t>)))); __attribute__ ((aligned(__alignof__(std::ctype<wchar_t>))));
fake_wtype_w ctype_w; fake_wtype_w ctype_w;
asm (".symver _ZN9__gnu_cxx7ctype_wE,_ZSt7ctype_w@@GLIBCPP_3.2");
typedef char fake_wollate_w[sizeof(std::collate<wchar_t>)] typedef char fake_wollate_w[sizeof(std::collate<wchar_t>)]
__attribute__ ((aligned(__alignof__(std::collate<wchar_t>)))); __attribute__ ((aligned(__alignof__(std::collate<wchar_t>))));
fake_wollate_w collate_w; fake_wollate_w collate_w;
asm (".symver _ZN9__gnu_cxx9collate_wE,_ZSt9collate_w@@GLIBCPP_3.2");
typedef char fake_numpunct_w[sizeof(numpunct<wchar_t>)] typedef char fake_numpunct_w[sizeof(numpunct<wchar_t>)]
__attribute__ ((aligned(__alignof__(numpunct<wchar_t>)))); __attribute__ ((aligned(__alignof__(numpunct<wchar_t>))));
fake_numpunct_w numpunct_w; fake_numpunct_w numpunct_w;
asm (".symver _ZN9__gnu_cxx10numpunct_wE,_ZSt10numpunct_w@@GLIBCPP_3.2");
typedef char fake_num_get_w[sizeof(num_get<wchar_t>)] typedef char fake_num_get_w[sizeof(num_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(num_get<wchar_t>)))); __attribute__ ((aligned(__alignof__(num_get<wchar_t>))));
fake_num_get_w num_get_w; fake_num_get_w num_get_w;
asm (".symver _ZN9__gnu_cxx9num_get_wE,_ZSt9num_get_w@@GLIBCPP_3.2");
typedef char fake_num_put_w[sizeof(num_put<wchar_t>)] typedef char fake_num_put_w[sizeof(num_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(num_put<wchar_t>)))); __attribute__ ((aligned(__alignof__(num_put<wchar_t>))));
fake_num_put_w num_put_w; fake_num_put_w num_put_w;
asm (".symver _ZN9__gnu_cxx9num_put_wE,_ZSt9num_put_w@@GLIBCPP_3.2");
typedef char fake_wodecvt_w[sizeof(codecvt<wchar_t, char, mbstate_t>)] typedef char fake_wodecvt_w[sizeof(codecvt<wchar_t, char, mbstate_t>)]
__attribute__ ((aligned(__alignof__(codecvt<wchar_t, char, mbstate_t>)))); __attribute__ ((aligned(__alignof__(codecvt<wchar_t, char, mbstate_t>))));
fake_wodecvt_w codecvt_w; fake_wodecvt_w codecvt_w;
asm (".symver _ZN9__gnu_cxx9codecvt_wE,_ZSt9codecvt_w@@GLIBCPP_3.2");
typedef char fake_moneypunct_w[sizeof(moneypunct<wchar_t, true>)] typedef char fake_moneypunct_w[sizeof(moneypunct<wchar_t, true>)]
__attribute__ ((aligned(__alignof__(moneypunct<wchar_t, true>)))); __attribute__ ((aligned(__alignof__(moneypunct<wchar_t, true>))));
fake_moneypunct_w moneypunct_tw; fake_moneypunct_w moneypunct_tw;
fake_moneypunct_w moneypunct_fw; fake_moneypunct_w moneypunct_fw;
asm (".symver _ZN9__gnu_cxx13moneypunct_twE,\
_ZSt13moneypunct_tw@@GLIBCPP_3.2");
asm (".symver _ZN9__gnu_cxx13moneypunct_fwE,\
_ZSt13moneypunct_fw@@GLIBCPP_3.2");
typedef char fake_money_get_w[sizeof(money_get<wchar_t>)] typedef char fake_money_get_w[sizeof(money_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(money_get<wchar_t>)))); __attribute__ ((aligned(__alignof__(money_get<wchar_t>))));
fake_money_get_w money_get_w; fake_money_get_w money_get_w;
asm (".symver _ZN9__gnu_cxx11money_get_wE,_ZSt11money_get_w@@GLIBCPP_3.2");
typedef char fake_money_put_w[sizeof(money_put<wchar_t>)] typedef char fake_money_put_w[sizeof(money_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(money_put<wchar_t>)))); __attribute__ ((aligned(__alignof__(money_put<wchar_t>))));
fake_money_put_w money_put_w; fake_money_put_w money_put_w;
asm (".symver _ZN9__gnu_cxx11money_put_wE,_ZSt11money_put_w@@GLIBCPP_3.2");
typedef char fake_timepunct_w[sizeof(__timepunct<wchar_t>)] typedef char fake_timepunct_w[sizeof(__timepunct<wchar_t>)]
__attribute__ ((aligned(__alignof__(__timepunct<wchar_t>)))); __attribute__ ((aligned(__alignof__(__timepunct<wchar_t>))));
fake_timepunct_w timepunct_w; fake_timepunct_w timepunct_w;
asm (".symver _ZN9__gnu_cxx11timepunct_wE,_ZSt11timepunct_w@@GLIBCPP_3.2");
typedef char fake_time_get_w[sizeof(time_get<wchar_t>)] typedef char fake_time_get_w[sizeof(time_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(time_get<wchar_t>)))); __attribute__ ((aligned(__alignof__(time_get<wchar_t>))));
fake_time_get_w time_get_w; fake_time_get_w time_get_w;
asm (".symver _ZN9__gnu_cxx10time_get_wE,_ZSt10time_get_w@@GLIBCPP_3.2");
typedef char fake_time_put_w[sizeof(time_put<wchar_t>)] typedef char fake_time_put_w[sizeof(time_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(time_put<wchar_t>)))); __attribute__ ((aligned(__alignof__(time_put<wchar_t>))));
fake_time_put_w time_put_w; fake_time_put_w time_put_w;
asm (".symver _ZN9__gnu_cxx10time_put_wE,_ZSt10time_put_w@@GLIBCPP_3.2");
typedef char fake_messages_w[sizeof(messages<wchar_t>)] typedef char fake_messages_w[sizeof(messages<wchar_t>)]
__attribute__ ((aligned(__alignof__(messages<wchar_t>)))); __attribute__ ((aligned(__alignof__(messages<wchar_t>))));
fake_messages_w messages_w; fake_messages_w messages_w;
asm (".symver _ZN9__gnu_cxx10messages_wE,_ZSt10messages_w@@GLIBCPP_3.2");
#endif #endif
// Standard stream objects. typedef char fake_filebuf[sizeof(stdio_filebuf<char>)]
typedef char fake_istream[sizeof(istream)] __attribute__ ((aligned(__alignof__(stdio_filebuf<char>))));
__attribute__ ((aligned(__alignof__(istream))));
typedef char fake_ostream[sizeof(ostream)]
__attribute__ ((aligned(__alignof__(ostream))));
fake_istream cin;
fake_ostream cout;
fake_ostream cerr;
fake_ostream clog;
typedef char fake_filebuf[sizeof(__gnu_cxx::stdio_filebuf<char>)]
__attribute__ ((aligned(__alignof__(__gnu_cxx::stdio_filebuf<char>))));
fake_filebuf buf_cout; fake_filebuf buf_cout;
fake_filebuf buf_cin; fake_filebuf buf_cin;
fake_filebuf buf_cerr; fake_filebuf buf_cerr;
asm (".symver _ZN9__gnu_cxx8buf_coutE,_ZSt8buf_cout@@GLIBCPP_3.2");
asm (".symver _ZN9__gnu_cxx7buf_cinE,_ZSt7buf_cin@@GLIBCPP_3.2");
asm (".symver _ZN9__gnu_cxx8buf_cerrE,_ZSt8buf_cerr@@GLIBCPP_3.2");
#ifdef _GLIBCPP_USE_WCHAR_T #ifdef _GLIBCPP_USE_WCHAR_T
typedef char fake_wistream[sizeof(wistream)] typedef char fake_wfilebuf[sizeof(stdio_filebuf<wchar_t>)]
__attribute__ ((aligned(__alignof__(wistream)))); __attribute__ ((aligned(__alignof__(stdio_filebuf<wchar_t>))));
typedef char fake_wostream[sizeof(wostream)]
__attribute__ ((aligned(__alignof__(wostream))));
fake_wistream wcin;
fake_wostream wcout;
fake_wostream wcerr;
fake_wostream wclog;
typedef char fake_wfilebuf[sizeof(__gnu_cxx::stdio_filebuf<wchar_t>)]
__attribute__ ((aligned(__alignof__(__gnu_cxx::stdio_filebuf<wchar_t>))));
fake_wfilebuf buf_wcout; fake_wfilebuf buf_wcout;
fake_wfilebuf buf_wcin; fake_wfilebuf buf_wcin;
fake_wfilebuf buf_wcerr; fake_wfilebuf buf_wcerr;
asm (".symver _ZN9__gnu_cxx9buf_wcoutE,_ZSt9buf_wcout@@GLIBCPP_3.2");
asm (".symver _ZN9__gnu_cxx8buf_wcinE,_ZSt8buf_wcin@@GLIBCPP_3.2");
asm (".symver _ZN9__gnu_cxx9buf_wcerrE,_ZSt9buf_wcerr@@GLIBCPP_3.2");
#endif #endif
// Globals for once-only runtime initialization of mutex objects. This // Globals for once-only runtime initialization of mutex objects. This
...@@ -226,4 +257,28 @@ namespace std ...@@ -226,4 +257,28 @@ namespace std
_GLIBCPP_mutex_address_init () _GLIBCPP_mutex_address_init ()
{ __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); } { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); }
#endif #endif
} } // namespace __gnu_cxx
namespace std
{
// Standard stream objects.
typedef char fake_istream[sizeof(istream)]
__attribute__ ((aligned(__alignof__(istream))));
typedef char fake_ostream[sizeof(ostream)]
__attribute__ ((aligned(__alignof__(ostream))));
fake_istream cin;
fake_ostream cout;
fake_ostream cerr;
fake_ostream clog;
#ifdef _GLIBCPP_USE_WCHAR_T
typedef char fake_wistream[sizeof(wistream)]
__attribute__ ((aligned(__alignof__(wistream))));
typedef char fake_wostream[sizeof(wostream)]
__attribute__ ((aligned(__alignof__(wostream))));
fake_wistream wcin;
fake_wostream wcout;
fake_wostream wcerr;
fake_wostream wclog;
#endif
} // namespace std
...@@ -39,28 +39,34 @@ ...@@ -39,28 +39,34 @@
#include <bits/atomicity.h> #include <bits/atomicity.h>
#include <ext/stdio_filebuf.h> #include <ext/stdio_filebuf.h>
namespace std namespace __gnu_cxx
{ {
// Extern declarations for global objects in src/globals.cc. // Extern declarations for global objects in src/globals.cc.
extern stdio_filebuf<char> buf_cout;
extern stdio_filebuf<char> buf_cin;
extern stdio_filebuf<char> buf_cerr;
#ifdef _GLIBCPP_USE_WCHAR_T
extern stdio_filebuf<wchar_t> buf_wcout;
extern stdio_filebuf<wchar_t> buf_wcin;
extern stdio_filebuf<wchar_t> buf_wcerr;
#endif
} // namespace __gnu_cxx
namespace std
{
using namespace __gnu_cxx;
extern istream cin; extern istream cin;
extern ostream cout; extern ostream cout;
extern ostream cerr; extern ostream cerr;
extern ostream clog; extern ostream clog;
using __gnu_cxx::stdio_filebuf;
extern stdio_filebuf<char> buf_cout;
extern stdio_filebuf<char> buf_cin;
extern stdio_filebuf<char> buf_cerr;
#ifdef _GLIBCPP_USE_WCHAR_T #ifdef _GLIBCPP_USE_WCHAR_T
extern wistream wcin; extern wistream wcin;
extern wostream wcout; extern wostream wcout;
extern wostream wcerr; extern wostream wcerr;
extern wostream wclog; extern wostream wclog;
extern stdio_filebuf<wchar_t> buf_wcout;
extern stdio_filebuf<wchar_t> buf_wcin;
extern stdio_filebuf<wchar_t> buf_wcerr;
#endif #endif
// Definitions for static const data members of __ios_flags. // Definitions for static const data members of __ios_flags.
......
...@@ -34,11 +34,16 @@ ...@@ -34,11 +34,16 @@
#include <locale> #include <locale>
#include <bits/atomicity.h> #include <bits/atomicity.h>
namespace std namespace __gnu_cxx
{ {
// Defined in globals.cc. // Defined in globals.cc.
extern locale c_locale; extern std::locale c_locale;
extern locale::_Impl c_locale_impl; extern std::locale::_Impl c_locale_impl;
} // namespace __gnu_cxx
namespace std
{
using namespace __gnu_cxx;
// Definitions for static const data members of locale. // Definitions for static const data members of locale.
const locale::category locale::none; const locale::category locale::none;
...@@ -50,9 +55,15 @@ namespace std ...@@ -50,9 +55,15 @@ namespace std
const locale::category locale::messages; const locale::category locale::messages;
const locale::category locale::all; const locale::category locale::all;
// In the future, GLIBCXX_ABI > 5 should remove all asm directives
// in this file, and remove exports of any static data members of locale.
locale::_Impl* locale::_S_classic; locale::_Impl* locale::_S_classic;
locale::_Impl* locale::_S_global; locale::_Impl* locale::_S_global;
const size_t locale::_S_categories_size; const size_t locale::_S_categories_size;
asm (".symver _ZNSt6locale18_S_categories_sizeE,_ZNSt6locale17_S_num_categoriesE@@GLIBCPP_3.2");
const size_t locale::_S_extra_categories_size; const size_t locale::_S_extra_categories_size;
// Definitions for static const data members of locale::id // Definitions for static const data members of locale::id
......
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
#include <cstring> #include <cstring>
#include <locale> #include <locale>
namespace std namespace __gnu_cxx
{ {
using namespace std;
// Defined in globals.cc. // Defined in globals.cc.
extern locale::facet** facet_vec; extern locale::facet** facet_vec;
extern char* facet_name[6 + _GLIBCPP_NUM_CATEGORIES]; extern char* facet_name[6 + _GLIBCPP_NUM_CATEGORIES];
...@@ -66,6 +68,11 @@ namespace std ...@@ -66,6 +68,11 @@ namespace std
extern time_put<wchar_t> time_put_w; extern time_put<wchar_t> time_put_w;
extern std::messages<wchar_t> messages_w; extern std::messages<wchar_t> messages_w;
#endif #endif
} // namespace __gnu_cxx
namespace std
{
using namespace __gnu_cxx;
locale::_Impl:: locale::_Impl::
~_Impl() throw() ~_Impl() throw()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment