From: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
Cc: | "'thomas(at)pgsql(dot)com'" <thomas(at)pgsql(dot)com>, "'Peter Eisentraut'" <peter_e(at)gmx(dot)net>, lockhart(at)fourpalms(dot)org, Pete Forman <pete(dot)forman(at)westerngeco(dot)com>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: tinterval - operator problems on AIX |
Date: | 2001-01-17 15:26:18 |
Message-ID: | 3A65B99A.F9EC70D6@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > > 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.
> > ...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);
> }
> }
On my Linux box, where the test passes, the compiler is happier if "i"
is declared as time_t. Any problem on other platforms if we change this?
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Robert E. Bruccoleri | 2001-01-17 15:30:46 | Re: Re: Performance degradation in PostgreSQL 7.1beta3 vs |
Previous Message | Tom Lane | 2001-01-17 14:59:18 | Re: AW: Re: Performance degradation in PostgreSQL 7.1beta3 vs 6.5.3 |