From: James <jam...@op...> - 2007-08-11 05:11:46
|
On Sat, 2007-08-11 at 10:10 +0800, JonY wrote: > James wrote: > > On Fri, 2007-08-10 at 18:26 +0800, JonY wrote: > >> I am confused about what __mingw_access actually does. From what I read, > >> I tries to fix the X_ok problem in Vista. > >> > >> So, what exactly is the difference between access() and __mingw_access()? > >> > >> Unfortunately, I have little experience in C, so can some one enlighten me? > > > > From what I can gather, the Vista shipped version of the C library > > returns an error when X_OK is passed in the flags, where as previous > > versions of the C library did not (they ignored the X_OK flag). The > > MinGW version of the function ignores the X_OK flag, to behave like the > > old C library functionality. See here - > > http://gcc.gnu.org/ml/gcc/2007-05/msg00228.html > > > So to enable programs to work correctly under Vista, I must pass > -D__USE_MINGW_ACCESS to gcc and rebuild my programs and libraries? I would imagine so, or remove any reference to X_OK by hand, and then rebuild things. Not being a Vista user I may be wrong. Take a look in your MinGW header files to see how it was finally implemented, and what you should do to invoke the workaround. Cheers, James. |