Re: Cleaning up historical portability baggage - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Cleaning up historical portability baggage
Date
Msg-id 20220804013546.h65najrzig764jar@awork3.anarazel.de
Whole thread Raw
In response to Re: Cleaning up historical portability baggage  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Cleaning up historical portability baggage
List pgsql-hackers
Hi,

Another potential cleanup is the fallback for strtoll/strtoull. Some of the
spellings were introduced because of "ancient HPUX":

commit 06f66cff9e0b93db81db1595156b2aff8ba1786e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   2018-05-19 14:22:18 -0400

    Support platforms where strtoll/strtoull are spelled __strtoll/__strtoull.

    Ancient HPUX, for one, does this.  We hadn't noticed due to the lack
    of regression tests that required a working strtoll.

    (I was slightly tempted to remove the other historical spelling,
    strto[u]q, since it seems we have no buildfarm members testing that case.
    But I refrained.)

    Discussion: https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org

and some much longer ago:

commit 9394d391b803c55281879721ea393a50df4a0be6
Author: Peter Eisentraut <peter_e@gmx.net>
Date:   2000-11-20 15:56:14 +0000

    Add configure checks for strtoll, strtoull (or strto[u]q).  Disable
    'long long int' portions of ecpg if the type or these functions don't
    exist.

since strtoq, strtouq apparently were already obsolete in 2018, and hpux is
now obsolete...


I only noticed this because I'd ported the configure check a bit naively,
without the break in the if-found case, and was looking into why HAVE_STRTOQ,
HAVE_STRTOUQ were defined with meson, but not autoconf...
AC_CHECK_FUNCS([strtoll __strtoll strtoq], [break])
AC_CHECK_FUNCS([strtoull __strtoull strtouq], [break])


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: A test for replay of regression tests
Next
From: Amit Kapila
Date:
Subject: Re: Introduce wait_for_subscription_sync for TAP tests