Re: [Mingw-w64-public] _access and predefined modes

2021-08-12 Thread LIU Hao

在 2021-08-11 02:44, Vincent Torri 写道:


and X_OK ?




In UCRT it's not valid and makes `access()` fail with `EINVAL`. There is a check for invalid mode 
bits in 'waccess.cpp' from UCRT sources. MSDN is not lying.



--
Best regards,
LIU Hao



OpenPGP_signature
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] _access and predefined modes

2021-08-10 Thread Vincent Torri
On Tue, Aug 10, 2021 at 5:56 PM Guy Helmer  wrote:
>
> > On Aug 10, 2021, at 9:28 AM, Vincent Torri  wrote:
> >
> > Hello
> >
> > according to MSDN (see
> > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess?view=msvc-160)
> > the valid modes of _access are 0, é, 4 and 6.
> >
> > But in io.h, we have :
> >
> > #defineF_OK0/* Check for file existence */
> > #defineX_OK1/* Check for execute permission. */
> > #defineW_OK2/* Check for write permission */
> > #defineR_OK4/* Check for read permission */
>
> Both the webpage and this list are correct. Look closely, e.g. at this line:
> 06 -Read and write
>
> W_OK | R_OK == 06

and X_OK ?


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] _access and predefined modes

2021-08-10 Thread Guy Helmer
> On Aug 10, 2021, at 9:28 AM, Vincent Torri  wrote:
> 
> Hello
> 
> according to MSDN (see
> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess?view=msvc-160)
> the valid modes of _access are 0, é, 4 and 6.
> 
> But in io.h, we have :
> 
> #defineF_OK0/* Check for file existence */
> #defineX_OK1/* Check for execute permission. */
> #defineW_OK2/* Check for write permission */
> #defineR_OK4/* Check for read permission */

Both the webpage and this list are correct. Look closely, e.g. at this line:
06 -Read and write

W_OK | R_OK == 06

Guy
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] _access and predefined modes

2021-08-10 Thread Vincent Torri
Hello

according to MSDN (see
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess?view=msvc-160)
the valid modes of _access are 0, é, 4 and 6.

But in io.h, we have :

#defineF_OK0/* Check for file existence */
#defineX_OK1/* Check for execute permission. */
#defineW_OK2/* Check for write permission */
#defineR_OK4/* Check for read permission */

is it normal ?

Vincent  Torri


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public