delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/24/04:48:13

Subject: Re: More about timezones ...
To: dj AT ctron DOT com (DJ Delorie)
Date: Wed, 24 Aug 1994 09:43:03 +0200 (MET DST)
From: Henrik Storner <storner AT olicom DOT dk>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

I wrote
> 
> > Maybe it is about time to switch compiler for go32 ?

because go32 compiled with BC 3.1 did not have problems with the times
reported by stat(), whereas go32 compiled with TC 2.0 gives bad values
for st_[mca]time.

DJ responds:

> Only if you can convince me that BCC's copyright is safe to go with.

I was blissfully unaware of the potential for legal problems here.

> Since V2.0 needs a standalone TZ solution anyway, why not just use
> that one in V1.X as well?

Actually, I don't care which compiler is used to build go32, as long
as the executable that is produced _works_ . The current solution does
*not* work properly when you set the TZ variable as needed by the
routines in libsrc/c/gen/ctime.c (TZ=MET-1METDST-2,M3.5.0/02:00,M9.5.0/02:00
in my case): stat() and ftime() breaks. For stat(), this is due
to the _TC_ stat() breaking on this TZ setting; I haven't checked 
ftime() yet - only the gmtoffset and dst flag breaks - but presuma-
bly it is for the same reason.

There are a couple of ways to fix this, that I can think of:

1) All is well when go32 is compiled with BC 3.1. This was the simplest
solution - no changes required in go32 or GNUO sources. Only legal problems.

2) Rewrite the go32 implementation of stat() and ftime(), so they don't
rely on the broken TC library routines. Could be done, but a bit more
work.

3) (This is probably really part of 2): Get the TZ routines in ctime.c
working, so a TZ setting of 'MET-1MDT' is handled properly, instead of
bailing out and ignoring the DST setting.
-- 
Henrik Storner        | "Man is the best computer we can put aboard a space-
(storner AT olicom DOT dk)   |  craft ... and the only one that can be mass produced 
System Engineering    |  with unskilled labor."
Olicom Denmark        |                                   Wernher von Braun

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019