diff options
author | Dan Gohman <dev@sunfishcode.online> | 2021-07-01 11:57:44 -0700 |
---|---|---|
committer | Dan Gohman <dev@sunfishcode.online> | 2021-07-01 11:57:44 -0700 |
commit | 4f8f778cedb3dc265108291e393ab4d6afa64d73 (patch) | |
tree | 8886609364053bb794a7c680a6b9295d1d8f9426 /src/wasi.rs | |
parent | d5929b72448613f5cc5d452eb31553bb2fbfc5fc (diff) | |
download | rust-libc-4f8f778cedb3dc265108291e393ab4d6afa64d73.tar.gz |
Define `S_I{R,W,X}{USR,GRP,OTH}` and `S_IS{VTX,UID,GID}` for wasi.
WASI doesn't have full permissions setting, but it's gaining some
support, so define the POSIX names that wasi-libc defines, and let
WASI libc and WASI sort out what to do with them.
Diffstat (limited to 'src/wasi.rs')
-rw-r--r-- | src/wasi.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasi.rs b/src/wasi.rs index 5ef5438c68..0fc6280258 100644 --- a/src/wasi.rs +++ b/src/wasi.rs @@ -226,6 +226,18 @@ pub const S_IFREG: mode_t = 32768; pub const S_IFLNK: mode_t = 40960; pub const S_IFSOCK: mode_t = 49152; pub const S_IFMT: mode_t = 57344; +pub const S_IXOTH: mode_t = 0x1; +pub const S_IWOTH: mode_t = 0x2; +pub const S_IROTH: mode_t = 0x4; +pub const S_IXGRP: mode_t = 0x8; +pub const S_IWGRP: mode_t = 0x10; +pub const S_IRGRP: mode_t = 0x20; +pub const S_IXUSR: mode_t = 0x40; +pub const S_IWUSR: mode_t = 0x80; +pub const S_IRUSR: mode_t = 0x100; +pub const S_ISVTX: mode_t = 0x200; +pub const S_ISGID: mode_t = 0x400; +pub const S_ISUID: mode_t = 0x800; pub const DT_UNKNOWN: u8 = 0; pub const DT_BLK: u8 = 1; pub const DT_CHR: u8 = 2; |