summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
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)
commit78e3e645e087d6981615429ced74005fcaa89957 (patch)
tree1c00483d41ab09b78b6a6b446b70d08e830a34ca /unix/tclUnixChan.c
parent2daa6ec625c055fc4a58d54d4b44f503bebc000a (diff)
downloadtcl-78e3e645e087d6981615429ced74005fcaa89957.zip
tcl-78e3e645e087d6981615429ced74005fcaa89957.tar.gz
tcl-78e3e645e087d6981615429ced74005fcaa89957.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/tclUnixChan.c')
-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;