------- Comment #11 from keithmarshall at users dot sourceforge dot net 2008-01-14 12:15 ------- (In reply to comment #9) > Fix committed to mainline. >
As a MinGW administrator, I am dismayed that you consider this __USE_MINGW_ACCESS kludge as a solution to this bug; I would like this particularly nasty kludge to go away, from the MinGW code base, as soon as is practicably possible. My own view on this is, that since X_OK has no meaning on any platform supported by MinGW, our headers simply should not define it. Danny Smith has advised me that I cannot do that, since GCC needs it, if I don't define it, GCC will give an arbitrary value of one, which will simply reintroduce the old broken behaviour; IMO, that is wrong: if I don't define it, then it is because it should not be used, and GCC should respect that. Danny has further advised me that, if I were to adopt the next best compromise, and define X_OK with a value of zero, that that too would break GCC, because it uses X_OK in other contexts than the mode argument to access(), and in those contexts the value of zero would not work. If this is indeed the case, then I would respectfully suggest that such usage is a violation of IEEE-1003.1, which explicitly defines F_OK, R_OK, W_OK and X_OK for use as values for composing the mode argument to access(), (and for no other purpose). Regards, Keith. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33281