From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove configure probes for sockaddr_storage members.
Date: Mon, 22 Aug 2022 05:53:55 +0000
Message-ID: <E1oQ0Nm-000efb-Gl@gemulon.postgresql.org> (raw)
Remove configure probes for sockaddr_storage members.
Remove four probes for members of sockaddr_storage. Keep only the probe
for sockaddr's sa_len, which is enough for our two remaining places that
know about _len fields:
1. ifaddr.c needs to know if sockaddr has sa_len to understand the
result of ioctl(SIOCGIFCONF). Only AIX is still using the relevant code
today, but it seems like a good idea to keep it compilable on Linux.
2. ip.c was testing for presence of ss_len to decide whether to fill in
sun_len in our getaddrinfo_unix() function. It's just as good to test
for sa_len. If you have one, you have them all.
(The code in #2 isn't actually needed at all on several OSes I checked
since modern versions ignore sa_len on input to system calls. Proving
that's the case for all relevant OSes is left for another day, but
wouldn't get rid of that last probe anyway if we still want it for #1.)
Discussion: https://postgr.es/m/CA%2BhUKGJJjF2AqdU_Aug5n2MAc1gr%3DGykNjVBZq%2Bd6Jrcp3Dyvg%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/64ef572c068fde7cbba7f82cd50f51c0131ffe3b
Modified Files
--------------
config/c-library.m4 | 18 ++++++-----------
configure | 48 ----------------------------------------------
configure.ac | 2 +-
src/common/ip.c | 2 +-
src/include/libpq/pqcomm.h | 13 -------------
src/include/pg_config.h.in | 12 ------------
src/tools/msvc/Solution.pm | 4 ----
7 files changed, 8 insertions(+), 91 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tmunro@postgresql.org
Subject: Re: pgsql: Remove configure probes for sockaddr_storage members.
In-Reply-To: <E1oQ0Nm-000efb-Gl@gemulon.postgresql.org>
References: <E1oQ0Nm-000efb-Gl@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox