]> granicus.if.org Git - python/commitdiff
made the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both the
authorAnthony Baxter <anthonybaxter@gmail.com>
Sat, 4 Oct 2003 08:00:49 +0000 (08:00 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Sat, 4 Oct 2003 08:00:49 +0000 (08:00 +0000)
SGI compiler and GCC seem to need this.

Modules/socketmodule.c

index 8fd59636002e808c1249d8efa773d6d0343c2e47..a2a692ad8eca0f41ab5ebff908ff9b1bee7ca0bc 100644 (file)
@@ -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>