summaryrefslogtreecommitdiff
path: root/src/sys/stat.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2017-08-09 09:39:34 -0700
committerBryant Mairs <bryant@mai.rs>2017-08-16 19:36:51 -0700
commit26c9e1a0e3f3c248929d537d9af0d10740db77d3 (patch)
treecb46fa4973cf3cc834bae9a6d6b54ff6ecbe1c09 /src/sys/stat.rs
parenteabdced459c0108613db8363d3ed76e9fd966565 (diff)
downloadnix-26c9e1a0e3f3c248929d537d9af0d10740db77d3.zip
Use libc_bitflags for stat::Mode
Diffstat (limited to 'src/sys/stat.rs')
-rw-r--r--src/sys/stat.rs35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/sys/stat.rs b/src/sys/stat.rs
index ee086323..7a0b3970 100644
--- a/src/sys/stat.rs
+++ b/src/sys/stat.rs
@@ -20,26 +20,23 @@ libc_bitflags!(
}
);
-bitflags! {
+libc_bitflags! {
pub struct Mode: mode_t {
- const S_IRWXU = libc::S_IRWXU;
- const S_IRUSR = libc::S_IRUSR;
- const S_IWUSR = libc::S_IWUSR;
- const S_IXUSR = libc::S_IXUSR;
-
- const S_IRWXG = libc::S_IRWXG;
- const S_IRGRP = libc::S_IRGRP;
- const S_IWGRP = libc::S_IWGRP;
- const S_IXGRP = libc::S_IXGRP;
-
- const S_IRWXO = libc::S_IRWXO;
- const S_IROTH = libc::S_IROTH;
- const S_IWOTH = libc::S_IWOTH;
- const S_IXOTH = libc::S_IXOTH;
-
- const S_ISUID = libc::S_ISUID as mode_t;
- const S_ISGID = libc::S_ISGID as mode_t;
- const S_ISVTX = libc::S_ISVTX as mode_t;
+ S_IRWXU;
+ S_IRUSR;
+ S_IWUSR;
+ S_IXUSR;
+ S_IRWXG;
+ S_IRGRP;
+ S_IWGRP;
+ S_IXGRP;
+ S_IRWXO;
+ S_IROTH;
+ S_IWOTH;
+ S_IXOTH;
+ S_ISUID as mode_t;
+ S_ISGID as mode_t;
+ S_ISVTX as mode_t;
}
}