delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/09/02/17:25:14

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3F550293.76E873F8@phekda.freeserve.co.uk>
Date: Tue, 02 Sep 2003 21:50:27 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: /dev/c - c: or c:/ ?
References: <002a01c370ca$b51801e0$2202a8c0 AT dualzastai>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Tim Van Holder wrote:
> 
> > > From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> > > Date: Mon, 1 Sep 2003 08:02:46 +0200
> > >
> > > > What other way is there to express "c:" with the /dev/x notation?
> > >
> > > Should there be one?
> >
> > If there's a reason to disallow it, let's hear it.  If not, I'd
> > generally advise to refrain from gratuitous changes.
> 
> How about simple shell sanity?  Shell scripts may consider
> $dir and $dir/. to be interchangeable (and I wouldn't be surprised
> if POSIX mandated this), which would not necessarily be true in
> our case ('c:' versus 'c:/.' if $dir is /dev/c).

POSIX mandates that. From SUSv3 (which is the same as the new POSIX):

"The special filename dot shall refer to the directory specified by its
predecessor. The special filename dot-dot shall refer to the parent directory
of its predecessor directory. As a special case, in the root directory,
dot-dot may refer to the root directory itself."

> > > The /dev/xxx notation is there for POSIX support
> >
> > No, it's for programs and shell scripts which believe that every
> > absolute file name begins with a slash.
> 
> Which is the POSIX way of thinking.  Same difference.
[snip]

The idea of having an absolute path like /dev/c the semantics of a relative
path seems like a really bad idea.

I think this is a bug we should fix for 2.04.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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