summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-19 08:56:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-19 08:56:37 (GMT)
commit5131efcb132119c93ac199124ee80fe84e09db9b (patch)
tree93a1e35e67145c546fea7c7c8577eb3fb5d424c9 /unix/tclUnixChan.c
parentc2350850a9f065f4c85fa3a8f78b3a2329bb5e7d (diff)
parent6f094ddde17be4284f76f82a83b5d5f2cba10db6 (diff)
downloadtcl-5131efcb132119c93ac199124ee80fe84e09db9b.zip
tcl-5131efcb132119c93ac199124ee80fe84e09db9b.tar.gz
tcl-5131efcb132119c93ac199124ee80fe84e09db9b.tar.bz2
Merge 8.7
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r--unix/tclUnixChan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 2e305be..c41cdd9 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -1797,12 +1797,11 @@ TclpGetDefaultStdChannel(
* Some #def's to make the code a little clearer!
*/
-#define ZERO_OFFSET ((Tcl_SeekOffset) 0)
#define ERROR_OFFSET ((Tcl_SeekOffset) -1)
switch (type) {
case TCL_STDIN:
- if ((TclOSseek(0, ZERO_OFFSET, SEEK_CUR) == ERROR_OFFSET)
+ if ((TclOSseek(0, 0, SEEK_CUR) == ERROR_OFFSET)
&& (errno == EBADF)) {
return NULL;
}
@@ -1811,7 +1810,7 @@ TclpGetDefaultStdChannel(
bufMode = "line";
break;
case TCL_STDOUT:
- if ((TclOSseek(1, ZERO_OFFSET, SEEK_CUR) == ERROR_OFFSET)
+ if ((TclOSseek(1, 0, SEEK_CUR) == ERROR_OFFSET)
&& (errno == EBADF)) {
return NULL;
}
@@ -1820,7 +1819,7 @@ TclpGetDefaultStdChannel(
bufMode = "line";
break;
case TCL_STDERR:
- if ((TclOSseek(2, ZERO_OFFSET, SEEK_CUR) == ERROR_OFFSET)
+ if ((TclOSseek(2, 0, SEEK_CUR) == ERROR_OFFSET)
&& (errno == EBADF)) {
return NULL;
}
@@ -1833,7 +1832,6 @@ TclpGetDefaultStdChannel(
break;
}
-#undef ZERO_OFFSET
#undef ERROR_OFFSET
channel = Tcl_MakeFileChannel(INT2PTR(fd), mode);