X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <4091054C.2060005@ujf-grenoble.fr> Date: Thu, 29 Apr 2004 15:38:20 +0200 From: Maurice Lombardi User-Agent: Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: fr-fr, it, en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: another bug in symlinks in 2.04 beta 1 (or alpha 2) Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-MIME-Autoconverted: from 8bit to quoted-printable by furon.ujf-grenoble.fr id i3TEJhT8021250 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i3THarOY013838 Hi all, I work since years with djgpp 2.03 under W98se, mainly for pascal (gpc) programming. I have made a try of alpha 2 and beta 1 distribs (to try to recompile gpc under these systems). I found a bug in a peculiar case of symlink resolution. This is shown by the following (minimal) dialog, in a DOS box with setup for djgpp 2.04 beta 1 c:\> mkdir work c:\> cd work C:\work> copy con: toto OK ^Z 1 fichier(s) copié(s) C:\work> type toto OK C:\work>cat toto OK C:\work> mkdir test C:\work> cd test C:\work\test> ln -s ../toto titi C:\work\test> type titi !../toto This is just a text to force symlink file to be 510 bytes long. Do not delete it nor spaces following it. C:\work\test> cat titi OK C:\work\test> cat c:/work/test/titi OK C:\work\test> cat /work/test/titi OK C:\work\test> cd .. C:\work> cat test/titi OK C:\work> cat c:/work/test/titi OK C:\work> cat /work/test/titi c:/djgpp/bin/cat.exe: /work/test/titi: No such file or directory (ENOENT) ??? problem arises (AFAICS) only when trying to resolve the symlink with an absolute path, i.e. starting with a slash (or backslash), but without drive letter, and issuing the command from a directory other than the one in which is the symlink. It is not related to cat. I found it first in a makefile. Make was not able to find a target file by resolving a symlink. The problem did not appear beforehand with djgpp 2.03 where "ln -s" was replaced by "cp -p" by configure Hope this helps Maurice -- Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 63 54 95 mailto:Maurice DOT Lombardi AT ujf-grenoble DOT fr