diff --git a/Include/Python.h b/Include/Python.h index 6e3303ac9a3b0c..a7b7aef24abb4e 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -12,10 +12,6 @@ #include "pyconfig.h" #include "pymacconfig.h" -#if defined(__sgi) && !defined(_SGI_MP_SOURCE) -# define _SGI_MP_SOURCE -#endif - // stdlib.h, stdio.h, errno.h and string.h headers are not used by Python // headers, but kept for backward compatibility. They are excluded from the // limited C API of Python 3.11. diff --git a/Misc/NEWS.d/next/Build/2019-03-27-22-51-32.bpo-31341.vVaJ0N.rst b/Misc/NEWS.d/next/Build/2019-03-27-22-51-32.bpo-31341.vVaJ0N.rst new file mode 100644 index 00000000000000..74524998e2833d --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-03-27-22-51-32.bpo-31341.vVaJ0N.rst @@ -0,0 +1 @@ +Cleanup IRIX-specific macros sgi and __sgi. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 3770a032e977dc..c7ac2d83fc91ba 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -117,7 +117,7 @@ static const char PyCursesVersion[] = "2.2"; #define CURSES_MODULE #include "py_curses.h" -#if defined(HAVE_TERM_H) || defined(__sgi) +#ifdef HAVE_TERM_H /* For termname, longname, putp, tigetflag, tigetnum, tigetstr, tparm which are not declared in SysV curses and for setupterm. */ #include @@ -130,7 +130,7 @@ static const char PyCursesVersion[] = "2.2"; #include #endif -#if !defined(HAVE_NCURSES_H) && (defined(sgi) || defined(__sun) || defined(SCO5)) +#if !defined(HAVE_NCURSES_H) && (defined(__sun) || defined(SCO5)) #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ typedef chtype attr_t; /* No attr_t type is available */ #endif diff --git a/Modules/nismodule.c b/Modules/nismodule.c index cdda1a6a2fb7d4..1fb518af57a879 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -19,11 +19,6 @@ #include #include -#ifdef __sgi -/* This is missing from rpcsvc/ypclnt.h */ -extern int yp_get_default_domain(char **); -#endif - PyDoc_STRVAR(get_default_domain__doc__, "get_default_domain() -> str\n\ Corresponds to the C library yp_get_default_domain() call, returning\n\ diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 667a3339f5ba8e..0fc6a4bf24d6cf 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -351,16 +351,6 @@ module os [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=94a0f0f978acae17]*/ -#ifndef _MSC_VER - -#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 - -#endif /* !_MSC_VER */ - #if defined(__VXWORKS__) # include # include diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index ff1c028d0d6720..6fdf0b62767037 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -42,11 +42,6 @@ #include #endif -#ifdef __sgi -/* This is missing from unistd.h */ -extern void bzero(void *, int); -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index ed1043c0c43a50..179d289580715e 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -181,7 +181,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\ #ifdef HAVE_GETHOSTBYNAME_R # if defined(_AIX) && !defined(_LINUX_SOURCE_COMPAT) # define HAVE_GETHOSTBYNAME_R_3_ARG -# elif defined(__sun) || defined(__sgi) +# elif defined(__sun) # define HAVE_GETHOSTBYNAME_R_5_ARG # elif defined(__linux__) /* Rely on the configure script */ @@ -200,30 +200,6 @@ shutdown(how) -- shut down traffic in one or both directions\n\ # include #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) */ - -/* 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 -#include -#include -#ifdef _SS_ALIGNSIZE -#define HAVE_GETADDRINFO 1 -#define HAVE_GETNAMEINFO 1 -#endif - -#define HAVE_INET_PTON -#include -#endif - /* Solaris fails to define this variable at all. */ #if (defined(__sun) && defined(__SVR4)) && !defined(INET_ADDRSTRLEN) #define INET_ADDRSTRLEN 16 @@ -382,12 +358,7 @@ remove_unusable_flags(PyObject *m) #endif /* 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>1201 +#if defined(_MSC_VER) && _MSC_VER>1201 /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and * EAI_* constants are defined in (the already included) ws2tcpip.h. */ diff --git a/Modules/termios.c b/Modules/termios.c index 354e5ca18d04d8..faf81db47413e2 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -2,12 +2,6 @@ #include "Python.h" -/* Apparently, on SGI, termios.h won't define CTRL if _XOPEN_SOURCE - is defined, so we define it here. */ -#if defined(__sgi) -#define CTRL(c) ((c)&037) -#endif - #if defined(__sun) /* We could do better. Check issue-32660 */ #include diff --git a/Python/mystrtoul.c b/Python/mystrtoul.c index e6fe154eed611a..5910637f08e269 100644 --- a/Python/mystrtoul.c +++ b/Python/mystrtoul.c @@ -1,10 +1,6 @@ #include "Python.h" #include "pycore_long.h" // _PyLong_DigitValue -#if defined(__sgi) && !defined(_SGI_MP_SOURCE) -#define _SGI_MP_SOURCE -#endif - /* strtol and strtoul, renamed to avoid conflicts */