summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-03 10:12:45 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-03 10:12:45 (GMT)
commite941617671ece6ee7d4e1ad981d5499b03827f9a (patch)
treefced444089cb235139a7ccb6129f58dc65a85846 /Modules
parente6bbb4d16f32e4d243897f25b0ad01f81498e095 (diff)
downloadcpython-e941617671ece6ee7d4e1ad981d5499b03827f9a.zip
cpython-e941617671ece6ee7d4e1ad981d5499b03827f9a.tar.gz
cpython-e941617671ece6ee7d4e1ad981d5499b03827f9a.tar.bz2
Patch #724588: Check whether the address of hstrerror and inet_pton can
be taken, and define NI_MAX{HOST|SERV} if necessary.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index f107e0b..2f24034 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -293,6 +293,16 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define SEGMENT_SIZE 65535
#endif
+/*
+ * Constants for getnameinfo()
+ */
+#if !defined(NI_MAXHOST)
+#define NI_MAXHOST 1025
+#endif
+#if !defined(NI_MAXSERV)
+#define NI_MAXSERV 32
+#endif
+
/* XXX There's a problem here: *static* functions are not supposed to have
a Py prefix (or use CapitalizedWords). Later... */