summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2007-01-19 01:05:49 (GMT)
committerdas <das>2007-01-19 01:05:49 (GMT)
commit690f5c8195ae88f99ecac399e39ab6f2b3c0465b (patch)
treeb2b9c20e338ad125a57c7b21002cd723febbec04 /macosx
parent021ed85823b1ff89bf759905a46d700de9744b6b (diff)
downloadtcl-690f5c8195ae88f99ecac399e39ab6f2b3c0465b.zip
tcl-690f5c8195ae88f99ecac399e39ab6f2b3c0465b.tar.gz
tcl-690f5c8195ae88f99ecac399e39ab6f2b3c0465b.tar.bz2
* macosx/tclMacOSXNotify.c: accommodate changes to prototypes of
OSSpinLock(Un)Lock API. * tests/env.test: add extra system env vars that need to be preserved on some Mac OS X versions for testsuite to work. * unix/tcl.m4: ensure CPPFLAGS env var is used when set. [Bug 1586861] (Darwin): add -isysroot and -mmacosx-version-min flags to CPPFLAGS when present in CFLAGS to avoid discrepancies between what headers configure sees during preprocessing tests and compiling tests. * unix/configure: autoconf-2.13
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tclMacOSXNotify.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index e8da55b..3c89d20 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.1.2.9 2006/08/21 03:50:53 das Exp $
+ * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.1.2.10 2007/01/19 01:05:50 das Exp $
*/
#include "tclInt.h"
@@ -169,12 +169,18 @@ static int receivePipe = -1; /* Output end of triggerPipe */
* Support for weakly importing spinlock API.
*/
#define WEAK_IMPORT_SPINLOCKLOCK
-extern void OSSpinLockLock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
-extern void OSSpinLockUnlock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
-extern void _spin_lock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
-extern void _spin_unlock(OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
-static void (* lockLock)(OSSpinLock *lock) = NULL;
-static void (* lockUnlock)(OSSpinLock *lock) = NULL;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+#define VOLATILE volatile
+#else
+#define VOLATILE
+#endif
+extern void OSSpinLockLock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
+extern void OSSpinLockUnlock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
+extern void _spin_lock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
+extern void _spin_unlock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE;
+static void (* lockLock)(VOLATILE OSSpinLock *lock) = NULL;
+static void (* lockUnlock)(VOLATILE OSSpinLock *lock) = NULL;
+#undef VOLATILE
static pthread_once_t spinLockLockInitControl = PTHREAD_ONCE_INIT;
static void SpinLockLockInit(void) {
lockLock = OSSpinLockLock != NULL ? OSSpinLockLock : _spin_lock;