diff options
author | das <das@noemail.net> | 2006-08-21 03:50:49 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2006-08-21 03:50:49 (GMT) |
commit | 4c47953b3c1fb4800308730b8647b9323ca68176 (patch) | |
tree | 720b2405851b55ac3652e7da2a853eb7bf64199a /macosx | |
parent | b8303930e8a0cc11e07294b9e41b9d65e82fe3f2 (diff) | |
download | tcl-4c47953b3c1fb4800308730b8647b9323ca68176.zip tcl-4c47953b3c1fb4800308730b8647b9323ca68176.tar.gz tcl-4c47953b3c1fb4800308730b8647b9323ca68176.tar.bz2 |
add support for building without -fconstant-cfstrings, e.g. when MACOSX_DEPLOYMENT_TARGET unset. [Bug 1543715]
FossilOrigin-Name: d5ab9428b4e6ac2056dd5b74e925498da2997add
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tclMacOSXNotify.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 73b1c92..23b858b 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.10 2006/08/21 01:08:03 das Exp $ + * RCS: @(#) $Id: tclMacOSXNotify.c,v 1.11 2006/08/21 03:50:50 das Exp $ */ #include "tclInt.h" @@ -241,8 +241,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. @@ -296,6 +302,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. */ |