summaryrefslogtreecommitdiff
path: root/src/include
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/include
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/include')
-rw-r--r--src/include/port.h4
-rw-r--r--src/include/utils/builtins.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/include/port.h b/src/include/port.h
index b5c03d912b0..ff527952ab9 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -503,8 +503,8 @@ extern int pg_codepage_to_encoding(UINT cp);
#endif
/* port/inet_net_ntop.c */
-extern char *inet_net_ntop(int af, const void *src, int bits,
- char *dst, size_t size);
+extern char *pg_inet_net_ntop(int af, const void *src, int bits,
+ char *dst, size_t size);
/* port/pg_strong_random.c */
extern bool pg_strong_random(void *buf, size_t len);
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index a3cd7d26fae..937ddb7ef08 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -87,12 +87,12 @@ extern void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len);
extern int xidComparator(const void *arg1, const void *arg2);
/* inet_cidr_ntop.c */
-extern char *inet_cidr_ntop(int af, const void *src, int bits,
- char *dst, size_t size);
+extern char *pg_inet_cidr_ntop(int af, const void *src, int bits,
+ char *dst, size_t size);
/* inet_net_pton.c */
-extern int inet_net_pton(int af, const char *src,
- void *dst, size_t size);
+extern int pg_inet_net_pton(int af, const char *src,
+ void *dst, size_t size);
/* network.c */
extern double convert_network_to_scalar(Datum value, Oid typid, bool *failure);