summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2003-01-28 11:03:51 (GMT)
committermdejong <mdejong>2003-01-28 11:03:51 (GMT)
commitdca14b67b236f60b40e7bdcdff7e01a3f2288753 (patch)
tree0d80c7636b80e9cbc711f955484d08371b889346
parent23a8498219d385c6f79ec5b70d28b4b87d6ac391 (diff)
downloadtcl-dca14b67b236f60b40e7bdcdff7e01a3f2288753.zip
tcl-dca14b67b236f60b40e7bdcdff7e01a3f2288753.tar.gz
tcl-dca14b67b236f60b40e7bdcdff7e01a3f2288753.tar.bz2
* generic/tcl.h: Add TCL_PREFIX_IDENT and
TCL_DEBUG_IDENT, used only by TclpCreateProcess. * unix/Makefile.in: Define TCL_DBGX. * win/Makefile.in: Define TCL_DBGX. * win/tclWinPipe.c (TclpCreateProcess): Check that the Tcl pipe dll actually exists in the Tcl bin directory and panic if it is not found. Incorporate TCL_DBGX into the Tcl pipe dll name. This fixes a really mysterious error that would show up when exec'ing a 16 bit application under Win95 or Win98 when Tcl was compiled with symbols. The error seemed to indicate that the executable could not be found, but it was actually the Tcl pipe dll that could not be found.
-rw-r--r--ChangeLog18
-rw-r--r--generic/tcl.h5
-rw-r--r--unix/Makefile.in4
-rw-r--r--win/Makefile.in4
-rw-r--r--win/tclWinPipe.c38
5 files changed, 61 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 72a0207..688005f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2003-01-28 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * generic/tcl.h: Add TCL_PREFIX_IDENT and
+ TCL_DEBUG_IDENT, used only by TclpCreateProcess.
+ * unix/Makefile.in: Define TCL_DBGX.
+ * win/Makefile.in: Define TCL_DBGX.
+ * win/tclWinPipe.c (TclpCreateProcess):
+ Check that the Tcl pipe dll actually exists
+ in the Tcl bin directory and panic if it
+ is not found. Incorporate TCL_DBGX into
+ the Tcl pipe dll name. This fixes a really
+ mysterious error that would show up when
+ exec'ing a 16 bit application under Win95
+ or Win98 when Tcl was compiled with symbols.
+ The error seemed to indicate that the executable
+ could not be found, but it was actually the
+ Tcl pipe dll that could not be found.
+
2003-01-26 Mo DeJong <mdejong@users.sourceforge.net>
* win/README: Update msys+mingw URL to release 6.
diff --git a/generic/tcl.h b/generic/tcl.h
index 0c60153..f46c865 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.151 2003/01/17 22:10:56 mdejong Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.152 2003/01/28 11:03:52 mdejong Exp $
*/
#ifndef _TCL
@@ -61,6 +61,9 @@ extern "C" {
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TCL_RELEASE_SERIAL 1
+#define TCL_PREFIX_IDENT ""
+#define TCL_DEBUG_IDENT TCL_DBGX
+
#define TCL_VERSION "8.4"
#define TCL_PATCH_LEVEL "8.4.1.1"
diff --git a/unix/Makefile.in b/unix/Makefile.in
index a255c24..f78fb22 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.120 2002/11/27 02:51:41 hobbs Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.121 2003/01/28 11:03:52 mdejong Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -90,7 +90,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DTCL_DBGX=$(TCL_DBGX)
# Flags to pass to the linker
LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
diff --git a/win/Makefile.in b/win/Makefile.in
index 70b4cc9..929defc 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.67 2002/10/22 18:56:28 hobbs Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.68 2003/01/28 11:03:53 mdejong Exp $
VERSION = @TCL_VERSION@
@@ -85,7 +85,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DTCL_DBGX=$(TCL_DBGX)
# To enable compilation debugging reverse the comment characters on
# one of the following lines.
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index a8071c0..319ce3e 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPipe.c,v 1.32 2002/12/17 02:47:39 davygrvy Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.33 2003/01/28 11:03:53 mdejong Exp $
*/
#include "tclWinInt.h"
@@ -1201,8 +1201,40 @@ TclpCreateProcess(
startInfo.dwFlags |= STARTF_USESHOWWINDOW;
createFlags = CREATE_NEW_CONSOLE;
}
- Tcl_DStringAppend(&cmdLine, "tclpip" STRINGIFY(TCL_MAJOR_VERSION)
- STRINGIFY(TCL_MINOR_VERSION) ".dll ", -1);
+
+ {
+ Tcl_Obj *tclExePtr, *pipeDllPtr;
+ int i, fileExists;
+ char *start,*end;
+ Tcl_DString pipeDll;
+ Tcl_DStringInit(&pipeDll);
+ Tcl_DStringAppend(&pipeDll, TCL_PREFIX_IDENT "tclpip"
+ STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION)
+ STRINGIFY(TCL_DEBUG_IDENT) ".dll ", -1);
+ tclExePtr = Tcl_NewStringObj(TclpFindExecutable(""), -1);
+ start = Tcl_GetStringFromObj(tclExePtr, &i);
+ for (end = start + (i-1); end > start; end--) {
+ if (*end == '/')
+ break;
+ }
+ if (*end != '/')
+ panic("no / in executable path name");
+ i = (end - start) + 1;
+ pipeDllPtr = Tcl_NewStringObj(start, i);
+ Tcl_AppendToObj(pipeDllPtr, Tcl_DStringValue(&pipeDll), -1);
+ Tcl_IncrRefCount(pipeDllPtr);
+ if (Tcl_FSConvertToPathType(interp, pipeDllPtr) != TCL_OK)
+ panic("Tcl_FSConvertToPathType failed");
+ fileExists = (Tcl_FSAccess(pipeDllPtr, F_OK) == 0);
+ if (!fileExists) {
+ panic("Tcl pipe dll \"%s\" not found",
+ Tcl_DStringValue(&pipeDll));
+ }
+ Tcl_DStringAppend(&cmdLine, Tcl_DStringValue(&pipeDll), -1);
+ Tcl_DecrRefCount(tclExePtr);
+ Tcl_DecrRefCount(pipeDllPtr);
+ Tcl_DStringFree(&pipeDll);
+ }
}
}