diff --git a/src/fuchsia/aarch64.rs b/src/fuchsia/aarch64.rs index ddcd9d3f5631..b82237510094 100644 --- a/src/fuchsia/aarch64.rs +++ b/src/fuchsia/aarch64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_uint, c_ulong, c_ulonglong, c_ushort, off_t, size_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = u8; pub type __u64 = c_ulonglong; diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 7633b3efe4ce..3c23a187432b 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -3,7 +3,7 @@ //! More functions and definitions can be found in the more specific modules //! according to the platform in question. -use crate::c_void; +use crate::prelude::*; // PUB_TYPE diff --git a/src/fuchsia/riscv64.rs b/src/fuchsia/riscv64.rs index fcbd63673c9d..bed7a926030f 100644 --- a/src/fuchsia/riscv64.rs +++ b/src/fuchsia/riscv64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_ulong, c_ulonglong, c_ushort, off_t}; +use crate::off_t; +use crate::prelude::*; // From psABI Calling Convention for RV64 pub type c_char = u8; diff --git a/src/fuchsia/x86_64.rs b/src/fuchsia/x86_64.rs index 632bace2d1d6..b4b6ae768386 100644 --- a/src/fuchsia/x86_64.rs +++ b/src/fuchsia/x86_64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_ulong, c_ulonglong, off_t, size_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/hermit.rs b/src/hermit.rs index 18429de54867..2b470e78d3af 100644 --- a/src/hermit.rs +++ b/src/hermit.rs @@ -1,6 +1,6 @@ //! Hermit C type definitions -use crate::c_void; +use crate::prelude::*; cfg_if! { if #[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))] { diff --git a/src/solid/mod.rs b/src/solid/mod.rs index c52085c440f2..19c9b6aed344 100644 --- a/src/solid/mod.rs +++ b/src/solid/mod.rs @@ -2,7 +2,7 @@ //! //! [SOLID]: https://solid.kmckk.com/ -use crate::c_void; +use crate::prelude::*; pub type c_schar = i8; pub type c_uchar = u8; diff --git a/src/unix/aix/mod.rs b/src/unix/aix/mod.rs index 8b8f34dfff03..540d8b4e4447 100644 --- a/src/unix/aix/mod.rs +++ b/src/unix/aix/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, intptr_t, - size_t, ssize_t, -}; +use crate::prelude::*; +use crate::{c_double, size_t, ssize_t}; pub type c_char = u8; pub type caddr_t = *mut c_char; diff --git a/src/unix/aix/powerpc64.rs b/src/unix/aix/powerpc64.rs index a54b014d8bf1..35e80850c51e 100644 --- a/src/unix/aix/powerpc64.rs +++ b/src/unix/aix/powerpc64.rs @@ -1,7 +1,5 @@ -use crate::{ - c_char, c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off_t, size_t, - ssize_t, -}; +use crate::prelude::*; +use crate::{off_t, ssize_t}; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/apple/b32/mod.rs b/src/unix/bsd/apple/b32/mod.rs index 9088be7d1ed9..a1e615e514b1 100644 --- a/src/unix/bsd/apple/b32/mod.rs +++ b/src/unix/bsd/apple/b32/mod.rs @@ -1,6 +1,6 @@ //! 32-bit specific Apple (ios/darwin) definitions -use crate::{c_char, c_int, c_uchar, c_ushort}; +use crate::prelude::*; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/bsd/apple/b64/aarch64/mod.rs b/src/unix/bsd/apple/b64/aarch64/mod.rs index 6a9ea9c65f71..60b9d4bb4ce4 100644 --- a/src/unix/bsd/apple/b64/aarch64/mod.rs +++ b/src/unix/bsd/apple/b64/aarch64/mod.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub type boolean_t = c_int; pub type mcontext_t = *mut __darwin_mcontext64; diff --git a/src/unix/bsd/apple/b64/mod.rs b/src/unix/bsd/apple/b64/mod.rs index c75608cdeead..953d0ccc1703 100644 --- a/src/unix/bsd/apple/b64/mod.rs +++ b/src/unix/bsd/apple/b64/mod.rs @@ -1,6 +1,6 @@ //! 64-bit specific Apple (ios/darwin) definitions -use crate::{c_char, c_int, c_uchar, c_uint, c_ushort}; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/apple/b64/x86_64/mod.rs b/src/unix/bsd/apple/b64/x86_64/mod.rs index c6a9261ed33e..ea738497e98d 100644 --- a/src/unix/bsd/apple/b64/x86_64/mod.rs +++ b/src/unix/bsd/apple/b64/x86_64/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_char, c_int, c_short, c_uint, c_void, size_t}; +use crate::prelude::*; pub type boolean_t = c_uint; pub type mcontext_t = *mut __darwin_mcontext64; diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 36c2957459a0..fa4f1a333b03 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -2,10 +2,8 @@ //! //! This covers *-apple-* triples currently -use crate::{ - c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, cmsghdr, intptr_t, - off_t, size_t, ssize_t, -}; +use crate::prelude::*; +use crate::{cmsghdr, off_t, size_t, ssize_t}; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 3d6f18471f7e..fb49828ac844 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_int, c_short, c_uchar, c_uint, c_ushort, c_void, cmsghdr, intptr_t, off_t, size_t, ssize_t, -}; +use crate::prelude::*; +use crate::{cmsghdr, off_t}; pub type dev_t = u32; pub type c_char = i8; diff --git a/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/src/unix/bsd/freebsdlike/freebsd/aarch64.rs index 2e9dcdf15151..9955242f0afa 100644 --- a/src/unix/bsd/freebsdlike/freebsd/aarch64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/aarch64.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_longlong, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type c_long = i64; diff --git a/src/unix/bsd/freebsdlike/freebsd/arm.rs b/src/unix/bsd/freebsdlike/freebsd/arm.rs index c9eb88be6ebb..089ec915ae23 100644 --- a/src/unix/bsd/freebsdlike/freebsd/arm.rs +++ b/src/unix/bsd/freebsdlike/freebsd/arm.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_uint, c_void, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type c_long = i32; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs index 7e2c3058a46c..bcc99ef876c3 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs @@ -1,4 +1,5 @@ -use crate::{c_long, off_t}; +use crate::off_t; +use crate::prelude::*; #[repr(C)] #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs index e4c4c064e606..4b624b2b9dd8 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs @@ -1,4 +1,5 @@ -use crate::{c_long, off_t}; +use crate::off_t; +use crate::prelude::*; #[repr(C)] #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs index d38d7584030d..4d7282851f01 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs @@ -1,6 +1,4 @@ -use crate::{ - c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ushort, c_void, intptr_t, size_t, ssize_t, -}; +use crate::prelude::*; // APIs that were changed after FreeBSD 11 diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs index 19809e5a134c..231aa82ab41d 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, - ssize_t, -}; +use crate::prelude::*; +use crate::{off_t, ssize_t}; // APIs in FreeBSD 12 that have changed since 11. diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs index 24713993f90a..b29171cc509c 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs index 16bb3ceb9766..c2d7992ed65e 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, - ssize_t, -}; +use crate::prelude::*; +use crate::{off_t, ssize_t}; // APIs in FreeBSD 13 that have changed since 11. diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs index 24713993f90a..b29171cc509c 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs index a5a41b5c0e07..3342cb93f977 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, - ssize_t, -}; +use crate::prelude::*; +use crate::{off_t, ssize_t}; // APIs in FreeBSD 14 that have changed since 11. diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs index 2c403114c030..3e037471fbf6 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs index 238d3e60d103..d19ac556b7b1 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, - ssize_t, -}; +use crate::prelude::*; +use crate::{off_t, ssize_t}; // APIs in FreeBSD 15 that have changed since 11. diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs index 2c403114c030..3e037471fbf6 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index c7ad90ae176b..d5f4d0c19ca2 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, cmsghdr, off_t, size_t, ssize_t, -}; +use crate::prelude::*; +use crate::{cmsghdr, off_t}; pub type fflags_t = u32; diff --git a/src/unix/bsd/freebsdlike/freebsd/powerpc.rs b/src/unix/bsd/freebsdlike/freebsd/powerpc.rs index beec2dfae967..51f0cc496a34 100644 --- a/src/unix/bsd/freebsdlike/freebsd/powerpc.rs +++ b/src/unix/bsd/freebsdlike/freebsd/powerpc.rs @@ -1,4 +1,4 @@ -use crate::{c_int, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type c_long = i32; diff --git a/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs b/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs index 5f9ed7a5c2d9..b59ee40a75fd 100644 --- a/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs @@ -1,4 +1,4 @@ -use crate::{c_int, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type c_long = i64; diff --git a/src/unix/bsd/freebsdlike/freebsd/riscv64.rs b/src/unix/bsd/freebsdlike/freebsd/riscv64.rs index 5864a88d7d61..a5be95b185f9 100644 --- a/src/unix/bsd/freebsdlike/freebsd/riscv64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/riscv64.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_longlong, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type c_long = i64; diff --git a/src/unix/bsd/freebsdlike/freebsd/x86.rs b/src/unix/bsd/freebsdlike/freebsd/x86.rs index c7d908fd0189..908423396a73 100644 --- a/src/unix/bsd/freebsdlike/freebsd/x86.rs +++ b/src/unix/bsd/freebsdlike/freebsd/x86.rs @@ -1,4 +1,4 @@ -use crate::{c_int, size_t}; +use crate::prelude::*; pub type c_char = i8; pub type c_long = i32; diff --git a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs index 912b5f39b6d8..960dd87c4576 100644 --- a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_void, size_t}; +use crate::prelude::*; pub type c_char = i8; pub type c_long = i64; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 10290703f545..576ea701300c 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_double, c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, off_t, size_t, - ssize_t, -}; +use crate::prelude::*; +use crate::{c_double, off_t, ssize_t}; pub type mode_t = u16; pub type pthread_attr_t = *mut c_void; diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 445911b174d6..e12874ec5163 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_double, c_int, c_short, c_uint, c_ushort, c_void, size_t, ssize_t}; +use crate::c_double; +use crate::prelude::*; pub type off_t = i64; pub type useconds_t = u32; diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 446cdab7881d..0444353b1de4 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_short, c_uint, c_ushort, c_void, off_t, size_t, ssize_t}; +use crate::off_t; +use crate::prelude::*; pub type wchar_t = i32; pub type time_t = i64; diff --git a/src/unix/bsd/netbsdlike/netbsd/aarch64.rs b/src/unix/bsd/netbsdlike/netbsd/aarch64.rs index b74f57636ffe..e300699557f1 100644 --- a/src/unix/bsd/netbsdlike/netbsd/aarch64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/aarch64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_uchar, c_uint, PT_FIRSTMACH}; +use crate::prelude::*; +use crate::PT_FIRSTMACH; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/netbsdlike/netbsd/arm.rs b/src/unix/bsd/netbsdlike/netbsd/arm.rs index aff875801e89..54326b7625ff 100644 --- a/src/unix/bsd/netbsdlike/netbsd/arm.rs +++ b/src/unix/bsd/netbsdlike/netbsd/arm.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_longlong, PT_FIRSTMACH}; +use crate::prelude::*; +use crate::PT_FIRSTMACH; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/bsd/netbsdlike/netbsd/mips.rs b/src/unix/bsd/netbsdlike/netbsd/mips.rs index 089154cd2a40..0de79f43bdaa 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mips.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mips.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_longlong, PT_FIRSTMACH}; +use crate::prelude::*; +use crate::PT_FIRSTMACH; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 7b6e09d5d5cb..3923f6245c7f 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, cmsghdr, intptr_t, off_t, - size_t, ssize_t, -}; +use crate::prelude::*; +use crate::{cmsghdr, off_t, size_t, ssize_t}; pub type clock_t = c_uint; pub type suseconds_t = c_int; diff --git a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs index 1d74f171aa01..b324f6f4ad1a 100644 --- a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs +++ b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs @@ -1,4 +1,5 @@ -use crate::{c_double, c_int, PT_FIRSTMACH}; +use crate::prelude::*; +use crate::{c_double, PT_FIRSTMACH}; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs index d43269607d29..aa9898582d54 100644 --- a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs @@ -1,6 +1,7 @@ use PT_FIRSTMACH; -use crate::{c_double, c_int}; +use crate::c_double; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/netbsdlike/netbsd/sparc64.rs b/src/unix/bsd/netbsdlike/netbsd/sparc64.rs index ff0320a9a81d..d564f58a3e68 100644 --- a/src/unix/bsd/netbsdlike/netbsd/sparc64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/sparc64.rs @@ -1,4 +1,4 @@ -use crate::c_uchar; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/netbsdlike/netbsd/x86.rs b/src/unix/bsd/netbsdlike/netbsd/x86.rs index db21dc326cc5..5dbc74212c7c 100644 --- a/src/unix/bsd/netbsdlike/netbsd/x86.rs +++ b/src/unix/bsd/netbsdlike/netbsd/x86.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_uchar}; +use crate::prelude::*; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs index 28829ee11ea8..8efec63fe239 100644 --- a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_uchar, c_uint, PT_FIRSTMACH}; +use crate::prelude::*; +use crate::PT_FIRSTMACH; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/netbsdlike/openbsd/aarch64.rs b/src/unix/bsd/netbsdlike/openbsd/aarch64.rs index 02f3f1bc6157..6a67b6ba9677 100644 --- a/src/unix/bsd/netbsdlike/openbsd/aarch64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/aarch64.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 91cd6aee9524..924aa5a8ffd5 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1,7 +1,6 @@ +use crate::prelude::*; use crate::unix::bsd::O_SYNC; -use crate::{ - c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, cmsghdr, off_t, size_t, -}; +use crate::{cmsghdr, off_t}; pub type clock_t = i64; pub type suseconds_t = c_long; diff --git a/src/unix/bsd/netbsdlike/openbsd/riscv64.rs b/src/unix/bsd/netbsdlike/openbsd/riscv64.rs index baaab22337c3..e75f176cddbd 100644 --- a/src/unix/bsd/netbsdlike/openbsd/riscv64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/riscv64.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/bsd/netbsdlike/openbsd/x86.rs b/src/unix/bsd/netbsdlike/openbsd/x86.rs index bad2eddc84b4..acd5d43e53f1 100644 --- a/src/unix/bsd/netbsdlike/openbsd/x86.rs +++ b/src/unix/bsd/netbsdlike/openbsd/x86.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/bsd/netbsdlike/openbsd/x86_64.rs b/src/unix/bsd/netbsdlike/openbsd/x86_64.rs index d75b20f8fceb..64c60cc1c076 100644 --- a/src/unix/bsd/netbsdlike/openbsd/x86_64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/x86_64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, PT_FIRSTMACH}; +use crate::prelude::*; +use crate::PT_FIRSTMACH; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index 0b63a5141209..f694f836cacd 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_double, c_int, c_short, c_uchar, c_uint, c_ushort, c_void, intptr_t, size_t, ssize_t, -}; +use crate::c_double; +use crate::prelude::*; pub type rlim_t = crate::uintptr_t; pub type sa_family_t = u8; diff --git a/src/unix/haiku/native.rs b/src/unix/haiku/native.rs index 4d51a38e97f4..bbe6f9df51c9 100644 --- a/src/unix/haiku/native.rs +++ b/src/unix/haiku/native.rs @@ -1,4 +1,5 @@ -use crate::{c_char, c_double, c_int, c_uint, c_ulong, c_void, off_t, size_t, ssize_t}; +use crate::prelude::*; +use crate::{c_double, off_t}; // This module contains bindings to the native Haiku API. The Haiku API // originates from BeOS, and it was the original way to perform low level diff --git a/src/unix/haiku/x86_64.rs b/src/unix/haiku/x86_64.rs index 0b6f03b6daf6..fb3d8758cc91 100644 --- a/src/unix/haiku/x86_64.rs +++ b/src/unix/haiku/x86_64.rs @@ -1,4 +1,4 @@ -use crate::{c_uchar, c_uint, c_ulong, c_ushort}; +use crate::prelude::*; s_no_extra_traits! { pub struct fpu_state { diff --git a/src/unix/hurd/b32.rs b/src/unix/hurd/b32.rs index d98b97268fbb..5223d549dd02 100644 --- a/src/unix/hurd/b32.rs +++ b/src/unix/hurd/b32.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_longlong, c_uchar, c_uint, c_ulonglong, c_ushort}; +use crate::prelude::*; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/hurd/b64.rs b/src/unix/hurd/b64.rs index 41ba87ae59bf..1954c27f8856 100644 --- a/src/unix/hurd/b64.rs +++ b/src/unix/hurd/b64.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_uchar, c_uint}; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index cf5d7c568c9e..8d8c8418565b 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -1,9 +1,7 @@ #![allow(dead_code)] -use crate::{ - c_double, c_int, c_schar, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, intptr_t, - size_t, ssize_t, -}; +use crate::prelude::*; +use crate::{c_double, c_schar, size_t, ssize_t}; // types pub type c_char = i8; diff --git a/src/unix/linux_like/android/b32/arm.rs b/src/unix/linux_like/android/b32/arm.rs index c9bf6c8bee3d..27ec814e251e 100644 --- a/src/unix/linux_like/android/b32/arm.rs +++ b/src/unix/linux_like/android/b32/arm.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_long, c_longlong, c_ulong}; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = u32; diff --git a/src/unix/linux_like/android/b32/mod.rs b/src/unix/linux_like/android/b32/mod.rs index 8ef7a917007a..974d69bda6e8 100644 --- a/src/unix/linux_like/android/b32/mod.rs +++ b/src/unix/linux_like/android/b32/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_longlong, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, size_t}; +use crate::prelude::*; // The following definitions are correct for arm and i686, // but may be wrong for mips diff --git a/src/unix/linux_like/android/b32/x86/mod.rs b/src/unix/linux_like/android/b32/x86/mod.rs index a456ad6a4a34..74368d7b3fb0 100644 --- a/src/unix/linux_like/android/b32/x86/mod.rs +++ b/src/unix/linux_like/android/b32/x86/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_long, c_ulong}; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/android/b64/aarch64/mod.rs b/src/unix/linux_like/android/b64/aarch64/mod.rs index aceb52c0722d..39d8bc07c4dd 100644 --- a/src/unix/linux_like/android/b64/aarch64/mod.rs +++ b/src/unix/linux_like/android/b64/aarch64/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = u32; diff --git a/src/unix/linux_like/android/b64/mod.rs b/src/unix/linux_like/android/b64/mod.rs index 73390421602d..ea11e629ed1d 100644 --- a/src/unix/linux_like/android/b64/mod.rs +++ b/src/unix/linux_like/android/b64/mod.rs @@ -1,4 +1,6 @@ -use crate::{c_int, c_uint, c_ulonglong, c_ushort, c_void, size_t}; + + +use crate::prelude::*; // The following definitions are correct for aarch64 and x86_64, // but may be wrong for mips64 diff --git a/src/unix/linux_like/android/b64/riscv64/mod.rs b/src/unix/linux_like/android/b64/riscv64/mod.rs index 8fff9a679333..f214fe33702a 100644 --- a/src/unix/linux_like/android/b64/riscv64/mod.rs +++ b/src/unix/linux_like/android/b64/riscv64/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = u32; diff --git a/src/unix/linux_like/android/b64/x86_64/mod.rs b/src/unix/linux_like/android/b64/x86_64/mod.rs index 609def88b2d9..b4da2e4be546 100644 --- a/src/unix/linux_like/android/b64/x86_64/mod.rs +++ b/src/unix/linux_like/android/b64/x86_64/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, c_ushort, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index e352a3b4a2fd..65049720c07d 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1,8 +1,8 @@ //! Android-specific definitions for linux-like values -use crate::{ - c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, size_t, ssize_t, -}; + + +use crate::prelude::*; pub type clock_t = c_long; pub type time_t = c_long; diff --git a/src/unix/linux_like/emscripten/lfs64.rs b/src/unix/linux_like/emscripten/lfs64.rs index 70d10dba393b..06be875446bb 100644 --- a/src/unix/linux_like/emscripten/lfs64.rs +++ b/src/unix/linux_like/emscripten/lfs64.rs @@ -1,4 +1,5 @@ -use crate::{c_char, c_int, c_void, off64_t, size_t, ssize_t}; +use crate::off64_t; +use crate::prelude::*; // In-sync with ../linux/musl/lfs64.rs except for fallocate64, prlimit64 and sendfile64 diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index f997d438aaf5..2dbadc5099e6 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_double, c_int, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t}; +use crate::c_double; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/arch/generic/mod.rs b/src/unix/linux_like/linux/arch/generic/mod.rs index 3e7d3a1117d5..10953fe789df 100644 --- a/src/unix/linux_like/linux/arch/generic/mod.rs +++ b/src/unix/linux_like/linux/arch/generic/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, Ioctl}; +use crate::prelude::*; +use crate::Ioctl; s! { pub struct termios2 { @@ -126,8 +127,8 @@ cfg_if! { target_arch = "csky", target_arch = "loongarch64" ))] { - pub const FICLONE: crate::c_ulong = 0x40049409; - pub const FICLONERANGE: crate::c_ulong = 0x4020940D; + pub const FICLONE: c_ulong = 0x40049409; + pub const FICLONERANGE: c_ulong = 0x4020940D; } } diff --git a/src/unix/linux_like/linux/arch/mips/mod.rs b/src/unix/linux_like/linux/arch/mips/mod.rs index 52469befdccc..950ad5f118df 100644 --- a/src/unix/linux_like/linux/arch/mips/mod.rs +++ b/src/unix/linux_like/linux/arch/mips/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_ulong, Ioctl}; +use crate::prelude::*; +use crate::Ioctl; s! { pub struct termios2 { diff --git a/src/unix/linux_like/linux/arch/powerpc/mod.rs b/src/unix/linux_like/linux/arch/powerpc/mod.rs index 2c856061d339..de39df0d8323 100644 --- a/src/unix/linux_like/linux/arch/powerpc/mod.rs +++ b/src/unix/linux_like/linux/arch/powerpc/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_ulong, Ioctl}; +use crate::prelude::*; +use crate::Ioctl; // arch/powerpc/include/uapi/asm/socket.h diff --git a/src/unix/linux_like/linux/arch/sparc/mod.rs b/src/unix/linux_like/linux/arch/sparc/mod.rs index 40454fde34f5..829307aa7103 100644 --- a/src/unix/linux_like/linux/arch/sparc/mod.rs +++ b/src/unix/linux_like/linux/arch/sparc/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, Ioctl}; +use crate::prelude::*; +use crate::Ioctl; s! { pub struct termios2 { diff --git a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs index f318b4ad9223..42bdd3fe19e6 100644 --- a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type wchar_t = u32; diff --git a/src/unix/linux_like/linux/gnu/b32/csky/mod.rs b/src/unix/linux_like/linux/gnu/b32/csky/mod.rs index 7677f1057191..eb6f70d8fed0 100644 --- a/src/unix/linux_like/linux/gnu/b32/csky/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/csky/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type wchar_t = u32; 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..4a033c1ad47e 100644 --- a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs index 19fe9b23d4ad..73da7739dabf 100644 --- a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/gnu/b32/mod.rs b/src/unix/linux_like/linux/gnu/b32/mod.rs index c4550e183de1..adb36cc169fe 100644 --- a/src/unix/linux_like/linux/gnu/b32/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/mod.rs @@ -1,6 +1,7 @@ //! 32-bit specific definitions for linux-like values -use crate::{c_int, c_longlong, c_uint, c_ulonglong, c_ushort, c_void, pthread_mutex_t, size_t}; +use crate::prelude::*; +use crate::pthread_mutex_t; pub type c_long = i32; pub type c_ulong = u32; @@ -49,7 +50,7 @@ s! { pub st_dev: c_ulong, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - __pad1: crate::c_short, + __pad1: c_short, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] st_pad1: [c_long; 3], pub st_ino: crate::ino_t, @@ -62,7 +63,7 @@ s! { #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] pub st_rdev: c_ulong, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - __pad2: crate::c_short, + __pad2: c_short, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] st_pad2: [c_long; 2], pub st_size: off_t, diff --git a/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/src/unix/linux_like/linux/gnu/b32/powerpc.rs index e2e5088bb390..75ec2385a123 100644 --- a/src/unix/linux_like/linux/gnu/b32/powerpc.rs +++ b/src/unix/linux_like/linux/gnu/b32/powerpc.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs b/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs index 2b86d5eacc8f..4ab40c628a1e 100644 --- a/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs @@ -1,8 +1,7 @@ //! RISC-V-specific definitions for 32-bit linux-like values -use crate::{ - c_int, c_long, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type wchar_t = c_int; diff --git a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs index d14309f45a8e..cfe62018f5fd 100644 --- a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs @@ -1,8 +1,7 @@ //! SPARC-specific definitions for 32-bit linux-like values -use crate::{ - c_int, c_long, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs index 7e7de0ce2dfa..12194d3b7a72 100644 --- a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index a12614e8f8c7..27ba5263c536 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -1,8 +1,7 @@ //! AArch64-specific definitions for 64-bit linux-like values -use crate::{ - c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type wchar_t = u32; 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..053d70915b53 100644 --- a/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs @@ -1,7 +1,5 @@ -use crate::{ - c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, - pthread_mutex_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t, pthread_mutex_t, size_t}; pub type c_char = i8; pub type c_long = i64; diff --git a/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs b/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs index 1f82bb18aec3..2d85df1385a1 100644 --- a/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_short, c_uint, c_ushort, c_void, off64_t, off_t, pthread_mutex_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t, pthread_mutex_t}; pub type blksize_t = i64; pub type c_char = i8; diff --git a/src/unix/linux_like/linux/gnu/b64/mod.rs b/src/unix/linux_like/linux/gnu/b64/mod.rs index 6d2927a46524..fde7a5c6c360 100644 --- a/src/unix/linux_like/linux/gnu/b64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/mod.rs @@ -1,6 +1,6 @@ //! 64-bit specific definitions for linux-like values -use crate::{c_int, c_uint, c_ushort}; +use crate::prelude::*; pub type ino_t = u64; pub type off_t = i64; @@ -12,7 +12,7 @@ pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; pub type rlim_t = u64; #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] -pub type __syscall_ulong_t = crate::c_ulonglong; +pub type __syscall_ulong_t = c_ulonglong; #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] pub type __syscall_ulong_t = c_ulong; diff --git a/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs index 3cfdf2fa8a88..86d047dbf387 100644 --- a/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs @@ -1,6 +1,7 @@ //! PowerPC64-specific definitions for 64-bit linux-like values -use crate::{c_int, c_short, c_uint, c_void, off64_t, off_t, pthread_mutex_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t, pthread_mutex_t}; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs b/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs index 27c96dca3d8b..6eaa3cda10fc 100644 --- a/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs @@ -1,8 +1,7 @@ //! RISC-V-specific definitions for 64-bit linux-like values -use crate::{ - c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type c_long = i64; diff --git a/src/unix/linux_like/linux/gnu/b64/s390x.rs b/src/unix/linux_like/linux/gnu/b64/s390x.rs index 210db71ae84b..7b958fabddb7 100644 --- a/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -1,8 +1,7 @@ //! s390x -use crate::{ - c_double, c_int, c_short, c_uint, c_ushort, c_void, off64_t, off_t, pthread_mutex_t, size_t, -}; +use crate::prelude::*; +use crate::{c_double, off64_t, off_t, pthread_mutex_t}; pub type blksize_t = i64; pub type c_char = u8; diff --git a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs index 8dd7b85032be..54fc627d1576 100644 --- a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs @@ -1,9 +1,7 @@ //! SPARC64-specific definitions for 64-bit linux-like values -use crate::{ - c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, - pthread_mutex_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t, pthread_mutex_t, size_t}; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs index 98838accea1b..418ed1200d5d 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs @@ -1,8 +1,7 @@ //! x86_64-specific definitions for 64-bit linux-like values -use crate::{ - c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = i8; pub type wchar_t = i32; 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..0220a2668b4a 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 @@ -1,4 +1,5 @@ -use crate::{c_int, c_void, pthread_mutex_t, size_t}; +use crate::prelude::*; +use crate::pthread_mutex_t; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs index 74a4581b0bda..eafb5246c9ed 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs @@ -1,4 +1,5 @@ -use crate::{c_int, pthread_mutex_t}; +use crate::prelude::*; +use crate::pthread_mutex_t; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index b1a60029c3cf..c158c0cc274d 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t, ssize_t, -}; +use crate::off64_t; +use crate::prelude::*; pub type pthread_t = c_ulong; pub type __priority_which_t = c_uint; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 280ffb59304c..73ef669ff920 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -2,9 +2,8 @@ use core::mem::size_of; -use crate::{ - c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t, -}; +use crate::c_double; +use crate::prelude::*; pub type useconds_t = u32; pub type dev_t = u64; @@ -477,9 +476,9 @@ s! { // will probably need including here. tsidea, skrap // QNX (NTO) platform does not define these fields #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] - pub dlpi_adds: crate::c_ulonglong, + pub dlpi_adds: c_ulonglong, #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] - pub dlpi_subs: crate::c_ulonglong, + pub dlpi_subs: c_ulonglong, #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] pub dlpi_tls_modid: size_t, #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index 789a35548d70..ec00083cf705 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ulonglong, c_void, off_t, size_t, ssize_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = u32; diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index 720464b79f44..9becabd146f8 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = u32; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index af64d4d46232..aacdc4457949 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_ulong, c_void, off_t, size_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = c_int; diff --git a/src/unix/linux_like/linux/musl/b32/mod.rs b/src/unix/linux_like/linux/musl/b32/mod.rs index 37f9c3ab2c24..4a62ef1906ff 100644 --- a/src/unix/linux_like/linux/musl/b32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_longlong, c_ulonglong, c_void}; +use crate::prelude::*; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index 2fff41545ee5..29e797959123 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_void, off_t, size_t, ssize_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = i32; 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..e05f134e3a0a 100644 --- a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -1,6 +1,7 @@ //! RISC-V-specific definitions for 32-bit linux-like values -use crate::{c_int, c_long, c_short, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; +use crate::prelude::*; +use crate::{off64_t, off_t}; pub type c_char = u8; pub type wchar_t = c_int; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index 6c68c3406cbe..a81f2351ec68 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, ssize_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 7c5ecc6a2453..c660ec5c3453 100644 --- a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off_t, size_t, -}; +use crate::off_t; +use crate::prelude::*; pub type c_char = u8; pub type __u64 = c_ulonglong; diff --git a/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs index 1de3fdb123ac..e58b36bf6e8d 100644 --- a/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs @@ -1,9 +1,7 @@ //! LoongArch-specific definitions for 64-bit linux-like values -use crate::{ - c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off64_t, off_t, - size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t, size_t}; pub type c_char = i8; pub type wchar_t = c_int; diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index b3f660931c44..09191a5f8275 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_uint, c_ulong, off_t, size_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/musl/b64/mod.rs b/src/unix/linux_like/linux/musl/b64/mod.rs index eaab68d56539..50d862f57042 100644 --- a/src/unix/linux_like/linux/musl/b64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_uint, c_void, size_t, ssize_t}; +use crate::prelude::*; pub type c_long = i64; pub type c_ulong = u64; diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs index 13d2fbb690e7..3753293c8e0c 100644 --- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_long, c_short, c_ulong, off_t, size_t}; +use crate::off_t; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs index 53ae3d64c25b..586a8fe542bb 100644 --- a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs @@ -1,9 +1,7 @@ //! RISC-V-specific definitions for 64-bit linux-like values -use crate::{ - c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off64_t, off_t, - size_t, -}; +use crate::prelude::*; +use crate::{off64_t, off_t, size_t}; pub type c_char = u8; pub type wchar_t = c_int; diff --git a/src/unix/linux_like/linux/musl/b64/s390x.rs b/src/unix/linux_like/linux/musl/b64/s390x.rs index ad8ba3bb26e1..3ef9ebbfd2d4 100644 --- a/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -1,4 +1,5 @@ -use crate::{c_double, c_int, c_long, c_short, off_t, size_t}; +use crate::prelude::*; +use crate::{c_double, off_t}; pub type blksize_t = i64; pub type c_char = u8; diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index 62ce8aadc744..f61b77f60669 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off_t, size_t, -}; +use crate::off_t; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/linux_like/linux/musl/lfs64.rs b/src/unix/linux_like/linux/musl/lfs64.rs index 582e20a45545..e6506fd3d385 100644 --- a/src/unix/linux_like/linux/musl/lfs64.rs +++ b/src/unix/linux_like/linux/musl/lfs64.rs @@ -1,4 +1,5 @@ -use crate::{c_char, c_int, c_void, off64_t, size_t, ssize_t}; +use crate::off64_t; +use crate::prelude::*; #[inline] pub unsafe extern "C" fn creat64(path: *const c_char, mode: crate::mode_t) -> c_int { diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 8b750d0cf4a6..d4052d88b4b1 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -1,6 +1,5 @@ -use crate::{ - c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t, ssize_t, -}; +use crate::off64_t; +use crate::prelude::*; pub type pthread_t = *mut c_void; pub type clock_t = c_long; diff --git a/src/unix/linux_like/linux/uclibc/arm/mod.rs b/src/unix/linux_like/linux/uclibc/arm/mod.rs index 5991d4651c1b..da3203f98a3d 100644 --- a/src/unix/linux_like/linux/uclibc/arm/mod.rs +++ b/src/unix/linux_like/linux/uclibc/arm/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = c_uint; diff --git a/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs index dced826fc913..6118928312b9 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type c_char = i8; pub type c_long = i32; 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..fa1234744dc1 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_uint, c_ushort, c_void, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type blkcnt_t = i64; pub type blksize_t = i64; diff --git a/src/unix/linux_like/linux/uclibc/mips/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mod.rs index 488a4a499d17..f1934c396773 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_short, c_uint, size_t}; +use crate::prelude::*; pub type pthread_t = c_ulong; diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs index 95aed917fe40..7495f0787811 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void, off64_t, size_t, ssize_t}; +use crate::off64_t; +use crate::prelude::*; pub type shmatt_t = c_ulong; pub type msgqnum_t = c_ulong; diff --git a/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs b/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs index cbf8c033d741..7e1499a1fd8b 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_uint, c_ulong, c_void, size_t}; +use crate::prelude::*; /// L4Re specifics /// This module contains definitions required by various L4Re libc backends. diff --git a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs index 8a8451e956fd..07574581d77c 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs @@ -1,6 +1,7 @@ //! Definitions for uclibc on 64bit systems -use crate::{c_int, c_uint, c_ushort, c_void, off64_t, size_t}; +use crate::off64_t; +use crate::prelude::*; pub type blkcnt_t = i64; pub type blksize_t = i64; diff --git a/src/unix/linux_like/linux/uclibc/x86_64/other.rs b/src/unix/linux_like/linux/uclibc/x86_64/other.rs index 7890d76f24b4..dc16d02c8797 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/other.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/other.rs @@ -1,4 +1,4 @@ -use crate::c_ulong; +use crate::prelude::*; // Thestyle checker discourages the use of #[cfg], so this has to go into a // separate module diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 51a89c3a45a9..9404a43ab7f8 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1,4 +1,6 @@ -use crate::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void, intptr_t, size_t, ssize_t}; + + +use crate::prelude::*; pub type sa_family_t = u16; pub type speed_t = c_uint; @@ -595,7 +597,7 @@ pub const XATTR_REPLACE: c_int = 0x2; cfg_if! { if #[cfg(target_os = "android")] { - pub const RLIM64_INFINITY: crate::c_ulonglong = !0; + pub const RLIM64_INFINITY: c_ulonglong = !0; } else { pub const RLIM64_INFINITY: crate::rlim64_t = !0; } diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 340ae9abd978..0ab7ae0fd19a 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -3,7 +3,7 @@ //! More functions and definitions can be found in the more specific modules //! according to the platform in question. -use crate::c_void; +use crate::prelude::*; pub type c_schar = i8; pub type c_uchar = u8; diff --git a/src/unix/newlib/aarch64/mod.rs b/src/unix/newlib/aarch64/mod.rs index 7efbdf780db3..a33113127e34 100644 --- a/src/unix/newlib/aarch64/mod.rs +++ b/src/unix/newlib/aarch64/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_short}; +use crate::prelude::*; pub type clock_t = c_long; pub type c_char = u8; diff --git a/src/unix/newlib/arm/mod.rs b/src/unix/newlib/arm/mod.rs index 558a70da6b79..a32e37ede596 100644 --- a/src/unix/newlib/arm/mod.rs +++ b/src/unix/newlib/arm/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_short}; +use crate::prelude::*; pub type clock_t = c_long; pub type c_char = u8; diff --git a/src/unix/newlib/espidf/mod.rs b/src/unix/newlib/espidf/mod.rs index c33d6ba4bc05..4e3898153357 100644 --- a/src/unix/newlib/espidf/mod.rs +++ b/src/unix/newlib/espidf/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_short, c_uint, c_void, size_t, ssize_t}; +use crate::prelude::*; pub type clock_t = c_ulong; pub type c_char = i8; diff --git a/src/unix/newlib/generic.rs b/src/unix/newlib/generic.rs index fe2216cee356..ba4dfbe528b6 100644 --- a/src/unix/newlib/generic.rs +++ b/src/unix/newlib/generic.rs @@ -1,11 +1,12 @@ //! Common types used by most newlib platforms -use crate::{c_char, c_long, c_uchar, off_t}; +use crate::off_t; +use crate::prelude::*; s! { pub struct sigset_t { #[cfg(target_os = "horizon")] - __val: [crate::c_ulong; 16], + __val: [c_ulong; 16], #[cfg(not(target_os = "horizon"))] __val: u32, } diff --git a/src/unix/newlib/horizon/mod.rs b/src/unix/newlib/horizon/mod.rs index 055e81fe7076..8c662f2a4517 100644 --- a/src/unix/newlib/horizon/mod.rs +++ b/src/unix/newlib/horizon/mod.rs @@ -1,8 +1,7 @@ //! ARMv6K Nintendo 3DS C Newlib definitions -use crate::{ - c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, off_t, size_t, ssize_t, -}; +use crate::off_t; +use crate::prelude::*; pub type c_char = u8; pub type c_long = i32; diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 1b547630789a..e18cf3b3728c 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_longlong, c_uint, c_ushort, c_void, size_t}; +use crate::prelude::*; pub type blkcnt_t = i32; pub type blksize_t = i32; @@ -7,11 +7,11 @@ pub type clockid_t = c_ulong; cfg_if! { if #[cfg(any(target_os = "espidf"))] { - pub type dev_t = crate::c_short; + pub type dev_t = c_short; pub type ino_t = c_ushort; pub type off_t = c_long; } else if #[cfg(any(target_os = "vita"))] { - pub type dev_t = crate::c_short; + pub type dev_t = c_short; pub type ino_t = c_ushort; pub type off_t = c_int; } else { @@ -253,7 +253,7 @@ s! { #[cfg(target_os = "espidf")] pub is_initialized: i32, #[cfg(target_os = "espidf")] - pub stackaddr: *mut crate::c_void, + pub stackaddr: *mut c_void, #[cfg(target_os = "espidf")] pub stacksize: i32, #[cfg(target_os = "espidf")] diff --git a/src/unix/newlib/powerpc/mod.rs b/src/unix/newlib/powerpc/mod.rs index 6b73b6fb39de..6a9c42bdb722 100644 --- a/src/unix/newlib/powerpc/mod.rs +++ b/src/unix/newlib/powerpc/mod.rs @@ -1,4 +1,4 @@ -use crate::c_int; +use crate::prelude::*; pub type clock_t = c_ulong; pub type c_char = u8; diff --git a/src/unix/newlib/rtems/mod.rs b/src/unix/newlib/rtems/mod.rs index cf390f9fa5eb..f14967da0aad 100644 --- a/src/unix/newlib/rtems/mod.rs +++ b/src/unix/newlib/rtems/mod.rs @@ -1,5 +1,6 @@ // defined in architecture specific module -use crate::{c_char, c_int, c_long, c_ulong, c_void, size_t, ssize_t}; + +use crate::prelude::*; s! { pub struct sockaddr_un { diff --git a/src/unix/newlib/vita/mod.rs b/src/unix/newlib/vita/mod.rs index e9b12dd0914b..120c4d54972f 100644 --- a/src/unix/newlib/vita/mod.rs +++ b/src/unix/newlib/vita/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_int, c_short, c_void, off_t, size_t, ssize_t}; +use crate::off_t; +use crate::prelude::*; pub type clock_t = c_long; diff --git a/src/unix/nto/aarch64.rs b/src/unix/nto/aarch64.rs index 0e4694315c73..d0987f28be6b 100644 --- a/src/unix/nto/aarch64.rs +++ b/src/unix/nto/aarch64.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_void, size_t}; +use crate::prelude::*; pub type c_char = u8; pub type wchar_t = u32; diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 994720e82d44..f25d6a513347 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t}; +use crate::prelude::*; pub type clock_t = u32; diff --git a/src/unix/nto/neutrino.rs b/src/unix/nto/neutrino.rs index 3e2bee367acd..83ae5c334825 100644 --- a/src/unix/nto/neutrino.rs +++ b/src/unix/nto/neutrino.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_long, c_uint, c_void, size_t}; +use crate::prelude::*; pub type nto_job_t = crate::sync_t; diff --git a/src/unix/nto/x86_64.rs b/src/unix/nto/x86_64.rs index ef720ac0a337..493092b9e4d8 100644 --- a/src/unix/nto/x86_64.rs +++ b/src/unix/nto/x86_64.rs @@ -1,4 +1,4 @@ -use crate::{c_int, c_void, size_t}; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = u32; diff --git a/src/unix/nuttx/mod.rs b/src/unix/nuttx/mod.rs index 014122e421ab..95d1156bfc48 100644 --- a/src/unix/nuttx/mod.rs +++ b/src/unix/nuttx/mod.rs @@ -1,4 +1,5 @@ -use crate::{c_void, in6_addr, in_addr_t, timespec, DIR}; +use crate::prelude::*; +use crate::{in6_addr, in_addr_t, timespec, DIR}; pub type nlink_t = u16; pub type ino_t = u16; diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 716d699196ac..2f10174140fc 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -1,6 +1,4 @@ -use crate::{ - c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, size_t, ssize_t, -}; +use crate::prelude::*; pub type c_char = i8; pub type wchar_t = i32; diff --git a/src/unix/solarish/compat.rs b/src/unix/solarish/compat.rs index 8fd1c750a62c..bea3b2bdd560 100644 --- a/src/unix/solarish/compat.rs +++ b/src/unix/solarish/compat.rs @@ -2,8 +2,8 @@ // Solaris, but often needed by other crates. use core::cmp::min; +use crate::prelude::*; use crate::unix::solarish::*; -use crate::{c_char, c_int, size_t}; const PTEM: &[u8] = b"ptem\0"; const LDTERM: &[u8] = b"ldterm\0"; diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index 0fea3b7dd24b..d72734d109e3 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -1,7 +1,7 @@ +use crate::prelude::*; use crate::{ - c_char, c_double, c_int, c_short, c_uint, c_ulong, c_ushort, c_void, exit_status, off_t, - size_t, ssize_t, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, - PRIV_PFEXEC, PRIV_XPOLICY, + c_double, exit_status, off_t, size_t, ssize_t, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, + PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, PRIV_XPOLICY, }; pub type lgrp_rsrc_t = c_int; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 77d0add2042b..e496f70371a2 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -1,8 +1,7 @@ use core::mem::size_of; -use crate::{ - c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t, -}; +use crate::c_double; +use crate::prelude::*; pub type c_char = i8; pub type c_long = i64; diff --git a/src/unix/solarish/solaris.rs b/src/unix/solarish/solaris.rs index 2eea74d1b071..fb8d1e7a74d3 100644 --- a/src/unix/solarish/solaris.rs +++ b/src/unix/solarish/solaris.rs @@ -1,7 +1,7 @@ +use crate::prelude::*; use crate::{ - c_char, c_int, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, exit_status, off_t, - size_t, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, - PRIV_XPOLICY, + exit_status, off_t, size_t, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, + PRIV_PFEXEC, PRIV_XPOLICY, }; pub type door_attr_t = c_uint; diff --git a/src/unix/solarish/x86.rs b/src/unix/solarish/x86.rs index c16116954728..705f2b63b84f 100644 --- a/src/unix/solarish/x86.rs +++ b/src/unix/solarish/x86.rs @@ -1,4 +1,6 @@ -use crate::{c_char, c_long, c_ulong, c_ulonglong, c_ushort}; + + +use crate::prelude::*; pub type Elf32_Addr = c_ulong; pub type Elf32_Half = c_ushort; diff --git a/src/unix/solarish/x86_64.rs b/src/unix/solarish/x86_64.rs index d69fc9a5afbd..f3a03196ae69 100644 --- a/src/unix/solarish/x86_64.rs +++ b/src/unix/solarish/x86_64.rs @@ -1,4 +1,4 @@ -use crate::{c_char, c_int, c_long, c_uint, c_ulong, c_ulonglong, c_ushort, c_void}; +use crate::prelude::*; cfg_if! { if #[cfg(target_os = "solaris")] { diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 96a82da29d63..f4b4dc8c3e95 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -3,7 +3,7 @@ use core::mem::size_of; use core::ptr::null_mut; -use crate::c_void; +use crate::prelude::*; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum DIR {} diff --git a/src/wasi/mod.rs b/src/wasi/mod.rs index 55b4be1291b3..15aa4fa84c56 100644 --- a/src/wasi/mod.rs +++ b/src/wasi/mod.rs @@ -6,7 +6,7 @@ use core::iter::Iterator; use super::{Send, Sync}; -use crate::c_void; +use crate::prelude::*; pub type c_char = i8; pub type c_uchar = u8; diff --git a/src/wasi/p2.rs b/src/wasi/p2.rs index 344029f22233..dbb9e973fcab 100644 --- a/src/wasi/p2.rs +++ b/src/wasi/p2.rs @@ -1,4 +1,6 @@ -use crate::{c_char, c_int, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t}; + + +use crate::prelude::*; pub type sa_family_t = c_ushort; pub type in_port_t = c_ushort; diff --git a/src/windows/gnu/mod.rs b/src/windows/gnu/mod.rs index e593dff519e0..a263dfa736bb 100644 --- a/src/windows/gnu/mod.rs +++ b/src/windows/gnu/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_char, c_int, c_uint, size_t}; +use crate::prelude::*; cfg_if! { if #[cfg(target_pointer_width = "64")] { diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 55a07f799088..052df670f9b9 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -1,6 +1,6 @@ //! Windows CRT definitions -use crate::c_void; +use crate::prelude::*; pub type c_schar = i8; pub type c_uchar = u8; diff --git a/src/windows/msvc/mod.rs b/src/windows/msvc/mod.rs index 3f9f34e7e24f..5b620bc6c1af 100644 --- a/src/windows/msvc/mod.rs +++ b/src/windows/msvc/mod.rs @@ -1,4 +1,4 @@ -use crate::{c_char, c_int, c_uint, c_void, size_t}; +use crate::prelude::*; pub const L_tmpnam: c_uint = 260; pub const TMP_MAX: c_uint = 0x7fff_ffff;