Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 24 Aug 2012 14:23:01 -0400
From: Rich Felker <>
Subject: Header testing [Re: Re: dirent.h and __NEED_size_t]

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


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.