summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-07-10 23:01:06 (GMT)
committerhobbs <hobbs>2006-07-10 23:01:06 (GMT)
commit03cfbaf3dcd8848bcc9b3add4e8f78f34bbb5398 (patch)
treec0131b465930309d5c82cfa274f779a5d1db8a30
parent233456b5b89245aad5a46c14f751cabf56377c65 (diff)
downloadtcl-03cfbaf3dcd8848bcc9b3add4e8f78f34bbb5398.zip
tcl-03cfbaf3dcd8848bcc9b3add4e8f78f34bbb5398.tar.gz
tcl-03cfbaf3dcd8848bcc9b3add4e8f78f34bbb5398.tar.bz2
* generic/tclIO.c (Tcl_CreateChannel): allow Tcl std channel
inheritance to be #defined out (default remains in).
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclIO.c11
2 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 35684cc..818eeb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tclIO.c (Tcl_CreateChannel): allow Tcl std channel
+ inheritance to be #defined out (default remains in).
+
2006-06-15 Don Porter <dgp@users.sourceforge.net>
* changes: changes to start prep for an 8.4.14 release.
@@ -26,8 +31,8 @@
2006-06-06 Don Porter <dgp@users.sourceforge.net>
- * doc/GetStdChan.3: Added recommendation that each call to
- Tcl_SetStdChannel() be accompanied by a call to Tcl_RegisterChannel().
+ * doc/GetStdChan.3: Added recommendation that each call to
+ Tcl_SetStdChannel() be accompanied by a call to Tcl_RegisterChannel().
2006-05-31 Jeff Hobbs <jeffh@ActiveState.com>
diff --git a/generic/tclIO.c b/generic/tclIO.c
index f82f648..2eb96a7 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.61.2.20 2006/04/05 00:06:03 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.61.2.21 2006/07/10 23:01:06 hobbs Exp $
*/
#include "tclInt.h"
@@ -18,6 +18,10 @@
#include "tclIO.h"
#include <assert.h>
+#ifndef TCL_INHERIT_STD_CHANNELS
+#define TCL_INHERIT_STD_CHANNELS 1
+#endif
+
/*
* All static variables used in this file are collected into a single
@@ -1247,7 +1251,7 @@ Tcl_CreateChannel(typePtr, chanName, instanceData, mask)
* Install this channel in the first empty standard channel slot, if
* the channel was previously closed explicitly.
*/
-
+#if TCL_INHERIT_STD_CHANNELS
if ((tsdPtr->stdinChannel == NULL) &&
(tsdPtr->stdinInitialized == 1)) {
Tcl_SetStdChannel((Tcl_Channel) chanPtr, TCL_STDIN);
@@ -1260,7 +1264,8 @@ Tcl_CreateChannel(typePtr, chanName, instanceData, mask)
(tsdPtr->stderrInitialized == 1)) {
Tcl_SetStdChannel((Tcl_Channel) chanPtr, TCL_STDERR);
Tcl_RegisterChannel((Tcl_Interp *) NULL, (Tcl_Channel) chanPtr);
- }
+ }
+#endif
return (Tcl_Channel) chanPtr;
}