diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 012c34c9959b..df02f6251aae 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -1452,9 +1452,9 @@ pub const GRPQUOTA: c_int = 1; pub const SIGIOT: c_int = 6; -pub const S_ISUID: crate::mode_t = 0o4000; -pub const S_ISGID: crate::mode_t = 0o2000; -pub const S_ISVTX: crate::mode_t = 0o1000; +pub const S_ISUID: mode_t = 0o4000; +pub const S_ISGID: mode_t = 0o2000; +pub const S_ISVTX: mode_t = 0o1000; pub const IF_NAMESIZE: size_t = 16; pub const IFNAMSIZ: size_t = IF_NAMESIZE; @@ -1585,26 +1585,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: crate::mode_t = 0o1_0000; -pub const S_IFCHR: crate::mode_t = 0o2_0000; -pub const S_IFBLK: crate::mode_t = 0o6_0000; -pub const S_IFDIR: crate::mode_t = 0o4_0000; -pub const S_IFREG: crate::mode_t = 0o10_0000; -pub const S_IFLNK: crate::mode_t = 0o12_0000; -pub const S_IFSOCK: crate::mode_t = 0o14_0000; -pub const S_IFMT: crate::mode_t = 0o17_0000; -pub const S_IRWXU: crate::mode_t = 0o0700; -pub const S_IXUSR: crate::mode_t = 0o0100; -pub const S_IWUSR: crate::mode_t = 0o0200; -pub const S_IRUSR: crate::mode_t = 0o0400; -pub const S_IRWXG: crate::mode_t = 0o0070; -pub const S_IXGRP: crate::mode_t = 0o0010; -pub const S_IWGRP: crate::mode_t = 0o0020; -pub const S_IRGRP: crate::mode_t = 0o0040; -pub const S_IRWXO: crate::mode_t = 0o0007; -pub const S_IXOTH: crate::mode_t = 0o0001; -pub const S_IWOTH: crate::mode_t = 0o0002; -pub const S_IROTH: crate::mode_t = 0o0004; +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; @@ -3726,12 +3726,7 @@ extern "C" { pub fn rewinddir(dirp: *mut crate::DIR); pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; - pub fn fchmodat( - dirfd: c_int, - pathname: *const c_char, - mode: crate::mode_t, - flags: c_int, - ) -> c_int; + pub fn fchmodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, flags: c_int) -> c_int; pub fn fchown(fd: c_int, owner: crate::uid_t, group: crate::gid_t) -> c_int; pub fn fchownat( dirfd: c_int, @@ -3748,7 +3743,7 @@ extern "C" { newpath: *const c_char, flags: c_int, ) -> c_int; - pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn readlinkat( dirfd: c_int, pathname: *const c_char, @@ -3959,7 +3954,7 @@ extern "C" { pub fn gmtime(time_p: *const time_t) -> *mut tm; pub fn localtime(time_p: *const time_t) -> *mut tm; - pub fn mknod(pathname: *const c_char, mode: crate::mode_t, dev: crate::dev_t) -> c_int; + pub fn mknod(pathname: *const c_char, mode: mode_t, dev: crate::dev_t) -> c_int; pub fn uname(buf: *mut crate::utsname) -> c_int; pub fn gethostname(name: *mut c_char, len: size_t) -> c_int; pub fn getservbyname(name: *const c_char, proto: *const c_char) -> *mut servent; @@ -4079,8 +4074,7 @@ extern "C" { pub fn fdopendir(fd: c_int) -> *mut crate::DIR; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, @@ -4205,7 +4199,7 @@ extern "C" { pub fn setfsuid(uid: crate::uid_t) -> c_int; // Not available now on Android - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int; diff --git a/src/unix/aix/mod.rs b/src/unix/aix/mod.rs index fd227af101cf..2d09364de64a 100644 --- a/src/unix/aix/mod.rs +++ b/src/unix/aix/mod.rs @@ -2877,9 +2877,8 @@ extern "C" { ) -> *mut c_void; pub fn memset_s(s: *mut c_void, smax: size_t, c: c_int, n: size_t) -> c_int; pub fn mincore(addr: *const c_void, len: size_t, vec: *mut c_char) -> c_int; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn mount(device: *const c_char, path: *const c_char, flags: c_int) -> c_int; pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; pub fn mq_close(mqd: crate::mqd_t) -> c_int; @@ -2973,7 +2972,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; @@ -3138,7 +3137,7 @@ extern "C" { pub fn shmdt(shmaddr: *const c_void) -> c_int; pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; pub fn shmget(key: key_t, size: size_t, shmflg: c_int) -> c_int; - pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; pub fn shm_unlink(name: *const c_char) -> c_int; pub fn splice(socket1: c_int, socket2: c_int, flags: c_int) -> c_int; pub fn srand(seed: c_uint); diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 11b61376275d..8597ae467b81 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -739,7 +739,7 @@ s! { pub gid: crate::gid_t, pub cuid: crate::uid_t, pub cgid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, pub _seq: c_ushort, pub _key: crate::key_t, } @@ -6151,7 +6151,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, @@ -6449,9 +6449,8 @@ extern "C" { pub fn dirname(path: *mut c_char) -> *mut c_char; pub fn basename(path: *mut c_char) -> *mut c_char; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn freadlink(fd: c_int, buf: *mut c_char, size: size_t) -> c_int; pub fn execvP( file: *const c_char, diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 99dda9d30806..8b9171b71922 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -378,7 +378,7 @@ s! { pub cgid: crate::gid_t, pub uid: crate::uid_t, pub gid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, pub seq: c_ushort, pub key: crate::key_t, } @@ -1598,13 +1598,12 @@ extern "C" { pub fn lchflags(path: *const c_char, flags: c_ulong) -> c_int; pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; #[cfg_attr( all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "mknodat@FBSD_1.1" )] - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn malloc_usable_size(ptr: *const c_void) -> size_t; pub fn mincore(addr: *const c_void, len: size_t, vec: *mut c_char) -> c_int; pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; @@ -1726,7 +1725,7 @@ extern "C" { pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int; pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn setutxent(); - pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, @@ -1868,7 +1867,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index acf61c26c47c..c95880ecb272 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -78,7 +78,7 @@ s! { pub cgid: crate::gid_t, pub uid: crate::uid_t, pub gid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, #[cfg(target_os = "openbsd")] pub seq: c_ushort, #[cfg(target_os = "netbsd")] @@ -687,7 +687,7 @@ extern "C" { #[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")] pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; pub fn __errno() -> *mut c_int; - pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; @@ -705,9 +705,8 @@ extern "C" { pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; pub fn pthread_condattr_setclock( @@ -825,7 +824,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index b392cfd06514..67278cb31488 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -420,7 +420,7 @@ s! { pub gid: crate::gid_t, pub cuid: crate::uid_t, pub cgid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, } pub struct sembuf { @@ -774,27 +774,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: crate::mode_t = 0o1_0000; -pub const S_IFCHR: crate::mode_t = 0o2_0000; -pub const S_IFBLK: crate::mode_t = 0o6_0000; -pub const S_IFDIR: crate::mode_t = 0o4_0000; -pub const S_IFREG: crate::mode_t = 0o10_0000; -pub const S_IFLNK: crate::mode_t = 0o12_0000; -pub const S_IFSOCK: crate::mode_t = 0o14_0000; -pub const S_IFMT: crate::mode_t = 0o17_0000; - -pub const S_IRWXU: crate::mode_t = 0o0700; -pub const S_IRUSR: crate::mode_t = 0o0400; -pub const S_IWUSR: crate::mode_t = 0o0200; -pub const S_IXUSR: crate::mode_t = 0o0100; -pub const S_IRWXG: crate::mode_t = 0o0070; -pub const S_IRGRP: crate::mode_t = 0o0040; -pub const S_IWGRP: crate::mode_t = 0o0020; -pub const S_IXGRP: crate::mode_t = 0o0010; -pub const S_IRWXO: crate::mode_t = 0o0007; -pub const S_IROTH: crate::mode_t = 0o0004; -pub const S_IWOTH: crate::mode_t = 0o0002; -pub const S_IXOTH: crate::mode_t = 0o0001; +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; @@ -1731,9 +1731,8 @@ extern "C" { bufferSize: size_t, res: *mut *mut spwd, ) -> c_int; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn sem_destroy(sem: *mut sem_t) -> c_int; pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; @@ -1811,7 +1810,7 @@ extern "C" { pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advice: c_int) -> c_int; pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; - pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; pub fn shm_unlink(name: *const c_char) -> c_int; pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); @@ -2027,7 +2026,7 @@ extern "C" { fildes: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( file_actions: *mut posix_spawn_file_actions_t, diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index 45177a0fc7c3..d47c089a3fca 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -2150,35 +2150,35 @@ 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: crate::mode_t = 0o17_0000; -pub const S_IFDIR: crate::mode_t = 0o4_0000; -pub const S_IFCHR: crate::mode_t = 0o2_0000; -pub const S_IFBLK: crate::mode_t = 0o6_0000; -pub const S_IFREG: crate::mode_t = 0o10_0000; -pub const S_IFIFO: crate::mode_t = 0o1_0000; -pub const S_IFLNK: crate::mode_t = 0o12_0000; -pub const S_IFSOCK: crate::mode_t = 0o14_0000; -pub const S_ISUID: crate::mode_t = 0o4000; -pub const S_ISGID: crate::mode_t = 0o2000; -pub const S_ISVTX: crate::mode_t = 0o1000; -pub const S_IRUSR: crate::mode_t = 0o0400; -pub const S_IWUSR: crate::mode_t = 0o0200; -pub const S_IXUSR: crate::mode_t = 0o0100; -pub const S_IRWXU: crate::mode_t = 0o0700; -pub const S_IREAD: crate::mode_t = 0o0400; -pub const S_IWRITE: crate::mode_t = 0o0200; -pub const S_IEXEC: crate::mode_t = 0o0100; -pub const S_IRGRP: crate::mode_t = 0o0040; -pub const S_IWGRP: crate::mode_t = 0o0020; -pub const S_IXGRP: crate::mode_t = 0o0010; -pub const S_IRWXG: crate::mode_t = 0o0070; -pub const S_IROTH: crate::mode_t = 0o0004; -pub const S_IWOTH: crate::mode_t = 0o0002; -pub const S_IXOTH: crate::mode_t = 0o0001; -pub const S_IRWXO: crate::mode_t = 0o0007; -pub const ACCESSPERMS: crate::mode_t = 511; -pub const ALLPERMS: crate::mode_t = 4095; -pub const DEFFILEMODE: crate::mode_t = 438; +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; pub const S_BLKSIZE: usize = 512; pub const STATX_TYPE: c_uint = 1; pub const STATX_MODE: c_uint = 2; @@ -3574,8 +3574,7 @@ extern "C" { pub fn mkfifoat(__fd: c_int, __path: *const c_char, __mode: __mode_t) -> c_int; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn __libc_current_sigrtmin() -> c_int; @@ -4246,7 +4245,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 6fc03c0416a8..13d882be0075 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -2667,7 +2667,7 @@ pub const TUNSETTXFILTER: c_int = _IOW::(T_TYPE, 209); pub const TUNGETIFF: c_int = _IOR::(T_TYPE, 210); pub const TUNGETSNDBUF: c_int = _IOR::(T_TYPE, 211); pub const TUNSETSNDBUF: c_int = _IOW::(T_TYPE, 212); -pub const TUNATTACHFILTER: c_int = _IOW::(T_TYPE, 213); +pub const TUNATTACHFILTER: c_int = _IOW::(T_TYPE, 213); pub const TUNDETACHFILTER: c_int = _IOW::(T_TYPE, 214); pub const TUNGETVNETHDRSZ: c_int = _IOR::(T_TYPE, 215); pub const TUNSETVNETHDRSZ: c_int = _IOW::(T_TYPE, 216); @@ -4258,22 +4258,27 @@ impl siginfo_t { } } - /// Build an ioctl number for an argumentless ioctl. - pub const fn _IO(ty: u32, nr: u32) -> c_int { +/// Build an ioctl number for an argumentless ioctl. +pub const fn _IO(ty: u32, nr: u32) -> c_int { super::_IOC(super::_IOC_NONE, ty, nr, 0) as c_int } /// Build an ioctl number for an read-only ioctl. pub const fn _IOR(ty: u32, nr: u32) -> c_int { - super::_IOC(super::_IOC_READ, ty, nr, mem::size_of::()) as c_int + super::_IOC(super::_IOC_READ, ty, nr, mem::size_of::()) as c_int } /// Build an ioctl number for an write-only ioctl. pub const fn _IOW(ty: u32, nr: u32) -> c_int { - super::_IOC(super::_IOC_WRITE, ty, nr, mem::size_of::()) as c_int + super::_IOC(super::_IOC_WRITE, ty, nr, mem::size_of::()) as c_int } /// Build an ioctl number for a read-write ioctl. pub const fn _IOWR(ty: u32, nr: u32) -> c_int { - super::_IOC(super::_IOC_READ | super::_IOC_WRITE, ty, nr, mem::size_of::()) as c_int + super::_IOC( + super::_IOC_READ | super::_IOC_WRITE, + ty, + nr, + mem::size_of::(), + ) as c_int } diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 985b3c0c5e18..462a944b1e2b 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -171,7 +171,7 @@ s! { pub gid: crate::gid_t, pub cuid: crate::uid_t, pub cgid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, pub __seq: c_int, __unused1: c_long, __unused2: c_long, @@ -229,7 +229,7 @@ s! { __st_dev_padding: c_int, #[cfg(emscripten_old_stat_abi)] __st_ino_truncated: c_long, - pub st_mode: crate::mode_t, + pub st_mode: mode_t, pub st_nlink: crate::nlink_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, @@ -1530,7 +1530,7 @@ extern "C" { ) -> c_int; pub fn getloadavg(loadavg: *mut c_double, nelem: c_int) -> c_int; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index b818b8c65929..86741adb43d8 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -5949,8 +5949,8 @@ pub const EPIOCGPARAMS: Ioctl = 0x80088a02; pub const SI_DETHREAD: c_int = -7; pub const TRAP_PERF: c_int = 6; - /// Build an ioctl number for an argumentless ioctl. - pub const fn _IO(ty: u32, nr: u32) -> u32 { +/// Build an ioctl number for an argumentless ioctl. +pub const fn _IO(ty: u32, nr: u32) -> u32 { super::_IOC(super::_IOC_NONE, ty, nr, 0) } @@ -6504,7 +6504,7 @@ extern "C" { pub fn setfsuid(uid: crate::uid_t) -> c_int; // Not available now on Android - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int; @@ -6859,7 +6859,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index aa363ad420f0..6ed732e73f5c 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -534,26 +534,26 @@ pub const O_RDWR: c_int = 2; pub const SOCK_CLOEXEC: c_int = O_CLOEXEC; -pub const S_IFIFO: crate::mode_t = 0o1_0000; -pub const S_IFCHR: crate::mode_t = 0o2_0000; -pub const S_IFBLK: crate::mode_t = 0o6_0000; -pub const S_IFDIR: crate::mode_t = 0o4_0000; -pub const S_IFREG: crate::mode_t = 0o10_0000; -pub const S_IFLNK: crate::mode_t = 0o12_0000; -pub const S_IFSOCK: crate::mode_t = 0o14_0000; -pub const S_IFMT: crate::mode_t = 0o17_0000; -pub const S_IRWXU: crate::mode_t = 0o0700; -pub const S_IXUSR: crate::mode_t = 0o0100; -pub const S_IWUSR: crate::mode_t = 0o0200; -pub const S_IRUSR: crate::mode_t = 0o0400; -pub const S_IRWXG: crate::mode_t = 0o0070; -pub const S_IXGRP: crate::mode_t = 0o0010; -pub const S_IWGRP: crate::mode_t = 0o0020; -pub const S_IRGRP: crate::mode_t = 0o0040; -pub const S_IRWXO: crate::mode_t = 0o0007; -pub const S_IXOTH: crate::mode_t = 0o0001; -pub const S_IWOTH: crate::mode_t = 0o0002; -pub const S_IROTH: crate::mode_t = 0o0004; +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; @@ -1876,8 +1876,7 @@ extern "C" { pub fn freelocale(loc: crate::locale_t); pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, diff --git a/src/unix/mod.rs b/src/unix/mod.rs index e42528ee4116..dc8b0fc01b93 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -245,9 +245,9 @@ cfg_if! { } pub const SIGIOT: c_int = 6; -pub const S_ISUID: crate::mode_t = 0o4000; -pub const S_ISGID: crate::mode_t = 0o2000; -pub const S_ISVTX: crate::mode_t = 0o1000; +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( @@ -939,12 +939,7 @@ extern "C" { )] pub fn rewinddir(dirp: *mut crate::DIR); - pub fn fchmodat( - dirfd: c_int, - pathname: *const c_char, - mode: crate::mode_t, - flags: c_int, - ) -> c_int; + pub fn fchmodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, flags: c_int) -> c_int; pub fn fchown(fd: c_int, owner: crate::uid_t, group: crate::gid_t) -> c_int; pub fn fchownat( dirfd: c_int, @@ -1416,7 +1411,7 @@ extern "C" { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "mknod@FBSD_1.0" )] - pub fn mknod(pathname: *const c_char, mode: crate::mode_t, dev: crate::dev_t) -> c_int; + pub fn mknod(pathname: *const c_char, mode: mode_t, dev: crate::dev_t) -> c_int; pub fn gethostname(name: *mut c_char, len: size_t) -> c_int; pub fn endservent(); pub fn getservbyname(name: *const c_char, proto: *const c_char) -> *mut servent; @@ -1654,7 +1649,7 @@ cfg_if! { )] pub fn pause() -> c_int; - pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; #[cfg_attr(gnu_file_offset_bits64, link_name = "openat64")] pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 83755bf18fd7..de28a3d9cddd 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -567,28 +567,28 @@ pub const SEEK_END: c_int = 2; pub const FIOCLEX: c_ulong = 0x20006601; pub const FIONCLEX: c_ulong = 0x20006602; -pub const S_BLKSIZE: crate::mode_t = 1024; -pub const S_IREAD: crate::mode_t = 0o0400; -pub const S_IWRITE: crate::mode_t = 0o0200; -pub const S_IEXEC: crate::mode_t = 0o0100; -pub const S_ENFMT: crate::mode_t = 0o2000; -pub const S_IFMT: crate::mode_t = 0o17_0000; -pub const S_IFDIR: crate::mode_t = 0o4_0000; -pub const S_IFCHR: crate::mode_t = 0o2_0000; -pub const S_IFBLK: crate::mode_t = 0o6_0000; -pub const S_IFREG: crate::mode_t = 0o10_0000; -pub const S_IFLNK: crate::mode_t = 0o12_0000; -pub const S_IFSOCK: crate::mode_t = 0o14_0000; -pub const S_IFIFO: crate::mode_t = 0o1_0000; -pub const S_IRUSR: crate::mode_t = 0o0400; -pub const S_IWUSR: crate::mode_t = 0o0200; -pub const S_IXUSR: crate::mode_t = 0o0100; -pub const S_IRGRP: crate::mode_t = 0o0040; -pub const S_IWGRP: crate::mode_t = 0o0020; -pub const S_IXGRP: crate::mode_t = 0o0010; -pub const S_IROTH: crate::mode_t = 0o0004; -pub const S_IWOTH: crate::mode_t = 0o0002; -pub const S_IXOTH: crate::mode_t = 0o0001; +pub const S_BLKSIZE: mode_t = 1024; +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 78ddd14d8cf8..7505db53fcf4 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -98,7 +98,7 @@ s! { pub __old_st_mtime: crate::_Time32t, pub __old_st_atime: crate::_Time32t, pub __old_st_ctime: crate::_Time32t, - pub st_mode: crate::mode_t, + pub st_mode: mode_t, pub st_nlink: crate::nlink_t, pub st_blocksize: crate::blksize_t, pub st_nblocks: i32, @@ -563,7 +563,7 @@ s! { pub gid: crate::gid_t, pub cuid: crate::uid_t, pub cgid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, pub seq: c_uint, pub key: crate::key_t, _reserved: [c_int; 4], @@ -2174,27 +2174,27 @@ pub const S_IEXEC: mode_t = crate::S_IXUSR; pub const S_IWRITE: mode_t = crate::S_IWUSR; pub const S_IREAD: mode_t = crate::S_IRUSR; -pub const S_IFIFO: crate::mode_t = 0o1_0000; -pub const S_IFCHR: crate::mode_t = 0o2_0000; -pub const S_IFDIR: crate::mode_t = 0o4_0000; -pub const S_IFBLK: crate::mode_t = 0o6_0000; -pub const S_IFREG: crate::mode_t = 0o10_0000; -pub const S_IFLNK: crate::mode_t = 0o12_0000; -pub const S_IFSOCK: crate::mode_t = 0o14_0000; -pub const S_IFMT: crate::mode_t = 0o17_0000; - -pub const S_IXOTH: crate::mode_t = 0o0001; -pub const S_IWOTH: crate::mode_t = 0o0002; -pub const S_IROTH: crate::mode_t = 0o0004; -pub const S_IRWXO: crate::mode_t = 0o0007; -pub const S_IXGRP: crate::mode_t = 0o0010; -pub const S_IWGRP: crate::mode_t = 0o0020; -pub const S_IRGRP: crate::mode_t = 0o0040; -pub const S_IRWXG: crate::mode_t = 0o0070; -pub const S_IXUSR: crate::mode_t = 0o0100; -pub const S_IWUSR: crate::mode_t = 0o0200; -pub const S_IRUSR: crate::mode_t = 0o0400; -pub const S_IRWXU: crate::mode_t = 0o0700; +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; @@ -2981,13 +2981,8 @@ extern "C" { pub fn fdatasync(fd: c_int) -> c_int; pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; - pub fn mknodat( - __fd: c_int, - pathname: *const c_char, - mode: crate::mode_t, - dev: crate::dev_t, - ) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; + pub fn mknodat(__fd: c_int, pathname: *const c_char, mode: mode_t, dev: crate::dev_t) -> c_int; pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; @@ -3358,7 +3353,7 @@ extern "C" { fd: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 708e59750d22..26c59e8deb1d 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -196,7 +196,7 @@ s! { pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, pub st_nlink: crate::nlink_t, - pub st_mode: crate::mode_t, + pub st_mode: mode_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, pub st_rdev: crate::dev_t, @@ -1262,18 +1262,8 @@ extern "C" { pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; // sys/uio.h - pub fn preadv( - fd: c_int, - iov: *const crate::iovec, - iovcnt: c_int, - offset: off_t, - ) -> ssize_t; - pub fn pwritev( - fd: c_int, - iov: *const crate::iovec, - iovcnt: c_int, - offset: off_t, - ) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 20b762264eed..d001b671b59b 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -96,7 +96,7 @@ s! { pub gid: crate::gid_t, pub cuid: crate::uid_t, pub cgid: crate::gid_t, - pub mode: crate::mode_t, + pub mode: mode_t, pub seq: c_uint, pub key: crate::key_t, } @@ -328,7 +328,7 @@ s! { pub struct stat { pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, - pub st_mode: crate::mode_t, + pub st_mode: mode_t, pub st_nlink: crate::nlink_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, @@ -2648,9 +2648,8 @@ extern "C" { pub fn getpriority(which: c_int, who: c_int) -> c_int; pub fn setpriority(which: c_int, who: c_int, prio: c_int) -> c_int; - pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) - -> c_int; - pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn sethostname(name: *const c_char, len: c_int) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); @@ -2727,7 +2726,7 @@ extern "C" { fildes: c_int, path: *const c_char, oflag: c_int, - mode: crate::mode_t, + mode: mode_t, ) -> c_int; pub fn posix_spawn_file_actions_addclose( file_actions: *mut posix_spawn_file_actions_t, @@ -2810,7 +2809,7 @@ extern "C" { pub fn shmget(key: key_t, size: size_t, shmflg: c_int) -> c_int; - pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; pub fn shm_unlink(name: *const c_char) -> c_int; pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 0174861f7e76..68e6d1d9b88d 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -220,7 +220,7 @@ s! { pub struct stat { pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, - pub st_mode: crate::mode_t, + pub st_mode: mode_t, pub st_nlink: crate::nlink_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, @@ -800,7 +800,7 @@ 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_ISVTX: mode_t = 0o1000; +pub const S_ISVTX: mode_t = 0o1000; // BUG? this is the only mode_t value pub const S_IRUSR: c_int = 0o0400; pub const S_IWUSR: c_int = 0o0200; pub const S_IXUSR: c_int = 0o0100; @@ -1310,7 +1310,7 @@ extern "C" { pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; pub fn truncate(path: *const c_char, length: off_t) -> c_int; - pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; pub fn shm_unlink(name: *const c_char) -> c_int; pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; @@ -1821,13 +1821,13 @@ extern "C" { pub fn rmdir(path: *const c_char) -> c_int; // stat.h - pub fn mkdir(dirName: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkdir(dirName: *const c_char, mode: mode_t) -> c_int; // stat.h - pub fn chmod(path: *const c_char, mode: crate::mode_t) -> c_int; + pub fn chmod(path: *const c_char, mode: mode_t) -> c_int; // stat.h - pub fn fchmod(attr1: c_int, attr2: crate::mode_t) -> c_int; + pub fn fchmod(attr1: c_int, attr2: mode_t) -> c_int; // unistd.h pub fn fsync(fd: c_int) -> c_int; diff --git a/src/wasi/mod.rs b/src/wasi/mod.rs index 1a103cc85fe9..456900996d33 100644 --- a/src/wasi/mod.rs +++ b/src/wasi/mod.rs @@ -653,7 +653,7 @@ extern "C" { newpath: *const c_char, flags: c_int, ) -> c_int; - pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; pub fn readlinkat( dirfd: c_int, pathname: *const c_char,