diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index ba19e0c4c423f..65d7e9005ddfe 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -1467,26 +1467,26 @@ pub const O_RDONLY: ::c_int = 0; pub const O_WRONLY: ::c_int = 1; pub const O_RDWR: ::c_int = 2; -pub const S_IFIFO: ::mode_t = 4096; -pub const S_IFCHR: ::mode_t = 8192; -pub const S_IFBLK: ::mode_t = 24576; -pub const S_IFDIR: ::mode_t = 16384; -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 = 61440; -pub const S_IRWXU: ::mode_t = 448; -pub const S_IXUSR: ::mode_t = 64; -pub const S_IWUSR: ::mode_t = 128; -pub const S_IRUSR: ::mode_t = 256; -pub const S_IRWXG: ::mode_t = 56; -pub const S_IXGRP: ::mode_t = 8; -pub const S_IWGRP: ::mode_t = 16; -pub const S_IRGRP: ::mode_t = 32; -pub const S_IRWXO: ::mode_t = 7; -pub const S_IXOTH: ::mode_t = 1; -pub const S_IWOTH: ::mode_t = 2; -pub const S_IROTH: ::mode_t = 4; +pub const S_IFIFO: ::mode_t = 0o1_0000; +pub const S_IFCHR: ::mode_t = 0o2_0000; +pub const S_IFBLK: ::mode_t = 0o6_0000; +pub const S_IFDIR: ::mode_t = 0o4_0000; +pub const S_IFREG: ::mode_t = 0o10_0000; +pub const S_IFLNK: ::mode_t = 0o12_0000; +pub const S_IFSOCK: ::mode_t = 0o14_0000; +pub const S_IFMT: ::mode_t = 0o17_0000; +pub const S_IRWXU: ::mode_t = 0o0700; +pub const S_IXUSR: ::mode_t = 0o0100; +pub const S_IWUSR: ::mode_t = 0o0200; +pub const S_IRUSR: ::mode_t = 0o0400; +pub const S_IRWXG: ::mode_t = 0o0070; +pub const S_IXGRP: ::mode_t = 0o0010; +pub const S_IWGRP: ::mode_t = 0o0020; +pub const S_IRGRP: ::mode_t = 0o0040; +pub const S_IRWXO: ::mode_t = 0o0007; +pub const S_IXOTH: ::mode_t = 0o0001; +pub const S_IWOTH: ::mode_t = 0o0002; +pub const S_IROTH: ::mode_t = 0o0004; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; pub const W_OK: ::c_int = 2; @@ -2283,9 +2283,9 @@ pub const POSIX_MADV_RANDOM: ::c_int = 1; pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; pub const F_LOCK: ::c_int = 1; pub const F_TEST: ::c_int = 3; diff --git a/src/solid/mod.rs b/src/solid/mod.rs index c88c663ee3f8c..4c880796340eb 100644 --- a/src/solid/mod.rs +++ b/src/solid/mod.rs @@ -209,15 +209,15 @@ pub const O_EXCL: c_int = 0x400; pub const O_TEXT: c_int = 0x100; pub const O_BINARY: c_int = 0x200; pub const O_TRUNC: c_int = 0x20; -pub const S_IEXEC: c_short = 0x0040; -pub const S_IWRITE: c_short = 0x0080; -pub const S_IREAD: c_short = 0x0100; -pub const S_IFCHR: c_short = 0x2000; -pub const S_IFDIR: c_short = 0x4000; -pub const S_IFMT: c_short = 0o160000; -pub const S_IFIFO: c_short = 0o0010000; -pub const S_IFBLK: c_short = 0o0060000; -pub const S_IFREG: c_short = 0o0100000; +pub const S_IEXEC: c_short = 0o0100; +pub const S_IWRITE: c_short = 0o0200; +pub const S_IREAD: c_short = 0o0400; +pub const S_IFCHR: c_short = 0o2_0000; +pub const S_IFDIR: c_short = 0o4_0000; +pub const S_IFMT: c_short = 0o16_0000; +pub const S_IFIFO: c_short = 0o1_0000; +pub const S_IFBLK: c_short = 0o6_0000; +pub const S_IFREG: c_short = 0o10_0000; pub const LC_ALL: c_int = 0; pub const LC_COLLATE: c_int = 1; diff --git a/src/unix/aix/mod.rs b/src/unix/aix/mod.rs index b4b6ecac59bd5..33ae4cefe7a74 100644 --- a/src/unix/aix/mod.rs +++ b/src/unix/aix/mod.rs @@ -1594,29 +1594,29 @@ pub const MADV_WILLNEED: ::c_int = 3; pub const MADV_DONTNEED: ::c_int = 4; // sys/mode.h -pub const S_IFMT: mode_t = 0o170000; -pub const S_IFREG: mode_t = 0o100000; -pub const S_IFDIR: mode_t = 0o40000; -pub const S_IFBLK: mode_t = 0o60000; -pub const S_IFCHR: mode_t = 0o20000; -pub const S_IFIFO: mode_t = 0o10000; -pub const S_IRWXU: mode_t = 0o700; -pub const S_IRUSR: mode_t = 0o400; -pub const S_IWUSR: mode_t = 0o200; -pub const S_IXUSR: mode_t = 0o100; -pub const S_IRWXG: mode_t = 0o70; -pub const S_IRGRP: mode_t = 0o40; -pub const S_IWGRP: mode_t = 0o20; -pub const S_IXGRP: mode_t = 0o10; -pub const S_IRWXO: mode_t = 7; -pub const S_IROTH: mode_t = 4; -pub const S_IWOTH: mode_t = 2; -pub const S_IXOTH: mode_t = 1; -pub const S_IFLNK: mode_t = 0o120000; -pub const S_IFSOCK: mode_t = 0o140000; -pub const S_IEXEC: mode_t = 0o100; -pub const S_IWRITE: mode_t = 0o200; -pub const S_IREAD: mode_t = 0o400; +pub const S_IFMT: mode_t = 0o17_0000; +pub const S_IFREG: mode_t = 0o10_0000; +pub const S_IFDIR: mode_t = 0o4_0000; +pub const S_IFBLK: mode_t = 0o6_0000; +pub const S_IFCHR: mode_t = 0o2_0000; +pub const S_IFIFO: mode_t = 0o1_0000; +pub const S_IRWXU: mode_t = 0o0700; +pub const S_IRUSR: mode_t = 0o0400; +pub const S_IWUSR: mode_t = 0o0200; +pub const S_IXUSR: mode_t = 0o0100; +pub const S_IRWXG: mode_t = 0o0070; +pub const S_IRGRP: mode_t = 0o0040; +pub const S_IWGRP: mode_t = 0o0020; +pub const S_IXGRP: mode_t = 0o0010; +pub const S_IRWXO: mode_t = 0o0007; +pub const S_IROTH: mode_t = 0o0004; +pub const S_IWOTH: mode_t = 0o0002; +pub const S_IXOTH: mode_t = 0o0001; +pub const S_IFLNK: mode_t = 0o12_0000; +pub const S_IFSOCK: mode_t = 0o14_0000; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; // sys/msg.h pub const MSG_NOERROR: ::c_int = 0o10000; diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 5cad5d320e472..e3fd22356190c 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -3166,29 +3166,29 @@ pub const O_SYMLINK: ::c_int = 0x00200000; pub const O_DSYNC: ::c_int = 0x00400000; pub const O_CLOEXEC: ::c_int = 0x01000000; pub const O_NOFOLLOW_ANY: ::c_int = 0x20000000; -pub const S_IFIFO: mode_t = 4096; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -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 = 61440; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; -pub const S_IRWXU: mode_t = 448; -pub const S_IXUSR: mode_t = 64; -pub const S_IWUSR: mode_t = 128; -pub const S_IRUSR: mode_t = 256; -pub const S_IRWXG: mode_t = 56; -pub const S_IXGRP: mode_t = 8; -pub const S_IWGRP: mode_t = 16; -pub const S_IRGRP: mode_t = 32; -pub const S_IRWXO: mode_t = 7; -pub const S_IXOTH: mode_t = 1; -pub const S_IWOTH: mode_t = 2; -pub const S_IROTH: mode_t = 4; +pub const S_IFIFO: mode_t = 0o1_0000; +pub const S_IFCHR: mode_t = 0o2_0000; +pub const S_IFBLK: mode_t = 0o6_0000; +pub const S_IFDIR: mode_t = 0o4_0000; +pub const S_IFREG: mode_t = 0o10_0000; +pub const S_IFLNK: mode_t = 0o12_0000; +pub const S_IFSOCK: mode_t = 0o14_0000; +pub const S_IFMT: mode_t = 0o17_0000; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; +pub const S_IRWXU: mode_t = 0o0700; +pub const S_IXUSR: mode_t = 0o0100; +pub const S_IWUSR: mode_t = 0o0200; +pub const S_IRUSR: mode_t = 0o0400; +pub const S_IRWXG: mode_t = 0o0070; +pub const S_IXGRP: mode_t = 0o0010; +pub const S_IWGRP: mode_t = 0o0020; +pub const S_IRGRP: mode_t = 0o0040; +pub const S_IRWXO: mode_t = 0o0007; +pub const S_IXOTH: mode_t = 0o0001; +pub const S_IWOTH: mode_t = 0o0002; +pub const S_IROTH: mode_t = 0o0004; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; pub const W_OK: ::c_int = 2; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 5b8d77246978b..72ab61fae6cac 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -555,29 +555,29 @@ pub const TMP_MAX: ::c_uint = 308915776; pub const O_NOCTTY: ::c_int = 32768; pub const O_DIRECT: ::c_int = 0x00010000; -pub const S_IFIFO: mode_t = 4096; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -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 = 61440; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; -pub const S_IRWXU: mode_t = 448; -pub const S_IXUSR: mode_t = 64; -pub const S_IWUSR: mode_t = 128; -pub const S_IRUSR: mode_t = 256; -pub const S_IRWXG: mode_t = 56; -pub const S_IXGRP: mode_t = 8; -pub const S_IWGRP: mode_t = 16; -pub const S_IRGRP: mode_t = 32; -pub const S_IRWXO: mode_t = 7; -pub const S_IXOTH: mode_t = 1; -pub const S_IWOTH: mode_t = 2; -pub const S_IROTH: mode_t = 4; +pub const S_IFIFO: mode_t = 0o1_0000; +pub const S_IFCHR: mode_t = 0o2_0000; +pub const S_IFBLK: mode_t = 0o6_0000; +pub const S_IFDIR: mode_t = 0o4_0000; +pub const S_IFREG: mode_t = 0o10_0000; +pub const S_IFLNK: mode_t = 0o12_0000; +pub const S_IFSOCK: mode_t = 0o14_0000; +pub const S_IFMT: mode_t = 0o17_0000; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; +pub const S_IRWXU: mode_t = 0o0700; +pub const S_IXUSR: mode_t = 0o0100; +pub const S_IWUSR: mode_t = 0o0200; +pub const S_IRUSR: mode_t = 0o0400; +pub const S_IRWXG: mode_t = 0o0070; +pub const S_IXGRP: mode_t = 0o0010; +pub const S_IWGRP: mode_t = 0o0020; +pub const S_IRGRP: mode_t = 0o0040; +pub const S_IRWXO: mode_t = 0o0007; +pub const S_IXOTH: mode_t = 0o0001; +pub const S_IWOTH: mode_t = 0o0002; +pub const S_IROTH: mode_t = 0o0004; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; pub const W_OK: ::c_int = 2; diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index f0e1e9ea2d7a3..8b5e74cac5d8e 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -168,29 +168,29 @@ pub const FOPEN_MAX: ::c_uint = 20; pub const FILENAME_MAX: ::c_uint = 1024; pub const L_tmpnam: ::c_uint = 1024; pub const O_NOCTTY: ::c_int = 32768; -pub const S_IFIFO: mode_t = 4096; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -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 = 61440; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; -pub const S_IRWXU: mode_t = 448; -pub const S_IXUSR: mode_t = 64; -pub const S_IWUSR: mode_t = 128; -pub const S_IRUSR: mode_t = 256; -pub const S_IRWXG: mode_t = 56; -pub const S_IXGRP: mode_t = 8; -pub const S_IWGRP: mode_t = 16; -pub const S_IRGRP: mode_t = 32; -pub const S_IRWXO: mode_t = 7; -pub const S_IXOTH: mode_t = 1; -pub const S_IWOTH: mode_t = 2; -pub const S_IROTH: mode_t = 4; +pub const S_IFIFO: mode_t = 0o1_0000; +pub const S_IFCHR: mode_t = 0o2_0000; +pub const S_IFBLK: mode_t = 0o6_0000; +pub const S_IFDIR: mode_t = 0o4_0000; +pub const S_IFREG: mode_t = 0o10_0000; +pub const S_IFLNK: mode_t = 0o12_0000; +pub const S_IFSOCK: mode_t = 0o14_0000; +pub const S_IFMT: mode_t = 0o17_0000; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; +pub const S_IRWXU: mode_t = 0o0700; +pub const S_IXUSR: mode_t = 0o0100; +pub const S_IWUSR: mode_t = 0o0200; +pub const S_IRUSR: mode_t = 0o0400; +pub const S_IRWXG: mode_t = 0o0070; +pub const S_IXGRP: mode_t = 0o0010; +pub const S_IWGRP: mode_t = 0o0020; +pub const S_IRGRP: mode_t = 0o0040; +pub const S_IRWXO: mode_t = 0o0007; +pub const S_IXOTH: mode_t = 0o0001; +pub const S_IWOTH: mode_t = 0o0002; +pub const S_IROTH: mode_t = 0o0004; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; pub const W_OK: ::c_int = 2; diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index a07a5cdc2dd0d..f2c381ac6c3b7 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -771,27 +771,27 @@ pub const O_NOFOLLOW: ::c_int = 0x00080000; pub const O_NOCACHE: ::c_int = 0x00100000; pub const O_DIRECTORY: ::c_int = 0x00200000; -pub const S_IFIFO: ::mode_t = 4096; -pub const S_IFCHR: ::mode_t = 8192; -pub const S_IFBLK: ::mode_t = 24576; -pub const S_IFDIR: ::mode_t = 16384; -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 = 61440; - -pub const S_IRWXU: ::mode_t = 0o00700; -pub const S_IRUSR: ::mode_t = 0o00400; -pub const S_IWUSR: ::mode_t = 0o00200; -pub const S_IXUSR: ::mode_t = 0o00100; -pub const S_IRWXG: ::mode_t = 0o00070; -pub const S_IRGRP: ::mode_t = 0o00040; -pub const S_IWGRP: ::mode_t = 0o00020; -pub const S_IXGRP: ::mode_t = 0o00010; -pub const S_IRWXO: ::mode_t = 0o00007; -pub const S_IROTH: ::mode_t = 0o00004; -pub const S_IWOTH: ::mode_t = 0o00002; -pub const S_IXOTH: ::mode_t = 0o00001; +pub const S_IFIFO: ::mode_t = 0o1_0000; +pub const S_IFCHR: ::mode_t = 0o2_0000; +pub const S_IFBLK: ::mode_t = 0o6_0000; +pub const S_IFDIR: ::mode_t = 0o4_0000; +pub const S_IFREG: ::mode_t = 0o10_0000; +pub const S_IFLNK: ::mode_t = 0o12_0000; +pub const S_IFSOCK: ::mode_t = 0o14_0000; +pub const S_IFMT: ::mode_t = 0o17_0000; + +pub const S_IRWXU: ::mode_t = 0o0700; +pub const S_IRUSR: ::mode_t = 0o0400; +pub const S_IWUSR: ::mode_t = 0o0200; +pub const S_IXUSR: ::mode_t = 0o0100; +pub const S_IRWXG: ::mode_t = 0o0070; +pub const S_IRGRP: ::mode_t = 0o0040; +pub const S_IWGRP: ::mode_t = 0o0020; +pub const S_IXGRP: ::mode_t = 0o0010; +pub const S_IRWXO: ::mode_t = 0o0007; +pub const S_IROTH: ::mode_t = 0o0004; +pub const S_IWOTH: ::mode_t = 0o0002; +pub const S_IXOTH: ::mode_t = 0o0001; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index 5cc6992d32cae..5d3e99d5011f3 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -2117,29 +2117,29 @@ pub const MINSIGSTKSZ: usize = 8192; pub const SIGSTKSZ: usize = 40960; // sys/stat.h -pub const __S_IFMT: mode_t = 61440; -pub const __S_IFDIR: mode_t = 16384; -pub const __S_IFCHR: mode_t = 8192; -pub const __S_IFBLK: mode_t = 24576; -pub const __S_IFREG: mode_t = 32768; -pub const __S_IFLNK: mode_t = 40960; -pub const __S_IFSOCK: mode_t = 49152; -pub const __S_IFIFO: mode_t = 4096; -pub const __S_ISUID: mode_t = 2048; -pub const __S_ISGID: mode_t = 1024; -pub const __S_ISVTX: mode_t = 512; -pub const __S_IREAD: mode_t = 256; -pub const __S_IWRITE: mode_t = 128; -pub const __S_IEXEC: mode_t = 64; -pub const S_INOCACHE: mode_t = 65536; -pub const S_IUSEUNK: mode_t = 131072; -pub const S_IUNKNOWN: mode_t = 1835008; -pub const S_IUNKSHIFT: mode_t = 12; -pub const S_IPTRANS: mode_t = 2097152; -pub const S_IATRANS: mode_t = 4194304; -pub const S_IROOT: mode_t = 8388608; -pub const S_ITRANS: mode_t = 14680064; -pub const S_IMMAP0: mode_t = 16777216; +pub const __S_IFMT: mode_t = 0o17_0000; +pub const __S_IFDIR: mode_t = 0o4_0000; +pub const __S_IFCHR: mode_t = 0o2_0000; +pub const __S_IFBLK: mode_t = 0o6_0000; +pub const __S_IFREG: mode_t = 0o10_0000; +pub const __S_IFLNK: mode_t = 0o12_0000; +pub const __S_IFSOCK: mode_t = 0o14_0000; +pub const __S_IFIFO: mode_t = 0o1_0000; +pub const __S_ISUID: mode_t = 0o4000; +pub const __S_ISGID: mode_t = 0o2000; +pub const __S_ISVTX: mode_t = 0o1000; +pub const __S_IREAD: mode_t = 0o0400; +pub const __S_IWRITE: mode_t = 0o0200; +pub const __S_IEXEC: mode_t = 0o0100; +pub const S_INOCACHE: mode_t = 0o20_0000; +pub const S_IUSEUNK: mode_t = 0o40_0000; +pub const S_IUNKNOWN: mode_t = 0o700_0000; +pub const S_IUNKSHIFT: mode_t = 0o0014; +pub const S_IPTRANS: mode_t = 0o1000_0000; +pub const S_IATRANS: mode_t = 0o2000_0000; +pub const S_IROOT: mode_t = 0o4000_0000; +pub const S_ITRANS: mode_t = 0o7000_0000; +pub const S_IMMAP0: mode_t = 0o10000_0000; pub const CMASK: mode_t = 18; pub const UF_SETTABLE: ::c_uint = 65535; pub const UF_NODUMP: ::c_uint = 1; @@ -2155,32 +2155,32 @@ pub const SF_NOUNLINK: ::c_uint = 1048576; pub const SF_SNAPSHOT: ::c_uint = 2097152; pub const UTIME_NOW: ::c_long = -1; pub const UTIME_OMIT: ::c_long = -2; -pub const S_IFMT: ::mode_t = 61440; -pub const S_IFDIR: ::mode_t = 16384; -pub const S_IFCHR: ::mode_t = 8192; -pub const S_IFBLK: ::mode_t = 24576; -pub const S_IFREG: ::mode_t = 32768; -pub const S_IFIFO: ::mode_t = 4096; -pub const S_IFLNK: ::mode_t = 40960; -pub const S_IFSOCK: ::mode_t = 49152; -pub const S_ISUID: ::mode_t = 2048; -pub const S_ISGID: ::mode_t = 1024; -pub const S_ISVTX: ::mode_t = 512; -pub const S_IRUSR: ::mode_t = 256; -pub const S_IWUSR: ::mode_t = 128; -pub const S_IXUSR: ::mode_t = 64; -pub const S_IRWXU: ::mode_t = 448; -pub const S_IREAD: ::mode_t = 256; -pub const S_IWRITE: ::mode_t = 128; -pub const S_IEXEC: ::mode_t = 64; -pub const S_IRGRP: ::mode_t = 32; -pub const S_IWGRP: ::mode_t = 16; -pub const S_IXGRP: ::mode_t = 8; -pub const S_IRWXG: ::mode_t = 56; -pub const S_IROTH: ::mode_t = 4; -pub const S_IWOTH: ::mode_t = 2; -pub const S_IXOTH: ::mode_t = 1; -pub const S_IRWXO: ::mode_t = 7; +pub const S_IFMT: ::mode_t = 0o17_0000; +pub const S_IFDIR: ::mode_t = 0o4_0000; +pub const S_IFCHR: ::mode_t = 0o2_0000; +pub const S_IFBLK: ::mode_t = 0o6_0000; +pub const S_IFREG: ::mode_t = 0o10_0000; +pub const S_IFIFO: ::mode_t = 0o1_0000; +pub const S_IFLNK: ::mode_t = 0o12_0000; +pub const S_IFSOCK: ::mode_t = 0o14_0000; +pub const S_ISUID: ::mode_t = 0o4000; +pub const S_ISGID: ::mode_t = 0o2000; +pub const S_ISVTX: ::mode_t = 0o1000; +pub const S_IRUSR: ::mode_t = 0o0400; +pub const S_IWUSR: ::mode_t = 0o0200; +pub const S_IXUSR: ::mode_t = 0o0100; +pub const S_IRWXU: ::mode_t = 0o0700; +pub const S_IREAD: ::mode_t = 0o0400; +pub const S_IWRITE: ::mode_t = 0o0200; +pub const S_IEXEC: ::mode_t = 0o0100; +pub const S_IRGRP: ::mode_t = 0o0040; +pub const S_IWGRP: ::mode_t = 0o0020; +pub const S_IXGRP: ::mode_t = 0o0010; +pub const S_IRWXG: ::mode_t = 0o0070; +pub const S_IROTH: ::mode_t = 0o0004; +pub const S_IWOTH: ::mode_t = 0o0002; +pub const S_IXOTH: ::mode_t = 0o0001; +pub const S_IRWXO: ::mode_t = 0o0007; pub const ACCESSPERMS: ::mode_t = 511; pub const ALLPERMS: ::mode_t = 4095; pub const DEFFILEMODE: ::mode_t = 438; diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 07f33fc9839d3..8014060890963 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -775,9 +775,9 @@ pub const POSIX_MADV_RANDOM: ::c_int = 1; pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; pub const F_LOCK: ::c_int = 1; pub const F_TEST: ::c_int = 3; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 125a4129ef61f..a463951bbbb67 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -2240,9 +2240,9 @@ pub const POSIX_MADV_WILLNEED: ::c_int = 3; pub const POSIX_SPAWN_USEVFORK: ::c_int = 64; pub const POSIX_SPAWN_SETSID: ::c_int = 128; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; pub const F_LOCK: ::c_int = 1; pub const F_TEST: ::c_int = 3; diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index d80b00f423eca..af2ad39cba4ef 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -505,26 +505,26 @@ pub const O_RDWR: ::c_int = 2; pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; -pub const S_IFIFO: ::mode_t = 4096; -pub const S_IFCHR: ::mode_t = 8192; -pub const S_IFBLK: ::mode_t = 24576; -pub const S_IFDIR: ::mode_t = 16384; -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 = 61440; -pub const S_IRWXU: ::mode_t = 448; -pub const S_IXUSR: ::mode_t = 64; -pub const S_IWUSR: ::mode_t = 128; -pub const S_IRUSR: ::mode_t = 256; -pub const S_IRWXG: ::mode_t = 56; -pub const S_IXGRP: ::mode_t = 8; -pub const S_IWGRP: ::mode_t = 16; -pub const S_IRGRP: ::mode_t = 32; -pub const S_IRWXO: ::mode_t = 7; -pub const S_IXOTH: ::mode_t = 1; -pub const S_IWOTH: ::mode_t = 2; -pub const S_IROTH: ::mode_t = 4; +pub const S_IFIFO: ::mode_t = 0o1_0000; +pub const S_IFCHR: ::mode_t = 0o2_0000; +pub const S_IFBLK: ::mode_t = 0o6_0000; +pub const S_IFDIR: ::mode_t = 0o4_0000; +pub const S_IFREG: ::mode_t = 0o10_0000; +pub const S_IFLNK: ::mode_t = 0o12_0000; +pub const S_IFSOCK: ::mode_t = 0o14_0000; +pub const S_IFMT: ::mode_t = 0o17_0000; +pub const S_IRWXU: ::mode_t = 0o0700; +pub const S_IXUSR: ::mode_t = 0o0100; +pub const S_IWUSR: ::mode_t = 0o0200; +pub const S_IRUSR: ::mode_t = 0o0400; +pub const S_IRWXG: ::mode_t = 0o0070; +pub const S_IXGRP: ::mode_t = 0o0010; +pub const S_IWGRP: ::mode_t = 0o0020; +pub const S_IRGRP: ::mode_t = 0o0040; +pub const S_IRWXO: ::mode_t = 0o0007; +pub const S_IXOTH: ::mode_t = 0o0001; +pub const S_IWOTH: ::mode_t = 0o0002; +pub const S_IROTH: ::mode_t = 0o0004; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; pub const W_OK: ::c_int = 2; diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 0b270c0a39bca..90280a14d3f45 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -235,9 +235,9 @@ cfg_if! { } pub const SIGIOT: ::c_int = 6; -pub const S_ISUID: ::mode_t = 0x800; -pub const S_ISGID: ::mode_t = 0x400; -pub const S_ISVTX: ::mode_t = 0x200; +pub const S_ISUID: ::mode_t = 0o4000; +pub const S_ISGID: ::mode_t = 0o2000; +pub const S_ISVTX: ::mode_t = 0o1000; cfg_if! { if #[cfg(not(any(target_os = "haiku", target_os = "illumos", diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 3a9a73c2d5fc8..45a2668aac71a 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -420,27 +420,27 @@ pub const FIOCLEX: ::c_ulong = 0x20006601; pub const FIONCLEX: ::c_ulong = 0x20006602; pub const S_BLKSIZE: ::mode_t = 1024; -pub const S_IREAD: ::mode_t = 256; -pub const S_IWRITE: ::mode_t = 128; -pub const S_IEXEC: ::mode_t = 64; -pub const S_ENFMT: ::mode_t = 1024; -pub const S_IFMT: ::mode_t = 61440; -pub const S_IFDIR: ::mode_t = 16384; -pub const S_IFCHR: ::mode_t = 8192; -pub const S_IFBLK: ::mode_t = 24576; -pub const S_IFREG: ::mode_t = 32768; -pub const S_IFLNK: ::mode_t = 40960; -pub const S_IFSOCK: ::mode_t = 49152; -pub const S_IFIFO: ::mode_t = 4096; -pub const S_IRUSR: ::mode_t = 256; -pub const S_IWUSR: ::mode_t = 128; -pub const S_IXUSR: ::mode_t = 64; -pub const S_IRGRP: ::mode_t = 32; -pub const S_IWGRP: ::mode_t = 16; -pub const S_IXGRP: ::mode_t = 8; -pub const S_IROTH: ::mode_t = 4; -pub const S_IWOTH: ::mode_t = 2; -pub const S_IXOTH: ::mode_t = 1; +pub const S_IREAD: ::mode_t = 0o0400; +pub const S_IWRITE: ::mode_t = 0o0200; +pub const S_IEXEC: ::mode_t = 0o0100; +pub const S_ENFMT: ::mode_t = 0o2000; +pub const S_IFMT: ::mode_t = 0o17_0000; +pub const S_IFDIR: ::mode_t = 0o4_0000; +pub const S_IFCHR: ::mode_t = 0o2_0000; +pub const S_IFBLK: ::mode_t = 0o6_0000; +pub const S_IFREG: ::mode_t = 0o10_0000; +pub const S_IFLNK: ::mode_t = 0o12_0000; +pub const S_IFSOCK: ::mode_t = 0o14_0000; +pub const S_IFIFO: ::mode_t = 0o1_0000; +pub const S_IRUSR: ::mode_t = 0o0400; +pub const S_IWUSR: ::mode_t = 0o0200; +pub const S_IXUSR: ::mode_t = 0o0100; +pub const S_IRGRP: ::mode_t = 0o0040; +pub const S_IWGRP: ::mode_t = 0o0020; +pub const S_IXGRP: ::mode_t = 0o0010; +pub const S_IROTH: ::mode_t = 0o0004; +pub const S_IWOTH: ::mode_t = 0o0002; +pub const S_IXOTH: ::mode_t = 0o0001; pub const SOL_TCP: ::c_int = 6; diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 7e5d228ccf7f7..10c03c55da2a0 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -2037,27 +2037,27 @@ pub const S_IEXEC: mode_t = ::S_IXUSR; pub const S_IWRITE: mode_t = ::S_IWUSR; pub const S_IREAD: mode_t = ::S_IRUSR; -pub const S_IFIFO: ::mode_t = 0x1000; -pub const S_IFCHR: ::mode_t = 0x2000; -pub const S_IFDIR: ::mode_t = 0x4000; -pub const S_IFBLK: ::mode_t = 0x6000; -pub const S_IFREG: ::mode_t = 0x8000; -pub const S_IFLNK: ::mode_t = 0xA000; -pub const S_IFSOCK: ::mode_t = 0xC000; -pub const S_IFMT: ::mode_t = 0xF000; - -pub const S_IXOTH: ::mode_t = 0o000001; -pub const S_IWOTH: ::mode_t = 0o000002; -pub const S_IROTH: ::mode_t = 0o000004; -pub const S_IRWXO: ::mode_t = 0o000007; -pub const S_IXGRP: ::mode_t = 0o000010; -pub const S_IWGRP: ::mode_t = 0o000020; -pub const S_IRGRP: ::mode_t = 0o000040; -pub const S_IRWXG: ::mode_t = 0o000070; -pub const S_IXUSR: ::mode_t = 0o000100; -pub const S_IWUSR: ::mode_t = 0o000200; -pub const S_IRUSR: ::mode_t = 0o000400; -pub const S_IRWXU: ::mode_t = 0o000700; +pub const S_IFIFO: ::mode_t = 0o1_0000; +pub const S_IFCHR: ::mode_t = 0o2_0000; +pub const S_IFDIR: ::mode_t = 0o4_0000; +pub const S_IFBLK: ::mode_t = 0o6_0000; +pub const S_IFREG: ::mode_t = 0o10_0000; +pub const S_IFLNK: ::mode_t = 0o12_0000; +pub const S_IFSOCK: ::mode_t = 0o14_0000; +pub const S_IFMT: ::mode_t = 0o17_0000; + +pub const S_IXOTH: ::mode_t = 0o0001; +pub const S_IWOTH: ::mode_t = 0o0002; +pub const S_IROTH: ::mode_t = 0o0004; +pub const S_IRWXO: ::mode_t = 0o0007; +pub const S_IXGRP: ::mode_t = 0o0010; +pub const S_IWGRP: ::mode_t = 0o0020; +pub const S_IRGRP: ::mode_t = 0o0040; +pub const S_IRWXG: ::mode_t = 0o0070; +pub const S_IXUSR: ::mode_t = 0o0100; +pub const S_IWUSR: ::mode_t = 0o0200; +pub const S_IRUSR: ::mode_t = 0o0400; +pub const S_IRWXU: ::mode_t = 0o0700; pub const F_LOCK: ::c_int = 1; pub const F_TEST: ::c_int = 3; diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 017d5038905f6..bc6e2a8a93d4e 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -701,26 +701,26 @@ pub const EPOLLONESHOT: ::c_int = 0; pub const EPOLLET: ::c_int = 0; // sys/stat.h -pub const S_IFMT: ::c_int = 0o0_170_000; -pub const S_IFDIR: ::c_int = 0o040_000; -pub const S_IFCHR: ::c_int = 0o020_000; -pub const S_IFBLK: ::c_int = 0o060_000; -pub const S_IFREG: ::c_int = 0o100_000; -pub const S_IFIFO: ::c_int = 0o010_000; -pub const S_IFLNK: ::c_int = 0o120_000; -pub const S_IFSOCK: ::c_int = 0o140_000; -pub const S_IRWXU: ::c_int = 0o0_700; -pub const S_IRUSR: ::c_int = 0o0_400; -pub const S_IWUSR: ::c_int = 0o0_200; -pub const S_IXUSR: ::c_int = 0o0_100; -pub const S_IRWXG: ::c_int = 0o0_070; -pub const S_IRGRP: ::c_int = 0o0_040; -pub const S_IWGRP: ::c_int = 0o0_020; -pub const S_IXGRP: ::c_int = 0o0_010; -pub const S_IRWXO: ::c_int = 0o0_007; -pub const S_IROTH: ::c_int = 0o0_004; -pub const S_IWOTH: ::c_int = 0o0_002; -pub const S_IXOTH: ::c_int = 0o0_001; +pub const S_IFMT: ::c_int = 0o17_0000; +pub const S_IFDIR: ::c_int = 0o4_0000; +pub const S_IFCHR: ::c_int = 0o2_0000; +pub const S_IFBLK: ::c_int = 0o6_0000; +pub const S_IFREG: ::c_int = 0o10_0000; +pub const S_IFIFO: ::c_int = 0o1_0000; +pub const S_IFLNK: ::c_int = 0o12_0000; +pub const S_IFSOCK: ::c_int = 0o14_0000; +pub const S_IRWXU: ::c_int = 0o0700; +pub const S_IRUSR: ::c_int = 0o0400; +pub const S_IWUSR: ::c_int = 0o0200; +pub const S_IXUSR: ::c_int = 0o0100; +pub const S_IRWXG: ::c_int = 0o0070; +pub const S_IRGRP: ::c_int = 0o0040; +pub const S_IWGRP: ::c_int = 0o0020; +pub const S_IXGRP: ::c_int = 0o0010; +pub const S_IRWXO: ::c_int = 0o0007; +pub const S_IROTH: ::c_int = 0o0004; +pub const S_IWOTH: ::c_int = 0o0002; +pub const S_IXOTH: ::c_int = 0o0001; // stdlib.h pub const EXIT_SUCCESS: ::c_int = 0; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index ced5827cb192f..6c0d76d47b6cb 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -1287,29 +1287,29 @@ pub const O_ACCMODE: ::c_int = 0x600003; pub const O_XATTR: ::c_int = 0x4000; pub const O_DIRECTORY: ::c_int = 0x1000000; pub const O_DIRECT: ::c_int = 0x2000000; -pub const S_IFIFO: mode_t = 4096; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -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 = 61440; -pub const S_IEXEC: mode_t = 64; -pub const S_IWRITE: mode_t = 128; -pub const S_IREAD: mode_t = 256; -pub const S_IRWXU: mode_t = 448; -pub const S_IXUSR: mode_t = 64; -pub const S_IWUSR: mode_t = 128; -pub const S_IRUSR: mode_t = 256; -pub const S_IRWXG: mode_t = 56; -pub const S_IXGRP: mode_t = 8; -pub const S_IWGRP: mode_t = 16; -pub const S_IRGRP: mode_t = 32; -pub const S_IRWXO: mode_t = 7; -pub const S_IXOTH: mode_t = 1; -pub const S_IWOTH: mode_t = 2; -pub const S_IROTH: mode_t = 4; +pub const S_IFIFO: mode_t = 0o1_0000; +pub const S_IFCHR: mode_t = 0o2_0000; +pub const S_IFBLK: mode_t = 0o6_0000; +pub const S_IFDIR: mode_t = 0o4_0000; +pub const S_IFREG: mode_t = 0o10_0000; +pub const S_IFLNK: mode_t = 0o12_0000; +pub const S_IFSOCK: mode_t = 0o14_0000; +pub const S_IFMT: mode_t = 0o17_0000; +pub const S_IEXEC: mode_t = 0o0100; +pub const S_IWRITE: mode_t = 0o0200; +pub const S_IREAD: mode_t = 0o0400; +pub const S_IRWXU: mode_t = 0o0700; +pub const S_IXUSR: mode_t = 0o0100; +pub const S_IWUSR: mode_t = 0o0200; +pub const S_IRUSR: mode_t = 0o0400; +pub const S_IRWXG: mode_t = 0o0070; +pub const S_IXGRP: mode_t = 0o0010; +pub const S_IWGRP: mode_t = 0o0020; +pub const S_IRGRP: mode_t = 0o0040; +pub const S_IRWXO: mode_t = 0o0007; +pub const S_IXOTH: mode_t = 0o0001; +pub const S_IWOTH: mode_t = 0o0002; +pub const S_IROTH: mode_t = 0o0004; pub const F_OK: ::c_int = 0; pub const R_OK: ::c_int = 4; pub const W_OK: ::c_int = 2; diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 23637b6998a77..4e23f250ba5a0 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -741,30 +741,30 @@ pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12; pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13; // STAT Stuff -pub const S_IFMT: ::c_int = 0xf000; -pub const S_IFIFO: ::c_int = 0x1000; -pub const S_IFCHR: ::c_int = 0x2000; -pub const S_IFDIR: ::c_int = 0x4000; -pub const S_IFBLK: ::c_int = 0x6000; -pub const S_IFREG: ::c_int = 0x8000; -pub const S_IFLNK: ::c_int = 0xa000; -pub const S_IFSHM: ::c_int = 0xb000; -pub const S_IFSOCK: ::c_int = 0xc000; -pub const S_ISUID: ::c_int = 0x0800; -pub const S_ISGID: ::c_int = 0x0400; -pub const S_ISTXT: ::c_int = 0x0200; -pub const S_IRUSR: ::c_int = 0x0100; -pub const S_IWUSR: ::c_int = 0x0080; -pub const S_IXUSR: ::c_int = 0x0040; -pub const S_IRWXU: ::c_int = 0x01c0; -pub const S_IRGRP: ::c_int = 0x0020; -pub const S_IWGRP: ::c_int = 0x0010; -pub const S_IXGRP: ::c_int = 0x0008; -pub const S_IRWXG: ::c_int = 0x0038; -pub const S_IROTH: ::c_int = 0x0004; -pub const S_IWOTH: ::c_int = 0x0002; -pub const S_IXOTH: ::c_int = 0x0001; -pub const S_IRWXO: ::c_int = 0x0007; +pub const S_IFMT: ::c_int = 0o17_0000; +pub const S_IFIFO: ::c_int = 0o1_0000; +pub const S_IFCHR: ::c_int = 0o2_0000; +pub const S_IFDIR: ::c_int = 0o4_0000; +pub const S_IFBLK: ::c_int = 0o6_0000; +pub const S_IFREG: ::c_int = 0o10_0000; +pub const S_IFLNK: ::c_int = 0o12_0000; +pub const S_IFSHM: ::c_int = 0o13_0000; +pub const S_IFSOCK: ::c_int = 0o14_0000; +pub const S_ISUID: ::c_int = 0o4000; +pub const S_ISGID: ::c_int = 0o2000; +pub const S_ISTXT: ::c_int = 0o1000; +pub const S_IRUSR: ::c_int = 0o0400; +pub const S_IWUSR: ::c_int = 0o0200; +pub const S_IXUSR: ::c_int = 0o0100; +pub const S_IRWXU: ::c_int = 0o0700; +pub const S_IRGRP: ::c_int = 0o0040; +pub const S_IWGRP: ::c_int = 0o0020; +pub const S_IXGRP: ::c_int = 0o0010; +pub const S_IRWXG: ::c_int = 0o0070; +pub const S_IROTH: ::c_int = 0o0004; +pub const S_IWOTH: ::c_int = 0o0002; +pub const S_IXOTH: ::c_int = 0o0001; +pub const S_IRWXO: ::c_int = 0o0007; // socket.h pub const SOL_SOCKET: ::c_int = 0xffff; diff --git a/src/wasi.rs b/src/wasi.rs index 39d6949146405..87e1e72891840 100644 --- a/src/wasi.rs +++ b/src/wasi.rs @@ -239,29 +239,29 @@ pub const AT_SYMLINK_FOLLOW: c_int = 0x2; pub const AT_REMOVEDIR: c_int = 0x4; pub const UTIME_OMIT: c_long = 0xfffffffe; pub const UTIME_NOW: c_long = 0xffffffff; -pub const S_IFIFO: mode_t = 49152; -pub const S_IFCHR: mode_t = 8192; -pub const S_IFBLK: mode_t = 24576; -pub const S_IFDIR: mode_t = 16384; -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_IRWXO: mode_t = 0x7; -pub const S_IXOTH: mode_t = 0x1; -pub const S_IWOTH: mode_t = 0x2; -pub const S_IROTH: mode_t = 0x4; -pub const S_IRWXG: mode_t = 0x38; -pub const S_IXGRP: mode_t = 0x8; -pub const S_IWGRP: mode_t = 0x10; -pub const S_IRGRP: mode_t = 0x20; -pub const S_IRWXU: mode_t = 0x1c0; -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 S_IFIFO: mode_t = 0o14_0000; +pub const S_IFCHR: mode_t = 0o2_0000; +pub const S_IFBLK: mode_t = 0o6_0000; +pub const S_IFDIR: mode_t = 0o4_0000; +pub const S_IFREG: mode_t = 0o10_0000; +pub const S_IFLNK: mode_t = 0o12_0000; +pub const S_IFSOCK: mode_t = 0o14_0000; +pub const S_IFMT: mode_t = 0o16_0000; +pub const S_IRWXO: mode_t = 0o0007; +pub const S_IXOTH: mode_t = 0o0001; +pub const S_IWOTH: mode_t = 0o0002; +pub const S_IROTH: mode_t = 0o0004; +pub const S_IRWXG: mode_t = 0o0070; +pub const S_IXGRP: mode_t = 0o0010; +pub const S_IWGRP: mode_t = 0o0020; +pub const S_IRGRP: mode_t = 0o0040; +pub const S_IRWXU: mode_t = 0o0700; +pub const S_IXUSR: mode_t = 0o0100; +pub const S_IWUSR: mode_t = 0o0200; +pub const S_IRUSR: mode_t = 0o0400; +pub const S_ISVTX: mode_t = 0o1000; +pub const S_ISGID: mode_t = 0o2000; +pub const S_ISUID: mode_t = 0o4000; pub const DT_UNKNOWN: u8 = 0; pub const DT_BLK: u8 = 1; pub const DT_CHR: u8 = 2; diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 7ac9e955f9717..8fcdfbede0866 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -140,13 +140,13 @@ pub const _O_OBTAIN_DIR: ::c_int = 0x2000; pub const O_SEQUENTIAL: ::c_int = 0x0020; pub const O_RANDOM: ::c_int = 0x0010; -pub const S_IFCHR: ::c_int = 8192; -pub const S_IFDIR: ::c_int = 16384; -pub const S_IFREG: ::c_int = 32768; -pub const S_IFMT: ::c_int = 61440; -pub const S_IEXEC: ::c_int = 64; -pub const S_IWRITE: ::c_int = 128; -pub const S_IREAD: ::c_int = 256; +pub const S_IFCHR: ::c_int = 0o2_0000; +pub const S_IFDIR: ::c_int = 0o4_0000; +pub const S_IFREG: ::c_int = 0o10_0000; +pub const S_IFMT: ::c_int = 0o17_0000; +pub const S_IEXEC: ::c_int = 0o0100; +pub const S_IWRITE: ::c_int = 0o0200; +pub const S_IREAD: ::c_int = 0o0400; pub const LC_ALL: ::c_int = 0; pub const LC_COLLATE: ::c_int = 1;