From 8099b2aee82ea0bf7ef49f38f179fa6e7e27e970 Mon Sep 17 00:00:00 2001 From: Benjamin Kosnik Date: Thu, 23 Jan 2003 17:21:11 +0000 Subject: [PATCH] configure.in (libtool_VERSION): To 6:0:0. 2003-01-23 Benjamin Kosnik * configure.in (libtool_VERSION): To 6:0:0. * configure: Regenerated. * config/linker-map.gnu: Clean. * src/misc-inst.cc: Remove instantiations. * include/bits/stl_alloc.h (__malloc_alloc_template): To __malloc_alloc. (__default_alloc_template): To __pool_alloc. * src/stl-inst.cc: Same. * include/backward/alloc.h: Update. * testsuite/ext/allocators.cc: Update. * src/globals.cc (__gnu_cxx): Remove _GLIBCPP_ASM_SYMVER. Should really try to remove these if possible. * src/locale.cc (std): Same. * testsuite/abi_check.cc (check_version): Add. From-SVN: r61658 --- libstdc++-v3/ChangeLog | 21 ++ libstdc++-v3/config/linker-map.gnu | 268 +++++++---------------- libstdc++-v3/configure | 2 +- libstdc++-v3/configure.in | 2 +- libstdc++-v3/include/backward/alloc.h | 7 +- libstdc++-v3/include/bits/stl_alloc.h | 92 ++++---- libstdc++-v3/src/globals.cc | 43 +--- libstdc++-v3/src/locale.cc | 3 +- libstdc++-v3/src/misc-inst.cc | 17 +- libstdc++-v3/src/stl-inst.cc | 4 +- libstdc++-v3/testsuite/abi_check.cc | 54 +++-- libstdc++-v3/testsuite/ext/allocators.cc | 12 +- 12 files changed, 203 insertions(+), 322 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2b1e3a3ddff1..5b5e8c7392d3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,24 @@ +2003-01-23 Benjamin Kosnik + + * configure.in (libtool_VERSION): To 6:0:0. + * configure: Regenerated. + * config/linker-map.gnu: Clean. + + * src/misc-inst.cc: Remove instantiations. + + * include/bits/stl_alloc.h (__malloc_alloc_template): + To __malloc_alloc. + (__default_alloc_template): To __pool_alloc. + * src/stl-inst.cc: Same. + * include/backward/alloc.h: Update. + * testsuite/ext/allocators.cc: Update. + + * src/globals.cc (__gnu_cxx): Remove _GLIBCPP_ASM_SYMVER. Should + really try to remove these if possible. + * src/locale.cc (std): Same. + + * testsuite/abi_check.cc (check_version): Add. + 2003-01-22 Benjamin Kosnik Sysoltsev Slawa Mark Mitchell diff --git a/libstdc++-v3/config/linker-map.gnu b/libstdc++-v3/config/linker-map.gnu index 8f48c9f7122e..cd38a2de8255 100644 --- a/libstdc++-v3/config/linker-map.gnu +++ b/libstdc++-v3/config/linker-map.gnu @@ -1,6 +1,6 @@ ## Linker script for GNU ld 2.11.94+ only. ## -## Copyright (C) 2002 Free Software Foundation, Inc. +## Copyright (C) 2002, 2003 Free Software Foundation, Inc. ## ## This file is part of the libstdc++ version 3 distribution. ## @@ -20,7 +20,7 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA. -GLIBCPP_3.2 { +GLIBCPP_3.4 { global: @@ -37,31 +37,24 @@ GLIBCPP_3.2 { std::basic_[t-z]*; std::ba[t-z]*; std::b[b-z]*; - std::c[a-n]*; - std::co[a-c]*; - std::codecvt_byname*; - std::codecvt::[A-Za-b]*; - std::codecvt::[A-Zd-z]*; - std::codecvt_c; - std::codecvt_w; - std::co[e-z]*; - std::c[p-z]*; - std::c_[a-z]*; - std::[A-Zd-k]*; + std::[A-Zc-k]*; std::length_error*; std::logic_error*; std::locale::[A-Za-e]*; std::locale::facet::[A-Za-z]*; std::locale::facet::_M*; - std::locale::facet::_S_c_locale; + std::locale::facet::_S_c_locale; std::locale::facet::_S_clone_c_locale*; std::locale::facet::_S_create_c_locale*; std::locale::facet::_S_destroy_c_locale*; - std::locale::[A-Zg-z]*; - std::locale::_[A-Ra-z]*; - std::locale::_S_classic; - std::locale::_S_global; - std::locale::_S_num_categories; + std::locale::[A-Zg-h]*; + std::locale::id::[A-Za-z]*; + std::locale::id::_S_highwater; + std::locale::[A-Zj-z]*; + std::locale::_[A-Ha-z]*; + std::locale::_Impl::[A-Za-z]*; + std::locale::_Impl::_M_[A-Za-z]*; + std::locale::_[J-Ra-z]*; std::locale::_S_normalize_category*; std::locale::_[T-Za-z]*; std::[A-Zm-z]*; @@ -70,110 +63,60 @@ GLIBCPP_3.2 { std::__num_base*; std::__timepunct*; std::__numeric_limits_base*; - std::_S_bit_count; - std::_S_first_one + std::_S_bit_count }; # Names not in an 'extern' block are mangled names. - # std::string minus binary operator plus - _ZNKSs*; - _ZNKSb*; - _ZNSs[A-Za-z]*; - _ZNSs[0-9][A-Za-z]*; - _ZNSs[0-9][0-9][A-Za-z]*; - _ZNSs[0-9]_[A-Ra-z]*; - _ZNSs[0-9][0-9]_[A-Ra-z]*; - _ZNSs12_S_empty_repEv; - _ZNSs20_S_empty_rep_storageE; - _ZNSbIwSt11char_traitsIwESaIwEE20_S_empty_rep_storageE; - _ZNSs12_S_constructE*; - _ZNSs13_S_copy_charsE*; - _ZNSbIwSt11char_traitsIwESaIwEE[A-Ra-z]*; - _ZNSbIwSt11char_traitsIwESaIwEE[0-9][A-Ra-z]*; - _ZNSbIwSt11char_traitsIwESaIwEE[0-9][0-9][A-Ra-z]*; - _ZNSbIwSt11char_traitsIwESaIwEE[0-9]_[A-Ra-z]*; - _ZNSbIwSt11char_traitsIwESaIwEE[0-9][0-9]_[A-Ra-z]*; - _ZNSbIwSt11char_traitsIwESaIwEE13_S_copy_chars*; - _ZNSbIwSt11char_traitsIwESaIwEE12_S_constructE[jm]wRKS1_; - _ZNSbIwSt11char_traitsIwESaIwEE12_S_empty_repEv; - _ZSt24__uninitialized_copy_auxIN9*; - _ZSt26__uninitialized_fill_n_aux*; - _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_; - _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ES3_RKS6_; - _ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_EPKS3_RKS6_; - _ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_ES3_RKS6_; - # std::locale destructors _ZNSt6localeD*; # std::locale::facet destructors _ZNSt6locale5facetD*; - # std::codecvt members. - _ZNKSt7codecvtIcc11__mbstate_tE*; - # std::codecvt::~codecvt - _ZNSt7codecvtIcc11__mbstate_tED*; - # std::codecvt::codecvt(size_t), where size_t variable. - _ZNSt7codecvtIcc11__mbstate_tEC[12]E[jm]; - # std::codecvt::id - _ZNSt7codecvtIcc11__mbstate_tE2idE; + # std::locale::_Impl constructors, destrutors + _ZNSt6locale5_ImplC*; + _ZNSt6locale5_ImplD*; - # std::codecvt members. - _ZNKSt7codecvtIwc11__mbstate_tE*; - # std::codecvt::~codecvt - _ZNSt7codecvtIwc11__mbstate_tED*; - # std::codecvt::codecvt(size_t), where size_t variable. - _ZNSt7codecvtIwc11__mbstate_tEC[12]E[jm]; - # std::codecvt::id - _ZNSt7codecvtIwc11__mbstate_tE2idE; - - # std::use_facet - _ZSt9use_facetISt7codecvtIcc11__mbstate_tEERKT_RKSt6locale; - _ZSt9use_facetISt7codecvtIwc11__mbstate_tEERKT_RKSt6locale; - - # std::has_facet* + # bool has_facet _ZSt9has_facet*; - # std::__default_alloc_template - _ZNSt24__default_alloc_templateILb1ELi0EE10deallocate*; - _ZNSt24__default_alloc_templateILb1ELi0EE8allocate*; - _ZNSt24__default_alloc_templateILb1ELi0EE12_S_free_listE; - _ZNSt24__default_alloc_templateILb1ELi0EE22_S_node_allocator_lockE; - _ZNSt24__default_alloc_templateILb1ELi0EE9_S_refillE*; + # std::string, std::wstring minus static data members + _ZNKS[sb]*; + _ZNS[sb]D*; + _ZNS[sb]C*; + _ZStplI[cw]St11char_traitsI[cw]ESaI[cw]EESbIT_T0_T1_EPKS3_RKS6_; + _ZStplI[cw]St11char_traitsI[cw]ESaI[cw]EESbIT_T0_T1_ES3_RKS6_; + _ZNS[sb]I[cw]St11char_traitsI[cw]ESaI[cw]EE[A-Ra-z]*; + _ZNS[sb]I[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][A-Ra-z]*; + _ZNS[sb]I[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][0-9][A-Ra-z]*; + _ZNS[sb]I[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9]_[A-Ra-z]*; + _ZNS[sb]I[cw]St11char_traitsI[cw]ESaI[cw]EE[0-9][0-9]_[A-Ra-z]*; + _ZNS[sb]I[cw]St11char_traitsI[cw]ESaI[cw]EE20_S_empty_rep_storageE; - # std::__default_alloc_template to be removed in the future - _ZNSt24__default_alloc_templateILb1ELi0EE10reallocateEPv*; - _ZNSt24__default_alloc_templateILb1ELi0EE11_S_round_upE*; - _ZNSt24__default_alloc_templateILb1ELi0EE14_S_chunk_allocE*; - _ZNSt24__default_alloc_templateILb1ELi0EE17_S_freelist_indexE*; - _ZNSt24__default_alloc_templateILb1ELi0EE11_S_end_freeE; - _ZNSt24__default_alloc_templateILb1ELi0EE12_S_heap_sizeE; - _ZNSt24__default_alloc_templateILb1ELi0EE13_S_start_freeE; - _ZNSt24__default_alloc_templateILb1ELi0EE5_Lock*; + # std::__pool_alloc + _ZNSt12__pool_allocILb1ELi0EE10deallocateEPvj*; + _ZNSt12__pool_allocILb1ELi0EE8allocateEj*; + _ZNSt12__pool_allocILb1ELi0EE5_Lock*; + _ZNSt12__pool_allocILb1ELi0EE12_S_force_newE; + _ZNSt12__pool_allocILb1ELi0EE12_S_free_listE; + _ZNSt12__pool_allocILb1ELi0EE7_S_lockE; + _ZNSt12__pool_allocILb1ELi0EE9_S_refillE[jm]; - # operator new(unsigned) - _Znwj; - # operator new(unsigned, std::nothrow_t const&) - _ZnwjRKSt9nothrow_t; - # operator new(unsigned long) - _Znwm; - # operator new(unsigned long, std::nothrow_t const&) - _ZnwmRKSt9nothrow_t; + # operator new(size_t) + _Znw[jm]; + # operator new(size_t, std::nothrow_t const&) + _Znw[jm]RKSt9nothrow_t; # operator delete(void*) _ZdlPv; # operator delete(void*, std::nothrow_t const&) _ZdlPvRKSt9nothrow_t; - # operator new[](unsigned) - _Znaj; - # operator new[](unsigned, std::nothrow_t const&) - _ZnajRKSt9nothrow_t; - # operator new[](unsigned long) - _Znam; - # operator new[](unsigned long, std::nothrow_t const&) - _ZnamRKSt9nothrow_t; + # operator new[](size_t) + _Zna[jm]; + # operator new[](size_t, std::nothrow_t const&) + _Zna[jm]RKSt9nothrow_t; # operator delete[](void*) _ZdaPv; @@ -199,66 +142,47 @@ GLIBCPP_3.2 { # std::__convert_to_v _ZSt14__convert_to_v*; + # stub functions from libmath + sinf; + sinl; + sinhf; + sinhl; + cosf; + cosl; + coshf; + coshl; + tanf; + tanl; + tanhf; + tanhl; + atan2f; + atan2l; + expf; + expl; + hypotf; + hypotl; + hypot; + logf; + logl; + log10f; + log10l; + powf; + powl; + sqrtf; + sqrtl; + copysignf; + nan; + __signbit; + __signbitf; + __signbitl; + local: *; }; -# 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; - - _ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8_; - _ZStplIwSt11char_traitsIwESaIwEESbIT_T0_T1_ERKS6_S8_; - - # stub functions from libmath - sinf; - sinl; - sinhf; - sinhl; - cosf; - cosl; - coshf; - coshl; - tanf; - tanl; - tanhf; - tanhl; - atan2f; - atan2l; - expf; - expl; - hypotf; - hypotl; - hypot; - logf; - logl; - log10f; - log10l; - powf; - powl; - sqrtf; - sqrtl; - copysignf; - nan; - __signbit; - __signbitf; - __signbitl; - -} GLIBCPP_3.2; - - -GLIBCPP_3.2.2 { - - _ZNSt24__default_alloc_templateILb1ELi0EE12_S_force_newE; - -} GLIBCPP_3.2.1; # Symbols in the support library (libsupc++) have their own tag. -CXXABI_1.2 { +CXXABI_1.3 { global: __cxa_allocate_exception; @@ -272,6 +196,9 @@ CXXABI_1.2 { __cxa_free_exception; __cxa_get_globals; __cxa_get_globals_fast; + __cxa_guard_abort; + __cxa_guard_acquire; + __cxa_guard_release; __cxa_pure_virtual; __cxa_rethrow; __cxa_throw; @@ -292,35 +219,6 @@ CXXABI_1.2 { # __gnu_cxx::_verbose_terminate_handler() _ZN9__gnu_cxx27__verbose_terminate_handlerEv; - # XXX Should not be exported. - __cxa_dyn_string_append_char; - __cxa_dyn_string_append_cstr; - __cxa_dyn_string_append; - __cxa_dyn_string_clear; - __cxa_dyn_string_copy_cstr; - __cxa_dyn_string_copy; - __cxa_dyn_string_delete; - __cxa_dyn_string_eq; - __cxa_dyn_string_init; - __cxa_dyn_string_insert_char; - __cxa_dyn_string_insert_cstr; - __cxa_dyn_string_insert; - __cxa_dyn_string_new; - __cxa_dyn_string_prepend_cstr; - __cxa_dyn_string_prepend; - __cxa_dyn_string_release; - __cxa_dyn_string_resize; - __cxa_dyn_string_substring; - local: *; }; - -# Symbols added after CXXABI_1.2 -CXXABI_1.2.1 { - - __cxa_guard_acquire; - __cxa_guard_release; - __cxa_guard_abort; - -} CXXABI_1.2; \ No newline at end of file diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 87442c7c1777..0ee2e2b16e7f 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -591,7 +591,7 @@ ORIGINAL_LD_FOR_MULTILIBS=$LD PACKAGE=libstdc++ # For libtool versioning info, format is CURRENT:REVISION:AGE -libtool_VERSION=5:2:0 +libtool_VERSION=6:0:0 diff --git a/libstdc++-v3/configure.in b/libstdc++-v3/configure.in index 6bc86561b32a..0c3c09e88056 100644 --- a/libstdc++-v3/configure.in +++ b/libstdc++-v3/configure.in @@ -13,7 +13,7 @@ ORIGINAL_LD_FOR_MULTILIBS=$LD PACKAGE=libstdc++ AC_SUBST(PACKAGE) # For libtool versioning info, format is CURRENT:REVISION:AGE -libtool_VERSION=5:2:0 +libtool_VERSION=6:0:0 AC_SUBST(libtool_VERSION) GLIBCPP_TOPREL_CONFIGURE diff --git a/libstdc++-v3/include/backward/alloc.h b/libstdc++-v3/include/backward/alloc.h index 9482e4cfebad..6bcc421b7af2 100644 --- a/libstdc++-v3/include/backward/alloc.h +++ b/libstdc++-v3/include/backward/alloc.h @@ -1,6 +1,6 @@ // Backward-compat support -*- C++ -*- -// Copyright (C) 2001 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -47,12 +47,13 @@ #include #include -using std::__malloc_alloc_template; +using std::__malloc_alloc; using std::__simple_alloc; using std::__debug_alloc; using std::__alloc; using std::__single_client_alloc; +using std::__pool_alloc; using std::allocator; -using std::__default_alloc_template; + #endif diff --git a/libstdc++-v3/include/bits/stl_alloc.h b/libstdc++-v3/include/bits/stl_alloc.h index d05ff6e6db5e..a40f7c1feae0 100644 --- a/libstdc++-v3/include/bits/stl_alloc.h +++ b/libstdc++-v3/include/bits/stl_alloc.h @@ -1,6 +1,6 @@ // Allocators -*- C++ -*- -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -113,15 +113,15 @@ namespace std /** * @if maint * A malloc-based allocator. Typically slower than the - * __default_alloc_template (below). Typically thread-safe and more + * __pool_alloc (below). Typically thread-safe and more * storage efficient. The template argument is unused and is only present - * to permit multiple instantiations (but see __default_alloc_template + * to permit multiple instantiations (but see __pool_alloc * for caveats). "SGI" style, plus __set_malloc_handler for OOM conditions. * @endif * (See @link Allocators allocators info @endlink for more.) */ template - class __malloc_alloc_template + class __malloc_alloc { private: static void* _S_oom_malloc(size_t); @@ -151,11 +151,11 @@ namespace std // malloc_alloc out-of-memory handling template - void (* __malloc_alloc_template<__inst>::__malloc_alloc_oom_handler)() = 0; + void (* __malloc_alloc<__inst>::__malloc_alloc_oom_handler)() = 0; template void* - __malloc_alloc_template<__inst>:: + __malloc_alloc<__inst>:: _S_oom_malloc(size_t __n) { void (* __my_malloc_handler)(); @@ -286,7 +286,7 @@ namespace std * (See @link Allocators allocators info @endlink for more.) */ template - class __default_alloc_template + class __pool_alloc { private: enum {_ALIGN = 8}; @@ -306,7 +306,8 @@ namespace std static char* _S_end_free; static size_t _S_heap_size; - static _STL_mutex_lock _S_node_allocator_lock; + static _STL_mutex_lock _S_lock; + static _Atomic_word _S_force_new; static size_t _S_round_up(size_t __bytes) @@ -330,13 +331,11 @@ namespace std // test whether threads are in use. struct _Lock { - _Lock() { if (__threads) _S_node_allocator_lock._M_acquire_lock(); } - ~_Lock() { if (__threads) _S_node_allocator_lock._M_release_lock(); } + _Lock() { if (__threads) _S_lock._M_acquire_lock(); } + ~_Lock() { if (__threads) _S_lock._M_release_lock(); } } __attribute__ ((__unused__)); friend struct _Lock; - static _Atomic_word _S_force_new; - public: // __n must be > 0 static void* @@ -404,18 +403,18 @@ namespace std }; template _Atomic_word - __default_alloc_template<__threads, __inst>::_S_force_new = 0; + __pool_alloc<__threads, __inst>::_S_force_new = 0; template inline bool - operator==(const __default_alloc_template<__threads,__inst>&, - const __default_alloc_template<__threads,__inst>&) + operator==(const __pool_alloc<__threads,__inst>&, + const __pool_alloc<__threads,__inst>&) { return true; } template inline bool - operator!=(const __default_alloc_template<__threads,__inst>&, - const __default_alloc_template<__threads,__inst>&) + operator!=(const __pool_alloc<__threads,__inst>&, + const __pool_alloc<__threads,__inst>&) { return false; } @@ -424,7 +423,7 @@ namespace std // the allocation lock. template char* - __default_alloc_template<__threads, __inst>:: + __pool_alloc<__threads, __inst>:: _S_chunk_alloc(size_t __size, int& __nobjs) { char* __result; @@ -499,7 +498,7 @@ namespace std // hold the allocation lock. template void* - __default_alloc_template<__threads, __inst>::_S_refill(size_t __n) + __pool_alloc<__threads, __inst>::_S_refill(size_t __n) { int __nobjs = 20; char* __chunk = _S_chunk_alloc(__n, __nobjs); @@ -534,24 +533,23 @@ namespace std template _STL_mutex_lock - __default_alloc_template<__threads,__inst>::_S_node_allocator_lock - __STL_MUTEX_INITIALIZER; + __pool_alloc<__threads,__inst>::_S_lock __STL_MUTEX_INITIALIZER; template - char* __default_alloc_template<__threads,__inst>::_S_start_free = 0; + char* __pool_alloc<__threads,__inst>::_S_start_free = 0; template - char* __default_alloc_template<__threads,__inst>::_S_end_free = 0; + char* __pool_alloc<__threads,__inst>::_S_end_free = 0; template - size_t __default_alloc_template<__threads,__inst>::_S_heap_size = 0; + size_t __pool_alloc<__threads,__inst>::_S_heap_size = 0; template - typename __default_alloc_template<__threads,__inst>::_Obj* volatile - __default_alloc_template<__threads,__inst>::_S_free_list[_NFREELISTS]; + typename __pool_alloc<__threads,__inst>::_Obj* volatile + __pool_alloc<__threads,__inst>::_S_free_list[_NFREELISTS]; - typedef __default_alloc_template __alloc; - typedef __default_alloc_template __single_client_alloc; + typedef __pool_alloc __alloc; + typedef __pool_alloc __single_client_alloc; /** @@ -561,7 +559,7 @@ namespace std * of stl_alloc.h.) * * The underlying allocator behaves as follows. - * - __default_alloc_template is used via two typedefs + * - __pool_alloc is used via two typedefs * - "__single_client_alloc" typedef does no locking for threads * - "__alloc" typedef is threadsafe via the locks * - __new_alloc is used for memory requests @@ -655,7 +653,7 @@ namespace std /** * @if maint * Allocator adaptor to turn an "SGI" style allocator (e.g., - * __alloc, __malloc_alloc_template) into a "standard" conforming + * __alloc, __malloc_alloc) into a "standard" conforming * allocator. Note that this adaptor does *not* assume that all * objects of the underlying alloc class are identical, nor does it * assume that all of the underlying alloc's member functions are @@ -757,14 +755,14 @@ namespace std */ template inline bool - operator==(const __malloc_alloc_template&, - const __malloc_alloc_template&) + operator==(const __malloc_alloc&, + const __malloc_alloc&) { return true; } template inline bool - operator!=(const __malloc_alloc_template<__inst>&, - const __malloc_alloc_template<__inst>&) + operator!=(const __malloc_alloc<__inst>&, + const __malloc_alloc<__inst>&) { return false; } template @@ -840,20 +838,20 @@ namespace std //@{ /// Versions for the predefined "SGI" style allocators. template - struct _Alloc_traits<_Tp, __malloc_alloc_template<__inst> > + struct _Alloc_traits<_Tp, __malloc_alloc<__inst> > { static const bool _S_instanceless = true; - typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type; - typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type; + typedef __simple_alloc<_Tp, __malloc_alloc<__inst> > _Alloc_type; + typedef __allocator<_Tp, __malloc_alloc<__inst> > allocator_type; }; template - struct _Alloc_traits<_Tp, __default_alloc_template<__threads, __inst> > + struct _Alloc_traits<_Tp, __pool_alloc<__threads, __inst> > { static const bool _S_instanceless = true; - typedef __simple_alloc<_Tp, __default_alloc_template<__threads, __inst> > + typedef __simple_alloc<_Tp, __pool_alloc<__threads, __inst> > _Alloc_type; - typedef __allocator<_Tp, __default_alloc_template<__threads, __inst> > + typedef __allocator<_Tp, __pool_alloc<__threads, __inst> > allocator_type; }; @@ -871,20 +869,20 @@ namespace std /// "SGI" style allocators. template struct _Alloc_traits<_Tp, - __allocator<_Tp1, __malloc_alloc_template<__inst> > > + __allocator<_Tp1, __malloc_alloc<__inst> > > { static const bool _S_instanceless = true; - typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type; - typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type; + typedef __simple_alloc<_Tp, __malloc_alloc<__inst> > _Alloc_type; + typedef __allocator<_Tp, __malloc_alloc<__inst> > allocator_type; }; template - struct _Alloc_traits<_Tp, __allocator<_Tp1, __default_alloc_template<__thr, __inst> > > + struct _Alloc_traits<_Tp, __allocator<_Tp1, __pool_alloc<__thr, __inst> > > { static const bool _S_instanceless = true; - typedef __simple_alloc<_Tp, __default_alloc_template<__thr,__inst> > + typedef __simple_alloc<_Tp, __pool_alloc<__thr,__inst> > _Alloc_type; - typedef __allocator<_Tp, __default_alloc_template<__thr,__inst> > + typedef __allocator<_Tp, __pool_alloc<__thr,__inst> > allocator_type; }; @@ -902,7 +900,7 @@ namespace std // NB: This syntax is a GNU extension. extern template class allocator; extern template class allocator; - extern template class __default_alloc_template; + extern template class __pool_alloc; } // namespace std #endif diff --git a/libstdc++-v3/src/globals.cc b/libstdc++-v3/src/globals.cc index d85bf3a63692..7d4949c51888 100644 --- a/libstdc++-v3/src/globals.cc +++ b/libstdc++-v3/src/globals.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -68,7 +68,6 @@ namespace __gnu_cxx typedef char fake_locale[sizeof(locale)] __attribute__ ((aligned(__alignof__(locale)))); fake_locale c_locale; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8c_localeE, _ZSt8c_locale, GLIBCPP_3.2) // GLIBCXX_ABI > 5 will not need this symbol at all. // It's here just as a placeholder, as the size of this exported @@ -77,151 +76,117 @@ namespace __gnu_cxx typedef char fake_locale_Impl_compat[o] __attribute__ ((aligned(__alignof__(o)))); fake_locale_Impl_compat c_locale_impl_compat; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx20c_locale_impl_compatE, _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]; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9facet_vecE, _ZSt9facet_vec, GLIBCPP_3.2) typedef char fake_ctype_c[sizeof(std::ctype)] __attribute__ ((aligned(__alignof__(std::ctype)))); fake_ctype_c ctype_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx7ctype_cE, _ZSt7ctype_c, GLIBCPP_3.2) typedef char fake_collate_c[sizeof(std::collate)] __attribute__ ((aligned(__alignof__(std::collate)))); fake_collate_c collate_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9collate_cE, _ZSt9collate_c, GLIBCPP_3.2) typedef char fake_numpunct_c[sizeof(numpunct)] __attribute__ ((aligned(__alignof__(numpunct)))); fake_numpunct_c numpunct_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10numpunct_cE, _ZSt10numpunct_c, GLIBCPP_3.2) typedef char fake_num_get_c[sizeof(num_get)] __attribute__ ((aligned(__alignof__(num_get)))); fake_num_get_c num_get_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_get_cE, _ZSt9num_get_c, GLIBCPP_3.2) typedef char fake_num_put_c[sizeof(num_put)] __attribute__ ((aligned(__alignof__(num_put)))); fake_num_put_c num_put_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_put_cE, _ZSt9num_put_c, GLIBCPP_3.2) typedef char fake_codecvt_c[sizeof(codecvt)] __attribute__ ((aligned(__alignof__(codecvt)))); fake_codecvt_c codecvt_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9codecvt_cE, _ZSt9codecvt_c, GLIBCPP_3.2) typedef char fake_moneypunct_c[sizeof(moneypunct)] __attribute__ ((aligned(__alignof__(moneypunct)))); fake_moneypunct_c moneypunct_tc; fake_moneypunct_c moneypunct_fc; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_tcE,\ - _ZSt13moneypunct_tc, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_fcE,\ - _ZSt13moneypunct_fc, GLIBCPP_3.2) typedef char fake_money_get_c[sizeof(money_get)] __attribute__ ((aligned(__alignof__(money_get)))); fake_money_get_c money_get_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_get_cE, _ZSt11money_get_c, GLIBCPP_3.2) typedef char fake_money_put_c[sizeof(money_put)] __attribute__ ((aligned(__alignof__(money_put)))); fake_money_put_c money_put_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_put_cE, _ZSt11money_put_c, GLIBCPP_3.2) typedef char fake_timepunct_c[sizeof(__timepunct)] __attribute__ ((aligned(__alignof__(__timepunct)))); fake_timepunct_c timepunct_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11timepunct_cE, _ZSt11timepunct_c, GLIBCPP_3.2) typedef char fake_time_get_c[sizeof(time_get)] __attribute__ ((aligned(__alignof__(time_get)))); fake_time_get_c time_get_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_get_cE, _ZSt10time_get_c, GLIBCPP_3.2) typedef char fake_time_put_c[sizeof(time_put)] __attribute__ ((aligned(__alignof__(time_put)))); fake_time_put_c time_put_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_put_cE, _ZSt10time_put_c, GLIBCPP_3.2) typedef char fake_messages_c[sizeof(messages)] __attribute__ ((aligned(__alignof__(messages)))); fake_messages_c messages_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10messages_cE, _ZSt10messages_c, GLIBCPP_3.2) #ifdef _GLIBCPP_USE_WCHAR_T typedef char fake_wtype_w[sizeof(std::ctype)] __attribute__ ((aligned(__alignof__(std::ctype)))); fake_wtype_w ctype_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx7ctype_wE, _ZSt7ctype_w, GLIBCPP_3.2) typedef char fake_wollate_w[sizeof(std::collate)] __attribute__ ((aligned(__alignof__(std::collate)))); fake_wollate_w collate_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9collate_wE, _ZSt9collate_w, GLIBCPP_3.2) typedef char fake_numpunct_w[sizeof(numpunct)] __attribute__ ((aligned(__alignof__(numpunct)))); fake_numpunct_w numpunct_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10numpunct_wE, _ZSt10numpunct_w, GLIBCPP_3.2) typedef char fake_num_get_w[sizeof(num_get)] __attribute__ ((aligned(__alignof__(num_get)))); fake_num_get_w num_get_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_get_wE, _ZSt9num_get_w, GLIBCPP_3.2) typedef char fake_num_put_w[sizeof(num_put)] __attribute__ ((aligned(__alignof__(num_put)))); fake_num_put_w num_put_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_put_wE, _ZSt9num_put_w, GLIBCPP_3.2) typedef char fake_wodecvt_w[sizeof(codecvt)] __attribute__ ((aligned(__alignof__(codecvt)))); fake_wodecvt_w codecvt_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9codecvt_wE, _ZSt9codecvt_w, GLIBCPP_3.2) typedef char fake_moneypunct_w[sizeof(moneypunct)] __attribute__ ((aligned(__alignof__(moneypunct)))); fake_moneypunct_w moneypunct_tw; fake_moneypunct_w moneypunct_fw; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_twE,\ - _ZSt13moneypunct_tw, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_fwE,\ - _ZSt13moneypunct_fw, GLIBCPP_3.2) typedef char fake_money_get_w[sizeof(money_get)] __attribute__ ((aligned(__alignof__(money_get)))); fake_money_get_w money_get_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_get_wE, _ZSt11money_get_w, GLIBCPP_3.2) typedef char fake_money_put_w[sizeof(money_put)] __attribute__ ((aligned(__alignof__(money_put)))); fake_money_put_w money_put_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_put_wE, _ZSt11money_put_w, GLIBCPP_3.2) typedef char fake_timepunct_w[sizeof(__timepunct)] __attribute__ ((aligned(__alignof__(__timepunct)))); fake_timepunct_w timepunct_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11timepunct_wE, _ZSt11timepunct_w, GLIBCPP_3.2) typedef char fake_time_get_w[sizeof(time_get)] __attribute__ ((aligned(__alignof__(time_get)))); fake_time_get_w time_get_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_get_wE, _ZSt10time_get_w, GLIBCPP_3.2) typedef char fake_time_put_w[sizeof(time_put)] __attribute__ ((aligned(__alignof__(time_put)))); fake_time_put_w time_put_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_put_wE, _ZSt10time_put_w, GLIBCPP_3.2) typedef char fake_messages_w[sizeof(messages)] __attribute__ ((aligned(__alignof__(messages)))); fake_messages_w messages_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10messages_wE, _ZSt10messages_w, GLIBCPP_3.2) #endif typedef char fake_filebuf[sizeof(stdio_filebuf)] @@ -229,9 +194,6 @@ namespace __gnu_cxx fake_filebuf buf_cout; fake_filebuf buf_cin; fake_filebuf buf_cerr; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8buf_coutE, _ZSt8buf_cout, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx7buf_cinE, _ZSt7buf_cin, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8buf_cerrE, _ZSt8buf_cerr, GLIBCPP_3.2) #ifdef _GLIBCPP_USE_WCHAR_T typedef char fake_wfilebuf[sizeof(stdio_filebuf)] @@ -239,9 +201,6 @@ namespace __gnu_cxx fake_wfilebuf buf_wcout; fake_wfilebuf buf_wcin; fake_wfilebuf buf_wcerr; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9buf_wcoutE, _ZSt9buf_wcout, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8buf_wcinE, _ZSt8buf_wcin, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9buf_wcerrE, _ZSt9buf_wcerr, GLIBCPP_3.2) #endif // Globals for once-only runtime initialization of mutex objects. This diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 3b6302ea28d1..8246f4a5f475 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -58,10 +58,11 @@ namespace std // In the future, GLIBCXX_ABI > 5 should remove all uses of // _GLIBCPP_ASM_SYMVER in this file, and remove exports of any // static data members of locale. + + // These are no longer exported. locale::_Impl* locale::_S_classic; locale::_Impl* locale::_S_global; const size_t locale::_S_categories_size; - _GLIBCPP_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 diff --git a/libstdc++-v3/src/misc-inst.cc b/libstdc++-v3/src/misc-inst.cc index 74224b1d983b..e612aa45cabb 100644 --- a/libstdc++-v3/src/misc-inst.cc +++ b/libstdc++-v3/src/misc-inst.cc @@ -1,6 +1,6 @@ // Explicit instantiation file. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -71,19 +71,4 @@ namespace std #ifdef _GLIBCPP_INST_ATOMICITY_LOCK template volatile int __Atomicity_lock<0>::_S_atomicity_lock; #endif - -#if 1 - // XXX - // 2002-05-24 These are no longer needed and should eventually be deleted. - template - string* - __uninitialized_fill_n_aux - (string*, size_t, string const &, __false_type); - - template - string* - __uninitialized_copy_aux::const_iterator, string *> - (vector::const_iterator, vector::const_iterator, - string*, __false_type); -#endif } // namespace std diff --git a/libstdc++-v3/src/stl-inst.cc b/libstdc++-v3/src/stl-inst.cc index d80a71867184..4bcf23f54dd2 100644 --- a/libstdc++-v3/src/stl-inst.cc +++ b/libstdc++-v3/src/stl-inst.cc @@ -1,6 +1,6 @@ // Explicit instantiation file. -// Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,5 +39,5 @@ namespace std template class allocator; template class allocator; - template class __default_alloc_template; + template class __pool_alloc; } // namespace std diff --git a/libstdc++-v3/testsuite/abi_check.cc b/libstdc++-v3/testsuite/abi_check.cc index e956090e7098..4460dd14d4e4 100644 --- a/libstdc++-v3/testsuite/abi_check.cc +++ b/libstdc++-v3/testsuite/abi_check.cc @@ -1,6 +1,6 @@ // Utility for libstdc++ ABI analysis -*- C++ -*- -// Copyright (C) 2002 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -75,6 +75,38 @@ namespace __gnu_cxx typedef std::deque symbol_names; typedef __gnu_cxx::hash_map symbol_infos; + +bool +check_version(const symbol_info& test) +{ + bool ret = true; + + typedef std::vector compat_list; + static compat_list known; + if (known.empty()) + { + known.push_back("GLIBCPP_3.2"); + known.push_back("GLIBCPP_3.2.1"); + known.push_back("GLIBCPP_3.2.2"); + known.push_back("GLIBCPP_3.4"); + known.push_back("CXXABI_1.2"); + known.push_back("CXXABI_1.2.1"); + known.push_back("CXXABI_1.3"); + } + + compat_list::iterator end = known.end(); + + // Check version names for compatibility... + compat_list::iterator it1 = find(known.begin(), end, test.version_name); + + // Check for weak label. + compat_list::iterator it2 = find(known.begin(), end, test.name); + if (it1 != end || it2 != end) + ret = true; + + return ret; +} + bool check_compatible(const symbol_info& lhs, const symbol_info& rhs, bool verbose = false) @@ -113,7 +145,8 @@ check_compatible(const symbol_info& lhs, const symbol_info& rhs, } } - if (lhs.version_name != rhs.version_name) + if (lhs.version_name != rhs.version_name + && !check_version(lhs) && !check_version(rhs)) { ret = false; if (verbose) @@ -363,23 +396,8 @@ main(int argc, char** argv) // Check added names for compatibility. for (size_t i = 0; i < added_names.size(); ++i) { - vector compatible_versions; - compatible_versions.push_back("GLIBCPP_3.2.1"); - compatible_versions.push_back("GLIBCPP_3.2.2"); - compatible_versions.push_back("CXXABI_1.2.1"); - symbol_info test = test_symbols[added_names[i]]; - vector::iterator end = compatible_versions.end(); - - // Check version names for compatibility... - vector::iterator it1 = find(compatible_versions.begin(), end, - test.version_name); - - // Check for weak label. - vector::iterator it2 = find(compatible_versions.begin(), end, - test.name); - - if (it1 == end && it2 == end) + if (!check_version(test)) { incompatible.push_back(symbol_pair(test, test)); cout << test.version_name << endl; diff --git a/libstdc++-v3/testsuite/ext/allocators.cc b/libstdc++-v3/testsuite/ext/allocators.cc index 58152145e7e8..3102c91bcded 100644 --- a/libstdc++-v3/testsuite/ext/allocators.cc +++ b/libstdc++-v3/testsuite/ext/allocators.cc @@ -24,17 +24,17 @@ #include #include -typedef std::__malloc_alloc_template<3> weird_alloc; -template class std::__malloc_alloc_template<3>; +typedef std::__malloc_alloc<3> weird_alloc; +template class std::__malloc_alloc<3>; typedef std::__debug_alloc debug_weird_alloc; template class std::__debug_alloc; -typedef std::__default_alloc_template unshared_normal_alloc; -template class std::__default_alloc_template; +typedef std::__pool_alloc unshared_normal_alloc; +template class std::__pool_alloc; -typedef std::__default_alloc_template unshared_singlethreaded; -template class std::__default_alloc_template; +typedef std::__pool_alloc unshared_singlethreaded; +template class std::__pool_alloc; //std::malloc_alloc test_malloc_alloc;