Re: O_NONBLOCK under Windows (was: git.git as of tonight)
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Nov 4, 2015, 19:59 UTC
- Message-ID
- <563A63BA.9020407@web.de>
- In-Reply-To
- <CAGZ79kZM-Q2oxVkMO9=v=tAdJkpWWOTVkaSMRDKZSZia2MY5Ng@mail.gmail.com>
On 11/04/2015 12:00 AM, Stefan Beller wrote:
> On Tue, Nov 3, 2015 at 1:03 PM, Johannes Sixt <j6t@kdbg.org> 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
Show 15 quoted lines
>> #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");
>> }
>>
>>
>>
>>
>>