Date: Fri, 3 May 1996 16:52:30 -0500 (CDT) From: nate Subject: Re: gxx bug? binary files To: Wang TianXing cc: djgpp AT delorie DOT com In-Reply-To: <31899BE4.7159@public1.guangzhou.gd.cn> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > 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