Re: time_t timezone - Mailing list pgsql-patches

From Tom Lane
Subject Re: time_t timezone
Date
Msg-id 7612.1094056153@sss.pgh.pa.us
Whole thread Raw
In response to Re: time_t timezone  (Reini Urban <rurban@x-ray.at>)
Responses Re: time_t timezone
Re: time_t timezone
List pgsql-patches
Reini Urban <rurban@x-ray.at> writes:
> Yes, they are talking about the localtime return value,
> but nevertheless the newlib folks refer to that. Their fault.

> Should I discuss that with them?

Probably.  They have a gratuitous variation from the Single Unix Spec.

>> But what may be more to the point is that AFAICS we make no assumption
>> about the exact datatype of the timezone variable.

> Bruce' patch only assumes time_t on CYGWIN and it is only for pgtypeslib
> (src/interfaces/ecpg/pgtypeslib/dt.h). Not for src/timezone/pgtz.c

Per my recent post in pghackers, I think that the datatype has nothing
to do with it anyway.  The real problem is the loss of this code that
was in pg_config_manual.h in 7.4 and before:

/*
 * Define this if your operating system has _timezone rather than timezone
 */
#if defined(__CYGWIN__) || defined(WIN32)
#define HAVE_INT_TIMEZONE        /* has int _timezone */
#define HAVE_UNDERSCORE_TIMEZONE 1
#endif

I'm inclined to just put it back, rather than adding a configure test
that we never needed before.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timezones on localized windows
Next
From: "Dave Page"
Date:
Subject: Win32 Version patch