[uClibc-cvs] svn commit: trunk/uClibc++/include

gkajmowi at uclibc.org gkajmowi at uclibc.org
Fri Jul 8 16:52:59 UTC 2005


Author: gkajmowi
Date: 2005-07-08 10:52:58 -0600 (Fri, 08 Jul 2005)
New Revision: 10755

Log:
ostream no longer calles flush() on destructor (now standard-complient).
fstream now calls flush() on destruction
fstream can no longer close stdin, stdout, stderr

Modified:
   trunk/uClibc++/include/fstream
   trunk/uClibc++/include/ostream


Changeset:
Modified: trunk/uClibc++/include/fstream
===================================================================
--- trunk/uClibc++/include/fstream	2005-07-08 05:26:20 UTC (rev 10754)
+++ trunk/uClibc++/include/fstream	2005-07-08 16:52:58 UTC (rev 10755)
@@ -78,6 +78,7 @@
 
 
 		_UCXXEXPORT virtual ~basic_filebuf(){
+			sync();
 			close();
 			delete [] pbuffer;
 			delete [] gbuffer;
@@ -152,8 +153,9 @@
 			return this;
 		}
 		_UCXXEXPORT basic_filebuf<charT,traits>* close(){
-			if(fp != 0){
+			if(fp != 0 && fp != stdin && fp != stdout && fp !=stderr ){
 				overflow();
+				sync();
 				int retval = fclose(fp);
 				if(retval !=0){		//Error of some sort
 					return 0;

Modified: trunk/uClibc++/include/ostream
===================================================================
--- trunk/uClibc++/include/ostream	2005-07-08 05:26:20 UTC (rev 10754)
+++ trunk/uClibc++/include/ostream	2005-07-08 16:52:58 UTC (rev 10755)
@@ -127,7 +127,6 @@
 	//Implementations of template functions.  To allow for partial specialization
 
 	template <class charT, class traits> _UCXXEXPORT basic_ostream<charT,traits>::~basic_ostream(){
-		flush();
 	}
 	
 	template <class charT, class traits> _UCXXEXPORT basic_ostream<charT,traits>& basic_ostream<charT, traits>::operator<<(bool n){




More information about the uClibc-cvs mailing list