https://github.com/python/cpython/commit/32197d8fd1b3199de54d54e2137482270292ef91
commit: 32197d8fd1b3199de54d54e2137482270292ef91
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-11-18T22:14:34+01:00
summary:

gh-162214: Define TARGET_OS_OSX macro in Modules/_testcapi/mem.c (#162220)

Example of fixed compiler warning when building Python with -Wundef:

Modules/_testcapi/mem.c:802:5: warning: 'TARGET_OS_OSX' is not
defined, evaluates to '0' [-Wundef]
  802 | #if TARGET_OS_OSX || defined(__FreeBSD__)

files:
M Modules/_testcapi/mem.c

diff --git a/Modules/_testcapi/mem.c b/Modules/_testcapi/mem.c
index 257568172de8b19..822ae661944a24b 100644
--- a/Modules/_testcapi/mem.c
+++ b/Modules/_testcapi/mem.c
@@ -13,6 +13,8 @@
 #    include <libproc.h>            // proc_pidinfo(), PROC_PIDTASKINFO
 #    include <sys/proc_info.h>      // struct proc_taskinfo
 #  endif
+#else
+#  define TARGET_OS_OSX 0
 #endif
 
 #ifdef __FreeBSD__

_______________________________________________
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]

Reply via email to