tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

struct timezone and _XOPEN_SOURCE



Hello,

I have encountered some software declaring _XOPEN_SOURCE == 600 (which
goal was to be able to use non *_NP pthread macros on Linux, it
seems).  As a side effect, this code fails to build on netbsd-5 because
in <sys/times.h> timezone is only defined if _NETBSD_SOURCE yet in
<sys/featuretest.h> _NETBSD_SOURCE is of course only defined if
_XOPEN_SOURCE is not.

Although the timezone for gettimeofday(2) is deprecated, said software
uses a dummy tz object.

Anyone know if this should be considered to be a bug in <sys/time.h>
where timezone should be outside the _NETBSD_SOURCE conditional, or if
defining _XOPEN_SOURCE == 600 and using gettimeofday(2) is flawed?

Thanks,
-- 
Matt


Home | Main Index | Thread Index | Old Index