diff options
author | Victor Stinner <vstinner@python.org> | 2023-09-01 19:03:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 19:03:20 (GMT) |
commit | 45b9e6a61f4cd61c08b2b02d257b52635ab37a25 (patch) | |
tree | 17bd561901193b09c5847404d51c765b7e8b9545 /Include/pyport.h | |
parent | 0e01fac315dfa705ac8a6954485546f28cf4c87d (diff) | |
download | cpython-45b9e6a61f4cd61c08b2b02d257b52635ab37a25.zip cpython-45b9e6a61f4cd61c08b2b02d257b52635ab37a25.tar.gz cpython-45b9e6a61f4cd61c08b2b02d257b52635ab37a25.tar.bz2 |
gh-108765: Move standard includes to Python.h (#108769)
* Move <ctype.h>, <limits.h> and <stdarg.h> standard includes to
Python.h.
* Move "pystats.h" include from object.h to Python.h.
* Remove redundant "pymem.h" include in objimpl.h and "pyport.h"
include in pymem.h; Python.h already includes them earlier.
* Remove redundant <wchar.h> include in unicodeobject.h; Python.h
already includes it.
* Move _SGI_MP_SOURCE define from Python.h to pyport.h.
* pycore_condvar.h includes explicitly <unistd.h> for the
_POSIX_THREADS macro.
Diffstat (limited to 'Include/pyport.h')
-rw-r--r-- | Include/pyport.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Include/pyport.h b/Include/pyport.h index 115b54f..511c3fd 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -1,13 +1,8 @@ #ifndef Py_PYPORT_H #define Py_PYPORT_H -#include "pyconfig.h" /* include for defines */ - -#include <inttypes.h> - -#include <limits.h> #ifndef UCHAR_MAX -# error "limits.h must define UCHAR_MAX" +# error "<limits.h> header must define UCHAR_MAX" #endif #if UCHAR_MAX != 255 # error "Python's source code assumes C's unsigned char is an 8-bit type" @@ -771,4 +766,8 @@ extern char * _getpty(int *, int, mode_t, int); # define ALIGNOF_MAX_ALIGN_T _Alignof(long double) #endif +#if defined(__sgi) && !defined(_SGI_MP_SOURCE) +# define _SGI_MP_SOURCE +#endif + #endif /* Py_PYPORT_H */ |