summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/inet_net_pton.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-08-18 19:27:23 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-08-18 19:27:23 -0400
commit927f34ce8a215c8b254136f710cca9ca4da1352c (patch)
tree08193b74ccd8c5afa2d9f37f0d99c1fbb5ad0f00 /src/backend/utils/adt/inet_net_pton.c
parent232720be9b6412ec2b6bee405299bcbbbe700f0b (diff)
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
Diffstat (limited to 'src/backend/utils/adt/inet_net_pton.c')
-rw-r--r--src/backend/utils/adt/inet_net_pton.c6
1 files changed, 3 insertions, 3 deletions
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