🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
1 messages
1 total messages Started by Martin Junius Tue, 15 Dec 1992 16:23
Bug in libg++ 2.3
#391
Author: 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)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads