This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Defining timespec in time.h or sys/time.h?


On Wed, 18 Oct 2017, Steve Ellcey wrote:

> It looks like the older sys/time.h would include time.h but the current one
> doesn't.  Is this change intentional?  I am guessing it is.  Does the ISO C11
> standard says that you need to include time.h and not sys/time.h to get
> the timespec structure?  I don't have a copy of the standard but that would
> seem to be the implication of this code in the current time.h:

There is no such header as sys/time.h (or indeed sys/anything.h) in ISO C.  
There is also no such header in base POSIX; sys/time.h is XSI only.  
sys/time.h is permitted to include sys/select.h which is permitted to 
include time.h, but there is no requirement for it to do so.

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]