delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/30/05:21:22

Date: Mon, 30 Aug 1999 09:41:16 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurynas Biveinis <lauras AT softhome DOT net>
cc: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Re: symlink() & is_v2_prog() question
In-Reply-To: <37C3E95E.1CDBF58D@softhome.net>
Message-ID: <Pine.SUN.3.91.990830094050.3558A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 25 Aug 1999, Laurynas Biveinis wrote:

> > -1 means that the file doesn't exist.  It is perfectly valid to create a
> 
> Or the file exists, but is not recognized executable :
> 
> is_v2_prog("c:/djgpp/bin/gcc.exe") returns  1,
> is_v2_prog("c:/command.com")       returns -1,
> is_v2_prog("c:/notexist.exe")      returns -1,
> is_v2_prog("c:/config.sys")        returns  0.

In the context of the current implementation of `symlink', which only
supports DJGPP executable programs, a file that exists but isn't a
DJGPP program is the same as a non-existent file: the simulated
symlink won't work unless someone creates its target that is a valid
DJGPP program.

I agree that this might look like a bug, but it is hard to decide what
exactly to do in this case, because both possibilities might sometimes
be correct and sometimes not.

So the current implementation is not ncessarily in error.

Of course, if `symlink' is going to support any type of file, then
this should be reconsidered and maybe changed.  The decision depends,
among other factors, on whether the symlink for a DJGPP executable
will still be created like it is done today (i.e., by stubediting an
empty stub), or perhaps it will use the general mechanism like the
other files.

- Raw text -


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