From 6b7189fe67176362caeb0a64936b14ff7783a30a Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Tue, 21 Oct 2014 15:00:47 +0000 Subject: Fix for Mac crash on Yosemite because of changes in version checking --- macosx/tkMacOSXInit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 2bf1962..1d14990 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -225,11 +225,16 @@ TkpInit( if (!uname(&name)) { tkMacOSXMacOSXVersion = (strtod(name.release, NULL) + 96) * 10; } - if (tkMacOSXMacOSXVersion && + /*Check for new versioning scheme on Yosemite (10.10) and later.*/ + if (MAC_OS_X_VERSION_MIN_REQUIRED > 100000) { + tkMacOSXMacOSXVersion = MAC_OS_X_VERSION_MIN_REQUIRED/100; + } + if (tkMacOSXMacOSXVersion && MAC_OS_X_VERSION_MIN_REQUIRED < 100000 && tkMacOSXMacOSXVersion/10 < MAC_OS_X_VERSION_MIN_REQUIRED/10) { Tcl_Panic("Mac OS X 10.%d or later required !", (MAC_OS_X_VERSION_MIN_REQUIRED/10)-100); } + #ifdef TK_FRAMEWORK /* -- cgit v0.12 From 3da1bdd7794af6f2179dc7a61d3358fd33578d2f Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 21 Oct 2014 18:32:54 +0000 Subject: Restore the use of -DTCL_NO_DEPRECATED when building Tk. Without this, attempts to build with the latest Xcode tools fail because of a conflict between the long (long long long long) deprecated macro panic() from Tcl's header and a panic() prototype in the system mach.h file, which rides into the build on the tails of Cocoa.h --- unix/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 1fde28d..d869528 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -186,7 +186,7 @@ KEYSYM_FLAGS = # Tk does not used deprecated Tcl constructs so it should # compile fine with -DTCL_NO_DEPRECATED. To remove its own # set of deprecated code uncomment the second line. -NO_DEPRECATED_FLAGS = +NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED #NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED # Some versions of make, like SGI's, use the following variable to -- cgit v0.12