commit 5de022280f36d5955607e2f3337d2aa29745e047
parent 5d1151fafce314ddee1a2114072c25d12313a4f8
Author: Christopher M. Riedl <cmr@bluescreens.de>
Date: Wed, 13 Apr 2022 23:14:01 -0500
rt: add O_ACCMODE file access modes mask
O_ACCMODE is a commonly defined mask to extract the file access modes
from the fcntl() return value (when called with F_GETFL).
Signed-off-by: Christopher M. Riedl <cmr@bluescreens.de>
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/rt/+freebsd/types.ha b/rt/+freebsd/types.ha
@@ -270,6 +270,7 @@ export def DT_WHT: u8 = 14;
export def O_RDONLY: int = 0x0000;
export def O_WRONLY: int = 0x0001;
export def O_RDWR: int = 0x0002;
+export def O_ACCMODE: int = 0x0003;
export def O_NONBLOCK: int = 0x0004;
export def O_APPEND: int = 0x0008;
export def O_SHLOCK: int = 0x0010;
diff --git a/rt/+linux/types.ha b/rt/+linux/types.ha
@@ -69,6 +69,7 @@ export def S_IFSOCK: mode_t = 0o140000;
export def O_RDONLY: int = 0o0;
export def O_WRONLY: int = 0o1;
export def O_RDWR: int = 0o2;
+export def O_ACCMODE: int = 0o3;
export def O_CREATE: int = 0o100;
export def O_EXCLUSIVE: int = 0o200;
export def O_NOCTTY: int = 0o400;