summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
authordas <das>2006-08-18 07:45:31 (GMT)
committerdas <das>2006-08-18 07:45:31 (GMT)
commitdaccfbf9d19d8ffcfd4c6106a608bf441713d5ff (patch)
tree580a77a48184c84c4261aa7b46888ee7b525fae4 /unix/tclUnixInit.c
parent13abf0c4f482ad0481bb1945ff6451452535f47a (diff)
downloadtcl-daccfbf9d19d8ffcfd4c6106a608bf441713d5ff.zip
tcl-daccfbf9d19d8ffcfd4c6106a608bf441713d5ff.tar.gz
tcl-daccfbf9d19d8ffcfd4c6106a608bf441713d5ff.tar.bz2
* unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for
universal builds including x86_64, for 64-bit CoreFoundation on Leopard and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * generic/tcl.h: add fixes for building on Leopard and support * unix/tclUnixPort.h: for 64-bit CoreFoundation on Leopard. * macosx/tclMacOSXFCmd.c: * unix/tclUnixPort.h: on Darwin x86_64, disable use of vfork as it causes execve to fail intermittently. (rdar://4685553) * generic/tclTomMath.h: on Darwin 64-bit, for now disable use of 128-bit arithmetic through __attribute__ ((mode(TI))), as it leads to link errors due to missing fallbacks. (rdar://4685527) * macosx/Tcl.xcodeproj/project.pbxproj: add x86_64 to universal build, switch native release targets to use DWARF with dSYM, Xcode 3.0 changes. * macosx/README: updates for x86_64 and Xcode 2.3. * macosx/Tcl.xcodeproj/default.pbxuser: add test suite target that runs * macosx/Tcl.xcodeproj/project.pbxproj: the tcl test suite at build time and shows clickable test suite errors in the GUI build window. * tests/macOSXFCmd.test: fix use of deprecated resource fork paths. * unix/tclUnixInit.c (TclpInitLibraryPath): move code that is only needed when TCL_LIBRARY is defined to run only in that case. * generic/tclLink.c (LinkTraceProc): fix 64-bit signed-with-unsigned comparison warning from gcc4 -Wextra.
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index cffcc6c..4287927 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.64 2006/07/20 06:18:38 das Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.65 2006/08/18 07:45:32 das Exp $
*/
#include "tclInt.h"
@@ -480,23 +480,11 @@ TclpInitLibraryPath(
#define LIBRARY_SIZE 32
Tcl_Obj *pathPtr, *objPtr;
CONST char *str;
- Tcl_DString buffer, ds;
- int pathc;
- CONST char **pathv;
- char installLib[LIBRARY_SIZE];
+ Tcl_DString buffer;
- Tcl_DStringInit(&ds);
pathPtr = Tcl_NewObj();
/*
- * Initialize the substrings used when locating an executable. The
- * installLib variable computes the path as though the executable is
- * installed.
- */
-
- sprintf(installLib, "lib/tcl%s", TCL_VERSION);
-
- /*
* Look for the library relative to the TCL_LIBRARY env variable. If the
* last dirname in the TCL_LIBRARY path does not match the last dirname in
* the installLib variable, use the last dir name of installLib in
@@ -508,6 +496,21 @@ TclpInitLibraryPath(
str = Tcl_DStringValue(&buffer);
if ((str != NULL) && (str[0] != '\0')) {
+ Tcl_DString ds;
+ int pathc;
+ CONST char **pathv;
+ char installLib[LIBRARY_SIZE];
+
+ Tcl_DStringInit(&ds);
+
+ /*
+ * Initialize the substrings used when locating an executable. The
+ * installLib variable computes the path as though the executable is
+ * installed.
+ */
+
+ sprintf(installLib, "lib/tcl%s", TCL_VERSION);
+
/*
* If TCL_LIBRARY is set, search there.
*/
@@ -537,7 +540,7 @@ TclpInitLibraryPath(
/*
* Finally, look for the library relative to the compiled-in path. This is
* needed when users install Tcl with an exec-prefix that is different
- * from the prtefix.
+ * from the prefix.
*/
{