RE: bug in freopen

2005-07-19 Thread Dave Korn
Original Message >From: Jeff Johnston >Sent: 18 July 2005 20:12 >> >> I could take a look at this over the weekend if nobody gets to it >> first :) >> > > A little late, but please do. I'm a little busy at the moment. My weekend was busier than expected, but I've still got this

Re: bug in freopen

2005-07-18 Thread Jeff Johnston
Dave Korn wrote: Original Message From: Eric Blake Sent: 15 July 2005 00:14 POSIX requires that freopen(NULL, mode, f) reopen f in the new mode, and allows implementations the option of not even closing f in the first place. But in cygwin, it is failing with EFAULT, which is not ev

Re: bug in freopen

2005-07-15 Thread Christopher Faylor
On Thu, Jul 14, 2005 at 09:49:40PM -0600, Eric Blake wrote: >According to Christopher Faylor on 7/14/2005 5:32 PM: >>>#include >>>#include >>>int main(void) >>>{ >>> FILE* f = freopen (NULL, "rb", stdin); /* Ensure that stdin is binary */ >>> printf ("file is %s, errno %d:%s\n", f ? "good" : "n

RE: bug in freopen

2005-07-15 Thread Dave Korn
Original Message >From: Eric Blake >Sent: 15 July 2005 00:14 > POSIX requires that freopen(NULL, mode, f) reopen f in the new > mode, and allows implementations the option of not even closing > f in the first place. But in cygwin, it is failing with EFAULT, which is > not even one of the

RE: bug in freopen

2005-07-15 Thread Schwarz, Konrad
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Eric Blake > Sent: Friday, July 15, 2005 1:14 AM > To: cygwin@cygwin.com; [EMAIL PROTECTED] > Subject: bug in freopen > > POSIX requires that freopen(NULL, mode, f) reopen f in the > new mode, and al

Re: bug in freopen

2005-07-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Christopher Faylor on 7/14/2005 5:32 PM: >>#include >>#include >>int main(void) >>{ >> FILE* f = freopen (NULL, "rb", stdin); /* Ensure that stdin is binary */ >> printf ("file is %s, errno %d:%s\n", f ? "good" : "null", errno, >>

Re: bug in freopen

2005-07-14 Thread Christopher Faylor
On Thu, Jul 14, 2005 at 11:13:35PM +, Eric Blake wrote: >POSIX requires that freopen(NULL, mode, f) reopen f in the new >mode, and allows implementations the option of not even closing >f in the first place. But in cygwin, it is failing with EFAULT, which is >not even one of the errors allowed