This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Find init.tcl on cygwin


On Thu, 19 Dec 2002 11:11:35 -0500
Christopher Faylor <cgf@redhat.com> wrote:

>> What are the configure flags that you are building with under Cygwin?
>> Is it something like `.../configure --prefix=/ --datadir=/usr` ?
>
> I had hoped not to have to go into a lot of details about how cygwin
> works but, no, that's not how I am configuring it.  It wouldn't matter
> if I was.
>
> /usr/bin == /bin == x:\cygwin\bin
>
> tcl apparently converts the cygwin path into a windows path and then looks
> for x:\cygwin\share which doesn't exit.  x:\cygwin\usr\share does exist.

I was under the impression that the only place Tcl did cygwin path conversion
was in the PATH env var. As far as I can tell, Tcl does not mess with the PATH,
it just calls GetModuleFileName() to return the fully qualified Win32 path
where the tclsh83.exe executable lives. It then looks in ../$installLib for
the library files. This process works just fine for the normal Source-Navigator
install, which is configured with ".../configure --prefix=/somedir/SN".
I am concerned that this proposed change is going to break that.

How about putting the usr/share change in a __CYGWIN__ ifdef?
This should fix the Cygwin use case without breaking the SN use case.

Index: win/tclWinInit.c
===================================================================
RCS file: /cvs/src/src/tcl/win/tclWinInit.c,v
retrieving revision 1.4
diff -u -r1.4 tclWinInit.c
--- win/tclWinInit.c    26 Nov 2002 19:48:07 -0000      1.4
+++ win/tclWinInit.c    19 Dec 2002 21:53:02 -0000
@@ -196,7 +196,11 @@
      */
 
     /* CYGNUS LOCAL */
+#if defined(__CYGWIN__)
+    sprintf(installLib, "usr/share/tcl%s", TCL_VERSION);
+#else
     sprintf(installLib, "share/tcl%s", TCL_VERSION);
+#endif /* __CYGWIN__ */
     /* END CYGNUS LOCAL */
     sprintf(developLib, "../tcl%s/library",
            ((TCL_RELEASE_LEVEL < 2) ? TCL_PATCH_LEVEL : TCL_VERSION));

cheers
Mo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]