c84b_libPath_OSX2_OSX4.patch,¼ºº¥¼ºËímBIN.¡Index: macosx/Makefile
===================================================================
RCS file: /cvsroot/tcl/tcl/macosx/Makefile,v
retrieving revision 1.5.2.8
diff -u -p -r1.5.2.8 Makefile
--- macosx/Makefile	26 Feb 2004 09:10:40 -0000	1.5.2.8
+++ macosx/Makefile	2 May 2004 18:22:15 -0000
@@ -99,14 +99,14 @@ TARGETS			:= tclsh tcltest
 TCLSH			:= tclsh${PRODUCT_VERSION}
 TCL_EXE			?= ${SYMROOT}/${TCLSH}
 
-DYLIB_INSTALL_PATH	?= ${INSTALL_PATH}
+DYLIB_INSTALL_PATH	?= ${SYMROOT}
 
-TCL_LIBRARY		:= @TCL_IN_FRAMEWORK@
 LIBDIR			:= ${INSTALL_PATH}/${PRODUCT_NAME}.framework/Versions/${PRODUCT_VERSION}
 DYLIB_INSTALL_DIR	:= ${DYLIB_INSTALL_PATH}/${PRODUCT_NAME}.framework/Versions/${PRODUCT_VERSION}
 INCLUDEDIR		:= ${LIBDIR}/Headers
 PRIVATEINCLUDEDIR	:= ${LIBDIR}/PrivateHeaders
 SCRIPTDIR		:= ${LIBDIR}/Resources/Scripts
+TCL_LIBRARY		:= ${LIBDIR}/Resources/Scripts
 DOCDIR			:= ${LIBDIR}/Resources/English.lproj/Documentation/Reference
 INFOPLIST		:= ${LIBDIR}/Resources/Info.plist
 
@@ -140,7 +140,8 @@ build-${PROJECT}: ${OBJ_DIR}/Makefile
 	cd ${OBJ_DIR}; mkdir -p $(dir ./${INSTALL_PATH}) $(dir ./${BINDIR}) ${SYMROOT}; \
 	rm -f ./${INSTALL_PATH}; ln -fs ${SYMROOT} ./${INSTALL_PATH}; \
 	rm -f ./${BINDIR}; ln -fs ${SYMROOT} ./${BINDIR}; \
-	ln -fs ${OBJ_DIR}/tcltest ${SYMROOT}
+	ln -fs ${OBJ_DIR}/tcltest ${SYMROOT}; \
+	ln -fs ${OBJ_DIR}/dltest ${SYMROOT}
 
 clean-${PROJECT}:
 	${MAKE} -C ${OBJ_DIR} clean ${EXTRA_MAKE_ARGS}
Index: unix/configure
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure,v
retrieving revision 1.92.2.10
diff -u -p -r1.92.2.10 configure
--- unix/configure	1 Mar 2004 17:48:02 -0000	1.92.2.10
+++ unix/configure	2 May 2004 18:22:55 -0000
@@ -4281,7 +4281,7 @@ fi
 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
 if test $ac_cv_type_socklen_t = no; then
     cat >> confdefs.h <<\EOF
-#define socklen_t unsigned
+#define socklen_t int
 EOF
 
 fi
@@ -6376,7 +6376,7 @@ fi
 	    CC_SEARCH_FLAGS=""
 	    LD_SEARCH_FLAGS=""
 	    CFLAGS_OPTIMIZE="-Os"
-	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+	    LD_LIBRARY_PATH_VAR="DYLIB_INSTALL_DIR"
 	    # for compatibility with autoconf vers 2.13 :
 	    HACK=""
 	    EXTRA_CFLAGS="-DMA${HACK}C_OSX_TCL -DHAVE_CFBUNDLE -DUSE_VFORK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\""
Index: unix/configure.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure.in,v
retrieving revision 1.106.2.6
diff -u -p -r1.106.2.6 configure.in
--- unix/configure.in	13 Feb 2004 01:38:02 -0000	1.106.2.6
+++ unix/configure.in	2 May 2004 18:22:58 -0000
@@ -280,7 +280,7 @@ changequote([,]),[
     ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])
 AC_MSG_RESULT($ac_cv_type_socklen_t)
 if test $ac_cv_type_socklen_t = no; then
-    AC_DEFINE(socklen_t, unsigned)
+    AC_DEFINE(socklen_t, int)
 fi
 
 #--------------------------------------------------------------------
Index: unix/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tcl.m4,v
retrieving revision 1.96.2.6
diff -u -p -r1.96.2.6 tcl.m4
--- unix/tcl.m4	1 Mar 2004 17:48:03 -0000	1.96.2.6
+++ unix/tcl.m4	2 May 2004 18:23:12 -0000
@@ -1291,7 +1291,7 @@ dnl AC_CHECK_TOOL(AR, ar)
 	    CC_SEARCH_FLAGS=""
 	    LD_SEARCH_FLAGS=""
 	    CFLAGS_OPTIMIZE="-Os"
-	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+	    LD_LIBRARY_PATH_VAR="DYLIB_INSTALL_DIR"
 	    # for compatibility with autoconf vers 2.13 :
 	    HACK=""
 	    EXTRA_CFLAGS="-DMA${HACK}C_OSX_TCL -DHAVE_CFBUNDLE -DUSE_VFORK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\""
Index: unix/tclUnixInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixInit.c,v
retrieving revision 1.34.2.4
diff -u -p -r1.34.2.4 tclUnixInit.c
--- unix/tclUnixInit.c	29 Mar 2004 18:49:36 -0000	1.34.2.4
+++ unix/tclUnixInit.c	2 May 2004 18:23:29 -0000
@@ -10,14 +10,14 @@
  * RCS: @(#) $Id: tclUnixInit.c,v 1.34.2.4 2004/03/29 18:49:36 hobbs Exp $
  */
 
-#if defined(HAVE_CFBUNDLE)
-#include <CoreFoundation/CoreFoundation.h>
-#endif
 #include "tclInt.h"
 #include "tclPort.h"
+#if defined(HAVE_CFBUNDLE)
+#   include <CoreFoundation/CoreFoundation.h>
+#endif
 #include <locale.h>
 #ifdef HAVE_LANGINFO
-#include <langinfo.h>
+#   include <langinfo.h>
 #endif
 #if defined(__FreeBSD__)
 #   include <floatingpoint.h>
@@ -435,22 +435,23 @@ CONST char *path;		/* Path to the execut
      * is different from the prtefix.
      */
 			      
-    {
-#ifdef HAVE_CFBUNDLE
-    char tclLibPath[MAXPATHLEN + 1];
-    
-    if (Tcl_MacOSXGetLibraryPath(NULL, MAXPATHLEN, tclLibPath) == TCL_OK) {
-        str = tclLibPath;
-    } else
-#endif /* HAVE_CFBUNDLE */
-    {
-        str = defaultLibraryDir;
-    }
+    str = defaultLibraryDir;
     if (str[0] != '\0') {
         objPtr = Tcl_NewStringObj(str, -1);
         Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
     }
+#ifdef HAVE_CFBUNDLE
+    {
+        char tclLibPath[MAXPATHLEN + 1];
+        
+        if (Tcl_MacOSXGetLibraryPath(NULL, MAXPATHLEN, tclLibPath) == TCL_OK) {
+            if (tclLibPath[0] != '\0') {
+                objPtr = Tcl_NewStringObj(tclLibPath, -1);
+                Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
+            }
+        }
     }
+#endif /* HAVE_CFBUNDLE */
 
     TclSetLibraryPath(pathPtr);    
     Tcl_DStringFree(&buffer);
@@ -1068,12 +1069,8 @@ TclpCheckStackSpace()
  */
 static int Tcl_MacOSXGetLibraryPath(Tcl_Interp *interp, int maxPathLen, char *tclLibPath)
 {
-    int foundInFramework = TCL_ERROR;
-    if (strcmp(defaultLibraryDir, "@TCL_IN_FRAMEWORK@") == 0) {
-	foundInFramework = Tcl_MacOSXOpenVersionedBundleResources(interp, 
+    return Tcl_MacOSXOpenVersionedBundleResources(interp, 
 	    "com.tcltk.tcllibrary", TCL_VERSION, 0, maxPathLen, tclLibPath);
-    }
-    return foundInFramework;
 }
 #endif /* HAVE_CFBUNDLE */
 
