[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.
- [PATCH] findprog-in: Set errno to indicate why NULL was returned., Paul Smith, 2019/09/14
- Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned., Paul Smith, 2019/09/14
- new module 'access', Bruno Haible, 2019/09/15
- Re: new module 'access',
Eli Zaretskii <=
- Re: new module 'access', Bruno Haible, 2019/09/16
- Re: new module 'access', Eli Zaretskii, 2019/09/17
- Re: new module 'access', Bruno Haible, 2019/09/28
- Re: new module 'access', Eli Zaretskii, 2019/09/28
- Re: new module 'access', Bruno Haible, 2019/09/28
- Re: new module 'access', Eli Zaretskii, 2019/09/28
Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned., Bruno Haible, 2019/09/15