Subject: Re: How to add a support function to libc
To: None <>
From: Christos Zoulas <>
List: tech-userlevel
Date: 10/19/2000 17:50:08
In article <>,
Allen Briggs <> wrote:
> I think the function should live in libc/stdio, next to the printf(3)
> family, but I'm not sure where it should be prototyped, or how it
> should be named to avoid namespace collisions (I'm not clear on which
> namespaces are reserved for whom).

It probably belongs more to stdlib.h.
> The working name for the function is __fmtcheck(), prototyped as
> 	const char *__fmtcheck __P((const char *, const char *))
> 		       __attribute__((__format_arg__(2)));
> So what's the correct approach?  My naive approach is to just drop
> the prototype in the "Routines that are purely local" section of
> stdio.h (with fgetln, fpurge, et al.).  Instruction in a less
> naive approach welcome.

It does not have to start with __. Just put it in the section that
gets ifdefed out for ansi, posix etc source.