Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Rework checks for old macosx #18669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions 14 src/_macosx.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
#endif

/* Proper way to check for the OS X version we are compiling for, from
http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development */
* https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html
*/
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
#define COMPILING_FOR_10_7
#endif
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
#define COMPILING_FOR_10_10
#endif

#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
/* A lot of symbols were renamed in Sierra and cause deprecation warnings
so define macros for the new names if we are compiling on an older SDK */
#define NSEventMaskAny NSAnyEventMask
Expand All @@ -45,19 +46,14 @@
#define NSWindowStyleMaskTitled NSTitledWindowMask
#endif

#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101400
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
/* A few more deprecations in Mojave */
#define NSButtonTypeMomentaryLight NSMomentaryLightButton
#define NSButtonTypePushOnPushOff NSPushOnPushOffButton
#define NSBezelStyleShadowlessSquare NSShadowlessSquareBezelStyle
#define CGContext graphicsPort
#endif

/* CGFloat was defined in Mac OS X 10.5 */
#ifndef CGFLOAT_DEFINED
#define CGFloat float
#endif


/* Various NSApplicationDefined event subtypes */
#define STOP_EVENT_LOOP 2
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.