#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
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 *);
# 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>