aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-08-14 18:32:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-08-14 18:32:55 +0000
commit71b0fe5b2ea0d8e9ab35181527bfcaea4e3ee6f6 (patch)
tree753da1066c99d6bd4baba6d38dc4b67d503581ec /src
parent2b5f049f7c6231cce3d79b8949f7aeee3bb4081a (diff)
downloadpostgresql-71b0fe5b2ea0d8e9ab35181527bfcaea4e3ee6f6.tar.gz
postgresql-71b0fe5b2ea0d8e9ab35181527bfcaea4e3ee6f6.zip
Workaround for platforms that have getaddrinfo() without AI_NUMERICHOST.
We don't actually need the flag, so just #define it as zero in such cases.
Diffstat (limited to 'src')
-rw-r--r--src/include/getaddrinfo.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/include/getaddrinfo.h b/src/include/getaddrinfo.h
index 5d1aeef8508..4ca74544912 100644
--- a/src/include/getaddrinfo.h
+++ b/src/include/getaddrinfo.h
@@ -15,7 +15,7 @@
*
* Copyright (c) 2003, PostgreSQL Global Development Group
*
- * $Id: getaddrinfo.h,v 1.10 2003/08/08 21:42:31 momjian Exp $
+ * $Id: getaddrinfo.h,v 1.11 2003/08/14 18:32:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,6 @@
/* Various macros that ought to be in <netdb.h>, but might not be */
#ifndef EAI_FAIL
-
#define EAI_BADFLAGS -1
#define EAI_NONAME -2
#define EAI_AGAIN -3
@@ -46,9 +45,18 @@
#ifndef AI_PASSIVE
#define AI_PASSIVE 0x0001
#endif
+
#ifndef AI_NUMERICHOST
+/*
+ * some platforms don't support AI_NUMERICHOST; define as zero if using
+ * the system version of getaddrinfo...
+ */
+#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO)
+#define AI_NUMERICHOST 0
+#else
#define AI_NUMERICHOST 0x0004
#endif
+#endif
#ifndef NI_NUMERICHOST
#define NI_NUMERICHOST 1