summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2004-05-26 17:06:31 (GMT)
committerMichael W. Hudson <mwh@python.net>2004-05-26 17:06:31 (GMT)
commit76b8cc84a4b41b41525b00ff7243ed2f323bade1 (patch)
tree978b8f0627e73695e8a5e8c56933301d103b1437
parent4ccf336e562829fbc7649b2fc000525ddf8e82b4 (diff)
downloadcpython-76b8cc84a4b41b41525b00ff7243ed2f323bade1.zip
cpython-76b8cc84a4b41b41525b00ff7243ed2f323bade1.tar.gz
cpython-76b8cc84a4b41b41525b00ff7243ed2f323bade1.tar.bz2
Band-aid type fix for
[ 728330 ] Don't define _SGAPI on IRIX The Right Thing would be nice, for now this'll do. At least it isn't going to break anything *other* than IRIX...
-rw-r--r--Modules/socketmodule.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 0989171..7efb890 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -61,6 +61,10 @@ Local naming conventions:
*/
+#if defined(__sgi) && _COMPILER_VERSION>700 && !_SGIAPI
+#define _BSD_TYPES
+#endif
+
#include "Python.h"
#undef MAX
@@ -192,8 +196,18 @@ shutdown(how) -- shut down traffic in one or both directions\n\
/* XXX Using _SGIAPI is the wrong thing,
but I don't know what the right thing is. */
+#undef _SGIAPI /* to avoid warning */
#define _SGIAPI 1
+#undef _XOPEN_SOURCE
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#ifdef _SS_ALIGNSIZE
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETNAMEINFO 1
+#endif
+
#define HAVE_INET_PTON
#include <netdb.h>
#endif
@@ -257,7 +271,12 @@ int h_errno; /* not used */
# define O_NONBLOCK O_NDELAY
#endif
+#if defined(__sgi) && _COMPILER_VERSION>700 \
+ && !defined(_SS_ALIGNSIZE) /* defined in sys/socket.h */
+ /* by some newer versions of IRIX */
+ /* (e.g. not by 6.5.10 but by 6.5.21) */
#include "addrinfo.h"
+#endif
#ifndef HAVE_INET_PTON
int inet_pton(int af, const char *src, void *dst);