This is the mail archive of the libstdc++@sources.redhat.com 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]

Re: libstdc++/98


On 02 Nov 2000 at 11:37 (-0000), Brad Garcia wrote:
| 
|  I was reproducing it with the last snapshot (2.8.1, as stated in the pr).
|  
|  If you have any idea what change might have fixed it, let me know.
|  Otherwise, it sounds like you can close out this PR.

Brad,

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

cheers.
  brent

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();

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