Mail Archives: djgpp-workers/2000/08/16/09:27:23
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
- Raw text -