From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1740 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Header testing [Re: [musl] Re: dirent.h and __NEED_size_t] Date: Fri, 24 Aug 2012 14:23:01 -0400 Message-ID: <20120824182301.GG27715@brightrain.aerifal.cx> References: <5037A072.5000300@purdue.edu> 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 1345832485 31514 80.91.229.3 (24 Aug 2012 18:21:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 18:21:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1741-gllmg-musl=m.gmane.org@lists.openwall.com Fri Aug 24 20:21:26 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 1T4yVZ-0000PQ-AC for gllmg-musl@plane.gmane.org; Fri, 24 Aug 2012 20:21:25 +0200 Original-Received: (qmail 17969 invoked by uid 550); 24 Aug 2012 18:21:23 -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 17961 invoked from network); 24 Aug 2012 18:21:23 -0000 Content-Disposition: inline In-Reply-To: <5037A072.5000300@purdue.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1740 Archived-At: On Fri, Aug 24, 2012 at 11:40:34AM -0400, Gregor Richards wrote: > diff -r fab1146cec43 include/dirent.h > --- a/include/dirent.h Thu Aug 23 14:38:34 2012 -0400 > +++ b/include/dirent.h Fri Aug 24 11:39:38 2012 -0400 > @@ -7,6 +7,9 @@ > > #define __NEED_ino_t > #define __NEED_off_t > +#ifdef _BSD_SOURCE > +#define __NEED_size_t /* for getdents */ > +#endif 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