]> granicus.if.org Git - postgresql/commit
Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.
authorAndres Freund <andres@anarazel.de>
Sun, 1 Oct 2017 22:36:14 +0000 (15:36 -0700)
committerAndres Freund <andres@anarazel.de>
Sun, 1 Oct 2017 22:36:14 +0000 (15:36 -0700)
commit0ba99c84e8c7138143059b281063d4cca5a2bfea
tree521367c1888ca186fa229efc3489fb4298c8dc08
parent1f2830f9df9f0196ba541c1e253463afe657cb67
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
20 files changed:
contrib/pgcrypto/crypt-des.c
contrib/uuid-ossp/uuid-ossp.c
src/backend/commands/copy.c
src/backend/libpq/auth.c
src/backend/libpq/ifaddr.c
src/backend/libpq/pqcomm.c
src/backend/libpq/pqformat.c
src/backend/postmaster/postmaster.c
src/backend/tcop/fastpath.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_dump/parallel.c
src/bin/pg_rewind/libpq_fetch.c
src/common/scram-common.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-lobj.c
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c
src/port/getaddrinfo.c
src/port/inet_aton.c