delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/07/07:55:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20040107125439.79200.qmail@web60301.mail.yahoo.com>
Date: Wed, 7 Jan 2004 04:54:39 -0800 (PST)
From: Patrick Samson <p_samson AT yahoo DOT com>
Subject: tcl8.4.1 - tclWinInit - TclpInitLibraryPath()
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

#ifdef __CYGWIN__
	    pathv[pathc - 2] = installLib2;

This adding is useful for X:/cygwin/bin/tclsh.exe to
include "X:/cygwin/usr/share/tcl8.4", which is the
place on cygwin where to find init.tcl.

Unfortunately, it is of no help to:
 X:/cygwin/usr/local/pgsql/bin/pgtclsh.exe
 X:/cygwin/usr/local/pgsql/bin/postgres.exe
because it leads to
X:/cygwin/usr/local/pgsql/usr/share/tcl8.4

A way to solve this problem is to define the
TCL_LIBRARY environment variable.

I think that there is a better way to accommodate all
applications on cygwin, without the need to define
TCL_LIBRARY, by moving the use of installLib2 to
AppendDllPath().

As the dll is X:/cygwin/bin/tcl84.dll, AppendDllPath()
would return:
 X:/cygwin/usr/share/tcl8.4
whatever the application executable path is.

I don't have the means to compile/build/test the tcl
package from source, but here is my proposed patch:

$ diff -u tclWinInit.c ../../../../tmp/tclWinInit.c
--- tclWinInit.c        2003-01-23 06:22:16.001000000
+0100
+++ ../../../../tmp/tclWinInit.c        2004-01-07
13:12:30.640625000 +0100
@@ -228,7 +228,15 @@
      * because in practice, the DLL is always
installed.
      */

-    AppendDllPath(pathPtr, TclWinGetTclInstance(),
installLib);
+    AppendDllPath(pathPtr, TclWinGetTclInstance(),
+    /* REDHAT LOCAL */
+#ifdef __CYGWIN__
+     installLib2
+#else
+     installLib
+#endif
+    /* END REDHAT LOCAL */
+     );


     /*
@@ -268,17 +276,6 @@
            objPtr = Tcl_NewStringObj(path,
Tcl_DStringLength(&ds));
            Tcl_ListObjAppendElement(NULL, pathPtr,
objPtr);
            Tcl_DStringFree(&ds);
-           /* REDHAT LOCAL */
-#ifdef __CYGWIN__
-           pathv[pathc - 2] = installLib2;
-           path = Tcl_JoinPath(pathc - 1, pathv,
&ds);
-           pathv[pathc - 2] = str;
-           objPtr = Tcl_NewStringObj(path,
Tcl_DStringLength(&ds));
-           Tcl_ListObjAppendElement(NULL, pathPtr,
objPtr);
-           Tcl_DStringFree(&ds);
-#endif
-           /* END REDHAT LOCAL */
-
        }
        if (pathc > 3) {
            str = pathv[pathc - 3];


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019