//! Linux-specific raw type definitions
#![stable(feature = "raw_ext", since = "1.1.0")]
-#![rustc_deprecated(since = "1.8.0",
- reason = "these type aliases are no longer supported by \
- the standard library, the `libc` crate on \
- crates.io should be used instead for the correct \
- definitions")]
+#![rustc_deprecated(
+ since = "1.8.0",
+ reason = "these type aliases are no longer supported by \
+ the standard library, the `libc` crate on \
+ crates.io should be used instead for the correct \
+ definitions"
+)]
#![allow(deprecated)]
#![allow(missing_debug_implementations)]
use crate::os::raw::c_ulong;
-#[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
-#[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type dev_t = u64;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type mode_t = u32;
#[stable(feature = "pthread_t", since = "1.8.0")]
pub type pthread_t = c_ulong;
#[doc(inline)]
#[stable(feature = "raw_ext", since = "1.1.0")]
-pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
+pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
-#[cfg(any(target_arch = "x86",
- target_arch = "le32",
- target_arch = "powerpc",
- target_arch = "arm",
- target_arch = "asmjs",
- target_arch = "wasm32"))]
+#[cfg(any(
+ target_arch = "x86",
+ target_arch = "le32",
+ target_arch = "powerpc",
+ target_arch = "arm",
+ target_arch = "asmjs",
+ target_arch = "wasm32"
+))]
mod arch {
use crate::os::raw::{c_long, c_short, c_uint};
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blkcnt_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blksize_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type ino_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type nlink_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type off_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type time_t = i64;
#[repr(C)]
#[derive(Clone)]
use crate::os::raw::{c_long, c_ulong};
#[cfg(target_env = "musl")]
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blkcnt_t = i64;
#[cfg(not(target_env = "musl"))]
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blkcnt_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blksize_t = u64;
#[cfg(target_env = "musl")]
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type ino_t = u64;
#[cfg(not(target_env = "musl"))]
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type ino_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type nlink_t = u64;
#[cfg(target_env = "musl")]
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type off_t = u64;
#[cfg(not(target_env = "musl"))]
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type off_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type time_t = i64;
#[repr(C)]
#[derive(Clone)]
#[cfg(target_arch = "hexagon")]
mod arch {
- use crate::os::raw::{c_long, c_int, c_longlong, culonglong};
+ use crate::os::raw::{c_int, c_long, c_longlong, culonglong};
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = c_longlong;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = c_long;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = c_ulonglong;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = c_uint;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = c_longlong;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blkcnt_t = c_longlong;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blksize_t = c_long;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type ino_t = c_ulonglong;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type nlink_t = c_uint;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type off_t = c_longlong;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type time_t = c_long;
#[repr(C)]
#[derive(Clone)]
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime_nsec: ::c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
- pub __pad3: [::c_int;2],
+ pub __pad3: [::c_int; 2],
}
}
-#[cfg(any(target_arch = "mips64",
- target_arch = "s390x",
- target_arch = "sparc64"))]
+#[cfg(any(target_arch = "mips64", target_arch = "s390x", target_arch = "sparc64"))]
mod arch {
- pub use libc::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
+ pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
}
#[cfg(target_arch = "aarch64")]
mod arch {
- use crate::os::raw::{c_long, c_int};
+ use crate::os::raw::{c_int, c_long};
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blkcnt_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blksize_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type ino_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type nlink_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type off_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type time_t = i64;
#[repr(C)]
#[derive(Clone)]
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))]
mod arch {
- use crate::os::raw::{c_long, c_int};
+ use crate::os::raw::{c_int, c_long};
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
- #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blkcnt_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type blksize_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type ino_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type nlink_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type off_t = u64;
+ #[stable(feature = "raw_ext", since = "1.1.0")]
+ pub type time_t = i64;
#[repr(C)]
#[derive(Clone)]
#![stable(feature = "raw_os", since = "1.1.0")]
#[doc(include = "char.md")]
-#[cfg(any(all(target_os = "linux", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "hexagon",
- target_arch = "powerpc",
- target_arch = "powerpc64",
- target_arch = "s390x")),
- all(target_os = "android", any(target_arch = "aarch64",
- target_arch = "arm")),
- all(target_os = "l4re", target_arch = "x86_64"),
- all(target_os = "freebsd", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "powerpc",
- target_arch = "powerpc64")),
- all(target_os = "netbsd", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "powerpc")),
- all(target_os = "openbsd", target_arch = "aarch64"),
- all(target_os = "vxworks", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "powerpc64",
- target_arch = "powerpc")),
- all(target_os = "fuchsia", target_arch = "aarch64")))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8;
+#[cfg(any(
+ all(
+ target_os = "linux",
+ any(
+ target_arch = "aarch64",
+ target_arch = "arm",
+ target_arch = "hexagon",
+ target_arch = "powerpc",
+ target_arch = "powerpc64",
+ target_arch = "s390x"
+ )
+ ),
+ all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
+ all(target_os = "l4re", target_arch = "x86_64"),
+ all(
+ target_os = "freebsd",
+ any(
+ target_arch = "aarch64",
+ target_arch = "arm",
+ target_arch = "powerpc",
+ target_arch = "powerpc64"
+ )
+ ),
+ all(
+ target_os = "netbsd",
+ any(target_arch = "aarch64", target_arch = "arm", target_arch = "powerpc")
+ ),
+ all(target_os = "openbsd", target_arch = "aarch64"),
+ all(
+ target_os = "vxworks",
+ any(
+ target_arch = "aarch64",
+ target_arch = "arm",
+ target_arch = "powerpc64",
+ target_arch = "powerpc"
+ )
+ ),
+ all(target_os = "fuchsia", target_arch = "aarch64")
+))]
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_char = u8;
#[doc(include = "char.md")]
-#[cfg(not(any(all(target_os = "linux", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "hexagon",
- target_arch = "powerpc",
- target_arch = "powerpc64",
- target_arch = "s390x")),
- all(target_os = "android", any(target_arch = "aarch64",
- target_arch = "arm")),
- all(target_os = "l4re", target_arch = "x86_64"),
- all(target_os = "freebsd", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "powerpc",
- target_arch = "powerpc64")),
- all(target_os = "netbsd", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "powerpc")),
- all(target_os = "openbsd", target_arch = "aarch64"),
- all(target_os = "vxworks", any(target_arch = "aarch64",
- target_arch = "arm",
- target_arch = "powerpc64",
- target_arch = "powerpc")),
- all(target_os = "fuchsia", target_arch = "aarch64"))))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = i8;
+#[cfg(not(any(
+ all(
+ target_os = "linux",
+ any(
+ target_arch = "aarch64",
+ target_arch = "arm",
+ target_arch = "hexagon",
+ target_arch = "powerpc",
+ target_arch = "powerpc64",
+ target_arch = "s390x"
+ )
+ ),
+ all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
+ all(target_os = "l4re", target_arch = "x86_64"),
+ all(
+ target_os = "freebsd",
+ any(
+ target_arch = "aarch64",
+ target_arch = "arm",
+ target_arch = "powerpc",
+ target_arch = "powerpc64"
+ )
+ ),
+ all(
+ target_os = "netbsd",
+ any(target_arch = "aarch64", target_arch = "arm", target_arch = "powerpc")
+ ),
+ all(target_os = "openbsd", target_arch = "aarch64"),
+ all(
+ target_os = "vxworks",
+ any(
+ target_arch = "aarch64",
+ target_arch = "arm",
+ target_arch = "powerpc64",
+ target_arch = "powerpc"
+ )
+ ),
+ all(target_os = "fuchsia", target_arch = "aarch64")
+)))]
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_char = i8;
#[doc(include = "schar.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_schar = i8;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_schar = i8;
#[doc(include = "uchar.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_uchar = u8;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_uchar = u8;
#[doc(include = "short.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_short = i16;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_short = i16;
#[doc(include = "ushort.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ushort = u16;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ushort = u16;
#[doc(include = "int.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_int = i32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_int = i32;
#[doc(include = "uint.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_uint = u32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_uint = u32;
#[doc(include = "long.md")]
#[cfg(any(target_pointer_width = "32", windows))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_long = i32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_long = i32;
#[doc(include = "ulong.md")]
#[cfg(any(target_pointer_width = "32", windows))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ulong = u32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ulong = u32;
#[doc(include = "long.md")]
#[cfg(all(target_pointer_width = "64", not(windows)))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_long = i64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_long = i64;
#[doc(include = "ulong.md")]
#[cfg(all(target_pointer_width = "64", not(windows)))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ulong = u64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ulong = u64;
#[doc(include = "longlong.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_longlong = i64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_longlong = i64;
#[doc(include = "ulonglong.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ulonglong = u64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ulonglong = u64;
#[doc(include = "float.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_float = f32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_float = f32;
#[doc(include = "double.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_double = f64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_double = f64;
#[stable(feature = "raw_os", since = "1.1.0")]
#[doc(no_inline)]