Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Include/internal/pycore_fileutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ extern void _Py_skiproot(const wchar_t *path, Py_ssize_t size, Py_ssize_t *drvsi
// _Py_BEGIN_SUPPRESS_IPH
// ...
// _Py_END_SUPPRESS_IPH
#if defined _MSC_VER && _MSC_VER >= 1900
#if defined _MSC_VER

# include <stdlib.h> // _set_thread_local_invalid_parameter_handler()

Expand All @@ -294,7 +294,7 @@ extern void _Py_skiproot(const wchar_t *path, Py_ssize_t size, Py_ssize_t *drvsi
#else
# define _Py_BEGIN_SUPPRESS_IPH
# define _Py_END_SUPPRESS_IPH
#endif /* _MSC_VER >= 1900 */
#endif /* _MSC_VER */

// Export for 'select' shared extension (Argument Clinic code)
PyAPI_FUNC(int) _PyLong_FileDescriptor_Converter(PyObject *, void *);
Expand Down
2 changes: 0 additions & 2 deletions Include/pymacconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#undef DOUBLE_IS_BIG_ENDIAN_IEEE754
#undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
#undef HAVE_GCC_ASM_FOR_X87
#undef HAVE_GCC_ASM_FOR_X64

#undef VA_LIST_IS_ARRAY
#if defined(__LP64__) && defined(__x86_64__)
Expand Down Expand Up @@ -79,7 +78,6 @@
#if defined(__i386__) || defined(__x86_64__)
# define HAVE_GCC_ASM_FOR_X87
# define ALIGNOF_MAX_ALIGN_T 16
# define HAVE_GCC_ASM_FOR_X64 1
# define SIZEOF_LONG_DOUBLE 16
#else
# define ALIGNOF_MAX_ALIGN_T 8
Expand Down
4 changes: 0 additions & 4 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,6 @@ extern "C" {
# endif
#endif

#if defined(__sgi) && !defined(_SGI_MP_SOURCE)
# define _SGI_MP_SOURCE
#endif

// Explicit fallthrough in switch case to avoid warnings
// with compiler flag -Wimplicit-fallthrough.
//
Expand Down
4 changes: 2 additions & 2 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,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 <term.h>
Expand All @@ -120,7 +120,7 @@ static const char PyCursesVersion[] = "2.2";
#include <langinfo.h>
#endif

#if !defined(NCURSES_VERSION) && (defined(sgi) || defined(__sun) || defined(SCO5))
#if !defined(NCURSES_VERSION) && (defined(__sun) || defined(SCO5))
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
typedef chtype attr_t; /* No attr_t type is available */
#endif
Expand Down
7 changes: 0 additions & 7 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,6 @@
#endif


#if !defined(_MSC_VER) && 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


#if defined(__VXWORKS__)
# include <vxCpuLib.h>
# include <rtpLib.h>
Expand Down
5 changes: 0 additions & 5 deletions Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@
#include <sys/poll.h>
#endif

#ifdef __sgi
/* This is missing from unistd.h */
extern void bzero(void *, int);
#endif

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Expand Down
34 changes: 3 additions & 31 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,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 */
Expand All @@ -216,29 +216,6 @@ shutdown(how) -- shut down traffic in one or both directions\n\
# include <netbt/sco.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) */

/* 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 // __sgi

/* Solaris fails to define this variable at all. */
#if (defined(__sun) && defined(__SVR4)) && !defined(INET_ADDRSTRLEN)
#define INET_ADDRSTRLEN 16
Expand Down Expand Up @@ -418,13 +395,8 @@ 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
/* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and
#if defined(_MSC_VER)
/* Do not include addrinfo.h for MSVC. 'addrinfo' and
* EAI_* constants are defined in (the already included) ws2tcpip.h.
*/
#else
Expand Down
6 changes: 0 additions & 6 deletions Modules/termios.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
# include <sys/termio.h>
#endif

// 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

// We could do better. Check bpo-32660
#if defined(__sun)
# include <sys/filio.h>
Expand Down
6 changes: 3 additions & 3 deletions Modules/timemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,14 +854,14 @@ time_strftime1(time_char **outbuf, size_t *bufsize,
return NULL;
}
*outbuf = tmp;
#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
#if defined _MSC_VER && defined(__STDC_SECURE_LIB__)
errno = 0;
#endif
_Py_BEGIN_SUPPRESS_IPH
buflen = format_time(*outbuf, *bufsize, format, tm);
_Py_END_SUPPRESS_IPH
#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
/* VisualStudio .NET 2005 does this properly */
#if defined _MSC_VER && defined(__STDC_SECURE_LIB__)
/* The secure CRT reports invalid format strings with EINVAL. */
if (buflen == 0 && errno == EINVAL) {
PyErr_SetString(PyExc_ValueError, "Invalid format string");
return NULL;
Expand Down
8 changes: 2 additions & 6 deletions PC/invalid_parameter_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

#include <stdlib.h>

#if _MSC_VER >= 1900
/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
* macros. It does not need to be defined when building using MSVC
* earlier than 14.0 (_MSC_VER == 1900).
/* pycore_fileutils.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
* macros.
*/

static void __cdecl _silent_invalid_parameter_handler(
Expand All @@ -18,5 +16,3 @@ static void __cdecl _silent_invalid_parameter_handler(
_invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler;

#endif

#endif
32 changes: 2 additions & 30 deletions PC/pyconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ WIN32 is still required for the locale module.

#define HAVE_IO_H
#define HAVE_SYS_UTIME_H
#define HAVE_TEMPNAM
#define HAVE_TMPFILE
#define HAVE_TMPNAM
#define HAVE_CLOCK
#define HAVE_STRERROR

Expand Down Expand Up @@ -254,11 +252,7 @@ typedef _W64 int Py_ssize_t;

typedef int pid_t;

/* define some ANSI types that are not defined in earlier Win headers */
#if _MSC_VER >= 1200
/* This file only exists in VC 6.0 or higher */
#include <basetsd.h>
#endif

#endif /* _MSC_VER */

Expand Down Expand Up @@ -385,8 +379,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
# define SIZEOF_HKEY 4
# define SIZEOF_SIZE_T 4
# define ALIGNOF_SIZE_T 4
/* MS VS2005 changes time_t to a 64-bit type on all platforms */
# if defined(_MSC_VER) && _MSC_VER >= 1400
# if defined(_MSC_VER)
# define SIZEOF_TIME_T 8
# else
# define SIZEOF_TIME_T 4
Expand All @@ -404,18 +397,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4

/* VC 7.1 has them and VC 6.0 does not. VC 6.0 has a version number of 1200.
Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't
define these.
If some compiler does not provide them, modify the #if appropriately. */
#if defined(_MSC_VER)
#if _MSC_VER > 1300
#define HAVE_UINTPTR_T 1
#define HAVE_INTPTR_T 1
#else
/* VC6, VS 2002 and eVC4 don't support the C99 LL suffix for 64-bit integer literals */
#define Py_LL(x) x##I64
#endif /* _MSC_VER > 1300 */
#endif /* _MSC_VER */

#endif
Expand Down Expand Up @@ -522,9 +506,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if you have the putenv function. */
#define HAVE_PUTENV

/* Define if your compiler supports function prototypes */
#define HAVE_PROTOTYPES

/* Define if you can safely include both <sys/select.h> and <sys/time.h>
(which you can't on SCO ODT 3.0). */
/* #undef SYS_SELECT_WITH_SYS_TIME */
Expand Down Expand Up @@ -554,9 +535,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define when any dynamic module loading is enabled */
#define HAVE_DYNAMIC_LOADING

/* Define if you have ftime. */
#define HAVE_FTIME

/* Define if you have getpeername. */
#define HAVE_GETPEERNAME

Expand All @@ -569,9 +547,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if you have gettimeofday. */
/* #undef HAVE_GETTIMEOFDAY */

/* Define if you have getwd. */
/* #undef HAVE_GETWD */

/* Define if you have lstat. */
/* #undef HAVE_LSTAT */

Expand Down Expand Up @@ -624,7 +599,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* #undef HAVE_WAITPID */

/* Define to 1 if you have the `wcsftime' function. */
#if defined(_MSC_VER) && _MSC_VER >= 1310
#if defined(_MSC_VER)
#define HAVE_WCSFTIME 1
#endif

Expand Down Expand Up @@ -655,9 +630,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1

/* Define if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */

/* Define if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */

Expand Down
9 changes: 0 additions & 9 deletions Python/dynload_shlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
#include <sys/types.h>
#include <sys/stat.h>

#if defined(__NetBSD__)
#include <sys/param.h>
#if (NetBSD < 199712)
#include <nlist.h>
#include <link.h>
#define dlerror() "error in dynamic linking"
#endif
#endif /* NetBSD */

#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
Expand Down
4 changes: 0 additions & 4 deletions Python/mystrtoul.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,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 */


Expand Down
6 changes: 3 additions & 3 deletions Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3991,8 +3991,8 @@ PyOS_getsig(int sig)
return context.sa_handler;
#else
PyOS_sighandler_t handler;
/* Special signal handling for the secure CRT in Visual Studio 2005 */
#if defined(_MSC_VER) && _MSC_VER >= 1400
/* Special signal handling for the secure CRT */
#if defined(_MSC_VER)
switch (sig) {
/* Only these signals are valid */
case SIGINT:
Expand All @@ -4007,7 +4007,7 @@ PyOS_getsig(int sig)
default:
return SIG_ERR;
}
#endif /* _MSC_VER && _MSC_VER >= 1400 */
#endif /* _MSC_VER */
handler = signal(sig, SIG_IGN);
if (handler != SIG_ERR)
signal(sig, handler);
Expand Down
Loading
Loading