DragonFly kernel List (threaded) for 2008-04
Re: Testing monotonic clock
:Matthew Dillon wrote:
:> I would say that DragonFly is wrong. The opengroup standards page
:> says that only <time.h> is needed.
:OK. so, how could we fix this? Any objections to just add include to
:<sys/time.h> into time.h? It fixes the problem problem for sure, but I'm
:not sure about all consequences - this myriad of ifdefs etc
:in /usr/include has been always mystery for me ;).
Well, sys/time.h includes sys/types.h and quite a bit of work seems
to have gone into restricting visibility so we might need to do a
little work on sys/time.h before we can include it in time.h
It looks like time.h only needs sys/types.h in order to get time_t.
time_t's real declaration is __time_t from <machine/types.h>
(which in turn comes from cpu/*/include/stdint.h). Whew, what a
What that means is that I think <time.h> could do something like
typedef __time_t time_t;
Instead of including sys/types.h. Then you could include sys/time.h from