summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2022-07-31 06:32:22 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2022-07-31 06:32:22 (GMT)
commitd2518017c7f55b82f10c7ee1e77cbe27218cc857 (patch)
tree6ed28530bb059df23572a55b298e9cbe740a6a27 /unix/tclUnixChan.c
parent3674905dbda8443171db562a6c69bf50228f18fb (diff)
parent13384df4afe1602c77e79a0661eb8f70419f1697 (diff)
downloadtcl-d2518017c7f55b82f10c7ee1e77cbe27218cc857.zip
tcl-d2518017c7f55b82f10c7ee1e77cbe27218cc857.tar.gz
tcl-d2518017c7f55b82f10c7ee1e77cbe27218cc857.tar.bz2
Merged trunk.
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);