bpo-40268: Reformat posixmodule.c includes (GH-19536)

This commit is contained in:
Victor Stinner 2020-04-15 15:07:31 +02:00 committed by GitHub
parent 455df97798
commit 5eca75df03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,3 @@
/* POSIX module implementation */ /* POSIX module implementation */
/* This file is also used for Windows NT/MS-Win. In that case the /* This file is also used for Windows NT/MS-Win. In that case the
@ -8,8 +7,6 @@
of the compiler used. Different compilers define their own feature of the compiler used. Different compilers define their own feature
test macro, e.g. '_MSC_VER'. */ test macro, e.g. '_MSC_VER'. */
#ifdef __APPLE__ #ifdef __APPLE__
/* /*
* Step 1 of support for weak-linking a number of symbols existing on * Step 1 of support for weak-linking a number of symbols existing on
@ -82,10 +79,10 @@ corresponding Unix manual entries for more information on calls.");
#endif /* HAVE_SYS_STAT_H */ #endif /* HAVE_SYS_STAT_H */
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> /* For WNOHANG */ # include <sys/wait.h> // WNOHANG
#endif #endif
#ifdef HAVE_LINUX_WAIT_H #ifdef HAVE_LINUX_WAIT_H
#include <linux/wait.h> // For P_PIDFD # include <linux/wait.h> // P_PIDFD
#endif #endif
#ifdef HAVE_SIGNAL_H #ifdef HAVE_SIGNAL_H
@ -94,7 +91,7 @@ corresponding Unix manual entries for more information on calls.");
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
# include <fcntl.h> # include <fcntl.h>
#endif /* HAVE_FCNTL_H */ #endif
#ifdef HAVE_GRP_H #ifdef HAVE_GRP_H
# include <grp.h> # include <grp.h>
@ -102,7 +99,7 @@ corresponding Unix manual entries for more information on calls.");
#ifdef HAVE_SYSEXITS_H #ifdef HAVE_SYSEXITS_H
# include <sysexits.h> # include <sysexits.h>
#endif /* HAVE_SYSEXITS_H */ #endif
#ifdef HAVE_SYS_LOADAVG_H #ifdef HAVE_SYS_LOADAVG_H
# include <sys/loadavg.h> # include <sys/loadavg.h>
@ -184,7 +181,8 @@ corresponding Unix manual entries for more information on calls.");
# define HAVE_SYSTEM 1 # define HAVE_SYSTEM 1
# include <process.h> # include <process.h>
#else #else
#ifdef _MSC_VER /* Microsoft compiler */ # ifdef _MSC_VER
/* Microsoft compiler */
# define HAVE_GETPPID 1 # define HAVE_GETPPID 1
# define HAVE_GETLOGIN 1 # define HAVE_GETLOGIN 1
# define HAVE_SPAWNV 1 # define HAVE_SPAWNV 1
@ -330,23 +328,19 @@ extern char *ctermid_r(char *);
#ifdef UNION_WAIT #ifdef UNION_WAIT
/* Emulate some macros on systems that have a union instead of macros */ /* Emulate some macros on systems that have a union instead of macros */
# ifndef WIFEXITED # ifndef WIFEXITED
# define WIFEXITED(u_wait) (!(u_wait).w_termsig && !(u_wait).w_coredump) # define WIFEXITED(u_wait) (!(u_wait).w_termsig && !(u_wait).w_coredump)
# endif # endif
# ifndef WEXITSTATUS # ifndef WEXITSTATUS
# define WEXITSTATUS(u_wait) (WIFEXITED(u_wait)?((u_wait).w_retcode):-1) # define WEXITSTATUS(u_wait) (WIFEXITED(u_wait)?((u_wait).w_retcode):-1)
# endif # endif
# ifndef WTERMSIG # ifndef WTERMSIG
# define WTERMSIG(u_wait) ((u_wait).w_termsig) # define WTERMSIG(u_wait) ((u_wait).w_termsig)
# endif # endif
# define WAIT_TYPE union wait # define WAIT_TYPE union wait
# define WAIT_STATUS_INT(s) (s.w_status) # define WAIT_STATUS_INT(s) (s.w_status)
#else
#else /* !UNION_WAIT */ /* !UNION_WAIT */
# define WAIT_TYPE int # define WAIT_TYPE int
# define WAIT_STATUS_INT(s) (s) # define WAIT_STATUS_INT(s) (s)
#endif /* UNION_WAIT */ #endif /* UNION_WAIT */