delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/23/02:01:25

Date: Mon, 23 Dec 1996 08:47:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "John M. Aldrich" <fighteer AT cs DOT com>
cc: Ian Romanick <idr AT cs DOT pdx DOT edu>, djgpp AT delorie DOT com
Subject: Re: File utils are crap?
In-Reply-To: <32BE11B3.5417@cs.com>
Message-ID: <Pine.SUN.3.91.961223083606.1766I-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019