Jim Meyering <jim <at> meyering.net> writes:

> > euidaccess.c is also broken; it refers to AT_EACCESS without using 
<fcntl.h>.
> >
> > +   euidaccess: fix compilation error
> > +   * lib/euidaccess.c (includes): Add <fcntl.h>, for AT_EACCESS.
> 
> For what system?

Cygwin 1.7 has faccessat but (currently) lacks euidaccess.  And since the 
former is POSIX while the latter is a GNU extension, it is conceivable that 
other systems might implement *at support without extensions.

> Regardless, this looks like a fine change.
> 
> The alternative would be to remove that #if HAVE_FACCESSAT block:
> 
>     int
>     euidaccess (const char *file, int mode)
>     {
>     #if HAVE_FACCESSAT
>       return faccessat (AT_FDCWD, file, mode, AT_EACCESS);
>     #elif defined EFF_ONLY_OK

Nope; that would be reverting the intent of commit bc366ae.

-- 
Eric Blake





Reply via email to