summaryrefslogtreecommitdiff
path: root/src/port/inet_net_ntop.c
diff options
context:
space:
mode:
authorTom Lane2019-08-18 23:27:23 +0000
committerTom Lane2019-08-18 23:27:23 +0000
commit927f34ce8a215c8b254136f710cca9ca4da1352c (patch)
tree08193b74ccd8c5afa2d9f37f0d99c1fbb5ad0f00 /src/port/inet_net_ntop.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/[email protected]
Diffstat (limited to 'src/port/inet_net_ntop.c')
-rw-r--r--src/port/inet_net_ntop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/port/inet_net_ntop.c b/src/port/inet_net_ntop.c
index 67aff110da5..b8ad69c3909 100644
--- a/src/port/inet_net_ntop.c
+++ b/src/port/inet_net_ntop.c
@@ -36,7 +36,7 @@ static const char rcsid[] = "Id: inet_net_ntop.c,v 1.1.2.2 2004/03/09 09:17:27 m
#else
/*
* In a frontend build, we can't include inet.h, but we still need to have
- * sensible definitions of these two constants. Note that inet_net_ntop()
+ * sensible definitions of these two constants. Note that pg_inet_net_ntop()
* assumes that PGSQL_AF_INET is equal to AF_INET.
*/
#define PGSQL_AF_INET (AF_INET + 0)
@@ -61,20 +61,20 @@ static char *inet_net_ntop_ipv6(const u_char *src, int bits,
/*
* char *
- * inet_net_ntop(af, src, bits, dst, size)
+ * pg_inet_net_ntop(af, src, bits, dst, size)
* convert host/network address from network to presentation format.
* "src"'s size is determined from its "af".
* return:
* pointer to dst, or NULL if an error occurred (check errno).
* note:
* 192.5.5.1/28 has a nonzero host part, which means it isn't a network
- * as called for by inet_net_pton() but it can be a host address with
+ * as called for by pg_inet_net_pton() but it can be a host address with
* an included netmask.
* author:
* Paul Vixie (ISC), October 1998
*/
char *
-inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
+pg_inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
{
/*
* We need to cover both the address family constants used by the PG inet