Hi,

io.h provided by mingw-w64 defines *_OK macros for use with _access/access 
function. However, X_OK has value of 1 and documentation for _access does not 
list this value as supported. 
(https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess)

Every call to

```
_access(filename, X_OK)
```

will always return -1 and set errno to EINVAL.

Windows does not use execution permissions for files. Maybe it would make sense 
to define X_OK to the same value as R_OK?

- Kirill Makurin

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

Reply via email to