bpo-40268: Reformat posixmodule.c includes (GH-19536)
This commit is contained in:
parent
455df97798
commit
5eca75df03
|
@ -1,4 +1,3 @@
|
|||
|
||||
/* POSIX module implementation */
|
||||
|
||||
/* 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
|
||||
test macro, e.g. '_MSC_VER'. */
|
||||
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* 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 */
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h> /* For WNOHANG */
|
||||
# include <sys/wait.h> // WNOHANG
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_WAIT_H
|
||||
#include <linux/wait.h> // For P_PIDFD
|
||||
# include <linux/wait.h> // P_PIDFD
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
|
@ -94,7 +91,7 @@ corresponding Unix manual entries for more information on calls.");
|
|||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif /* HAVE_FCNTL_H */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GRP_H
|
||||
# include <grp.h>
|
||||
|
@ -102,7 +99,7 @@ corresponding Unix manual entries for more information on calls.");
|
|||
|
||||
#ifdef HAVE_SYSEXITS_H
|
||||
# include <sysexits.h>
|
||||
#endif /* HAVE_SYSEXITS_H */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_LOADAVG_H
|
||||
# include <sys/loadavg.h>
|
||||
|
@ -184,7 +181,8 @@ corresponding Unix manual entries for more information on calls.");
|
|||
# define HAVE_SYSTEM 1
|
||||
# include <process.h>
|
||||
#else
|
||||
#ifdef _MSC_VER /* Microsoft compiler */
|
||||
# ifdef _MSC_VER
|
||||
/* Microsoft compiler */
|
||||
# define HAVE_GETPPID 1
|
||||
# define HAVE_GETLOGIN 1
|
||||
# define HAVE_SPAWNV 1
|
||||
|
@ -330,23 +328,19 @@ extern char *ctermid_r(char *);
|
|||
|
||||
#ifdef UNION_WAIT
|
||||
/* Emulate some macros on systems that have a union instead of macros */
|
||||
|
||||
# ifndef WIFEXITED
|
||||
# define WIFEXITED(u_wait) (!(u_wait).w_termsig && !(u_wait).w_coredump)
|
||||
# endif
|
||||
|
||||
# ifndef WEXITSTATUS
|
||||
# define WEXITSTATUS(u_wait) (WIFEXITED(u_wait)?((u_wait).w_retcode):-1)
|
||||
# endif
|
||||
|
||||
# ifndef WTERMSIG
|
||||
# define WTERMSIG(u_wait) ((u_wait).w_termsig)
|
||||
# endif
|
||||
|
||||
# define WAIT_TYPE union wait
|
||||
# define WAIT_STATUS_INT(s) (s.w_status)
|
||||
|
||||
#else /* !UNION_WAIT */
|
||||
#else
|
||||
/* !UNION_WAIT */
|
||||
# define WAIT_TYPE int
|
||||
# define WAIT_STATUS_INT(s) (s)
|
||||
#endif /* UNION_WAIT */
|
||||
|
|
Loading…
Reference in New Issue