mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-45434: pyport.h no longer includes <stdlib.h> (GH-28914)
Include <stdlib.h> explicitly in C files. Python.h includes <wchar.h>.
This commit is contained in:
parent
db2b6a20cd
commit
aac29af678
29 changed files with 61 additions and 21 deletions
|
@ -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 */
|
||||
|
|
|
@ -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" {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue