This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Don't include <fstream> in include/ext/stdio_sync_filebuf.h
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sat, 04 Oct 2003 12:50:20 +0200
- Subject: Re: [Patch] Don't include <fstream> in include/ext/stdio_sync_filebuf.h
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F55DC@mail.ru.is>
Pétur Runólfsson wrote:
Yes, only <cstdio> (for FILE, getc, etc.), <cwchar> (for getwc etc.)
and <streambuf> should be needed.
Agreed.
I'm committing the below (already fully tested), in preparation for 12077...
Paolo.
//////////
2003-10-04 Paolo Carlini <pcarlini@unitus.it>
Petur Runolfsson <peturr02@ru.is>
* include/ext/stdio_sync_filebuf.h: Don't include the whole
<fstream>, only <streambuf> and <cstdio>.
diff -urN libstdc++-v3-orig/include/ext/stdio_sync_filebuf.h libstdc++-v3/include/ext/stdio_sync_filebuf.h
--- libstdc++-v3-orig/include/ext/stdio_sync_filebuf.h 2003-10-03 12:30:03.000000000 +0200
+++ libstdc++-v3/include/ext/stdio_sync_filebuf.h 2003-10-04 12:28:37.000000000 +0200
@@ -36,7 +36,7 @@
#pragma GCC system_header
-#include <fstream>
+#include <streambuf>
#include <unistd.h>
#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
@@ -48,6 +48,8 @@
# endif
#endif
+#include <cstdio>
+
#ifdef _GLIBCXX_USE_WCHAR_T
#include <cwchar>
#endif