Subject: Re: O_NONBLOCK under Windows (was: git.git as of tonight)

From: Torsten Bögershausen <[email-masked]>
Date: Wed, 4 Nov 2015 20:59:54 +0100

On 11/04/2015 12:00 AM, Stefan Beller wrote:
> On Tue, Nov 3, 2015 at 1:03 PM, Johannes Sixt <[email-masked]> wrote:
>
The #ifdef assumes that Windows never will have O_NONBLOCK/F_GETFL)

Does the following make more sense ?
#if defined (O_NONBLOCK) && defined (F_GETFL)

Or may be:
#ifndef NO_O_NONBLOCK
>> #ifndef GIT_WINDOWS_NATIVE
>>         int flags = fcntl(fd, F_GETFL);
>>         if (flags < 0)
>>                 warning("Could not get file status flags, "
>>                         "output will be degraded");
>>         else if (fcntl(fd, F_SETFL, flags | O_NONBLOCK))
>> #endif
>>                 warning("Could not set file status flags, "
>>                         "output will be degraded");
>> }
>>
>>
>>
>>   
>>