This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] cleanup symbol list
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Oct 2002 02:05:28 -0500
- Subject: [v3] cleanup symbol list
The file globals.cc was in namespace std, which meant that all the
fake_* structures were exported as linker-map.gnu exports all
! std::[A-Za-z]*;
This removes all the global.cc symbols from the export list in the
future, and maps the now private symbols to the old, exported 3.2.0
ones.
Thus
#include <locale>
// From 3.2.0
namespace std
{
extern locale c_locale;
}
// From 3.2.1
namespace __gnu_cxx
{
extern std::locale c_locale;
}
int main()
{
// Should work.
void* p = &std::c_locale;
// Shouldn't work.
void* p2 = &__gnu_cxx::c_locale;
}
/tmp/ccw4c8Mx.o(.text+0x1a): In function `main':
: undefined reference to `__gnu_cxx::c_locale'
collect2: ld returned 1 exit status
With this, the POSIX names locale patch can get moved to
gcc-3_2-branch.
tested x86/linux
might be some breakage on BSD with wide exports.
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.
Index: config/linker-map.gnu
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/linker-map.gnu,v
retrieving revision 1.17
diff -c -p -r1.17 linker-map.gnu
*** config/linker-map.gnu 23 Aug 2002 16:52:28 -0000 1.17
--- config/linker-map.gnu 11 Oct 2002 06:52:13 -0000
***************
*** 20,26 ****
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
-
GLIBCPP_3.2 {
global:
--- 20,25 ----
*************** GLIBCPP_3.2 {
*** 29,35 ****
# All but the last are terminated with a semicolon.
extern "C++"
{
! std::[A-Za-z]*;
std::__throw_*;
std::__basic_file*;
std::__num_base*;
--- 28,45 ----
# All but the last are terminated with a semicolon.
extern "C++"
{
! 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::__basic_file*;
std::__num_base*;
*************** GLIBCPP_3.2 {
*** 43,48 ****
--- 53,63 ----
# Names not in an 'extern' block are mangled names.
+ _ZNSt6localeC1E*;
+ _ZNSt6locale11_M_coalesceERKS_S1_j;
+ _ZNSt6locale21_S_normalize_categoryEj;
+ _ZNSt6localeD*;
+
# std::has_facet*
_ZSt9has_facet*;
*************** GLIBCPP_3.2 {
*** 97,102 ****
--- 112,126 ----
*;
};
+ # 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.
CXXABI_1.2 {
Index: src/globals.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/globals.cc,v
retrieving revision 1.9
diff -c -p -r1.9 globals.cc
*** src/globals.cc 8 Oct 2002 23:32:23 -0000 1.9
--- src/globals.cc 11 Oct 2002 06:52:13 -0000
***************
*** 44,63 ****
// Because <iostream> declares the standard streams to be [io]stream
// types instead of say [io]fstream types, it is also necessary to
// allocate the actual file buffers in this file.
! namespace std
{
! // Standard "C" locale.
typedef char fake_locale[sizeof(locale)]
__attribute__ ((aligned(__alignof__(locale))));
fake_locale c_locale;
typedef char fake_locale_Impl[sizeof(locale::_Impl)]
__attribute__ ((aligned(__alignof__(locale::_Impl))));
fake_locale_Impl c_locale_impl;
!
typedef char fake_facet_vec[sizeof(locale::facet*)]
__attribute__ ((aligned(__alignof__(locale::facet*))));
fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS];
typedef char fake_facet_name[sizeof(char*)]
__attribute__ ((aligned(__alignof__(char*))));
--- 44,75 ----
// Because <iostream> declares the standard streams to be [io]stream
// types instead of say [io]fstream types, it is also necessary to
// allocate the actual file buffers in this file.
! namespace __gnu_cxx
{
! 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)]
__attribute__ ((aligned(__alignof__(locale))));
fake_locale c_locale;
+ asm (".symver _ZN9__gnu_cxx8c_localeE,_ZSt8c_locale@@GLIBCPP_3.2");
typedef char fake_locale_Impl[sizeof(locale::_Impl)]
__attribute__ ((aligned(__alignof__(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*)]
__attribute__ ((aligned(__alignof__(locale::facet*))));
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*)]
__attribute__ ((aligned(__alignof__(char*))));
*************** namespace std
*** 66,207 ****
typedef char fake_ctype_c[sizeof(std::ctype<char>)]
__attribute__ ((aligned(__alignof__(std::ctype<char>))));
fake_ctype_c ctype_c;
typedef char fake_collate_c[sizeof(std::collate<char>)]
__attribute__ ((aligned(__alignof__(std::collate<char>))));
fake_collate_c collate_c;
typedef char fake_numpunct_c[sizeof(numpunct<char>)]
__attribute__ ((aligned(__alignof__(numpunct<char>))));
fake_numpunct_c numpunct_c;
typedef char fake_num_get_c[sizeof(num_get<char>)]
__attribute__ ((aligned(__alignof__(num_get<char>))));
fake_num_get_c num_get_c;
typedef char fake_num_put_c[sizeof(num_put<char>)]
__attribute__ ((aligned(__alignof__(num_put<char>))));
fake_num_put_c num_put_c;
typedef char fake_codecvt_c[sizeof(codecvt<char, char, mbstate_t>)]
__attribute__ ((aligned(__alignof__(codecvt<char, char, mbstate_t>))));
fake_codecvt_c codecvt_c;
typedef char fake_moneypunct_c[sizeof(moneypunct<char, true>)]
__attribute__ ((aligned(__alignof__(moneypunct<char, true>))));
fake_moneypunct_c moneypunct_tc;
fake_moneypunct_c moneypunct_fc;
typedef char fake_money_get_c[sizeof(money_get<char>)]
__attribute__ ((aligned(__alignof__(money_get<char>))));
fake_money_get_c money_get_c;
typedef char fake_money_put_c[sizeof(money_put<char>)]
__attribute__ ((aligned(__alignof__(money_put<char>))));
fake_money_put_c money_put_c;
typedef char fake_timepunct_c[sizeof(__timepunct<char>)]
__attribute__ ((aligned(__alignof__(__timepunct<char>))));
fake_timepunct_c timepunct_c;
typedef char fake_time_get_c[sizeof(time_get<char>)]
__attribute__ ((aligned(__alignof__(time_get<char>))));
fake_time_get_c time_get_c;
typedef char fake_time_put_c[sizeof(time_put<char>)]
__attribute__ ((aligned(__alignof__(time_put<char>))));
fake_time_put_c time_put_c;
typedef char fake_messages_c[sizeof(messages<char>)]
__attribute__ ((aligned(__alignof__(messages<char>))));
fake_messages_c messages_c;
#ifdef _GLIBCPP_USE_WCHAR_T
typedef char fake_wtype_w[sizeof(std::ctype<wchar_t>)]
__attribute__ ((aligned(__alignof__(std::ctype<wchar_t>))));
fake_wtype_w ctype_w;
typedef char fake_wollate_w[sizeof(std::collate<wchar_t>)]
__attribute__ ((aligned(__alignof__(std::collate<wchar_t>))));
fake_wollate_w collate_w;
typedef char fake_numpunct_w[sizeof(numpunct<wchar_t>)]
__attribute__ ((aligned(__alignof__(numpunct<wchar_t>))));
fake_numpunct_w numpunct_w;
typedef char fake_num_get_w[sizeof(num_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(num_get<wchar_t>))));
fake_num_get_w num_get_w;
typedef char fake_num_put_w[sizeof(num_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(num_put<wchar_t>))));
fake_num_put_w num_put_w;
typedef char fake_wodecvt_w[sizeof(codecvt<wchar_t, char, mbstate_t>)]
__attribute__ ((aligned(__alignof__(codecvt<wchar_t, char, mbstate_t>))));
fake_wodecvt_w codecvt_w;
typedef char fake_moneypunct_w[sizeof(moneypunct<wchar_t, true>)]
__attribute__ ((aligned(__alignof__(moneypunct<wchar_t, true>))));
fake_moneypunct_w moneypunct_tw;
fake_moneypunct_w moneypunct_fw;
typedef char fake_money_get_w[sizeof(money_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(money_get<wchar_t>))));
fake_money_get_w money_get_w;
typedef char fake_money_put_w[sizeof(money_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(money_put<wchar_t>))));
fake_money_put_w money_put_w;
typedef char fake_timepunct_w[sizeof(__timepunct<wchar_t>)]
__attribute__ ((aligned(__alignof__(__timepunct<wchar_t>))));
fake_timepunct_w timepunct_w;
typedef char fake_time_get_w[sizeof(time_get<wchar_t>)]
__attribute__ ((aligned(__alignof__(time_get<wchar_t>))));
fake_time_get_w time_get_w;
typedef char fake_time_put_w[sizeof(time_put<wchar_t>)]
__attribute__ ((aligned(__alignof__(time_put<wchar_t>))));
fake_time_put_w time_put_w;
typedef char fake_messages_w[sizeof(messages<wchar_t>)]
__attribute__ ((aligned(__alignof__(messages<wchar_t>))));
fake_messages_w messages_w;
#endif
! // 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;
!
! 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_cin;
fake_filebuf buf_cerr;
#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;
!
! 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_wcin;
fake_wfilebuf buf_wcerr;
#endif
// Globals for once-only runtime initialization of mutex objects. This
--- 78,238 ----
typedef char fake_ctype_c[sizeof(std::ctype<char>)]
__attribute__ ((aligned(__alignof__(std::ctype<char>))));
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>)]
__attribute__ ((aligned(__alignof__(std::collate<char>))));
fake_collate_c collate_c;
+ asm (".symver _ZN9__gnu_cxx9collate_cE,_ZSt9collate_c@@GLIBCPP_3.2");
typedef char fake_numpunct_c[sizeof(numpunct<char>)]
__attribute__ ((aligned(__alignof__(numpunct<char>))));
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>)]
__attribute__ ((aligned(__alignof__(num_get<char>))));
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>)]
__attribute__ ((aligned(__alignof__(num_put<char>))));
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>)]
__attribute__ ((aligned(__alignof__(codecvt<char, char, mbstate_t>))));
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>)]
__attribute__ ((aligned(__alignof__(moneypunct<char, true>))));
fake_moneypunct_c moneypunct_tc;
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>)]
__attribute__ ((aligned(__alignof__(money_get<char>))));
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>)]
__attribute__ ((aligned(__alignof__(money_put<char>))));
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>)]
__attribute__ ((aligned(__alignof__(__timepunct<char>))));
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>)]
__attribute__ ((aligned(__alignof__(time_get<char>))));
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>)]
__attribute__ ((aligned(__alignof__(time_put<char>))));
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>)]
__attribute__ ((aligned(__alignof__(messages<char>))));
fake_messages_c messages_c;
+ asm (".symver _ZN9__gnu_cxx10messages_cE,_ZSt10messages_c@@GLIBCPP_3.2");
#ifdef _GLIBCPP_USE_WCHAR_T
typedef char fake_wtype_w[sizeof(std::ctype<wchar_t>)]
__attribute__ ((aligned(__alignof__(std::ctype<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(std::collate<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(numpunct<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(num_get<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(num_put<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(codecvt<wchar_t, char, mbstate_t>))));
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>)]
__attribute__ ((aligned(__alignof__(moneypunct<wchar_t, true>))));
fake_moneypunct_w moneypunct_tw;
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>)]
__attribute__ ((aligned(__alignof__(money_get<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(money_put<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(__timepunct<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(time_get<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(time_put<wchar_t>))));
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>)]
__attribute__ ((aligned(__alignof__(messages<wchar_t>))));
fake_messages_w messages_w;
+ asm (".symver _ZN9__gnu_cxx10messages_wE,_ZSt10messages_w@@GLIBCPP_3.2");
#endif
! typedef char fake_filebuf[sizeof(stdio_filebuf<char>)]
! __attribute__ ((aligned(__alignof__(stdio_filebuf<char>))));
fake_filebuf buf_cout;
fake_filebuf buf_cin;
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
! typedef char fake_wfilebuf[sizeof(stdio_filebuf<wchar_t>)]
! __attribute__ ((aligned(__alignof__(stdio_filebuf<wchar_t>))));
fake_wfilebuf buf_wcout;
fake_wfilebuf buf_wcin;
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
// Globals for once-only runtime initialization of mutex objects. This
*************** namespace std
*** 226,229 ****
_GLIBCPP_mutex_address_init ()
{ __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); }
#endif
! }
--- 257,284 ----
_GLIBCPP_mutex_address_init ()
{ __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); }
#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
Index: src/ios.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/ios.cc,v
retrieving revision 1.30
diff -c -p -r1.30 ios.cc
*** src/ios.cc 30 Apr 2002 19:04:41 -0000 1.30
--- src/ios.cc 11 Oct 2002 06:52:14 -0000
***************
*** 39,66 ****
#include <bits/atomicity.h>
#include <ext/stdio_filebuf.h>
! namespace std
{
// Extern declarations for global objects in src/globals.cc.
extern istream cin;
extern ostream cout;
extern ostream cerr;
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
extern wistream wcin;
extern wostream wcout;
extern wostream wcerr;
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
// Definitions for static const data members of __ios_flags.
--- 39,72 ----
#include <bits/atomicity.h>
#include <ext/stdio_filebuf.h>
! namespace __gnu_cxx
{
// 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 ostream cout;
extern ostream cerr;
extern ostream clog;
#ifdef _GLIBCPP_USE_WCHAR_T
extern wistream wcin;
extern wostream wcout;
extern wostream wcerr;
extern wostream wclog;
#endif
// Definitions for static const data members of __ios_flags.
Index: src/locale.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/locale.cc,v
retrieving revision 1.67
diff -c -p -r1.67 locale.cc
*** src/locale.cc 10 Oct 2002 05:15:29 -0000 1.67
--- src/locale.cc 11 Oct 2002 06:52:14 -0000
***************
*** 34,44 ****
#include <locale>
#include <bits/atomicity.h>
! namespace std
{
// Defined in globals.cc.
! extern locale c_locale;
! extern locale::_Impl c_locale_impl;
// Definitions for static const data members of locale.
const locale::category locale::none;
--- 34,49 ----
#include <locale>
#include <bits/atomicity.h>
! namespace __gnu_cxx
{
// Defined in globals.cc.
! extern std::locale c_locale;
! extern std::locale::_Impl c_locale_impl;
! } // namespace __gnu_cxx
!
! namespace std
! {
! using namespace __gnu_cxx;
// Definitions for static const data members of locale.
const locale::category locale::none;
*************** namespace std
*** 50,58 ****
--- 55,69 ----
const locale::category locale::messages;
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_global;
+
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;
// Definitions for static const data members of locale::id
Index: src/localename.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/localename.cc,v
retrieving revision 1.30
diff -c -p -r1.30 localename.cc
*** src/localename.cc 8 Oct 2002 23:32:23 -0000 1.30
--- src/localename.cc 11 Oct 2002 06:52:15 -0000
***************
*** 30,37 ****
#include <cstring>
#include <locale>
! namespace std
{
// Defined in globals.cc.
extern locale::facet** facet_vec;
extern char* facet_name[6 + _GLIBCPP_NUM_CATEGORIES];
--- 30,39 ----
#include <cstring>
#include <locale>
! namespace __gnu_cxx
{
+ using namespace std;
+
// Defined in globals.cc.
extern locale::facet** facet_vec;
extern char* facet_name[6 + _GLIBCPP_NUM_CATEGORIES];
*************** namespace std
*** 66,71 ****
--- 68,78 ----
extern time_put<wchar_t> time_put_w;
extern std::messages<wchar_t> messages_w;
#endif
+ } // namespace __gnu_cxx
+
+ namespace std
+ {
+ using namespace __gnu_cxx;
locale::_Impl::
~_Impl() throw()