gh-110014: Include explicitly <unistd.h> header (#110155)

* Remove unused <locale.h> includes.
* Remove unused <fcntl.h> include in traceback.h.
* Remove redundant <assert.h> and <stddef.h> includes. They  are already
  included by "Python.h".
* Remove <object.h> include in faulthandler.c. Python.h already includes it.
* Add missing <stdbool.h> in pycore_pythread.h if HAVE_PTHREAD_STUBS
  is defined.
* Fix also warnings in pthread_stubs.h: don't redefine macros if they
  are already defined, like the __NEED_pthread_t macro.
This commit is contained in:
Victor Stinner 2023-09-30 22:06:45 +02:00 committed by GitHub
parent 0def8c712b
commit 7513994c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 120 additions and 59 deletions

View file

@ -40,7 +40,9 @@ Data members:
#include "osdefs.h" // DELIM
#include "stdlib_module_names.h" // _Py_stdlib_module_names
#include <locale.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h> // getpid()
#endif
#ifdef MS_WINDOWS
# define WIN32_LEAN_AND_MEAN