Hi Eric,
Thank you for digging out the previous threads on this topic.
Eric Blake wrote:
> Wy back when, coreutils used to use SET_BINARY. We changed that to
> use freopen(NULL) because of the POSIX wording that allowed NULL to
> change mode, because cygwin honored the mode change, and becau
[adding coreutils]
On 05/07/2012 12:11 PM, Bruno Haible wrote:
> Eric Blake wrote:
>> POSIX says that such a call is implementation-defined, so technically,
>> mingw DOES implement the POSIX semantics (by defining that it is
>> unsupported).
>
> Yes. So, code in freopen.c that would try to suppor
Eric Blake wrote:
> POSIX says that such a call is implementation-defined, so technically,
> mingw DOES implement the POSIX semantics (by defining that it is
> unsupported).
Yes. So, code in freopen.c that would try to support a NULL argument
in all cases
- would be a gnulib extension,
- would
> Date: Mon, 07 May 2012 06:44:00 -0600
> From: Eric Blake
> CC: bug-gnulib@gnu.org, bug-gnu-ut...@gnu.org
>
> > FILE *
> > rpl_freopen (const char *filename, const char *mode, FILE *stream)
> > {
> > #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
> > - if (filename != NUL
On 05/05/2012 05:18 AM, Eli Zaretskii wrote:
> Diffutils 3.2 call xfreopen with its first argument NULL, expecting
> the underlying reopen to handle this. However, the MS runtime does
> not implement the Posix semantics of such a call,
POSIX says that such a call is implementation-defined, so tec
> From: Bruno Haible
> Cc: bug-gnu-ut...@gnu.org
> Date: Sat, 05 May 2012 16:26:55 +0200
>
> > Diffutils 3.2 call xfreopen with its first argument NULL, expecting
> > the underlying reopen to handle this. However, the MS runtime does
> > not implement the Posix semantics of such a call, and so,
Hi Eli,
> Diffutils 3.2 call xfreopen with its first argument NULL, expecting
> the underlying reopen to handle this. However, the MS runtime does
> not implement the Posix semantics of such a call, and so, for example,
> MinGW-compiled cmp fails when invoked to compare its stdin with a
> file:
>
Diffutils 3.2 call xfreopen with its first argument NULL, expecting
the underlying reopen to handle this. However, the MS runtime does
not implement the Posix semantics of such a call, and so, for example,
MinGW-compiled cmp fails when invoked to compare its stdin with a
file:
D:\gnu\diffutils-