[3.12] gh-129539: Include sysexits.h before checking EX_OK (#129590) (#129609)

[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)

Previously, the macro would be redefined when the header was included.

(cherry picked from commit 65f3432ac3)

Co-authored-by: Collin Funk <collin.funk1@gmail.com>
This commit is contained in:
Victor Stinner 2025-02-03 13:00:10 +01:00 committed by GitHub
parent eff45c9b1e
commit 6186021c14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -49,10 +49,6 @@
# include "winreparse.h"
#endif
#if !defined(EX_OK) && defined(EXIT_SUCCESS)
# define EX_OK EXIT_SUCCESS
#endif
/* On android API level 21, 'AT_EACCESS' is not declared although
* HAVE_FACCESSAT is defined. */
#ifdef __ANDROID__
@ -270,6 +266,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