https://github.com/python/cpython/commit/65f3432ac32f92bc3d8b7b11103a56c5a70049c0 commit: 65f3432ac32f92bc3d8b7b11103a56c5a70049c0 branch: 3.13 author: Collin Funk <[email protected]> committer: vstinner <[email protected]> date: 2025-02-02T19:37:32+01:00 summary:
[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590) Previously, the macro would be redefined when the header was included. files: A Misc/NEWS.d/next/Build/2025-02-02-09-11-45.gh-issue-129539.SYXXCg.rst M Modules/posixmodule.c diff --git a/Misc/NEWS.d/next/Build/2025-02-02-09-11-45.gh-issue-129539.SYXXCg.rst b/Misc/NEWS.d/next/Build/2025-02-02-09-11-45.gh-issue-129539.SYXXCg.rst new file mode 100644 index 00000000000000..9781dc05b64823 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-02-02-09-11-45.gh-issue-129539.SYXXCg.rst @@ -0,0 +1 @@ +Don't redefine ``EX_OK`` when the system has the ``sysexits.h`` header. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 6b2cb96629dc6c..40d0f86e6aecdd 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
