Re: Timezone problems / HAVE_INT_TIMEZINE

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Timezone problems / HAVE_INT_TIMEZINE
Date: 1998-03-19 04:24:37
Message-ID: Pine.BSF.3.96.980319001802.2259F-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 19 Mar 1998, Thomas G. Lockhart wrote:

> > Couldn't this be tested for, just like there is a "flex test" which
> > finds out if flex is ok or not? Can the configure script find out and
> > add HAVE_INT_TIMEZONE if appropriate?
>
> Uh, it does a test already by trying to compile a program referencing a
> global integer variable called "timezone". Somehow a few systems will
> compile that but don't really have a useful integer timezone
> (RH5.0/glibc2.0 is one of those).
>
> I'm wondering if we could change the sense of the test, to try instead
> to test for the presence of a timezone field in the tm structure? That
> might fix the glibc2.0 port (assuming it still has problems at v2.0.7;
> haven't tested recently) but I don't know which other ports might break.
>
> Can we experiment with this Marc?? Post-megapatch of course :)

Sounds reasonable to me...so you want the test changed to:

===========================================================================
#include <stdio.h>
#include <time.h>

main() { struct tm *tmstruct; printf("%s\n", tmstruct->timezone); }
===========================================================================

And, if the compile fails...how is HAVE_INT_TIMEZONE set? to
FALSE?

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Gould 1998-03-19 04:29:01 Re: [HACKERS] Buffer overuns with the Electric fence debugging library
Previous Message The Hermit Hacker 1998-03-19 04:12:08 Re: [HACKERS] Buffer overuns with the Electric fence debugging library