libstdc++/98

Brad Garcia bgarcia@laurelnetworks.com
Thu Nov 2 11:11:00 GMT 2000


> the following patch to your version of bits/istream.tcc _should_ fix
> the problem you desribe.

This was the fix for PR 92.
It does NOT fix the problem described in PR 98.
I've tried it.

> Index: istream.tcc
> ===================================================================
> RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/istream.tcc,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -c -p -3 -r1.1 -r1.2
> *** istream.tcc	2000/10/05 11:27:01	1.1
> --- istream.tcc	2000/10/06 07:12:32	1.2
> *************** namespace std {
> *** 588,598 ****
>   	    bool __testdelim = __c == __idelim;
>   	    bool __testeof =  __c == __eof;
>   	    bool __testput = true;
> - 	    streamsize __n = __this_sb->in_avail();
>   
> ! 	    while (_M_gcount <= __n && !__testeof && !__testdelim 
>   		   && (__testput = __sb.sputc(traits_type::to_char_type(__c)) 
> ! 		                   != __eof))
>   	      {
>   		++_M_gcount;
>   		__c = __this_sb->sbumpc();
> --- 588,597 ----
>   	    bool __testdelim = __c == __idelim;
>   	    bool __testeof =  __c == __eof;
>   	    bool __testput = true;
>   
> ! 	    while (!__testeof && !__testdelim 
>   		   && (__testput = __sb.sputc(traits_type::to_char_type(__c)) 
> ! 		       != __eof))
>   	      {
>   		++_M_gcount;
>   		__c = __this_sb->sbumpc();
> 

Brad Garcia



More information about the Libstdc++ mailing list