where to put NO_MKTIME_BEFORE_1970?

Lists: pgsql-hackers
From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: where to put NO_MKTIME_BEFORE_1970?
Date: 2002-08-16 04:44:53
Message-ID: 3D5C8345.2040301@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I'm running Red Hat 7.3 at home. For the fun of it, I put:
#define NO_MKTIME_BEFORE_1970

into /src/include/port/linux.h and then did:
make clean
make all
make install
initdb
make installcheck

But I'm still getting the < 1970 regression test failures. What else do
I need to do?

Joe


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: where to put NO_MKTIME_BEFORE_1970?
Date: 2002-08-16 13:26:12
Message-ID: 6922.1029504372@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> I'm running Red Hat 7.3 at home. For the fun of it, I put:
> #define NO_MKTIME_BEFORE_1970
> But I'm still getting the < 1970 regression test failures. What else do
> I need to do?

I'd assume you need to select different regression comparison file(s)
in src/test/regress/resultmap - probably horology-no-DST-before-1970.

regards, tom lane


From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: where to put NO_MKTIME_BEFORE_1970?
Date: 2002-08-16 15:35:12
Message-ID: 3D5D1BB0.9010703@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>
>>I'm running Red Hat 7.3 at home. For the fun of it, I put:
>> #define NO_MKTIME_BEFORE_1970
>>But I'm still getting the < 1970 regression test failures. What else do
>>I need to do?
>
>
> I'd assume you need to select different regression comparison file(s)
> in src/test/regress/resultmap - probably horology-no-DST-before-1970.
>

<slaps head>I guess that makes perfect sense!

Is /src/include/port/linux.h the correct place to put this or should
something more specific to Red Hat 7.3 be used (and if so, any ideas
about how to detect that Red Hat 7.3 is being used)?

Thanks,

Joe


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: where to put NO_MKTIME_BEFORE_1970?
Date: 2002-08-16 16:40:02
Message-ID: 8665.1029516002@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> Is /src/include/port/linux.h the correct place to put this or should
> something more specific to Red Hat 7.3 be used (and if so, any ideas
> about how to detect that Red Hat 7.3 is being used)?

Really what we need is a test on the glibc version, which seems a
bit difficult. I am half inclined to put in a configure test that
actually checks whether mktime will work on pre-1970 dates ... but
I dunno if Peter will hold still for that. In any case we don't
currently have a mechanism for reflecting whatever configure would
discover into the resultmap.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: where to put NO_MKTIME_BEFORE_1970?
Date: 2002-08-17 15:50:58
Message-ID: Pine.LNX.4.44.0208171400330.2335-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane writes:

> Really what we need is a test on the glibc version, which seems a
> bit difficult.

Well, it's not that difficult to figure out the version (run
/lib/libc.so.6), but I'm afraid the version is not going to tell you
anything. For instance, the libc versions that are claimed to have the
problem in Red Hat releases don't appear to have that problem here.

> In any case we don't currently have a mechanism for reflecting whatever
> configure would discover into the resultmap.

That would appear to be very tricky. Maybe we need to misappropriate the
alternate result file mechanism that was intended for the locale
differences.

--
Peter Eisentraut peter_e(at)gmx(dot)net