From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1745 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Header testing [Re: [musl] Re: dirent.h and __NEED_size_t] Date: Fri, 24 Aug 2012 16:16:57 -0400 Message-ID: <20120824201657.GI27715@brightrain.aerifal.cx> References: <5037A072.5000300@purdue.edu> <20120824182301.GG27715@brightrain.aerifal.cx> <5037DE46.90304@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1345839322 21665 80.91.229.3 (24 Aug 2012 20:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 20:15:22 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1746-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 24 22:15:23 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T50Hp-0000jt-1U for gllmg-musl@plane.gmane.org; Fri, 24 Aug 2012 22:15:21 +0200 Original-Received: (qmail 32426 invoked by uid 550); 24 Aug 2012 20:15:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32418 invoked from network); 24 Aug 2012 20:15:19 -0000 Content-Disposition: inline In-Reply-To: <5037DE46.90304@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1745 Archived-At: 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: the stdio_ext.h bug is that stdio.h is not included Fixed. Rich