This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Don't include <fstream> in include/ext/stdio_sync_filebuf.h


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]