diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/dtoa.c | 1 | ||||
-rw-r--r-- | Python/errors.c | 7 | ||||
-rw-r--r-- | Python/fileutils.c | 1 | ||||
-rw-r--r-- | Python/initconfig.c | 2 | ||||
-rw-r--r-- | Python/preconfig.c | 2 | ||||
-rw-r--r-- | Python/pylifecycle.c | 1 | ||||
-rw-r--r-- | Python/pystrhex.c | 4 |
7 files changed, 13 insertions, 5 deletions
diff --git a/Python/dtoa.c b/Python/dtoa.c index e629b29..6c44f68 100644 --- a/Python/dtoa.c +++ b/Python/dtoa.c @@ -119,6 +119,7 @@ #include "Python.h" #include "pycore_dtoa.h" +#include <stdlib.h> // exit() /* if PY_NO_SHORT_FLOAT_REPR is defined, then don't even try to compile the following code */ diff --git a/Python/errors.c b/Python/errors.c index f072c21..519f2d4 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -15,12 +15,13 @@ extern char *strerror(int); #endif #endif +#include <ctype.h> #ifdef MS_WINDOWS -#include <windows.h> -#include <winbase.h> +# include <windows.h> +# include <winbase.h> +# include <stdlib.h> // _sys_nerr #endif -#include <ctype.h> #ifdef __cplusplus extern "C" { diff --git a/Python/fileutils.c b/Python/fileutils.c index a364159..173d34d 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -3,6 +3,7 @@ #include "pycore_runtime.h" // _PyRuntime #include "osdefs.h" // SEP #include <locale.h> +#include <stdlib.h> // mbstowcs() #ifdef MS_WINDOWS # include <malloc.h> diff --git a/Python/initconfig.c b/Python/initconfig.c index ba6d19d..b0d54b0 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -10,7 +10,9 @@ #include "pycore_pystate.h" // _PyThreadState_GET() #include "osdefs.h" // DELIM + #include <locale.h> // setlocale() +#include <stdlib.h> // getenv() #if defined(MS_WINDOWS) || defined(__CYGWIN__) # ifdef HAVE_IO_H # include <io.h> diff --git a/Python/preconfig.c b/Python/preconfig.c index d592731..afa16cc 100644 --- a/Python/preconfig.c +++ b/Python/preconfig.c @@ -4,7 +4,9 @@ #include "pycore_initconfig.h" // _PyArgv #include "pycore_pymem.h" // _PyMem_GetAllocatorName() #include "pycore_runtime.h" // _PyRuntime_Initialize() + #include <locale.h> // setlocale() +#include <stdlib.h> // getenv() /* Forward declarations */ diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index c67a9b7..c5a209a 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -16,6 +16,7 @@ #include "pycore_traceback.h" // _Py_DumpTracebackThreads() #include <locale.h> // setlocale() +#include <stdlib.h> // getenv() #if defined(__APPLE__) #include <mach-o/loader.h> diff --git a/Python/pystrhex.c b/Python/pystrhex.c index f7fe3b6..880af44 100644 --- a/Python/pystrhex.c +++ b/Python/pystrhex.c @@ -1,8 +1,8 @@ /* Format bytes as hexadecimal */ #include "Python.h" -#include "pycore_strhex.h" // _Py_strhex_with_sep() - +#include "pycore_strhex.h" // _Py_strhex_with_sep() +#include <stdlib.h> // abs() static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, int bytes_per_sep_group, |