summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-07 12:48:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-07 12:48:06 (GMT)
commita03f6be6938582565178e02aa1036f75bd164a22 (patch)
tree834be06e727add74f7f5ea38df5fc41c9a3a15bc /unix/tclUnixChan.c
parent82a85e5b1eb378f5a45526e1b098459f6b848f42 (diff)
parent67be0a6752a150bad176f36988e3af03f25cc4d3 (diff)
downloadtcl-a03f6be6938582565178e02aa1036f75bd164a22.zip
tcl-a03f6be6938582565178e02aa1036f75bd164a22.tar.gz
tcl-a03f6be6938582565178e02aa1036f75bd164a22.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 4cb9af0..22e9876 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -1860,12 +1860,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;
}
@@ -1874,7 +1873,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;
}
@@ -1883,7 +1882,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;
}
@@ -1896,7 +1895,6 @@ TclpGetDefaultStdChannel(
break;
}
-#undef ZERO_OFFSET
#undef ERROR_OFFSET
channel = Tcl_MakeFileChannel(INT2PTR(fd), mode);