Date: Mon, 17 Apr 2000 11:53:45 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp-workers AT delorie DOT com Subject: Re: timezone files: the solution In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 17 Apr 2000, Andris Pavenis wrote: > > > I'm getting broken djtzn203.zip also when building it under Linux (on > > > ix86 of course) > > > > x86 is not the issue here (the timezone files are > > endian-independent). The question is: how does Linux define time_t? > > If it's a signed type, you will see the same problems as on Irix, > > because the timezone files are generated by zic compiled for the host, > > so it uses host's time_t. > > Tested: glibc-2.1.3 defines time_t to 'long int' This explains why you get broken timezone files. > > > C:\DJGPP\TEST\tz>tztest > > > Fri, 14 Apr 2000 17:58:05 +7200 > > > Fri, 14 Apr 2000 17:58:05 EET > > > > > > Which seems to be Ok. > > > > Thanks for testing. > > > > One more comment: > > In Linux (glibc-2.1.3) I got following output from the same test program: > > Mon, 17 Apr 2000 10:32:14 +0200 > Mon, 17 Apr 2000 10:32:14 EET > > which is rather different from ones I'm getting with DJGPP. Which one > is correct? The first result is correct, since the timezone files were produced with DJGPP-compiled zic. Using timezone files produced by DJGPP with zoc compiled with glibc will produce incorrect results, for the same reasons that using timezone files produced by glibc-linked zic with DJGPP will work incorrectly. The time_t type is incompatible in these two libraries. If you want compatible timezone files, add -s to the invocation of host-zic in zoneinfo/src/makefile and rebuild djdev.