File tree Expand file tree Collapse file tree 10 files changed +22
-24
lines changed Expand file tree Collapse file tree 10 files changed +22
-24
lines changed Original file line number Diff line number Diff line change 11#ifndef Py_BUILD_CORE_BUILTIN
22# define Py_BUILD_CORE_MODULE 1
33#endif
4+
45#include <Python.h>
56#include <ffi.h>
67#ifdef MS_WIN32
7- #include <windows.h>
8+ # include <windows.h>
89#else
9- #include <sys/mman.h>
10- #include <unistd.h>
11- # if !defined(MAP_ANONYMOUS ) && defined(MAP_ANON )
12- # define MAP_ANONYMOUS MAP_ANON
13- # endif
10+ # include <sys/mman.h>
11+ # include <unistd.h>
12+ # if !defined(MAP_ANONYMOUS ) && defined(MAP_ANON )
13+ # define MAP_ANONYMOUS MAP_ANON
14+ # endif
1415#endif
1516#include "ctypes.h"
1617
Original file line number Diff line number Diff line change 88#include "pycore_pystate.h"
99#include "pycore_signal.h" // _Py_RestoreSignals()
1010#if defined(HAVE_PIPE2 ) && !defined(_GNU_SOURCE )
11- # define _GNU_SOURCE
11+ # define _GNU_SOURCE
1212#endif
13- #include <unistd.h>
13+ #include <unistd.h> // close()
1414#include <fcntl.h>
1515#ifdef HAVE_SYS_TYPES_H
1616#include <sys/types.h>
Original file line number Diff line number Diff line change 2424#include <float.h> // FLT_MAX
2525#include <signal.h>
2626#include <stddef.h> // offsetof()
27- #ifndef MS_WINDOWS
28- # include <unistd.h>
29- #endif
3027
3128#ifdef HAVE_SYS_WAIT_H
3229# include <sys/wait.h> // W_STOPCODE
Original file line number Diff line number Diff line change 2828#include "pycore_fileutils.h" // _Py_stat_struct
2929
3030#include <stddef.h> // offsetof()
31- #include <unistd.h> // close()
31+ #ifndef MS_WINDOWS
32+ # include <unistd.h> // close()
33+ #endif
3234
3335// to support MS_WINDOWS_SYSTEM OpenFileMappingA / CreateFileMappingA
3436// need to be replaced with OpenFileMappingW / CreateFileMappingW
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ corresponding Unix manual entries for more information on calls.");
289289#endif
290290
291291#ifdef HAVE_COPY_FILE_RANGE
292- # include <unistd.h>
292+ # include <unistd.h> // copy_file_range()
293293#endif
294294
295295#if !defined(CPU_ALLOC ) && defined(HAVE_SCHED_SETAFFINITY )
Original file line number Diff line number Diff line change 77#include <pwd.h> // getpwuid()
88#include <unistd.h> // sysconf()
99
10-
1110#include "clinic/pwdmodule.c.h"
1211/*[clinic input]
1312module pwd
Original file line number Diff line number Diff line change 1-
21#include "Python.h"
3- #include <sys/resource.h>
2+ #include <errno.h> // errno
3+ #include <string.h>
4+ #include <sys/resource.h> // getrusage()
45#ifdef HAVE_SYS_TIME_H
5- #include <sys/time.h>
6+ # include <sys/time.h>
67#endif
78#include <time.h>
8- #include <string.h>
9- #include <errno.h>
109#include <unistd.h>
1110
1211/* On some systems, these aren't in any header file.
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\
269269#ifdef HAVE_NETDB_H
270270# include <netdb.h>
271271#endif
272- # include <unistd.h>
272+ #include <unistd.h> // close()
273273
274274/* Headers needed for inet_ntoa() and inet_addr() */
275275# include <arpa/inet.h>
Original file line number Diff line number Diff line change 1919#include <sys/types.h>
2020#include <sys/stat.h>
2121#ifndef MS_WINDOWS
22- #include <unistd.h>
22+ # include <unistd.h>
2323#endif
2424
2525uint32_t _Py_next_func_version = 1 ;
Original file line number Diff line number Diff line change 1111 * Return fd2 if all went well; return BADEXIT otherwise.
1212 */
1313
14- #include <errno.h>
15- #include <fcntl.h>
16- #include <unistd.h>
14+ #include <errno.h> // errno
15+ #include <fcntl.h> // fcntl()
16+ #include <unistd.h> // close()
1717
1818#define BADEXIT -1
1919
You can’t perform that action at this time.
0 commit comments