FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-114099: Modify preprocessor symbol usage to support older macOS SDKs by freakboy3742 · Pull Request #118073 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (3) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
iOS preprocessor symbol usage was made compatible with older macOS SDKs.
8 changes: 5 additions & 3 deletions Misc/platform_triplet.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,9 @@ PLATFORM_TRIPLET=i386-gnu
# endif
#elif defined(__APPLE__)
# include "TargetConditionals.h"
# if TARGET_OS_IOS
# if TARGET_OS_SIMULATOR
// Older macOS SDKs do not define TARGET_OS_*
# if defined(TARGET_OS_IOS) && TARGET_OS_IOS
# if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR
# if __x86_64__
PLATFORM_TRIPLET=x86_64-iphonesimulator
# else
Expand All @@ -256,7 +257,8 @@ PLATFORM_TRIPLET=arm64-iphonesimulator
# else
PLATFORM_TRIPLET=arm64-iphoneos
# endif
# elif TARGET_OS_OSX
// Older macOS SDKs do not define TARGET_OS_OSX
# elif !defined(TARGET_OS_OSX) || TARGET_OS_OSX
PLATFORM_TRIPLET=darwin
# else
# error unknown Apple platform
Expand Down
4 changes: 4 additions & 0 deletions Modules/_testexternalinspection.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

#if defined(__APPLE__)
# include <TargetConditionals.h>
// Older macOS SDKs do not define TARGET_OS_OSX
# if !defined(TARGET_OS_OSX)
# define TARGET_OS_OSX 1
# endif
# if TARGET_OS_OSX
# include <libproc.h>
# include <mach-o/fat.h>
Expand Down
3 changes: 2 additions & 1 deletion Python/marshal.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ module marshal
#elif defined(__wasi__)
# define MAX_MARSHAL_STACK_DEPTH 1500
// TARGET_OS_IPHONE covers any non-macOS Apple platform.
#elif defined(__APPLE__) && TARGET_OS_IPHONE
// It won't be defined on older macOS SDKs
#elif defined(__APPLE__) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
# define MAX_MARSHAL_STACK_DEPTH 1500
#else
# define MAX_MARSHAL_STACK_DEPTH 2000
Expand Down

Back | FazBrowse Home | New Git URL