From 927f34ce8a215c8b254136f710cca9ca4da1352c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 18 Aug 2019 19:27:23 -0400 Subject: 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 --- src/backend/utils/adt/inet_net_pton.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/adt/inet_net_pton.c') diff --git a/src/backend/utils/adt/inet_net_pton.c b/src/backend/utils/adt/inet_net_pton.c index c28809fad68..d3221a13139 100644 --- a/src/backend/utils/adt/inet_net_pton.c +++ b/src/backend/utils/adt/inet_net_pton.c @@ -42,7 +42,7 @@ static int inet_cidr_pton_ipv6(const char *src, u_char *dst, size_t size); /* * int - * inet_net_pton(af, src, dst, size) + * pg_inet_net_pton(af, src, dst, size) * convert network number from presentation to network format. * accepts hex octets, hex strings, decimal octets, and /CIDR. * "size" is in bytes and describes "dst". @@ -59,7 +59,7 @@ static int inet_cidr_pton_ipv6(const char *src, u_char *dst, size_t size); * */ int -inet_net_pton(int af, const char *src, void *dst, size_t size) +pg_inet_net_pton(int af, const char *src, void *dst, size_t size) { switch (af) { @@ -241,7 +241,7 @@ emsgsize: /* * int - * inet_net_pton(af, src, dst, *bits) + * inet_net_pton_ipv4(af, src, dst, *bits) * convert network address from presentation to network format. * accepts inet_pton()'s input for this "af" plus trailing "/CIDR". * "dst" is assumed large enough for its "af". "bits" is set to the -- cgit v1.2.3