Mark Mitchell writes: >In my opinion, this is a GCC bug: there's no such thing as X_OK on >Windows (it's not in the Microsoft headers, or documented by Microsoft >as part of the API), and so GCC shouldn't be using it.
Strictly speaking, access() (or _access()) isn't a documented part of any Windows ABI. It's only documented as part of the C Runtime Library for Visual C++, a different product. This is an important distinction, while MinGW should support Windows APIs as documented by Microsoft, it's not ment to be compatable with Visual C++. MinGW does use the same runtime DLL as used by Visual C++ 6.0, but this is essentially just an implementation detail, not ment as a compatibility goal. There are a few of ways MinGW's runtime is incompatable with Visual C++ 6.0. One of those ways is that the MinGW headers define R_OK, W_OK and X_OK. That was a probably a mistake, but in order for the MinGW runtime to be compatibile with both previous implementations and Windows Vista I think this change makes sense. Ross Ridge