autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: AC_LN_S: Detect DJGPP < 2.04 (only .exe symlinks)


From: Tim Van Holder
Subject: RE: AC_LN_S: Detect DJGPP < 2.04 (only .exe symlinks)
Date: Mon, 22 Jan 2001 19:38:35 +0100

> There is something which is not clear to me in this patch: are you
> strengthening it, or weakening it?  It seems to me that you make it
Strengthening, I'd say.

> accept DJGPP's `ln -s' partial support, right?  While if we link a
> regular file, it will fail.  So in that case we don't want to use `ln
> -s' and it seems to me that your patch would though.
No, the other way around: if we find 'conftest.exe' after creating
a symlink called 'conftest', we're using DJGPP < 2.03, so we use
'cp -p' instead of 'ln -s' (though I suppose 'ln' could be used; that
doesn't have any special meaning on DOS though). If there's no
conftest.exe, we're using a system where 'ln -s' works, so we keep it.

> BTW, could you see if you'd like to make the documentation about `ln'
> more precise in doc/autoconf.texi?
> 
> @item @command{ln}
> @c ---------------
> @cindex @command{ln}
> Don't rely on @command{ln} having a @option{-f} option.  Symbolic links
> are not available on old systems, use @samp{ln} as a fall back.
> 
> The @sc{djgpp} @command{ln} emulates soft links for executables by
> generating a stub that in turn calls the real program.  This feature
> also works with nonexistent files like in the Unix spec. So @samp{ln -s
> src dst} will generate @file{src.exe} which will attempt to call
> @file{dst.exe}. But this feature only works for executables, therefore,
> don't rely on symbolic links on @sc{djgpp}.
I'd mention the use of 'cp -p' (once my patch is accepted, that is :-) ).
Also, you could be ahead of the game and mention that it's versions of
djgpp before 2.04 that exhibited this breakage^Wfeature. DJGPP 2.04 and
onwards have symlink support.

So I'd use something like this:

For versions of the @sc{djgpp} before 2.04, @command{ln} emulates soft
links for executables by generating a stub that in turn calls the real
program.  This feature also works with nonexistent files like in the
Unix spec. So @samp{ln -s src dst} will generate @file{src.exe}, which
will attempt to call @file{dst.exe} if run. But this feature only works
for executables, so @command{cp} @option{-p} is used instead for these
systems. @sc{djgpp} version 2.04 and later have full symlink support.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]