Re: Re: tinterval - operator problems on AIX

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Re: tinterval - operator problems on AIX
Дата
Msg-id 3A65B99A.F9EC70D6@alumni.caltech.edu
обсуждение исходный текст
Ответ на AW: AW: AW: AW: Re: tinterval - operator problems on AI X  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Re: Performance degradation in PostgreSQL 7.1beta3 vs
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: AW: AW: AW: AW: Re: tinterval - operator problems on AI X