Revert back to standard AC_STRUCT_TIMEZONE Autoconf macro

Started by Peter Eisentrautover 6 years ago4 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Instead of AC_STRUCT_TIMEZONE we use our own variant called
PGAC_STRUCT_TIMEZONE that checks for tzname even if other variants were
found first. But since 63bd0db12199c5df043e1dea0f2b574f622b3a4c we
don't use tzname anymore, so we don't need this anymore.

The attached patches revert back to the standard AC_STRUCT_TIMEZONE
macro and do some related cleanup.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

0001-Remove-use-of-deprecated-Autoconf-define.patchtext/plain; charset=UTF-8; name=0001-Remove-use-of-deprecated-Autoconf-define.patch; x-mac-creator=0; x-mac-type=0Download+6-7
0002-Revert-back-to-standard-AC_STRUCT_TIMEZONE-Autoconf-.patchtext/plain; charset=UTF-8; name=0002-Revert-back-to-standard-AC_STRUCT_TIMEZONE-Autoconf-.patch; x-mac-creator=0; x-mac-type=0Download+163-180
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: Revert back to standard AC_STRUCT_TIMEZONE Autoconf macro

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

Instead of AC_STRUCT_TIMEZONE we use our own variant called
PGAC_STRUCT_TIMEZONE that checks for tzname even if other variants were
found first. But since 63bd0db12199c5df043e1dea0f2b574f622b3a4c we
don't use tzname anymore, so we don't need this anymore.

Hmm. I wonder if we need AC_STRUCT_TIMEZONE either? Seems like
we should only be using our own struct pg_tm. If we could get
rid of that configure macro altogether, we could remove some dubious
junk like plpython.h's "#undef HAVE_TZNAME".

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#2)
Re: Revert back to standard AC_STRUCT_TIMEZONE Autoconf macro

On 2019-09-30 21:36, Tom Lane wrote:

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

Instead of AC_STRUCT_TIMEZONE we use our own variant called
PGAC_STRUCT_TIMEZONE that checks for tzname even if other variants were
found first. But since 63bd0db12199c5df043e1dea0f2b574f622b3a4c we
don't use tzname anymore, so we don't need this anymore.

Hmm. I wonder if we need AC_STRUCT_TIMEZONE either? Seems like
we should only be using our own struct pg_tm.

There are a few places that seem to need it, such as initdb/findtimezone.c.

If we could get
rid of that configure macro altogether, we could remove some dubious
junk like plpython.h's "#undef HAVE_TZNAME".

We could keep just the part of AC_STRUCT_TIMEZONE that we need, namely
the check for tm_zone, and remove the part about tzname.

New patch attached.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

v2-0001-Remove-use-of-deprecated-Autoconf-define.patchtext/plain; charset=UTF-8; name=v2-0001-Remove-use-of-deprecated-Autoconf-define.patch; x-mac-creator=0; x-mac-type=0Download+6-7
v2-0002-Simplify-PGAC_STRUCT_TIMEZONE-Autoconf-macro.patchtext/plain; charset=UTF-8; name=v2-0002-Simplify-PGAC_STRUCT_TIMEZONE-Autoconf-macro.patch; x-mac-creator=0; x-mac-type=0Download+7-124
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#3)
Re: Revert back to standard AC_STRUCT_TIMEZONE Autoconf macro

On 2019-10-02 07:30, Peter Eisentraut wrote:

On 2019-09-30 21:36, Tom Lane wrote:

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

Instead of AC_STRUCT_TIMEZONE we use our own variant called
PGAC_STRUCT_TIMEZONE that checks for tzname even if other variants were
found first. But since 63bd0db12199c5df043e1dea0f2b574f622b3a4c we
don't use tzname anymore, so we don't need this anymore.

Hmm. I wonder if we need AC_STRUCT_TIMEZONE either? Seems like
we should only be using our own struct pg_tm.

There are a few places that seem to need it, such as initdb/findtimezone.c.

If we could get
rid of that configure macro altogether, we could remove some dubious
junk like plpython.h's "#undef HAVE_TZNAME".

We could keep just the part of AC_STRUCT_TIMEZONE that we need, namely
the check for tm_zone, and remove the part about tzname.

New patch attached.

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services