bug-gnulib
[Top][All Lists]
Advanced

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

Re: fdopendir closes the file descriptor on MinGW


From: Eric Blake
Subject: Re: fdopendir closes the file descriptor on MinGW
Date: Wed, 18 Mar 2015 17:27:23 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/18/2015 01:33 PM, Paul Eggert wrote:

> It depends on what one means by "work".  POSIX allows dirfd to return -1
> and set errno = ENOTSUP.  If gnulib dirfd does that on MinGW, dirfd's
> callers should do the right thing when that happens.

I think POSIX 2001 allowed that, but with the openat() and friends added
in POSIX 2008, I think that POSIX now prohibits this implementation, and
requires that dirfd work rather than giving up with ENOTSUP.  At any
rate, gnulib should try and strive for returning a non-negative value,
even if POSIX has a loophole that would allow -1.

-- 
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]