summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes_test.c2
-rw-r--r--Modules/_gdbmmodule.c7
-rw-r--r--Modules/_lzmamodule.c1
-rw-r--r--Modules/_pickle.c2
-rw-r--r--Modules/_tracemalloc.c3
-rw-r--r--Modules/faulthandler.c7
-rw-r--r--Modules/getpath.c3
-rw-r--r--Modules/nismodule.c1
-rw-r--r--Modules/ossaudiodev.c1
-rw-r--r--Modules/posixmodule.c3
-rw-r--r--Modules/readline.c6
11 files changed, 27 insertions, 9 deletions
diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c
index a33d15d..770c96c 100644
--- a/Modules/_ctypes/_ctypes_test.c
+++ b/Modules/_ctypes/_ctypes_test.c
@@ -4,6 +4,8 @@
#include <windows.h>
#endif
+#include <stdlib.h> // qsort()
+
#define EXPORT(x) Py_EXPORTED_SYMBOL x
/* some functions handy for testing */
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
index efbf331..445500c 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -5,11 +5,12 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "gdbm.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
-#include "gdbm.h"
+#include <stdlib.h> // free()
+#include <sys/stat.h>
+#include <sys/types.h>
#if defined(WIN32) && !defined(__CYGWIN__)
#include "gdbmerrno.h"
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
index a7156ec..e50f55b 100644
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -10,6 +10,7 @@
#include "Python.h"
#include "structmember.h" // PyMemberDef
+#include <stdlib.h> // free()
#include <string.h>
#include <lzma.h>
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index e693b50..b513169 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -12,6 +12,8 @@
#include "pycore_moduleobject.h" // _PyModule_GetState()
#include "structmember.h" // PyMemberDef
+#include <stdlib.h> // strtol()
+
PyDoc_STRVAR(pickle_module_doc,
"Optimized C implementation for the Python pickle module.");
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 9ba0ebb..09d273a 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -5,7 +5,10 @@
#include "pycore_hashtable.h"
#include <pycore_frame.h>
+#include <stdlib.h> // malloc()
+
#include "clinic/_tracemalloc.c.h"
+
/*[clinic input]
module _tracemalloc
[clinic start generated code]*/
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 868b4f4..cb2e258 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -3,10 +3,13 @@
#include "pycore_pyerrors.h" // _Py_DumpExtensionModules
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_traceback.h" // _Py_DumpTracebackThreads
-#include <signal.h>
+
+#include "frameobject.h"
+
#include <object.h>
-#include <frameobject.h>
#include <signal.h>
+#include <signal.h>
+#include <stdlib.h> // abort()
#if defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK)
# include <pthread.h>
#endif
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 22e5ef2..1405023 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -6,8 +6,9 @@
#include "pycore_pathconfig.h"
#include "osdefs.h" // DELIM
-#include <sys/types.h>
+#include <stdlib.h> // getenv()
#include <string.h>
+#include <sys/types.h>
#ifdef __APPLE__
# include <mach-o/dyld.h>
diff --git a/Modules/nismodule.c b/Modules/nismodule.c
index 6655451..cdda1a6 100644
--- a/Modules/nismodule.c
+++ b/Modules/nismodule.c
@@ -12,6 +12,7 @@
#include "Python.h"
+#include <stdlib.h> // free()
#include <sys/time.h>
#include <sys/types.h>
#include <rpc/rpc.h>
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 4f2d9cb..4bab9a5 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -21,6 +21,7 @@
#include "Python.h"
#include "structmember.h" // PyMemberDef
+#include <stdlib.h> // getenv()
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#else
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9c174ee..667a333 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -46,7 +46,8 @@
# undef HAVE_FACCESSAT
#endif
-#include <stdio.h> /* needed for ctermid() */
+#include <stdio.h> // ctermid()
+#include <stdlib.h> // system()
/*
* A number of APIs are available on macOS from a certain macOS version.
diff --git a/Modules/readline.c b/Modules/readline.c
index c79d22f..1b616fc 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -6,9 +6,11 @@
/* Standard definitions */
#include "Python.h"
-#include <stddef.h>
-#include <signal.h>
+
#include <errno.h>
+#include <signal.h>
+#include <stddef.h>
+#include <stdlib.h> // free()
#include <sys/time.h>
#if defined(HAVE_SETLOCALE)