delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/03/18:03:37

Date: Fri, 3 May 1996 16:52:30 -0500 (CDT)
From: nate <nate AT mill2 DOT MillComm DOT COM>
Subject: Re: gxx bug? binary files
To: Wang TianXing <gztxwang AT public1 DOT guangzhou DOT gd DOT cn>
cc: djgpp AT delorie DOT com
In-Reply-To: <31899BE4.7159@public1.guangzhou.gd.cn>
Message-ID: <Pine.3.89.9605031602.C18412-0100000@mill2.MillComm.COM>
MIME-Version: 1.0

> Sorry, I overlooked something.  I think the only workaround might be to change
> the source code in \djgpp\gnu\libgplus.271\libio\filebuf.cc:
> 
>   if ((mode & (int)ios::trunc) ||
>       ((!(mode & (int)ios::app)) && (mode & (int)ios::out)))
>     posix_mode |= O_TRUNC;
> 
> to:
> 
>   if ((mode & (int)ios::trunc) ||
>       ((!(mode & int(ios::app|ios::in))) && (mode & (int)ios::out)))
>     posix_mode |= O_TRUNC;
> 
> and rebuild the libiostr.a.  Warning: this is also an untested one. :)


I've done this, and rebuilt libiostr.a - what to do now?  I tried to test 
it by putting libiostr in the DJGPP\LIB directory (where the original 
was, just overwriting it) and then i compiled the example program, same 
(wrong) output as before.  So, to make sure that it was reading the lib 
files, I deleted them entirely (made a backup first) and tried to compile 
again (expecting an error message) and it compiled without any problems, 
still giving the wrong output!  what's going on!?  Where does it read the 
lib files from?  I would imagine  DJGPP\LIB  ??


strange.


-nate <nate AT millcomm DOT com> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019