From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Header testing [Re: [musl] Re: dirent.h and __NEED_size_t]
Date: Fri, 24 Aug 2012 16:16:57 -0400 [thread overview]
Message-ID: <20120824201657.GI27715@brightrain.aerifal.cx> (raw)
In-Reply-To: <5037DE46.90304@barfooze.de>
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
next prev parent reply other threads:[~2012-08-24 20:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 15:16 dirent.h and __NEED_size_t Daniel Cegiełka
2012-08-24 15:27 ` Daniel Cegiełka
2012-08-24 15:32 ` Daniel Cegiełka
2012-08-24 15:40 ` Gregor Richards
2012-08-24 18:23 ` Header testing [Re: [musl] Re: dirent.h and __NEED_size_t] Rich Felker
2012-08-24 20:04 ` John Spencer
2012-08-24 20:16 ` Rich Felker [this message]
2012-08-24 20:48 ` John Spencer
2012-08-24 21:12 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120824201657.GI27715@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).