Mail Archives: djgpp/1996/12/23/02:01:25
On Sun, 22 Dec 1996, John M. Aldrich wrote:
> Would it be possible to put a switch in the DJGPP startup code that
> turns off this implicit device handling? That way a program ported from
> Unix would work properly, but a program written for DOS alone could turn
> off the handling and be able to use "/dev" like it expects to.
You don't need the switch, it's already there. Just don't let your files
begin with "/dev" or "x:/dev", and this feature won't happen.
"X:\\DEV\\myfile", "d:\\dev\\", "\\dev" and the like will all avoid this
translation, as it only catches Unix-style pathnames with forward slashes.
If you are writing a DOS program, you might as well use DOS-style
pathnames, right?
However, the original poster complained about a port of GNU Fileutils,
and those convert DOS-style pathnames to Unix-style before `main' is
called (otherwise, there would be too much #ifdef'ing throughout the
code). So the above solution isn't available in that case, sorry.
- Raw text -