Subject: Fix build errors on i386 for Cocoa; thanks to Marc Culler for patch

From: Kevin Walzer <[email-masked]>
Date: Sun, 31 Jan 2016 00:54:18 +0000

---
 macosx/tkMacOSXButton.c  | 4 ++--
 macosx/tkMacOSXInit.c    | 2 --
 macosx/tkMacOSXPrivate.h | 3 +++
 macosx/ttkMacOSXTheme.c  | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index adb78c6..35f4ab5 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -289,10 +289,10 @@ TkpComputeButtonGeometry(
     if ( butPtr->indicatorOn ) {
       switch (butPtr->type) {
       case TYPE_RADIO_BUTTON:
-	GetThemeMetric(kThemeMetricRadioButtonWidth, &butPtr->indicatorDiameter);
+	GetThemeMetric(kThemeMetricRadioButtonWidth, (SInt32 *)&butPtr->indicatorDiameter);
 	  break;
       case TYPE_CHECK_BUTTON:
-	GetThemeMetric(kThemeMetricCheckBoxWidth, &butPtr->indicatorDiameter);
+	GetThemeMetric(kThemeMetricCheckBoxWidth, (SInt32 *)&butPtr->indicatorDiameter);
 	  break;
       default:
 	break;
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 26eb3f5..8e353b4 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -59,9 +59,7 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
 @end
 
 @implementation TKApplication
-#ifndef __clang__
 @synthesize poolProtected = _poolProtected;
-#endif
 @end
 
 @implementation TKApplication(TKInit)
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index e635020..d892f4e 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -274,6 +274,9 @@ VISIBILITY_HIDDEN
     NSArray *_defaultHelpMenuItems;
     NSWindow *_windowWithMouse;
     NSAutoreleasePool *_mainPool;
+#ifdef __i386__
+    BOOL _poolProtected;
+#endif
 }
 @property BOOL poolProtected;
 @end
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 87ec4c2..1997370 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -299,7 +299,7 @@ static void TabElementSize(
     void *clientData, void *elementRecord, Tk_Window tkwin,
     int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
 {
-     *heightPtr = GetThemeMetric(kThemeMetricLargeTabHeight, heightPtr);
+    GetThemeMetric(kThemeMetricLargeTabHeight, (SInt32 *)heightPtr);
      *paddingPtr = Ttk_MakePadding(0, 0, 0, 2);
 
 }
-- 
cgit v0.12