mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)
Previously, the macro would be redefined when the header was included.
This commit is contained in:
parent
63cae73797
commit
65f3432ac3
2 changed files with 5 additions and 4 deletions
|
@ -0,0 +1 @@
|
||||||
|
Don't redefine ``EX_OK`` when the system has the ``sysexits.h`` header.
|
|
@ -52,10 +52,6 @@
|
||||||
# include "winreparse.h"
|
# include "winreparse.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(EX_OK) && defined(EXIT_SUCCESS)
|
|
||||||
# define EX_OK EXIT_SUCCESS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
/* Needed for the implementation of os.statvfs */
|
/* Needed for the implementation of os.statvfs */
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
|
@ -292,6 +288,10 @@ corresponding Unix manual entries for more information on calls.");
|
||||||
# include <sysexits.h>
|
# include <sysexits.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(EX_OK) && defined(EXIT_SUCCESS)
|
||||||
|
# define EX_OK EXIT_SUCCESS
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SYS_LOADAVG_H
|
#ifdef HAVE_SYS_LOADAVG_H
|
||||||
# include <sys/loadavg.h>
|
# include <sys/loadavg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue