delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/05/20/11:24:54

Date: Tue, 20 May 1997 18:22:34 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: Patch for symlink
In-Reply-To: <Pine.HPP.3.95q.970520114353.14749D-100000@newton.mathematik.tu-chemnitz.de>
Message-ID: <Pine.SUN.3.91.970520181106.22684J-100000@is>
MIME-Version: 1.0

On Tue, 20 May 1997, Robert Hoehne wrote:

> When running on W95 with long filenames enabled, the following
> command will success!!
> 
> ln -s foo.c foo_s.c
> 
> and produces a file foo_s.c.exe

A known mis-feature.  Thanks for repairing it, I now have one less item 
on my endless todo list.

> ln -s foo dummy
> 
> is OK even when foo or foo.exe not exists. This may be
> a feature or not. I think it is a misfeature but I have
> not changed this beahaviour (I commented it only and
> wrote how to disable this).

It's a feature.  You should be able to create a symlink even if the target
of the link doesn't exist.  That's how `ln' works on Unix. 

I would recommend to look at the file size before calling in the heavy
artillery (opening the file, reading through it etc.).  This will take
care of the frequent case where `foo' is an empty file (that's how GNU
configure scripts test for a working `ln -s').  v2 executables cannot be
too small (the size of crt0.o should be a good approximation, I think). 

I also suggest that the function `is_v2_prog' will be put into the 
library (rename it to `_is_v2_prog', to avoid polluting the namespace); 
then dosexec can call it too.

- Raw text -


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