Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 30646:a6fb6822814a legacy-trunk
made the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both the
SGI compiler and GCC seem to need this.
| author | Anthony Baxter <anthonybaxter@gmail.com> |
|---|---|
| date | Sat, 04 Oct 2003 08:00:49 +0000 |
| parents | 9200712d31e7 |
| children | 6f15e73b59f2 3b59fa5d25b1 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Sat Oct 04 07:46:23 2003 +0000 +++ b/Modules/socketmodule.c Sat Oct 04 08:00:49 2003 +0000 @@ -194,14 +194,17 @@ 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>
