summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDebug.c
diff options
context:
space:
mode:
authordas <das>2007-03-07 23:48:08 (GMT)
committerdas <das>2007-03-07 23:48:08 (GMT)
commit7614214a0526527a62f6cc88b6560f003397c1a3 (patch)
treebadb4612c17d0114c5c4597e380a51c05a0867ab /macosx/tkMacOSXDebug.c
parent71343a18cb63f16e62500a7a3f17942ccd841684 (diff)
downloadtk-7614214a0526527a62f6cc88b6560f003397c1a3.zip
tk-7614214a0526527a62f6cc88b6560f003397c1a3.tar.gz
tk-7614214a0526527a62f6cc88b6560f003397c1a3.tar.bz2
* generic/tkMain.c (Tk_MainEx): replicate macosx-specific code from
TkpInit() that ensures the console window appears when wish is started from the OS X Finder (i.e. with stdin == /dev/null), jeffh's 2006-11-24 change rendered the corresponding code in TkpInit() ineffective in wish because Tk_MainEx() sets tcl_interactive before calling TkpInit(). * macosx/tkMacOSXDebug.c (TkMacOSXGetNamedDebugSymbol): add fix for libraries loaded with a DYLD_IMAGE_SUFFIX. * unix/tcl.m4 (Darwin): s/CFLAGS/CPPFLAGS/ in macosx-version-min check. * unix/configure: autoconf-2.13
Diffstat (limited to 'macosx/tkMacOSXDebug.c')
-rw-r--r--macosx/tkMacOSXDebug.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c
index 02c51a9..a0e1fe0 100644
--- a/macosx/tkMacOSXDebug.c
+++ b/macosx/tkMacOSXDebug.c
@@ -5,7 +5,7 @@
* regions, etc...
*
* Copyright 2001, Apple Computer, Inc.
- * Copyright (c) 2006 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.9 2006/10/31 22:33:38 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.10 2007/03/07 23:48:13 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -494,7 +494,11 @@ TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol)
if (!addr) {
const struct mach_header *mh = NULL;
uint32_t i, n = _dyld_image_count();
+ size_t module_len;
+ if (module && *module) {
+ module_len = strlen(module);
+ }
for (i = 0; i < n; i++) {
if (module && *module) {
/* Find image with given module name */
@@ -505,7 +509,7 @@ TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol)
continue;
}
name = strrchr(path, '/') + 1;
- if (strncmp(name, module, strlen(name)) != 0) {
+ if (strncmp(name, module, module_len) != 0) {
continue;
}
}