delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/11/23/08:04:19

Date: Sun, 23 Nov 1997 15:01:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Oberhumer Markus <k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at>
cc: djgpp-workers AT delorie DOT com, dj AT delorie DOT com
Subject: Re: 971114: misc notes
In-Reply-To: <199711201756.TAA13406@is.elta.co.il>
Message-ID: <Pine.SUN.3.91.971123150101.19570C-100000@is>
MIME-Version: 1.0

On Thu, 20 Nov 1997, Oberhumer Markus wrote:

>   else if (strncmp(p, "/dev/", 5) == 0)
>   {
>     /* new code: map /dev/a/ to a:/ (lowercase directories only) */
>     if (p[5] >= 'a' && p[5] <= 'z' && p[6] == '/')
>     {
>       _farnspokeb(o++, p[5]);
>       _farnspokeb(o++, ':');
>       path = p + 6;
>       space -= 2;
>     }

Why only lowercase [a-z]?  MS platforms are case-insensitive; I think
it will be confusing to introduce case-sensitivity in such subtle
cases.  Somebody somewhere might convert file names to upper case
knowing that it doesn't matter, and will be badly burnt.

> #if 0
>     /* disabled code from 971114 which just removes '/dev/' */
>     else if (p[5] != 0)
>       path = p + 5;
> #endif

Disabling this will break many things.  For example, "ls /dev/tty"
will NOT know that /dev/tty is a device.  More significantly,
"/dev/clock$" and any other DOS device won't return the S_IFCHR bit
set.  This is BAD, IMHO.  For example, opening a file whose name is
taken by a device driver will almost always get you into trouble, and
`stat' is the only way to know about the trouble beforehand.  The
DJGPP port of `tar' uses this trick to avoid problems when the archive
includes files like `prn.txt' or `/dev/aux.c'.

- Raw text -


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