🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #391

Bug in libg++ 2.3

#391
From: Martin Junius
Date: Tue, 15 Dec 1992 16:23
29 lines
1324 bytes
One bug in the iostream part of libg++ I posted already for 
libg++ 2.2 is still there in version 2.3:

Using a iostream (or a derived) class for bidirectional I/O 
doesn't work properly because the flag _S_CURRENTLY_PUTTING isn't 
properly reset during a filebuf read after a write operation.

Here's the fix: (File libg++-2.3/libg++/iostream/filebuf.C)

*** filebuf.C-ORIG	Mon Nov 23 23:07:11 1992
--- filebuf.C	Mon Dec 14 13:05:09 1992
***************
*** 255,260 ****
--- 255,262 ----
  	if (do_flush()) return EOF;
  #endif
  
+     switch_to_get_mode();
+ 
      _G_ssize_t count = sys_read(base(), ebuf() - base());
      if (count <= 0) {
  	if (count == 0)

Martin
-- 
 _____ _____
|     |___  |   Martin Junius           FIDO:      2:242/6.1
| | | |   | |   Communication Networks  Internet:  mj@dfv.rwth-aachen.de
|_|_|_|@work|   Aachen U of Technology  Phone:     ++49-241-8790220 (voice)
Technical Details
Message-ID: <1992Dec15.162322.5713@dfv.rwth-aachen.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dfv.rwth-aachen.DE!mj

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dfv.rwth-aachen.DE!mj
From: mj@dfv.rwth-aachen.DE (Martin Junius)
Subject: Bug in libg++ 2.3
Message-ID: <1992Dec15.162322.5713@dfv.rwth-aachen.de>
Sender: gnulists@ai.mit.edu
Organization: Communication Networks
Distribution: gnu
Date: Tue, 15 Dec 1992 16:23:22 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 30