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

From Peter Eisentraut
Subject Re: AW: AW: AW: AW: Re: tinterval - operator problems on AI X
Date
Msg-id Pine.LNX.4.30.0101171752060.1054-100000@peter.localdomain
Whole thread Raw
In response to AW: AW: AW: AW: Re: tinterval - operator problems on AI X  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
Zeugswetter Andreas SB writes:

> > I do not have the original thread where Andreas describes the behavior
> > of mktime() on his machine. Andreas, can you suggest a simple configure
> > test to be used?
>
> #include <time.h>
> int main()
> {
>     struct tm tt, *tm=&tt;
>     int i = -50000000;
>     tm = localtime (&i);
>     i = mktime (tm);
>     if (i != -50000000)   /* on AIX this check could also be (i == -1) */
>     {
>         printf("ERROR: mktime(3) does not correctly support datetimes before 1970\n");
>         return(1);
>     }
> }

You don't need to put this check into configure, you can just do the check
after mktime() is used.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Re: tinterval - operator problems on AIX
Next
From: Dave Page
Date:
Subject: RE: ODBC Driver int8 Patch