K&R prototypes?

Mike Frysinger vapier at gentoo.org
Sun Sep 13 22:03:08 UTC 2009


On Saturday 12 September 2009 16:57:34 Rob Landley wrote:
> 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?

uClibc absolutely targets *latest* POSIX.  if it's in that standard, it should 
be in uClibc.  additional support exists for older/deprecated POSIX 
interfaces, and {Linux,GNU,BSD}-specific functions, as people feel like adding 
(and generally behind a config option).  of course, a lot of this is dependent 
on people actually doing the work.

"man-pages" isnt a standard.  it documents standards (POSIX, Linux, BSD, GNU, 
etc...).

we set default our default standard to gnu99.  i'm perfectly fine with people 
using c99 code, and most gnu features are already abstracted away (although i 
dont mind those either).  i really dont have sympathy for people using 
proprietary compilers when gcc exists for all relevant hosts and targets 
(including prebuilt binaries).  it'll be a hell of a lot less effort for 
people to install gcc then to try and hack up the source code to fit their 
system.

gcc-3.4.x is the last supported version of gcc in general, although changes 
for older versions sometimes come up and if they're exceedingly minor, it 
should be fine.  more of a judgment call there.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20090913/b75a36d9/attachment.pgp>


More information about the uClibc mailing list