From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.
Date: Sun, 01 Oct 2017 23:08:13 +0000
Message-ID: <E1dynLJ-00033x-2e@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.
All postgres internal usages are replaced, it's just libpq example
usages that haven't been converted. External users of libpq can't
generally rely on including postgres internal headers.
Note that this includes replacing open-coded byte swapping of 64bit
integers (using two 32 bit swaps) with a single 64bit swap.
Where it looked applicable, I have removed netinet/in.h and
arpa/inet.h usage, which previously provided the relevant
functionality. It's perfectly possible that I missed other reasons for
including those, the buildfarm will tell.
Author: Andres Freund
Discussion: https://postgr.es/m/20170927172019.gheidqy6xvlxb325@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0ba99c84e8c7138143059b281063d4cca5a2bfea
Modified Files
--------------
contrib/pgcrypto/crypt-des.c | 17 +++++++---------
contrib/uuid-ossp/uuid-ossp.c | 17 +++++++---------
src/backend/commands/copy.c | 11 +++++-----
src/backend/libpq/auth.c | 18 ++++++++---------
src/backend/libpq/ifaddr.c | 6 +++---
src/backend/libpq/pqcomm.c | 6 +++---
src/backend/libpq/pqformat.c | 40 ++++++++++---------------------------
src/backend/postmaster/postmaster.c | 13 ++++++------
src/backend/tcop/fastpath.c | 8 +++-----
src/bin/pg_basebackup/streamutil.c | 34 +++++++------------------------
src/bin/pg_dump/parallel.c | 6 ++++--
src/bin/pg_rewind/libpq_fetch.c | 29 ++-------------------------
src/common/scram-common.c | 7 ++-----
src/interfaces/libpq/fe-connect.c | 12 +++++------
src/interfaces/libpq/fe-lobj.c | 11 +++++-----
src/interfaces/libpq/fe-misc.c | 14 ++++++-------
src/interfaces/libpq/fe-protocol2.c | 5 ++---
src/interfaces/libpq/fe-protocol3.c | 5 ++---
src/port/getaddrinfo.c | 11 +++++-----
src/port/inet_aton.c | 4 +++-
20 files changed, 99 insertions(+), 175 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: andres@anarazel.de
Subject: Re: pgsql: Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.
In-Reply-To: <E1dynLJ-00033x-2e@gemulon.postgresql.org>
References: <E1dynLJ-00033x-2e@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