Index: ChangeLog =================================================================== RCS file: /cvsroot/tcl/tcl/ChangeLog,v retrieving revision 1.3431 diff -u -p -r1.3431 ChangeLog --- ChangeLog 14 Apr 2007 17:35:53 -0000 1.3431 +++ ChangeLog 15 Apr 2007 13:56:40 -0000 @@ -1,3 +1,39 @@ +2007-04-12 Daniel Steffen + + * generic/tclCkalloc.c: fix warnings when configured with + * generic/tclCompile.c: --enable-64bit --enable-symbols=all. + * generic/tclExecute.c: + + * unix/tclUnixFCmd.c: add workaround for crashing bug in fts_open() + * unix/tclUnixInit.c: without FTS_NOSTAT on 64bit Darwin 8 or earlier. + + * unix/tclLoadDyld.c (TclpLoadMemory): fix (void*) arithmetic. + + * macosx/tclMacOSXFCmd.c: const fixes. + + * macosx/tclMacOSXNotify.c: fix warnings. + + * macosx/Tcl-Common.xcconfig: enable more warnings. + + * macosx/Tcl.xcodeproj/project.pbxproj: add 'DebugMemCompile' build + configuration that calls configure with --enable-symbols=all; disable + configure check for __attribute__((__visibility__("hidden"))) in Debug + configuration to restore availability of ZeroLink. + + * macosx/Tcl-Common.xcconfig: fix whitespace. + * macosx/Tcl-Debug.xcconfig: + * macosx/Tcl-Release.xcconfig: + * macosx/tclMacOSXBundle.c: + + * macosx/GNUmakefile: fix/add copyright and license refs. + * macosx/Tcl-Info.plist.in: + * macosx/Wish-Info.plist.in: + * macosx/Tcl.xcode/project.pbxproj: + * macosx/Tcl.xcodeproj/project.pbxproj: + + * unix/configure.in: install license.terms into Tcl.framework. + * unix/configure: autoconf-2.59 + 2007-04-14 Miguel Sofer * generic/tclExecute.c: removed some code at INSTEXPAND_SKTOP that Index: generic/tclCkalloc.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclCkalloc.c,v retrieving revision 1.30 diff -u -p -r1.30 tclCkalloc.c --- generic/tclCkalloc.c 15 Nov 2006 20:08:43 -0000 1.30 +++ generic/tclCkalloc.c 15 Apr 2007 13:56:42 -0000 @@ -213,7 +213,7 @@ ValidateMemory( * been printed */ { unsigned char *hiPtr; - int idx; + size_t idx; int guard_failed = FALSE; int byte; @@ -223,7 +223,7 @@ ValidateMemory( guard_failed = TRUE; fflush(stdout); byte &= 0xff; - fprintf(stderr, "low guard byte %d is 0x%x \t%c\n", idx, byte, + fprintf(stderr, "low guard byte %d is 0x%x \t%c\n", (int)idx, byte, (isprint(UCHAR(byte)) ? byte : ' ')); /* INTL: bytes */ } } @@ -244,7 +244,7 @@ ValidateMemory( guard_failed = TRUE; fflush(stdout); byte &= 0xff; - fprintf(stderr, "hi guard byte %d is 0x%x \t%c\n", idx, byte, + fprintf(stderr, "hi guard byte %d is 0x%x \t%c\n", (int)idx, byte, (isprint(UCHAR(byte)) ? byte : ' ')); /* INTL: bytes */ } } Index: generic/tclCompile.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclCompile.c,v retrieving revision 1.115 diff -u -p -r1.115 tclCompile.c --- generic/tclCompile.c 10 Apr 2007 14:47:10 -0000 1.115 +++ generic/tclCompile.c 15 Apr 2007 13:56:48 -0000 @@ -3402,9 +3402,8 @@ TclPrintByteCodeObj( */ fprintf(stdout, - "\nByteCode 0x%x, refCt %u, epoch %u, interp 0x%x (epoch %u)\n", - (unsigned int) codePtr, codePtr->refCount, - codePtr->compileEpoch, (unsigned int) iPtr, + "\nByteCode 0x%p, refCt %u, epoch %u, interp 0x%p (epoch %u)\n", + codePtr, codePtr->refCount, codePtr->compileEpoch, iPtr, iPtr->compileEpoch); fprintf(stdout, " Source "); TclPrintSource(stdout, codePtr->source, @@ -3441,8 +3440,8 @@ TclPrintByteCodeObj( Proc *procPtr = codePtr->procPtr; int numCompiledLocals = procPtr->numCompiledLocals; fprintf(stdout, - " Proc 0x%x, refCt %d, args %d, compiled locals %d\n", - (unsigned int) procPtr, procPtr->refCount, procPtr->numArgs, + " Proc 0x%p, refCt %d, args %d, compiled locals %d\n", + procPtr, procPtr->refCount, procPtr->numArgs, numCompiledLocals); if (numCompiledLocals > 0) { CompiledLocal *localPtr = procPtr->firstLocalPtr; Index: generic/tclExecute.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v retrieving revision 1.276 diff -u -p -r1.276 tclExecute.c --- generic/tclExecute.c 14 Apr 2007 17:35:54 -0000 1.276 +++ generic/tclExecute.c 15 Apr 2007 13:56:56 -0000 @@ -227,7 +227,7 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_S # define TRACE(a) \ if (traceInstructions) { \ fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ - CURR_DEPTH, \ + (int)CURR_DEPTH, \ (unsigned int)(pc - codePtr->codeStart), \ GetOpcodeName(pc)); \ printf a; \ @@ -239,7 +239,7 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_S # define TRACE_WITH_OBJ(a, objPtr) \ if (traceInstructions) { \ fprintf(stdout, "%2d: %2d (%u) %s ", iPtr->numLevels, \ - CURR_DEPTH, \ + (int)CURR_DEPTH, \ (unsigned int)(pc - codePtr->codeStart), \ GetOpcodeName(pc)); \ printf a; \ @@ -1351,7 +1351,7 @@ TclExecuteByteCode( ValidatePcAndStackTop(codePtr, pc, CURR_DEPTH, initStackDepth, /*checkStack*/ (expandNestList == NULL)); if (traceInstructions) { - fprintf(stdout, "%2d: %2d ", iPtr->numLevels, CURR_DEPTH); + fprintf(stdout, "%2d: %2d ", iPtr->numLevels, (int)CURR_DEPTH); TclPrintInstruction(codePtr, pc); fflush(stdout); } @@ -3959,7 +3959,7 @@ TclExecuteByteCode( Tcl_Obj *valuePtr = OBJ_UNDER_TOS; ClientData ptr1, ptr2; int invalid, shift, type1, type2; - long l1; + long l1 = 0; result = GetNumberFromObj(NULL, valuePtr, &ptr1, &type1); if ((result != TCL_OK) @@ -5772,7 +5772,7 @@ TclExecuteByteCode( eePtr->stackPtr[++catchTop] = (Tcl_Obj *) CURR_DEPTH; TRACE(("%u => catchTop=%d, stackTop=%d\n", TclGetUInt4AtPtr(pc+1), (catchTop - initCatchTop - 1), - CURR_DEPTH)); + (int)CURR_DEPTH)); NEXT_INST_F(5, 0, 0); case INST_END_CATCH: @@ -6527,9 +6527,9 @@ TclExecuteByteCode( } #ifdef TCL_COMPILE_DEBUG if (traceInstructions) { - fprintf(stdout, " ... found catch at %d, catchTop=%d, unwound to %d, new pc %u\n", + fprintf(stdout, " ... found catch at %d, catchTop=%d, unwound to %ld, new pc %u\n", rangePtr->codeOffset, (catchTop - initCatchTop - 1), - (int) eePtr->stackPtr[catchTop], + (long) eePtr->stackPtr[catchTop], (unsigned int)(rangePtr->catchOffset)); } #endif @@ -6603,9 +6603,8 @@ PrintByteCodeInfo( Proc *procPtr = codePtr->procPtr; Interp *iPtr = (Interp *) *codePtr->interpHandle; - fprintf(stdout, "\nExecuting ByteCode 0x%x, refCt %u, epoch %u, interp 0x%x (epoch %u)\n", - (unsigned int) codePtr, codePtr->refCount, - codePtr->compileEpoch, (unsigned int) iPtr, + fprintf(stdout, "\nExecuting ByteCode 0x%p, refCt %u, epoch %u, interp 0x%p (epoch %u)\n", + codePtr, codePtr->refCount, codePtr->compileEpoch, iPtr, iPtr->compileEpoch); fprintf(stdout, " Source: "); @@ -6633,9 +6632,9 @@ PrintByteCodeInfo( #endif /* TCL_COMPILE_STATS */ if (procPtr != NULL) { fprintf(stdout, - " Proc 0x%x, refCt %d, args %d, compiled locals %d\n", - (unsigned int) procPtr, procPtr->refCount, - procPtr->numArgs, procPtr->numCompiledLocals); + " Proc 0x%p, refCt %d, args %d, compiled locals %d\n", + procPtr, procPtr->refCount, procPtr->numArgs, + procPtr->numCompiledLocals); } } #endif /* TCL_COMPILE_DEBUG */ @@ -6676,14 +6675,14 @@ ValidatePcAndStackTop( int stackUpperBound = stackLowerBound + codePtr->maxStackDepth; /* Greatest legal value for stackTop. */ unsigned int relativePc = (unsigned int) (pc - codePtr->codeStart); - unsigned int codeStart = (unsigned int) codePtr->codeStart; - unsigned int codeEnd = (unsigned int) + unsigned long codeStart = (unsigned long) codePtr->codeStart; + unsigned long codeEnd = (unsigned long) (codePtr->codeStart + codePtr->numCodeBytes); unsigned char opCode = *pc; - if (((unsigned int) pc < codeStart) || ((unsigned int) pc > codeEnd)) { - fprintf(stderr, "\nBad instruction pc 0x%x in TclExecuteByteCode\n", - (unsigned int) pc); + if (((unsigned long) pc < codeStart) || ((unsigned long) pc > codeEnd)) { + fprintf(stderr, "\nBad instruction pc 0x%p in TclExecuteByteCode\n", + pc); Tcl_Panic("TclExecuteByteCode execution failure: bad pc"); } if ((unsigned int) opCode > LAST_INST_OPCODE) { @@ -7206,8 +7205,8 @@ EvalStatsCmd( fprintf(stdout, "\n----------------------------------------------------------------\n"); fprintf(stdout, - "Compilation and execution statistics for interpreter 0x%x\n", - (unsigned int) iPtr); + "Compilation and execution statistics for interpreter 0x%p\n", + iPtr); fprintf(stdout, "\nNumber ByteCodes executed %ld\n", statsPtr->numExecutions); Index: macosx/GNUmakefile =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/GNUmakefile,v retrieving revision 1.4 diff -u -p -r1.4 GNUmakefile --- macosx/GNUmakefile 16 Oct 2006 18:41:25 -0000 1.4 +++ macosx/GNUmakefile 15 Apr 2007 13:57:00 -0000 @@ -4,6 +4,11 @@ # uses the standard unix build system in tcl/unix (which can be used directly instead of this # if you are not using the tk/macosx projects). # +# Copyright (c) 2002-2007 Daniel A. Steffen +# +# See the file "license.terms" for information on usage and redistribution of +# this file, and for a DISCLAIMER OF ALL WARRANTIES. +# # RCS: @(#) $Id: GNUmakefile,v 1.4 2006/10/16 18:41:25 das Exp $ # ######################################################################################################## Index: macosx/Tcl-Common.xcconfig =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/Tcl-Common.xcconfig,v retrieving revision 1.2 diff -u -p -r1.2 Tcl-Common.xcconfig --- macosx/Tcl-Common.xcconfig 7 Mar 2007 23:43:13 -0000 1.2 +++ macosx/Tcl-Common.xcconfig 15 Apr 2007 13:57:00 -0000 @@ -1,4 +1,4 @@ -// +// // Tcl-Common.xcconfig -- // // This file contains the Xcode build settings comon to all @@ -23,7 +23,7 @@ GCC = /usr/bin/gcc GCC_VERSION = 4.0 CC = $(GCC)-$(GCC_VERSION) WARNING_CFLAGS_GCC3 = -Wall -Wno-implicit-int -Wno-unused-parameter -Wno-deprecated-declarations -WARNING_CFLAGS = -Wextra -Wno-missing-field-initializers $(WARNING_CFLAGS_GCC3) $(WARNING_CFLAGS) +WARNING_CFLAGS = -Wextra -Wno-missing-field-initializers -Winit-self -Wpointer-arith -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS_GCC3) $(WARNING_CFLAGS) BINDIR = $(PREFIX)/bin CFLAGS = $(CFLAGS) CPPFLAGS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET) $(CPPFLAGS) Index: macosx/Tcl-Debug.xcconfig =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/Tcl-Debug.xcconfig,v retrieving revision 1.1 diff -u -p -r1.1 Tcl-Debug.xcconfig --- macosx/Tcl-Debug.xcconfig 28 Jan 2007 01:42:05 -0000 1.1 +++ macosx/Tcl-Debug.xcconfig 15 Apr 2007 13:57:00 -0000 @@ -1,4 +1,4 @@ -// +// // Tcl-Debug.xcconfig -- // // This file contains the Xcode build settings for all Debug Index: macosx/Tcl-Info.plist.in =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/Tcl-Info.plist.in,v retrieving revision 1.1 diff -u -p -r1.1 Tcl-Info.plist.in --- macosx/Tcl-Info.plist.in 23 May 2005 20:21:02 -0000 1.1 +++ macosx/Tcl-Info.plist.in 15 Apr 2007 13:57:00 -0000 @@ -1,5 +1,13 @@ + CFBundleDevelopmentRegion @@ -7,14 +15,17 @@ CFBundleExecutable @TCL_LIB_FILE@ CFBundleGetInfoString - Tcl Library @TCL_VERSION@, Copyright © @TCL_YEAR@ Tcl Core Team. -Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Copyright © 2001-2002, Apple Computer, Inc. + Tcl @TCL_VERSION@@TCL_PATCH_LEVEL@, +Copyright © @TCL_YEAR@ Tcl Core Team, +Copyright © 2001-@TCL_YEAR@ Daniel A. Steffen, +Initial MacOS X Port by Jim Ingham & Ian Reid, +Copyright © 2001-2002, Apple Computer, Inc. CFBundleIdentifier com.tcltk.tcllibrary CFBundleInfoDictionaryVersion 6.0 CFBundleName - Tcl Library @TCL_VERSION@ + Tcl @TCL_VERSION@ CFBundlePackageType FMWK CFBundleShortVersionString Index: macosx/Tcl-Release.xcconfig =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/Tcl-Release.xcconfig,v retrieving revision 1.1 diff -u -p -r1.1 Tcl-Release.xcconfig --- macosx/Tcl-Release.xcconfig 28 Jan 2007 01:42:05 -0000 1.1 +++ macosx/Tcl-Release.xcconfig 15 Apr 2007 13:57:00 -0000 @@ -1,4 +1,4 @@ -// +// // Tcl-Release.xcconfig -- // // This file contains the Xcode build settings for all Release Index: macosx/tclMacOSXBundle.c =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/tclMacOSXBundle.c,v retrieving revision 1.10 diff -u -p -r1.10 tclMacOSXBundle.c --- macosx/tclMacOSXBundle.c 27 Nov 2005 02:33:49 -0000 1.10 +++ macosx/tclMacOSXBundle.c 15 Apr 2007 13:57:00 -0000 @@ -4,7 +4,11 @@ * This file implements functions that inspect CFBundle structures on * MacOS X. * - * Copyright 2001, Apple Computer, Inc. + * Copyright 2001, Apple Computer, Inc. + * Copyright (c) 2003-2007 Daniel A. Steffen + * + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * The following terms apply to all files originating from Apple * Computer, Inc. ("Apple") and associated with the software unless @@ -43,6 +47,8 @@ * authors grant the U.S. Government and others acting in its behalf * permission to use and distribute the software in accordance with the * terms specified in this license. + * + * RCS: @(#) $Id:$ */ #include "tclPort.h" @@ -142,8 +148,8 @@ Tcl_MacOSXOpenVersionedBundleResources( CFStringRef bundleTailRef = CFURLCopyLastPathComponent(bundleURL); if (bundleTailRef) { - if (CFStringCompare(bundleTailRef, bundleVersionRef, - 0) == kCFCompareEqualTo) { + if (CFStringCompare(bundleTailRef, bundleVersionRef, 0) == + kCFCompareEqualTo) { versionedBundleRef = bundleRef; } CFRelease(bundleTailRef); Index: macosx/tclMacOSXFCmd.c =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/tclMacOSXFCmd.c,v retrieving revision 1.11 diff -u -p -r1.11 tclMacOSXFCmd.c --- macosx/tclMacOSXFCmd.c 19 Jan 2007 01:03:59 -0000 1.11 +++ macosx/tclMacOSXFCmd.c 15 Apr 2007 13:57:00 -0000 @@ -4,8 +4,7 @@ * This file implements the MacOSX specific portion of file manipulation * subcommands of the "file" command. * - * Copyright (c) 2003 Tcl Core Team. - * Copyright (c) 2003-2006 Daniel A. Steffen + * Copyright (c) 2003-2007 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -71,7 +70,7 @@ typedef u_int32_t OSType; static int GetOSTypeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, OSType *osTypePtr); -static Tcl_Obj * NewOSTypeObj(CONST OSType newOSType); +static Tcl_Obj * NewOSTypeObj(const OSType newOSType); static int SetOSTypeFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfOSType(Tcl_Obj *objPtr); @@ -135,7 +134,7 @@ TclMacOSXGetFileAttribute( fileinfobuf finfo; finderinfo *finder = (finderinfo*)(&finfo.data); off_t *rsrcForkSize = (off_t*)(&finfo.data); - CONST char *native; + const char *native; result = TclpObjStat(fileName, &statBuf); @@ -227,7 +226,7 @@ TclMacOSXSetFileAttribute( fileinfobuf finfo; finderinfo *finder = (finderinfo*)(&finfo.data); off_t *rsrcForkSize = (off_t*)(&finfo.data); - CONST char *native; + const char *native; result = TclpObjStat(fileName, &statBuf); @@ -585,7 +584,7 @@ GetOSTypeFromObj( static Tcl_Obj * NewOSTypeObj( - CONST OSType osType) /* OSType used to initialize the new object. */ + const OSType osType) /* OSType used to initialize the new object. */ { Tcl_Obj *objPtr; Index: macosx/tclMacOSXNotify.c =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/tclMacOSXNotify.c,v retrieving revision 1.13 diff -u -p -r1.13 tclMacOSXNotify.c --- macosx/tclMacOSXNotify.c 7 Mar 2007 23:43:13 -0000 1.13 +++ macosx/tclMacOSXNotify.c 15 Apr 2007 13:57:05 -0000 @@ -7,8 +7,7 @@ * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * Copyright 2001, Apple Computer, Inc. - * Copyright (c) 2005 Tcl Core Team. - * Copyright (c) 2005-2006 Daniel A. Steffen + * Copyright (c) 2005-2007 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -305,7 +304,8 @@ static CFStringRef tclEventsOnlyRunLoopM * Static routines defined in this file. */ -static void NotifierThreadProc(ClientData clientData); +static void NotifierThreadProc(ClientData clientData) + __attribute__ ((__noreturn__)); static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); #ifdef HAVE_PTHREAD_ATFORK @@ -1239,7 +1239,7 @@ NotifierThreadProc( } } } - pthread_exit (0); + pthread_exit(0); } #ifdef HAVE_PTHREAD_ATFORK Index: macosx/Tcl.xcode/project.pbxproj =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/Tcl.xcode/project.pbxproj,v retrieving revision 1.5 diff -u -p -r1.5 project.pbxproj --- macosx/Tcl.xcode/project.pbxproj 28 Jan 2007 01:42:05 -0000 1.5 +++ macosx/Tcl.xcode/project.pbxproj 15 Apr 2007 13:57:07 -0000 @@ -74,6 +74,7 @@ F966C06F08F281DC005CB29B, 1AB674ADFE9D54B511CA2CBB, ); + comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id:$\n"; isa = PBXGroup; name = Tcl; path = .; Index: macosx/Tcl.xcodeproj/project.pbxproj =================================================================== RCS file: /cvsroot/tcl/tcl/macosx/Tcl.xcodeproj/project.pbxproj,v retrieving revision 1.19 diff -u -p -r1.19 project.pbxproj --- macosx/Tcl.xcodeproj/project.pbxproj 7 Mar 2007 23:43:13 -0000 1.19 +++ macosx/Tcl.xcodeproj/project.pbxproj 15 Apr 2007 13:57:11 -0000 @@ -932,6 +932,7 @@ F966C06F08F281DC005CB29B /* Frameworks */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); + comments = "Copyright (c) 2004-2007 Daniel A. Steffen \n\nSee the file \"license.terms\" for information on usage and redistribution of\nthis file, and for a DISCLAIMER OF ALL WARRANTIES.\n\nRCS: @(#) $Id:$\n"; name = Tcl; path = .; sourceTree = SOURCE_ROOT; @@ -2189,6 +2190,40 @@ }; name = ReleaseUniversal; }; + F93084370BB93D2800CD0B9E /* DebugMemCompile */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tclsh; + }; + name = DebugMemCompile; + }; + F93084380BB93D2800CD0B9E /* DebugMemCompile */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tcltest; + }; + name = DebugMemCompile; + }; + F93084390BB93D2800CD0B9E /* DebugMemCompile */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = tests; + TCLTEST_OPTIONS = ""; + TCL_LIBRARY = "$(TCL_SRCROOT)/library"; + TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest"; + }; + name = DebugMemCompile; + }; + F930843A0BB93D2800CD0B9E /* DebugMemCompile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F97AE8330B65C87F00310EA2 /* Tcl-Debug.xcconfig */; + buildSettings = { + CONFIGURE_ARGS = "$(CONFIGURE_ARGS) --enable-symbols=all"; + MACOSX_DEPLOYMENT_TARGET = 10.2; + PREBINDING = NO; + }; + name = DebugMemCompile; + }; F95CC8AC09158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2213,6 +2248,7 @@ F95CC8B109158F3100EA5ACE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CONFIGURE_ARGS = "tcl_cv_cc_visibility_hidden=no $(CONFIGURE_ARGS)"; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "__private_extern__=extern", @@ -2476,6 +2512,7 @@ buildConfigurations = ( F95CC8AC09158F3100EA5ACE /* Debug */, F95CC8AE09158F3100EA5ACE /* DebugNoFixZL */, + F93084370BB93D2800CD0B9E /* DebugMemCompile */, F97AED1B0B660B2100310EA2 /* Debug64bit */, F95CC8AD09158F3100EA5ACE /* Release */, F91BCC4F093152310042A6BF /* ReleaseUniversal */, @@ -2491,6 +2528,7 @@ buildConfigurations = ( F95CC8B109158F3100EA5ACE /* Debug */, F95CC8B309158F3100EA5ACE /* DebugNoFixZL */, + F93084380BB93D2800CD0B9E /* DebugMemCompile */, F97AED1C0B660B2100310EA2 /* Debug64bit */, F95CC8B209158F3100EA5ACE /* Release */, F91BCC50093152310042A6BF /* ReleaseUniversal */, @@ -2506,6 +2544,7 @@ buildConfigurations = ( F95CC8B609158F3100EA5ACE /* Debug */, F95CC8B809158F3100EA5ACE /* DebugNoFixZL */, + F930843A0BB93D2800CD0B9E /* DebugMemCompile */, F97AED1E0B660B2100310EA2 /* Debug64bit */, F95CC8B709158F3100EA5ACE /* Release */, F91BCC51093152310042A6BF /* ReleaseUniversal */, @@ -2521,6 +2560,7 @@ buildConfigurations = ( F97258A90A86873D00096C78 /* Debug */, F97258AB0A86873D00096C78 /* DebugNoFixZL */, + F93084390BB93D2800CD0B9E /* DebugMemCompile */, F97AED1D0B660B2100310EA2 /* Debug64bit */, F97258AA0A86873D00096C78 /* Release */, F97258AC0A86873D00096C78 /* ReleaseUniversal */, Index: unix/configure =================================================================== RCS file: /cvsroot/tcl/tcl/unix/configure,v retrieving revision 1.193 diff -u -p -r1.193 configure --- unix/configure 7 Mar 2007 23:43:13 -0000 1.193 +++ unix/configure 15 Apr 2007 13:57:31 -0000 @@ -17705,6 +17705,7 @@ _ACEOF EXTRA_INSTALL="install-private-headers html-tcl" EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tcl-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' TCL_YEAR="`date +%Y`" # Don't use AC_DEFINE for the following as the framework version define Index: unix/configure.in =================================================================== RCS file: /cvsroot/tcl/tcl/unix/configure.in,v retrieving revision 1.155 diff -u -p -r1.155 configure.in --- unix/configure.in 4 Feb 2007 02:51:24 -0000 1.155 +++ unix/configure.in 15 Apr 2007 13:57:31 -0000 @@ -689,6 +689,7 @@ if test "$FRAMEWORK_BUILD" = "1" ; then EXTRA_INSTALL="install-private-headers html-tcl" EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html' EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tcl-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' TCL_YEAR="`date +%Y`" # Don't use AC_DEFINE for the following as the framework version define Index: unix/tclLoadDyld.c =================================================================== RCS file: /cvsroot/tcl/tcl/unix/tclLoadDyld.c,v retrieving revision 1.24 diff -u -p -r1.24 tclLoadDyld.c --- unix/tclLoadDyld.c 20 Jul 2006 06:18:38 -0000 1.24 +++ unix/tclLoadDyld.c 15 Apr 2007 13:57:31 -0000 @@ -7,7 +7,7 @@ * Wilfredo Sanchez (wsanchez@apple.com). * * Copyright (c) 1995 Apple Computer, Inc. - * Copyright (c) 2005 Daniel A. Steffen + * Copyright (c) 2001-2007 Daniel A. Steffen * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -473,7 +473,7 @@ TclpLoadMemory( if ((size_t) codeSize >= sizeof(struct fat_header) + fh_nfat_arch * sizeof(struct fat_arch)) { - void *fatarchs = buffer + sizeof(struct fat_header); + void *fatarchs = (char*)buffer + sizeof(struct fat_header); CONST NXArchInfo *arch = NXGetLocalArchInfo(); struct fat_arch *fa; @@ -483,7 +483,7 @@ TclpLoadMemory( fa = NXFindBestFatArch(arch->cputype, arch->cpusubtype, fatarchs, fh_nfat_arch); if (fa) { - mh = buffer + fa->offset; + mh = (void*)((char*)buffer + fa->offset); ms = fa->size; } else { err = NSObjectFileImageInappropriateFile; Index: unix/tclUnixFCmd.c =================================================================== RCS file: /cvsroot/tcl/tcl/unix/tclUnixFCmd.c,v retrieving revision 1.60 diff -u -p -r1.60 tclUnixFCmd.c --- unix/tclUnixFCmd.c 15 Nov 2006 20:08:45 -0000 1.60 +++ unix/tclUnixFCmd.c 15 Apr 2007 13:57:35 -0000 @@ -234,6 +234,26 @@ MODULE_SCOPE long tclMacOSXDarwinRelease #define haveRealpath 1 #endif #endif /* NO_REALPATH */ + +#ifdef HAVE_FTS +#ifdef HAVE_STRUCT_STAT64 +/* fts doesn't do stat64 */ +#define noFtsStat 1 +#elif defined(__APPLE__) && defined(__LP64__) && \ + defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ + MAC_OS_X_VERSION_MIN_REQUIRED < 1050 +/* + * prior to Darwin 9, 64bit fts_open() without FTS_NOSTAT may crash (due to a + * 64bit-unsafe ALIGN macro); if we could be running on pre-10.5 OSX, check + * Darwin release at runtime and do a separate stat() if necessary. + */ +MODULE_SCOPE long tclMacOSXDarwinRelease; +#define noFtsStat (tclMacOSXDarwinRelease < 9) +#else +#define noFtsStat 0 +#endif +#endif /* HAVE_FTS */ + /* *--------------------------------------------------------------------------- @@ -1020,13 +1040,8 @@ TraverseUnixTree( } #else /* HAVE_FTS */ paths[0] = source; - fts = fts_open((char**)paths, FTS_PHYSICAL|FTS_NOCHDIR| -#ifdef HAVE_STRUCT_STAT64 - FTS_NOSTAT, /* fts doesn't do stat64 */ -#else - (doRewind ? FTS_NOSTAT : 0), /* no need to stat for delete */ -#endif - NULL); + fts = fts_open((char**)paths, FTS_PHYSICAL | FTS_NOCHDIR | + (noFtsStat || doRewind ? FTS_NOSTAT : 0), NULL); if (fts == NULL) { errfile = source; goto end; @@ -1064,15 +1079,15 @@ TraverseUnixTree( break; } if (!doRewind) { /* no need to stat for delete */ -#ifdef HAVE_STRUCT_STAT64 - statBufPtr = &statBuf; - if (TclOSlstat(ent->fts_path, statBufPtr) != 0) { - errfile = ent->fts_path; - break; + if (noFtsStat) { + statBufPtr = &statBuf; + if (TclOSlstat(ent->fts_path, statBufPtr) != 0) { + errfile = ent->fts_path; + break; + } + } else { + statBufPtr = ent->fts_statp; } -#else - statBufPtr = ent->fts_statp; -#endif } result = (*traverseProc)(sourcePtr, targetPtr, statBufPtr, type, errorPtr); Index: unix/tclUnixInit.c =================================================================== RCS file: /cvsroot/tcl/tcl/unix/tclUnixInit.c,v retrieving revision 1.68 diff -u -p -r1.68 tclUnixInit.c --- unix/tclUnixInit.c 8 Feb 2007 23:11:21 -0000 1.68 +++ unix/tclUnixInit.c 15 Apr 2007 13:57:35 -0000 @@ -332,7 +332,9 @@ static int MacOSXGetLibraryPath(Tcl_Int #endif /* HAVE_COREFOUNDATION */ #if defined(__APPLE__) && (defined(TCL_LOAD_FROM_MEMORY) || ( \ defined(TCL_THREADS) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ - MAC_OS_X_VERSION_MIN_REQUIRED < 1030)) + MAC_OS_X_VERSION_MIN_REQUIRED < 1030) || ( \ + defined(__LP64__) && defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \ + MAC_OS_X_VERSION_MIN_REQUIRED < 1050)) /* * Need to check Darwin release at runtime in tclUnixFCmd.c and tclLoadDyld.c: * initialize release global at startup from uname().