Skip to content

Commit ef9b1e9

Browse files
authored
Merge pull request matplotlib#18669 from QuLogic/min-macosx
Rework checks for old macosx
2 parents 2f0f7b4 + c74d4e9 commit ef9b1e9

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/_macosx.m

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
#endif
1111

1212
/* Proper way to check for the OS X version we are compiling for, from
13-
http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development */
13+
* https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html
14+
*/
1415
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1516
#define COMPILING_FOR_10_7
1617
#endif
17-
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
18+
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
1819
#define COMPILING_FOR_10_10
1920
#endif
2021

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

48-
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101400
49+
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
4950
/* A few more deprecations in Mojave */
5051
#define NSButtonTypeMomentaryLight NSMomentaryLightButton
5152
#define NSButtonTypePushOnPushOff NSPushOnPushOffButton
5253
#define NSBezelStyleShadowlessSquare NSShadowlessSquareBezelStyle
5354
#define CGContext graphicsPort
5455
#endif
5556

56-
/* CGFloat was defined in Mac OS X 10.5 */
57-
#ifndef CGFLOAT_DEFINED
58-
#define CGFloat float
59-
#endif
60-
6157

6258
/* Various NSApplicationDefined event subtypes */
6359
#define STOP_EVENT_LOOP 2

0 commit comments

Comments
 (0)