aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2005-12-19 00:56:05 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2005-12-19 00:56:05 +0000
commit3cbc7af037de005ee1c45a07643e153375343cb4 (patch)
tree827ba3eb885e93b2a058124da8547cb937b19a27 /libstdc++-v3/src
parent402840fd9b0ccfd8cbc0f638afe98509f925600d (diff)
downloadgcc-3cbc7af037de005ee1c45a07643e153375343cb4.zip
gcc-3cbc7af037de005ee1c45a07643e153375343cb4.tar.gz
gcc-3cbc7af037de005ee1c45a07643e153375343cb4.tar.bz2
c++config: Add in revised namespace associations.
2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/Makefile.am4
-rw-r--r--libstdc++-v3/src/Makefile.in4
-rw-r--r--libstdc++-v3/src/allocator-inst.cc10
-rw-r--r--libstdc++-v3/src/bitmap_allocator.cc7
-rw-r--r--libstdc++-v3/src/codecvt.cc7
-rw-r--r--libstdc++-v3/src/compatibility.cc142
-rw-r--r--libstdc++-v3/src/complex_io.cc9
-rw-r--r--libstdc++-v3/src/concept-inst.cc7
-rw-r--r--libstdc++-v3/src/ctype.cc8
-rw-r--r--libstdc++-v3/src/debug.cc7
-rw-r--r--libstdc++-v3/src/ext-inst.cc7
-rw-r--r--libstdc++-v3/src/fstream-inst.cc29
-rw-r--r--libstdc++-v3/src/functexcept.cc10
-rw-r--r--libstdc++-v3/src/globals_io.cc9
-rw-r--r--libstdc++-v3/src/ios-inst.cc7
-rw-r--r--libstdc++-v3/src/ios.cc9
-rw-r--r--libstdc++-v3/src/ios_failure.cc9
-rw-r--r--libstdc++-v3/src/ios_init.cc9
-rw-r--r--libstdc++-v3/src/ios_locale.cc9
-rw-r--r--libstdc++-v3/src/iostream-inst.cc7
-rw-r--r--libstdc++-v3/src/istream-inst.cc10
-rw-r--r--libstdc++-v3/src/istream.cc7
-rw-r--r--libstdc++-v3/src/limits.cc9
-rw-r--r--libstdc++-v3/src/list.cc8
-rw-r--r--libstdc++-v3/src/locale-inst.cc9
-rw-r--r--libstdc++-v3/src/locale-misc-inst.cc10
-rw-r--r--libstdc++-v3/src/locale.cc9
-rw-r--r--libstdc++-v3/src/locale_facets.cc9
-rw-r--r--libstdc++-v3/src/locale_init.cc7
-rw-r--r--libstdc++-v3/src/localename.cc9
-rw-r--r--libstdc++-v3/src/misc-inst.cc14
-rw-r--r--libstdc++-v3/src/mt_allocator.cc7
-rw-r--r--libstdc++-v3/src/ostream-inst.cc9
-rw-r--r--libstdc++-v3/src/pool_allocator.cc7
-rw-r--r--libstdc++-v3/src/sstream-inst.cc29
-rw-r--r--libstdc++-v3/src/stdexcept.cc9
-rw-r--r--libstdc++-v3/src/streambuf-inst.cc22
-rw-r--r--libstdc++-v3/src/streambuf.cc7
-rw-r--r--libstdc++-v3/src/string-inst.cc13
-rw-r--r--libstdc++-v3/src/strstream.cc9
-rw-r--r--libstdc++-v3/src/tree.cc9
-rw-r--r--libstdc++-v3/src/valarray-inst.cc9
42 files changed, 337 insertions, 204 deletions
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 4d51036..0855c59 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -43,6 +43,10 @@ if ENABLE_SYMVERS_GNU
version_arg = -Wl,--version-script=libstdc++-symbols.ver
version_dep = libstdc++-symbols.ver
endif
+if ENABLE_SYMVERS_GNU_NAMESPACE
+version_arg = -Wl,--version-script=libstdc++-symbols.ver
+version_dep = libstdc++-symbols.ver
+endif
if ENABLE_SYMVERS_DARWIN
version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist
version_dep = libstdc++-symbols.explist
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index f751600..f78e735 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -137,6 +137,8 @@ ENABLE_SYMVERS_DARWIN_FALSE = @ENABLE_SYMVERS_DARWIN_FALSE@
ENABLE_SYMVERS_DARWIN_TRUE = @ENABLE_SYMVERS_DARWIN_TRUE@
ENABLE_SYMVERS_FALSE = @ENABLE_SYMVERS_FALSE@
ENABLE_SYMVERS_GNU_FALSE = @ENABLE_SYMVERS_GNU_FALSE@
+ENABLE_SYMVERS_GNU_NAMESPACE_FALSE = @ENABLE_SYMVERS_GNU_NAMESPACE_FALSE@
+ENABLE_SYMVERS_GNU_NAMESPACE_TRUE = @ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@
ENABLE_SYMVERS_GNU_TRUE = @ENABLE_SYMVERS_GNU_TRUE@
ENABLE_SYMVERS_TRUE = @ENABLE_SYMVERS_TRUE@
EXEEXT = @EXEEXT@
@@ -279,9 +281,11 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
toolexeclib_LTLIBRARIES = libstdc++.la
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,-exported_symbols_list,libstdc++-symbols.explist
@ENABLE_SYMVERS_FALSE@version_arg =
+@ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver
@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_arg = -Wl,--version-script=libstdc++-symbols.ver
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.explist
@ENABLE_SYMVERS_FALSE@version_dep =
+@ENABLE_SYMVERS_GNU_NAMESPACE_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver
@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver
# Source files linked in via configuration/make substitution for a
diff --git a/libstdc++-v3/src/allocator-inst.cc b/libstdc++-v3/src/allocator-inst.cc
index 0258b2f..aca019c 100644
--- a/libstdc++-v3/src/allocator-inst.cc
+++ b/libstdc++-v3/src/allocator-inst.cc
@@ -1,6 +1,7 @@
// Explicit instantiation file.
-// Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005
+// 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
@@ -33,8 +34,9 @@
#include <memory>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template class allocator<char>;
template class allocator<wchar_t>;
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/bitmap_allocator.cc b/libstdc++-v3/src/bitmap_allocator.cc
index da2597b..761ec61 100644
--- a/libstdc++-v3/src/bitmap_allocator.cc
+++ b/libstdc++-v3/src/bitmap_allocator.cc
@@ -29,8 +29,8 @@
#include <ext/bitmap_allocator.h>
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
namespace balloc
{
template class __mini_vector<std::pair
@@ -124,4 +124,5 @@ namespace __gnu_cxx
// Instantiations.
template class bitmap_allocator<char>;
template class bitmap_allocator<wchar_t>;
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/codecvt.cc b/libstdc++-v3/src/codecvt.cc
index ea7cdd2..e602c75 100644
--- a/libstdc++-v3/src/codecvt.cc
+++ b/libstdc++-v3/src/codecvt.cc
@@ -29,8 +29,8 @@
#include <locale>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Definitions for locale::id of standard facets that are specialized.
locale::id codecvt<char, char, mbstate_t>::id;
@@ -149,4 +149,5 @@ namespace std
do_always_noconv() const throw()
{ return false; }
#endif // _GLIBCXX_USE_WCHAR_T
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/compatibility.cc b/libstdc++-v3/src/compatibility.cc
index 2261ad5..ce66160 100644
--- a/libstdc++-v3/src/compatibility.cc
+++ b/libstdc++-v3/src/compatibility.cc
@@ -43,6 +43,8 @@
#define _M_set_length_and_sharable(a) _M_set_length_and_sharableXX(a)
#define ignore ignoreXX
#define eq eqXX
+#define _List_node_base _List_node_baseXX
+#define __gnu_debug __gnu_debugXX
#endif
#include <string>
@@ -50,10 +52,9 @@
#include <fstream>
#include <sstream>
-namespace std
-{
- // std::istream ignore explicit specializations.
+_GLIBCXX_BEGIN_NAMESPACE(std)
+ // std::istream ignore explicit specializations.
template<>
basic_istream<char>&
basic_istream<char>::
@@ -82,7 +83,7 @@ namespace std
{
streamsize __size = std::min(streamsize(__sb->egptr()
- __sb->gptr()),
- streamsize(__n - _M_gcount));
+ streamsize(__n - _M_gcount));
if (__size > 1)
{
__sb->gbump(__size);
@@ -147,7 +148,7 @@ namespace std
{
streamsize __size = std::min(streamsize(__sb->egptr()
- __sb->gptr()),
- streamsize(__n - _M_gcount));
+ streamsize(__n - _M_gcount));
if (__size > 1)
{
__sb->gbump(__size);
@@ -184,7 +185,9 @@ namespace std
return *this;
}
#endif
-}
+
+_GLIBCXX_END_NAMESPACE
+
// NB: These symbols renames should go into the shared library only,
// and only those shared libraries that support versioning.
@@ -194,8 +197,9 @@ namespace std
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
_ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
*/
-namespace std
-{
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template
istreambuf_iterator<char>&
istreambuf_iterator<char>::operator++();
@@ -205,7 +209,9 @@ namespace std
istreambuf_iterator<wchar_t>&
istreambuf_iterator<wchar_t>::operator++();
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
+
/* gcc-4.0.0
_ZNSs4_Rep26_M_set_length_and_sharableEj
@@ -236,8 +242,8 @@ _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv
_ZNSt11char_traitsIcE2eqERKcS2_
_ZNSt11char_traitsIwE2eqERKwS2_
*/
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// std::char_traits is explicitly specialized
bool (* __p1)(const char&, const char&) = &char_traits<char>::eq;
@@ -329,7 +335,8 @@ namespace std
bool
basic_ofstream<wchar_t>::is_open() const;
#endif
-}
+
+_GLIBCXX_END_NAMESPACE
// The rename syntax for default exported names is
// asm (".symver name1,exportedname@GLIBCXX_3.4")
@@ -360,6 +367,107 @@ namespace std
#include <bits/compatibility.h>
#undef _GLIBCXX_APPLY_SYMVER
+/* gcc-3.4.0
+_ZN10__gnu_norm15_List_node_base4hookEPS0_;
+_ZN10__gnu_norm15_List_node_base4swapERS0_S1_;
+_ZN10__gnu_norm15_List_node_base6unhookEv;
+_ZN10__gnu_norm15_List_node_base7reverseEv;
+_ZN10__gnu_norm15_List_node_base8transferEPS0_S1_;
+_ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb;
+_ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv;
+_ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv;
+_ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_;
+_ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv;
+_ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv;
+_ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv;
+_ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_;
+_ZNK11__gnu_debug16_Error_formatter8_M_errorEv;
+_ZNK11__gnu_debug16_Error_formatter10_M_messageENS_13_Debug_msg_idE;
+_ZNK11__gnu_debug16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKc;
+_ZNK11__gnu_debug16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_;
+_ZNK11__gnu_debug16_Error_formatter13_M_print_wordEPKc;
+_ZNK11__gnu_debug16_Error_formatter15_M_print_stringEPKc;
+*/
+#include "debug_list.cc"
+#include "debug.cc"
+
+_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX4hookEPS_, \
+_ZN10__gnu_norm15_List_node_base4hookEPS0_, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX4swapERS_S0_, \
+_ZN10__gnu_norm15_List_node_base4swapERS0_S1_, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX6unhookEv, \
+_ZN10__gnu_norm15_List_node_base6unhookEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX7reverseEv, \
+_ZN10__gnu_norm15_List_node_base7reverseEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt17_List_node_baseXX8transferEPS_S0_, \
+_ZN10__gnu_norm15_List_node_base8transferEPS0_S1_, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb, \
+_ZN11__gnu_debug19_Safe_iterator_base9_M_attachEPNS_19_Safe_sequence_baseEb, \
+ GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_iterator_base9_M_detachEv, \
+_ZN11__gnu_debug19_Safe_iterator_base9_M_detachEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX19_Safe_iterator_base11_M_singularEv,\
+_ZNK11__gnu_debug19_Safe_iterator_base11_M_singularEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX19_Safe_iterator_base14_M_can_compareERKS0_, \
+_ZNK11__gnu_debug19_Safe_iterator_base14_M_can_compareERKS0_, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base13_M_detach_allEv, \
+_ZN11__gnu_debug19_Safe_sequence_base13_M_detach_allEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base18_M_detach_singularEv, \
+_ZN11__gnu_debug19_Safe_sequence_base18_M_detach_singularEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base22_M_revalidate_singularEv, \
+_ZN11__gnu_debug19_Safe_sequence_base22_M_revalidate_singularEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt13__gnu_debugXX19_Safe_sequence_base7_M_swapERS0_, \
+_ZN11__gnu_debug19_Safe_sequence_base7_M_swapERS0_, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter8_M_errorEv, \
+_ZNK11__gnu_debug16_Error_formatter8_M_errorEv, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter10_M_messageENS_13_Debug_msg_idE, \
+_ZNK11__gnu_debug16_Error_formatter10_M_messageENS_13_Debug_msg_idE, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKc, \
+_ZNK11__gnu_debug16_Error_formatter10_Parameter14_M_print_fieldEPKS0_PKc, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_, \
+_ZNK11__gnu_debug16_Error_formatter10_Parameter20_M_print_descriptionEPKS0_, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter13_M_print_wordEPKc, \
+_ZNK11__gnu_debug16_Error_formatter13_M_print_wordEPKc, \
+GLIBCXX_3.4)
+
+_GLIBCXX_ASM_SYMVER(_ZNKSt13__gnu_debugXX16_Error_formatter15_M_print_stringEPKc, \
+_ZNK11__gnu_debug16_Error_formatter15_M_print_stringEPKc, \
+GLIBCXX_3.4)
+
+
#endif
#ifdef _GLIBCXX_SYMVER_DARWIN
@@ -377,12 +485,12 @@ namespace std
using namespace std;
extern "C" void
-__eprintf (const char *string, const char *expression,
- unsigned int line, const char *filename)
+__eprintf(const char *string, const char *expression,
+ unsigned int line, const char *filename)
{
- fprintf (stderr, string, expression, line, filename);
- fflush (stderr);
- abort ();
+ fprintf(stderr, string, expression, line, filename);
+ fflush(stderr);
+ abort();
}
#endif
#endif
diff --git a/libstdc++-v3/src/complex_io.cc b/libstdc++-v3/src/complex_io.cc
index ba67d5e..1037958 100644
--- a/libstdc++-v3/src/complex_io.cc
+++ b/libstdc++-v3/src/complex_io.cc
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- complex number classes.
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2005 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
@@ -29,8 +29,8 @@
#include <complex>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template
basic_istream<char, char_traits<char> >&
operator>>(basic_istream<char, char_traits<char> >&, complex<float>&);
@@ -90,4 +90,5 @@ namespace std
operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&,
const complex<long double>&);
#endif //_GLIBCXX_USE_WCHAR_T
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/concept-inst.cc b/libstdc++-v3/src/concept-inst.cc
index 9824da1..904f72b 100644
--- a/libstdc++-v3/src/concept-inst.cc
+++ b/libstdc++-v3/src/concept-inst.cc
@@ -44,8 +44,8 @@
#define _Instantiate(...) template void __function_requires< __VA_ARGS__ > ()
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
template void __aux_require_boolean_expr<bool>(bool const&);
_Instantiate(_ConvertibleConcept<unsigned, unsigned> );
@@ -105,7 +105,8 @@ namespace __gnu_cxx
_Instantiate(_RandomAccessIteratorConcept<wchar_t const*> );
#endif
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
#undef _Instantiate
diff --git a/libstdc++-v3/src/ctype.cc b/libstdc++-v3/src/ctype.cc
index f978015..634c135 100644
--- a/libstdc++-v3/src/ctype.cc
+++ b/libstdc++-v3/src/ctype.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -28,8 +28,8 @@
#include <locale>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Definitions for static const data members of ctype_base.
const ctype_base::mask ctype_base::space;
const ctype_base::mask ctype_base::print;
@@ -110,5 +110,5 @@ namespace std
}
}
#endif
-} // namespace std
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/debug.cc b/libstdc++-v3/src/debug.cc
index 6f32fde..9dc73ae 100644
--- a/libstdc++-v3/src/debug.cc
+++ b/libstdc++-v3/src/debug.cc
@@ -44,6 +44,8 @@ namespace __gnu_internal
static __glibcxx_mutex_define_initialized(iterator_base_mutex);
} // namespace __gnu_internal
+namespace std
+{
namespace __gnu_debug
{
const char* _S_debug_messages[] =
@@ -247,8 +249,8 @@ namespace __gnu_debug
_Safe_iterator_base::
_M_can_compare(const _Safe_iterator_base& __x) const
{
- return (!_M_singular() && !__x._M_singular()
- && _M_sequence == __x._M_sequence);
+ return (!_M_singular()
+ && !__x._M_singular() && _M_sequence == __x._M_sequence);
}
void
@@ -668,3 +670,4 @@ namespace __gnu_debug
_Error_formatter::_M_format_word(char*, int, const char*,
const char*) const;
} // namespace __gnu_debug
+} // namespace std
diff --git a/libstdc++-v3/src/ext-inst.cc b/libstdc++-v3/src/ext-inst.cc
index 2ce337b..0396ba4 100644
--- a/libstdc++-v3/src/ext-inst.cc
+++ b/libstdc++-v3/src/ext-inst.cc
@@ -39,8 +39,8 @@ namespace __gnu_internal
const int min_len = __gnu_cxx::_Rope_constants::_S_max_rope_depth + 1;
}
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
using namespace __gnu_internal;
template
@@ -66,4 +66,5 @@ namespace __gnu_cxx
template class stdio_filebuf<wchar_t>;
#endif
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/fstream-inst.cc b/libstdc++-v3/src/fstream-inst.cc
index 152c145..762ccb8 100644
--- a/libstdc++-v3/src/fstream-inst.cc
+++ b/libstdc++-v3/src/fstream-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, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,29 +34,18 @@
#include <fstream>
-namespace std
-{
- // filebuf
- template class basic_filebuf<char, char_traits<char> >;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_filebuf<wchar_t, char_traits<wchar_t> >;
-#endif
+_GLIBCXX_BEGIN_NAMESPACE(std)
- // ifstream
+ template class basic_filebuf<char, char_traits<char> >;
template class basic_ifstream<char>;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_ifstream<wchar_t>;
-#endif
-
- // ofstream
template class basic_ofstream<char>;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_ofstream<wchar_t>;
-#endif
-
- // fstream
template class basic_fstream<char>;
+
#ifdef _GLIBCXX_USE_WCHAR_T
+ template class basic_filebuf<wchar_t, char_traits<wchar_t> >;
+ template class basic_ifstream<wchar_t>;
+ template class basic_ofstream<wchar_t>;
template class basic_fstream<wchar_t>;
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/functexcept.cc b/libstdc++-v3/src/functexcept.cc
index 2dde0c5..80a2d9e 100644
--- a/libstdc++-v3/src/functexcept.cc
+++ b/libstdc++-v3/src/functexcept.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2005 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
@@ -32,6 +32,7 @@
#include <new>
#include <typeinfo>
#include <ios>
+
#ifdef _GLIBCXX_USE_NLS
# include <libintl.h>
# define _(msgid) gettext (msgid)
@@ -39,8 +40,8 @@
# define _(msgid) (msgid)
#endif
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
#if __EXCEPTIONS
void
__throw_bad_exception(void)
@@ -154,4 +155,5 @@ namespace std
__throw_ios_failure(const char*)
{ abort(); }
#endif //__EXCEPTIONS
-}
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/globals_io.cc b/libstdc++-v3/src/globals_io.cc
index 76736fa..e531523 100644
--- a/libstdc++-v3/src/globals_io.cc
+++ b/libstdc++-v3/src/globals_io.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 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
@@ -49,8 +49,8 @@
// In macro form:
// _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2)
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Standard stream objects.
// NB: Iff <iostream> is included, these definitions become wonky.
typedef char fake_istream[sizeof(istream)]
@@ -72,7 +72,8 @@ namespace std
fake_wostream wcerr;
fake_wostream wclog;
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
namespace __gnu_internal
{
diff --git a/libstdc++-v3/src/ios-inst.cc b/libstdc++-v3/src/ios-inst.cc
index 83996f9..27f3e5b 100644
--- a/libstdc++-v3/src/ios-inst.cc
+++ b/libstdc++-v3/src/ios-inst.cc
@@ -34,11 +34,12 @@
#include <ios>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template class basic_ios<char>;
#ifdef _GLIBCXX_USE_WCHAR_T
template class basic_ios<wchar_t>;
#endif
-}
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/ios.cc b/libstdc++-v3/src/ios.cc
index a642e31..fdc62b4 100644
--- a/libstdc++-v3/src/ios.cc
+++ b/libstdc++-v3/src/ios.cc
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -36,8 +36,8 @@
#include <limits>
#include <bits/atomicity.h>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// XXX GLIBCXX_ABI Deprecated
// Definitions for static const data members of __ios_flags.
const __ios_flags::__int_type __ios_flags::_S_boolalpha;
@@ -225,4 +225,5 @@ namespace std
}
_M_callbacks = 0;
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/ios_failure.cc b/libstdc++-v3/src/ios_failure.cc
index cbe70ff..33d7ffc 100644
--- a/libstdc++-v3/src/ios_failure.cc
+++ b/libstdc++-v3/src/ios_failure.cc
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,8 +34,8 @@
#include <ios>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
ios_base::failure::failure(const string& __str) throw()
: _M_msg(__str) { }
@@ -45,4 +45,5 @@ namespace std
const char*
ios_base::failure::what() const throw()
{ return _M_msg.c_str(); }
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/ios_init.cc b/libstdc++-v3/src/ios_init.cc
index 0c21949..7e3028e 100644
--- a/libstdc++-v3/src/ios_init.cc
+++ b/libstdc++-v3/src/ios_init.cc
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -64,8 +64,8 @@ namespace __gnu_internal
#endif
} // namespace __gnu_internal
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
using namespace __gnu_internal;
extern istream cin;
@@ -196,4 +196,5 @@ namespace std
}
return __ret;
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/ios_locale.cc b/libstdc++-v3/src/ios_locale.cc
index 1202291..5be1c92 100644
--- a/libstdc++-v3/src/ios_locale.cc
+++ b/libstdc++-v3/src/ios_locale.cc
@@ -1,6 +1,6 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,8 +35,8 @@
#include <ios>
#include <locale>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Called only by basic_ios<>::init.
void
ios_base::_M_init()
@@ -57,4 +57,5 @@ namespace std
_M_call_callbacks(imbue_event);
return __old;
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/iostream-inst.cc b/libstdc++-v3/src/iostream-inst.cc
index 9f389e6..5da43cb 100644
--- a/libstdc++-v3/src/iostream-inst.cc
+++ b/libstdc++-v3/src/iostream-inst.cc
@@ -35,8 +35,8 @@
#include <iostream>
#include <iomanip>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template class _Setfill<char>;
template _Setfill<char> setfill(char);
template class basic_iostream<char>;
@@ -46,4 +46,5 @@ namespace std
template _Setfill<wchar_t> setfill(wchar_t);
template class basic_iostream<wchar_t>;
#endif
-}
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/istream-inst.cc b/libstdc++-v3/src/istream-inst.cc
index acdd5d0..d71314d 100644
--- a/libstdc++-v3/src/istream-inst.cc
+++ b/libstdc++-v3/src/istream-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, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,9 +35,8 @@
#include <istream>
#include <iomanip>
-namespace std
-{
- // istream
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template class basic_istream<char>;
template istream& ws(istream&);
template istream& operator>>(istream&, char&);
@@ -67,4 +66,5 @@ namespace std
template wistream& operator>>(wistream&, _Setprecision);
template wistream& operator>>(wistream&, _Setw);
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc
index 07e6255..688ad16 100644
--- a/libstdc++-v3/src/istream.cc
+++ b/libstdc++-v3/src/istream.cc
@@ -33,8 +33,8 @@
#include <istream>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template<>
basic_istream<char>&
basic_istream<char>::
@@ -643,4 +643,5 @@ namespace std
return __in;
}
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/limits.cc b/libstdc++-v3/src/limits.cc
index 0280908..235ecd6 100644
--- a/libstdc++-v3/src/limits.cc
+++ b/libstdc++-v3/src/limits.cc
@@ -1,6 +1,6 @@
// Static data members of -*- C++ -*- numeric_limits classes
-// Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2001, 2002, 2005 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
@@ -36,8 +36,8 @@
#include <limits>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
const bool __numeric_limits_base::is_specialized;
const int __numeric_limits_base::digits;
const int __numeric_limits_base::digits10;
@@ -446,4 +446,5 @@ namespace std
const bool numeric_limits<long double>::traps;
const bool numeric_limits<long double>::tinyness_before;
const float_round_style numeric_limits<long double>::round_style;
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/list.cc b/libstdc++-v3/src/list.cc
index e2b1571..fe68ba1 100644
--- a/libstdc++-v3/src/list.cc
+++ b/libstdc++-v3/src/list.cc
@@ -1,6 +1,6 @@
// std::list utilities implementation -*- C++ -*-
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2005 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
@@ -55,8 +55,8 @@
#include <list>
-namespace _GLIBCXX_STD
-{
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
+
void
_List_node_base::swap(_List_node_base& __x, _List_node_base& __y)
{
@@ -137,5 +137,5 @@ namespace _GLIBCXX_STD
__prev_node->_M_next = __next_node;
__next_node->_M_prev = __prev_node;
}
-} // namespace std
+_GLIBCXX_END_NESTED_NAMESPACE
diff --git a/libstdc++-v3/src/locale-inst.cc b/libstdc++-v3/src/locale-inst.cc
index 84c7d77..fd2a8d4 100644
--- a/libstdc++-v3/src/locale-inst.cc
+++ b/libstdc++-v3/src/locale-inst.cc
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -39,8 +39,8 @@
# define C char
#endif
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// moneypunct, money_get, and money_put
template class moneypunct<C, false>;
template class moneypunct<C, true>;
@@ -313,4 +313,5 @@ namespace std
__int_to_char(C*, unsigned long long, const C*,
ios_base::fmtflags, bool);
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/locale-misc-inst.cc b/libstdc++-v3/src/locale-misc-inst.cc
index 8da1279..32b7597 100644
--- a/libstdc++-v3/src/locale-misc-inst.cc
+++ b/libstdc++-v3/src/locale-misc-inst.cc
@@ -1,6 +1,7 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005
+// 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
@@ -33,8 +34,8 @@
#include <locale>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template
int
__convert_from_v(char*, const int, const char*, double,
@@ -44,4 +45,5 @@ namespace std
int
__convert_from_v(char*, const int, const char*, long double,
const __c_locale&, int);
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc
index 5498eae..713d399 100644
--- a/libstdc++-v3/src/locale.cc
+++ b/libstdc++-v3/src/locale.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -41,8 +41,8 @@ namespace __gnu_internal
static __glibcxx_mutex_define_initialized(locale_cache_mutex);
}
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Definitions for static const data members of locale.
const locale::category locale::none;
const locale::category locale::ctype;
@@ -401,6 +401,7 @@ namespace std
_M_index = 1 + __gnu_cxx::__exchange_and_add(&_S_refcount, 1);
return _M_index - 1;
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/locale_facets.cc b/libstdc++-v3/src/locale_facets.cc
index 29c3c89..46de583 100644
--- a/libstdc++-v3/src/locale_facets.cc
+++ b/libstdc++-v3/src/locale_facets.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -28,8 +28,8 @@
#include <locale>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Definitions for static const data members of time_base.
template<>
const char*
@@ -89,5 +89,6 @@ namespace std
*__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
*__fptr = '\0';
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/locale_init.cc b/libstdc++-v3/src/locale_init.cc
index 3580509..e7fe620 100644
--- a/libstdc++-v3/src/locale_init.cc
+++ b/libstdc++-v3/src/locale_init.cc
@@ -93,8 +93,8 @@ namespace __gnu_internal
static __glibcxx_mutex_define_initialized(locale_mutex);
} // namespace __gnu_internal
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
using namespace __gnu_internal;
locale::locale() throw() : _M_impl(0)
@@ -344,4 +344,5 @@ namespace std
_M_caches[__timepunct<wchar_t>::id._M_id()] = __tpw;
#endif
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc
index 431a8c1..e1a1114 100644
--- a/libstdc++-v3/src/localename.cc
+++ b/libstdc++-v3/src/localename.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -30,8 +30,8 @@
#include <cstring>
#include <locale>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
using namespace __gnu_cxx;
locale::locale(const char* __s) : _M_impl(0)
@@ -299,4 +299,5 @@ namespace std
}
}
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/misc-inst.cc b/libstdc++-v3/src/misc-inst.cc
index d57bf9d..8cc39e3 100644
--- a/libstdc++-v3/src/misc-inst.cc
+++ b/libstdc++-v3/src/misc-inst.cc
@@ -37,8 +37,8 @@
#include <ostream>
#include <ext/stdio_sync_filebuf.h>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// string related to iostreams
template
basic_istream<char>&
@@ -66,14 +66,16 @@ namespace std
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
#endif
-} // namespace std
-namespace __gnu_cxx
-{
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
template class stdio_sync_filebuf<char>;
#ifdef _GLIBCXX_USE_WCHAR_T
template class stdio_sync_filebuf<wchar_t>;
#endif
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/mt_allocator.cc b/libstdc++-v3/src/mt_allocator.cc
index 7f1e715..332cb17 100644
--- a/libstdc++-v3/src/mt_allocator.cc
+++ b/libstdc++-v3/src/mt_allocator.cc
@@ -76,8 +76,8 @@ namespace __gnu_internal
#endif
}
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
void
__pool<false>::_M_destroy() throw()
{
@@ -781,4 +781,5 @@ namespace __gnu_cxx
// Instantiations.
template class __mt_alloc<char>;
template class __mt_alloc<wchar_t>;
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/ostream-inst.cc b/libstdc++-v3/src/ostream-inst.cc
index 6d3189f..4568dca 100644
--- a/libstdc++-v3/src/ostream-inst.cc
+++ b/libstdc++-v3/src/ostream-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, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,8 +35,8 @@
#include <ostream>
#include <iomanip>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// ostream
template class basic_ostream<char>;
template ostream& endl(ostream&);
@@ -73,4 +73,5 @@ namespace std
template wostream& operator<<(wostream&, _Setprecision);
template wostream& operator<<(wostream&, _Setw);
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/pool_allocator.cc b/libstdc++-v3/src/pool_allocator.cc
index 90ada30..bdcf130 100644
--- a/libstdc++-v3/src/pool_allocator.cc
+++ b/libstdc++-v3/src/pool_allocator.cc
@@ -40,8 +40,8 @@ namespace __gnu_internal
static __glibcxx_mutex_define_initialized(palloc_init_mutex);
}
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
// Definitions for __pool_alloc_base.
__pool_alloc_base::_Obj* volatile*
__pool_alloc_base::_M_get_free_list(size_t __bytes)
@@ -170,4 +170,5 @@ namespace __gnu_cxx
// Instantiations.
template class __pool_alloc<char>;
template class __pool_alloc<wchar_t>;
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/sstream-inst.cc b/libstdc++-v3/src/sstream-inst.cc
index 444c996..a6f41ba 100644
--- a/libstdc++-v3/src/sstream-inst.cc
+++ b/libstdc++-v3/src/sstream-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, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,29 +34,18 @@
#include <sstream>
-namespace std
-{
- // stringbuf
- template class basic_stringbuf<char>;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_stringbuf<wchar_t>;
-#endif
+_GLIBCXX_BEGIN_NAMESPACE(std)
- // istringstream
+ template class basic_stringbuf<char>;
template class basic_istringstream<char>;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_istringstream<wchar_t>;
-#endif
-
- // ostringstream
template class basic_ostringstream<char>;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_ostringstream<wchar_t>;
-#endif
-
- // stringstream
template class basic_stringstream<char>;
+
#ifdef _GLIBCXX_USE_WCHAR_T
+ template class basic_stringbuf<wchar_t>;
+ template class basic_istringstream<wchar_t>;
+ template class basic_ostringstream<wchar_t>;
template class basic_stringstream<wchar_t>;
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/stdexcept.cc b/libstdc++-v3/src/stdexcept.cc
index 6007924..19ac577 100644
--- a/libstdc++-v3/src/stdexcept.cc
+++ b/libstdc++-v3/src/stdexcept.cc
@@ -1,6 +1,6 @@
// Methods for Exception Support for -*- C++ -*-
-// Copyright (C) 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1999, 2001, 2002, 2005 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
@@ -34,8 +34,8 @@
#include <string>
#include <stdexcept>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
logic_error::logic_error(const string& __arg)
: exception(), _M_msg(__arg) { }
@@ -74,5 +74,6 @@ namespace std
underflow_error::underflow_error(const string& __arg)
: runtime_error(__arg) { }
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/streambuf-inst.cc b/libstdc++-v3/src/streambuf-inst.cc
index 01397e2..d08bc0d 100644
--- a/libstdc++-v3/src/streambuf-inst.cc
+++ b/libstdc++-v3/src/streambuf-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, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,22 +35,22 @@
#include <ios>
#include <streambuf>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// streambuf
template class basic_streambuf<char>;
-#ifdef _GLIBCXX_USE_WCHAR_T
- template class basic_streambuf<wchar_t>;
-#endif
template
streamsize
- __copy_streambufs(basic_streambuf<char>*,
- basic_streambuf<char>*);
+ __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*);
+
#ifdef _GLIBCXX_USE_WCHAR_T
+ // wstreambuf
+ template class basic_streambuf<wchar_t>;
+
template
streamsize
- __copy_streambufs(basic_streambuf<wchar_t>*,
- basic_streambuf<wchar_t>*);
+ __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*);
#endif
-} //std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/streambuf.cc b/libstdc++-v3/src/streambuf.cc
index 923ff4f..75f61cc 100644
--- a/libstdc++-v3/src/streambuf.cc
+++ b/libstdc++-v3/src/streambuf.cc
@@ -33,8 +33,8 @@
#include <streambuf>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template<>
streamsize
__copy_streambufs(basic_streambuf<char>* __sbin,
@@ -100,4 +100,5 @@ namespace std
return __ret;
}
#endif
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc
index cccf390..4c447e4 100644
--- a/libstdc++-v3/src/string-inst.cc
+++ b/libstdc++-v3/src/string-inst.cc
@@ -42,8 +42,8 @@
# define C char
#endif
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
typedef basic_string<C> S;
template class basic_string<C>;
@@ -81,11 +81,12 @@ namespace std
template
const C*
search(const C*, const C*, const C*, const C*, bool(*)(const C&, const C&));
-} // namespace std
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-namespace __gnu_cxx
-{
using std::S;
template bool operator==(const S::iterator&, const S::iterator&);
template bool operator==(const S::const_iterator&, const S::const_iterator&);
-} // namespace __gnu_cxx
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/strstream.cc b/libstdc++-v3/src/strstream.cc
index 363d007..5bbb33a4 100644
--- a/libstdc++-v3/src/strstream.cc
+++ b/libstdc++-v3/src/strstream.cc
@@ -1,6 +1,6 @@
// strstream definitions -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation
//
// 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
@@ -53,8 +53,8 @@
#include <string.h>
#include <limits.h>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
strstreambuf::strstreambuf(streamsize initial_capacity)
: _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(true),
_M_frozen(false), _M_constant(false)
@@ -413,4 +413,5 @@ namespace std
char*
strstream::str()
{ return _M_buf.str(); }
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/tree.cc b/libstdc++-v3/src/tree.cc
index 67b1dc6..38a3037 100644
--- a/libstdc++-v3/src/tree.cc
+++ b/libstdc++-v3/src/tree.cc
@@ -1,6 +1,6 @@
// RB tree utilities implementation -*- C++ -*-
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2005 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
@@ -57,8 +57,8 @@
#include <bits/stl_tree.h>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
_Rb_tree_node_base*
_Rb_tree_increment(_Rb_tree_node_base* __x)
{
@@ -428,4 +428,5 @@ namespace std
while (1);
return __sum;
}
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
diff --git a/libstdc++-v3/src/valarray-inst.cc b/libstdc++-v3/src/valarray-inst.cc
index 271c108..c13e1a2 100644
--- a/libstdc++-v3/src/valarray-inst.cc
+++ b/libstdc++-v3/src/valarray-inst.cc
@@ -1,6 +1,6 @@
// Explicit instantiation file.
-// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2004, 2005 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
@@ -33,8 +33,8 @@
#include <valarray>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// Some explicit instantiations.
template void
__valarray_fill(size_t* __restrict__, size_t, const size_t&);
@@ -112,4 +112,5 @@ namespace std
: _M_count(1), _M_start(__o), _M_size(__l), _M_stride(__s),
_M_index(__l.size() == 0 ? 0 : __valarray_product(__l))
{ __gslice_to_index(__o, __l, __s, _M_index); }
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE