Message-ID: <399A95F6.73C678A5@softhome.net> Date: Wed, 16 Aug 2000 15:24:06 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.74 [en] (Win98; U) X-Accept-Language: lt,en MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com CC: Eli Zaretskii Subject: Re: Patch: open() adjustment for symlinks References: <200008161238 DOT OAA09506 AT lws256 DOT lu DOT erisoft DOT se> <2427-Wed16Aug2000160221+0300-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > > suppose someone want to be able to handle umsdos extensions on FAT? > > Sure, it's possible. Right now, they will need to catch _open and > _read, and supply the contents of our symlink file. If we think this > is too clumsy, we should provide a special FSEXT hook. This is not too clumsy; current setup simply won't work: If program supplies open and *stat hooks which emulate 3rd party symlinks, then rest of DJGPP lib won't recognize them, although they will be silently resolved. Now the following will fail, although I'd expect it to work: lstat(file, &info); if (S_ISLNK(info.st_mode)) { if (readlink(file, buf, 256) == -1) prinf("Huh? 8-(\n"); } The problem is, that readlink() will silently read from resolved symlink, and won't find expected symlink format here. So the readlink hook seems to be required, after all. Laurynas