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

On Fri, Aug 24, 2012 at 10:48:18PM +0200, John Spencer wrote:
> On 08/24/2012 10:16 PM, Rich Felker wrote:
> >On Fri, Aug 24, 2012 at 10:04:22PM +0200, John Spencer wrote:
> >>
> >>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.
> >
> in that case, sys/sem.h (which caused the compilation error) needs
> to be fixed to set __NEED_time_t

Fixed, along with a couple other bugs I found reading the
specification for that header..


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.