From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: binmode handling in fhandler.cc 29 Jan 1999 21:53:01 -0800 Message-ID: <19990130002752.I10431.cygnus.cygwin32.developers@cygnus.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Kazuhiro Fujieda , cygwin32-developers AT cygnus DOT com On Sat, Jan 30, 1999 at 01:27:19PM +0900, Kazuhiro Fujieda wrote: >In the snapshot since 19990122, `binmode' specified by the >CYGWIN variable or the mount flag, has no effect on fopen() >without binary flag "b". This is incompatible with the previous >release. > >This problem is caused by fhandler.cc:311. > >310: int bin; >311: if (flags & (O_BINARY | O_TEXT)) >312: bin = flags & O_TEXT ? 0 : O_BINARY; >313: else if (get_device () == FH_DISK) > >fopen() always set O_BINARY or O_TEXT to the `flags'. I think >this should check only O_BINARY flag, same as the previous >release. I didn't realize that fopen set one or the other but it is behaving incorrectly. I will fix it. -chris