On Aug 16, 1:22am, eggert@cs.ucla.edu (Paul Eggert) wrote: -- Subject: Re: [tz] [PROPOSED PATCH 2/3] Port to NetBSD when using GCC_DEBUG | 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. That's great. You might also consider to add the patch that add glibc compatibility for queries during the tz transition time (the -DNO_ERROR_IN_DST_GAP code), so that people who want to replace the glibc implementation with tzcode get 100% compatibility. Note that I am not advocating turning on this define by default; I have not done it for NetBSD. christos