Mail Archives: djgpp-workers/1999/10/17/14:00:15
Hello.
DJ Delorie wrote:
> > I think supporting /dev/zero is a good idea, but I don't think FSEXT
> > is the way to do it.
>
> I originally designed FSEXT to handle stuff like this, though.
<snip>
> The only catch is that if you use a library that
> *only* provides an fsext, you really need to provide it as a single
> object rather than an archive, else the linker won't link it in (it
> doesn't resolve any additional symbols, the way socket() would for a
> tcp/ip library).
I think /dev/zero support code could be linked in automatically by having
the FSEXT list point at the relevant FSEXT function - see
src/libc/fsext/fse_open.c - set FuncList to point to the /dev/zero FSEXT.
I think that since this module is always linked in, it will cause the
/dev/zero code to link too.
> I definitely want to avoid adding hooks in libc for things that can be
> done with fsexts. The exceptions so far are for obviously common
> things, like /dev/null and a few other renames.
In that case I will use my original FSEXT approach, unless there are any
more thoughts.
Thanks, bye,
--
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/
- Raw text -