K&R prototypes?

Rob Landley rob at landley.net
Sat Sep 12 20:57:34 UTC 2009


On Saturday 12 September 2009 07:11:04 Mike Frysinger wrote:
> On Friday 11 September 2009 19:52:09 Rob Landley wrote:
> > My question is what standards is uClibc built against?  C99 has been out
> >  for a decade, and C89 (ala "ANSI C") has been out for 20 years, but the
> >  readpath.c code starts with:
> >
> > #ifdef __STDC__
> > char *realpath(const char *path, char got_path[])
> > #else
> > char *realpath(path, got_path)
> > const char *path;
> > char got_path[];
> > #endif
> > {
> >
> > Kernighan and Ritchie prototypes?  From 1978?  Really?
> >
> > Is that honestly still necessary?  I'm attempting to deal with the fact
> >  that the 2.6 kernel series hasn't really got a PATH_MAX anymore, can I
> >  clean this out too while I'm there?
>
> this is just code that no one has touched because it hasnt been a problem.
> but no, we do not require support of these old prototype styles.  if
> someone were to remove it, that's perfectly fine.

Cool.

I'd like to whip up a FAQ entry about what standards uClibc pays attention to 
("supports" may be too strong a word), but I don't know the answers.  I'm 
aware of SUSv3, SUSv4, http://kernel.org/doc/man-pages/, and "whatever glibc 
does".  I'm also under the impression that uClibc is c89 rather than c99?

Is there any agreement on this?  (At least what we should be targeting, if not 
what it's currently doing?)

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds


More information about the uClibc mailing list