Re: time_t timezone - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: time_t timezone
Date
Msg-id 200409021404.i82E47Z10537@candle.pha.pa.us
Whole thread Raw
In response to Re: time_t timezone  (Reini Urban <rurban@x-ray.at>)
Responses Re: time_t timezone
List 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: time_t timezone
Next
From: Peter Eisentraut
Date:
Subject: Re: pgxs default installation + various fixes