[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: popen binary mode patch

From: Bruce Korb
Subject: Re: popen binary mode patch
Date: Mon, 22 Feb 2010 14:50:34 -0800
User-agent: Thunderbird (X11/20090817)

Eric Blake wrote:
> POSIX requires fopen(,"rb") to be identical to fopen(,"r"); while C99
> requires both to exist but allows them to have different behavior (as a
> concession to windows).  However, there is no standard for popen(,"rb").
>>> rather than changing gnulib's popen module.
>> It's your call.  Personally, I favor having gnulib's popen clients
>> be shown a consistent interface across all platforms.
> The question, though, is whether cygwin's extension is useful enough to
> push on all platforms.  Gnulib tends to favor glibc extensions rather than
> cygwin extensions.  In other words, it is hard to justify replacing a
> glibc function that is perfectly standards-compliant.

My philosophy is slightly different.  I prefer to go with whatever it is
that makes life easier for programming to multiple platforms.  Cygwin
*requires* the "rb" to really work correctly.  So, folks have to put that
into their code.  It is true that portable programs have to provide
lots of do-this-here and do-that-there stuff already and it is also true
that this particular this 'n that is pretty trivial.  Still and all, it
is just one more thing that must be dealt with and I do not like any more
"one more things" than is absolutely necessary.  :)

Cheers - Bruce

reply via email to

[Prev in Thread] Current Thread [Next in Thread]