This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fflush(NULL) clobbers input streams


On Jul 18 22:16, Ken Brown wrote:
> On 7/18/2017 6:41 PM, Ken Brown wrote:
> > On 7/18/2017 3:21 PM, Achim Gratz wrote:
> > > Corinna Vinschen writes:
> > > > Oh, and a plain C testcase, of course...
> > > 
> > > Call that fflush.c:
> > > [...]
> > > Then run:
> > > 
> > > gcc fflush.c -o fflush
> > > cat fflush.c | ./fflush 2>/dev/null > fflush.out
> > > diff fflush.c fflush.out
> > > 
> > > If things are working, fflush.c and fflush.out should be identical.
> > > Currently only the first line makes it into fflush.out on Cygwin.
> > 
> > I've checked that the 2017-03-08 snapshot is good and the 2017-03-10
> > snapshot is bad.  I'll bisect further when I get a chance
> 
> Done:
> 
> 44b1746a41921533d27aca414a9188314cb725b6 is the first bad commit
> commit 44b1746a41921533d27aca414a9188314cb725b6
> Author: Corinna Vinschen <corinna@vinschen.de>
> Date:   Fri Mar 10 20:21:09 2017 +0100
> 
>     errno: Stop using _impure_ptr->_errno completely
> 
>     We use errno AKA _REENT->_errno since the last century and only set
>     _impure_ptr->_errno for backward compat.  Stop that.  Also, remove
>     the last check for _impure_ptr->_errno in Cygwin code.
> 
> Ken

Achim, thanks for the testcase.  Ken, thanks for bisecting.  You're
my hero!

I reverted the patch and created new developer snapshots.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]