From: John E. / T. <td...@td...> - 2008-04-19 15:33:47
|
Brian Dessent wrote: > Like I said, I haven't quite looked into the details other than to > verify the problem. But there is a difference in Vista (completely > separate from the _access issue) with how the shell works, which breaks > the relocatability. It's definitely in the shell because using a > different shell makes the problem go away, and I suspected argv[0] > because calling it with an absolute path fixes the problem, as does a > dummy .bat wrapper. > I believe this is indeed the problem Luis Lavena was experiencing. Interestingly enough, it is still access() related, but a different issue than the X_OK bit issue. Shells like Cygwin's or mSYS' bash, which give GCC a qualified argv[0] even when the invocation is unqualified, are the exception rather than the rule. GCC handles an unqualified argv[0] by searching for it in PATH, and this worked fine everywhere except under Vista, where for some reason access("C:\fully\qualified\path\to\gcc.exe", 0) returns nonzero. -John E. |