summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-10 10:15:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-10 10:15:53 (GMT)
commitfe2c03408b67f7d973addaa6465c8e200117ae35 (patch)
tree1c00483d41ab09b78b6a6b446b70d08e830a34ca /unix
parent275980826e4555fcc02101add851b4536286f5e5 (diff)
downloadtcl-fe2c03408b67f7d973addaa6465c8e200117ae35.zip
tcl-fe2c03408b67f7d973addaa6465c8e200117ae35.tar.gz
tcl-fe2c03408b67f7d973addaa6465c8e200117ae35.tar.bz2
Use O_ACCMODE in stead of the non-standard RW_MODES. Since O_RDONLY|O_WRONLY|O_RDWR aren't necessary separate flags, this is the standard way.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixChan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index f83a213..5e39cfc 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -1400,7 +1400,7 @@ TclpOpenFileChannel(
char channelName[16 + TCL_INTEGER_SPACE];
const Tcl_ChannelType *channelTypePtr;
- switch (mode & (O_RDONLY | O_WRONLY | O_RDWR)) {
+ switch (mode & O_ACCMODE) {
case O_RDONLY:
channelPermissions = TCL_READABLE;
break;