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)
commit3133b4111d1ee2d9531dc3a9a1242124401d0883 (patch)
tree1c00483d41ab09b78b6a6b446b70d08e830a34ca /unix/tclUnixChan.c
parent8ac73bbb406135935ecd132107be21351f74d5d0 (diff)
downloadtcl-3133b4111d1ee2d9531dc3a9a1242124401d0883.zip
tcl-3133b4111d1ee2d9531dc3a9a1242124401d0883.tar.gz
tcl-3133b4111d1ee2d9531dc3a9a1242124401d0883.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;