mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +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"
|
||||
#endif
|
||||
|
||||
#if !defined(EX_OK) && defined(EXIT_SUCCESS)
|
||||
# define EX_OK EXIT_SUCCESS
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* Needed for the implementation of os.statvfs */
|
||||
# include <sys/param.h>
|
||||
|
@ -292,6 +288,10 @@ corresponding Unix manual entries for more information on calls.");
|
|||
# include <sysexits.h>
|
||||
#endif
|
||||
|
||||
#if !defined(EX_OK) && defined(EXIT_SUCCESS)
|
||||
# define EX_OK EXIT_SUCCESS
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_LOADAVG_H
|
||||
# include <sys/loadavg.h>
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue