summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-09-19 08:03:21 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-09-19 08:03:21 (GMT)
commit8eb92a014be020c99dad91ad2f7a8cbdcfa33d86 (patch)
treebaa0d91b127a1b24ad0f66f0c954662765268eaf /Modules
parentc34c4fc3ab497ec1dd4f8c921798927d1b6d13e2 (diff)
downloadcpython-8eb92a014be020c99dad91ad2f7a8cbdcfa33d86.zip
cpython-8eb92a014be020c99dad91ad2f7a8cbdcfa33d86.tar.gz
cpython-8eb92a014be020c99dad91ad2f7a8cbdcfa33d86.tar.bz2
Patch #608999: Fix portability problems with MIPSPro 7.x
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_hotshot.c6
-rw-r--r--Modules/posixmodule.c6
-rw-r--r--Modules/socketmodule.c8
3 files changed, 20 insertions, 0 deletions
diff --git a/Modules/_hotshot.c b/Modules/_hotshot.c
index bd08919..1908a2d 100644
--- a/Modules/_hotshot.c
+++ b/Modules/_hotshot.c
@@ -55,6 +55,12 @@ typedef struct timeval hs_time;
#define PATH_MAX 260
#endif
+#if defined(__sgi) && _COMPILER_VERSION>700 && !defined(PATH_MAX)
+/* fix PATH_MAX not being defined with MIPSPro 7.x
+ if mode is ANSI C (default) */
+#define PATH_MAX 1024
+#endif
+
#ifndef PATH_MAX
# ifdef MAX_PATH
# define PATH_MAX MAX_PATH
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f0e3f0d..9ac0eb4 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -129,6 +129,12 @@ extern int lstat(const char *, struct stat *);
extern int symlink(const char *, const char *);
#endif
+#if defined(__sgi)&&_COMPILER_VERSION>=700
+/* declare ctermid_r if compiling with MIPSPro 7.x in ANSI C mode
+ (default) */
+extern char *ctermid_r(char *);
+#endif
+
#ifndef HAVE_UNISTD_H
#if defined(PYCC_VACPP)
extern int mkdir(char *);
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index a790900..bdeddea 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -155,6 +155,14 @@ shutdown(how) -- shut down traffic in one or both directions\n\
# include <os2.h>
#endif
+#if defined(__sgi)&&_COMPILER_VERSION>700 && !_SGIAPI
+/* make sure that the reentrant (gethostbyaddr_r etc)
+ functions are declared correctly if compiling with
+ MIPSPro 7.x in ANSI C mode (default) */
+#define _SGIAPI 1
+#include "netdb.h"
+#endif
+
/* Generic includes */
#include <sys/types.h>
#include <signal.h>