This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Fix libstdc++ tests for targets without iconv
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 6 Jun 2008 12:11:20 +0000 (UTC)
- Subject: Fix libstdc++ tests for targets without iconv
This patch makes four libstdc++ headers tests only include headers
requiring iconv if _GLIBCXX_HAVE_ICONV, as per
<http://gcc.gnu.org/ml/libstdc++/2008-06/msg00009.html>.
(<ext/enc_filebuf.h> include <ext/codecvt_specializations.h>, so
includes of both headers are disabled when iconv is unavailable.) OK
to commit?
2008-06-06 Joseph Myers <joseph@codesourcery.com>
* testsuite/17_intro/headers/all.cc,
testsuite/17_intro/headers/all_c++200x_compatibility.cc,
testsuite/17_intro/headers/all_pedantic_errors.cc,
testsuite/ext/headers.cc: Only include
<ext/codecvt_specializations.h> and <ext/enc_filebuf.h> if
_GLIBCXX_HAVE_ICONV.
Index: testsuite/ext/headers.cc
===================================================================
--- testsuite/ext/headers.cc (revision 136416)
+++ testsuite/ext/headers.cc (working copy)
@@ -28,10 +28,14 @@
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/codecvt_specializations.h>
+#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/enc_filebuf.h>
+#endif
#include <ext/functional>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
Index: testsuite/17_intro/headers/all_pedantic_errors.cc
===================================================================
--- testsuite/17_intro/headers/all_pedantic_errors.cc (revision 136416)
+++ testsuite/17_intro/headers/all_pedantic_errors.cc (working copy)
@@ -113,10 +113,14 @@
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/codecvt_specializations.h>
+#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/enc_filebuf.h>
+#endif
#include <ext/functional>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
Index: testsuite/17_intro/headers/all_c++200x_compatibility.cc
===================================================================
--- testsuite/17_intro/headers/all_c++200x_compatibility.cc (revision 136416)
+++ testsuite/17_intro/headers/all_c++200x_compatibility.cc (working copy)
@@ -113,10 +113,14 @@
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/codecvt_specializations.h>
+#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/enc_filebuf.h>
+#endif
#include <ext/functional>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
Index: testsuite/17_intro/headers/all.cc
===================================================================
--- testsuite/17_intro/headers/all.cc (revision 136416)
+++ testsuite/17_intro/headers/all.cc (working copy)
@@ -112,10 +112,14 @@
#include <ext/array_allocator.h>
#include <ext/atomicity.h>
#include <ext/bitmap_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/codecvt_specializations.h>
+#endif
#include <ext/concurrence.h>
#include <ext/debug_allocator.h>
+#if _GLIBCXX_HAVE_ICONV
#include <ext/enc_filebuf.h>
+#endif
#include <ext/functional>
#include <ext/iterator>
#include <ext/malloc_allocator.h>
--
Joseph S. Myers
joseph@codesourcery.com