diff --git a/ci/style.rs b/ci/style.rs index c4e0fb0db805..f5aeabcc71b5 100644 --- a/ci/style.rs +++ b/ci/style.rs @@ -115,7 +115,7 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) { } } if line.contains("#[derive(") && (line.contains("Copy") || line.contains("Clone")) { - err.error(path, i, "impl ::Copy and ::Clone manually"); + err.error(path, i, "impl Copy and Clone manually"); } if line.contains("impl") { in_impl = true; diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 7633b3efe4ce..ba13e32c61f4 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -2062,7 +2062,7 @@ pub const WEXITED: c_int = 0x00000004; pub const WCONTINUED: c_int = 0x00000008; pub const WNOWAIT: c_int = 0x01000000; -// ::Options set using PTRACE_SETOPTIONS. +// Options set using PTRACE_SETOPTIONS. pub const PTRACE_O_TRACESYSGOOD: c_int = 0x00000001; pub const PTRACE_O_TRACEFORK: c_int = 0x00000002; pub const PTRACE_O_TRACEVFORK: c_int = 0x00000004; diff --git a/src/teeos/mod.rs b/src/teeos/mod.rs index b04f69b09c0a..a46587d11110 100644 --- a/src/teeos/mod.rs +++ b/src/teeos/mod.rs @@ -1109,7 +1109,7 @@ extern "C" { pub fn pthread_cond_timedwait( cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t, - abstime: *const ::timespec, + abstime: *const timespec, ) -> c_int; pub fn pthread_mutexattr_setrobust(attr: *mut pthread_mutexattr_t, robustness: c_int) -> c_int; diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 36c2957459a0..ba4ab330f727 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -359,7 +359,7 @@ s! { pub si_status: c_int, pub si_addr: *mut c_void, //Requires it to be union for tests - //pub si_value: ::sigval, + //pub si_value: crate::sigval, _pad: [usize; 9], } diff --git a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs index d43269607d29..0eddbc0bea11 100644 --- a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs @@ -14,7 +14,7 @@ s! { pub struct mcontext_t { pub __gregs: __gregset, pub __fregs: __fpregset, - __spare: [::__greg_t; 7], + __spare: [crate::__greg_t; 7], } } @@ -26,7 +26,7 @@ s_no_extra_traits! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const PT_GETREGS: c_int = PT_FIRSTMACH + 0; pub const PT_SETREGS: c_int = PT_FIRSTMACH + 1; diff --git a/src/unix/bsd/netbsdlike/openbsd/arm.rs b/src/unix/bsd/netbsdlike/openbsd/arm.rs index 89603fba9285..e781fa7484ac 100644 --- a/src/unix/bsd/netbsdlike/openbsd/arm.rs +++ b/src/unix/bsd/netbsdlike/openbsd/arm.rs @@ -4,6 +4,6 @@ pub type c_long = i32; pub type c_ulong = u32; pub type c_char = u8; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs index 6b705ffe7f15..2dc51bb4b9fe 100644 --- a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs @@ -5,27 +5,27 @@ pub type wchar_t = i32; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, pub sa_flags: c_int, pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - f_spare: [::__fsword_t; 4], + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + f_spare: [crate::__fsword_t; 4], } pub struct flock { @@ -33,7 +33,7 @@ s! { pub l_whence: c_short, pub l_start: off_t, pub l_len: off_t, - pub l_pid: ::pid_t, + pub l_pid: crate::pid_t, } pub struct flock64 { @@ -41,16 +41,16 @@ s! { pub l_whence: c_short, pub l_start: off64_t, pub l_len: off64_t, - pub l_pid: ::pid_t, + pub l_pid: crate::pid_t, } pub struct ipc_perm { - __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, + __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, __seq: c_ushort, __pad1: c_ushort, __glibc_reserved1: c_ulong, @@ -58,51 +58,51 @@ s! { } pub struct stat64 { - pub st_dev: ::dev_t, + pub st_dev: crate::dev_t, __pad1: c_ushort, - pub __st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, + pub __st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, __pad2: c_ushort, pub st_size: off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, pub st_atime_nsec: c_ulong, - pub st_mtime: ::time_t, + pub st_mtime: crate::time_t, pub st_mtime_nsec: c_ulong, - pub st_ctime: ::time_t, + pub st_ctime: crate::time_t, pub st_ctime_nsec: c_ulong, - pub st_ino: ::ino64_t, + pub st_ino: crate::ino64_t, } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsblkcnt64_t, - pub f_ffree: ::fsblkcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsblkcnt64_t, + pub f_ffree: crate::fsblkcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { pub f_bsize: c_ulong, pub f_frsize: c_ulong, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsblkcnt64_t, - pub f_ffree: ::fsblkcnt64_t, - pub f_favail: ::fsblkcnt64_t, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsblkcnt64_t, + pub f_ffree: crate::fsblkcnt64_t, + pub f_favail: crate::fsblkcnt64_t, pub f_fsid: c_ulong, __f_unused: c_int, pub f_flag: c_ulong, @@ -111,34 +111,34 @@ s! { } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, + pub shm_perm: crate::ipc_perm, pub shm_segsz: size_t, - pub shm_atime: ::time_t, + pub shm_atime: crate::time_t, __glibc_reserved1: c_long, - pub shm_dtime: ::time_t, + pub shm_dtime: crate::time_t, __glibc_reserved2: c_long, - pub shm_ctime: ::time_t, + pub shm_ctime: crate::time_t, __glibc_reserved3: c_long, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, __glibc_reserved5: c_ulong, __glibc_reserved6: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, __glibc_reserved1: c_uint, - pub msg_rtime: ::time_t, + pub msg_rtime: crate::time_t, __glibc_reserved2: c_uint, - pub msg_ctime: ::time_t, + pub msg_ctime: crate::time_t, __glibc_reserved3: c_uint, __msg_cbytes: c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, __glibc_reserved4: c_ulong, __glibc_reserved5: c_ulong, } @@ -338,16 +338,16 @@ pub const SIGPROF: c_int = 27; pub const SIGWINCH: c_int = 28; pub const SIGSTKSZ: size_t = 8192; pub const MINSIGSTKSZ: size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -355,82 +355,82 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; pub const TCSANOW: c_int = 0; pub const TCSADRAIN: c_int = 1; diff --git a/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs index 8305ccdf25a5..5e4d3f0a2837 100644 --- a/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs @@ -276,21 +276,21 @@ pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthrea ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs index 2d256cd8a13d..19e28e91f5b3 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs @@ -46,21 +46,21 @@ pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthrea ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 280ffb59304c..3463cb8adb35 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -4201,11 +4201,11 @@ pub const IW_PMKID_CAND_PREAUTH: c_ulong = 0x00000001; pub const IW_EV_LCP_PK_LEN: usize = 4; -pub const IW_EV_CHAR_PK_LEN: usize = 20; // IW_EV_LCP_PK_LEN + ::IFNAMSIZ; +pub const IW_EV_CHAR_PK_LEN: usize = 20; // IW_EV_LCP_PK_LEN + crate::IFNAMSIZ; pub const IW_EV_UINT_PK_LEN: usize = 8; // IW_EV_LCP_PK_LEN + size_of::(); pub const IW_EV_FREQ_PK_LEN: usize = 12; // IW_EV_LCP_PK_LEN + size_of::(); pub const IW_EV_PARAM_PK_LEN: usize = 12; // IW_EV_LCP_PK_LEN + size_of::(); -pub const IW_EV_ADDR_PK_LEN: usize = 20; // IW_EV_LCP_PK_LEN + size_of::<::sockaddr>(); +pub const IW_EV_ADDR_PK_LEN: usize = 20; // IW_EV_LCP_PK_LEN + size_of::(); pub const IW_EV_QUAL_PK_LEN: usize = 8; // IW_EV_LCP_PK_LEN + size_of::(); pub const IW_EV_POINT_PK_LEN: usize = 8; // IW_EV_LCP_PK_LEN + 4; diff --git a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs index 68cdc45de4df..46de7219dbf8 100644 --- a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -109,14 +109,14 @@ s_no_extra_traits! { } } -//pub const RLIM_INFINITY: ::rlim_t = !0; +//pub const RLIM_INFINITY: crate::rlim_t = !0; pub const VEOF: usize = 4; pub const RTLD_DEEPBIND: c_int = 0x8; -//pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; -//pub const RLIMIT_AS: ::__rlimit_resource_t = 9; -//pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8; -//pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7; -//pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6; +//pub const RLIMIT_RSS: crate::__rlimit_resource_t = 5; +//pub const RLIMIT_AS: crate::__rlimit_resource_t = 9; +//pub const RLIMIT_MEMLOCK: crate::__rlimit_resource_t = 8; +//pub const RLIMIT_NOFILE: crate::__rlimit_resource_t = 7; +//pub const RLIMIT_NPROC: crate::__rlimit_resource_t = 6; pub const O_APPEND: c_int = 1024; pub const O_CREAT: c_int = 64; pub const O_EXCL: c_int = 128; diff --git a/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs index de4695730102..4000ab147504 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs @@ -18,47 +18,47 @@ s! { pub struct stat { pub st_dev: c_ulong, st_pad1: [c_long; 2], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, pub st_rdev: c_ulong, st_pad2: [c_ulong; 1], pub st_size: off_t, st_pad3: c_long, - pub st_atime: ::time_t, + pub st_atime: crate::time_t, pub st_atime_nsec: c_long, - pub st_mtime: ::time_t, + pub st_mtime: crate::time_t, pub st_mtime_nsec: c_long, - pub st_ctime: ::time_t, + pub st_ctime: crate::time_t, pub st_ctime_nsec: c_long, - pub st_blksize: ::blksize_t, + pub st_blksize: crate::blksize_t, st_pad4: c_long, - pub st_blocks: ::blkcnt_t, + pub st_blocks: crate::blkcnt_t, st_pad5: [c_long; 7], } pub struct stat64 { pub st_dev: c_ulong, st_pad1: [c_long; 2], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, pub st_rdev: c_ulong, st_pad2: [c_long; 2], pub st_size: off64_t, - pub st_atime: ::time_t, + pub st_atime: crate::time_t, pub st_atime_nsec: c_long, - pub st_mtime: ::time_t, + pub st_mtime: crate::time_t, pub st_mtime_nsec: c_long, - pub st_ctime: ::time_t, + pub st_ctime: crate::time_t, pub st_ctime_nsec: c_long, - pub st_blksize: ::blksize_t, + pub st_blksize: crate::blksize_t, st_pad3: c_long, - pub st_blocks: ::blkcnt64_t, + pub st_blocks: crate::blkcnt64_t, st_pad5: [c_long; 7], } @@ -68,7 +68,7 @@ s! { pub struct sigaction { pub sa_flags: c_int, - pub sa_sigaction: ::sighandler_t, + pub sa_sigaction: crate::sighandler_t, pub sa_mask: sigset_t, _restorer: *mut c_void, } @@ -92,11 +92,11 @@ s! { } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, pub mode: c_uint, pub __seq: c_ushort, __pad1: c_ushort, @@ -105,28 +105,28 @@ s! { } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, + pub shm_perm: crate::ipc_perm, pub shm_segsz: size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, __unused4: c_ulong, __unused5: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, __msg_cbytes: c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, __glibc_reserved4: c_ulong, __glibc_reserved5: c_ulong, } @@ -135,12 +135,12 @@ s! { pub f_type: c_long, pub f_bsize: c_long, pub f_frsize: c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsblkcnt_t, - pub f_ffree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_files: crate::fsblkcnt_t, + pub f_ffree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_fsid: crate::fsid_t, pub f_namelen: c_long, f_spare: [c_long; 6], @@ -148,8 +148,8 @@ s! { pub struct msghdr { pub msg_name: *mut c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, pub msg_iovlen: size_t, pub msg_control: *mut c_void, pub msg_controllen: size_t, @@ -163,12 +163,12 @@ s! { } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct sysinfo { diff --git a/src/unix/newlib/aarch64/mod.rs b/src/unix/newlib/aarch64/mod.rs index 7efbdf780db3..87952650e5d1 100644 --- a/src/unix/newlib/aarch64/mod.rs +++ b/src/unix/newlib/aarch64/mod.rs @@ -10,24 +10,24 @@ pub type c_ulong = u64; s! { pub struct sockaddr { pub sa_len: u8, - pub sa_family: ::sa_family_t, + pub sa_family: crate::sa_family_t, pub sa_data: [c_char; 14], } pub struct sockaddr_in6 { pub sin6_len: u8, - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [c_char; 8], } } diff --git a/src/unix/nto/neutrino.rs b/src/unix/nto/neutrino.rs index 3e2bee367acd..8d559015ac8c 100644 --- a/src/unix/nto/neutrino.rs +++ b/src/unix/nto/neutrino.rs @@ -83,7 +83,7 @@ s! { // of Neutrino 7.1 SDP. Commented out for now. //pub struct _asyncmsg_put_header { // pub err: c_int, - // pub iov: *mut ::iov_t, + // pub iov: *mut crate::iov_t, // pub parts: c_int, // pub handle: c_uint, // pub cb: Option< @@ -105,7 +105,7 @@ s! { // pub buffer_size: size_t, // pub max_num_buffer: c_uint, // pub trigger_num_msg: c_uint, - // pub trigger_time: ::_itimer, + // pub trigger_time: crate::_itimer, // reserve: c_uint, //} @@ -116,15 +116,15 @@ s! { // pub sendq_tail: c_uint, // pub sendq_free: c_uint, // pub err: c_int, - // pub ev: ::sigevent, + // pub ev: crate::sigevent, // pub num_curmsg: c_uint, - // pub ttimer: ::timer_t, - // pub block_con: ::pthread_cond_t, - // pub mu: ::pthread_mutex_t, + // pub ttimer: crate::timer_t, + // pub block_con: crate::pthread_cond_t, + // pub mu: crate::pthread_mutex_t, // reserved: c_uint, - // pub attr: ::_asyncmsg_connection_attr, + // pub attr: crate::_asyncmsg_connection_attr, // pub reserves: [c_uint; 3], - // pub sendq: [::_asyncmsg_put_header; 1], // flexarray + // pub sendq: [crate::_asyncmsg_put_header; 1], // flexarray //} pub struct __c_anonymous_struct_ev { @@ -543,7 +543,7 @@ extern "C" { // standard installation of Neutrino 7.1 SDP. Commented out for now. //pub fn ConnectAttachExt( // __nd: u32, - // __pid: ::pid_t, + // __pid: crate::pid_t, // __chid: c_int, // __index: c_uint, // __flags: c_int, @@ -1262,7 +1262,7 @@ extern "C" { //pub fn InterruptDisable(); pub fn InterruptMask(__intr: c_int, __id: c_int) -> c_int; pub fn InterruptUnmask(__intr: c_int, __id: c_int) -> c_int; - //pub fn InterruptLock(__spin: *mut ::intrspin); - //pub fn InterruptUnlock(__spin: *mut ::intrspin); + //pub fn InterruptLock(__spin: *mut intrspin); + //pub fn InterruptUnlock(__spin: *mut intrspin); //pub fn InterruptStatus() -> c_uint; } diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 716d699196ac..28900e6d2206 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -85,7 +85,7 @@ s_no_extra_traits! { pub struct sockaddr_storage { pub ss_family: crate::sa_family_t, __ss_padding: - [u8; 128 - ::core::mem::size_of::() - ::core::mem::size_of::()], + [u8; 128 - crate::mem::size_of::() - crate::mem::size_of::()], __ss_align: c_ulong, } } diff --git a/src/unix/solarish/x86.rs b/src/unix/solarish/x86.rs index c16116954728..db449b1e8669 100644 --- a/src/unix/solarish/x86.rs +++ b/src/unix/solarish/x86.rs @@ -10,21 +10,21 @@ pub type Elf32_Phdr = __c_anonymous_Elf32_Phdr; s! { pub struct __c_anonymous_Elf32_Phdr { - pub p_type: ::Elf32_Word, - pub p_offset: ::Elf32_Off, - pub p_vaddr: ::Elf32_Addr, - pub p_paddr: ::Elf32_Addr, - pub p_filesz: ::Elf32_Word, - pub p_memsz: ::Elf32_Word, - pub p_flags: ::Elf32_Word, - pub p_align: ::Elf32_Word, + pub p_type: Elf32_Word, + pub p_offset: Elf32_Off, + pub p_vaddr: Elf32_Addr, + pub p_paddr: Elf32_Addr, + pub p_filesz: Elf32_Word, + pub p_memsz: Elf32_Word, + pub p_flags: Elf32_Word, + pub p_align: Elf32_Word, } pub struct dl_phdr_info { - pub dlpi_addr: ::Elf32_Addr, + pub dlpi_addr: Elf32_Addr, pub dlpi_name: *const c_char, - pub dlpi_phdr: *const ::Elf32_Phdr, - pub dlpi_phnum: ::Elf32_Half, + pub dlpi_phdr: *const Elf32_Phdr, + pub dlpi_phnum: Elf32_Half, pub dlpi_adds: c_ulonglong, pub dlpi_subs: c_ulonglong, }