Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120824201657.GI27715@brightrain.aerifal.cx>
Date: Fri, 24 Aug 2012 16:16:57 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Header testing [Re: Re: dirent.h and __NEED_size_t]

On Fri, Aug 24, 2012 at 10:04:22PM +0200, John Spencer wrote:
> On 08/24/2012 08:23 PM, Rich Felker wrote:
> >
> >It would be nice to have a header test suite for this kind of issue.
> >Basically, it would attempt compiling an otherwise-empty source file
> >for each system header, with each combination of feature test macros,
> >to check for errors in any of the cases. We could add -std=c89 to the
> >mix too if we want to check for c89-compatibility errors at the same
> >time...
> >
> >Rich
> >
> results: http://sprunge.us/JURU
> script:  http://sprunge.us/HIFE
> 
> apart from "inline" there seem to be only 2 problems (at least from
> a quick glance):
> bits/alltypes.h:
> 
> #if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
> struct timespec { time_t tv_sec; long tv_nsec; }; // time_t can be undefined
> #define __DEFINED_struct_timespec
> #endif

It's up to the header requesting timespec to also request time_t. We
could avoid this by just duplicating the underlying type for time_t in
the struct definition; I'm not sure if this would be desirable, since
it might cause errors of omitting time_t from headers that need to
define it to get missed.

> arpa/nameser.h should include support for uint16_t

Fixed.

> ... and: <nsz> the stdio_ext.h bug is that stdio.h is not included

Fixed.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.