This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] libstdc++/33771 and 33773
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Oct 2007 11:37:29 +0200
- Subject: [v3] libstdc++/33771 and 33773
Hi,
sanity checked on x86_64-linux, committed to mainline.
Paolo.
//////////////
2007-10-15 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/33771
PR libstdc++/33773
* testsuite/21_strings/headers/cwchar/macros.cc: Guard test with
_GLIBCXX_HAVE_WCHAR_H.
* testsuite/21_strings/headers/cwctype/macros.cc: Likewise with
_GLIBCXX_HAVE_WCTYPE_H.
* testsuite/17_intro/headers/c++200x/all.cc: Guard inclusions
of <wchar.h> and <wctype.h>.
* testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc:
Likewise.
* testsuite/17_intro/headers/c++1998/all.cc: Likewise.
* testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc:
Likewise.
Index: testsuite/21_strings/headers/cwchar/macros.cc
===================================================================
--- testsuite/21_strings/headers/cwchar/macros.cc (revision 129312)
+++ testsuite/21_strings/headers/cwchar/macros.cc (working copy)
@@ -20,6 +20,8 @@
#include <cwchar>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
+
namespace gnu
{
#ifndef NULL
@@ -38,3 +40,5 @@
#error "WEOF_must_be_a_macro"
#endif
}
+
+#endif
Index: testsuite/21_strings/headers/cwctype/macros.cc
===================================================================
--- testsuite/21_strings/headers/cwctype/macros.cc (revision 129312)
+++ testsuite/21_strings/headers/cwctype/macros.cc (working copy)
@@ -20,9 +20,13 @@
#include <cwctype>
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
+
namespace gnu
{
#ifndef WEOF
#error "WEOF_must_be_a_macro"
#endif
}
+
+#endif
Index: testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc
===================================================================
--- testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc (revision 129312)
+++ testsuite/17_intro/headers/c++200x/all_multiple_inclusion.cc (working copy)
@@ -82,8 +82,12 @@
#include <tgmath.h>
#endif
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
@@ -188,8 +192,12 @@
#include <tgmath.h>
#endif
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
Index: testsuite/17_intro/headers/c++200x/all.cc
===================================================================
--- testsuite/17_intro/headers/c++200x/all.cc (revision 129312)
+++ testsuite/17_intro/headers/c++200x/all.cc (working copy)
@@ -82,8 +82,12 @@
#include <tgmath.h>
#endif
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
Index: testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc
===================================================================
--- testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc (revision 129312)
+++ testsuite/17_intro/headers/c++1998/all_multiple_inclusion.cc (working copy)
@@ -61,8 +61,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
@@ -136,8 +140,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>
Index: testsuite/17_intro/headers/c++1998/all.cc
===================================================================
--- testsuite/17_intro/headers/c++1998/all.cc (revision 129312)
+++ testsuite/17_intro/headers/c++1998/all.cc (working copy)
@@ -61,8 +61,12 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h>
+#endif
+#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h>
+#endif
// "C++" headers
#include <algorithm>