Alan Barrett wrote:
That should be tz_posix2time, not tz_time2posix.
Thanks, fixed in the obvious way with the attached revised patch to the tz code.
More generally, it would be nice to know what went wrong on NetBSD.
The same thing that goes wrong on any platform if one wants to portability-test the tz code by compiling it with -Dtime_tz='uintmax_t' (say): the prototypes in <time.h> which use time_t='long' (say) conflict with with the altered prototypes localtime.c wants to use internally which use time_t='uintmax_t'. Unlike most other platforms, recent versions of NetBSD declare a posix2time prototype in <time.h>, so NetBSD needs a workaround for the posix2time clash even though most platforms don't. The motivation for all this is to add support for NetBSD-style localtime_rz, mktime_z, tzalloc, and tzfree, along the lines suggested by Christos Zoulas in <http://mm.icann.org/pipermail/tz/2010-September/016435.html>. These functions have been added to NetBSD. I've found some problems with the NetBSD API and plan to propose a simpler API here soon, which is binary compatible with a subset of NetBSD's. If it works out maybe we can get it into POSIX. I'll CC: this to Christos to give him a heads-up.