pgsql: Avoid conflicts with library versions of inet_net_ntop() and fri

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid conflicts with library versions of inet_net_ntop() and fri
Date: 2019-08-18 23:27:31
Message-ID: E1hzUaB-0002eq-4Y@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid conflicts with library versions of inet_net_ntop() and friends.

Prefix inet_net_ntop and sibling routines with "pg_" to ensure that
they aren't mistaken for C-library functions. This fixes warnings
from cpluspluscheck on some platforms, and should help reduce reader
confusion everywhere, since our functions aren't exactly interchangeable
with the library versions (they may have different ideas about address
family codes).

This shouldn't be fixing any actual bugs, unless somebody's linker
is misbehaving, so no need to back-patch.

Discussion: https://postgr.es/m/20518.1559494394@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/927f34ce8a215c8b254136f710cca9ca4da1352c

Modified Files
--------------
src/backend/utils/adt/inet_cidr_ntop.c | 4 ++--
src/backend/utils/adt/inet_net_pton.c | 6 +++---
src/backend/utils/adt/network.c | 24 ++++++++++++------------
src/include/port.h | 4 ++--
src/include/utils/builtins.h | 8 ++++----
src/interfaces/libpq/fe-connect.c | 16 ++++++++--------
src/port/getaddrinfo.c | 7 ++++---
src/port/inet_net_ntop.c | 8 ++++----
8 files changed, 39 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-08-19 00:18:40 Re: pgsql: doc: Add some images
Previous Message Tom Lane 2019-08-18 23:01:52 pgsql: Fix incidental warnings from cpluspluscheck.