This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Remove a few redundant #includes
- From: Paolo Carlini <pcarlini at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2003 11:06:06 +0100
- Subject: [v3] Remove a few redundant #includes
Hi,
this kind of needed clean up has always the potential of breaking
the bootstrap on non-linux platforms (booted/tested i686-pc-linux-gnu,
booted powerpc-unknown-linux-gnu).
In case something bad happens, please let me know ASAP and I will fix
it immediately.
Paolo.
//////////////
2003-10-29 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc: Remove some unnecessary
includes.
* config/locale/generic/c_locale.cc: Include <cerrno> here.
* config/locale/gnu/c_locale.cc: Likewise.
diff -urN libstdc++-v3-orig/config/locale/generic/c_locale.cc libstdc++-v3/config/locale/generic/c_locale.cc
--- libstdc++-v3-orig/config/locale/generic/c_locale.cc 2003-10-02 18:56:38.000000000 +0200
+++ libstdc++-v3/config/locale/generic/c_locale.cc 2003-10-29 10:39:26.000000000 +0100
@@ -33,6 +33,7 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
+#include <cerrno> // For errno
#include <locale>
#ifdef _GLIBCXX_HAVE_IEEEFP_H
diff -urN libstdc++-v3-orig/config/locale/gnu/c_locale.cc libstdc++-v3/config/locale/gnu/c_locale.cc
--- libstdc++-v3-orig/config/locale/gnu/c_locale.cc 2003-10-02 18:56:38.000000000 +0200
+++ libstdc++-v3/config/locale/gnu/c_locale.cc 2003-10-29 10:39:07.000000000 +0100
@@ -33,6 +33,7 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
+#include <cerrno> // For errno
#include <locale>
#include <stdexcept>
#include <langinfo.h>
diff -urN libstdc++-v3-orig/include/bits/locale_facets.tcc libstdc++-v3/include/bits/locale_facets.tcc
--- libstdc++-v3-orig/include/bits/locale_facets.tcc 2003-10-28 17:57:35.000000000 +0100
+++ libstdc++-v3/include/bits/locale_facets.tcc 2003-10-29 09:59:24.000000000 +0100
@@ -35,11 +35,6 @@
#pragma GCC system_header
-#include <cerrno>
-#include <clocale> // For localeconv
-#include <cstdlib> // For strof, strtold
-#include <cmath> // For ceil
-#include <cctype> // For isspace
#include <limits> // For numeric_limits
#include <typeinfo> // For bad_cast.
#include <bits/streambuf_iterator.h>