bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [PATCH 0/4] Cross compiling sharutils


From: Eric Blake
Subject: Re: [PATCH 0/4] Cross compiling sharutils
Date: Tue, 19 May 2015 19:57:25 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 05/19/2015 05:23 PM, Bruce Korb wrote:
> 
>> 2) Use a configure check to detect whether the host OS *requires*
>> binary mode
>>    for that particular popen call.  It seems the patch was introduced for
>>    cygwin, unfortunately I don't really have access to a cygwin
>> machine to
>>    check whether that makes a difference and to propose a check here. 
>> In the
>>    bug-gnulib@ thread, Eric proposed using O_BINARY to detect that,
>> perhaps
>>    that's a possibility?

You probably don't even need a configure check.  As in simply:

popen(..., O_BINARY ? "rb" : "r")

That is, the few platforms where O_BINARY is non-zero probably already
support "rb" as a mode for popen (are there any besides Cygwin and mingw?).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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