From 681a691966414d9633b76c710424eff77b5620bf Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 26 Feb 2007 09:36:39 +0000 Subject: [PATCH] PR libstdc++/28080 (partial) 2007-02-26 Paolo Carlini PR libstdc++/28080 (partial) * include/std/bitset: Do not include and , is enough. * include/std/iomanip: Do not include the whole , is enough; do not include ; reformat. * include/std/functional: Do not include . * include/std/list: Do not include . * include/std/numeric: Do not include the whole and . * include/std/valarray: Do not include . * include/bits/stl_numeric.h: Include . * src/iostream-inst.cc: Include . * include/ext/functional: Include . * testsuite/util/testsuite_hooks.h: Do not include , is enough; qualify tm. * testsuite/util/testsuite_hooks.cc: Qualify tm. 2007-02-26 Paolo Carlini * include/bits/locale_facets.h (class ctype_byname, class ctype_byname): Declare. * src/ctype.cc (ctype_byname::ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): Define. * config/locale/generic/ctype_members.cc (ctype_byname:: ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): Likewise. * config/locale/gnu/ctype_members.cc (ctype_byname:: ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): Likewise. * config/locale/darwin/ctype_members.cc (ctype_byname:: ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): Likewise. * testsuite/22_locale/headers/locale/synopsis.cc: Remove xfail. From-SVN: r122329 --- libstdc++-v3/ChangeLog | 36 ++++++++++++ .../config/locale/darwin/ctype_members.cc | 26 +++++---- .../config/locale/generic/ctype_members.cc | 25 ++++---- .../config/locale/gnu/ctype_members.cc | 31 +++++----- libstdc++-v3/include/bits/locale_facets.h | 29 ++++++++-- libstdc++-v3/include/bits/stl_numeric.h | 4 +- libstdc++-v3/include/ext/functional | 4 +- libstdc++-v3/include/std/bitset | 8 +-- libstdc++-v3/include/std/functional | 4 +- libstdc++-v3/include/std/iomanip | 58 +++++++++---------- libstdc++-v3/include/std/list | 4 +- libstdc++-v3/include/std/numeric | 3 +- libstdc++-v3/include/std/valarray | 4 +- libstdc++-v3/src/ctype.cc | 28 +++++---- libstdc++-v3/src/iostream-inst.cc | 4 +- .../22_locale/headers/locale/synopsis.cc | 3 +- .../testsuite/util/testsuite_hooks.cc | 7 ++- libstdc++-v3/testsuite/util/testsuite_hooks.h | 9 +-- 18 files changed, 181 insertions(+), 106 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5b7332a1d0d9..9d5103a273ad 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,39 @@ +2007-02-26 Paolo Carlini + + PR libstdc++/28080 (partial) + * include/std/bitset: Do not include and , + is enough. + * include/std/iomanip: Do not include the whole , + is enough; do not include ; reformat. + * include/std/functional: Do not include . + * include/std/list: Do not include . + * include/std/numeric: Do not include the whole and + . + * include/std/valarray: Do not include . + * include/bits/stl_numeric.h: Include . + * src/iostream-inst.cc: Include . + * include/ext/functional: Include . + * testsuite/util/testsuite_hooks.h: Do not include , + is enough; qualify tm. + * testsuite/util/testsuite_hooks.cc: Qualify tm. + +2007-02-26 Paolo Carlini + + * include/bits/locale_facets.h (class ctype_byname, + class ctype_byname): Declare. + * src/ctype.cc (ctype_byname::ctype_byname(const char*, + size_t), ctype_byname::~ctype_byname): Define. + * config/locale/generic/ctype_members.cc (ctype_byname:: + ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): + Likewise. + * config/locale/gnu/ctype_members.cc (ctype_byname:: + ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): + Likewise. + * config/locale/darwin/ctype_members.cc (ctype_byname:: + ctype_byname(const char*, size_t), ctype_byname::~ctype_byname): + Likewise. + * testsuite/22_locale/headers/locale/synopsis.cc: Remove xfail. + 2007-02-25 Paolo Carlini * testsuite/19_diagnostics/headers/cerrno/macros.cc: Include diff --git a/libstdc++-v3/config/locale/darwin/ctype_members.cc b/libstdc++-v3/config/locale/darwin/ctype_members.cc index c2a5c4ac500a..813ec7979dbc 100644 --- a/libstdc++-v3/config/locale/darwin/ctype_members.cc +++ b/libstdc++-v3/config/locale/darwin/ctype_members.cc @@ -1,6 +1,7 @@ // std::ctype implementation details, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -40,16 +41,19 @@ namespace std { // NB: The other ctype specializations are in src/locale.cc and // various /config/os/* files. - template<> - ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(0, false, __refs) - { - if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) - { - this->_S_destroy_c_locale(this->_M_c_locale_ctype); - this->_S_create_c_locale(this->_M_c_locale_ctype, __s); - } - } + + ctype_byname::ctype_byname(const char* __s, size_t __refs) + : ctype(0, false, __refs) + { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_ctype); + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); + } + } + + ctype_byname::~ctype_byname() + { } #ifdef _GLIBCXX_USE_WCHAR_T ctype::__wmask_type diff --git a/libstdc++-v3/config/locale/generic/ctype_members.cc b/libstdc++-v3/config/locale/generic/ctype_members.cc index 3af4440da8f6..0520c223874c 100644 --- a/libstdc++-v3/config/locale/generic/ctype_members.cc +++ b/libstdc++-v3/config/locale/generic/ctype_members.cc @@ -1,6 +1,7 @@ // std::ctype implementation details, generic version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -39,16 +40,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // NB: The other ctype specializations are in src/locale.cc and // various /config/os/* files. - template<> - ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(0, false, __refs) - { - if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) - { - this->_S_destroy_c_locale(this->_M_c_locale_ctype); - this->_S_create_c_locale(this->_M_c_locale_ctype, __s); - } - } + ctype_byname::ctype_byname(const char* __s, size_t __refs) + : ctype(0, false, __refs) + { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_ctype); + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); + } + } + + ctype_byname::~ctype_byname() + { } #ifdef _GLIBCXX_USE_WCHAR_T ctype::__wmask_type diff --git a/libstdc++-v3/config/locale/gnu/ctype_members.cc b/libstdc++-v3/config/locale/gnu/ctype_members.cc index cb2887d9b98c..3aec312f89b3 100644 --- a/libstdc++-v3/config/locale/gnu/ctype_members.cc +++ b/libstdc++-v3/config/locale/gnu/ctype_members.cc @@ -1,6 +1,7 @@ // std::ctype implementation details, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -40,19 +41,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // NB: The other ctype specializations are in src/locale.cc and // various /config/os/* files. - template<> - ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(0, false, __refs) - { - if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) - { - this->_S_destroy_c_locale(this->_M_c_locale_ctype); - this->_S_create_c_locale(this->_M_c_locale_ctype, __s); - this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; - this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; - this->_M_table = this->_M_c_locale_ctype->__ctype_b; - } - } + ctype_byname::ctype_byname(const char* __s, size_t __refs) + : ctype(0, false, __refs) + { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_ctype); + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; + this->_M_table = this->_M_c_locale_ctype->__ctype_b; + } + } + + ctype_byname::~ctype_byname() + { } #ifdef _GLIBCXX_USE_WCHAR_T ctype::__wmask_type diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index e31ae1751cc5..0f7cdd3a3ff5 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -1,6 +1,7 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1510,7 +1511,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) class ctype_byname : public ctype<_CharT> { public: - typedef _CharT char_type; + typedef typename ctype<_CharT>::mask mask; explicit ctype_byname(const char* __s, size_t __refs = 0); @@ -1522,10 +1523,30 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /// 22.2.1.4 Class ctype_byname specializations. template<> - ctype_byname::ctype_byname(const char*, size_t refs); + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname(); + }; + +#ifdef _GLIBCXX_USE_WCHAR_T template<> - ctype_byname::ctype_byname(const char*, size_t refs); + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname(); + }; +#endif _GLIBCXX_END_NAMESPACE diff --git a/libstdc++-v3/include/bits/stl_numeric.h b/libstdc++-v3/include/bits/stl_numeric.h index 82bee216d102..2c44b180840b 100644 --- a/libstdc++-v3/include/bits/stl_numeric.h +++ b/libstdc++-v3/include/bits/stl_numeric.h @@ -1,6 +1,7 @@ // Numeric functions implementation -*- C++ -*- -// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -61,6 +62,7 @@ #ifndef _STL_NUMERIC_H #define _STL_NUMERIC_H 1 +#include #include _GLIBCXX_BEGIN_NAMESPACE(std) diff --git a/libstdc++-v3/include/ext/functional b/libstdc++-v3/include/ext/functional index f159e11d6399..bc4ea5beb9ed 100644 --- a/libstdc++-v3/include/ext/functional +++ b/libstdc++-v3/include/ext/functional @@ -1,6 +1,7 @@ // Functional extensions -*- C++ -*- -// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -64,6 +65,7 @@ #pragma GCC system_header #include +#include _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index 860e775cc6b4..ec098175012f 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -52,14 +52,12 @@ #include // For size_t #include // For memset -#include // For numeric_limits #include #include // For invalid_argument, out_of_range, // overflow_error -#include // For ostream (operator<<) -#include // For istream (operator>>) +#include -#define _GLIBCXX_BITSET_BITS_PER_WORD numeric_limits::digits +#define _GLIBCXX_BITSET_BITS_PER_WORD (__CHAR_BIT__ * sizeof(unsigned long)) #define _GLIBCXX_BITSET_WORDS(__n) \ ((__n) < 1 ? 0 : ((__n) + _GLIBCXX_BITSET_BITS_PER_WORD - 1) \ / _GLIBCXX_BITSET_BITS_PER_WORD) diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index feadaa2252ad..18413142161f 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -51,7 +52,6 @@ #pragma GCC system_header #include -#include #include #endif /* _GLIBCXX_FUNCTIONAL */ diff --git a/libstdc++-v3/include/std/iomanip b/libstdc++-v3/include/std/iomanip index 13b21d579bd9..a1bb4149304d 100644 --- a/libstdc++-v3/include/std/iomanip +++ b/libstdc++-v3/include/std/iomanip @@ -1,6 +1,7 @@ // Standard stream manipulators -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +// 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -42,8 +43,7 @@ #pragma GCC system_header #include -#include -#include +#include _GLIBCXX_BEGIN_NAMESPACE(std) @@ -68,16 +68,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } template - inline basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f) + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) { __is.setf(ios_base::fmtflags(0), __f._M_mask); return __is; } template - inline basic_ostream<_CharT,_Traits>& - operator<<(basic_ostream<_CharT,_Traits>& __os, _Resetiosflags __f) + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f) { __os.setf(ios_base::fmtflags(0), __f._M_mask); return __os; @@ -102,15 +102,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } template - inline basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f) + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) { __is.setf(__f._M_mask); return __is; } template - inline basic_ostream<_CharT,_Traits>& + inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT,_Traits>& __os, _Setiosflags __f) { __os.setf(__f._M_mask); @@ -137,19 +137,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } template - inline basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setbase __f) + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) { __is.setf(__f._M_base == 8 ? ios_base::oct : - __f._M_base == 10 ? ios_base::dec : - __f._M_base == 16 ? ios_base::hex : - ios_base::fmtflags(0), ios_base::basefield); + __f._M_base == 10 ? ios_base::dec : + __f._M_base == 16 ? ios_base::hex : + ios_base::fmtflags(0), ios_base::basefield); return __is; } template - inline basic_ostream<_CharT,_Traits>& - operator<<(basic_ostream<_CharT,_Traits>& __os, _Setbase __f) + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f) { __os.setf(__f._M_base == 8 ? ios_base::oct : __f._M_base == 10 ? ios_base::dec : @@ -179,16 +179,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } template - inline basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f) + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) { __is.fill(__f._M_c); return __is; } template - inline basic_ostream<_CharT,_Traits>& - operator<<(basic_ostream<_CharT,_Traits>& __os, _Setfill<_CharT> __f) + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f) { __os.fill(__f._M_c); return __os; @@ -213,16 +213,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } template - inline basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f) + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) { __is.precision(__f._M_n); return __is; } template - inline basic_ostream<_CharT,_Traits>& - operator<<(basic_ostream<_CharT,_Traits>& __os, _Setprecision __f) + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f) { __os.precision(__f._M_n); return __os; @@ -247,16 +247,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } template - inline basic_istream<_CharT,_Traits>& - operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f) + inline basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) { __is.width(__f._M_n); return __is; } template - inline basic_ostream<_CharT,_Traits>& - operator<<(basic_ostream<_CharT,_Traits>& __os, _Setw __f) + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f) { __os.width(__f._M_n); return __os; diff --git a/libstdc++-v3/include/std/list b/libstdc++-v3/include/std/list index b46f65417ec6..0a1ce1376151 100644 --- a/libstdc++-v3/include/std/list +++ b/libstdc++-v3/include/std/list @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -66,7 +67,6 @@ #include #include #include -#include #include #ifndef _GLIBCXX_EXPORT_TEMPLATE diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric index 03f82dd6ab0c..55ab7a8e1ee8 100644 --- a/libstdc++-v3/include/std/numeric +++ b/libstdc++-v3/include/std/numeric @@ -64,8 +64,7 @@ #include #include -#include -#include +#include #include #endif /* _GLIBCXX_NUMERIC */ diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index 50528bfa7fd2..6b9d63f03ce5 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -1,6 +1,7 @@ // The template and inlines for the -*- C++ -*- valarray class. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -43,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/libstdc++-v3/src/ctype.cc b/libstdc++-v3/src/ctype.cc index 634c135b2f9b..71bf1e1116a0 100644 --- a/libstdc++-v3/src/ctype.cc +++ b/libstdc++-v3/src/ctype.cc @@ -1,4 +1,5 @@ -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, +// 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -98,17 +99,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ctype::~ctype() { _S_destroy_c_locale(_M_c_locale_ctype); } - template<> - ctype_byname::ctype_byname(const char* __s, size_t __refs) - : ctype(__refs) - { - if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) - { - this->_S_destroy_c_locale(this->_M_c_locale_ctype); - this->_S_create_c_locale(this->_M_c_locale_ctype, __s); - this->_M_initialize_ctype(); - } - } + ctype_byname::ctype_byname(const char* __s, size_t __refs) + : ctype(__refs) + { + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_ctype); + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); + this->_M_initialize_ctype(); + } + } + + ctype_byname::~ctype_byname() + { } + #endif _GLIBCXX_END_NAMESPACE diff --git a/libstdc++-v3/src/iostream-inst.cc b/libstdc++-v3/src/iostream-inst.cc index 7e1df3d605ed..5eef130a429c 100644 --- a/libstdc++-v3/src/iostream-inst.cc +++ b/libstdc++-v3/src/iostream-inst.cc @@ -1,6 +1,7 @@ // Explicit instantiation file. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,6 +34,7 @@ // #include +#include _GLIBCXX_BEGIN_NAMESPACE(std) diff --git a/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc b/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc index a26eab1a70ff..47a5653a06d0 100644 --- a/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc +++ b/libstdc++-v3/testsuite/22_locale/headers/locale/synopsis.cc @@ -1,5 +1,4 @@ -// { dg-do compile { xfail *-*-* } } -// { dg-excess-errors "" } +// { dg-do compile } // Copyright (C) 2007 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.cc b/libstdc++-v3/testsuite/util/testsuite_hooks.cc index b649e9ba7d7e..bb63f68cd066 100644 --- a/libstdc++-v3/testsuite/util/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/util/testsuite_hooks.cc @@ -2,7 +2,8 @@ // Utility subroutines for the C++ library testsuite. // -// Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 +// 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 @@ -314,11 +315,11 @@ namespace __gnu_test } // For use in 22_locale/time_get and time_put. - tm + std::tm test_tm(int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst) { - static tm tmp; + static std::tm tmp; tmp.tm_sec = sec; tmp.tm_min = min; tmp.tm_hour = hour; diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.h b/libstdc++-v3/testsuite/util/testsuite_hooks.h index b6c675b12e76..764c09ece31d 100644 --- a/libstdc++-v3/testsuite/util/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/util/testsuite_hooks.h @@ -1,7 +1,7 @@ // -*- C++ -*- // Utility subroutines for the C++ library testsuite. // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -59,7 +59,8 @@ #include #include #include -#include +#include + #ifdef _GLIBCXX_HAVE_SYS_STAT_H #include #endif @@ -387,8 +388,8 @@ namespace __gnu_test }; // For use in 22_locale/time_get and time_put. - tm test_tm(int sec, int min, int hour, int mday, int mon, - int year, int wday, int yday, int isdst); + std::tm test_tm(int sec, int min, int hour, int mday, int mon, + int year, int wday, int yday, int isdst); } // namespace __gnu_test