summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2006-08-21 03:50:53 (GMT)
committerdas <das>2006-08-21 03:50:53 (GMT)
commit24a1237af60c1f6ed662e89c824c6045ab7adc74 (patch)
treea37ea57297a7c0fd74c9a6f52244504abc23d32b /macosx
parentf270dbabbe5911af0a1dec442df1d7fac1a4a7a7 (diff)
downloadtcl-24a1237af60c1f6ed662e89c824c6045ab7adc74.zip
tcl-24a1237af60c1f6ed662e89c824c6045ab7adc74.tar.gz
tcl-24a1237af60c1f6ed662e89c824c6045ab7adc74.tar.bz2
add support for building without -fconstant-cfstrings, e.g. when MACOSX_DEPLOYMENT_TARGET unset. [Bug 1543715]
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tclMacOSXNotify.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index e591446..e8da55b 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.8 2006/08/21 01:08:10 das Exp $
+ * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.1.2.9 2006/08/21 03:50:53 das Exp $
*/
#include "tclInt.h"
@@ -242,8 +242,14 @@ static pthread_t notifierThread;
* notifier thread.
*/
-static const CFStringRef tclEventsOnlyRunLoopMode =
- CFSTR("com.tcltk.tclEventsOnlyRunLoopMode");
+#ifndef TCL_EVENTS_ONLY_RUN_LOOP_MODE
+#define TCL_EVENTS_ONLY_RUN_LOOP_MODE "com.tcltk.tclEventsOnlyRunLoopMode"
+#endif
+#ifdef __CONSTANT_CFSTRINGS__
+#define tclEventsOnlyRunLoopMode CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE)
+#else
+static CFStringRef tclEventsOnlyRunLoopMode = NULL;
+#endif
/*
* Static routines defined in this file.
@@ -297,6 +303,12 @@ Tcl_InitNotifier(void)
}
#endif
+#ifndef __CONSTANT_CFSTRINGS__
+ if (!tclEventsOnlyRunLoopMode) {
+ tclEventsOnlyRunLoopMode = CFSTR(TCL_EVENTS_ONLY_RUN_LOOP_MODE);
+ }
+#endif
+
/*
* Initialize CFRunLoopSource and add it to CFRunLoop of this thread.
*/