]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/44417 (make check-target-libstdc++-v3 fails due to undefined ptrdiff_t)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 8 Jun 2010 01:46:10 +0000 (01:46 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 8 Jun 2010 01:46:10 +0000 (01:46 +0000)
2010-06-07  Paolo Carlini  <paolo.carlini@oracle.com>

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 <cstddef>.

* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
error_code.cc: Minor tweak, prefer <cwchar> to <wchar.h>.

From-SVN: r160417

libstdc++-v3/ChangeLog
libstdc++-v3/include/c_global/cwctype
libstdc++-v3/include/c_std/cwctype
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/error_code.cc
libstdc++-v3/testsuite/util/testsuite_abi.h
libstdc++-v3/testsuite/util/testsuite_allocator.h

index 1a2d4105fa071cf41fc7b28ef1997fd9432732be..0f24ab4f6e7cd7f87d6c2e4ce2d2428acfbe3e2f 100644 (file)
@@ -1,3 +1,16 @@
+2010-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       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 <cstddef>.
+
+       * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
+       error_code.cc: Minor tweak, prefer <cwchar> to <wchar.h>.
+
 2010-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp:
index be649a289503250007280bf3da85afcaf4c87755..2ac1155aa9b31299558b86bfdf21ae6ab40ccc83 100644 (file)
 #include <bits/c++config.h>
 
 #if _GLIBCXX_HAVE_WCTYPE_H
-#include <wctype.h>
+
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
+// Work around glibc BZ 9694
+#include <stddef.h>
 #endif
 
+#include <wctype.h>
+#endif // _GLIBCXX_HAVE_WCTYPE_H
+
 #ifndef _GLIBCXX_CWCTYPE
 #define _GLIBCXX_CWCTYPE 1
 
index 4af425067b96201f65fcf106b6fb0e3a3cd08e1f..d6750390a0a276b4eb7266fc7037e8d63a909fe4 100644 (file)
 #include <bits/c++config.h>
 
 #if _GLIBCXX_HAVE_WCTYPE_H
-#include <wctype.h>
+
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
+// Work around glibc BZ 9694
+#include <stddef.h>
 #endif
 
+#include <wctype.h>
+#endif // _GLIBCXX_HAVE_WCTYPE_H
+
 // Get rid of those macros defined in <wctype.h> in lieu of real functions.
 #undef iswalnum
 #undef iswalpha
index 5df2990fc5a17023c44851e1c9084cf9ac415847..16f9108a33250112bd5bd1259b43e8f6e9182e48 100644 (file)
@@ -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 <sstream>
 #include <system_error>
 #include <algorithm>
-#include <wchar.h>
+#include <cwchar>
 #include <testsuite_hooks.h>
 
 //   Effects: os << ec.category().name() << ':' << ec.value();
index cad40b6eb85de77b7ecae93679519739d08b4645..c9fe0a4d11c7126f0a314f43334846a24439ee0f 100644 (file)
@@ -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
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
 // Benjamin Kosnik  <bkoz@redhat.com>
 
-// Include stddef now to work around glibc BZ 9694
-#include <stddef.h>
 #include <string>
 #include <stdexcept>
 #include <vector>
index b7fce48b5bc12fe1b027a83af9d2f47ca3df0749..cb481b2a7f93c1d02891b6c9747b25a27d310f69 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef _GLIBCXX_TESTSUITE_ALLOCATOR_H
 #define _GLIBCXX_TESTSUITE_ALLOCATOR_H
 
-#include <cstddef>
 #include <tr1/unordered_map>
 #include <cassert>
 #include <bits/move.h>
@@ -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;