]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #608999: Fix portability problems with MIPSPro 7.x
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 19 Sep 2002 08:03:21 +0000 (08:03 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 19 Sep 2002 08:03:21 +0000 (08:03 +0000)
Modules/_hotshot.c
Modules/posixmodule.c
Modules/socketmodule.c

index bd089191142ea9ec15c34f33033b4221132f112c..1908a2db653d902c9cab0565108bc5e6c625b262 100644 (file)
@@ -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
index f0e3f0d86c67ee8088589614cab8e6798ee5d861..9ac0eb4993e24df4cdb01e81f4a0947e6cd5773f 100644 (file)
@@ -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 *);
index a790900d259432bf58054a8e4a414eef77327646..bdeddea0c71934711669159f03c386edd471abda 100644 (file)
@@ -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>