AW: AW: AW: Re: tinterval - operator problems on AIX - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: AW: AW: Re: tinterval - operator problems on AIX
Date
Msg-id 11C1E6749A55D411A9670001FA6879633681BC@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
Responses Re: AW: AW: AW: Re: tinterval - operator problems on AIX
List pgsql-hackers
> > > > > Yes, the annoyance is, that localtime works for dates before 1970
> > > > > but mktime doesn't. Best would probably be to assume no DST before
> > > > > 1970 on AIX and IRIX.
> > > > 
> > > > That seems like a reasonable answer to me, especially since we have
> > > > other platforms that behave that way.  How can we do this --- just
> > > > test for isdst = -1 after the call, and assume that means failure?

Here is a patch that is incremental to the previous patch and makes AIX
not use DST before 1970. The results are now consistent with other 
no-DST-before-1970 platforms.

The down side is, that I did not do a configure test, and did not incooperate
IRIX, since I didn't know what define to check.

The correct thing to do instead of the #if defined (_AIX) would be to use
something like #ifdef NO_NEGATIVE_MKTIME and set that with a configure.
Thomas, are you volunteering ?

Andreas


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: AW: Re: tinterval - operator problems on AIX
Next
From: Oleg Bartunov
Date:
Subject: SIGNATURE for int sets (need advise)