summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/mm/types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/libc/mm/types.rs')
-rw-r--r--vendor/rustix/src/backend/libc/mm/types.rs114
1 files changed, 26 insertions, 88 deletions
diff --git a/vendor/rustix/src/backend/libc/mm/types.rs b/vendor/rustix/src/backend/libc/mm/types.rs
index 11ab708cf..cd6e521d2 100644
--- a/vendor/rustix/src/backend/libc/mm/types.rs
+++ b/vendor/rustix/src/backend/libc/mm/types.rs
@@ -51,165 +51,109 @@ bitflags! {
const SHARED = c::MAP_SHARED;
/// `MAP_SHARED_VALIDATE`
#[cfg(not(any(
+ bsd,
+ solarish,
target_os = "android",
- target_os = "dragonfly",
target_os = "emscripten",
- target_os = "freebsd",
target_os = "fuchsia",
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const SHARED_VALIDATE = c::MAP_SHARED_VALIDATE;
/// `MAP_PRIVATE`
const PRIVATE = c::MAP_PRIVATE;
/// `MAP_DENYWRITE`
#[cfg(not(any(
- target_os = "dragonfly",
- target_os = "freebsd",
+ bsd,
+ solarish,
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const DENYWRITE = c::MAP_DENYWRITE;
/// `MAP_FIXED`
const FIXED = c::MAP_FIXED;
/// `MAP_FIXED_NOREPLACE`
#[cfg(not(any(
+ bsd,
+ solarish,
target_os = "android",
- target_os = "dragonfly",
target_os = "emscripten",
- target_os = "freebsd",
target_os = "fuchsia",
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const FIXED_NOREPLACE = c::MAP_FIXED_NOREPLACE;
/// `MAP_GROWSDOWN`
#[cfg(not(any(
- target_os = "dragonfly",
- target_os = "freebsd",
+ bsd,
+ solarish,
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const GROWSDOWN = c::MAP_GROWSDOWN;
/// `MAP_HUGETLB`
#[cfg(not(any(
- target_os = "dragonfly",
- target_os = "freebsd",
+ bsd,
+ solarish,
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const HUGETLB = c::MAP_HUGETLB;
/// `MAP_HUGE_2MB`
#[cfg(not(any(
+ bsd,
+ solarish,
target_os = "android",
- target_os = "dragonfly",
target_os = "emscripten",
- target_os = "freebsd",
target_os = "fuchsia",
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const HUGE_2MB = c::MAP_HUGE_2MB;
/// `MAP_HUGE_1GB`
#[cfg(not(any(
+ bsd,
+ solarish,
target_os = "android",
- target_os = "dragonfly",
target_os = "emscripten",
- target_os = "freebsd",
target_os = "fuchsia",
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const HUGE_1GB = c::MAP_HUGE_1GB;
/// `MAP_LOCKED`
#[cfg(not(any(
- target_os = "dragonfly",
- target_os = "freebsd",
+ bsd,
+ solarish,
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const LOCKED = c::MAP_LOCKED;
/// `MAP_NOCORE`
- #[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
+ #[cfg(freebsdlike)]
const NOCORE = c::MAP_NOCORE;
/// `MAP_NORESERVE`
- #[cfg(not(any(target_os = "dragonfly", target_os = "freebsd", target_os = "redox")))]
+ #[cfg(not(any(freebsdlike, target_os = "redox")))]
const NORESERVE = c::MAP_NORESERVE;
/// `MAP_NOSYNC`
- #[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
+ #[cfg(freebsdlike)]
const NOSYNC = c::MAP_NOSYNC;
/// `MAP_POPULATE`
#[cfg(not(any(
- target_os = "dragonfly",
- target_os = "freebsd",
+ bsd,
+ solarish,
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const POPULATE = c::MAP_POPULATE;
/// `MAP_STACK`
#[cfg(not(any(
+ apple,
+ solarish,
target_os = "dragonfly",
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
target_os = "netbsd",
target_os = "redox",
- target_os = "solaris",
)))]
const STACK = c::MAP_STACK;
/// `MAP_PREFAULT_READ`
@@ -217,19 +161,13 @@ bitflags! {
const PREFAULT_READ = c::MAP_PREFAULT_READ;
/// `MAP_SYNC`
#[cfg(not(any(
+ bsd,
+ solarish,
target_os = "android",
- target_os = "dragonfly",
target_os = "emscripten",
- target_os = "freebsd",
target_os = "fuchsia",
target_os = "haiku",
- target_os = "illumos",
- target_os = "ios",
- target_os = "macos",
- target_os = "netbsd",
- target_os = "openbsd",
target_os = "redox",
- target_os = "solaris",
all(
any(target_os = "android", target_os = "linux"),
any(target_arch = "mips", target_arch = "mips64"),
@@ -242,7 +180,7 @@ bitflags! {
}
}
-#[cfg(target_os = "linux")]
+#[cfg(any(target_os = "emscripten", target_os = "linux"))]
bitflags! {
/// `MREMAP_*` flags for use with [`mremap`].
///