delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/09/08/02:28:47

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>
Subject: Re: RESEND: Re: /dev/c - c: or c:/ ?
Date: Mon, 8 Sep 2003 08:27:28 +0200
MIME-Version: 1.0
X-Mailer: Microsoft Outlook, Build 11.0.4920
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3718.0
In-Reply-To: <7263-Sat06Sep2003222333+0300-eliz@elta.co.il>
Thread-Index: AcN0rTyEBOjhsqtHQYSdVKnF+/5zPwBIqVfA
Message-Id: <20030908062733.EFF5790551@iceage.anubex.com>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> > /dev/c is something we've introduced. I don't see why 
> /dev/c shouldn't be
> > POSIX-compliant, just because c: and c:/ are different things.
> 
> I thought I explained that: because the OS we are running on isn't
> Posix.

Neither is Win32 - but Win32+Cygwin is.  DJGPP can't be 100% POSIX
compliant (e.g. fork & co), but using that as a reason for not providing
POSIX compatibility where we _can_ provide it seems wrong.
I don't see a need for sacrificing c: vs c:/ - that's part of the DOS
path system, and I don't think we're planning on dropping standard DOSish
path support anytime soon.  But for our own /dev/X/ paths we can easily
drop the /dev/c vs /dev/c/ difference.

> > > "c:" isn't a relative path, it's 99% absolute path, as 
> far as Posix
> > > semantics is concerned.
> > 
> > How about c:foo?
> > 
> > Actually I think of c: being a relative path - something 
> ../../dev/c/foo/bar.
> 
> It is closer to an absolute file name in the sense that you don't
> need to prepend the current directory to it.

Errr yes you do - just not the current directory of the current drive.
To make a path absolute, you strip the drivespec off it - if it does not
start with a drivesep, you prepend the current directory for the drive
given in the drivespec (or the current drive if not specified), then you
prepend the drivespec again (or prepend the current drive if it was not
given).

The point of absolute paths is that if you change the current directory,
the path still refers to the same location.  This is only true for
X:foo style paths if the current directory on X: remains unhanged.


- Raw text -


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