diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1a2d4105fa0..0f24ab4f6e7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2010-06-07 Paolo Carlini + + PR libstdc++/44417 + * include/c_std/cwctype: Provide a workaround for bug glibc + BZ 9694 affecting glibc 2.9 and older. + * include/c_global/cwctype: Likewise. + * testsuite/util/testsuite_abi.h: Remove temporary workaround. + * testsuite/util/testsuite_allocator.h: Use everywhere std::size_t + and std::ptrdiff_t, don't include . + + * testsuite/27_io/basic_ostream/inserters_other/wchar_t/ + error_code.cc: Minor tweak, prefer to . + 2010-06-07 Paolo Carlini * include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp: diff --git a/libstdc++-v3/include/c_global/cwctype b/libstdc++-v3/include/c_global/cwctype index be649a28950..2ac1155aa9b 100644 --- a/libstdc++-v3/include/c_global/cwctype +++ b/libstdc++-v3/include/c_global/cwctype @@ -43,9 +43,15 @@ #include #if _GLIBCXX_HAVE_WCTYPE_H -#include + +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 10 +// Work around glibc BZ 9694 +#include #endif +#include +#endif // _GLIBCXX_HAVE_WCTYPE_H + #ifndef _GLIBCXX_CWCTYPE #define _GLIBCXX_CWCTYPE 1 diff --git a/libstdc++-v3/include/c_std/cwctype b/libstdc++-v3/include/c_std/cwctype index 4af425067b9..d6750390a0a 100644 --- a/libstdc++-v3/include/c_std/cwctype +++ b/libstdc++-v3/include/c_std/cwctype @@ -45,9 +45,15 @@ #include #if _GLIBCXX_HAVE_WCTYPE_H -#include + +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 10 +// Work around glibc BZ 9694 +#include #endif +#include +#endif // _GLIBCXX_HAVE_WCTYPE_H + // Get rid of those macros defined in in lieu of real functions. #undef iswalnum #undef iswalpha diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc index 5df2990fc5a..16f9108a332 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc @@ -1,7 +1,7 @@ // { dg-options "-std=gnu++0x" } // { dg-require-swprintf "" } -// Copyright (C) 2007, 2008, 2009 Free Software Foundation +// Copyright (C) 2007, 2008, 2009, 2010 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 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include // Effects: os << ec.category().name() << ':' << ec.value(); diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h index cad40b6eb85..c9fe0a4d11c 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.h +++ b/libstdc++-v3/testsuite/util/testsuite_abi.h @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Free Software Foundation, Inc. // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as @@ -16,11 +17,8 @@ // along with this library; see the file COPYING3. If not see // . - // Benjamin Kosnik -// Include stddef now to work around glibc BZ 9694 -#include #include #include #include diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index b7fce48b5bc..cb481b2a7f9 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -27,7 +27,6 @@ #ifndef _GLIBCXX_TESTSUITE_ALLOCATOR_H #define _GLIBCXX_TESTSUITE_ALLOCATOR_H -#include #include #include #include @@ -241,8 +240,8 @@ namespace __gnu_test : private uneq_allocator_base { public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; typedef Tp* pointer; typedef const Tp* const_pointer; typedef Tp& reference;