File tree 10 files changed +22
-24
lines changed
10 files changed +22
-24
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef Py_BUILD_CORE_BUILTIN
2
2
# define Py_BUILD_CORE_MODULE 1
3
3
#endif
4
+
4
5
#include <Python.h>
5
6
#include <ffi.h>
6
7
#ifdef MS_WIN32
7
- #include <windows.h>
8
+ # include <windows.h>
8
9
#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
14
15
#endif
15
16
#include "ctypes.h"
16
17
Original file line number Diff line number Diff line change 8
8
#include "pycore_pystate.h"
9
9
#include "pycore_signal.h" // _Py_RestoreSignals()
10
10
#if defined(HAVE_PIPE2 ) && !defined(_GNU_SOURCE )
11
- # define _GNU_SOURCE
11
+ # define _GNU_SOURCE
12
12
#endif
13
- #include <unistd.h>
13
+ #include <unistd.h> // close()
14
14
#include <fcntl.h>
15
15
#ifdef HAVE_SYS_TYPES_H
16
16
#include <sys/types.h>
Original file line number Diff line number Diff line change 24
24
#include <float.h> // FLT_MAX
25
25
#include <signal.h>
26
26
#include <stddef.h> // offsetof()
27
- #ifndef MS_WINDOWS
28
- # include <unistd.h>
29
- #endif
30
27
31
28
#ifdef HAVE_SYS_WAIT_H
32
29
# include <sys/wait.h> // W_STOPCODE
Original file line number Diff line number Diff line change 28
28
#include "pycore_fileutils.h" // _Py_stat_struct
29
29
30
30
#include <stddef.h> // offsetof()
31
- #include <unistd.h> // close()
31
+ #ifndef MS_WINDOWS
32
+ # include <unistd.h> // close()
33
+ #endif
32
34
33
35
// to support MS_WINDOWS_SYSTEM OpenFileMappingA / CreateFileMappingA
34
36
// 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.");
289
289
#endif
290
290
291
291
#ifdef HAVE_COPY_FILE_RANGE
292
- # include <unistd.h>
292
+ # include <unistd.h> // copy_file_range()
293
293
#endif
294
294
295
295
#if !defined(CPU_ALLOC ) && defined(HAVE_SCHED_SETAFFINITY )
Original file line number Diff line number Diff line change 7
7
#include <pwd.h> // getpwuid()
8
8
#include <unistd.h> // sysconf()
9
9
10
-
11
10
#include "clinic/pwdmodule.c.h"
12
11
/*[clinic input]
13
12
module pwd
Original file line number Diff line number Diff line change 1
-
2
1
#include "Python.h"
3
- #include <sys/resource.h>
2
+ #include <errno.h> // errno
3
+ #include <string.h>
4
+ #include <sys/resource.h> // getrusage()
4
5
#ifdef HAVE_SYS_TIME_H
5
- #include <sys/time.h>
6
+ # include <sys/time.h>
6
7
#endif
7
8
#include <time.h>
8
- #include <string.h>
9
- #include <errno.h>
10
9
#include <unistd.h>
11
10
12
11
/* 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\
269
269
#ifdef HAVE_NETDB_H
270
270
# include <netdb.h>
271
271
#endif
272
- # include <unistd.h>
272
+ #include <unistd.h> // close()
273
273
274
274
/* Headers needed for inet_ntoa() and inet_addr() */
275
275
# include <arpa/inet.h>
Original file line number Diff line number Diff line change 19
19
#include <sys/types.h>
20
20
#include <sys/stat.h>
21
21
#ifndef MS_WINDOWS
22
- #include <unistd.h>
22
+ # include <unistd.h>
23
23
#endif
24
24
25
25
uint32_t _Py_next_func_version = 1 ;
Original file line number Diff line number Diff line change 11
11
* Return fd2 if all went well; return BADEXIT otherwise.
12
12
*/
13
13
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()
17
17
18
18
#define BADEXIT -1
19
19
You can’t perform that action at this time.
0 commit comments