diff options
author | Trent Mick <trentm@activestate.com> | 2004-09-07 17:48:26 (GMT) |
---|---|---|
committer | Trent Mick <trentm@activestate.com> | 2004-09-07 17:48:26 (GMT) |
commit | a708d6e3b0aa2d225d4e5ab338862f67994e1c45 (patch) | |
tree | 5023133c27f05207c26e7f92ce91310125876bab /Modules | |
parent | 97329754f8651c21d32dc6032227b7981faa6066 (diff) | |
download | cpython-a708d6e3b0aa2d225d4e5ab338862f67994e1c45.zip cpython-a708d6e3b0aa2d225d4e5ab338862f67994e1c45.tar.gz cpython-a708d6e3b0aa2d225d4e5ab338862f67994e1c45.tar.bz2 |
Apply patch from http://python.org/sf/728330 to fix socket module compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 5d8a552..e6db05b 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -257,7 +257,19 @@ int h_errno; /* not used */ # define O_NONBLOCK O_NDELAY #endif -#include "addrinfo.h" +/* include Python's addrinfo.h unless it causes trouble */ +#if defined(__sgi) && _COMPILER_VERSION>700 && defined(_SS_ALIGNSIZE) + /* Do not include addinfo.h on some newer IRIX versions. + * _SS_ALIGNSIZE is defined in sys/socket.h by 6.5.21, + * for example, but not by 6.5.10. + */ +#elif defined(_MSC_VER) && _MSC_VER>1200 + /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and + * EAI_* constants are defined in (the already included) ws2tcpip.h. + */ +#else +# include "addrinfo.h" +#endif #ifndef HAVE_INET_PTON int inet_pton(int af, const char *src, void *dst); |