summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2003-10-04 06:55:33 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2003-10-04 06:55:33 (GMT)
commitdfcd95ccdca42b5dc4ec343fb94c7ed97df2bb4c (patch)
tree6a4ada6547bfe5569483918a88ea5b1bf05693ad /Modules/socketmodule.c
parent74e93eff2482b21821f0872fc96f06eb5744484f (diff)
downloadcpython-dfcd95ccdca42b5dc4ec343fb94c7ed97df2bb4c.zip
cpython-dfcd95ccdca42b5dc4ec343fb94c7ed97df2bb4c.tar.gz
cpython-dfcd95ccdca42b5dc4ec343fb94c7ed97df2bb4c.tar.bz2
made the SGI INET_ADDRSTRLEN apply for any compiler on Irix. Both the
SGI compiler and GCC seem to need this.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 8fd5963..a2a692ad 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -194,14 +194,17 @@ shutdown(how) -- shut down traffic in one or both directions\n\
but I don't know what the right thing is. */
#define _SGIAPI 1
-#ifndef ENABLE_IPV6
-#define INET_ADDRSTRLEN 16
-#endif
-
#define HAVE_INET_PTON
#include <netdb.h>
#endif
+/* Irix 6.5 fails to define this variable at all. This is needed
+ for both GCC and SGI's compiler. I'd say that the SGI headers
+ are just busted. */
+#if defined(__sgi) && !defined(INET_ADDRSTRLEN)
+#define INET_ADDRSTRLEN 16
+#endif
+
/* Generic includes */
#include <sys/types.h>
#include <signal.h>