delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/01/09/00:56:37

Date: Thu, 9 Jan 2003 07:49:34 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: m4 port: return program name as 'm4' not '/some/path/m4.exe' [PATCH]
In-Reply-To: <3E1B35F9.DC4EA825@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1030109074454.16256A-100000@is>
MIME-Version: 1.0
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

On Tue, 7 Jan 2003, Richard Dawe wrote:

> > In the crt0 code, compare the path to our executable to the $PATH.  If
> > we were found in some directory already on the $PATH, omit the
> > directory and leave the basename.  If we were not found on the $PATH,
> > leave the full path alone.
> 
> With or without the '.exe'?

Without, IMHO.  That'd be more Unix-compatible.

> > Another thing we might consider is to remove the drive specifier if it
> > happens to be the current drive.  For many cases, this will make it
> > look unix-like enough to work with dos-unaware programs.
> 
> Why not just munge it from say c:/ to /dev/c/? That makes it Unixy enough and
> doesn't involve information loss.

I think we need to consider specific examples to decide which one is 
better.  Or maybe code the /dev/c/ thing and let the users use the 
existing flag to remove the drive letter if they need.

> * just return the stem without extension - Unix-style;
> * return a path converted to /dev-style - Unix-friendly.
> 
> Should either of these argv[0] mungings be on by default?

I don't think we should change the default at this time.

- Raw text -


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