Mail Archives: djgpp-workers/1999/01/05/15:37:56
> > stubs are only needed when a non-ansi/posix function is called from
> > one of libc's ansi/posix functions. Other functions do not pollute
> > the ansi/posix namespaces, so do not need stubs.
>
> Like my proposed functions _get_fs_type() and _get_fat_size()?
Right. They don't need stubs. The leading underscores are a
different issue completely. Note that stubs aren't needed when the
called function doesn't violate the namespace; for example, your
functions have underscores, which make them "ansi-safe", so no stubs
would be needed even if some ansi function called them. Stubs are
usually needed for cases where ansi functions call posix functions,
like fopen() calling open(), where the names of both functions are
defined by specs, but there are still namespace pollution problems.
In those cases, we stub the posix function, have the ansi one call the
real function (__open()), and the stub (open()) also calls the real
function (__open()). That way, the ansi function never actually calls
the function with the polluting name (which would be the stub), it
always calls a namespace-safe function (the real one, which now has
underscores).
- Raw text -