X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sun, 12 Dec 2004 23:25:51 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-ID: <01c4e091$Blat.v2.2.2$4cf7bb40@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: (s-g_brown@aapt.net.au) Subject: Re: djtar & symbolic links on Win95 FAT32 (LBA) References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Stephen Grant Brown" > Date: Sun, 12 Dec 2004 16:40:20 +1100 > > Can djtar create symbolic links when extracting files onto a Win95 FAT32 > (LBA) filesystem? djtar from djdev203.zip does not support symlinks at all. djdev204.zip, which is in early stages of beta testing, and about which no one knows when it will be released, supports symlinks, but not as Windows .lnk files. Instead, all file I/O primitives were taught to recognize a special magic file format and follow the link in the Posix-compatible manner. However, if you want to use the v2.04 symlinks, you will need to rebuild all your DJGPP programs with v2.04, and Windows programs will never support those symlinks. So I don't recommend using djtar from djdev204.zip for your case. The DJGPP port of GNU Tar 1.12a (v2gnu/tar112ab.zip from ftp.delorie.com) can unpack .tar.gz files with symlinks by copying the target of the link into the source of the link. That is, in this case: > djtar -xv snprintf_2.2.tar.gz -> > > ... > lrwx Sep 25 17:59:18 2000 0 snprintf_2.2/with_autoconf/snprintf.c -> ../snprintf.c The file ../snprintf.c will be copied into snprintf_2.2/with_autoconf/snprintf.c. So if you have a tarball with lots of symlinks, I suggest to use Tar to unpack it (don't forget to install gzip, since Tar doesn't have internal gzip decoder, so it invokes gzip in a pipeline). > SNPRINTF H 0 25/09/00 17:59 snprintf.h > SNPRIN~1 LNK 390 12/12/04 15:57 snprintf.c.lnk > ... > > I used windows me to produce the *.lnk file. IMHO, it is not a good idea to simulate symlinks in DJGPP with Windows .lnk files. The main reason for that is that Windows itself does not support .lnk files in all of its file operations, only in some. E.g., try to open a .lnk file with Notepad, or try getting its target data listed with DIR. From what I see, it sounds like the Windows file I/O routines don't know about .lnk files; instead, the higher APIs, such as the one used for invoking programs, interpret the .lnk file's contents above the file I/O level. In addition, Windows .lnk files don't follow the Posix semantics, e.g. if the target of the link is a directory. One of the important goals of DJGPP is Posix compatibility, so this contradicts with going the Windows .lnk way. For those reasons (and others), DJGPP does not support .lnk files.