bug-gnulib
[Top][All Lists]
Advanced

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

Re: new module 'access'


From: Eli Zaretskii
Subject: Re: new module 'access'
Date: Mon, 16 Sep 2019 18:22:14 +0300

> From: Bruno Haible <address@hidden>
> Cc: Paul Smith <address@hidden>
> Date: Sun, 15 Sep 2019 19:11:25 +0200
> 
> +@item
> +This function does not support the @code{X_OK} mode on some platforms:
> +MSVC 14.

This says MSVC, but the code will do the same on MinGW, right?

> +int
> +access (const char *file, int mode)
> +{
> +  if ((mode & X_OK) != 0)
> +    mode = (mode & ~X_OK) | R_OK;
> +  return _access (file, mode);

This implementation is IMO less useful than it could be: it could also
look at the file-name extension and see if it's one of the known
executable extensions.

Thanks.



reply via email to

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