From c8061de73f1ec2db31588f1c20693d570d576a20 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 8 Jun 2010 01:46:10 +0000 Subject: re PR libstdc++/44417 (make check-target-libstdc++-v3 fails due to undefined ptrdiff_t) 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 . From-SVN: r160417 --- libstdc++-v3/include/c_global/cwctype | 8 +++++++- libstdc++-v3/include/c_std/cwctype | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'libstdc++-v3/include') 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 -- cgit v1.2.1