Check-in [938f1748b3]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: * win/Makefile.in: Don't define TCL_DBGX symbol for every compile. Instead, define TCL_PIPE_DLL only when compiling tclWinPipe.c. This will break other build systems, so they will need to remove the TCL_DBGX define and replace it with a define for TCL_PIPE_DLL. * win/makefile.vc: Ditto. * win/tclWinPipe.c (TclpCreateProcess): Remove PREFIX_IDENT and DEBUG_IDENT from top of file. Use TCL_PIPE_DLL passed in from build env instead of trying to construct the dll name from already defined symbols. This approach is more flexible and better in the long run.
Timelines: family | ancestors | descendants | both | core-8-4-branch
Files: files | file ages | folders
SHA1: 938f1748b396d7831a47cd2b25bc5dfa4fa441e2
User & Date: mdejong 2003-07-16 19:34:14.000
Context
2003-07-16
21:25
* generic/tclPreserve.c: In Result and Preserve'd routines, do not * generic/tclUtil.c: assume... check-in: bb94a3e510 user: hobbs tags: core-8-4-branch
19:34
* win/Makefile.in: Don't define TCL_DBGX symbol for every compile. Instead, define TCL_PIPE_DLL o... check-in: 938f1748b3 user: mdejong tags: core-8-4-branch
15:28
* generic/tclFileName.c (Tcl_GlobObjCmd): [Bug 771840] * generic/tclIOUtil.c (... check-in: 8466408ea4 user: dgp tags: core-8-4-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to ChangeLog.

















1
2
3
4
5
6
7

















2003-07-16  Don Porter  <dgp@users.sourceforge.net>

	* generic/tclFileName.c (Tcl_GlobObjCmd):	[Bug 771840]
	* generic/tclIOUtil.c (Tcl_FSConvertToPathType):[Bug 771947]
	* unix/tclUnixFCmd.c (GetModeFromPermString):	[Bug 771949]
	Silence compiler warnings about unreached lines.

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2003-07-16  Mo DeJong  <mdejong@users.sourceforge.net>

	* win/Makefile.in: Don't define TCL_DBGX
	symbol for every compile. Instead, define
	TCL_PIPE_DLL only when compiling tclWinPipe.c.
	This will break other build systems, so
	they will need to remove the TCL_DBGX define
	and replace it with a define for TCL_PIPE_DLL.
	* win/makefile.vc: Ditto.
	* win/tclWinPipe.c (TclpCreateProcess):
	Remove PREFIX_IDENT and DEBUG_IDENT from
	top of file. Use TCL_PIPE_DLL passed in
	from build env instead of trying to construct
	the dll name from already defined symbols.
	This approach is more flexible and better
	in the long run.

2003-07-16  Don Porter  <dgp@users.sourceforge.net>

	* generic/tclFileName.c (Tcl_GlobObjCmd):	[Bug 771840]
	* generic/tclIOUtil.c (Tcl_FSConvertToPathType):[Bug 771947]
	* unix/tclUnixFCmd.c (GetModeFromPermString):	[Bug 771949]
	Silence compiler warnings about unreached lines.

Changes to win/Makefile.in.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# This file is a Makefile for Tcl.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
# RCS: @(#) $Id: Makefile.in,v 1.68 2003/01/28 11:03:53 mdejong Exp $

VERSION = @TCL_VERSION@

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# This file is a Makefile for Tcl.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
# RCS: @(#) $Id: Makefile.in,v 1.68.2.1 2003/07/16 19:34:14 mdejong Exp $

VERSION = @TCL_VERSION@

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@

# To change the compiler switches, for example to change from optimization to
# debugging symbols, change the following line:
#CFLAGS = 		$(CFLAGS_DEBUG)
#CFLAGS = 		$(CFLAGS_OPTIMIZE)
#CFLAGS = 		$(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
CFLAGS = 		@CFLAGS@ @CFLAGS_DEFAULT@ -DTCL_DBGX=$(TCL_DBGX)

# To enable compilation debugging reverse the comment characters on
# one of the following lines.
COMPILE_DEBUG_FLAGS =
#COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG
#COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS








|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@

# To change the compiler switches, for example to change from optimization to
# debugging symbols, change the following line:
#CFLAGS = 		$(CFLAGS_DEBUG)
#CFLAGS = 		$(CFLAGS_OPTIMIZE)
#CFLAGS = 		$(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
CFLAGS = 		@CFLAGS@ @CFLAGS_DEFAULT@

# To enable compilation debugging reverse the comment characters on
# one of the following lines.
COMPILE_DEBUG_FLAGS =
#COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG
#COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS

379
380
381
382
383
384
385




386
387
388
389
390
391
392
.SUFFIXES: .rc

# Special case object targets

tclWinInit.${OBJEXT}: tclWinInit.c
	$(CC) -c $(CC_SWITCHES) -DBUILD_tcl $(EXTFLAGS) @DEPARG@ $(CC_OBJNAME)





testMain.${OBJEXT}: tclAppInit.c
	$(CC) -c $(CC_SWITCHES) -DTCL_TEST @DEPARG@ $(CC_OBJNAME)

tclTest.${OBJEXT}: tclTest.c
	$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)

tclTestObj.${OBJEXT}: tclTestObj.c







>
>
>
>







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
.SUFFIXES: .rc

# Special case object targets

tclWinInit.${OBJEXT}: tclWinInit.c
	$(CC) -c $(CC_SWITCHES) -DBUILD_tcl $(EXTFLAGS) @DEPARG@ $(CC_OBJNAME)

tclWinPipe.${OBJEXT}: tclWinPipe.c
	$(CC) -c $(CC_SWITCHES) -DBUILD_tcl -DTCL_PIPE_DLL=\"$(PIPE_DLL_FILE)\" \
	    $(EXTFLAGS) @DEPARG@ $(CC_OBJNAME)

testMain.${OBJEXT}: tclAppInit.c
	$(CC) -c $(CC_SWITCHES) -DTCL_TEST @DEPARG@ $(CC_OBJNAME)

tclTest.${OBJEXT}: tclTest.c
	$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)

tclTestObj.${OBJEXT}: tclTestObj.c
Changes to win/makefile.vc.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
# Copyright (c) 2001 ActiveState Corporation.
# Copyright (c) 2001-2002 David Gravereaux.
#
#------------------------------------------------------------------------------
# RCS: @(#) $Id: makefile.vc,v 1.100.2.3 2003/03/23 03:10:13 kennykb Exp $
#------------------------------------------------------------------------------

!if "$(MSVCDIR)" == ""
MSG = ^
You'll need to run vcvars32.bat from Developer Studio, first, to setup^
the environment.  Jump to this line to read the new instructions.
!error $(MSG)







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
# Copyright (c) 2001 ActiveState Corporation.
# Copyright (c) 2001-2002 David Gravereaux.
#
#------------------------------------------------------------------------------
# RCS: @(#) $Id: makefile.vc,v 1.100.2.4 2003/07/16 19:34:14 mdejong Exp $
#------------------------------------------------------------------------------

!if "$(MSVCDIR)" == ""
MSG = ^
You'll need to run vcvars32.bat from Developer Studio, first, to setup^
the environment.  Jump to this line to read the new instructions.
!error $(MSG)
351
352
353
354
355
356
357
358

359
360
361
362
363
364
365
crt = -MT
!else
crt = -MTd
!endif
!endif

TCL_INCLUDES	= -I"$(WINDIR)" -I"$(GENERICDIR)"
BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) -DTCL_DBGX=$(DBGX)

CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
TCL_CFLAGS	= $(BASE_CLFAGS) $(OPTDEFINES)


#---------------------------------------------------------------------
# Link flags
#---------------------------------------------------------------------







|
>







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
crt = -MT
!else
crt = -MTd
!endif
!endif

TCL_INCLUDES	= -I"$(WINDIR)" -I"$(GENERICDIR)"
BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) \
			-DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\"
CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
TCL_CFLAGS	= $(BASE_CLFAGS) $(OPTDEFINES)


#---------------------------------------------------------------------
# Link flags
#---------------------------------------------------------------------
Changes to win/tclWinPipe.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* 
 * tclWinPipe.c --
 *
 *	This file implements the Windows-specific exec pipeline functions,
 *	the "pipe" channel driver, and the "pid" Tcl command.
 *
 * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
 *
 * 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.33.2.1 2003/03/12 19:19:32 dgp Exp $
 */

#define PREFIX_IDENT ""
#define DEBUG_IDENT TCL_DBGX

#include "tclWinInt.h"

#include <fcntl.h>
#include <io.h>
#include <sys/stat.h>

/*











|


<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14



15
16
17
18
19
20
21
/* 
 * tclWinPipe.c --
 *
 *	This file implements the Windows-specific exec pipeline functions,
 *	the "pipe" channel driver, and the "pid" Tcl command.
 *
 * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
 *
 * 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.33.2.2 2003/07/16 19:34:14 mdejong Exp $
 */




#include "tclWinInt.h"

#include <fcntl.h>
#include <io.h>
#include <sys/stat.h>

/*
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223

	    {
		Tcl_Obj *tclExePtr, *pipeDllPtr;
		int i, fileExists;
		char *start,*end;
		Tcl_DString pipeDll;
		Tcl_DStringInit(&pipeDll);
		Tcl_DStringAppend(&pipeDll, PREFIX_IDENT "tclpip"
		    STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION)
		    STRINGIFY(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 != '/')







|
<
<







1204
1205
1206
1207
1208
1209
1210
1211


1212
1213
1214
1215
1216
1217
1218

	    {
		Tcl_Obj *tclExePtr, *pipeDllPtr;
		int i, fileExists;
		char *start,*end;
		Tcl_DString pipeDll;
		Tcl_DStringInit(&pipeDll);
		Tcl_DStringAppend(&pipeDll, TCL_PIPE_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 != '/')