summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
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 4d51036fe6b..0855c591e27 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 f751600fcc3..f78e7353f86 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 0258b2f81db..aca019ca496 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 da2597b7e96..761ec613623 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 ea7cdd25374..e602c75c00b 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 2261ad57b24..ce661600507 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 ba67d5e001a..103795888b0 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 9824da1192b..904f72becd6 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 f97801516e4..634c135b2f9 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 6f32fde5e65..9dc73ae67bc 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 2ce337bed08..0396ba45439 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 152c145c066..762ccb8a9d6 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 2dde0c5c12e..80a2d9ec34d 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 76736fa644a..e53152321e0 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 83996f9cff9..27f3e5bb1f9 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 a642e313c7f..fdc62b4d0b1 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 cbe70ff61bf..33d7ffcd4e1 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 0c2194901ee..7e3028e8453 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 1202291f478..5be1c9255bd 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 9f389e64f91..5da43cb148a 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 acdd5d09c00..d71314d3d99 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 07e6255b534..688ad165835 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 02809082236..235ecd61813 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 e2b1571ae1e..fe68ba1d7a4 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 84c7d773f99..fd2a8d4b828 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 8da12791d18..32b75978352 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 5498eaee7a3..713d3993d2f 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 29c3c8933b9..46de583d513 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 35805092fcb..e7fe6207ebf 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 431a8c1bfa6..e1a111465c2 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 d57bf9dc9ff..8cc39e3747a 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 7f1e7159b4d..332cb173368 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 6d3189f57a6..4568dca5cde 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 90ada30bd5a..bdcf130f36b 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 444c9963373..a6f41baccbc 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 60079244b23..19ac5779eb5 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 01397e2c16c..d08bc0d2db1 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 923ff4f8f8f..75f61cca4c9 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 cccf390c4ee..4c447e4434a 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 363d007f56c..5bbb33a441e 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 67b1dc622dc..38a30373364 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 271c1087d6f..c13e1a2454b 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