Subject: Re: How to add a support function to libc
To: None <>
From: Allen Briggs <>
List: tech-userlevel
Date: 10/19/2000 14:42:56
As Bill said, he designed the function and I am providing the
implementation.  The argument order doesn't make much difference
to me.  I guess it depends on whether you look at the template/default
format as a template (put it first) or as a fallback (put it last).

Chris G. Demetriou wrote:
> While it's great to use something in the implementation namespace for
> solely internal purposes only, this is code that's meant to be called
> from user programs too, is it not?  If so, it should be in the normal
> user namespace -- just not prototyped in the headers if standards are
> in force, and aliased in libc and used internally in the aliased form.

OK.  This means that it should be added to namespace.h and I should do
the __weak_alias(fmtcheck,_fmtcheck) dance, right?

So programs within our tree will still compile and link against the
"fmtcheck" name and functions within libc will be using the "_fmtcheck"
name.  This is probably a FAQ, but exactly does the weak alias do?
Allow someone to override "fmtcheck" (in this case) in their own code
without affecting the libc functions that would still get "_fmtcheck"
and the libc-defined function?

Christos Zoulas wrote:
> It probably belongs more to stdlib.h.

...and therefore should be in the src/sys/lib/libc/stdlib directory, right?