Re: time_t timezone

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: time_t timezone
Date: 2004-09-02 14:04:07
Message-ID: 200409021404.i82E47Z10537@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin pgsql-patches

Reini Urban wrote:
> > # PGAC_VAR_INT_TIMEZONE
> > # ---------------------
> > # Check if the global variable `timezone' exists. If so, define
> > # HAVE_INT_TIMEZONE.
> > AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
> > [AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
> > [AC_TRY_LINK([#include <time.h>
> > int res;],
> > [res = timezone / 60;],
> > [pgac_cv_var_int_timezone=yes],
> > [pgac_cv_var_int_timezone=no])])
> > if test x"$pgac_cv_var_int_timezone" = xyes ; then
> > AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global
> > variable 'int timezone'.])
> > fi])# PGAC_VAR_INT_TIMEZONE
> >
> > You can look in include/pg_config.h to see how it is defined.
>
> This test fails, because you cannot do arithmetic with time_t.
> cygwin has/had a special workaround in pg_config_manual.h
> See Tom above.
>
> All other platforms with time_t timezone should manually enable their
> HAVE_INT_TIMEZONE and manually add the (int) timezone in
> src/timezone/pgtz.c.

OK, let's get some facts. How is your timezone variable defined in your
headers? Is it _timezone? How is time_t defined? If you take the
program above and compile it alone, how does it fail?

Also, look at your config.log output to see why it fails or email it to
my privately.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-cygwin by date

  From Date Subject
Next Message Reini Urban 2004-09-03 09:21:25 Re: time_t timezone
Previous Message Tom Lane 2004-09-02 13:43:04 Re: time_t timezone

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2004-09-02 15:14:58 Re: pgxs default installation + various fixes
Previous Message Tom Lane 2004-09-02 13:43:04 Re: time_t timezone