Mail Archives: djgpp-workers/2003/01/07/18:35:20
Hello.
DJ Delorie wrote:
> Note that for maximum unix compatibility, we should probably do this:
>
> In the crt0 code, compare the path to our executable to the $PATH. If
> we were found in some directory already on the $PATH, omit the
> directory and leave the basename. If we were not found on the $PATH,
> leave the full path alone.
With or without the '.exe'?
> Another thing we might consider is to remove the drive specifier if it
> happens to be the current drive. For many cases, this will make it
> look unix-like enough to work with dos-unaware programs.
Why not just munge it from say c:/ to /dev/c/? That makes it Unixy enough and
doesn't involve information loss.
I suppose there could be two styles of munging:
* just return the stem without extension - Unix-style;
* return a path converted to /dev-style - Unix-friendly.
Should either of these argv[0] mungings be on by default?
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -