Sorry, the diff of this file is not supported yet
| { | ||
| "git": { | ||
| "sha1": "dad00cb00e92baa7e28a542eb94bc2a78762f583" | ||
| "sha1": "575fa43c3a2c8217654e7f94c82e16c9ad05473a" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
+46
-0
| [workspace] | ||
| git_release_name = "{{ version }}" | ||
| git_tag_name = "{{ version }}" | ||
| [changelog] | ||
| body = """ | ||
| ## [{{ version | trim_start_matches(pat="v") }}]\ | ||
| {%- if release_link -%}\ | ||
| ({{ release_link }})\ | ||
| {% endif %} \ | ||
| - {{ timestamp | date(format="%Y-%m-%d") }} | ||
| {% for group, commits in commits | group_by(attribute="group") %} | ||
| ### {{ group | upper_first }} | ||
| {% for commit in commits %} | ||
| - {% if commit.scope -%}{{ commit.scope | upper_first }}: {% endif %} | ||
| {%- if commit.breaking %}[**breaking**] {% endif %} | ||
| {{- commit.message }} | ||
| {%- if commit.links %} ([{{ commit.links.1.text }}]({{ commit.links.1.href }})){% endif -%} | ||
| {% endfor %} | ||
| {% endfor %} | ||
| {%- if github -%} | ||
| {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} | ||
| ## New Contributors ❤️ | ||
| {% endif %}\ | ||
| {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} | ||
| * @{{ contributor.username }} made their first contribution | ||
| {%- if contributor.pr_number %} in \ | ||
| [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ | ||
| {%- endif %} | ||
| {%- endfor -%} | ||
| {%- endif %} | ||
| """ | ||
| commit_parsers = [ | ||
| { message = '(?i)^(\w+: )?feat', group = "added" }, | ||
| { message = '(?i)^(\w+: )?add', group = "added" }, | ||
| { message = '(?i)^(\w+: )?change', group = "changed" }, | ||
| { message = '(?i)^(\w+: )?cleanup', group = "cleanup" }, | ||
| { message = '(?i)^(\w+: )?deprecate', group = "deprecated" }, | ||
| { message = '(?i)^(\w+: )?remove', group = "removed" }, | ||
| { message = '(?i)^(\w+: )?fix', group = "fixed" }, | ||
| { message = '(?i)^(\w+: )?fix', group = "fixed" }, | ||
| { message = '^.*', group = "other" }, | ||
| ] | ||
| link_parsers = [ | ||
| # Extract backport patterns | ||
| { pattern = '\(backport <.*/(\d+)>\)', text = "#$1", href = "https://github.com/rust-lang/libc/pulls/$1"} | ||
| ] |
+10
-119
@@ -1,4 +0,3 @@ | ||
| use std::env; | ||
| use std::process::{Command, Output}; | ||
| use std::str; | ||
| use std::{env, str}; | ||
@@ -17,18 +16,4 @@ // List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we | ||
| "freebsd15", | ||
| "libc_align", | ||
| "libc_cfg_target_vendor", | ||
| "libc_const_extern_fn", | ||
| "libc_const_extern_fn_unstable", | ||
| "libc_const_size_of", | ||
| "libc_core_cvoid", | ||
| "libc_deny_warnings", | ||
| "libc_int128", | ||
| "libc_long_array", | ||
| "libc_non_exhaustive", | ||
| "libc_packedN", | ||
| "libc_priv_mod_use", | ||
| "libc_ptr_addr_of", | ||
| "libc_thread_local", | ||
| "libc_underscore_const_names", | ||
| "libc_union", | ||
| "libc_ctest", | ||
@@ -56,16 +41,7 @@ ]; | ||
| let (rustc_minor_ver, is_nightly) = rustc_minor_nightly(); | ||
| let (rustc_minor_ver, _is_nightly) = rustc_minor_nightly(); | ||
| let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok(); | ||
| let align_cargo_feature = env::var("CARGO_FEATURE_ALIGN").is_ok(); | ||
| let const_extern_fn_cargo_feature = env::var("CARGO_FEATURE_CONST_EXTERN_FN").is_ok(); | ||
| let libc_ci = env::var("LIBC_CI").is_ok(); | ||
| let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80; | ||
| if env::var("CARGO_FEATURE_USE_STD").is_ok() { | ||
| println!( | ||
| "cargo:warning=\"libc's use_std cargo feature is deprecated since libc 0.2.55; \ | ||
| please consider using the `std` cargo feature instead\"" | ||
| ); | ||
| } | ||
| // The ABI of libc used by std is backward compatible with FreeBSD 12. | ||
@@ -104,59 +80,2 @@ // The ABI of libc from crates.io is backward compatible with FreeBSD 11. | ||
| // Rust >= 1.15 supports private module use: | ||
| if rustc_minor_ver >= 15 || rustc_dep_of_std { | ||
| set_cfg("libc_priv_mod_use"); | ||
| } | ||
| // Rust >= 1.19 supports unions: | ||
| if rustc_minor_ver >= 19 || rustc_dep_of_std { | ||
| set_cfg("libc_union"); | ||
| } | ||
| // Rust >= 1.24 supports const mem::size_of: | ||
| if rustc_minor_ver >= 24 || rustc_dep_of_std { | ||
| set_cfg("libc_const_size_of"); | ||
| } | ||
| // Rust >= 1.25 supports repr(align): | ||
| if rustc_minor_ver >= 25 || rustc_dep_of_std || align_cargo_feature { | ||
| set_cfg("libc_align"); | ||
| } | ||
| // Rust >= 1.26 supports i128 and u128: | ||
| if rustc_minor_ver >= 26 || rustc_dep_of_std { | ||
| set_cfg("libc_int128"); | ||
| } | ||
| // Rust >= 1.30 supports `core::ffi::c_void`, so libc can just re-export it. | ||
| // Otherwise, it defines an incompatible type to retaining | ||
| // backwards-compatibility. | ||
| if rustc_minor_ver >= 30 || rustc_dep_of_std { | ||
| set_cfg("libc_core_cvoid"); | ||
| } | ||
| // Rust >= 1.33 supports repr(packed(N)) and cfg(target_vendor). | ||
| if rustc_minor_ver >= 33 || rustc_dep_of_std { | ||
| set_cfg("libc_packedN"); | ||
| set_cfg("libc_cfg_target_vendor"); | ||
| } | ||
| // Rust >= 1.40 supports #[non_exhaustive]. | ||
| if rustc_minor_ver >= 40 || rustc_dep_of_std { | ||
| set_cfg("libc_non_exhaustive"); | ||
| } | ||
| // Rust >= 1.47 supports long array: | ||
| if rustc_minor_ver >= 47 || rustc_dep_of_std { | ||
| set_cfg("libc_long_array"); | ||
| } | ||
| if rustc_minor_ver >= 51 || rustc_dep_of_std { | ||
| set_cfg("libc_ptr_addr_of"); | ||
| } | ||
| // Rust >= 1.37.0 allows underscores as anonymous constant names. | ||
| if rustc_minor_ver >= 37 || rustc_dep_of_std { | ||
| set_cfg("libc_underscore_const_names"); | ||
| } | ||
| // #[thread_local] is currently unstable | ||
@@ -167,16 +86,2 @@ if rustc_dep_of_std { | ||
| // Rust >= 1.62.0 allows to use `const_extern_fn` for "Rust" and "C". | ||
| if rustc_minor_ver >= 62 { | ||
| set_cfg("libc_const_extern_fn"); | ||
| } else { | ||
| // Rust < 1.62.0 requires a crate feature and feature gate. | ||
| if const_extern_fn_cargo_feature { | ||
| if !is_nightly || rustc_minor_ver < 40 { | ||
| panic!("const-extern-fn requires a nightly compiler >= 1.40"); | ||
| } | ||
| set_cfg("libc_const_extern_fn_unstable"); | ||
| set_cfg("libc_const_extern_fn"); | ||
| } | ||
| } | ||
| // check-cfg is a nightly cargo/rustc feature to warn when unknown cfgs are used across the | ||
@@ -227,3 +132,3 @@ // codebase. libc can configure it if the appropriate environment variable is passed. Since | ||
| let output = cmd.output().ok().expect("Failed to get rustc version"); | ||
| let output = cmd.output().expect("Failed to get rustc version"); | ||
@@ -283,7 +188,5 @@ if !output.status.success() { | ||
| fn which_freebsd() -> Option<i32> { | ||
| let output = std::process::Command::new("freebsd-version").output().ok(); | ||
| if output.is_none() { | ||
| return None; | ||
| } | ||
| let output = output.unwrap(); | ||
| let output = std::process::Command::new("freebsd-version") | ||
| .output() | ||
| .ok()?; | ||
| if !output.status.success() { | ||
@@ -293,7 +196,3 @@ return None; | ||
| let stdout = String::from_utf8(output.stdout).ok(); | ||
| if stdout.is_none() { | ||
| return None; | ||
| } | ||
| let stdout = stdout.unwrap(); | ||
| let stdout = String::from_utf8(output.stdout).ok()?; | ||
@@ -315,7 +214,3 @@ match &stdout { | ||
| .output() | ||
| .ok(); | ||
| if output.is_none() { | ||
| return None; | ||
| } | ||
| let output = output.unwrap(); | ||
| .ok()?; | ||
| if !output.status.success() { | ||
@@ -325,11 +220,7 @@ return None; | ||
| let stdout = String::from_utf8(output.stdout).ok(); | ||
| if stdout.is_none() { | ||
| return None; | ||
| } | ||
| let version = stdout.unwrap(); | ||
| let version = String::from_utf8(output.stdout).ok()?; | ||
| // Some Emscripten versions come with `-git` attached, so split the | ||
| // version string also on the `-` char. | ||
| let mut pieces = version.trim().split(|c| c == '.' || c == '-'); | ||
| let mut pieces = version.trim().split(['.', '-']); | ||
@@ -336,0 +227,0 @@ let major = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0); |
+7
-6
@@ -13,5 +13,6 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| [package] | ||
| edition = "2015" | ||
| rust-version = "1.63" | ||
| name = "libc" | ||
| version = "0.2.164" | ||
| version = "0.2.165" | ||
| authors = ["The Rust Project Developers"] | ||
@@ -53,6 +54,3 @@ build = "build.rs" | ||
| default-target = "x86_64-unknown-linux-gnu" | ||
| features = [ | ||
| "const-extern-fn", | ||
| "extra_traits", | ||
| ] | ||
| features = ["extra_traits"] | ||
| targets = [ | ||
@@ -183,3 +181,6 @@ "aarch64-apple-darwin", | ||
| const-extern-fn = [] | ||
| default = ["std"] | ||
| default = [ | ||
| "const-extern-fn", | ||
| "std", | ||
| ] | ||
| extra_traits = [] | ||
@@ -186,0 +187,0 @@ rustc-dep-of-std = [ |
+111
-0
| # Changelog | ||
| ## [Unreleased] | ||
| ## [0.2.165](https://github.com/rust-lang/libc/compare/0.2.164...0.2.165) - 2024-11-25 | ||
| ### Added | ||
| - Android: add `mkostemp`, `mkostemps` <https://github.com/rust-lang/libc/pull/3601> | ||
| - Android: add a few API 30 calls <https://github.com/rust-lang/libc/pull/3604> | ||
| - Android: add missing syscall constants <https://github.com/rust-lang/libc/pull/3558> | ||
| - Apple: add `in6_ifreq` <https://github.com/rust-lang/libc/pull/3617> | ||
| - Apple: add missing `sysctl` net types <https://github.com/rust-lang/libc/pull/4022> (before release: remove `if_family_id` ([#4137](https://github.com/rust-lang/libc/pulls/4137))) | ||
| - Freebsd: add `kcmp` call support <https://github.com/rust-lang/libc/pull/3746> | ||
| - Hurd: add `MAP_32BIT` and `MAP_EXCL` <https://github.com/rust-lang/libc/pull/4127> | ||
| - Hurd: add `domainname` field to `utsname` ([#4089](https://github.com/rust-lang/libc/pulls/4089)) | ||
| - Linux GNU: add `f_flags` to struct `statfs` for arm, mips, powerpc and x86 <https://github.com/rust-lang/libc/pull/3663> | ||
| - Linux GNU: add `malloc_stats` <https://github.com/rust-lang/libc/pull/3596> | ||
| - Linux: add ELF relocation-related structs <https://github.com/rust-lang/libc/pull/3583> | ||
| - Linux: add `ptp_*` structs <https://github.com/rust-lang/libc/pull/4113> | ||
| - Linux: add `ptp_clock_caps` <https://github.com/rust-lang/libc/pull/4128> | ||
| - Linux: add `ptp_pin_function` and most `PTP_` constants <https://github.com/rust-lang/libc/pull/4114> | ||
| - Linux: add missing AF_XDP structs & constants <https://github.com/rust-lang/libc/pull/3956> | ||
| - Linux: add missing netfilter consts ([#3734](https://github.com/rust-lang/libc/pulls/3734)) | ||
| - Linux: add struct and constants for the `mount_setattr` syscall <https://github.com/rust-lang/libc/pull/4046> | ||
| - Linux: add wireless API <https://github.com/rust-lang/libc/pull/3441> | ||
| - Linux: expose the `len8_dlc` field of `can_frame` <https://github.com/rust-lang/libc/pull/3357> | ||
| - Musl: add `utmpx` API <https://github.com/rust-lang/libc/pull/3213> | ||
| - Musl: add missing syscall constants <https://github.com/rust-lang/libc/pull/4028> | ||
| - NetBSD: add `mcontext`-related data for RISCV64 <https://github.com/rust-lang/libc/pull/3468> | ||
| - Redox: add new `netinet` constants <https://github.com/rust-lang/libc/pull/3586>) | ||
| - Solarish: add `_POSIX_VDISABLE` ([#4103](https://github.com/rust-lang/libc/pulls/4103)) | ||
| - Tests: Add a test that the `const extern fn` macro works <https://github.com/rust-lang/libc/pull/4134> | ||
| - Tests: Add test of primitive types against `std` <https://github.com/rust-lang/libc/pull/3616> | ||
| - Unix: Add `htonl`, `htons`, `ntohl`, `ntohs` <https://github.com/rust-lang/libc/pull/3669> | ||
| - Unix: add `aligned_alloc` <https://github.com/rust-lang/libc/pull/3843> | ||
| - Windows: add `aligned_realloc` <https://github.com/rust-lang/libc/pull/3592> | ||
| ### Fixed | ||
| - **breaking** Hurd: fix `MAP_HASSEMAPHORE` name ([#4127](https://github.com/rust-lang/libc/pulls/4127)) | ||
| - **breaking** ulibc Mips: fix `SA_*` mismatched types ([#3211](https://github.com/rust-lang/libc/pulls/3211)) | ||
| - Aix: fix an enum FFI safety warning <https://github.com/rust-lang/libc/pull/3644> | ||
| - Haiku: fix some typos ([#3664](https://github.com/rust-lang/libc/pulls/3664)) | ||
| - Tests: fix `Elf{32,64}_Relr`-related tests <https://github.com/rust-lang/libc/pull/3647> | ||
| - Tests: fix libc-tests for `loongarch64-linux-musl` | ||
| - Tests: fix some clippy warnings <https://github.com/rust-lang/libc/pull/3855> | ||
| - Tests: fix tests on `riscv64gc-unknown-freebsd` <https://github.com/rust-lang/libc/pull/4129> | ||
| ### Deprecated | ||
| - Apple: deprecate `iconv_open` <https://github.com/rust-lang/libc/commit/25e022a22eca3634166ef472b748c297e60fcf7f> | ||
| - Apple: deprecate `mach_task_self` <https://github.com/rust-lang/libc/pull/4095> | ||
| - Apple: update `mach` deprecation notices for things that were removed in `main` <https://github.com/rust-lang/libc/pull/4097> | ||
| ### Cleanup | ||
| - Adjust the `f!` macro to be more flexible <https://github.com/rust-lang/libc/pull/4107> | ||
| - Aix: remove duplicate constants <https://github.com/rust-lang/libc/pull/3643> | ||
| - CI: make scripts more uniform <https://github.com/rust-lang/libc/pull/4042> | ||
| - Drop the `libc_align` conditional <https://github.com/rust-lang/libc/commit/b5b553d0ee7de0d4781432a9a9a0a6445dd7f34f> | ||
| - Drop the `libc_cfg_target_vendor` conditional <https://github.com/rust-lang/libc/pull/4060> | ||
| - Drop the `libc_const_size_of` conditional <https://github.com/rust-lang/libc/commit/5a43dd2754366f99b3a83881b30246ce0e51833c> | ||
| - Drop the `libc_core_cvoid` conditional <https://github.com/rust-lang/libc/pull/4060> | ||
| - Drop the `libc_int128` conditional <https://github.com/rust-lang/libc/pull/4060> | ||
| - Drop the `libc_non_exhaustive` conditional <https://github.com/rust-lang/libc/pull/4060> | ||
| - Drop the `libc_packedN` conditional <https://github.com/rust-lang/libc/pull/4060> | ||
| - Drop the `libc_priv_mod_use` conditional <https://github.com/rust-lang/libc/commit/19c59376d11b015009fb9b04f233a30a1bf50a91> | ||
| - Drop the `libc_union` conditional <https://github.com/rust-lang/libc/commit/b9e4d8012f612dfe24147da3e69522763f92b6e3> | ||
| - Drop the `long_array` conditional <https://github.com/rust-lang/libc/pull/4096> | ||
| - Drop the `ptr_addr_of` conditional <https://github.com/rust-lang/libc/pull/4065> | ||
| - Drop warnings about deprecated cargo features <https://github.com/rust-lang/libc/pull/4060> | ||
| - Eliminate uses of `struct_formatter` <https://github.com/rust-lang/libc/pull/4074> | ||
| - Fix a few other array size hacks <https://github.com/rust-lang/libc/commit/d63be8b69b0736753213f5d933767866a5801ee7> | ||
| - Glibc: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) | ||
| - Musl: remove redundant definitions ([#3261](https://github.com/rust-lang/libc/pulls/3261)) | ||
| - Musl: unify definitions of `siginfo_t` ([#3261](https://github.com/rust-lang/libc/pulls/3261)) | ||
| - Musl: unify definitions of statfs and statfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) | ||
| - Musl: unify definitions of statvfs and statvfs64 ([#3261](https://github.com/rust-lang/libc/pulls/3261)) | ||
| - Musl: unify statx definitions ([#3978](https://github.com/rust-lang/libc/pulls/3978)) | ||
| - Remove array size hacks for Rust < 1.47 <https://github.com/rust-lang/libc/commit/27ee6fe02ca0848b2af3cd747536264e4c7b697d> | ||
| - Remove repetitive words <https://github.com/rust-lang/libc/commit/77de375891285e18a81616f7dceda6d52732eed6> | ||
| - Use #[derive] for Copy/Clone in s! and friends <https://github.com/rust-lang/libc/pull/4038> | ||
| - Use some tricks to format macro bodies <https://github.com/rust-lang/libc/pull/4107> | ||
| ### Other | ||
| - Apply formatting to macro bodies <https://github.com/rust-lang/libc/pull/4107> | ||
| - Bump libc-test to Rust 2021 Edition <https://github.com/rust-lang/libc/pull/3905> | ||
| - CI: Add a check that semver files don't contain duplicate entries <https://github.com/rust-lang/libc/pull/4087> | ||
| - CI: Add `fanotify_event_info_fid` to FAM-exempt types <https://github.com/rust-lang/libc/pull/4038> | ||
| - CI: Allow rustfmt to organize imports ([#4136](https://github.com/rust-lang/libc/pulls/4136)) | ||
| - CI: Always run rustfmt <https://github.com/rust-lang/libc/pull/4120> | ||
| - CI: Change 32-bit Docker images to use EOL repos <https://github.com/rust-lang/libc/pull/4120> | ||
| - CI: Change 64-bit Docker images to ubuntu:24.10 <https://github.com/rust-lang/libc/pull/4120> | ||
| - CI: Disable the check for >1 s! invocation <https://github.com/rust-lang/libc/pull/4107> | ||
| - CI: Ensure build channels get run even if FILTER is unset <https://github.com/rust-lang/libc/pull/4125> | ||
| - CI: Ensure there is a fallback for no_std <https://github.com/rust-lang/libc/pull/4125> | ||
| - CI: Fix cases where unset variables cause errors <https://github.com/rust-lang/libc/pull/4108> | ||
| - CI: Naming adjustments and cleanup <https://github.com/rust-lang/libc/pull/4124> | ||
| - CI: Only invoke rustup if running in CI <https://github.com/rust-lang/libc/pull/4107> | ||
| - CI: Remove the logic to handle old rust versions <https://github.com/rust-lang/libc/pull/4068> | ||
| - CI: Set -u (error on unset) in all script files <https://github.com/rust-lang/libc/pull/4108> | ||
| - CI: add support for `loongarch64-unknown-linux-musl` <https://github.com/rust-lang/libc/pull/4092> | ||
| - CI: make `aarch64-apple-darwin` not a nightly-only target <https://github.com/rust-lang/libc/pull/4068> | ||
| - CI: run shellcheck on all scripts <https://github.com/rust-lang/libc/pull/4042> | ||
| - CI: update musl headers to Linux 6.6 <https://github.com/rust-lang/libc/pull/3921> | ||
| - CI: use qemu-sparc64 to run sparc64 tests <https://github.com/rust-lang/libc/pull/4133> | ||
| - Drop the `libc_const_extern_fn` conditional <https://github.com/rust-lang/libc/commit/674cc1f47f605038ef1aa2cce8e8bc9dac128276> | ||
| - Drop the `libc_underscore_const_names` conditional <https://github.com/rust-lang/libc/commit/f0febd5e2e50b38e05259d3afad3c9783711bcf0> | ||
| - Explicitly set the edition to 2015 <https://github.com/rust-lang/libc/pull/4058> | ||
| - Introduce a `git-blame-ignore-revs` file <https://github.com/rust-lang/libc/pull/4107> | ||
| - Tests: Ignore fields as required on Ubuntu 24.10 <https://github.com/rust-lang/libc/pull/4120> | ||
| - Tests: skip `ATF_*` constants for OpenBSD <https://github.com/rust-lang/libc/pull/4088> | ||
| - Triagebot: Add an autolabel for CI <https://github.com/rust-lang/libc/pull/4052> | ||
| ## [0.2.164](https://github.com/rust-lang/libc/compare/0.2.163...0.2.164) - 2024-11-16 | ||
@@ -6,0 +117,0 @@ |
+39
-9
@@ -6,9 +6,40 @@ # Contributing to `libc` | ||
| ## v0.2 changes | ||
| ## v1.0 Roadmap | ||
| If you want to add your changes to v0.2, please submit them to the `libc-0.2` | ||
| branch. If you want to add any breaking changes, it should be submitted to the | ||
| main branch, which has changes for v0.3. We will support and make a new release | ||
| for v0.2 until we make the first release of v0.3. | ||
| `libc` has two active branches: `main` and `libc-0.2`. `main` is for active | ||
| development of the upcoming v1.0 release, and should be the target of all pull | ||
| requests. `libc-0.2` is for updates to the currently released version. | ||
| If a pull request to `main` is a good candidate for inclusion in an `0.2.x` | ||
| release, include `@rustbot label stable-nominated` in a comment to propose this. | ||
| Good candidates will usually meet the following: | ||
| 1. The included changes are non-breaking. | ||
| 2. The change applies cleanly to both branches. | ||
| 3. There is a usecase that justifies inclusion in a stable release (all | ||
| additions should always have a usecase, hopefully). | ||
| Once a `stable-nominated` PR targeting `main` has merged, it can be cherry | ||
| picked to the `libc-0.2` branch. A maintainer will likely do these cherry picks | ||
| in a batch. | ||
| Alternatively, you can start this process yourself by creating a new branch | ||
| based on `libc-0.2` and running `git cherry-pick -xe commit-sha-on-main` | ||
| (`git | ||
| cherry-pick -xe start-sha^..end-sha` if a range of commits is needed). | ||
| `git` will automatically add the "cherry picked from commit" note, but try to | ||
| add a backport note so the original PR gets crosslinked: | ||
| ``` | ||
| # ... original commit message ... | ||
| (backport <https://github.com/rust-lang/libc/pull/1234>) # add manually | ||
| (cherry picked from commit 104b6a4ae31c726814c36318dc718470cc96e167) # added by git | ||
| ``` | ||
| Once the cherry-pick is complete, open a PR targeting `libc-0.2`. | ||
| See the [tracking issue](https://github.com/rust-lang/libc/issues/3248) for | ||
| details. | ||
| ## Adding an API | ||
@@ -55,3 +86,3 @@ | ||
| <sup>1</sup>: Note that this list has nothing to do with any Unix or Posix | ||
| standard, it's just a list shared between all OSs that declare `#[cfg(unix)]`. | ||
| standard, it's just a list shared among all OSs that declare `#[cfg(unix)]`. | ||
@@ -67,3 +98,3 @@ ## Test before you commit | ||
| 2. Style checker | ||
| - [`sh ci/style.sh`](https://github.com/rust-lang/libc/blob/main/ci/style.sh) | ||
| - [`./ci/style.sh`](https://github.com/rust-lang/libc/blob/main/ci/style.sh) | ||
@@ -85,3 +116,2 @@ ## Breaking change policy | ||
| it. If you're using it, please comment on #XXX"). | ||
| 2. If we don't see any concerns for a while, do the change actually. | ||
@@ -92,3 +122,3 @@ | ||
| When Rust removes a support for a target, the libc crate also may remove the | ||
| support anytime. | ||
| support at any time. | ||
@@ -95,0 +125,0 @@ ## Releasing your change to crates.io |
+13
-10
@@ -23,10 +23,12 @@ # libc - Raw FFI bindings to platforms' system libraries | ||
| ## v0.3 Roadmap | ||
| ## v1.0 Roadmap | ||
| The main branch is now for v0.3 which has some breaking changes. | ||
| Currently, `libc` has two active branches: `main` for the upcoming v1.0 release, | ||
| and `libc-0.2` for the currently published version. By default all pull requests | ||
| should target `main`; once reviewed, they can be cherry picked to the `libc-0.2` | ||
| branch if needed. | ||
| For v0.2, please submit PRs to the `libc-0.2` branch instead. We will stop | ||
| making new v0.2 releases once we release v0.3 on crates.io. | ||
| We will stop making new v0.2 releases once v1.0 is released. | ||
| See the [tracking issue](https://github.com/rust-lang/libc/issues/3248) for | ||
| See the section in [CONTRIBUTING.md](CONTRIBUTING.md#v10-roadmap) for more | ||
| details. | ||
@@ -51,7 +53,7 @@ | ||
| * `const-extern-fn`: Changes some `extern fn`s into `const extern fn`s. If you | ||
| use Rust >= 1.62, this feature is implicitly enabled. Otherwise it requires a | ||
| nightly rustc. | ||
| The following features are deprecated: | ||
| * **deprecated**: `use_std` is deprecated, and is equivalent to `std`. | ||
| * `use_std`: this is equivalent to `std` | ||
| * `const-extern-fn`: this is now enabled by default | ||
| * `align`: this is now enabled by default | ||
@@ -63,3 +65,4 @@ ## Rust version support | ||
| Increases to the MSRV are allowed to change without a major (i.e. semver- | ||
| breaking) release in order to avoid a ripple effect in the ecosystem. | ||
| breaking) release in order to avoid a ripple effect in the ecosystem. A policy | ||
| for when this may change is a work in progress. | ||
@@ -66,0 +69,0 @@ `libc` may continue to compile with Rust versions older than the current MSRV |
+3
-0
@@ -0,1 +1,4 @@ | ||
| edition = "2021" | ||
| error_on_line_overflow = true | ||
| group_imports = "StdExternalCrate" | ||
| imports_granularity = "Module" |
+31
-33
@@ -23,3 +23,3 @@ //! This module contains type aliases for C's fixed-width integer types . | ||
| cfg_if! { | ||
| if #[cfg(all(libc_int128, target_arch = "aarch64", not(target_os = "windows")))] { | ||
| if #[cfg(all(target_arch = "aarch64", not(target_os = "windows")))] { | ||
| // This introduces partial support for FFI with __int128 and | ||
@@ -63,39 +63,37 @@ // equivalent types on platforms where Rust's definition is validated | ||
| cfg_if! { | ||
| if #[cfg(libc_underscore_const_names)] { | ||
| macro_rules! static_assert_eq { | ||
| ($a:expr, $b:expr) => { | ||
| const _: [(); $a] = [(); $b]; | ||
| }; | ||
| } | ||
| // NOTE: if you add more platforms to here, you may need to cfg | ||
| // these consts. They should always match the platform's values | ||
| // for `sizeof(__int128)` and `_Alignof(__int128)`. | ||
| const _SIZE_128: usize = 16; | ||
| const _ALIGN_128: usize = 16; | ||
| // NOTE: if you add more platforms to here, you may need to cfg | ||
| // these consts. They should always match the platform's values | ||
| // for `sizeof(__int128)` and `_Alignof(__int128)`. | ||
| const _SIZE_128: usize = 16; | ||
| const _ALIGN_128: usize = 16; | ||
| // FIXME(ctest): ctest doesn't handle `_` as an identifier so these tests are temporarily | ||
| // disabled. | ||
| // macro_rules! static_assert_eq { | ||
| // ($a:expr, $b:expr) => { | ||
| // const _: [(); $a] = [(); $b]; | ||
| // }; | ||
| // } | ||
| // | ||
| // // Since Rust doesn't officially guarantee that these types | ||
| // // have compatible ABIs, we const assert that these values have the | ||
| // // known size/align of the target platform's libc. If rustc ever | ||
| // // tries to regress things, it will cause a compilation error. | ||
| // // | ||
| // // This isn't a bullet-proof solution because e.g. it doesn't | ||
| // // catch the fact that llvm and gcc disagree on how x64 __int128 | ||
| // // is actually *passed* on the stack (clang underaligns it for | ||
| // // the same reason that rustc *never* properly aligns it). | ||
| // static_assert_eq!(core::mem::size_of::<__int128>(), _SIZE_128); | ||
| // static_assert_eq!(core::mem::align_of::<__int128>(), _ALIGN_128); | ||
| // Since Rust doesn't officially guarantee that these types | ||
| // have compatible ABIs, we const assert that these values have the | ||
| // known size/align of the target platform's libc. If rustc ever | ||
| // tries to regress things, it will cause a compilation error. | ||
| // | ||
| // This isn't a bullet-proof solution because e.g. it doesn't | ||
| // catch the fact that llvm and gcc disagree on how x64 __int128 | ||
| // is actually *passed* on the stack (clang underaligns it for | ||
| // the same reason that rustc *never* properly aligns it). | ||
| static_assert_eq!(core::mem::size_of::<__int128>(), _SIZE_128); | ||
| static_assert_eq!(core::mem::align_of::<__int128>(), _ALIGN_128); | ||
| // static_assert_eq!(core::mem::size_of::<__uint128>(), _SIZE_128); | ||
| // static_assert_eq!(core::mem::align_of::<__uint128>(), _ALIGN_128); | ||
| static_assert_eq!(core::mem::size_of::<__uint128>(), _SIZE_128); | ||
| static_assert_eq!(core::mem::align_of::<__uint128>(), _ALIGN_128); | ||
| // static_assert_eq!(core::mem::size_of::<__int128_t>(), _SIZE_128); | ||
| // static_assert_eq!(core::mem::align_of::<__int128_t>(), _ALIGN_128); | ||
| static_assert_eq!(core::mem::size_of::<__int128_t>(), _SIZE_128); | ||
| static_assert_eq!(core::mem::align_of::<__int128_t>(), _ALIGN_128); | ||
| static_assert_eq!(core::mem::size_of::<__uint128_t>(), _SIZE_128); | ||
| static_assert_eq!(core::mem::align_of::<__uint128_t>(), _ALIGN_128); | ||
| } | ||
| } | ||
| // static_assert_eq!(core::mem::size_of::<__uint128_t>(), _SIZE_128); | ||
| // static_assert_eq!(core::mem::align_of::<__uint128_t>(), _ALIGN_128); | ||
| } | ||
| } |
@@ -63,3 +63,3 @@ pub type c_char = i8; | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
@@ -89,6 +89,6 @@ } | ||
| && self | ||
| .__private | ||
| .iter() | ||
| .zip(other.__private.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__private | ||
| .iter() | ||
| .zip(other.__private.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -95,0 +95,0 @@ } |
+2
-2
| //! Hermit C type definitions | ||
| use c_void; | ||
| cfg_if! { | ||
@@ -579,3 +581,1 @@ if #[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))] { | ||
| } | ||
| pub use ffi::c_void; |
+20
-47
@@ -29,3 +29,2 @@ //! libc - Raw FFI bindings to platforms' system libraries | ||
| #![cfg_attr(feature = "rustc-dep-of-std", no_core)] | ||
| #![cfg_attr(libc_const_extern_fn_unstable, feature(const_extern_fn))] | ||
@@ -47,48 +46,22 @@ #[macro_use] | ||
| cfg_if! { | ||
| if #[cfg(libc_priv_mod_use)] { | ||
| #[cfg(libc_core_cvoid)] | ||
| #[allow(unused_imports)] | ||
| use core::ffi; | ||
| #[allow(unused_imports)] | ||
| use core::fmt; | ||
| #[allow(unused_imports)] | ||
| use core::hash; | ||
| #[allow(unused_imports)] | ||
| use core::num; | ||
| #[allow(unused_imports)] | ||
| use core::mem; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| use core::clone::Clone; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| use core::marker::{Copy, Send, Sync}; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| use core::option::Option; | ||
| } else { | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::fmt; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::hash; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::num; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::mem; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::clone::Clone; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::marker::{Copy, Send, Sync}; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| pub use core::option::Option; | ||
| } | ||
| } | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| use core::clone::Clone; | ||
| #[allow(unused_imports)] | ||
| use core::ffi; | ||
| pub use core::ffi::c_void; | ||
| #[allow(unused_imports)] | ||
| use core::fmt; | ||
| #[allow(unused_imports)] | ||
| use core::hash; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| use core::marker::{Copy, Send, Sync}; | ||
| #[allow(unused_imports)] | ||
| use core::mem; | ||
| #[allow(unused_imports)] | ||
| use core::num; | ||
| #[doc(hidden)] | ||
| #[allow(unused_imports)] | ||
| use core::option::Option; | ||
@@ -95,0 +68,0 @@ cfg_if! { |
+114
-136
@@ -64,9 +64,19 @@ /// A macro for defining #[cfg] if-else statements. | ||
| /// Implement `Clone` and `Copy` for a struct, as well as `Debug`, `Eq`, `Hash`, and | ||
| /// `PartialEq` if the `extra_traits` feature is enabled. | ||
| /// | ||
| /// Use [`s_no_extra_traits`] for structs where the `extra_traits` feature does not | ||
| /// make sense, and for unions. | ||
| macro_rules! s { | ||
| ($($(#[$attr:meta])* pub $t:ident $i:ident { $($field:tt)* })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub $t:ident $i:ident { $($field:tt)* } | ||
| )*) => ($( | ||
| s!(it: $(#[$attr])* pub $t $i { $($field)* }); | ||
| )*); | ||
| (it: $(#[$attr:meta])* pub union $i:ident { $($field:tt)* }) => ( | ||
| compile_error!("unions cannot derive extra traits, use s_no_extra_traits instead"); | ||
| ); | ||
| (it: $(#[$attr:meta])* pub struct $i:ident { $($field:tt)* }) => ( | ||
@@ -76,2 +86,3 @@ __item! { | ||
| #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] | ||
| #[derive(Copy, Clone)] | ||
| #[allow(deprecated)] | ||
@@ -81,80 +92,82 @@ $(#[$attr])* | ||
| } | ||
| #[allow(deprecated)] | ||
| impl ::Copy for $i {} | ||
| #[allow(deprecated)] | ||
| impl ::Clone for $i { | ||
| fn clone(&self) -> $i { *self } | ||
| } | ||
| ); | ||
| } | ||
| /// Implement `Clone` and `Copy` for a tuple struct, as well as `Debug`, `Eq`, `Hash`, | ||
| /// and `PartialEq` if the `extra_traits` feature is enabled. | ||
| /// | ||
| /// This is the same as [`s`] but works for tuple structs. | ||
| macro_rules! s_paren { | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub struct $i:ident ( $($field:tt)* ); | ||
| )*) => ($( | ||
| __item! { | ||
| #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] | ||
| #[derive(Copy, Clone)] | ||
| $(#[$attr])* | ||
| pub struct $i ( $($field)* ); | ||
| } | ||
| )*); | ||
| } | ||
| /// Implement `Clone` and `Copy` for a struct with no `extra_traits` feature. | ||
| /// | ||
| /// Most items will prefer to use [`s`]. | ||
| macro_rules! s_no_extra_traits { | ||
| ($($(#[$attr:meta])* pub $t:ident $i:ident { $($field:tt)* })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub $t:ident $i:ident { $($field:tt)* } | ||
| )*) => ($( | ||
| s_no_extra_traits!(it: $(#[$attr])* pub $t $i { $($field)* }); | ||
| )*); | ||
| (it: $(#[$attr:meta])* pub union $i:ident { $($field:tt)* }) => ( | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| __item! { | ||
| #[repr(C)] | ||
| $(#[$attr])* | ||
| pub union $i { $($field)* } | ||
| } | ||
| impl ::Copy for $i {} | ||
| impl ::Clone for $i { | ||
| fn clone(&self) -> $i { *self } | ||
| } | ||
| } | ||
| __item! { | ||
| #[repr(C)] | ||
| #[derive(Copy, Clone)] | ||
| $(#[$attr])* | ||
| pub union $i { $($field)* } | ||
| } | ||
| ); | ||
| (it: $(#[$attr:meta])* pub struct $i:ident { $($field:tt)* }) => ( | ||
| __item! { | ||
| #[repr(C)] | ||
| #[derive(Copy, Clone)] | ||
| $(#[$attr])* | ||
| pub struct $i { $($field)* } | ||
| } | ||
| #[allow(deprecated)] | ||
| impl ::Copy for $i {} | ||
| #[allow(deprecated)] | ||
| impl ::Clone for $i { | ||
| fn clone(&self) -> $i { *self } | ||
| } | ||
| ); | ||
| } | ||
| /// Specify that an enum should have no traits that aren't specified in the macro | ||
| /// invocation, i.e. no `Clone` or `Copy`. | ||
| macro_rules! missing { | ||
| ($($(#[$attr:meta])* pub enum $i:ident {})*) => ($( | ||
| $(#[$attr])* #[allow(missing_copy_implementations)] pub enum $i { } | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub enum $i:ident {} | ||
| )*) => ($( | ||
| $(#[$attr])* | ||
| #[allow(missing_copy_implementations)] | ||
| pub enum $i { } | ||
| )*); | ||
| } | ||
| /// Implement `Clone` and `Copy` for an enum, as well as `Debug`, `Eq`, `Hash`, and | ||
| /// `PartialEq` if the `extra_traits` feature is enabled. | ||
| macro_rules! e { | ||
| ($($(#[$attr:meta])* pub enum $i:ident { $($field:tt)* })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub enum $i:ident { $($field:tt)* } | ||
| )*) => ($( | ||
| __item! { | ||
| #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] | ||
| #[derive(Copy, Clone)] | ||
| $(#[$attr])* | ||
| pub enum $i { $($field)* } | ||
| } | ||
| impl ::Copy for $i {} | ||
| impl ::Clone for $i { | ||
| fn clone(&self) -> $i { *self } | ||
| } | ||
| )*); | ||
| } | ||
| macro_rules! s_paren { | ||
| ($($(#[$attr:meta])* pub struct $i:ident ( $($field:tt)* ); )* ) => ($( | ||
| __item! { | ||
| #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] | ||
| $(#[$attr])* | ||
| pub struct $i ( $($field)* ); | ||
| } | ||
| impl ::Copy for $i {} | ||
| impl ::Clone for $i { | ||
| fn clone(&self) -> $i { *self } | ||
| } | ||
| )*); | ||
| } | ||
| // This is a pretty horrible hack to allow us to conditionally mark | ||
@@ -187,92 +200,89 @@ // some functions as 'const', without requiring users of this macro | ||
| // 'f!' block | ||
| // FIXME(ctest): ctest can't handle `const extern` functions, we should be able to remove this | ||
| // cfg completely. | ||
| // FIXME(ctest): ctest can't handle `$(,)?` so we use `$(,)*` which isn't quite correct. | ||
| cfg_if! { | ||
| if #[cfg(libc_const_extern_fn)] { | ||
| if #[cfg(feature = "const-extern-fn")] { | ||
| /// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled. | ||
| macro_rules! f { | ||
| ($($(#[$attr:meta])* pub $({$constness:ident})* fn $i:ident( | ||
| $($arg:ident: $argty:ty),* | ||
| ) -> $ret:ty { | ||
| $($body:stmt);* | ||
| })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty | ||
| $body:block | ||
| )*) => ($( | ||
| #[inline] | ||
| $(#[$attr])* | ||
| pub $($constness)* unsafe extern fn $i($($arg: $argty),* | ||
| ) -> $ret { | ||
| $($body);* | ||
| } | ||
| pub $($constness)* unsafe extern fn $i($($arg: $argty),*) -> $ret | ||
| $body | ||
| )*) | ||
| } | ||
| /// Define a safe function that is const as long as `const-extern-fn` is enabled. | ||
| macro_rules! safe_f { | ||
| ($($(#[$attr:meta])* pub $({$constness:ident})* fn $i:ident( | ||
| $($arg:ident: $argty:ty),* | ||
| ) -> $ret:ty { | ||
| $($body:stmt);* | ||
| })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty | ||
| $body:block | ||
| )*) => ($( | ||
| #[inline] | ||
| $(#[$attr])* | ||
| pub $($constness)* extern fn $i($($arg: $argty),* | ||
| ) -> $ret { | ||
| $($body);* | ||
| } | ||
| pub $($constness)* extern fn $i($($arg: $argty),*) -> $ret | ||
| $body | ||
| )*) | ||
| } | ||
| /// A nonpublic function that is const as long as `const-extern-fn` is enabled. | ||
| macro_rules! const_fn { | ||
| ($($(#[$attr:meta])* $({$constness:ident})* fn $i:ident( | ||
| $($arg:ident: $argty:ty),* | ||
| ) -> $ret:ty { | ||
| $($body:stmt);* | ||
| })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty | ||
| $body:block | ||
| )*) => ($( | ||
| #[inline] | ||
| $(#[$attr])* | ||
| $($constness)* fn $i($($arg: $argty),* | ||
| ) -> $ret { | ||
| $($body);* | ||
| } | ||
| $($constness)* fn $i($($arg: $argty),*) -> $ret | ||
| $body | ||
| )*) | ||
| } | ||
| } else { | ||
| /// Define an `unsafe` function that is const as long as `const-extern-fn` is enabled. | ||
| macro_rules! f { | ||
| ($($(#[$attr:meta])* pub $({$constness:ident})* fn $i:ident( | ||
| $($arg:ident: $argty:ty),* | ||
| ) -> $ret:ty { | ||
| $($body:stmt);* | ||
| })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty | ||
| $body:block | ||
| )*) => ($( | ||
| #[inline] | ||
| $(#[$attr])* | ||
| pub unsafe extern fn $i($($arg: $argty),* | ||
| ) -> $ret { | ||
| $($body);* | ||
| } | ||
| pub unsafe extern fn $i($($arg: $argty),*) -> $ret | ||
| $body | ||
| )*) | ||
| } | ||
| /// Define a safe function that is const as long as `const-extern-fn` is enabled. | ||
| macro_rules! safe_f { | ||
| ($($(#[$attr:meta])* pub $({$constness:ident})* fn $i:ident( | ||
| $($arg:ident: $argty:ty),* | ||
| ) -> $ret:ty { | ||
| $($body:stmt);* | ||
| })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| pub $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty | ||
| $body:block | ||
| )*) => ($( | ||
| #[inline] | ||
| $(#[$attr])* | ||
| pub extern fn $i($($arg: $argty),* | ||
| ) -> $ret { | ||
| $($body);* | ||
| } | ||
| pub extern fn $i($($arg: $argty),*) -> $ret | ||
| $body | ||
| )*) | ||
| } | ||
| /// A nonpublic function that is const as long as `const-extern-fn` is enabled. | ||
| macro_rules! const_fn { | ||
| ($($(#[$attr:meta])* $({$constness:ident})* fn $i:ident( | ||
| $($arg:ident: $argty:ty),* | ||
| ) -> $ret:ty { | ||
| $($body:stmt);* | ||
| })*) => ($( | ||
| ($( | ||
| $(#[$attr:meta])* | ||
| $({$constness:ident})* fn $i:ident($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty | ||
| $body:block | ||
| )*) => ($( | ||
| #[inline] | ||
| $(#[$attr])* | ||
| fn $i($($arg: $argty),* | ||
| ) -> $ret { | ||
| $($body);* | ||
| } | ||
| fn $i($($arg: $argty),*) -> $ret | ||
| $body | ||
| )*) | ||
@@ -289,20 +299,2 @@ } | ||
| macro_rules! align_const { | ||
| ($($(#[$attr:meta])* | ||
| pub const $name:ident : $t1:ty | ||
| = $t2:ident { $($field:tt)* };)*) => ($( | ||
| #[cfg(libc_align)] | ||
| $(#[$attr])* | ||
| pub const $name : $t1 = $t2 { | ||
| $($field)* | ||
| }; | ||
| #[cfg(not(libc_align))] | ||
| $(#[$attr])* | ||
| pub const $name : $t1 = $t2 { | ||
| $($field)* | ||
| __align: [], | ||
| }; | ||
| )*) | ||
| } | ||
| // This macro is used to deprecate items that should be accessed via the mach2 crate | ||
@@ -341,15 +333,1 @@ macro_rules! deprecated_mach { | ||
| } | ||
| #[cfg(not(libc_ptr_addr_of))] | ||
| macro_rules! ptr_addr_of { | ||
| ($place:expr) => { | ||
| &$place | ||
| }; | ||
| } | ||
| #[cfg(libc_ptr_addr_of)] | ||
| macro_rules! ptr_addr_of { | ||
| ($place:expr) => { | ||
| ::core::ptr::addr_of!($place) | ||
| }; | ||
| } |
+0
-20
@@ -28,21 +28,1 @@ //! SGX C types definition | ||
| pub const INT_MAX: c_int = 2147483647; | ||
| cfg_if! { | ||
| if #[cfg(libc_core_cvoid)] { | ||
| pub use ::ffi::c_void; | ||
| } else { | ||
| // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help | ||
| // enable more optimization opportunities around it recognizing things | ||
| // like malloc/free. | ||
| #[repr(u8)] | ||
| #[allow(missing_copy_implementations)] | ||
| #[allow(missing_debug_implementations)] | ||
| pub enum c_void { | ||
| // Two dummy variants so the #[repr] attribute can be used. | ||
| #[doc(hidden)] | ||
| __variant1, | ||
| #[doc(hidden)] | ||
| __variant2, | ||
| } | ||
| } | ||
| } |
+2
-20
@@ -5,2 +5,4 @@ //! Interface to the [SOLID] C library | ||
| use c_void; | ||
| pub type c_schar = i8; | ||
@@ -876,22 +878,2 @@ pub type c_uchar = u8; | ||
| cfg_if! { | ||
| if #[cfg(libc_core_cvoid)] { | ||
| pub use ::ffi::c_void; | ||
| } else { | ||
| // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help | ||
| // enable more optimization opportunities around it recognizing things | ||
| // like malloc/free. | ||
| #[repr(u8)] | ||
| #[allow(missing_copy_implementations)] | ||
| #[allow(missing_debug_implementations)] | ||
| pub enum c_void { | ||
| // Two dummy variants so the #[repr] attribute can be used. | ||
| #[doc(hidden)] | ||
| __variant1, | ||
| #[doc(hidden)] | ||
| __variant2, | ||
| } | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(target_arch = "aarch64")] { | ||
@@ -898,0 +880,0 @@ mod aarch64; |
+0
-20
@@ -30,21 +30,1 @@ //! Switch C type definitions | ||
| pub const INT_MAX: c_int = 2147483647; | ||
| cfg_if! { | ||
| if #[cfg(libc_core_cvoid)] { | ||
| pub use ::ffi::c_void; | ||
| } else { | ||
| // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help | ||
| // enable more optimization opportunities around it recognizing things | ||
| // like malloc/free. | ||
| #[repr(u8)] | ||
| #[allow(missing_copy_implementations)] | ||
| #[allow(missing_debug_implementations)] | ||
| pub enum c_void { | ||
| // Two dummy variants so the #[repr] attribute can be used. | ||
| #[doc(hidden)] | ||
| __variant1, | ||
| #[doc(hidden)] | ||
| __variant2, | ||
| } | ||
| } | ||
| } |
+3
-3
@@ -51,3 +51,3 @@ //! Libc bindings for teeos | ||
| // aarch64 specifc | ||
| // aarch64 specific | ||
| pub type c_char = u8; | ||
@@ -65,5 +65,5 @@ | ||
| // long double in C means A float point value, which has 128bit length. | ||
| // but some bit maybe not used, so the really length of long double could be 80(x86) or 128(power pc/IEEE) | ||
| // but some bit maybe not used, so the real length of long double could be 80(x86) or 128(power pc/IEEE) | ||
| // this is different from f128(not stable and not included default) in Rust, so we use u128 for FFI(Rust to C). | ||
| // this is unstable and will couse to memfault/data abort. | ||
| // this is unstable and will cause to memfault/data abort. | ||
| pub type c_longdouble = _CLongDouble; | ||
@@ -70,0 +70,0 @@ |
+89
-123
@@ -37,3 +37,3 @@ pub type c_long = i64; | ||
| pub f_fstr: [::c_char; 32], | ||
| pub f_filler: [::c_ulong; 16] | ||
| pub f_filler: [::c_ulong; 16], | ||
| } | ||
@@ -203,3 +203,2 @@ | ||
| #[cfg(libc_union)] | ||
| pub union _kernel_simple_lock { | ||
@@ -212,10 +211,24 @@ pub _slock: ::c_long, | ||
| pub struct fileops_t { | ||
| pub fo_rw: extern fn(file: *mut file, rw: ::uio_rw, io: *mut ::c_void, ext: ::c_long, | ||
| secattr: *mut ::c_void) -> ::c_int, | ||
| pub fo_ioctl: extern fn(file: *mut file, a: ::c_long, b: ::caddr_t, c: ::c_long, | ||
| d: ::c_long) -> ::c_int, | ||
| pub fo_select: extern fn(file: *mut file, a: ::c_int, b: *mut ::c_ushort, | ||
| c: extern fn()) -> ::c_int, | ||
| pub fo_close: extern fn(file: *mut file) -> ::c_int, | ||
| pub fo_fstat: extern fn(file: *mut file, sstat: *mut ::stat) -> ::c_int, | ||
| pub fo_rw: extern "C" fn( | ||
| file: *mut file, | ||
| rw: ::uio_rw, | ||
| io: *mut ::c_void, | ||
| ext: ::c_long, | ||
| secattr: *mut ::c_void, | ||
| ) -> ::c_int, | ||
| pub fo_ioctl: extern "C" fn( | ||
| file: *mut file, | ||
| a: ::c_long, | ||
| b: ::caddr_t, | ||
| c: ::c_long, | ||
| d: ::c_long, | ||
| ) -> ::c_int, | ||
| pub fo_select: extern "C" fn( | ||
| file: *mut file, | ||
| a: ::c_int, | ||
| b: *mut ::c_ushort, | ||
| c: extern "C" fn(), | ||
| ) -> ::c_int, | ||
| pub fo_close: extern "C" fn(file: *mut file) -> ::c_int, | ||
| pub fo_fstat: extern "C" fn(file: *mut file, sstat: *mut ::stat) -> ::c_int, | ||
| } | ||
@@ -234,5 +247,3 @@ | ||
| pub f_cred: *mut ::c_void, | ||
| #[cfg(libc_union)] | ||
| pub f_lock: _kernel_simple_lock, | ||
| #[cfg(libc_union)] | ||
| pub f_offset_lock: _kernel_simple_lock, | ||
@@ -246,3 +257,2 @@ pub f_vinfo: ::caddr_t, | ||
| #[cfg(libc_union)] | ||
| pub union __ld_info_file { | ||
@@ -257,3 +267,2 @@ pub _ldinfo_fd: ::c_int, | ||
| pub ldinfo_flags: ::c_uint, | ||
| #[cfg(libc_union)] | ||
| pub _file: __ld_info_file, | ||
@@ -267,3 +276,2 @@ pub ldinfo_textorg: *mut ::c_void, | ||
| #[cfg(libc_union)] | ||
| pub union __pollfd_ext_u { | ||
@@ -279,3 +287,2 @@ pub addr: *mut ::c_void, | ||
| pub revents: ::c_ushort, | ||
| #[cfg(libc_union)] | ||
| pub data: __pollfd_ext_u, | ||
@@ -311,6 +318,2 @@ } | ||
| fn eq(&self, other: &siginfo_t) -> bool { | ||
| #[cfg(libc_union)] | ||
| let value_eq = self.si_value == other.si_value; | ||
| #[cfg(not(libc_union))] | ||
| let value_eq = true; | ||
| self.si_signo == other.si_signo | ||
@@ -325,3 +328,3 @@ && self.si_errno == other.si_errno | ||
| && self.__si_flags == other.__si_flags | ||
| && value_eq | ||
| && self.si_value == other.si_value | ||
| } | ||
@@ -331,16 +334,15 @@ } | ||
| impl ::fmt::Debug for siginfo_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| let mut struct_formatter = f.debug_struct("siginfo_t"); | ||
| struct_formatter.field("si_signo", &self.si_signo); | ||
| struct_formatter.field("si_errno", &self.si_errno); | ||
| struct_formatter.field("si_code", &self.si_code); | ||
| struct_formatter.field("si_pid", &self.si_pid); | ||
| struct_formatter.field("si_uid", &self.si_uid); | ||
| struct_formatter.field("si_status", &self.si_status); | ||
| struct_formatter.field("si_addr", &self.si_addr); | ||
| struct_formatter.field("si_band", &self.si_band); | ||
| #[cfg(libc_union)] | ||
| struct_formatter.field("si_value", &self.si_value); | ||
| struct_formatter.field("__si_flags", &self.__si_flags); | ||
| struct_formatter.finish() | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("siginfo_t") | ||
| .field("si_signo", &self.si_signo) | ||
| .field("si_errno", &self.si_errno) | ||
| .field("si_code", &self.si_code) | ||
| .field("si_pid", &self.si_pid) | ||
| .field("si_uid", &self.si_uid) | ||
| .field("si_status", &self.si_status) | ||
| .field("si_addr", &self.si_addr) | ||
| .field("si_band", &self.si_band) | ||
| .field("si_value", &self.si_value) | ||
| .field("__si_flags", &self.__si_flags) | ||
| .finish() | ||
| } | ||
@@ -358,3 +360,2 @@ } | ||
| self.si_band.hash(state); | ||
| #[cfg(libc_union)] | ||
| self.si_value.hash(state); | ||
@@ -365,16 +366,10 @@ self.__si_flags.hash(state); | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for _kernel_simple_lock { | ||
| fn eq(&self, other: &_kernel_simple_lock) -> bool { | ||
| unsafe { | ||
| self._slock == other._slock | ||
| && self._slockp == other._slockp | ||
| } | ||
| unsafe { self._slock == other._slock && self._slockp == other._slockp } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for _kernel_simple_lock {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for _kernel_simple_lock { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("_kernel_simple_lock") | ||
@@ -386,3 +381,2 @@ .field("_slock", unsafe { &self._slock }) | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl ::hash::Hash for _kernel_simple_lock { | ||
@@ -408,10 +402,10 @@ fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| impl ::fmt::Debug for fileops_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| let mut struct_formatter = f.debug_struct("fileops_t"); | ||
| struct_formatter.field("fo_rw", &self.fo_rw); | ||
| struct_formatter.field("fo_ioctl", &self.fo_ioctl); | ||
| struct_formatter.field("fo_select", &self.fo_select); | ||
| struct_formatter.field("fo_close", &self.fo_close); | ||
| struct_formatter.field("fo_fstat", &self.fo_fstat); | ||
| struct_formatter.finish() | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("fileops_t") | ||
| .field("fo_rw", &self.fo_rw) | ||
| .field("fo_ioctl", &self.fo_ioctl) | ||
| .field("fo_select", &self.fo_select) | ||
| .field("fo_close", &self.fo_close) | ||
| .field("fo_fstat", &self.fo_fstat) | ||
| .finish() | ||
| } | ||
@@ -431,7 +425,2 @@ } | ||
| fn eq(&self, other: &file) -> bool { | ||
| #[cfg(libc_union)] | ||
| let lock_eq = self.f_lock == other.f_lock | ||
| && self.f_offset_lock == other.f_offset_lock; | ||
| #[cfg(not(libc_union))] | ||
| let lock_eq = true; | ||
| self.f_flag == other.f_flag | ||
@@ -450,3 +439,4 @@ && self.f_count == other.f_count | ||
| && self.f_fdata == other.f_fdata | ||
| && lock_eq | ||
| && self.f_lock == other.f_lock | ||
| && self.f_offset_lock == other.f_offset_lock | ||
| } | ||
@@ -456,22 +446,20 @@ } | ||
| impl ::fmt::Debug for file { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| let mut struct_formatter = f.debug_struct("file"); | ||
| struct_formatter.field("f_flag", &self.f_flag); | ||
| struct_formatter.field("f_count", &self.f_count); | ||
| struct_formatter.field("f_options", &self.f_options); | ||
| struct_formatter.field("f_type", &self.f_type); | ||
| struct_formatter.field("f_data", &self.f_data); | ||
| struct_formatter.field("f_offset", &self.f_offset); | ||
| struct_formatter.field("f_dir_off", &self.f_dir_off); | ||
| struct_formatter.field("f_cred", &self.f_cred); | ||
| #[cfg(libc_union)] | ||
| struct_formatter.field("f_lock", &self.f_lock); | ||
| #[cfg(libc_union)] | ||
| struct_formatter.field("f_offset_lock", &self.f_offset_lock); | ||
| struct_formatter.field("f_vinfo", &self.f_vinfo); | ||
| struct_formatter.field("f_ops", &self.f_ops); | ||
| struct_formatter.field("f_parentp", &self.f_parentp); | ||
| struct_formatter.field("f_fnamep", &self.f_fnamep); | ||
| struct_formatter.field("f_fdata", &self.f_fdata); | ||
| struct_formatter.finish() | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("file") | ||
| .field("f_flag", &self.f_flag) | ||
| .field("f_count", &self.f_count) | ||
| .field("f_options", &self.f_options) | ||
| .field("f_type", &self.f_type) | ||
| .field("f_data", &self.f_data) | ||
| .field("f_offset", &self.f_offset) | ||
| .field("f_dir_off", &self.f_dir_off) | ||
| .field("f_cred", &self.f_cred) | ||
| .field("f_lock", &self.f_lock) | ||
| .field("f_offset_lock", &self.f_offset_lock) | ||
| .field("f_vinfo", &self.f_vinfo) | ||
| .field("f_ops", &self.f_ops) | ||
| .field("f_parentp", &self.f_parentp) | ||
| .field("f_fnamep", &self.f_fnamep) | ||
| .field("f_fdata", &self.f_fdata) | ||
| .finish() | ||
| } | ||
@@ -489,5 +477,3 @@ } | ||
| self.f_cred.hash(state); | ||
| #[cfg(libc_union)] | ||
| self.f_lock.hash(state); | ||
| #[cfg(libc_union)] | ||
| self.f_offset_lock.hash(state); | ||
@@ -502,3 +488,2 @@ self.f_vinfo.hash(state); | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __ld_info_file { | ||
@@ -513,7 +498,5 @@ fn eq(&self, other: &__ld_info_file) -> bool { | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __ld_info_file {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __ld_info_file { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("__ld_info_file") | ||
@@ -526,3 +509,2 @@ .field("_ldinfo_fd", unsafe { &self._ldinfo_fd }) | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl ::hash::Hash for __ld_info_file { | ||
@@ -540,6 +522,2 @@ fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| fn eq(&self, other: &ld_info) -> bool { | ||
| #[cfg(libc_union)] | ||
| let file_eq = self._file == other._file; | ||
| #[cfg(not(libc_union))] | ||
| let file_eq = true; | ||
| self.ldinfo_next == other.ldinfo_next | ||
@@ -552,3 +530,3 @@ && self.ldinfo_flags == other.ldinfo_flags | ||
| && self.ldinfo_filename == other.ldinfo_filename | ||
| && file_eq | ||
| && self._file == other._file | ||
| } | ||
@@ -558,14 +536,13 @@ } | ||
| impl ::fmt::Debug for ld_info { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| let mut struct_formatter = f.debug_struct("ld_info"); | ||
| struct_formatter.field("ldinfo_next", &self.ldinfo_next); | ||
| struct_formatter.field("ldinfo_flags", &self.ldinfo_flags); | ||
| struct_formatter.field("ldinfo_textorg", &self.ldinfo_textorg); | ||
| struct_formatter.field("ldinfo_textsize", &self.ldinfo_textsize); | ||
| struct_formatter.field("ldinfo_dataorg", &self.ldinfo_dataorg); | ||
| struct_formatter.field("ldinfo_datasize", &self.ldinfo_datasize); | ||
| struct_formatter.field("ldinfo_filename", &self.ldinfo_filename); | ||
| #[cfg(libc_union)] | ||
| struct_formatter.field("_file", &self._file); | ||
| struct_formatter.finish() | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("ld_info") | ||
| .field("ldinfo_next", &self.ldinfo_next) | ||
| .field("ldinfo_flags", &self.ldinfo_flags) | ||
| .field("ldinfo_textorg", &self.ldinfo_textorg) | ||
| .field("ldinfo_textsize", &self.ldinfo_textsize) | ||
| .field("ldinfo_dataorg", &self.ldinfo_dataorg) | ||
| .field("ldinfo_datasize", &self.ldinfo_datasize) | ||
| .field("ldinfo_filename", &self.ldinfo_filename) | ||
| .field("_file", &self._file) | ||
| .finish() | ||
| } | ||
@@ -582,3 +559,2 @@ } | ||
| self.ldinfo_filename.hash(state); | ||
| #[cfg(libc_union)] | ||
| self._file.hash(state); | ||
@@ -588,3 +564,2 @@ } | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __pollfd_ext_u { | ||
@@ -599,7 +574,5 @@ fn eq(&self, other: &__pollfd_ext_u) -> bool { | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __pollfd_ext_u {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __pollfd_ext_u { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("__pollfd_ext_u") | ||
@@ -612,3 +585,2 @@ .field("addr", unsafe { &self.addr }) | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl ::hash::Hash for __pollfd_ext_u { | ||
@@ -626,10 +598,6 @@ fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| fn eq(&self, other: &pollfd_ext) -> bool { | ||
| #[cfg(libc_union)] | ||
| let data_eq = self.data == other.data; | ||
| #[cfg(not(libc_union))] | ||
| let data_eq = true; | ||
| self.fd == other.fd | ||
| && self.events == other.events | ||
| && self.revents == other.revents | ||
| && data_eq | ||
| && self.data == other.data | ||
| } | ||
@@ -639,10 +607,9 @@ } | ||
| impl ::fmt::Debug for pollfd_ext { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| let mut struct_formatter = f.debug_struct("pollfd_ext"); | ||
| struct_formatter.field("fd", &self.fd); | ||
| struct_formatter.field("events", &self.events); | ||
| struct_formatter.field("revents", &self.revents); | ||
| #[cfg(libc_union)] | ||
| struct_formatter.field("data", &self.data); | ||
| struct_formatter.finish() | ||
| fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { | ||
| f.debug_struct("pollfd_ext") | ||
| .field("fd", &self.fd) | ||
| .field("events", &self.events) | ||
| .field("revents", &self.revents) | ||
| .field("data", &self.data) | ||
| .finish() | ||
| } | ||
@@ -655,3 +622,2 @@ } | ||
| self.revents.hash(state); | ||
| #[cfg(libc_union)] | ||
| self.data.hash(state); | ||
@@ -658,0 +624,0 @@ } |
@@ -55,3 +55,3 @@ //! 32-bit specific Apple (ios/darwin) definitions | ||
| __sig: c_long, | ||
| __opaque: [::c_char; 36] | ||
| __opaque: [::c_char; 36], | ||
| } | ||
@@ -63,2 +63,8 @@ | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2], | ||
| } | ||
| } | ||
@@ -71,6 +77,7 @@ | ||
| self.__sig == other.__sig | ||
| && self.__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self | ||
| .__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -83,3 +90,3 @@ } | ||
| .field("__sig", &self.__sig) | ||
| // FIXME: .field("__opaque", &self.__opaque) | ||
| // FIXME: .field("__opaque", &self.__opaque) | ||
| .finish() | ||
@@ -97,6 +104,7 @@ } | ||
| self.__sig == other.__sig | ||
| && self.__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self | ||
| .__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -153,8 +161,1 @@ } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
| pub type boolean_t = ::c_int; | ||
| pub type mcontext_t = *mut __darwin_mcontext64; | ||
@@ -7,9 +8,46 @@ s! { | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_onstack: ::c_int, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_link: *mut ::ucontext_t, | ||
| pub uc_mcsize: usize, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| pub struct __darwin_mcontext64 { | ||
| pub __es: __darwin_arm_exception_state64, | ||
| pub __ss: __darwin_arm_thread_state64, | ||
| pub __ns: __darwin_arm_neon_state64, | ||
| } | ||
| pub struct __darwin_arm_exception_state64 { | ||
| pub __far: u64, | ||
| pub __esr: u32, | ||
| pub __exception: u32, | ||
| } | ||
| pub struct __darwin_arm_thread_state64 { | ||
| pub __x: [u64; 29], | ||
| pub __fp: u64, | ||
| pub __lr: u64, | ||
| pub __sp: u64, | ||
| pub __pc: u64, | ||
| pub __cpsr: u32, | ||
| pub __pad: u32, | ||
| } | ||
| pub struct __darwin_arm_neon_state64 { | ||
| pub __v: [::__uint128_t; 32], | ||
| pub __fpsr: u32, | ||
| pub __fpcr: u32, | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct max_align_t { | ||
| priv_: f64, | ||
| } | ||
| } |
@@ -55,3 +55,3 @@ //! 64-bit specific Apple (ios/darwin) definitions | ||
| __sig: c_long, | ||
| __opaque: [::c_char; 56] | ||
| __opaque: [::c_char; 56], | ||
| } | ||
@@ -70,6 +70,7 @@ | ||
| self.__sig == other.__sig | ||
| && self.__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self | ||
| .__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -82,3 +83,3 @@ } | ||
| .field("__sig", &self.__sig) | ||
| // FIXME: .field("__opaque", &self.__opaque) | ||
| // FIXME: .field("__opaque", &self.__opaque) | ||
| .finish() | ||
@@ -96,6 +97,7 @@ } | ||
| self.__sig == other.__sig | ||
| && self.__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self | ||
| .__opaque | ||
| .iter() | ||
| .zip(other.__opaque.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -102,0 +104,0 @@ } |
@@ -113,69 +113,69 @@ pub type boolean_t = ::c_uint; | ||
| _reserved2: *mut ::c_void, | ||
| pub size: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| ptr: *const ::c_void, | ||
| ) -> ::size_t>, | ||
| pub malloc: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void>, | ||
| pub calloc: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| num_items: ::size_t, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void>, | ||
| pub valloc: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| size: ::size_t | ||
| ) -> *mut ::c_void>, | ||
| pub free: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| ptr: *mut ::c_void | ||
| )>, | ||
| pub realloc: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| ptr: *mut ::c_void, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void>, | ||
| pub size: ::Option< | ||
| unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *const ::c_void) -> ::size_t, | ||
| >, | ||
| pub malloc: ::Option< | ||
| unsafe extern "C" fn(zone: *mut malloc_zone_t, size: ::size_t) -> *mut ::c_void, | ||
| >, | ||
| pub calloc: ::Option< | ||
| unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| num_items: ::size_t, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void, | ||
| >, | ||
| pub valloc: ::Option< | ||
| unsafe extern "C" fn(zone: *mut malloc_zone_t, size: ::size_t) -> *mut ::c_void, | ||
| >, | ||
| pub free: ::Option<unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *mut ::c_void)>, | ||
| pub realloc: ::Option< | ||
| unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| ptr: *mut ::c_void, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void, | ||
| >, | ||
| pub destroy: ::Option<unsafe extern "C" fn(zone: *mut malloc_zone_t)>, | ||
| pub zone_name: *const ::c_char, | ||
| pub batch_malloc: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| size: ::size_t, | ||
| results: *mut *mut ::c_void, | ||
| num_requested: ::c_uint, | ||
| ) -> ::c_uint>, | ||
| pub batch_free: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| to_be_freed: *mut *mut ::c_void, | ||
| num_to_be_freed: ::c_uint, | ||
| )>, | ||
| pub batch_malloc: ::Option< | ||
| unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| size: ::size_t, | ||
| results: *mut *mut ::c_void, | ||
| num_requested: ::c_uint, | ||
| ) -> ::c_uint, | ||
| >, | ||
| pub batch_free: ::Option< | ||
| unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| to_be_freed: *mut *mut ::c_void, | ||
| num_to_be_freed: ::c_uint, | ||
| ), | ||
| >, | ||
| pub introspect: *mut malloc_introspection_t, | ||
| pub version: ::c_uint, | ||
| pub memalign: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| alignment: ::size_t, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void>, | ||
| pub free_definite_size: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| ptr: *mut ::c_void, | ||
| size: ::size_t | ||
| )>, | ||
| pub pressure_relief: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| goal: ::size_t, | ||
| ) -> ::size_t>, | ||
| pub claimed_address: ::Option<unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| ptr: *mut ::c_void, | ||
| ) -> ::boolean_t>, | ||
| pub memalign: ::Option< | ||
| unsafe extern "C" fn( | ||
| zone: *mut malloc_zone_t, | ||
| alignment: ::size_t, | ||
| size: ::size_t, | ||
| ) -> *mut ::c_void, | ||
| >, | ||
| pub free_definite_size: ::Option< | ||
| unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *mut ::c_void, size: ::size_t), | ||
| >, | ||
| pub pressure_relief: | ||
| ::Option<unsafe extern "C" fn(zone: *mut malloc_zone_t, goal: ::size_t) -> ::size_t>, | ||
| pub claimed_address: ::Option< | ||
| unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *mut ::c_void) -> ::boolean_t, | ||
| >, | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2], | ||
| } | ||
| } |
@@ -0,1 +1,3 @@ | ||
| /* DIFF(main): module removed in de76fee6 */ | ||
| // DragonFlyBSD's __error function is declared with "static inline", so it must | ||
@@ -2,0 +4,0 @@ // be implemented in the libc crate, as a pointer to a static thread_local. |
@@ -87,3 +87,3 @@ pub type dev_t = u32; | ||
| pub e_termination: u16, | ||
| pub e_exit: u16 | ||
| pub e_exit: u16, | ||
| } | ||
@@ -100,3 +100,3 @@ | ||
| _aio_val: ::c_int, | ||
| _aio_err: ::c_int | ||
| _aio_err: ::c_int, | ||
| } | ||
@@ -299,3 +299,3 @@ | ||
| pub kl_wmesg: [::c_char; 9], | ||
| pub kl_comm: [::c_char; MAXCOMLEN+1], | ||
| pub kl_comm: [::c_char; MAXCOMLEN + 1], | ||
| } | ||
@@ -316,3 +316,3 @@ | ||
| pub kp_start: ::timeval, | ||
| pub kp_comm: [::c_char; MAXCOMLEN+1], | ||
| pub kp_comm: [::c_char; MAXCOMLEN + 1], | ||
| pub kp_uid: ::uid_t, | ||
@@ -484,3 +484,3 @@ pub kp_ngroups: ::c_short, | ||
| __unused1: ::c_int, | ||
| pub sigev_signo: ::c_int, //actually a union | ||
| pub sigev_signo: ::c_int, //actually a union | ||
| // pad the union | ||
@@ -490,3 +490,3 @@ #[cfg(target_pointer_width = "64")] | ||
| pub sigev_value: ::sigval, | ||
| __unused3: *mut ::c_void //actually a function pointer | ||
| __unused3: *mut ::c_void, //actually a function pointer | ||
| } | ||
@@ -526,3 +526,3 @@ | ||
| __unused: [::c_uint; 8], | ||
| pub mc_fpregs: [[::c_uint; 8]; 32], | ||
| pub mc_fpregs: [::c_uint; 256], | ||
| } | ||
@@ -549,6 +549,6 @@ | ||
| && self | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self.ut_unused == other.ut_unused | ||
@@ -659,4 +659,4 @@ && self.ut_session == other.ut_session | ||
| self.d_type.hash(state); | ||
| // Ignore __unused1 | ||
| // Ignore __unused2 | ||
| // Ignore __unused1 | ||
| // Ignore __unused2 | ||
| self.d_name.hash(state); | ||
@@ -683,13 +683,13 @@ } | ||
| && self | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self.f_syncreads == other.f_syncreads | ||
| && self.f_asyncreads == other.f_asyncreads | ||
| && self | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -770,33 +770,32 @@ } | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_onstack == other.mc_onstack && | ||
| self.mc_rdi == other.mc_rdi && | ||
| self.mc_rsi == other.mc_rsi && | ||
| self.mc_rdx == other.mc_rdx && | ||
| self.mc_rcx == other.mc_rcx && | ||
| self.mc_r8 == other.mc_r8 && | ||
| self.mc_r9 == other.mc_r9 && | ||
| self.mc_rax == other.mc_rax && | ||
| self.mc_rbx == other.mc_rbx && | ||
| self.mc_rbp == other.mc_rbp && | ||
| self.mc_r10 == other.mc_r10 && | ||
| self.mc_r11 == other.mc_r11 && | ||
| self.mc_r12 == other.mc_r12 && | ||
| self.mc_r13 == other.mc_r13 && | ||
| self.mc_r14 == other.mc_r14 && | ||
| self.mc_r15 == other.mc_r15 && | ||
| self.mc_xflags == other.mc_xflags && | ||
| self.mc_trapno == other.mc_trapno && | ||
| self.mc_addr == other.mc_addr && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_err == other.mc_err && | ||
| self.mc_rip == other.mc_rip && | ||
| self.mc_cs == other.mc_cs && | ||
| self.mc_rflags == other.mc_rflags && | ||
| self.mc_rsp == other.mc_rsp && | ||
| self.mc_ss == other.mc_ss && | ||
| self.mc_len == other.mc_len && | ||
| self.mc_fpformat == other.mc_fpformat && | ||
| self.mc_ownedfp == other.mc_ownedfp && | ||
| self.mc_fpregs.iter().zip(other.mc_fpregs.iter()). | ||
| all(|(a, b)| a == b) | ||
| self.mc_onstack == other.mc_onstack | ||
| && self.mc_rdi == other.mc_rdi | ||
| && self.mc_rsi == other.mc_rsi | ||
| && self.mc_rdx == other.mc_rdx | ||
| && self.mc_rcx == other.mc_rcx | ||
| && self.mc_r8 == other.mc_r8 | ||
| && self.mc_r9 == other.mc_r9 | ||
| && self.mc_rax == other.mc_rax | ||
| && self.mc_rbx == other.mc_rbx | ||
| && self.mc_rbp == other.mc_rbp | ||
| && self.mc_r10 == other.mc_r10 | ||
| && self.mc_r11 == other.mc_r11 | ||
| && self.mc_r12 == other.mc_r12 | ||
| && self.mc_r13 == other.mc_r13 | ||
| && self.mc_r14 == other.mc_r14 | ||
| && self.mc_r15 == other.mc_r15 | ||
| && self.mc_xflags == other.mc_xflags | ||
| && self.mc_trapno == other.mc_trapno | ||
| && self.mc_addr == other.mc_addr | ||
| && self.mc_flags == other.mc_flags | ||
| && self.mc_err == other.mc_err | ||
| && self.mc_rip == other.mc_rip | ||
| && self.mc_cs == other.mc_cs | ||
| && self.mc_rflags == other.mc_rflags | ||
| && self.mc_rsp == other.mc_rsp | ||
| && self.mc_ss == other.mc_ss | ||
| && self.mc_len == other.mc_len | ||
| && self.mc_fpformat == other.mc_fpformat | ||
| && self.mc_ownedfp == other.mc_ownedfp | ||
| && self.mc_fpregs == other.mc_fpregs | ||
| } | ||
@@ -1558,21 +1557,16 @@ } | ||
| pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { | ||
| (cmsg as *mut ::c_uchar) | ||
| .offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) | ||
| (cmsg as *mut ::c_uchar).offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) | ||
| } | ||
| pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { | ||
| (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + length as usize) | ||
| as ::c_uint | ||
| (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + length as usize) as ::c_uint | ||
| } | ||
| pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) | ||
| -> *mut ::cmsghdr | ||
| { | ||
| let next = cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize) | ||
| pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { | ||
| let next = cmsg as usize | ||
| + _CMSG_ALIGN((*cmsg).cmsg_len as usize) | ||
| + _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()); | ||
| let max = (*mhdr).msg_control as usize | ||
| + (*mhdr).msg_controllen as usize; | ||
| let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; | ||
| if next <= max { | ||
| (cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize)) | ||
| as *mut ::cmsghdr | ||
| (cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr | ||
| } else { | ||
@@ -1584,4 +1578,3 @@ 0 as *mut ::cmsghdr | ||
| pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { | ||
| (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + | ||
| _CMSG_ALIGN(length as usize)) as ::c_uint | ||
| (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + _CMSG_ALIGN(length as usize)) as ::c_uint | ||
| } | ||
@@ -1613,3 +1606,3 @@ | ||
| pub fn major(dev: ::dev_t) -> ::c_int { | ||
| ((dev >> 8) & 0xff) as ::c_int | ||
| ((dev >> 8) & 0xff) as ::c_int | ||
| } | ||
@@ -1755,2 +1748,3 @@ | ||
| // DIFF(main): module removed in de76fee6 | ||
| cfg_if! { | ||
@@ -1757,0 +1751,0 @@ if #[cfg(libc_thread_local)] { |
@@ -37,12 +37,3 @@ pub type c_char = u8; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
@@ -53,8 +44,8 @@ cfg_if! { | ||
| fn eq(&self, other: &gpregs) -> bool { | ||
| self.gp_x.iter().zip(other.gp_x.iter()).all(|(a, b)| a == b) && | ||
| self.gp_lr == other.gp_lr && | ||
| self.gp_sp == other.gp_sp && | ||
| self.gp_elr == other.gp_elr && | ||
| self.gp_spsr == other.gp_spsr && | ||
| self.gp_pad == other.gp_pad | ||
| self.gp_x.iter().zip(other.gp_x.iter()).all(|(a, b)| a == b) | ||
| && self.gp_lr == other.gp_lr | ||
| && self.gp_sp == other.gp_sp | ||
| && self.gp_elr == other.gp_elr | ||
| && self.gp_spsr == other.gp_spsr | ||
| && self.gp_pad == other.gp_pad | ||
| } | ||
@@ -87,7 +78,7 @@ } | ||
| fn eq(&self, other: &fpregs) -> bool { | ||
| self.fp_q == other.fp_q && | ||
| self.fp_sr == other.fp_sr && | ||
| self.fp_cr == other.fp_cr && | ||
| self.fp_flags == other.fp_flags && | ||
| self.fp_pad == other.fp_pad | ||
| self.fp_q == other.fp_q | ||
| && self.fp_sr == other.fp_sr | ||
| && self.fp_cr == other.fp_cr | ||
| && self.fp_flags == other.fp_flags | ||
| && self.fp_pad == other.fp_pad | ||
| } | ||
@@ -118,7 +109,11 @@ } | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_gpregs == other.mc_gpregs && | ||
| self.mc_fpregs == other.mc_fpregs && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_pad == other.mc_pad && | ||
| self.mc_spare.iter().zip(other.mc_spare.iter()).all(|(a, b)| a == b) | ||
| self.mc_gpregs == other.mc_gpregs | ||
| && self.mc_fpregs == other.mc_fpregs | ||
| && self.mc_flags == other.mc_flags | ||
| && self.mc_pad == other.mc_pad | ||
| && self | ||
| .mc_spare | ||
| .iter() | ||
| .zip(other.mc_spare.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -125,0 +120,0 @@ } |
@@ -25,6 +25,10 @@ pub type c_char = u8; | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.__gregs == other.__gregs && | ||
| self.mc_vfp_size == other.mc_vfp_size && | ||
| self.mc_vfp_ptr == other.mc_vfp_ptr && | ||
| self.mc_spare.iter().zip(other.mc_spare.iter()).all(|(a, b)| a == b) | ||
| self.__gregs == other.__gregs | ||
| && self.mc_vfp_size == other.mc_vfp_size | ||
| && self.mc_vfp_ptr == other.mc_vfp_ptr | ||
| && self | ||
| .mc_spare | ||
| .iter() | ||
| .zip(other.mc_spare.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -54,17 +58,9 @@ } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 4 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; | ||
| pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; | ||
| pub const MAP_32BIT: ::c_int = 0x00080000; | ||
| pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 | ||
| pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; |
@@ -169,3 +169,3 @@ // APIs that were changed after FreeBSD 11 | ||
| /// Spare string space. | ||
| pub ki_sparestrings: [[::c_char; 23]; 2], // little hack to allow PartialEq | ||
| pub ki_sparestrings: [::c_char; 46], | ||
| /// Spare room for growth. | ||
@@ -287,11 +287,11 @@ pub ki_spareints: [::c_int; ::KI_NSPARE_INT], | ||
| && self | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -354,7 +354,6 @@ } | ||
| && self.d_namlen == other.d_namlen | ||
| && self | ||
| .d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self.d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -389,10 +388,10 @@ } | ||
| self.vn_fileid == other.vn_fileid && | ||
| self.vn_size == other.vn_size && | ||
| self.vn_mntdir == other.vn_mntdir && | ||
| self.vn_dev == other.vn_dev && | ||
| self.vn_fsid == other.vn_fsid && | ||
| self.vn_type == other.vn_type && | ||
| self.vn_mode == other.vn_mode && | ||
| self_vn_devname == other_vn_devname | ||
| self.vn_fileid == other.vn_fileid | ||
| && self.vn_size == other.vn_size | ||
| && self.vn_mntdir == other.vn_mntdir | ||
| && self.vn_dev == other.vn_dev | ||
| && self.vn_fsid == other.vn_fsid | ||
| && self.vn_type == other.vn_type | ||
| && self.vn_mode == other.vn_mode | ||
| && self_vn_devname == other_vn_devname | ||
| } | ||
@@ -451,3 +450,3 @@ } | ||
| pub fn major(dev: ::dev_t) -> ::c_int { | ||
| ((dev >> 8) & 0xff) as ::c_int | ||
| ((dev >> 8) & 0xff) as ::c_int | ||
| } | ||
@@ -454,0 +453,0 @@ |
@@ -176,3 +176,3 @@ // APIs in FreeBSD 12 that have changed since 11. | ||
| /// Spare string space. | ||
| pub ki_sparestrings: [[::c_char; 23]; 2], // little hack to allow PartialEq | ||
| pub ki_sparestrings: [::c_char; 46], | ||
| /// Spare room for growth. | ||
@@ -330,11 +330,11 @@ pub ki_spareints: [::c_int; ::KI_NSPARE_INT], | ||
| && self | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -399,7 +399,6 @@ } | ||
| && self.d_namlen == other.d_namlen | ||
| && self | ||
| .d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self.d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -436,10 +435,10 @@ } | ||
| self.vn_fileid == other.vn_fileid && | ||
| self.vn_size == other.vn_size && | ||
| self.vn_dev == other.vn_dev && | ||
| self.vn_fsid == other.vn_fsid && | ||
| self.vn_mntdir == other.vn_mntdir && | ||
| self.vn_type == other.vn_type && | ||
| self.vn_mode == other.vn_mode && | ||
| self_vn_devname == other_vn_devname | ||
| self.vn_fileid == other.vn_fileid | ||
| && self.vn_size == other.vn_size | ||
| && self.vn_dev == other.vn_dev | ||
| && self.vn_fsid == other.vn_fsid | ||
| && self.vn_mntdir == other.vn_mntdir | ||
| && self.vn_type == other.vn_type | ||
| && self.vn_mode == other.vn_mode | ||
| && self_vn_devname == other_vn_devname | ||
| } | ||
@@ -446,0 +445,0 @@ } |
@@ -186,3 +186,3 @@ // APIs in FreeBSD 13 that have changed since 11. | ||
| /// Spare string space. | ||
| pub ki_sparestrings: [[::c_char; 23]; 2], // little hack to allow PartialEq | ||
| pub ki_sparestrings: [::c_char; 46], | ||
| /// Spare room for growth. | ||
@@ -343,11 +343,11 @@ pub ki_spareints: [::c_int; ::KI_NSPARE_INT], | ||
| && self | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -412,7 +412,6 @@ } | ||
| && self.d_namlen == other.d_namlen | ||
| && self | ||
| .d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self.d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -449,10 +448,10 @@ } | ||
| self.vn_fileid == other.vn_fileid && | ||
| self.vn_size == other.vn_size && | ||
| self.vn_dev == other.vn_dev && | ||
| self.vn_fsid == other.vn_fsid && | ||
| self.vn_mntdir == other.vn_mntdir && | ||
| self.vn_type == other.vn_type && | ||
| self.vn_mode == other.vn_mode && | ||
| self_vn_devname == other_vn_devname | ||
| self.vn_fileid == other.vn_fileid | ||
| && self.vn_size == other.vn_size | ||
| && self.vn_dev == other.vn_dev | ||
| && self.vn_fsid == other.vn_fsid | ||
| && self.vn_mntdir == other.vn_mntdir | ||
| && self.vn_type == other.vn_type | ||
| && self.vn_mode == other.vn_mode | ||
| && self_vn_devname == other_vn_devname | ||
| } | ||
@@ -459,0 +458,0 @@ } |
@@ -186,3 +186,3 @@ // APIs in FreeBSD 14 that have changed since 11. | ||
| /// Spare string space. | ||
| pub ki_sparestrings: [[::c_char; 23]; 2], // little hack to allow PartialEq | ||
| pub ki_sparestrings: [::c_char; 46], | ||
| /// Spare room for growth. | ||
@@ -343,11 +343,11 @@ pub ki_spareints: [::c_int; ::KI_NSPARE_INT], | ||
| && self | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -412,7 +412,6 @@ } | ||
| && self.d_namlen == other.d_namlen | ||
| && self | ||
| .d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self.d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -449,10 +448,10 @@ } | ||
| self.vn_fileid == other.vn_fileid && | ||
| self.vn_size == other.vn_size && | ||
| self.vn_dev == other.vn_dev && | ||
| self.vn_fsid == other.vn_fsid && | ||
| self.vn_mntdir == other.vn_mntdir && | ||
| self.vn_type == other.vn_type && | ||
| self.vn_mode == other.vn_mode && | ||
| self_vn_devname == other_vn_devname | ||
| self.vn_fileid == other.vn_fileid | ||
| && self.vn_size == other.vn_size | ||
| && self.vn_dev == other.vn_dev | ||
| && self.vn_fsid == other.vn_fsid | ||
| && self.vn_mntdir == other.vn_mntdir | ||
| && self.vn_type == other.vn_type | ||
| && self.vn_mode == other.vn_mode | ||
| && self_vn_devname == other_vn_devname | ||
| } | ||
@@ -459,0 +458,0 @@ } |
@@ -186,3 +186,3 @@ // APIs in FreeBSD 15 that have changed since 11. | ||
| /// Spare string space. | ||
| pub ki_sparestrings: [[::c_char; 23]; 2], // little hack to allow PartialEq | ||
| pub ki_sparestrings: [::c_char; 46], | ||
| /// Spare room for growth. | ||
@@ -343,11 +343,11 @@ pub ki_spareints: [::c_int; ::KI_NSPARE_INT], | ||
| && self | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntfromname | ||
| .iter() | ||
| .zip(other.f_mntfromname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .f_mntonname | ||
| .iter() | ||
| .zip(other.f_mntonname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -412,7 +412,6 @@ } | ||
| && self.d_namlen == other.d_namlen | ||
| && self | ||
| .d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| && self.d_name[..self.d_namlen as _] | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -449,10 +448,10 @@ } | ||
| self.vn_fileid == other.vn_fileid && | ||
| self.vn_size == other.vn_size && | ||
| self.vn_dev == other.vn_dev && | ||
| self.vn_fsid == other.vn_fsid && | ||
| self.vn_mntdir == other.vn_mntdir && | ||
| self.vn_type == other.vn_type && | ||
| self.vn_mode == other.vn_mode && | ||
| self_vn_devname == other_vn_devname | ||
| self.vn_fileid == other.vn_fileid | ||
| && self.vn_size == other.vn_size | ||
| && self.vn_dev == other.vn_dev | ||
| && self.vn_fsid == other.vn_fsid | ||
| && self.vn_mntdir == other.vn_mntdir | ||
| && self.vn_type == other.vn_type | ||
| && self.vn_mode == other.vn_mode | ||
| && self_vn_devname == other_vn_devname | ||
| } | ||
@@ -459,0 +458,0 @@ } |
@@ -10,18 +10,14 @@ pub type c_char = u8; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| s_no_extra_traits! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_vers: ::c_int, | ||
| pub mc_flags: ::c_int, | ||
| pub mc_onstack: ::c_int, | ||
| pub mc_len: ::c_int, | ||
| pub mc_avec: [u64; 64], | ||
| pub mc_av: [u32; 2], | ||
| pub mc_frame: [::register_t; 42], | ||
| pub mc_fpreg: [u64; 33], | ||
| pub mc_vsxfpreg: [u64; 32], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_vers: ::c_int, | ||
| pub mc_flags: ::c_int, | ||
| pub mc_onstack: ::c_int, | ||
| pub mc_len: ::c_int, | ||
| pub mc_avec: [u64; 64], | ||
| pub mc_av: [u32; 2], | ||
| pub mc_frame: [::register_t; 42], | ||
| pub mc_fpreg: [u64; 33], | ||
| pub mc_vsxfpreg: [u64; 32], | ||
| } | ||
@@ -31,14 +27,14 @@ } | ||
| cfg_if! { | ||
| if #[cfg(all(libc_align, feature = "extra_traits"))] { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for mcontext_t { | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_vers == other.mc_vers && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_onstack == other.mc_onstack && | ||
| self.mc_len == other.mc_len && | ||
| self.mc_avec == other.mc_avec && | ||
| self.mc_av == other.mc_av && | ||
| self.mc_frame == other.mc_frame && | ||
| self.mc_fpreg == other.mc_fpreg && | ||
| self.mc_vsxfpreg == other.mc_vsxfpreg | ||
| self.mc_vers == other.mc_vers | ||
| && self.mc_flags == other.mc_flags | ||
| && self.mc_onstack == other.mc_onstack | ||
| && self.mc_len == other.mc_len | ||
| && self.mc_avec == other.mc_avec | ||
| && self.mc_av == other.mc_av | ||
| && self.mc_frame == other.mc_frame | ||
| && self.mc_fpreg == other.mc_fpreg | ||
| && self.mc_vsxfpreg == other.mc_vsxfpreg | ||
| } | ||
@@ -78,12 +74,3 @@ } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 4 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
@@ -90,0 +77,0 @@ pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; |
@@ -10,18 +10,14 @@ pub type c_char = u8; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| s_no_extra_traits! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_vers: ::c_int, | ||
| pub mc_flags: ::c_int, | ||
| pub mc_onstack: ::c_int, | ||
| pub mc_len: ::c_int, | ||
| pub mc_avec: [u64; 64], | ||
| pub mc_av: [u32; 2], | ||
| pub mc_frame: [::register_t; 42], | ||
| pub mc_fpreg: [u64; 33], | ||
| pub mc_vsxfpreg: [u64; 32], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_vers: ::c_int, | ||
| pub mc_flags: ::c_int, | ||
| pub mc_onstack: ::c_int, | ||
| pub mc_len: ::c_int, | ||
| pub mc_avec: [u64; 64], | ||
| pub mc_av: [u32; 2], | ||
| pub mc_frame: [::register_t; 42], | ||
| pub mc_fpreg: [u64; 33], | ||
| pub mc_vsxfpreg: [u64; 32], | ||
| } | ||
@@ -31,14 +27,14 @@ } | ||
| cfg_if! { | ||
| if #[cfg(all(libc_align, feature = "extra_traits"))] { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for mcontext_t { | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_vers == other.mc_vers && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_onstack == other.mc_onstack && | ||
| self.mc_len == other.mc_len && | ||
| self.mc_avec == other.mc_avec && | ||
| self.mc_av == other.mc_av && | ||
| self.mc_frame == other.mc_frame && | ||
| self.mc_fpreg == other.mc_fpreg && | ||
| self.mc_vsxfpreg == other.mc_vsxfpreg | ||
| self.mc_vers == other.mc_vers | ||
| && self.mc_flags == other.mc_flags | ||
| && self.mc_onstack == other.mc_onstack | ||
| && self.mc_len == other.mc_len | ||
| && self.mc_avec == other.mc_avec | ||
| && self.mc_av == other.mc_av | ||
| && self.mc_frame == other.mc_frame | ||
| && self.mc_fpreg == other.mc_fpreg | ||
| && self.mc_vsxfpreg == other.mc_vsxfpreg | ||
| } | ||
@@ -78,17 +74,9 @@ } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; | ||
| pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; | ||
| pub const MAP_32BIT: ::c_int = 0x00080000; | ||
| pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 | ||
| pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; |
@@ -24,6 +24,6 @@ pub type c_char = u8; | ||
| pub struct fpregs { | ||
| pub fp_x: [[::register_t; 2]; 32], | ||
| pub fp_fcsr: ::register_t, | ||
| pub fp_x: [[u64; 2]; 32], | ||
| pub fp_fcsr: u64, | ||
| pub fp_flags: ::c_int, | ||
| pub fp_pad: ::c_int, | ||
| pub pad: ::c_int, | ||
| } | ||
@@ -40,26 +40,15 @@ | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for gpregs { | ||
| fn eq(&self, other: &gpregs) -> bool { | ||
| self.gp_ra == other.gp_ra && | ||
| self.gp_sp == other.gp_sp && | ||
| self.gp_gp == other.gp_gp && | ||
| self.gp_tp == other.gp_tp && | ||
| self.gp_t.iter().zip(other.gp_t.iter()).all(|(a, b)| a == b) && | ||
| self.gp_s.iter().zip(other.gp_s.iter()).all(|(a, b)| a == b) && | ||
| self.gp_a.iter().zip(other.gp_a.iter()).all(|(a, b)| a == b) && | ||
| self.gp_sepc == other.gp_sepc && | ||
| self.gp_sstatus == other.gp_sstatus | ||
| self.gp_ra == other.gp_ra | ||
| && self.gp_sp == other.gp_sp | ||
| && self.gp_gp == other.gp_gp | ||
| && self.gp_tp == other.gp_tp | ||
| && self.gp_t.iter().zip(other.gp_t.iter()).all(|(a, b)| a == b) | ||
| && self.gp_s.iter().zip(other.gp_s.iter()).all(|(a, b)| a == b) | ||
| && self.gp_a.iter().zip(other.gp_a.iter()).all(|(a, b)| a == b) | ||
| && self.gp_sepc == other.gp_sepc | ||
| && self.gp_sstatus == other.gp_sstatus | ||
| } | ||
@@ -98,6 +87,6 @@ } | ||
| fn eq(&self, other: &fpregs) -> bool { | ||
| self.fp_x == other.fp_x && | ||
| self.fp_fcsr == other.fp_fcsr && | ||
| self.fp_flags == other.fp_flags && | ||
| self.fp_pad == other.fp_pad | ||
| self.fp_x == other.fp_x | ||
| && self.fp_fcsr == other.fp_fcsr | ||
| && self.fp_flags == other.fp_flags | ||
| && self.pad == other.pad | ||
| } | ||
@@ -112,3 +101,3 @@ } | ||
| .field("fp_flags", &self.fp_flags) | ||
| .field("fp_pad", &self.fp_pad) | ||
| .field("pad", &self.pad) | ||
| .finish() | ||
@@ -122,3 +111,3 @@ } | ||
| self.fp_flags.hash(state); | ||
| self.fp_pad.hash(state); | ||
| self.pad.hash(state); | ||
| } | ||
@@ -128,7 +117,11 @@ } | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_gpregs == other.mc_gpregs && | ||
| self.mc_fpregs == other.mc_fpregs && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_pad == other.mc_pad && | ||
| self.mc_spare.iter().zip(other.mc_spare.iter()).all(|(a, b)| a == b) | ||
| self.mc_gpregs == other.mc_gpregs | ||
| && self.mc_fpregs == other.mc_fpregs | ||
| && self.mc_flags == other.mc_flags | ||
| && self.mc_pad == other.mc_pad | ||
| && self | ||
| .mc_spare | ||
| .iter() | ||
| .zip(other.mc_spare.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -160,2 +153,4 @@ } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
| pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; | ||
@@ -162,0 +157,0 @@ pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; |
@@ -85,3 +85,2 @@ pub type c_char = i8; | ||
| #[cfg(libc_union)] | ||
| pub union __c_anonymous_elf64_auxv_union { | ||
@@ -95,5 +94,52 @@ pub a_val: ::c_long, | ||
| pub a_type: ::c_long, | ||
| #[cfg(libc_union)] | ||
| pub a_un: __c_anonymous_elf64_auxv_union, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_onstack: register_t, | ||
| pub mc_rdi: register_t, | ||
| pub mc_rsi: register_t, | ||
| pub mc_rdx: register_t, | ||
| pub mc_rcx: register_t, | ||
| pub mc_r8: register_t, | ||
| pub mc_r9: register_t, | ||
| pub mc_rax: register_t, | ||
| pub mc_rbx: register_t, | ||
| pub mc_rbp: register_t, | ||
| pub mc_r10: register_t, | ||
| pub mc_r11: register_t, | ||
| pub mc_r12: register_t, | ||
| pub mc_r13: register_t, | ||
| pub mc_r14: register_t, | ||
| pub mc_r15: register_t, | ||
| pub mc_trapno: u32, | ||
| pub mc_fs: u16, | ||
| pub mc_gs: u16, | ||
| pub mc_addr: register_t, | ||
| pub mc_flags: u32, | ||
| pub mc_es: u16, | ||
| pub mc_ds: u16, | ||
| pub mc_err: register_t, | ||
| pub mc_rip: register_t, | ||
| pub mc_cs: register_t, | ||
| pub mc_rflags: register_t, | ||
| pub mc_rsp: register_t, | ||
| pub mc_ss: register_t, | ||
| pub mc_len: c_long, | ||
| pub mc_fpformat: c_long, | ||
| pub mc_ownedfp: c_long, | ||
| pub mc_fpstate: [c_long; 64], | ||
| pub mc_fsbase: register_t, | ||
| pub mc_gsbase: register_t, | ||
| pub mc_xfpustate: register_t, | ||
| pub mc_xfpustate_len: register_t, | ||
| pub mc_spare: [c_long; 4], | ||
| } | ||
| } | ||
@@ -105,9 +151,10 @@ | ||
| fn eq(&self, other: &fpreg32) -> bool { | ||
| self.fpr_env == other.fpr_env && | ||
| self.fpr_acc == other.fpr_acc && | ||
| self.fpr_ex_sw == other.fpr_ex_sw && | ||
| self.fpr_pad | ||
| self.fpr_env == other.fpr_env | ||
| && self.fpr_acc == other.fpr_acc | ||
| && self.fpr_ex_sw == other.fpr_ex_sw | ||
| && self | ||
| .fpr_pad | ||
| .iter() | ||
| .zip(other.fpr_pad.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -137,6 +184,6 @@ } | ||
| fn eq(&self, other: &fpreg) -> bool { | ||
| self.fpr_env == other.fpr_env && | ||
| self.fpr_acc == other.fpr_acc && | ||
| self.fpr_xacc == other.fpr_xacc && | ||
| self.fpr_spare == other.fpr_spare | ||
| self.fpr_env == other.fpr_env | ||
| && self.fpr_acc == other.fpr_acc | ||
| && self.fpr_xacc == other.fpr_xacc | ||
| && self.fpr_spare == other.fpr_spare | ||
| } | ||
@@ -166,9 +213,10 @@ } | ||
| fn eq(&self, other: &xmmreg) -> bool { | ||
| self.xmm_env == other.xmm_env && | ||
| self.xmm_acc == other.xmm_acc && | ||
| self.xmm_reg == other.xmm_reg && | ||
| self.xmm_pad | ||
| self.xmm_env == other.xmm_env | ||
| && self.xmm_acc == other.xmm_acc | ||
| && self.xmm_reg == other.xmm_reg | ||
| && self | ||
| .xmm_pad | ||
| .iter() | ||
| .zip(other.xmm_pad.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -196,13 +244,12 @@ } | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __c_anonymous_elf64_auxv_union { | ||
| fn eq(&self, other: &__c_anonymous_elf64_auxv_union) -> bool { | ||
| unsafe { self.a_val == other.a_val | ||
| unsafe { | ||
| self.a_val == other.a_val | ||
| || self.a_ptr == other.a_ptr | ||
| || self.a_fcn == other.a_fcn } | ||
| || self.a_fcn == other.a_fcn | ||
| } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __c_anonymous_elf64_auxv_union {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __c_anonymous_elf64_auxv_union { | ||
@@ -215,17 +262,8 @@ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| } | ||
| #[cfg(not(libc_union))] | ||
| impl PartialEq for Elf64_Auxinfo { | ||
| fn eq(&self, other: &Elf64_Auxinfo) -> bool { | ||
| self.a_type == other.a_type | ||
| self.a_type == other.a_type && self.a_un == other.a_un | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for Elf64_Auxinfo { | ||
| fn eq(&self, other: &Elf64_Auxinfo) -> bool { | ||
| self.a_type == other.a_type | ||
| && self.a_un == other.a_un | ||
| } | ||
| } | ||
| impl Eq for Elf64_Auxinfo {} | ||
| #[cfg(not(libc_union))] | ||
| impl ::fmt::Debug for Elf64_Auxinfo { | ||
@@ -235,27 +273,144 @@ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| .field("a_type", &self.a_type) | ||
| .field("a_un", &self.a_un) | ||
| .finish() | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for Elf64_Auxinfo { | ||
| impl PartialEq for mcontext_t { | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_onstack == other.mc_onstack | ||
| && self.mc_rdi == other.mc_rdi | ||
| && self.mc_rsi == other.mc_rsi | ||
| && self.mc_rdx == other.mc_rdx | ||
| && self.mc_rcx == other.mc_rcx | ||
| && self.mc_r8 == other.mc_r8 | ||
| && self.mc_r9 == other.mc_r9 | ||
| && self.mc_rax == other.mc_rax | ||
| && self.mc_rbx == other.mc_rbx | ||
| && self.mc_rbp == other.mc_rbp | ||
| && self.mc_r10 == other.mc_r10 | ||
| && self.mc_r11 == other.mc_r11 | ||
| && self.mc_r12 == other.mc_r12 | ||
| && self.mc_r13 == other.mc_r13 | ||
| && self.mc_r14 == other.mc_r14 | ||
| && self.mc_r15 == other.mc_r15 | ||
| && self.mc_trapno == other.mc_trapno | ||
| && self.mc_fs == other.mc_fs | ||
| && self.mc_gs == other.mc_gs | ||
| && self.mc_addr == other.mc_addr | ||
| && self.mc_flags == other.mc_flags | ||
| && self.mc_es == other.mc_es | ||
| && self.mc_ds == other.mc_ds | ||
| && self.mc_err == other.mc_err | ||
| && self.mc_rip == other.mc_rip | ||
| && self.mc_cs == other.mc_cs | ||
| && self.mc_rflags == other.mc_rflags | ||
| && self.mc_rsp == other.mc_rsp | ||
| && self.mc_ss == other.mc_ss | ||
| && self.mc_len == other.mc_len | ||
| && self.mc_fpformat == other.mc_fpformat | ||
| && self.mc_ownedfp == other.mc_ownedfp | ||
| && self | ||
| .mc_fpstate | ||
| .iter() | ||
| .zip(other.mc_fpstate.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self.mc_fsbase == other.mc_fsbase | ||
| && self.mc_gsbase == other.mc_gsbase | ||
| && self.mc_xfpustate == other.mc_xfpustate | ||
| && self.mc_xfpustate_len == other.mc_xfpustate_len | ||
| && self.mc_spare == other.mc_spare | ||
| } | ||
| } | ||
| impl Eq for mcontext_t {} | ||
| impl ::fmt::Debug for mcontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("Elf64_Auxinfo") | ||
| .field("a_type", &self.a_type) | ||
| .field("a_un", &self.a_un) | ||
| f.debug_struct("mcontext_t") | ||
| .field("mc_onstack", &self.mc_onstack) | ||
| .field("mc_rdi", &self.mc_rdi) | ||
| .field("mc_rsi", &self.mc_rsi) | ||
| .field("mc_rdx", &self.mc_rdx) | ||
| .field("mc_rcx", &self.mc_rcx) | ||
| .field("mc_r8", &self.mc_r8) | ||
| .field("mc_r9", &self.mc_r9) | ||
| .field("mc_rax", &self.mc_rax) | ||
| .field("mc_rbx", &self.mc_rbx) | ||
| .field("mc_rbp", &self.mc_rbp) | ||
| .field("mc_r10", &self.mc_r10) | ||
| .field("mc_r11", &self.mc_r11) | ||
| .field("mc_r12", &self.mc_r12) | ||
| .field("mc_r13", &self.mc_r13) | ||
| .field("mc_r14", &self.mc_r14) | ||
| .field("mc_r15", &self.mc_r15) | ||
| .field("mc_trapno", &self.mc_trapno) | ||
| .field("mc_fs", &self.mc_fs) | ||
| .field("mc_gs", &self.mc_gs) | ||
| .field("mc_addr", &self.mc_addr) | ||
| .field("mc_flags", &self.mc_flags) | ||
| .field("mc_es", &self.mc_es) | ||
| .field("mc_ds", &self.mc_ds) | ||
| .field("mc_err", &self.mc_err) | ||
| .field("mc_rip", &self.mc_rip) | ||
| .field("mc_cs", &self.mc_cs) | ||
| .field("mc_rflags", &self.mc_rflags) | ||
| .field("mc_rsp", &self.mc_rsp) | ||
| .field("mc_ss", &self.mc_ss) | ||
| .field("mc_len", &self.mc_len) | ||
| .field("mc_fpformat", &self.mc_fpformat) | ||
| .field("mc_ownedfp", &self.mc_ownedfp) | ||
| // FIXME: .field("mc_fpstate", &self.mc_fpstate) | ||
| .field("mc_fsbase", &self.mc_fsbase) | ||
| .field("mc_gsbase", &self.mc_gsbase) | ||
| .field("mc_xfpustate", &self.mc_xfpustate) | ||
| .field("mc_xfpustate_len", &self.mc_xfpustate_len) | ||
| .field("mc_spare", &self.mc_spare) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for mcontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.mc_onstack.hash(state); | ||
| self.mc_rdi.hash(state); | ||
| self.mc_rsi.hash(state); | ||
| self.mc_rdx.hash(state); | ||
| self.mc_rcx.hash(state); | ||
| self.mc_r8.hash(state); | ||
| self.mc_r9.hash(state); | ||
| self.mc_rax.hash(state); | ||
| self.mc_rbx.hash(state); | ||
| self.mc_rbp.hash(state); | ||
| self.mc_r10.hash(state); | ||
| self.mc_r11.hash(state); | ||
| self.mc_r12.hash(state); | ||
| self.mc_r13.hash(state); | ||
| self.mc_r14.hash(state); | ||
| self.mc_r15.hash(state); | ||
| self.mc_trapno.hash(state); | ||
| self.mc_fs.hash(state); | ||
| self.mc_gs.hash(state); | ||
| self.mc_addr.hash(state); | ||
| self.mc_flags.hash(state); | ||
| self.mc_es.hash(state); | ||
| self.mc_ds.hash(state); | ||
| self.mc_err.hash(state); | ||
| self.mc_rip.hash(state); | ||
| self.mc_cs.hash(state); | ||
| self.mc_rflags.hash(state); | ||
| self.mc_rsp.hash(state); | ||
| self.mc_ss.hash(state); | ||
| self.mc_len.hash(state); | ||
| self.mc_fpformat.hash(state); | ||
| self.mc_ownedfp.hash(state); | ||
| self.mc_fpstate.hash(state); | ||
| self.mc_fsbase.hash(state); | ||
| self.mc_gsbase.hash(state); | ||
| self.mc_xfpustate.hash(state); | ||
| self.mc_xfpustate_len.hash(state); | ||
| self.mc_spare.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
@@ -282,8 +437,1 @@ pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; | ||
| pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -10,87 +10,80 @@ pub type c_char = i8; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| s_no_extra_traits! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_onstack: register_t, | ||
| pub mc_gs: register_t, | ||
| pub mc_fs: register_t, | ||
| pub mc_es: register_t, | ||
| pub mc_ds: register_t, | ||
| pub mc_edi: register_t, | ||
| pub mc_esi: register_t, | ||
| pub mc_ebp: register_t, | ||
| pub mc_isp: register_t, | ||
| pub mc_ebx: register_t, | ||
| pub mc_edx: register_t, | ||
| pub mc_ecx: register_t, | ||
| pub mc_eax: register_t, | ||
| pub mc_trapno: register_t, | ||
| pub mc_err: register_t, | ||
| pub mc_eip: register_t, | ||
| pub mc_cs: register_t, | ||
| pub mc_eflags: register_t, | ||
| pub mc_esp: register_t, | ||
| pub mc_ss: register_t, | ||
| pub mc_len: ::c_int, | ||
| pub mc_fpformat: ::c_int, | ||
| pub mc_ownedfp: ::c_int, | ||
| pub mc_flags: register_t, | ||
| pub mc_fpstate: [::c_int; 128], | ||
| pub mc_fsbase: register_t, | ||
| pub mc_gsbase: register_t, | ||
| pub mc_xfpustate: register_t, | ||
| pub mc_xfpustate_len: register_t, | ||
| pub mc_spare2: [::c_int; 4], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_onstack: register_t, | ||
| pub mc_gs: register_t, | ||
| pub mc_fs: register_t, | ||
| pub mc_es: register_t, | ||
| pub mc_ds: register_t, | ||
| pub mc_edi: register_t, | ||
| pub mc_esi: register_t, | ||
| pub mc_ebp: register_t, | ||
| pub mc_isp: register_t, | ||
| pub mc_ebx: register_t, | ||
| pub mc_edx: register_t, | ||
| pub mc_ecx: register_t, | ||
| pub mc_eax: register_t, | ||
| pub mc_trapno: register_t, | ||
| pub mc_err: register_t, | ||
| pub mc_eip: register_t, | ||
| pub mc_cs: register_t, | ||
| pub mc_eflags: register_t, | ||
| pub mc_esp: register_t, | ||
| pub mc_ss: register_t, | ||
| pub mc_len: ::c_int, | ||
| pub mc_fpformat: ::c_int, | ||
| pub mc_ownedfp: ::c_int, | ||
| pub mc_flags: register_t, | ||
| pub mc_fpstate: [::c_int; 128], | ||
| pub mc_fsbase: register_t, | ||
| pub mc_gsbase: register_t, | ||
| pub mc_xfpustate: register_t, | ||
| pub mc_xfpustate_len: register_t, | ||
| pub mc_spare2: [::c_int; 4], | ||
| } | ||
| } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 4 - 1; | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(all(libc_align, feature = "extra_traits"))] { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for mcontext_t { | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_onstack == other.mc_onstack && | ||
| self.mc_gs == other.mc_gs && | ||
| self.mc_fs == other.mc_fs && | ||
| self.mc_es == other.mc_es && | ||
| self.mc_ds == other.mc_ds && | ||
| self.mc_edi == other.mc_edi && | ||
| self.mc_esi == other.mc_esi && | ||
| self.mc_ebp == other.mc_ebp && | ||
| self.mc_isp == other.mc_isp && | ||
| self.mc_ebx == other.mc_ebx && | ||
| self.mc_edx == other.mc_edx && | ||
| self.mc_ecx == other.mc_ecx && | ||
| self.mc_eax == other.mc_eax && | ||
| self.mc_trapno == other.mc_trapno && | ||
| self.mc_err == other.mc_err && | ||
| self.mc_eip == other.mc_eip && | ||
| self.mc_cs == other.mc_cs && | ||
| self.mc_eflags == other.mc_eflags && | ||
| self.mc_esp == other.mc_esp && | ||
| self.mc_ss == other.mc_ss && | ||
| self.mc_len == other.mc_len && | ||
| self.mc_fpformat == other.mc_fpformat && | ||
| self.mc_ownedfp == other.mc_ownedfp && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_fpstate.iter().zip(other.mc_fpstate.iter()).all(|(a, b)| a == b) && | ||
| self.mc_fsbase == other.mc_fsbase && | ||
| self.mc_gsbase == other.mc_gsbase && | ||
| self.mc_xfpustate == other.mc_xfpustate && | ||
| self.mc_xfpustate_len == other.mc_xfpustate_len && | ||
| self.mc_spare2.iter().zip(other.mc_spare2.iter()).all(|(a, b)| a == b) | ||
| self.mc_onstack == other.mc_onstack | ||
| && self.mc_gs == other.mc_gs | ||
| && self.mc_fs == other.mc_fs | ||
| && self.mc_es == other.mc_es | ||
| && self.mc_ds == other.mc_ds | ||
| && self.mc_edi == other.mc_edi | ||
| && self.mc_esi == other.mc_esi | ||
| && self.mc_ebp == other.mc_ebp | ||
| && self.mc_isp == other.mc_isp | ||
| && self.mc_ebx == other.mc_ebx | ||
| && self.mc_edx == other.mc_edx | ||
| && self.mc_ecx == other.mc_ecx | ||
| && self.mc_eax == other.mc_eax | ||
| && self.mc_trapno == other.mc_trapno | ||
| && self.mc_err == other.mc_err | ||
| && self.mc_eip == other.mc_eip | ||
| && self.mc_cs == other.mc_cs | ||
| && self.mc_eflags == other.mc_eflags | ||
| && self.mc_esp == other.mc_esp | ||
| && self.mc_ss == other.mc_ss | ||
| && self.mc_len == other.mc_len | ||
| && self.mc_fpformat == other.mc_fpformat | ||
| && self.mc_ownedfp == other.mc_ownedfp | ||
| && self.mc_flags == other.mc_flags | ||
| && self | ||
| .mc_fpstate | ||
| .iter() | ||
| .zip(other.mc_fpstate.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self.mc_fsbase == other.mc_fsbase | ||
| && self.mc_gsbase == other.mc_gsbase | ||
| && self.mc_xfpustate == other.mc_xfpustate | ||
| && self.mc_xfpustate_len == other.mc_xfpustate_len | ||
| && self | ||
| .mc_spare2 | ||
| .iter() | ||
| .zip(other.mc_spare2.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -126,4 +119,3 @@ } | ||
| .field("mc_flags", &self.mc_flags) | ||
| // FIXME(msrv) debug not supported for arrays in old MSRV | ||
| // .field("mc_fpstate", &self.mc_fpstate) | ||
| .field("mc_fpstate", &self.mc_fpstate) | ||
| .field("mc_fsbase", &self.mc_fsbase) | ||
@@ -174,2 +166,4 @@ .field("mc_gsbase", &self.mc_gsbase) | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 | ||
@@ -176,0 +170,0 @@ |
+59
-48
@@ -38,9 +38,11 @@ pub type off_t = i64; | ||
| #[cfg(not(any(target_os = "macos", | ||
| target_os = "ios", | ||
| target_os = "tvos", | ||
| target_os = "watchos", | ||
| target_os = "visionos", | ||
| target_os = "netbsd", | ||
| target_os = "openbsd")))] | ||
| #[cfg(not(any( | ||
| target_os = "macos", | ||
| target_os = "ios", | ||
| target_os = "tvos", | ||
| target_os = "watchos", | ||
| target_os = "visionos", | ||
| target_os = "netbsd", | ||
| target_os = "openbsd" | ||
| )))] | ||
| pub pw_fields: ::c_int, | ||
@@ -58,12 +60,16 @@ } | ||
| #[cfg(target_os = "netbsd")] | ||
| pub ifa_addrflags: ::c_uint | ||
| pub ifa_addrflags: ::c_uint, | ||
| } | ||
| pub struct fd_set { | ||
| #[cfg(all(target_pointer_width = "64", | ||
| any(target_os = "freebsd", target_os = "dragonfly")))] | ||
| fds_bits: [i64; FD_SETSIZE / 64], | ||
| #[cfg(not(all(target_pointer_width = "64", | ||
| any(target_os = "freebsd", target_os = "dragonfly"))))] | ||
| fds_bits: [i32; FD_SETSIZE / 32], | ||
| #[cfg(all( | ||
| target_pointer_width = "64", | ||
| any(target_os = "freebsd", target_os = "dragonfly") | ||
| ))] | ||
| fds_bits: [i64; FD_SETSIZE as usize / 64], | ||
| #[cfg(not(all( | ||
| target_pointer_width = "64", | ||
| any(target_os = "freebsd", target_os = "dragonfly") | ||
| )))] | ||
| fds_bits: [i32; FD_SETSIZE as usize / 32], | ||
| } | ||
@@ -134,3 +140,3 @@ | ||
| pub sun_family: sa_family_t, | ||
| pub sun_path: [c_char; 104] | ||
| pub sun_path: [::c_char; 104], | ||
| } | ||
@@ -160,3 +166,2 @@ | ||
| } | ||
| } | ||
@@ -171,6 +176,6 @@ | ||
| && self | ||
| .sun_path | ||
| .iter() | ||
| .zip(other.sun_path.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .sun_path | ||
| .iter() | ||
| .zip(other.sun_path.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -186,3 +191,3 @@ } | ||
| .field("sun_family", &self.sun_family) | ||
| // FIXME: .field("sun_path", &self.sun_path) | ||
| // FIXME: .field("sun_path", &self.sun_path) | ||
| .finish() | ||
@@ -205,23 +210,23 @@ } | ||
| .zip(other.sysname.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .nodename | ||
| .iter() | ||
| .zip(other.nodename.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .nodename | ||
| .iter() | ||
| .zip(other.nodename.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .release | ||
| .iter() | ||
| .zip(other.release.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .release | ||
| .iter() | ||
| .zip(other.release.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .version | ||
| .iter() | ||
| .zip(other.version.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .version | ||
| .iter() | ||
| .zip(other.version.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .machine | ||
| .iter() | ||
| .zip(other.machine.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .machine | ||
| .iter() | ||
| .zip(other.machine.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -235,7 +240,7 @@ } | ||
| f.debug_struct("utsname") | ||
| // FIXME: .field("sysname", &self.sysname) | ||
| // FIXME: .field("nodename", &self.nodename) | ||
| // FIXME: .field("release", &self.release) | ||
| // FIXME: .field("version", &self.version) | ||
| // FIXME: .field("machine", &self.machine) | ||
| // FIXME: .field("sysname", &self.sysname) | ||
| // FIXME: .field("nodename", &self.nodename) | ||
| // FIXME: .field("release", &self.release) | ||
| // FIXME: .field("version", &self.version) | ||
| // FIXME: .field("machine", &self.machine) | ||
| .finish() | ||
@@ -602,3 +607,3 @@ } | ||
| } else { | ||
| 0 as *mut ::cmsghdr | ||
| core::ptr::null_mut() | ||
| } | ||
@@ -611,3 +616,3 @@ } | ||
| (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); | ||
| return | ||
| return; | ||
| } | ||
@@ -618,3 +623,3 @@ | ||
| let fd = fd as usize; | ||
| return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0 | ||
| return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; | ||
| } | ||
@@ -626,3 +631,3 @@ | ||
| (*set).fds_bits[fd / bits] |= 1 << (fd % bits); | ||
| return | ||
| return; | ||
| } | ||
@@ -977,3 +982,9 @@ | ||
| cfg_if! { | ||
| if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))] { | ||
| if #[cfg(any( | ||
| target_os = "macos", | ||
| target_os = "ios", | ||
| target_os = "tvos", | ||
| target_os = "watchos", | ||
| target_os = "visionos" | ||
| ))] { | ||
| mod apple; | ||
@@ -980,0 +991,0 @@ pub use self::apple::*; |
@@ -372,2 +372,3 @@ pub type wchar_t = i32; | ||
| // DIFF(main): changed to `c_short` in f62eb023ab | ||
| pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x01; | ||
@@ -758,2 +759,4 @@ pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x02; | ||
| pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; | ||
| // DIFF(main): changed to `*const *mut` in e77f551de9 | ||
| pub fn execvpe( | ||
@@ -764,2 +767,3 @@ file: *const ::c_char, | ||
| ) -> ::c_int; | ||
| pub fn waitid( | ||
@@ -766,0 +770,0 @@ idtype: idtype_t, |
@@ -11,3 +11,2 @@ use PT_FIRSTMACH; | ||
| pub struct __fregset { | ||
| #[cfg(libc_union)] | ||
| pub __qregs: [__c_anonymous__freg; 32], | ||
@@ -34,3 +33,2 @@ pub __fpcr: u32, | ||
| s_no_extra_traits! { | ||
| #[cfg(libc_union)] | ||
| #[repr(align(16))] | ||
@@ -48,39 +46,35 @@ pub union __c_anonymous__freg { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __c_anonymous__freg { | ||
| fn eq(&self, other: &__c_anonymous__freg) -> bool { | ||
| unsafe { | ||
| self.__b8 == other.__b8 | ||
| || self.__h16 == other.__h16 | ||
| || self.__s32 == other.__s32 | ||
| || self.__d64 == other.__d64 | ||
| || self.__q128 == other.__q128 | ||
| self.__b8 == other.__b8 | ||
| || self.__h16 == other.__h16 | ||
| || self.__s32 == other.__s32 | ||
| || self.__d64 == other.__d64 | ||
| || self.__q128 == other.__q128 | ||
| } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __c_anonymous__freg {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __c_anonymous__freg { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| unsafe { | ||
| f.debug_struct("__c_anonymous__freg") | ||
| .field("__b8", &self.__b8) | ||
| .field("__h16", &self.__h16) | ||
| .field("__s32", &self.__s32) | ||
| .field("__d64", &self.__d64) | ||
| .field("__q128", &self.__q128) | ||
| .finish() | ||
| f.debug_struct("__c_anonymous__freg") | ||
| .field("__b8", &self.__b8) | ||
| .field("__h16", &self.__h16) | ||
| .field("__s32", &self.__s32) | ||
| .field("__d64", &self.__d64) | ||
| .field("__q128", &self.__q128) | ||
| .finish() | ||
| } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl ::hash::Hash for __c_anonymous__freg { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { | ||
| self.__b8.hash(state); | ||
| self.__h16.hash(state); | ||
| self.__s32.hash(state); | ||
| self.__d64.hash(state); | ||
| self.__q128.hash(state); | ||
| self.__b8.hash(state); | ||
| self.__h16.hash(state); | ||
| self.__s32.hash(state); | ||
| self.__d64.hash(state); | ||
| self.__q128.hash(state); | ||
| } | ||
@@ -92,12 +86,3 @@ } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 4 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
@@ -104,0 +89,0 @@ pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 0; |
@@ -8,12 +8,3 @@ use PT_FIRSTMACH; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
@@ -20,0 +11,0 @@ pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1; |
@@ -8,11 +8,3 @@ use PT_FIRSTMACH; | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; | ||
@@ -19,0 +11,0 @@ pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1; |
@@ -8,12 +8,3 @@ use PT_FIRSTMACH; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; | ||
@@ -20,0 +11,0 @@ pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0; |
@@ -6,14 +6,25 @@ use PT_FIRSTMACH; | ||
| pub type c_char = u8; | ||
| pub type __greg_t = u64; | ||
| pub type __cpu_simple_lock_nv_t = ::c_int; | ||
| pub type __gregset = [__greg_t; _NGREG]; | ||
| pub type __fregset = [__freg; _NFREG]; | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| s! { | ||
| pub struct mcontext_t { | ||
| pub __gregs: __gregset, | ||
| pub __fregs: __fpregset, | ||
| __spare: [::__greg_t; 7], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] | ||
| pub union __fpreg { | ||
| pub u_u64: u64, | ||
| pub u_d: ::c_double, | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 0; | ||
@@ -23,1 +34,48 @@ pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 1; | ||
| pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 3; | ||
| pub const _NGREG: usize = 32; | ||
| pub const _NFREG: usize = 33; | ||
| pub const _REG_X1: ::c_int = 0; | ||
| pub const _REG_X2: ::c_int = 1; | ||
| pub const _REG_X3: ::c_int = 2; | ||
| pub const _REG_X4: ::c_int = 3; | ||
| pub const _REG_X5: ::c_int = 4; | ||
| pub const _REG_X6: ::c_int = 5; | ||
| pub const _REG_X7: ::c_int = 6; | ||
| pub const _REG_X8: ::c_int = 7; | ||
| pub const _REG_X9: ::c_int = 8; | ||
| pub const _REG_X10: ::c_int = 9; | ||
| pub const _REG_X11: ::c_int = 10; | ||
| pub const _REG_X12: ::c_int = 11; | ||
| pub const _REG_X13: ::c_int = 12; | ||
| pub const _REG_X14: ::c_int = 13; | ||
| pub const _REG_X15: ::c_int = 14; | ||
| pub const _REG_X16: ::c_int = 15; | ||
| pub const _REG_X17: ::c_int = 16; | ||
| pub const _REG_X18: ::c_int = 17; | ||
| pub const _REG_X19: ::c_int = 18; | ||
| pub const _REG_X20: ::c_int = 19; | ||
| pub const _REG_X21: ::c_int = 20; | ||
| pub const _REG_X22: ::c_int = 21; | ||
| pub const _REG_X23: ::c_int = 22; | ||
| pub const _REG_X24: ::c_int = 23; | ||
| pub const _REG_X25: ::c_int = 24; | ||
| pub const _REG_X26: ::c_int = 25; | ||
| pub const _REG_X27: ::c_int = 26; | ||
| pub const _REG_X28: ::c_int = 27; | ||
| pub const _REG_X29: ::c_int = 28; | ||
| pub const _REG_X30: ::c_int = 29; | ||
| pub const _REG_X31: ::c_int = 30; | ||
| pub const _REG_PC: ::c_int = 31; | ||
| pub const _REG_RA: ::c_int = _REG_X1; | ||
| pub const _REG_SP: ::c_int = _REG_X2; | ||
| pub const _REG_GP: ::c_int = _REG_X3; | ||
| pub const _REG_TP: ::c_int = _REG_X4; | ||
| pub const _REG_S0: ::c_int = _REG_X8; | ||
| pub const _REG_RV: ::c_int = _REG_X10; | ||
| pub const _REG_A0: ::c_int = _REG_X10; | ||
| pub const _REG_F0: ::c_int = 0; | ||
| pub const _REG_FPCSR: ::c_int = 32; |
@@ -13,3 +13,3 @@ use PT_FIRSTMACH; | ||
| pub _mc_tlsbase: c___greg_t, | ||
| pub __fpregs: [[::c_char;32]; 16], | ||
| pub __fpregs: [[::c_char; 32]; 16], | ||
| } | ||
@@ -26,12 +26,3 @@ | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
@@ -38,0 +29,0 @@ pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0; |
@@ -6,11 +6,2 @@ pub type c_long = i32; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 4 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; |
@@ -19,13 +19,4 @@ pub type c_long = i64; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| pub const _MAX_PAGE_SHIFT: u32 = 12; |
@@ -5,13 +5,4 @@ pub type c_long = i32; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; | ||
| pub const _MAX_PAGE_SHIFT: u32 = 12; |
@@ -5,13 +5,4 @@ pub type c_long = i32; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; | ||
| pub const _MAX_PAGE_SHIFT: u32 = 12; |
@@ -5,13 +5,4 @@ pub type c_long = i64; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| pub const _MAX_PAGE_SHIFT: u32 = 12; |
@@ -24,13 +24,4 @@ pub type c_long = i64; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| pub const _MAX_PAGE_SHIFT: u32 = 12; |
@@ -67,12 +67,18 @@ use PT_FIRSTMACH; | ||
| fn eq(&self, other: &fxsave64) -> bool { | ||
| return {self.fx_fcw} == {other.fx_fcw} && | ||
| {self.fx_fsw} == {other.fx_fsw} && | ||
| {self.fx_ftw} == {other.fx_ftw} && | ||
| {self.fx_fop} == {other.fx_fop} && | ||
| {self.fx_rip} == {other.fx_rip} && | ||
| {self.fx_rdp} == {other.fx_rdp} && | ||
| {self.fx_mxcsr} == {other.fx_mxcsr} && | ||
| {self.fx_mxcsr_mask} == {other.fx_mxcsr_mask} && | ||
| {self.fx_st}.iter().zip({other.fx_st}.iter()).all(|(a,b)| a == b) && | ||
| {self.fx_xmm}.iter().zip({other.fx_xmm}.iter()).all(|(a,b)| a == b) | ||
| return { self.fx_fcw } == { other.fx_fcw } | ||
| && { self.fx_fsw } == { other.fx_fsw } | ||
| && { self.fx_ftw } == { other.fx_ftw } | ||
| && { self.fx_fop } == { other.fx_fop } | ||
| && { self.fx_rip } == { other.fx_rip } | ||
| && { self.fx_rdp } == { other.fx_rdp } | ||
| && { self.fx_mxcsr } == { other.fx_mxcsr } | ||
| && { self.fx_mxcsr_mask } == { other.fx_mxcsr_mask } | ||
| && { self.fx_st } | ||
| .iter() | ||
| .zip({ other.fx_st }.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && { self.fx_xmm } | ||
| .iter() | ||
| .zip({ other.fx_xmm }.iter()) | ||
| .all(|(a, b)| a == b); | ||
| } | ||
@@ -84,10 +90,10 @@ } | ||
| f.debug_struct("fxsave64") | ||
| .field("fx_fcw", &{self.fx_fcw}) | ||
| .field("fx_fsw", &{self.fx_fsw}) | ||
| .field("fx_ftw", &{self.fx_ftw}) | ||
| .field("fx_fop", &{self.fx_fop}) | ||
| .field("fx_rip", &{self.fx_rip}) | ||
| .field("fx_rdp", &{self.fx_rdp}) | ||
| .field("fx_mxcsr", &{self.fx_mxcsr}) | ||
| .field("fx_mxcsr_mask", &{self.fx_mxcsr_mask}) | ||
| .field("fx_fcw", &{ self.fx_fcw }) | ||
| .field("fx_fsw", &{ self.fx_fsw }) | ||
| .field("fx_ftw", &{ self.fx_ftw }) | ||
| .field("fx_fop", &{ self.fx_fop }) | ||
| .field("fx_rip", &{ self.fx_rip }) | ||
| .field("fx_rdp", &{ self.fx_rdp }) | ||
| .field("fx_mxcsr", &{ self.fx_mxcsr }) | ||
| .field("fx_mxcsr_mask", &{ self.fx_mxcsr_mask }) | ||
| // FIXME: .field("fx_st", &{self.fx_st}) | ||
@@ -100,12 +106,12 @@ // FIXME: .field("fx_xmm", &{self.fx_xmm}) | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| {self.fx_fcw}.hash(state); | ||
| {self.fx_fsw}.hash(state); | ||
| {self.fx_ftw}.hash(state); | ||
| {self.fx_fop}.hash(state); | ||
| {self.fx_rip}.hash(state); | ||
| {self.fx_rdp}.hash(state); | ||
| {self.fx_mxcsr}.hash(state); | ||
| {self.fx_mxcsr_mask}.hash(state); | ||
| {self.fx_st}.hash(state); | ||
| {self.fx_xmm}.hash(state); | ||
| { self.fx_fcw }.hash(state); | ||
| { self.fx_fsw }.hash(state); | ||
| { self.fx_ftw }.hash(state); | ||
| { self.fx_fop }.hash(state); | ||
| { self.fx_rip }.hash(state); | ||
| { self.fx_rdp }.hash(state); | ||
| { self.fx_mxcsr }.hash(state); | ||
| { self.fx_mxcsr_mask }.hash(state); | ||
| { self.fx_st }.hash(state); | ||
| { self.fx_xmm }.hash(state); | ||
| } | ||
@@ -116,12 +122,3 @@ } | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 8 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; | ||
@@ -128,0 +125,0 @@ pub const _MAX_PAGE_SHIFT: u32 = 12; |
@@ -5,13 +5,4 @@ pub type c_long = i32; | ||
| // should be pub(crate), but that requires Rust 1.18.0 | ||
| cfg_if! { | ||
| if #[cfg(libc_const_size_of)] { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| } else { | ||
| #[doc(hidden)] | ||
| pub const _ALIGNBYTES: usize = 4 - 1; | ||
| } | ||
| } | ||
| pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; | ||
| pub const _MAX_PAGE_SHIFT: u32 = 12; |
+42
-61
@@ -54,3 +54,3 @@ // This module contains bindings to the native Haiku API. The Haiku API | ||
| B_THREAD_SUSPENDED, | ||
| B_THREAD_WAITING | ||
| B_THREAD_WAITING, | ||
| } | ||
@@ -63,3 +63,3 @@ | ||
| B_ADD_ON_IMAGE, | ||
| B_SYSTEM_IMAGE | ||
| B_SYSTEM_IMAGE, | ||
| } | ||
@@ -226,3 +226,3 @@ | ||
| B_CPU_SPARC, | ||
| B_CPU_RISC_V | ||
| B_CPU_RISC_V, | ||
| } | ||
@@ -245,3 +245,3 @@ | ||
| B_CPU_VENDOR_SUN, | ||
| B_CPU_VENDOR_FUJITSU | ||
| B_CPU_VENDOR_FUJITSU, | ||
| } | ||
@@ -263,3 +263,3 @@ } | ||
| pub out_count: u32, | ||
| pub address: *mut ::c_void | ||
| pub address: *mut ::c_void, | ||
| } | ||
@@ -280,3 +280,3 @@ | ||
| pub sender_group: ::gid_t, | ||
| pub sender_team: ::team_id | ||
| pub sender_team: ::team_id, | ||
| } | ||
@@ -294,3 +294,3 @@ | ||
| pub uid: ::uid_t, | ||
| pub gid: ::gid_t | ||
| pub gid: ::gid_t, | ||
| } | ||
@@ -303,3 +303,3 @@ | ||
| pub count: i32, | ||
| pub latest_holder: thread_id | ||
| pub latest_holder: thread_id, | ||
| } | ||
@@ -309,3 +309,3 @@ | ||
| pub user_time: bigtime_t, | ||
| pub kernel_time: bigtime_t | ||
| pub kernel_time: bigtime_t, | ||
| } | ||
@@ -323,3 +323,3 @@ | ||
| pub stack_base: *mut ::c_void, | ||
| pub stack_end: *mut ::c_void | ||
| pub stack_end: *mut ::c_void, | ||
| } | ||
@@ -330,3 +330,3 @@ | ||
| pub enabled: bool, | ||
| pub current_frequency: u64 | ||
| pub current_frequency: u64, | ||
| } | ||
@@ -359,3 +359,3 @@ | ||
| pub kernel_version: i64, | ||
| pub abi: u32 | ||
| pub abi: u32, | ||
| } | ||
@@ -366,3 +366,3 @@ | ||
| pub type_: u16, | ||
| pub events: u16 | ||
| pub events: u16, | ||
| } | ||
@@ -386,3 +386,3 @@ | ||
| pub type_: u32, | ||
| pub size: ::off_t | ||
| pub size: ::off_t, | ||
| } | ||
@@ -397,3 +397,3 @@ | ||
| pub uid: ::uid_t, | ||
| pub gid: ::gid_t | ||
| pub gid: ::gid_t, | ||
| } | ||
@@ -414,3 +414,3 @@ | ||
| pub volume_name: [::c_char; B_FILE_NAME_LENGTH], | ||
| pub fsh_name: [::c_char; B_OS_NAME_LENGTH] | ||
| pub fsh_name: [::c_char; B_OS_NAME_LENGTH], | ||
| } | ||
@@ -434,3 +434,3 @@ | ||
| pub api_version: i32, | ||
| pub abi: i32 | ||
| pub abi: i32, | ||
| } | ||
@@ -480,3 +480,2 @@ | ||
| s_no_extra_traits! { | ||
| #[cfg(libc_union)] | ||
| pub union cpuid_info { | ||
@@ -491,3 +490,2 @@ pub eax_0: __c_anonymous_eax_0, | ||
| #[cfg(libc_union)] | ||
| pub union __c_anonymous_cpu_topology_info_data { | ||
@@ -503,6 +501,3 @@ pub root: cpu_topology_root_info, | ||
| pub level: u32, | ||
| #[cfg(libc_union)] | ||
| pub data: __c_anonymous_cpu_topology_info_data, | ||
| #[cfg(not(libc_union))] | ||
| pub data: cpu_topology_core_info, | ||
| } | ||
@@ -513,29 +508,26 @@ } | ||
| if #[cfg(feature = "extra_traits")] { | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for cpuid_info { | ||
| fn eq(&self, other: &cpuid_info) -> bool { | ||
| unsafe { | ||
| self.eax_0 == other.eax_0 | ||
| || self.eax_1 == other.eax_1 | ||
| || self.eax_2 == other.eax_2 | ||
| || self.eax_3 == other.eax_3 | ||
| || self.as_chars == other.as_chars | ||
| || self.regs == other.regs | ||
| self.eax_0 == other.eax_0 | ||
| || self.eax_1 == other.eax_1 | ||
| || self.eax_2 == other.eax_2 | ||
| || self.eax_3 == other.eax_3 | ||
| || self.as_chars == other.as_chars | ||
| || self.regs == other.regs | ||
| } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for cpuid_info {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for cpuid_info { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| unsafe { | ||
| f.debug_struct("cpuid_info") | ||
| .field("eax_0", &self.eax_0) | ||
| .field("eax_1", &self.eax_1) | ||
| .field("eax_2", &self.eax_2) | ||
| .field("eax_3", &self.eax_3) | ||
| .field("as_chars", &self.as_chars) | ||
| .field("regs", &self.regs) | ||
| .finish() | ||
| f.debug_struct("cpuid_info") | ||
| .field("eax_0", &self.eax_0) | ||
| .field("eax_1", &self.eax_1) | ||
| .field("eax_2", &self.eax_2) | ||
| .field("eax_3", &self.eax_3) | ||
| .field("as_chars", &self.as_chars) | ||
| .field("regs", &self.regs) | ||
| .finish() | ||
| } | ||
@@ -545,23 +537,20 @@ } | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __c_anonymous_cpu_topology_info_data { | ||
| fn eq(&self, other: &__c_anonymous_cpu_topology_info_data) -> bool { | ||
| unsafe { | ||
| self.root == other.root | ||
| || self.package == other.package | ||
| || self.core == other.core | ||
| self.root == other.root | ||
| || self.package == other.package | ||
| || self.core == other.core | ||
| } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __c_anonymous_cpu_topology_info_data {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __c_anonymous_cpu_topology_info_data { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| unsafe { | ||
| f.debug_struct("__c_anonymous_cpu_topology_info_data") | ||
| .field("root", &self.root) | ||
| .field("package", &self.package) | ||
| .field("core", &self.core) | ||
| .finish() | ||
| f.debug_struct("__c_anonymous_cpu_topology_info_data") | ||
| .field("root", &self.root) | ||
| .field("package", &self.package) | ||
| .field("core", &self.core) | ||
| .finish() | ||
| } | ||
@@ -573,5 +562,3 @@ } | ||
| fn eq(&self, other: &cpu_topology_node_info) -> bool { | ||
| self.id == other.id | ||
| && self.type_ == other.type_ | ||
| && self.level == other.level | ||
| self.id == other.id && self.type_ == other.type_ && self.level == other.level | ||
| } | ||
@@ -1337,3 +1324,3 @@ } | ||
| dependency: *const ::c_char, | ||
| architectur: *const ::c_char, | ||
| architecture: *const ::c_char, | ||
| baseDirectory: path_base_directory, | ||
@@ -1366,10 +1353,4 @@ subPath: *const ::c_char, | ||
| ) -> status_t; | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| extern "C" { | ||
| pub fn get_cpuid(info: *mut cpuid_info, eaxRegister: u32, cpuNum: u32) -> status_t; | ||
| } | ||
| } | ||
| pub fn get_cpuid(info: *mut cpuid_info, eaxRegister: u32, cpuNum: u32) -> status_t; | ||
| } | ||
@@ -1376,0 +1357,0 @@ |
@@ -70,8 +70,13 @@ s_no_extra_traits! { | ||
| && self.mscsr_mask == other.mscsr_mask | ||
| && self._fpreg.iter().zip(other._fpreg.iter()).all(|(a, b)| a == b) | ||
| && self | ||
| ._fpreg | ||
| .iter() | ||
| .zip(other._fpreg.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self._xmm.iter().zip(other._xmm.iter()).all(|(a, b)| a == b) | ||
| && self._reserved_416_511. | ||
| iter(). | ||
| zip(other._reserved_416_511.iter()). | ||
| all(|(a, b)| a == b) | ||
| && self | ||
| ._reserved_416_511 | ||
| .iter() | ||
| .zip(other._reserved_416_511.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -117,3 +122,7 @@ } | ||
| && self.xcomp_bv == other.xcomp_bv | ||
| && self._reserved.iter().zip(other._reserved.iter()).all(|(a, b)| a == b) | ||
| && self | ||
| ._reserved | ||
| .iter() | ||
| .zip(other._reserved.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -143,3 +152,7 @@ } | ||
| && self.fp_xstate == other.fp_xstate | ||
| && self._fp_ymm.iter().zip(other._fp_ymm.iter()).all(|(a, b)| a == b) | ||
| && self | ||
| ._fp_ymm | ||
| .iter() | ||
| .zip(other._fp_ymm.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -212,3 +225,2 @@ } | ||
| .finish() | ||
| } | ||
@@ -215,0 +227,0 @@ } |
@@ -32,117 +32,110 @@ pub type c_char = u8; | ||
| s_no_extra_traits! { | ||
| pub struct __c_anonymous_uc_sigmask_with_padding { | ||
| pub uc_sigmask: ::sigset_t, | ||
| /* Android has a wrong (smaller) sigset_t on x86. */ | ||
| __padding_rt_sigset: u32, | ||
| } | ||
| pub union __c_anonymous_uc_sigmask { | ||
| uc_sigmask: __c_anonymous_uc_sigmask_with_padding, | ||
| uc_sigmask64: ::sigset64_t, | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| pub uc_sigmask__c_anonymous_union: __c_anonymous_uc_sigmask, | ||
| /* The kernel adds extra padding after uc_sigmask to match | ||
| * glibc sigset_t on ARM. */ | ||
| __padding: [c_char; 120], | ||
| __align: [::c_longlong; 0], | ||
| uc_regspace: [::c_ulong; 128], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| s_no_extra_traits! { | ||
| pub struct __c_anonymous_uc_sigmask_with_padding { | ||
| pub uc_sigmask: ::sigset_t, | ||
| /* Android has a wrong (smaller) sigset_t on x86. */ | ||
| __padding_rt_sigset: u32, | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for __c_anonymous_uc_sigmask_with_padding { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask_with_padding) -> bool { | ||
| self.uc_sigmask == other.uc_sigmask | ||
| // Ignore padding | ||
| } | ||
| pub union __c_anonymous_uc_sigmask { | ||
| uc_sigmask: __c_anonymous_uc_sigmask_with_padding, | ||
| uc_sigmask64: ::sigset64_t, | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask_with_padding {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask_with_padding") | ||
| .field("uc_sigmask_with_padding", &self.uc_sigmask) | ||
| // Ignore padding | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask_with_padding { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_sigmask.hash(state) | ||
| // Ignore padding | ||
| } | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| pub uc_sigmask__c_anonymous_union: __c_anonymous_uc_sigmask, | ||
| /* The kernel adds extra padding after uc_sigmask to match | ||
| * glibc sigset_t on ARM. */ | ||
| __padding: [c_char; 120], | ||
| __align: [::c_longlong; 0], | ||
| uc_regspace: [::c_ulong; 128], | ||
| impl PartialEq for __c_anonymous_uc_sigmask { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask) -> bool { | ||
| unsafe { self.uc_sigmask == other.uc_sigmask } | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask") | ||
| .field("uc_sigmask", unsafe { &self.uc_sigmask }) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { self.uc_sigmask.hash(state) } | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for __c_anonymous_uc_sigmask_with_padding { | ||
| fn eq( | ||
| &self, other: &__c_anonymous_uc_sigmask_with_padding | ||
| ) -> bool { | ||
| self.uc_sigmask == other.uc_sigmask | ||
| // Ignore padding | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask_with_padding {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask_with_padding") | ||
| .field("uc_sigmask_with_padding", &self.uc_sigmask) | ||
| // Ignore padding | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask_with_padding { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_sigmask.hash(state) | ||
| // Ignore padding | ||
| } | ||
| } | ||
| impl PartialEq for __c_anonymous_uc_sigmask { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask) -> bool { | ||
| unsafe { self.uc_sigmask == other.uc_sigmask } | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask") | ||
| .field("uc_sigmask", unsafe { &self.uc_sigmask }) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { self.uc_sigmask.hash(state) } | ||
| } | ||
| } | ||
| impl PartialEq for ucontext_t { | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.uc_flags == other.uc_flags | ||
| && self.uc_link == other.uc_link | ||
| && self.uc_stack == other.uc_stack | ||
| && self.uc_mcontext == other.uc_mcontext | ||
| && self.uc_sigmask__c_anonymous_union | ||
| == other.uc_sigmask__c_anonymous_union | ||
| && &self.uc_regspace[..] == &other.uc_regspace[..] | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| impl Eq for ucontext_t {} | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
| .field("uc_flags", &self.uc_flags) | ||
| .field("uc_link", &self.uc_link) | ||
| .field("uc_stack", &self.uc_stack) | ||
| .field("uc_mcontext", &self.uc_mcontext) | ||
| .field( | ||
| "uc_sigmask__c_anonymous_union", | ||
| &self.uc_sigmask__c_anonymous_union | ||
| ) | ||
| .field("uc_regspace", &&self.uc_regspace[..]) | ||
| // Ignore padding field | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for ucontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_flags.hash(state); | ||
| self.uc_link.hash(state); | ||
| self.uc_stack.hash(state); | ||
| self.uc_mcontext.hash(state); | ||
| self.uc_sigmask__c_anonymous_union.hash(state); | ||
| self.uc_regspace[..].hash(state); | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| impl PartialEq for ucontext_t { | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.uc_flags == other.uc_flags | ||
| && self.uc_link == other.uc_link | ||
| && self.uc_stack == other.uc_stack | ||
| && self.uc_mcontext == other.uc_mcontext | ||
| && self.uc_sigmask__c_anonymous_union == other.uc_sigmask__c_anonymous_union | ||
| && &self.uc_regspace[..] == &other.uc_regspace[..] | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| impl Eq for ucontext_t {} | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
| .field("uc_flags", &self.uc_flags) | ||
| .field("uc_link", &self.uc_link) | ||
| .field("uc_stack", &self.uc_stack) | ||
| .field("uc_mcontext", &self.uc_mcontext) | ||
| .field( | ||
| "uc_sigmask__c_anonymous_union", | ||
| &self.uc_sigmask__c_anonymous_union, | ||
| ) | ||
| .field("uc_regspace", &&self.uc_regspace[..]) | ||
| // Ignore padding field | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for ucontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_flags.hash(state); | ||
| self.uc_link.hash(state); | ||
| self.uc_stack.hash(state); | ||
| self.uc_mcontext.hash(state); | ||
| self.uc_sigmask__c_anonymous_union.hash(state); | ||
| self.uc_regspace[..].hash(state); | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| } | ||
@@ -516,2 +509,18 @@ } | ||
| pub const SYS_fspick: ::c_long = 433; | ||
| pub const SYS_pidfd_open: ::c_long = 434; | ||
| pub const SYS_clone3: ::c_long = 435; | ||
| pub const SYS_close_range: ::c_long = 436; | ||
| pub const SYS_openat2: ::c_long = 437; | ||
| pub const SYS_pidfd_getfd: ::c_long = 438; | ||
| pub const SYS_faccessat2: ::c_long = 439; | ||
| pub const SYS_process_madvise: ::c_long = 440; | ||
| pub const SYS_epoll_pwait2: ::c_long = 441; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| pub const SYS_quotactl_fd: ::c_long = 443; | ||
| pub const SYS_landlock_create_ruleset: ::c_long = 444; | ||
| pub const SYS_landlock_add_rule: ::c_long = 445; | ||
| pub const SYS_landlock_restrict_self: ::c_long = 446; | ||
| pub const SYS_process_mrelease: ::c_long = 448; | ||
| pub const SYS_futex_waitv: ::c_long = 449; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
@@ -551,3 +560,3 @@ // offsets in mcontext_t.gregs from sys/ucontext.h | ||
| len: *mut ::socklen_t, | ||
| flg: ::c_int | ||
| flg: ::c_int, | ||
| ) -> ::c_int { | ||
@@ -554,0 +563,0 @@ ::syscall(SYS_accept4, fd, addr, len, flg) as ::c_int |
@@ -12,2 +12,3 @@ // The following definitions are correct for arm and i686, | ||
| pub type __u64 = ::c_ulonglong; | ||
| pub type __s64 = ::c_longlong; | ||
@@ -19,3 +20,3 @@ s! { | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -110,5 +111,9 @@ | ||
| pub struct pthread_mutex_t { value: ::c_int } | ||
| pub struct pthread_mutex_t { | ||
| value: ::c_int, | ||
| } | ||
| pub struct pthread_cond_t { value: ::c_int } | ||
| pub struct pthread_cond_t { | ||
| value: ::c_int, | ||
| } | ||
@@ -178,3 +183,3 @@ pub struct pthread_rwlock_t { | ||
| pub struct sigset64_t { | ||
| __bits: [::c_ulong; 2] | ||
| __bits: [::c_ulong; 2], | ||
| } | ||
@@ -181,0 +186,0 @@ } |
@@ -31,111 +31,110 @@ pub type c_char = i8; | ||
| s_no_extra_traits! { | ||
| pub struct __c_anonymous_uc_sigmask_with_padding { | ||
| pub uc_sigmask: ::sigset_t, | ||
| /* Android has a wrong (smaller) sigset_t on x86. */ | ||
| __padding_rt_sigset: u32, | ||
| } | ||
| pub union __c_anonymous_uc_sigmask { | ||
| uc_sigmask: __c_anonymous_uc_sigmask_with_padding, | ||
| uc_sigmask64: ::sigset64_t, | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| pub uc_sigmask__c_anonymous_union: __c_anonymous_uc_sigmask, | ||
| __padding_rt_sigset: u32, | ||
| __fpregs_mem: _libc_fpstate, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| s_no_extra_traits! { | ||
| pub struct __c_anonymous_uc_sigmask_with_padding { | ||
| pub uc_sigmask: ::sigset_t, | ||
| /* Android has a wrong (smaller) sigset_t on x86. */ | ||
| __padding_rt_sigset: u32, | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for __c_anonymous_uc_sigmask_with_padding { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask_with_padding) -> bool { | ||
| self.uc_sigmask == other.uc_sigmask | ||
| // Ignore padding | ||
| } | ||
| pub union __c_anonymous_uc_sigmask { | ||
| uc_sigmask: __c_anonymous_uc_sigmask_with_padding, | ||
| uc_sigmask64: ::sigset64_t, | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask_with_padding {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask_with_padding") | ||
| .field("uc_sigmask_with_padding", &self.uc_sigmask) | ||
| // Ignore padding | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask_with_padding { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_sigmask.hash(state) | ||
| // Ignore padding | ||
| } | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| pub uc_sigmask__c_anonymous_union: __c_anonymous_uc_sigmask, | ||
| __padding_rt_sigset: u32, | ||
| __fpregs_mem: _libc_fpstate, | ||
| impl PartialEq for __c_anonymous_uc_sigmask { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask) -> bool { | ||
| unsafe { self.uc_sigmask == other.uc_sigmask } | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask") | ||
| .field("uc_sigmask", unsafe { &self.uc_sigmask }) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { self.uc_sigmask.hash(state) } | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for __c_anonymous_uc_sigmask_with_padding { | ||
| fn eq( | ||
| &self, other: &__c_anonymous_uc_sigmask_with_padding | ||
| ) -> bool { | ||
| self.uc_sigmask == other.uc_sigmask | ||
| // Ignore padding | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask_with_padding {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask_with_padding") | ||
| .field("uc_sigmask_with_padding", &self.uc_sigmask) | ||
| // Ignore padding | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask_with_padding { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_sigmask.hash(state) | ||
| // Ignore padding | ||
| } | ||
| } | ||
| impl PartialEq for __c_anonymous_uc_sigmask { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask) -> bool { | ||
| unsafe { self.uc_sigmask == other.uc_sigmask } | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask") | ||
| .field("uc_sigmask", unsafe { &self.uc_sigmask }) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { self.uc_sigmask.hash(state) } | ||
| } | ||
| } | ||
| impl PartialEq for ucontext_t { | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.uc_flags == other.uc_flags | ||
| && self.uc_link == other.uc_link | ||
| && self.uc_stack == other.uc_stack | ||
| && self.uc_mcontext == other.uc_mcontext | ||
| && self.uc_sigmask__c_anonymous_union | ||
| == other.uc_sigmask__c_anonymous_union | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| impl Eq for ucontext_t {} | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
| .field("uc_flags", &self.uc_flags) | ||
| .field("uc_link", &self.uc_link) | ||
| .field("uc_stack", &self.uc_stack) | ||
| .field("uc_mcontext", &self.uc_mcontext) | ||
| .field( | ||
| "uc_sigmask__c_anonymous_union", | ||
| &self.uc_sigmask__c_anonymous_union | ||
| ) | ||
| // Ignore padding field | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for ucontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_flags.hash(state); | ||
| self.uc_link.hash(state); | ||
| self.uc_stack.hash(state); | ||
| self.uc_mcontext.hash(state); | ||
| self.uc_sigmask__c_anonymous_union.hash(state); | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| impl PartialEq for ucontext_t { | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.uc_flags == other.uc_flags | ||
| && self.uc_link == other.uc_link | ||
| && self.uc_stack == other.uc_stack | ||
| && self.uc_mcontext == other.uc_mcontext | ||
| && self.uc_sigmask__c_anonymous_union == other.uc_sigmask__c_anonymous_union | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| impl Eq for ucontext_t {} | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
| .field("uc_flags", &self.uc_flags) | ||
| .field("uc_link", &self.uc_link) | ||
| .field("uc_stack", &self.uc_stack) | ||
| .field("uc_mcontext", &self.uc_mcontext) | ||
| .field( | ||
| "uc_sigmask__c_anonymous_union", | ||
| &self.uc_sigmask__c_anonymous_union, | ||
| ) | ||
| // Ignore padding field | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for ucontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_flags.hash(state); | ||
| self.uc_link.hash(state); | ||
| self.uc_stack.hash(state); | ||
| self.uc_mcontext.hash(state); | ||
| self.uc_sigmask__c_anonymous_union.hash(state); | ||
| // Ignore padding field | ||
| } | ||
| } | ||
| } | ||
@@ -548,2 +547,19 @@ } | ||
| pub const SYS_fspick: ::c_long = 433; | ||
| pub const SYS_pidfd_open: ::c_long = 434; | ||
| pub const SYS_clone3: ::c_long = 435; | ||
| pub const SYS_close_range: ::c_long = 436; | ||
| pub const SYS_openat2: ::c_long = 437; | ||
| pub const SYS_pidfd_getfd: ::c_long = 438; | ||
| pub const SYS_faccessat2: ::c_long = 439; | ||
| pub const SYS_process_madvise: ::c_long = 440; | ||
| pub const SYS_epoll_pwait2: ::c_long = 441; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| pub const SYS_quotactl_fd: ::c_long = 443; | ||
| pub const SYS_landlock_create_ruleset: ::c_long = 444; | ||
| pub const SYS_landlock_add_rule: ::c_long = 445; | ||
| pub const SYS_landlock_restrict_self: ::c_long = 446; | ||
| pub const SYS_memfd_secret: ::c_long = 447; | ||
| pub const SYS_process_mrelease: ::c_long = 448; | ||
| pub const SYS_futex_waitv: ::c_long = 449; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
@@ -610,3 +626,3 @@ // offsets in user_regs_structs, from sys/reg.h | ||
| len: *mut ::socklen_t, | ||
| flg: ::c_int | ||
| flg: ::c_int, | ||
| ) -> ::c_int { | ||
@@ -624,8 +640,1 @@ // Arguments are passed as array of `long int` | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
| pub type c_char = u8; | ||
| pub type wchar_t = u32; | ||
| pub type __u64 = ::c_ulonglong; | ||
| pub type __s64 = ::c_longlong; | ||
@@ -58,4 +59,36 @@ s! { | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub fault_address: ::c_ulonglong, | ||
| pub regs: [::c_ulonglong; 31], | ||
| pub sp: ::c_ulonglong, | ||
| pub pc: ::c_ulonglong, | ||
| pub pstate: ::c_ulonglong, | ||
| __reserved: [u64; 512], | ||
| } | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [::__uint128_t; 32], | ||
| pub fpsr: u32, | ||
| pub fpcr: u32, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8], | ||
| } | ||
| } | ||
| pub const O_DIRECT: ::c_int = 0x10000; | ||
@@ -416,3 +449,20 @@ pub const O_DIRECTORY: ::c_int = 0x4000; | ||
| pub const SYS_fspick: ::c_long = 433; | ||
| pub const SYS_syscalls: ::c_long = 436; | ||
| pub const SYS_pidfd_open: ::c_long = 434; | ||
| pub const SYS_clone3: ::c_long = 435; | ||
| pub const SYS_close_range: ::c_long = 436; | ||
| pub const SYS_openat2: ::c_long = 437; | ||
| pub const SYS_pidfd_getfd: ::c_long = 438; | ||
| pub const SYS_faccessat2: ::c_long = 439; | ||
| pub const SYS_process_madvise: ::c_long = 440; | ||
| pub const SYS_epoll_pwait2: ::c_long = 441; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| pub const SYS_quotactl_fd: ::c_long = 443; | ||
| pub const SYS_landlock_create_ruleset: ::c_long = 444; | ||
| pub const SYS_landlock_add_rule: ::c_long = 445; | ||
| pub const SYS_landlock_restrict_self: ::c_long = 446; | ||
| pub const SYS_memfd_secret: ::c_long = 447; | ||
| pub const SYS_process_mrelease: ::c_long = 448; | ||
| pub const SYS_futex_waitv: ::c_long = 449; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| pub const SYS_syscalls: ::c_long = 451; | ||
@@ -425,15 +475,1 @@ pub const PROT_BTI: ::c_int = 0x10; | ||
| pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 2; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_int128)] { | ||
| mod int128; | ||
| pub use self::int128::*; | ||
| } | ||
| } |
@@ -19,3 +19,3 @@ // The following definitions are correct for aarch64 and x86_64, | ||
| pub sa_mask: ::sigset_t, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -140,3 +140,3 @@ | ||
| pub struct sigset64_t { | ||
| __bits: [::c_ulong; 1] | ||
| __bits: [::c_ulong; 1], | ||
| } | ||
@@ -151,6 +151,6 @@ } | ||
| && self | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -181,6 +181,6 @@ } | ||
| && self | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -215,6 +215,6 @@ } | ||
| && self | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -306,3 +306,3 @@ } | ||
| len: *mut ::socklen_t, | ||
| flg: ::c_int | ||
| flg: ::c_int, | ||
| ) -> ::c_int { | ||
@@ -309,0 +309,0 @@ ::syscall(SYS_accept4, fd, addr, len, flg) as ::c_int |
@@ -5,2 +5,3 @@ pub type c_char = i8; | ||
| pub type __u64 = ::c_ulonglong; | ||
| pub type __s64 = ::c_longlong; | ||
@@ -55,2 +56,10 @@ s! { | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8], | ||
| } | ||
| } | ||
| pub const O_DIRECT: ::c_int = 0x40000; | ||
@@ -348,3 +357,19 @@ pub const O_DIRECTORY: ::c_int = 0x200000; | ||
| pub const SYS_fspick: ::c_long = 433; | ||
| pub const SYS_syscalls: ::c_long = 436; | ||
| pub const SYS_pidfd_open: ::c_long = 434; | ||
| pub const SYS_clone3: ::c_long = 435; | ||
| pub const SYS_close_range: ::c_long = 436; | ||
| pub const SYS_openat2: ::c_long = 437; | ||
| pub const SYS_pidfd_getfd: ::c_long = 438; | ||
| pub const SYS_faccessat2: ::c_long = 439; | ||
| pub const SYS_process_madvise: ::c_long = 440; | ||
| pub const SYS_epoll_pwait2: ::c_long = 441; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| pub const SYS_quotactl_fd: ::c_long = 443; | ||
| pub const SYS_landlock_create_ruleset: ::c_long = 444; | ||
| pub const SYS_landlock_add_rule: ::c_long = 445; | ||
| pub const SYS_landlock_restrict_self: ::c_long = 446; | ||
| pub const SYS_memfd_secret: ::c_long = 447; | ||
| pub const SYS_process_mrelease: ::c_long = 448; | ||
| pub const SYS_futex_waitv: ::c_long = 449; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
@@ -362,8 +387,1 @@ // From NDK's asm/auxvec.h | ||
| pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 9; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -5,2 +5,3 @@ pub type c_char = i8; | ||
| pub type __u64 = ::c_ulonglong; | ||
| pub type __s64 = ::c_longlong; | ||
@@ -105,36 +106,37 @@ s! { | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| pub union __c_anonymous_uc_sigmask { | ||
| uc_sigmask: ::sigset_t, | ||
| uc_sigmask64: ::sigset64_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| s_no_extra_traits! { | ||
| pub union __c_anonymous_uc_sigmask { | ||
| uc_sigmask: ::sigset_t, | ||
| uc_sigmask64: ::sigset64_t, | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for __c_anonymous_uc_sigmask { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask) -> bool { | ||
| unsafe { self.uc_sigmask == other.uc_sigmask } | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for __c_anonymous_uc_sigmask { | ||
| fn eq(&self, other: &__c_anonymous_uc_sigmask) -> bool { | ||
| unsafe { self.uc_sigmask == other.uc_sigmask } | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask") | ||
| .field("uc_sigmask", unsafe { &self.uc_sigmask }) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { self.uc_sigmask.hash(state) } | ||
| } | ||
| } | ||
| impl Eq for __c_anonymous_uc_sigmask {} | ||
| impl ::fmt::Debug for __c_anonymous_uc_sigmask { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("uc_sigmask") | ||
| .field("uc_sigmask", unsafe { &self.uc_sigmask }) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for __c_anonymous_uc_sigmask { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { self.uc_sigmask.hash(state) } | ||
| } | ||
| } | ||
| } | ||
@@ -198,5 +200,4 @@ } | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.significand == other.significand | ||
| && self.exponent == other.exponent | ||
| // Ignore padding field | ||
| self.significand == other.significand && self.exponent == other.exponent | ||
| // Ignore padding field | ||
| } | ||
@@ -234,3 +235,3 @@ } | ||
| && self._xmm == other._xmm | ||
| // Ignore padding field | ||
| // Ignore padding field | ||
| } | ||
@@ -274,5 +275,4 @@ } | ||
| fn eq(&self, other: &Self) -> bool { | ||
| self.gregs == other.gregs | ||
| && self.fpregs == other.fpregs | ||
| // Ignore padding field | ||
| self.gregs == other.gregs && self.fpregs == other.fpregs | ||
| // Ignore padding field | ||
| } | ||
@@ -305,3 +305,3 @@ } | ||
| && self.uc_sigmask64 == other.uc_sigmask64 | ||
| // Ignore padding field | ||
| // Ignore padding field | ||
| } | ||
@@ -345,6 +345,6 @@ } | ||
| && self | ||
| .xmm_space | ||
| .iter() | ||
| .zip(other.xmm_space.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .xmm_space | ||
| .iter() | ||
| .zip(other.xmm_space.iter()) | ||
| .all(|(a, b)| a == b) | ||
| // Ignore padding field | ||
@@ -368,4 +368,4 @@ } | ||
| .field("st_space", &self.st_space) | ||
| // FIXME: .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| // FIXME: .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| .finish() | ||
@@ -750,2 +750,19 @@ } | ||
| pub const SYS_fspick: ::c_long = 433; | ||
| pub const SYS_pidfd_open: ::c_long = 434; | ||
| pub const SYS_clone3: ::c_long = 435; | ||
| pub const SYS_close_range: ::c_long = 436; | ||
| pub const SYS_openat2: ::c_long = 437; | ||
| pub const SYS_pidfd_getfd: ::c_long = 438; | ||
| pub const SYS_faccessat2: ::c_long = 439; | ||
| pub const SYS_process_madvise: ::c_long = 440; | ||
| pub const SYS_epoll_pwait2: ::c_long = 441; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| pub const SYS_quotactl_fd: ::c_long = 443; | ||
| pub const SYS_landlock_create_ruleset: ::c_long = 444; | ||
| pub const SYS_landlock_add_rule: ::c_long = 445; | ||
| pub const SYS_landlock_restrict_self: ::c_long = 446; | ||
| pub const SYS_memfd_secret: ::c_long = 447; | ||
| pub const SYS_process_mrelease: ::c_long = 448; | ||
| pub const SYS_futex_waitv: ::c_long = 449; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
@@ -809,8 +826,1 @@ // offsets in user_regs_structs, from sys/reg.h | ||
| pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 3; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -109,4 +109,3 @@ // In-sync with ../linux/musl/lfs64.rs except for fallocate64, prlimit64 and sendfile64 | ||
| // argument, nor do their names clash with any declared types. | ||
| pub use open as open64; | ||
| pub use openat as openat64; | ||
| pub use {open as open64, openat as openat64}; | ||
@@ -113,0 +112,0 @@ #[inline] |
@@ -166,3 +166,3 @@ pub type c_char = i8; | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -179,3 +179,3 @@ | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
@@ -203,3 +203,3 @@ | ||
| pub struct pthread_attr_t { | ||
| __size: [u32; 11] | ||
| __size: [u32; 11], | ||
| } | ||
@@ -258,3 +258,3 @@ | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -320,2 +320,28 @@ | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(4))] | ||
| pub struct pthread_mutex_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_rwlock_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_mutexattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_rwlockattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
@@ -354,4 +380,16 @@ | ||
| pub mq_curmsgs: ::c_long, | ||
| pad: [::c_long; 4] | ||
| pad: [::c_long; 4], | ||
| } | ||
| #[cfg_attr(target_pointer_width = "32", repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", repr(align(8)))] | ||
| pub struct pthread_cond_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 3], | ||
| } | ||
| } | ||
@@ -368,6 +406,6 @@ | ||
| && self | ||
| .d_name | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .d_name | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -413,6 +451,6 @@ } | ||
| && self | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__reserved | ||
| .iter() | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -462,6 +500,6 @@ } | ||
| fn eq(&self, other: &mq_attr) -> bool { | ||
| self.mq_flags == other.mq_flags && | ||
| self.mq_maxmsg == other.mq_maxmsg && | ||
| self.mq_msgsize == other.mq_msgsize && | ||
| self.mq_curmsgs == other.mq_curmsgs | ||
| self.mq_flags == other.mq_flags | ||
| && self.mq_maxmsg == other.mq_maxmsg | ||
| && self.mq_msgsize == other.mq_msgsize | ||
| && self.mq_curmsgs == other.mq_curmsgs | ||
| } | ||
@@ -488,2 +526,21 @@ } | ||
| } | ||
| impl PartialEq for pthread_cond_t { | ||
| fn eq(&self, other: &pthread_cond_t) -> bool { | ||
| self.size.iter().zip(other.size.iter()).all(|(a, b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_cond_t {} | ||
| impl ::fmt::Debug for pthread_cond_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_cond_t") | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_cond_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| } | ||
@@ -781,13 +838,11 @@ } | ||
| align_const! { | ||
| pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { | ||
| size: [0; __SIZEOF_PTHREAD_MUTEX_T], | ||
| }; | ||
| pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { | ||
| size: [0; __SIZEOF_PTHREAD_COND_T], | ||
| }; | ||
| pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { | ||
| size: [0; __SIZEOF_PTHREAD_RWLOCK_T], | ||
| }; | ||
| } | ||
| pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { | ||
| size: [0; __SIZEOF_PTHREAD_MUTEX_T], | ||
| }; | ||
| pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { | ||
| size: [0; __SIZEOF_PTHREAD_COND_T], | ||
| }; | ||
| pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { | ||
| size: [0; __SIZEOF_PTHREAD_RWLOCK_T], | ||
| }; | ||
@@ -1370,12 +1425,8 @@ pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; | ||
| f! { | ||
| pub fn CMSG_NXTHDR(mhdr: *const msghdr, | ||
| cmsg: *const cmsghdr) -> *mut cmsghdr { | ||
| pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { | ||
| if ((*cmsg).cmsg_len as usize) < ::mem::size_of::<cmsghdr>() { | ||
| return 0 as *mut cmsghdr; | ||
| }; | ||
| let next = (cmsg as usize + | ||
| super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) | ||
| as *mut cmsghdr; | ||
| let max = (*mhdr).msg_control as usize | ||
| + (*mhdr).msg_controllen as usize; | ||
| let next = (cmsg as usize + super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; | ||
| let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; | ||
| if (next.offset(1)) as usize > max { | ||
@@ -1395,4 +1446,3 @@ 0 as *mut cmsghdr | ||
| pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { | ||
| let size_in_bits | ||
| = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc | ||
| let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc | ||
| let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); | ||
@@ -1404,4 +1454,3 @@ cpuset.bits[idx] |= 1 << offset; | ||
| pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { | ||
| let size_in_bits | ||
| = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc | ||
| let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc | ||
| let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); | ||
@@ -1482,4 +1531,2 @@ cpuset.bits[idx] &= !(1 << offset); | ||
| pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; | ||
| pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; | ||
| pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; | ||
| pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; | ||
@@ -1610,12 +1657,1 @@ pub fn accept4( | ||
| pub use self::lfs64::*; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| #[macro_use] | ||
| mod align; | ||
| } else { | ||
| #[macro_use] | ||
| mod no_align; | ||
| } | ||
| } | ||
| expand_align!(); |
@@ -95,8 +95,12 @@ s! { | ||
| // But they may still not have those _OLD ones. | ||
| if #[cfg(all(any(target_arch = "x86", | ||
| target_arch = "x86_64", | ||
| target_arch = "aarch64", | ||
| target_arch = "csky", | ||
| target_arch = "loongarch64"), | ||
| not(any(target_env = "musl", target_env = "ohos"))))] { | ||
| if #[cfg(all( | ||
| any( | ||
| target_arch = "x86", | ||
| target_arch = "x86_64", | ||
| target_arch = "aarch64", | ||
| target_arch = "csky", | ||
| target_arch = "loongarch64" | ||
| ), | ||
| not(any(target_env = "musl", target_env = "ohos")) | ||
| ))] { | ||
| pub const SO_TIMESTAMP_NEW: ::c_int = 63; | ||
@@ -114,10 +118,12 @@ pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "x86", | ||
| target_arch = "x86_64", | ||
| target_arch = "arm", | ||
| target_arch = "aarch64", | ||
| target_arch = "riscv64", | ||
| target_arch = "s390x", | ||
| target_arch = "csky", | ||
| target_arch = "loongarch64"))] { | ||
| if #[cfg(any( | ||
| target_arch = "x86", | ||
| target_arch = "x86_64", | ||
| target_arch = "arm", | ||
| target_arch = "aarch64", | ||
| target_arch = "riscv64", | ||
| target_arch = "s390x", | ||
| target_arch = "csky", | ||
| target_arch = "loongarch64" | ||
| ))] { | ||
| pub const FICLONE: ::c_ulong = 0x40049409; | ||
@@ -251,3 +257,7 @@ pub const FICLONERANGE: ::c_ulong = 0x4020940D; | ||
| // where N stands for NR (NumbeR) | ||
| if #[cfg(any(target_arch = "x86", target_arch = "arm", target_arch = "csky"))] { | ||
| if #[cfg(any( | ||
| target_arch = "x86", | ||
| target_arch = "arm", | ||
| target_arch = "csky" | ||
| ))] { | ||
| pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80046601; | ||
@@ -264,7 +274,9 @@ pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40046602; | ||
| pub const TUNGETFILTER: ::Ioctl = 0x800854db; | ||
| } else if #[cfg(any(target_arch = "x86_64", | ||
| target_arch = "riscv64", | ||
| target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64"))] { | ||
| } else if #[cfg(any( | ||
| target_arch = "x86_64", | ||
| target_arch = "riscv64", | ||
| target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64" | ||
| ))] { | ||
| pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80086601; | ||
@@ -285,4 +297,3 @@ pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40086602; | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "arm", | ||
| target_arch = "s390x"))] { | ||
| if #[cfg(any(target_arch = "arm", target_arch = "s390x"))] { | ||
| pub const FIOQSIZE: ::Ioctl = 0x545E; | ||
@@ -312,5 +323,3 @@ } else { | ||
| cfg_if! { | ||
| if #[cfg(any(target_env = "gnu", | ||
| target_env = "uclibc"))] { | ||
| if #[cfg(any(target_env = "gnu", target_env = "uclibc"))] { | ||
| pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; | ||
@@ -335,5 +344,3 @@ pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; | ||
| pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; | ||
| } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] { | ||
| pub const RLIMIT_CPU: ::c_int = 0; | ||
@@ -356,3 +363,6 @@ pub const RLIMIT_FSIZE: ::c_int = 1; | ||
| #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] | ||
| #[cfg(not(target_arch = "loongarch64"))] | ||
| pub const RLIM_NLIMITS: ::c_int = 15; | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub const RLIM_NLIMITS: ::c_int = 16; | ||
| #[allow(deprecated)] | ||
@@ -368,4 +378,3 @@ #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] | ||
| pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; | ||
| } | ||
| else if #[cfg(target_env = "uclibc")] { | ||
| } else if #[cfg(target_env = "uclibc")] { | ||
| #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] | ||
@@ -372,0 +381,0 @@ pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15; |
@@ -283,5 +283,3 @@ s! { | ||
| cfg_if! { | ||
| if #[cfg(any(target_env = "gnu", | ||
| target_env = "uclibc"))] { | ||
| if #[cfg(any(target_env = "gnu", target_env = "uclibc"))] { | ||
| pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; | ||
@@ -306,5 +304,3 @@ pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; | ||
| pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; | ||
| } else if #[cfg(target_env = "musl")] { | ||
| pub const RLIMIT_CPU: ::c_int = 0; | ||
@@ -346,5 +342,6 @@ pub const RLIMIT_FSIZE: ::c_int = 1; | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "mips64", target_arch = "mips64r6"), | ||
| any(target_env = "gnu", | ||
| target_env = "uclibc"))] { | ||
| if #[cfg( | ||
| any(target_arch = "mips64", target_arch = "mips64r6"), | ||
| any(target_env = "gnu", target_env = "uclibc") | ||
| )] { | ||
| pub const RLIM_INFINITY: ::rlim_t = !0; | ||
@@ -355,7 +352,8 @@ } | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "mips", target_arch = "mips32r6"), | ||
| any(target_env = "gnu", | ||
| target_env = "uclibc"))] { | ||
| if #[cfg( | ||
| any(target_arch = "mips", target_arch = "mips32r6"), | ||
| any(target_env = "gnu", target_env = "uclibc") | ||
| )] { | ||
| pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff; | ||
| } | ||
| } |
| cfg_if! { | ||
| if #[cfg(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6"))] { | ||
| if #[cfg(any( | ||
| target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6" | ||
| ))] { | ||
| mod mips; | ||
@@ -7,0 +9,0 @@ pub use self::mips::*; |
@@ -263,3 +263,2 @@ // arch/powerpc/include/uapi/asm/socket.h | ||
| if #[cfg(target_env = "gnu")] { | ||
| pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; | ||
@@ -286,5 +285,3 @@ pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; | ||
| pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; | ||
| } else if #[cfg(target_env = "musl")] { | ||
| pub const RLIMIT_CPU: ::c_int = 0; | ||
@@ -291,0 +288,0 @@ pub const RLIMIT_FSIZE: ::c_int = 1; |
@@ -9,3 +9,3 @@ pub type c_char = u8; | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -26,3 +26,4 @@ | ||
| pub f_frsize: ::__fsword_t, | ||
| f_spare: [::__fsword_t; 5], | ||
| pub f_flags: ::__fsword_t, | ||
| f_spare: [::__fsword_t; 4], | ||
| } | ||
@@ -57,3 +58,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -127,3 +128,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -154,4 +155,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -167,3 +168,3 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -217,2 +218,56 @@ | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 2], | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_mcontext: ::mcontext_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_regspace: [::c_ulong; 128], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for ucontext_t { | ||
| fn eq(&self, other: &ucontext_t) -> bool { | ||
| self.uc_flags == other.uc_flags | ||
| && self.uc_link == other.uc_link | ||
| && self.uc_stack == other.uc_stack | ||
| && self.uc_mcontext == other.uc_mcontext | ||
| && self.uc_sigmask == other.uc_sigmask | ||
| } | ||
| } | ||
| impl Eq for ucontext_t {} | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
| .field("uc_flags", &self.uc_link) | ||
| .field("uc_link", &self.uc_link) | ||
| .field("uc_stack", &self.uc_stack) | ||
| .field("uc_mcontext", &self.uc_mcontext) | ||
| .field("uc_sigmask", &self.uc_sigmask) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for ucontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_flags.hash(state); | ||
| self.uc_link.hash(state); | ||
| self.uc_stack.hash(state); | ||
| self.uc_mcontext.hash(state); | ||
| self.uc_sigmask.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| pub const VEOF: usize = 4; | ||
@@ -866,8 +921,1 @@ pub const RTLD_DEEPBIND: ::c_int = 0x8; | ||
| pub const SYS_mseal: ::c_long = 462; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -9,3 +9,3 @@ pub type c_char = u8; | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -56,3 +56,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -126,3 +126,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -153,4 +153,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -166,6 +166,14 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 2], | ||
| } | ||
| } | ||
| pub const VEOF: usize = 4; | ||
@@ -740,8 +748,1 @@ pub const RTLD_DEEPBIND: ::c_int = 0x8; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -9,3 +9,3 @@ pub type c_char = i8; | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -156,6 +156,14 @@ | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(2))] | ||
| pub struct max_align_t { | ||
| priv_: [i8; 20], | ||
| } | ||
| } | ||
| pub const VEOF: usize = 4; | ||
@@ -162,0 +170,0 @@ pub const RTLD_DEEPBIND: ::c_int = 0x8; |
@@ -40,3 +40,4 @@ pub type c_char = i8; | ||
| pub f_namelen: ::c_long, | ||
| f_spare: [::c_long; 6], | ||
| pub f_flags: ::c_long, | ||
| f_spare: [::c_long; 5], | ||
| } | ||
@@ -79,3 +80,3 @@ | ||
| pub sa_mask: ::sigset_t, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| _resv: [::c_int; 1], | ||
@@ -107,3 +108,3 @@ } | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -121,3 +122,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -162,2 +163,10 @@ | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 4], | ||
| } | ||
| } | ||
| pub const O_LARGEFILE: ::c_int = 0x2000; | ||
@@ -818,8 +827,1 @@ | ||
| pub const EHWPOISON: ::c_int = 168; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -110,3 +110,3 @@ //! 32-bit specific definitions for linux-like values | ||
| pub struct pthread_attr_t { | ||
| __size: [u32; 9] | ||
| __size: [u32; 9], | ||
| } | ||
@@ -144,3 +144,7 @@ | ||
| pub sem_otime: ::time_t, | ||
| #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6", target_arch = "powerpc")))] | ||
| #[cfg(not(any( | ||
| target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "powerpc" | ||
| )))] | ||
| __reserved: ::__syscall_ulong_t, | ||
@@ -150,3 +154,7 @@ #[cfg(target_arch = "powerpc")] | ||
| pub sem_ctime: ::time_t, | ||
| #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6", target_arch = "powerpc")))] | ||
| #[cfg(not(any( | ||
| target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "powerpc" | ||
| )))] | ||
| __reserved2: ::__syscall_ulong_t, | ||
@@ -269,52 +277,38 @@ pub sem_nsems: ::__syscall_ulong_t, | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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 { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 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 { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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 { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 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 { | ||
| size: [ | ||
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
@@ -321,0 +315,0 @@ pub const PTRACE_GETFPREGS: ::c_uint = 14; |
@@ -9,3 +9,3 @@ pub type c_char = u8; | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -26,3 +26,4 @@ | ||
| pub f_frsize: ::__fsword_t, | ||
| f_spare: [::__fsword_t; 5], | ||
| pub f_flags: ::__fsword_t, | ||
| f_spare: [::__fsword_t; 4], | ||
| } | ||
@@ -152,4 +153,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -165,3 +166,3 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -168,0 +169,0 @@ } |
@@ -7,6 +7,2 @@ //! RISC-V-specific definitions for 32-bit linux-like values | ||
| s! { | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7], | ||
| } | ||
| pub struct msqid_ds { | ||
@@ -26,24 +22,2 @@ pub msg_perm: ::ipc_perm, | ||
| pub struct stat { | ||
| pub st_dev: ::dev_t, | ||
| 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 __pad1: ::dev_t, | ||
| pub st_size: ::off_t, | ||
| pub st_blksize: ::blksize_t, | ||
| pub __pad2: ::c_int, | ||
| pub st_blocks: ::blkcnt_t, | ||
| pub st_atime: ::time_t, | ||
| pub st_atime_nsec: ::c_long, | ||
| pub st_mtime: ::time_t, | ||
| pub st_mtime_nsec: ::c_long, | ||
| pub st_ctime: ::time_t, | ||
| pub st_ctime_nsec: ::c_long, | ||
| __unused: [::c_int; 2usize], | ||
| } | ||
| pub struct stat64 { | ||
@@ -101,17 +75,2 @@ pub st_dev: ::dev_t, | ||
| pub struct statvfs { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_favail: ::fsfilcnt_t, | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| pub __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct statvfs64 { | ||
@@ -138,4 +97,4 @@ pub f_bsize: ::c_ulong, | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -240,2 +199,47 @@ this field" | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub __uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __fpregs: __riscv_mc_fp_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub union __riscv_mc_fp_state { | ||
| pub __f: __riscv_mc_f_ext_state, | ||
| pub __d: __riscv_mc_d_ext_state, | ||
| pub __q: __riscv_mc_q_ext_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_f_ext_state { | ||
| pub __f: [::c_uint; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_d_ext_state { | ||
| pub __f: [::c_ulonglong; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct __riscv_mc_q_ext_state { | ||
| pub __f: [::c_ulonglong; 64], | ||
| pub __fcsr: ::c_uint, | ||
| pub __glibc_reserved: [::c_uint; 3], | ||
| } | ||
| } | ||
| pub const O_LARGEFILE: ::c_int = 0; | ||
@@ -812,8 +816,1 @@ pub const VEOF: usize = 4; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -11,3 +11,3 @@ //! SPARC-specific definitions for 32-bit linux-like values | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -53,3 +53,3 @@ | ||
| pub l_pid: ::pid_t, | ||
| __reserved: ::c_short, | ||
| __reserved: ::c_short, | ||
| } | ||
@@ -60,26 +60,5 @@ | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| pub struct stat { | ||
| pub st_dev: ::dev_t, | ||
| 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_rdev: ::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_atime_nsec: ::c_long, | ||
| pub st_mtime: ::time_t, | ||
| pub st_mtime_nsec: ::c_long, | ||
| pub st_ctime: ::time_t, | ||
| pub st_ctime_nsec: ::c_long, | ||
| __unused: [::c_long; 2], | ||
| } | ||
| pub struct stat64 { | ||
@@ -121,17 +100,2 @@ pub st_dev: ::dev_t, | ||
| pub struct statvfs { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_favail: ::fsfilcnt_t, | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct statvfs64 { | ||
@@ -200,2 +164,10 @@ pub f_bsize: ::c_ulong, | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 3], | ||
| } | ||
| } | ||
| pub const VEOF: usize = 4; | ||
@@ -856,8 +828,1 @@ pub const RTLD_DEEPBIND: ::c_int = 0x8; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -10,3 +10,3 @@ pub type c_char = i8; | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -27,3 +27,4 @@ | ||
| pub f_frsize: ::__fsword_t, | ||
| f_spare: [::__fsword_t; 5], | ||
| pub f_flags: ::__fsword_t, | ||
| f_spare: [::__fsword_t; 4], | ||
| } | ||
@@ -131,3 +132,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -201,3 +202,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -228,4 +229,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -241,5 +242,4 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| } | ||
@@ -273,2 +273,8 @@ | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 6], | ||
| } | ||
| } | ||
@@ -310,6 +316,6 @@ | ||
| .field("mxcsr", &self.mxcsr) | ||
| // Ignore __reserved field | ||
| // Ignore __reserved field | ||
| .field("st_space", &self.st_space) | ||
| .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| // Ignore padding field | ||
| .finish() | ||
@@ -358,3 +364,3 @@ } | ||
| .field("uc_sigmask", &self.uc_sigmask) | ||
| // Ignore __private field | ||
| // Ignore __private field | ||
| .finish() | ||
@@ -1105,8 +1111,1 @@ } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -13,53 +13,45 @@ use pthread_mutex_t; | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| pub const SYS_sync_file_range2: ::c_long = 84; |
@@ -13,58 +13,44 @@ use pthread_mutex_t; | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, 0, 0, | ||
| 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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, 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 { | ||
| 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, 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 { | ||
| 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, 0, 0, | ||
| 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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, 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 { | ||
| 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, 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 { | ||
| 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, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| ], | ||
| }; | ||
@@ -71,0 +57,0 @@ pub const SYS_renameat: ::c_long = 38; |
@@ -18,3 +18,3 @@ //! AArch64-specific definitions for 64-bit linux-like values | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -144,3 +144,3 @@ | ||
| pub struct pthread_attr_t { | ||
| __size: [usize; 8] | ||
| __size: [usize; 8], | ||
| } | ||
@@ -165,3 +165,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -179,3 +179,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -189,4 +189,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -202,7 +202,53 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub fault_address: ::c_ulonglong, | ||
| pub regs: [::c_ulonglong; 31], | ||
| pub sp: ::c_ulonglong, | ||
| pub pc: ::c_ulonglong, | ||
| pub pstate: ::c_ulonglong, | ||
| __reserved: [u64; 512], | ||
| } | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [::__uint128_t; 32], | ||
| pub fpsr: ::c_uint, | ||
| pub fpcr: ::c_uint, | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8], | ||
| } | ||
| } | ||
| pub const VEOF: usize = 4; | ||
@@ -915,2 +961,7 @@ | ||
| ) -> ::c_int; | ||
| pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; | ||
| pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; | ||
| pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); | ||
| pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; | ||
| } | ||
@@ -927,20 +978,1 @@ | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_int128)] { | ||
| mod int128; | ||
| pub use self::int128::*; | ||
| } else if #[cfg(libc_align)] { | ||
| mod fallback; | ||
| pub use self::fallback::*; | ||
| } | ||
| } |
@@ -74,3 +74,3 @@ use pthread_mutex_t; | ||
| pub struct statfs64 { | ||
| pub struct statfs64 { | ||
| pub f_type: ::__fsword_t, | ||
@@ -137,3 +137,3 @@ pub f_bsize: ::__fsword_t, | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7] | ||
| __size: [::c_ulong; 7], | ||
| } | ||
@@ -145,3 +145,3 @@ | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -161,4 +161,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -181,3 +181,3 @@ this field" | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -195,3 +195,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -205,3 +205,2 @@ | ||
| pub reserved: [u64; 10], | ||
| } | ||
@@ -214,4 +213,43 @@ | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __pc: ::c_ulonglong, | ||
| pub __gregs: [::c_ulonglong; 32], | ||
| pub __flags: ::c_uint, | ||
| pub __extcontext: [::c_ulonglong; 0], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
| pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; | ||
@@ -224,52 +262,44 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
@@ -903,8 +933,1 @@ pub const HWCAP_LOONGARCH_CPUCFG: ::c_ulong = 1 << 0; | ||
| pub const EFD_NONBLOCK: ::c_int = 0x800; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -138,3 +138,3 @@ use pthread_mutex_t; | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7] | ||
| __size: [::c_ulong; 7], | ||
| } | ||
@@ -146,3 +146,3 @@ | ||
| pub sa_mask: ::sigset_t, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -174,3 +174,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -188,6 +188,14 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
| pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; | ||
@@ -200,52 +208,44 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
@@ -933,8 +933,1 @@ pub const SYS_read: ::c_long = 5000 + 0; | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -78,3 +78,4 @@ //! 64-bit specific definitions for linux-like values | ||
| target_arch = "riscv64", | ||
| target_arch = "sparc64")))] | ||
| target_arch = "sparc64" | ||
| )))] | ||
| __reserved: ::__syscall_ulong_t, | ||
@@ -89,3 +90,4 @@ pub sem_ctime: ::time_t, | ||
| target_arch = "riscv64", | ||
| target_arch = "sparc64")))] | ||
| target_arch = "sparc64" | ||
| )))] | ||
| __reserved2: ::__syscall_ulong_t, | ||
@@ -92,0 +94,0 @@ pub sem_nsems: ::__syscall_ulong_t, |
@@ -22,3 +22,3 @@ //! PowerPC64-specific definitions for 64-bit linux-like values | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -146,3 +146,3 @@ | ||
| pub struct pthread_attr_t { | ||
| __size: [u64; 7] | ||
| __size: [u64; 7], | ||
| } | ||
@@ -173,3 +173,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -183,4 +183,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -196,6 +196,14 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 4], | ||
| } | ||
| } | ||
| pub const POSIX_FADV_DONTNEED: ::c_int = 4; | ||
@@ -413,52 +421,44 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5; | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
@@ -979,8 +979,1 @@ pub const O_DIRECTORY: ::c_int = 0x4000; | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -131,4 +131,4 @@ //! RISC-V-specific definitions for 64-bit linux-like values | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -231,4 +231,64 @@ this field" | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub __uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __fpregs: __riscv_mc_fp_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub union __riscv_mc_fp_state { | ||
| pub __f: __riscv_mc_f_ext_state, | ||
| pub __d: __riscv_mc_d_ext_state, | ||
| pub __q: __riscv_mc_q_ext_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_f_ext_state { | ||
| pub __f: [::c_uint; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_d_ext_state { | ||
| pub __f: [::c_ulonglong; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct __riscv_mc_q_ext_state { | ||
| pub __f: [::c_ulonglong; 64], | ||
| pub __fcsr: ::c_uint, | ||
| pub __glibc_reserved: [::c_uint; 3], | ||
| } | ||
| } | ||
| pub const POSIX_FADV_DONTNEED: ::c_int = 4; | ||
@@ -856,8 +916,1 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -21,3 +21,3 @@ //! s390x | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| pub sa_mask: ::sigset_t, | ||
@@ -68,3 +68,3 @@ } | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -115,3 +115,3 @@ | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7] | ||
| __size: [::c_ulong; 7], | ||
| } | ||
@@ -129,3 +129,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -143,3 +143,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -239,5 +239,3 @@ | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("fpreg_t") | ||
| .field("d", &self.d) | ||
| .finish() | ||
| f.debug_struct("fpreg_t").field("d", &self.d).finish() | ||
| } | ||
@@ -303,25 +301,20 @@ } | ||
| align_const! { | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| } | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
@@ -328,0 +321,0 @@ pub const EUCLEAN: ::c_int = 117; |
@@ -22,3 +22,3 @@ //! SPARC64-specific definitions for 64-bit linux-like values | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -48,4 +48,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -72,3 +72,3 @@ this field" | ||
| pub l_pid: ::pid_t, | ||
| __reserved: ::c_short, | ||
| __reserved: ::c_short, | ||
| } | ||
@@ -79,3 +79,3 @@ | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -173,3 +173,3 @@ | ||
| pub struct pthread_attr_t { | ||
| __size: [u64; 7] | ||
| __size: [u64; 7], | ||
| } | ||
@@ -200,6 +200,14 @@ | ||
| __reserved1: ::c_ulong, | ||
| __reserved2: ::c_ulong | ||
| __reserved2: ::c_ulong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 4], | ||
| } | ||
| } | ||
| pub const POSIX_FADV_DONTNEED: ::c_int = 4; | ||
@@ -413,25 +421,20 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5; | ||
| align_const! { | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| } | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::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, | ||
| ], | ||
| }; | ||
@@ -932,8 +935,1 @@ pub const O_DIRECTORY: ::c_int = 0o200000; | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -19,3 +19,3 @@ //! x86_64-specific definitions for 64-bit linux-like values | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
@@ -61,4 +61,4 @@ | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
@@ -74,3 +74,3 @@ this field" | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -154,3 +154,3 @@ | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [u64; 7] | ||
| __size: [u64; 7], | ||
| } | ||
@@ -251,3 +251,3 @@ | ||
| __unused1: u64, | ||
| __unused2: u64 | ||
| __unused2: u64, | ||
| } | ||
@@ -265,3 +265,3 @@ | ||
| __unused4: u64, | ||
| __unused5: u64 | ||
| __unused5: u64, | ||
| } | ||
@@ -276,2 +276,17 @@ | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
@@ -307,2 +322,8 @@ | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
@@ -324,6 +345,6 @@ | ||
| && self | ||
| .xmm_space | ||
| .iter() | ||
| .zip(other.xmm_space.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .xmm_space | ||
| .iter() | ||
| .zip(other.xmm_space.iter()) | ||
| .all(|(a, b)| a == b) | ||
| // Ignore padding field | ||
@@ -346,4 +367,4 @@ } | ||
| .field("st_space", &self.st_space) | ||
| // FIXME: .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| // FIXME: .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| .finish() | ||
@@ -389,3 +410,3 @@ } | ||
| .field("uc_sigmask", &self.uc_sigmask) | ||
| // Ignore __private field | ||
| // Ignore __private field | ||
| .finish() | ||
@@ -827,8 +848,1 @@ } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -27,52 +27,44 @@ use pthread_mutex_t; | ||
| align_const! { | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
| } | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "little")] | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, 0, 0, 0, | ||
| ], | ||
| }; | ||
| #[cfg(target_endian = "big")] | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::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 { | ||
| 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 { | ||
| 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, | ||
| ], | ||
| }; | ||
@@ -79,0 +71,0 @@ // Syscall table |
@@ -27,25 +27,20 @@ use pthread_mutex_t; | ||
| align_const! { | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
| pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| } | ||
| pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
| pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { | ||
| size: [ | ||
| 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, | ||
| ], | ||
| }; | ||
@@ -52,0 +47,0 @@ // Syscall table |
@@ -19,35 +19,2 @@ pub type pthread_t = c_ulong; | ||
| s! { | ||
| pub struct statx { | ||
| pub stx_mask: u32, | ||
| pub stx_blksize: u32, | ||
| pub stx_attributes: u64, | ||
| pub stx_nlink: u32, | ||
| pub stx_uid: u32, | ||
| pub stx_gid: u32, | ||
| pub stx_mode: u16, | ||
| __statx_pad1: [u16; 1], | ||
| pub stx_ino: u64, | ||
| pub stx_size: u64, | ||
| pub stx_blocks: u64, | ||
| pub stx_attributes_mask: u64, | ||
| pub stx_atime: ::statx_timestamp, | ||
| pub stx_btime: ::statx_timestamp, | ||
| pub stx_ctime: ::statx_timestamp, | ||
| pub stx_mtime: ::statx_timestamp, | ||
| pub stx_rdev_major: u32, | ||
| pub stx_rdev_minor: u32, | ||
| pub stx_dev_major: u32, | ||
| pub stx_dev_minor: u32, | ||
| pub stx_mnt_id: u64, | ||
| pub stx_dio_mem_align: u32, | ||
| pub stx_dio_offset_align: u32, | ||
| __statx_pad3: [u64; 12], | ||
| } | ||
| pub struct statx_timestamp { | ||
| pub tv_sec: i64, | ||
| pub tv_nsec: u32, | ||
| pub __statx_timestamp_pad1: [i32; 1], | ||
| } | ||
| pub struct aiocb { | ||
@@ -68,3 +35,3 @@ pub aio_fildes: ::c_int, | ||
| __unused1: [::c_char; 4], | ||
| __glibc_reserved: [::c_char; 32] | ||
| __glibc_reserved: [::c_char; 32], | ||
| } | ||
@@ -124,3 +91,4 @@ | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6")))] | ||
| target_arch = "mips64r6" | ||
| )))] | ||
| pub c_ispeed: ::speed_t, | ||
@@ -133,3 +101,4 @@ #[cfg(not(any( | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6")))] | ||
| target_arch = "mips64r6" | ||
| )))] | ||
| pub c_ospeed: ::speed_t, | ||
@@ -360,3 +329,2 @@ } | ||
| pub stack_pointer: ::__u64, | ||
| #[cfg(libc_union)] | ||
| pub u: __c_anonymous_ptrace_syscall_info_data, | ||
@@ -408,2 +376,3 @@ } | ||
| pub flags: ::__u32, | ||
| pub tx_metadata_len: ::__u32, | ||
| } | ||
@@ -512,2 +481,12 @@ | ||
| } | ||
| // FIXME(1.0) this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", repr(align(8)))] | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| } | ||
| } | ||
@@ -541,73 +520,69 @@ | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| struct sifields_sigchld { | ||
| si_pid: ::pid_t, | ||
| si_uid: ::uid_t, | ||
| si_status: ::c_int, | ||
| si_utime: ::c_long, | ||
| si_stime: ::c_long, | ||
| } | ||
| impl ::Copy for sifields_sigchld {} | ||
| impl ::Clone for sifields_sigchld { | ||
| fn clone(&self) -> sifields_sigchld { | ||
| *self | ||
| } | ||
| } | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| struct sifields_sigchld { | ||
| si_pid: ::pid_t, | ||
| si_uid: ::uid_t, | ||
| si_status: ::c_int, | ||
| si_utime: ::c_long, | ||
| si_stime: ::c_long, | ||
| } | ||
| impl ::Copy for sifields_sigchld {} | ||
| impl ::Clone for sifields_sigchld { | ||
| fn clone(&self) -> sifields_sigchld { | ||
| *self | ||
| } | ||
| } | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| union sifields { | ||
| _align_pointer: *mut ::c_void, | ||
| sigchld: sifields_sigchld, | ||
| } | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| union sifields { | ||
| _align_pointer: *mut ::c_void, | ||
| sigchld: sifields_sigchld, | ||
| } | ||
| // Internal, for casts to access union fields. Note that some variants | ||
| // of sifields start with a pointer, which makes the alignment of | ||
| // sifields vary on 32-bit and 64-bit architectures. | ||
| #[repr(C)] | ||
| struct siginfo_f { | ||
| _siginfo_base: [::c_int; 3], | ||
| sifields: sifields, | ||
| } | ||
| // Internal, for casts to access union fields. Note that some variants | ||
| // of sifields start with a pointer, which makes the alignment of | ||
| // sifields vary on 32-bit and 64-bit architectures. | ||
| #[repr(C)] | ||
| struct siginfo_f { | ||
| _siginfo_base: [::c_int; 3], | ||
| sifields: sifields, | ||
| } | ||
| impl siginfo_t { | ||
| unsafe fn sifields(&self) -> &sifields { | ||
| &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
| } | ||
| impl siginfo_t { | ||
| unsafe fn sifields(&self) -> &sifields { | ||
| &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
| } | ||
| pub unsafe fn si_pid(&self) -> ::pid_t { | ||
| self.sifields().sigchld.si_pid | ||
| } | ||
| pub unsafe fn si_pid(&self) -> ::pid_t { | ||
| self.sifields().sigchld.si_pid | ||
| } | ||
| pub unsafe fn si_uid(&self) -> ::uid_t { | ||
| self.sifields().sigchld.si_uid | ||
| } | ||
| pub unsafe fn si_uid(&self) -> ::uid_t { | ||
| self.sifields().sigchld.si_uid | ||
| } | ||
| pub unsafe fn si_status(&self) -> ::c_int { | ||
| self.sifields().sigchld.si_status | ||
| } | ||
| pub unsafe fn si_status(&self) -> ::c_int { | ||
| self.sifields().sigchld.si_status | ||
| } | ||
| pub unsafe fn si_utime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_utime | ||
| } | ||
| pub unsafe fn si_utime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_utime | ||
| } | ||
| pub unsafe fn si_stime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_stime | ||
| } | ||
| } | ||
| pub unsafe fn si_stime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_stime | ||
| } | ||
| } | ||
| pub union __c_anonymous_ptrace_syscall_info_data { | ||
| pub entry: __c_anonymous_ptrace_syscall_info_entry, | ||
| pub exit: __c_anonymous_ptrace_syscall_info_exit, | ||
| pub seccomp: __c_anonymous_ptrace_syscall_info_seccomp, | ||
| } | ||
| impl ::Copy for __c_anonymous_ptrace_syscall_info_data {} | ||
| impl ::Clone for __c_anonymous_ptrace_syscall_info_data { | ||
| fn clone(&self) -> __c_anonymous_ptrace_syscall_info_data { | ||
| *self | ||
| } | ||
| } | ||
| pub union __c_anonymous_ptrace_syscall_info_data { | ||
| pub entry: __c_anonymous_ptrace_syscall_info_entry, | ||
| pub exit: __c_anonymous_ptrace_syscall_info_exit, | ||
| pub seccomp: __c_anonymous_ptrace_syscall_info_seccomp, | ||
| } | ||
| impl ::Copy for __c_anonymous_ptrace_syscall_info_data {} | ||
| impl ::Clone for __c_anonymous_ptrace_syscall_info_data { | ||
| fn clone(&self) -> __c_anonymous_ptrace_syscall_info_data { | ||
| *self | ||
| } | ||
@@ -627,26 +602,30 @@ } | ||
| #[cfg(any(target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", | ||
| not(target_arch = "x86_64"))))] | ||
| #[cfg(any( | ||
| target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", not(target_arch = "x86_64")) | ||
| ))] | ||
| pub ut_session: ::c_long, | ||
| #[cfg(any(target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", | ||
| not(target_arch = "x86_64"))))] | ||
| #[cfg(any( | ||
| target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", not(target_arch = "x86_64")) | ||
| ))] | ||
| pub ut_tv: ::timeval, | ||
| #[cfg(not(any(target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", | ||
| not(target_arch = "x86_64")))))] | ||
| #[cfg(not(any( | ||
| target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", not(target_arch = "x86_64")) | ||
| )))] | ||
| pub ut_session: i32, | ||
| #[cfg(not(any(target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", | ||
| not(target_arch = "x86_64")))))] | ||
| #[cfg(not(any( | ||
| target_arch = "aarch64", | ||
| target_arch = "s390x", | ||
| target_arch = "loongarch64", | ||
| all(target_pointer_width = "32", not(target_arch = "x86_64")) | ||
| )))] | ||
| pub ut_tv: __timeval, | ||
@@ -669,6 +648,6 @@ | ||
| && self | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self.ut_exit == other.ut_exit | ||
@@ -692,3 +671,3 @@ && self.ut_session == other.ut_session | ||
| .field("ut_user", &self.ut_user) | ||
| // FIXME: .field("ut_host", &self.ut_host) | ||
| // FIXME: .field("ut_host", &self.ut_host) | ||
| .field("ut_exit", &self.ut_exit) | ||
@@ -719,9 +698,8 @@ .field("ut_session", &self.ut_session) | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __c_anonymous_ptrace_syscall_info_data { | ||
| fn eq(&self, other: &__c_anonymous_ptrace_syscall_info_data) -> bool { | ||
| unsafe { | ||
| self.entry == other.entry || | ||
| self.exit == other.exit || | ||
| self.seccomp == other.seccomp | ||
| self.entry == other.entry | ||
| || self.exit == other.exit | ||
| || self.seccomp == other.seccomp | ||
| } | ||
@@ -731,14 +709,12 @@ } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __c_anonymous_ptrace_syscall_info_data {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __c_anonymous_ptrace_syscall_info_data { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| unsafe { | ||
| f.debug_struct("__c_anonymous_ptrace_syscall_info_data") | ||
| .field("entry", &self.entry) | ||
| .field("exit", &self.exit) | ||
| .field("seccomp", &self.seccomp) | ||
| .finish() | ||
| f.debug_struct("__c_anonymous_ptrace_syscall_info_data") | ||
| .field("entry", &self.entry) | ||
| .field("exit", &self.exit) | ||
| .field("seccomp", &self.seccomp) | ||
| .finish() | ||
| } | ||
@@ -748,9 +724,8 @@ } | ||
| #[cfg(libc_union)] | ||
| impl ::hash::Hash for __c_anonymous_ptrace_syscall_info_data { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| unsafe { | ||
| self.entry.hash(state); | ||
| self.exit.hash(state); | ||
| self.seccomp.hash(state); | ||
| self.entry.hash(state); | ||
| self.exit.hash(state); | ||
| self.seccomp.hash(state); | ||
| } | ||
@@ -1125,2 +1100,3 @@ } | ||
| pub const CLONE_NEWTIME: ::c_int = 0x80; | ||
| // DIFF(main): changed to `c_ulonglong` in e9abac9ac2 | ||
| pub const CLONE_CLEAR_SIGHAND: ::c_int = 0x100000000; | ||
@@ -1143,6 +1119,8 @@ pub const CLONE_INTO_CGROUP: ::c_int = 0x200000000; | ||
| cfg_if! { | ||
| if #[cfg(not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6")))] { | ||
| if #[cfg(not(any( | ||
| target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6" | ||
| )))] { | ||
| pub const KEYCTL_MOVE: u32 = 30; | ||
@@ -1177,33 +1155,2 @@ pub const KEYCTL_CAPABILITIES: u32 = 31; | ||
| pub const AT_STATX_SYNC_TYPE: ::c_int = 0x6000; | ||
| pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0x0000; | ||
| pub const AT_STATX_FORCE_SYNC: ::c_int = 0x2000; | ||
| pub const AT_STATX_DONT_SYNC: ::c_int = 0x4000; | ||
| pub const STATX_TYPE: ::c_uint = 0x0001; | ||
| pub const STATX_MODE: ::c_uint = 0x0002; | ||
| pub const STATX_NLINK: ::c_uint = 0x0004; | ||
| pub const STATX_UID: ::c_uint = 0x0008; | ||
| pub const STATX_GID: ::c_uint = 0x0010; | ||
| pub const STATX_ATIME: ::c_uint = 0x0020; | ||
| pub const STATX_MTIME: ::c_uint = 0x0040; | ||
| pub const STATX_CTIME: ::c_uint = 0x0080; | ||
| pub const STATX_INO: ::c_uint = 0x0100; | ||
| pub const STATX_SIZE: ::c_uint = 0x0200; | ||
| pub const STATX_BLOCKS: ::c_uint = 0x0400; | ||
| pub const STATX_BASIC_STATS: ::c_uint = 0x07ff; | ||
| pub const STATX_BTIME: ::c_uint = 0x0800; | ||
| pub const STATX_MNT_ID: ::c_uint = 0x1000; | ||
| pub const STATX_DIOALIGN: ::c_uint = 0x2000; | ||
| pub const STATX_ALL: ::c_uint = 0x0fff; | ||
| pub const STATX__RESERVED: ::c_int = 0x80000000; | ||
| pub const STATX_ATTR_COMPRESSED: ::c_int = 0x0004; | ||
| pub const STATX_ATTR_IMMUTABLE: ::c_int = 0x0010; | ||
| pub const STATX_ATTR_APPEND: ::c_int = 0x0020; | ||
| pub const STATX_ATTR_NODUMP: ::c_int = 0x0040; | ||
| pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800; | ||
| pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000; | ||
| pub const STATX_ATTR_MOUNT_ROOT: ::c_int = 0x2000; | ||
| pub const STATX_ATTR_VERITY: ::c_int = 0x00100000; | ||
| pub const STATX_ATTR_DAX: ::c_int = 0x00200000; | ||
| pub const SOMAXCONN: ::c_int = 4096; | ||
@@ -1302,6 +1249,3 @@ | ||
| pub const PTHREAD_STACK_MIN: ::size_t = 16384; | ||
| } else if #[cfg(any( | ||
| target_arch = "sparc", | ||
| target_arch = "sparc64" | ||
| ))] { | ||
| } else if #[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] { | ||
| pub const PTHREAD_STACK_MIN: ::size_t = 0x6000; | ||
@@ -1321,17 +1265,21 @@ } else { | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "x86", | ||
| target_arch = "x86_64", | ||
| target_arch = "arm", | ||
| target_arch = "aarch64", | ||
| target_arch = "loongarch64", | ||
| target_arch = "riscv64", | ||
| target_arch = "s390x"))] { | ||
| if #[cfg(any( | ||
| target_arch = "x86", | ||
| target_arch = "x86_64", | ||
| target_arch = "arm", | ||
| target_arch = "aarch64", | ||
| target_arch = "loongarch64", | ||
| target_arch = "riscv64", | ||
| target_arch = "s390x" | ||
| ))] { | ||
| pub const TUNSETCARRIER: ::Ioctl = 0x400454e2; | ||
| pub const TUNGETDEVNETNS: ::Ioctl = 0x54e3; | ||
| } else if #[cfg(any(target_arch = "mips", | ||
| target_arch = "mips64", | ||
| target_arch = "powerpc", | ||
| target_arch = "powerpc64", | ||
| target_arch = "sparc", | ||
| target_arch = "sparc64"))] { | ||
| } else if #[cfg(any( | ||
| target_arch = "mips", | ||
| target_arch = "mips64", | ||
| target_arch = "powerpc", | ||
| target_arch = "powerpc64", | ||
| target_arch = "sparc", | ||
| target_arch = "sparc64" | ||
| ))] { | ||
| pub const TUNSETCARRIER: ::Ioctl = 0x800454e2; | ||
@@ -1415,9 +1363,2 @@ pub const TUNGETDEVNETNS: ::Ioctl = 0x200054e3; | ||
| pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; | ||
| pub fn statx( | ||
| dirfd: ::c_int, | ||
| pathname: *const c_char, | ||
| flags: ::c_int, | ||
| mask: ::c_uint, | ||
| statxbuf: *mut statx, | ||
| ) -> ::c_int; | ||
| pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; | ||
@@ -1514,2 +1455,3 @@ pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; | ||
| pub fn mallinfo2() -> ::mallinfo2; | ||
| pub fn malloc_stats(); | ||
| pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; | ||
@@ -1630,22 +1572,26 @@ pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "x86", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "riscv32"))] { | ||
| if #[cfg(any( | ||
| target_arch = "x86", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "riscv32" | ||
| ))] { | ||
| mod b32; | ||
| pub use self::b32::*; | ||
| } else if #[cfg(any(target_arch = "x86_64", | ||
| target_arch = "aarch64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64", | ||
| target_arch = "riscv64", | ||
| target_arch = "loongarch64"))] { | ||
| } else if #[cfg(any( | ||
| target_arch = "x86_64", | ||
| target_arch = "aarch64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64", | ||
| target_arch = "riscv64", | ||
| target_arch = "loongarch64" | ||
| ))] { | ||
| mod b64; | ||
@@ -1657,11 +1603,1 @@ pub use self::b64::*; | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } else { | ||
| mod no_align; | ||
| pub use self::no_align::*; | ||
| } | ||
| } |
@@ -52,3 +52,3 @@ pub type c_char = u8; | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -65,3 +65,3 @@ | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
@@ -102,56 +102,2 @@ | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| pub f_fsid: ::c_ulong, | ||
| __f_unused: ::c_int, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct mcontext_t { | ||
@@ -192,2 +138,8 @@ pub trap_no: ::c_ulong, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: (i64, i64), | ||
| } | ||
| } | ||
@@ -852,8 +804,1 @@ | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -6,3 +6,2 @@ pub type c_char = u8; | ||
| s! { | ||
| pub struct stat { | ||
@@ -28,3 +27,3 @@ pub st_dev: ::dev_t, | ||
| __unused: [::c_int;2], | ||
| __unused: [::c_int; 2], | ||
| } | ||
@@ -35,3 +34,3 @@ | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -81,56 +80,2 @@ | ||
| } | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| pub f_fsid: ::c_ulong, | ||
| __f_unused: ::c_int, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| } | ||
@@ -137,0 +82,0 @@ |
@@ -66,3 +66,3 @@ pub type c_char = i8; | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
@@ -124,10 +124,2 @@ | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_code: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| pub struct statfs64 { | ||
@@ -147,20 +139,9 @@ pub f_type: ::c_ulong, | ||
| } | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| #[cfg(target_endian = "little")] | ||
| pub f_fsid: ::c_ulong, | ||
| __f_unused: ::c_int, | ||
| #[cfg(target_endian = "big")] | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 4], | ||
| } | ||
@@ -785,8 +766,1 @@ } | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 4000 + 450; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -11,3 +11,3 @@ pub type c_long = i32; | ||
| pub struct pthread_attr_t { | ||
| __size: [u32; 9] | ||
| __size: [u32; 9], | ||
| } | ||
@@ -14,0 +14,0 @@ |
@@ -50,3 +50,3 @@ pub type c_char = u8; | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -64,3 +64,3 @@ | ||
| __pad2: ::c_longlong, | ||
| __pad3: ::c_longlong | ||
| __pad3: ::c_longlong, | ||
| } | ||
@@ -101,59 +101,2 @@ | ||
| } | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| #[cfg(target_endian = "little")] | ||
| pub f_fsid: ::c_ulong, | ||
| __f_unused: ::c_int, | ||
| #[cfg(target_endian = "big")] | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| } | ||
@@ -160,0 +103,0 @@ |
@@ -7,6 +7,2 @@ //! RISC-V-specific definitions for 32-bit linux-like values | ||
| s! { | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7], | ||
| } | ||
| pub struct stat { | ||
@@ -56,78 +52,2 @@ pub st_dev: ::dev_t, | ||
| pub struct statfs { | ||
| pub f_type: ::c_long, | ||
| pub f_bsize: ::c_long, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_long, | ||
| pub f_frsize: ::c_long, | ||
| pub f_flags: ::c_long, | ||
| pub f_spare: [::c_long; 4], | ||
| } | ||
| pub struct statvfs { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_favail: ::fsfilcnt_t, | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| pub __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| pub f_fsid: ::c_ulong, | ||
| __f_unused: ::c_int, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| #[doc(hidden)] | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
| this field" | ||
| )] | ||
| pub _pad: [::c_int; 29], | ||
| _align: [u64; 0], | ||
| } | ||
| pub struct stack_t { | ||
@@ -139,9 +59,2 @@ pub ss_sp: *mut ::c_void, | ||
| pub struct sigaction { | ||
| pub sa_sigaction: ::sighandler_t, | ||
| pub sa_mask: ::sigset_t, | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<unsafe extern "C" fn()>, | ||
| } | ||
| pub struct ipc_perm { | ||
@@ -192,11 +105,13 @@ pub __key: ::key_t, | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: (i64, f64), | ||
| } | ||
| } | ||
| //pub const RLIM_INFINITY: ::rlim_t = !0; | ||
| pub const VEOF: usize = 4; | ||
| pub const RTLD_DEEPBIND: ::c_int = 0x8; | ||
| pub const RTLD_GLOBAL: ::c_int = 0x100; | ||
| pub const RTLD_NOLOAD: ::c_int = 0x4; | ||
| pub const TIOCGSOFTCAR: ::c_ulong = 21529; | ||
| pub const TIOCSSOFTCAR: ::c_ulong = 21530; | ||
| pub const TIOCGRS485: ::c_int = 21550; | ||
| pub const TIOCSRS485: ::c_int = 21551; | ||
| //pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; | ||
@@ -328,4 +243,2 @@ //pub const RLIMIT_AS: ::__rlimit_resource_t = 9; | ||
| pub const O_ASYNC: ::c_int = 8192; | ||
| pub const O_NDELAY: ::c_int = 2048; | ||
| pub const EFD_NONBLOCK: ::c_int = 2048; | ||
| pub const F_SETOWN: ::c_int = 8; | ||
@@ -336,27 +249,3 @@ pub const F_GETOWN: ::c_int = 9; | ||
| pub const F_SETLKW: ::c_int = 14; | ||
| pub const SFD_NONBLOCK: ::c_int = 2048; | ||
| pub const TCSANOW: ::c_int = 0; | ||
| pub const TCSADRAIN: ::c_int = 1; | ||
| pub const TCSAFLUSH: ::c_int = 2; | ||
| pub const TIOCLINUX: ::c_ulong = 21532; | ||
| pub const TIOCGSERIAL: ::c_ulong = 21534; | ||
| pub const TIOCEXCL: ::c_ulong = 21516; | ||
| pub const TIOCNXCL: ::c_ulong = 21517; | ||
| pub const TIOCSCTTY: ::c_ulong = 21518; | ||
| pub const TIOCSTI: ::c_ulong = 21522; | ||
| pub const TIOCMGET: ::c_ulong = 21525; | ||
| pub const TIOCMBIS: ::c_ulong = 21526; | ||
| pub const TIOCMBIC: ::c_ulong = 21527; | ||
| pub const TIOCMSET: ::c_ulong = 21528; | ||
| pub const TIOCCONS: ::c_ulong = 21533; | ||
| pub const TIOCM_ST: ::c_int = 8; | ||
| pub const TIOCM_SR: ::c_int = 16; | ||
| pub const TIOCM_CTS: ::c_int = 32; | ||
| pub const TIOCM_CAR: ::c_int = 64; | ||
| pub const TIOCM_RNG: ::c_int = 128; | ||
| pub const TIOCM_DSR: ::c_int = 256; | ||
| pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; | ||
| pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; | ||
| pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; | ||
| pub const O_DIRECT: ::c_int = 16384; | ||
@@ -370,3 +259,2 @@ pub const O_DIRECTORY: ::c_int = 65536; | ||
| pub const MAP_ANON: ::c_int = 32; | ||
| pub const MAP_ANONYMOUS: ::c_int = 32; | ||
| pub const MAP_DENYWRITE: ::c_int = 2048; | ||
@@ -384,5 +272,2 @@ pub const MAP_EXECUTABLE: ::c_int = 4096; | ||
| pub const EREMOTEIO: ::c_int = 121; | ||
| pub const FIOCLEX: ::c_int = 21585; | ||
| pub const FIONCLEX: ::c_int = 21584; | ||
| pub const FIONBIO: ::c_int = 21537; | ||
| pub const MCL_CURRENT: ::c_int = 1; | ||
@@ -444,20 +329,2 @@ pub const MCL_FUTURE: ::c_int = 2; | ||
| pub const XTABS: ::tcflag_t = 6144; | ||
| pub const B0: ::speed_t = 0; | ||
| pub const B50: ::speed_t = 1; | ||
| pub const B75: ::speed_t = 2; | ||
| pub const B110: ::speed_t = 3; | ||
| pub const B134: ::speed_t = 4; | ||
| pub const B150: ::speed_t = 5; | ||
| pub const B200: ::speed_t = 6; | ||
| pub const B300: ::speed_t = 7; | ||
| pub const B600: ::speed_t = 8; | ||
| pub const B1200: ::speed_t = 9; | ||
| pub const B1800: ::speed_t = 10; | ||
| pub const B2400: ::speed_t = 11; | ||
| pub const B4800: ::speed_t = 12; | ||
| pub const B9600: ::speed_t = 13; | ||
| pub const B19200: ::speed_t = 14; | ||
| pub const B38400: ::speed_t = 15; | ||
| pub const EXTA: ::speed_t = 14; | ||
| pub const EXTB: ::speed_t = 15; | ||
| pub const B57600: ::speed_t = 4097; | ||
@@ -485,23 +352,2 @@ pub const B115200: ::speed_t = 4098; | ||
| pub const EXTPROC: ::tcflag_t = 65536; | ||
| pub const TCGETS: ::c_int = 21505; | ||
| pub const TCSETS: ::c_int = 21506; | ||
| pub const TCSETSW: ::c_int = 21507; | ||
| pub const TCSETSF: ::c_int = 21508; | ||
| pub const TCGETA: ::c_int = 21509; | ||
| pub const TCSETA: ::c_int = 21510; | ||
| pub const TCSETAW: ::c_int = 21511; | ||
| pub const TCSETAF: ::c_int = 21512; | ||
| pub const TCSBRK: ::c_int = 21513; | ||
| pub const TCXONC: ::c_int = 21514; | ||
| pub const TCFLSH: ::c_int = 21515; | ||
| pub const TIOCINQ: ::c_int = 21531; | ||
| pub const TIOCGPGRP: ::c_int = 21519; | ||
| pub const TIOCSPGRP: ::c_int = 21520; | ||
| pub const TIOCOUTQ: ::c_int = 21521; | ||
| pub const TIOCGWINSZ: ::c_int = 21523; | ||
| pub const TIOCSWINSZ: ::c_int = 21524; | ||
| pub const FIONREAD: ::c_int = 21531; | ||
| pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; | ||
| pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; | ||
| pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; | ||
@@ -802,8 +648,1 @@ pub const SYS_read: ::c_long = 63; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -49,6 +49,10 @@ pub type c_char = i8; | ||
| pub struct mcontext_t { | ||
| __private: [u32; 22], | ||
| } | ||
| pub struct stack_t { | ||
| pub ss_sp: *mut ::c_void, | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
@@ -65,3 +69,3 @@ | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
@@ -101,60 +105,2 @@ | ||
| } | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct mcontext_t { | ||
| __private: [u32; 22] | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| pub f_fsid: ::c_ulong, | ||
| __f_unused: ::c_int, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| } | ||
@@ -187,2 +133,8 @@ | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 3], | ||
| } | ||
| } | ||
@@ -224,6 +176,6 @@ | ||
| .field("mxcsr", &self.mxcsr) | ||
| // Ignore __reserved field | ||
| // Ignore __reserved field | ||
| .field("st_space", &self.st_space) | ||
| .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| // Ignore padding field | ||
| .finish() | ||
@@ -259,6 +211,6 @@ } | ||
| && self | ||
| .__private | ||
| .iter() | ||
| .zip(other.__private.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__private | ||
| .iter() | ||
| .zip(other.__private.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -277,3 +229,3 @@ } | ||
| .field("uc_sigmask", &self.uc_sigmask) | ||
| // Ignore __private field | ||
| // Ignore __private field | ||
| .finish() | ||
@@ -970,8 +922,1 @@ } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -71,4 +71,51 @@ pub type c_char = u8; | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub fault_address: ::c_ulong, | ||
| pub regs: [::c_ulong; 31], | ||
| pub sp: ::c_ulong, | ||
| pub pc: ::c_ulong, | ||
| pub pstate: ::c_ulong, | ||
| __reserved: [u64; 512], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [::__uint128_t; 32], | ||
| pub fpsr: u32, | ||
| pub fpcr: u32, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8], | ||
| } | ||
| } | ||
| pub const O_APPEND: ::c_int = 1024; | ||
@@ -538,2 +585,4 @@ pub const O_DIRECT: ::c_int = 0x10000; | ||
| pub const SYS_statx: ::c_long = 291; | ||
| pub const SYS_io_pgetevents: ::c_long = 292; | ||
| pub const SYS_rseq: ::c_long = 293; | ||
| pub const SYS_pidfd_send_signal: ::c_long = 424; | ||
@@ -648,15 +697,1 @@ pub const SYS_io_uring_setup: ::c_long = 425; | ||
| pub const FLUSHO: ::tcflag_t = 0x00001000; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_int128)] { | ||
| mod int128; | ||
| pub use self::int128::*; | ||
| } | ||
| } |
@@ -14,6 +14,2 @@ //! LoongArch-specific definitions for 64-bit linux-like values | ||
| s! { | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7], | ||
| } | ||
| pub struct stat { | ||
@@ -63,32 +59,2 @@ pub st_dev: ::dev_t, | ||
| pub struct statfs { | ||
| pub f_type: ::c_long, | ||
| pub f_bsize: ::c_long, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_long, | ||
| pub f_frsize: ::c_long, | ||
| pub f_flags: ::c_long, | ||
| pub f_spare: [::c_long; 4], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_long, | ||
| pub f_bsize: ::c_long, | ||
| pub f_blocks: ::fsblkcnt64_t, | ||
| pub f_bfree: ::fsblkcnt64_t, | ||
| pub f_bavail: ::fsblkcnt64_t, | ||
| pub f_files: ::fsfilcnt64_t, | ||
| pub f_ffree: ::fsfilcnt64_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_long, | ||
| pub f_frsize: ::c_long, | ||
| pub f_flags: ::c_long, | ||
| pub f_spare: [::c_long; 4], | ||
| } | ||
| pub struct ipc_perm { | ||
@@ -101,3 +67,3 @@ pub __key: ::key_t, | ||
| pub mode: ::c_uint, | ||
| pub __seq: ::c_ushort, | ||
| pub __seq: ::c_int, | ||
| __pad2: ::c_ushort, | ||
@@ -114,3 +80,2 @@ __unused1: ::c_ulong, | ||
| pub reserved: [u64; 10], | ||
| } | ||
@@ -123,4 +88,43 @@ | ||
| } | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __pc: ::c_ulong, | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __flags: ::c_uint, | ||
| pub __extcontext: [::c_ulong; 0], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
| pub const SYS_io_setup: ::c_long = 0; | ||
@@ -437,3 +441,3 @@ pub const SYS_io_destroy: ::c_long = 1; | ||
| pub const O_DIRECTORY: ::c_int = 0x10000; | ||
| pub const O_LARGEFILE: ::c_int = 0; | ||
| pub const O_LARGEFILE: ::c_int = 0o0100000; | ||
| pub const O_NOFOLLOW: ::c_int = 0x20000; | ||
@@ -447,3 +451,3 @@ pub const O_CREAT: ::c_int = 64; | ||
| pub const O_DSYNC: ::c_int = 4096; | ||
| pub const O_ASYNC: ::c_int = 4096; | ||
| pub const O_ASYNC: ::c_int = 0o20000; | ||
@@ -632,2 +636,3 @@ pub const SIGSTKSZ: ::size_t = 16384; | ||
| pub const ICANON: ::tcflag_t = 0x00000002; | ||
| pub const XCASE: ::tcflag_t = 0x00000004; | ||
| pub const PENDIN: ::tcflag_t = 0x00004000; | ||
@@ -671,8 +676,1 @@ pub const NOFLSH: ::tcflag_t = 0x00000080; | ||
| pub const FLUSHO: ::tcflag_t = 0x00001000; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -57,32 +57,2 @@ pub type c_char = i8; | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 5], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 5], | ||
| } | ||
| pub struct ipc_perm { | ||
@@ -98,3 +68,3 @@ pub __ipc_perm_key: ::key_t, | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -101,0 +71,0 @@ } |
@@ -6,40 +6,10 @@ pub type c_long = i64; | ||
| s! { | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct statvfs64 { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: u64, | ||
| pub f_bfree: u64, | ||
| pub f_bavail: u64, | ||
| pub f_files: u64, | ||
| pub f_ffree: u64, | ||
| pub f_favail: u64, | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct stack_t { | ||
| pub ss_sp: *mut ::c_void, | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| pub struct pthread_attr_t { | ||
| __size: [u64; 7] | ||
| __size: [u64; 7], | ||
| } | ||
@@ -78,17 +48,2 @@ | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| pub struct msghdr { | ||
@@ -125,10 +80,2 @@ pub msg_name: *mut ::c_void, | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| } | ||
@@ -135,0 +82,0 @@ |
@@ -60,3 +60,3 @@ pub type c_char = u8; | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
@@ -586,2 +586,18 @@ } | ||
| pub const SYS_statx: ::c_long = 383; | ||
| pub const SYS_pkey_alloc: ::c_long = 384; | ||
| pub const SYS_pkey_free: ::c_long = 385; | ||
| pub const SYS_pkey_mprotect: ::c_long = 386; | ||
| pub const SYS_rseq: ::c_long = 387; | ||
| pub const SYS_io_pgetevents: ::c_long = 388; | ||
| pub const SYS_semtimedop: ::c_long = 392; | ||
| pub const SYS_semget: ::c_long = 393; | ||
| pub const SYS_semctl: ::c_long = 394; | ||
| pub const SYS_shmget: ::c_long = 395; | ||
| pub const SYS_shmctl: ::c_long = 396; | ||
| pub const SYS_shmat: ::c_long = 397; | ||
| pub const SYS_shmdt: ::c_long = 398; | ||
| pub const SYS_msgget: ::c_long = 399; | ||
| pub const SYS_msgsnd: ::c_long = 400; | ||
| pub const SYS_msgrcv: ::c_long = 401; | ||
| pub const SYS_msgctl: ::c_long = 402; | ||
| pub const SYS_pidfd_send_signal: ::c_long = 424; | ||
@@ -588,0 +604,0 @@ pub const SYS_io_uring_setup: ::c_long = 425; |
@@ -8,4 +8,2 @@ //! RISC-V-specific definitions for 64-bit linux-like values | ||
| pub type blksize_t = ::c_int; | ||
| pub type fsblkcnt64_t = ::c_ulong; | ||
| pub type fsfilcnt64_t = ::c_ulong; | ||
| pub type __u64 = ::c_ulonglong; | ||
@@ -15,6 +13,2 @@ pub type __s64 = ::c_longlong; | ||
| s! { | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7], | ||
| } | ||
| pub struct stat { | ||
@@ -64,90 +58,2 @@ pub st_dev: ::dev_t, | ||
| pub struct statfs { | ||
| pub f_type: ::c_long, | ||
| pub f_bsize: ::c_long, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_long, | ||
| pub f_frsize: ::c_long, | ||
| pub f_flags: ::c_long, | ||
| pub f_spare: [::c_long; 4], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_long, | ||
| pub f_bsize: ::c_long, | ||
| pub f_blocks: ::fsblkcnt64_t, | ||
| pub f_bfree: ::fsblkcnt64_t, | ||
| pub f_bavail: ::fsblkcnt64_t, | ||
| pub f_files: ::fsfilcnt64_t, | ||
| pub f_ffree: ::fsfilcnt64_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_long, | ||
| pub f_frsize: ::c_long, | ||
| pub f_flags: ::c_long, | ||
| pub f_spare: [::c_long; 4], | ||
| } | ||
| pub struct statvfs { | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_favail: ::fsfilcnt_t, | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| pub __f_spare: [::c_int; 6], | ||
| } | ||
| 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: ::fsfilcnt64_t, | ||
| pub f_ffree: ::fsfilcnt64_t, | ||
| pub f_favail: ::fsfilcnt64_t, | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| pub __f_spare: [::c_int; 6], | ||
| } | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| #[doc(hidden)] | ||
| #[deprecated( | ||
| since="0.2.54", | ||
| note="Please leave a comment on \ | ||
| https://github.com/rust-lang/libc/pull/1316 if you're using \ | ||
| this field" | ||
| )] | ||
| pub _pad: [::c_int; 29], | ||
| _align: [u64; 0], | ||
| } | ||
| pub struct stack_t { | ||
| pub ss_sp: *mut ::c_void, | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t, | ||
| } | ||
| pub struct sigaction { | ||
| pub sa_sigaction: ::sighandler_t, | ||
| pub sa_mask: ::sigset_t, | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<unsafe extern "C" fn()>, | ||
| } | ||
| pub struct ipc_perm { | ||
@@ -167,16 +73,63 @@ pub __key: ::key_t, | ||
| pub struct shmid_ds { | ||
| pub shm_perm: ::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, | ||
| __unused5: ::c_ulong, | ||
| __unused6: ::c_ulong, | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub __uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __fpregs: __riscv_mc_fp_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub union __riscv_mc_fp_state { | ||
| pub __f: __riscv_mc_f_ext_state, | ||
| pub __d: __riscv_mc_d_ext_state, | ||
| pub __q: __riscv_mc_q_ext_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_f_ext_state { | ||
| pub __f: [::c_uint; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_d_ext_state { | ||
| pub __f: [::c_ulonglong; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct __riscv_mc_q_ext_state { | ||
| pub __f: [::c_ulonglong; 64], | ||
| pub __fcsr: ::c_uint, | ||
| pub __glibc_reserved: [::c_uint; 3], | ||
| } | ||
| } | ||
| pub const SYS_read: ::c_long = 63; | ||
@@ -457,2 +410,4 @@ pub const SYS_write: ::c_long = 64; | ||
| pub const SYS_statx: ::c_long = 291; | ||
| pub const SYS_io_pgetevents: ::c_long = 292; | ||
| pub const SYS_rseq: ::c_long = 293; | ||
| pub const SYS_pidfd_send_signal: ::c_long = 424; | ||
@@ -726,8 +681,1 @@ pub const SYS_io_uring_setup: ::c_long = 425; | ||
| pub const REG_NARGS: usize = 8; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -61,32 +61,2 @@ pub type blksize_t = i64; | ||
| } | ||
| pub struct statfs { | ||
| pub f_type: ::c_uint, | ||
| pub f_bsize: ::c_uint, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_uint, | ||
| pub f_frsize: ::c_uint, | ||
| pub f_flags: ::c_uint, | ||
| pub f_spare: [::c_uint; 4], | ||
| } | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_uint, | ||
| pub f_bsize: ::c_uint, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_uint, | ||
| pub f_frsize: ::c_uint, | ||
| pub f_flags: ::c_uint, | ||
| pub f_spare: [::c_uint; 4], | ||
| } | ||
| } | ||
@@ -114,5 +84,3 @@ | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("fpreg_t") | ||
| .field("d", &self.d) | ||
| .finish() | ||
| f.debug_struct("fpreg_t").field("d", &self.d).finish() | ||
| } | ||
@@ -480,2 +448,3 @@ } | ||
| pub const SYS_getdents: ::c_long = 141; | ||
| pub const SYS_select: ::c_long = 142; | ||
| pub const SYS_flock: ::c_long = 143; | ||
@@ -523,2 +492,22 @@ pub const SYS_msync: ::c_long = 144; | ||
| pub const SYS_vfork: ::c_long = 190; | ||
| pub const SYS_getrlimit: ::c_long = 191; | ||
| pub const SYS_lchown: ::c_long = 198; | ||
| pub const SYS_getuid: ::c_long = 199; | ||
| pub const SYS_getgid: ::c_long = 200; | ||
| pub const SYS_geteuid: ::c_long = 201; | ||
| pub const SYS_getegid: ::c_long = 202; | ||
| pub const SYS_setreuid: ::c_long = 203; | ||
| pub const SYS_setregid: ::c_long = 204; | ||
| pub const SYS_getgroups: ::c_long = 205; | ||
| pub const SYS_setgroups: ::c_long = 206; | ||
| pub const SYS_fchown: ::c_long = 207; | ||
| pub const SYS_setresuid: ::c_long = 208; | ||
| pub const SYS_getresuid: ::c_long = 209; | ||
| pub const SYS_setresgid: ::c_long = 210; | ||
| pub const SYS_getresgid: ::c_long = 211; | ||
| pub const SYS_chown: ::c_long = 212; | ||
| pub const SYS_setuid: ::c_long = 213; | ||
| pub const SYS_setgid: ::c_long = 214; | ||
| pub const SYS_setfsuid: ::c_long = 215; | ||
| pub const SYS_setfsgid: ::c_long = 216; | ||
| pub const SYS_pivot_root: ::c_long = 217; | ||
@@ -595,2 +584,3 @@ pub const SYS_mincore: ::c_long = 218; | ||
| pub const SYS_futimesat: ::c_long = 292; | ||
| pub const SYS_newfstatat: ::c_long = 293; | ||
| pub const SYS_unlinkat: ::c_long = 294; | ||
@@ -680,25 +670,22 @@ pub const SYS_renameat: ::c_long = 295; | ||
| pub const SYS_pwritev2: ::c_long = 377; | ||
| pub const SYS_lchown: ::c_long = 198; | ||
| pub const SYS_setuid: ::c_long = 213; | ||
| pub const SYS_getuid: ::c_long = 199; | ||
| pub const SYS_setgid: ::c_long = 214; | ||
| pub const SYS_getgid: ::c_long = 200; | ||
| pub const SYS_geteuid: ::c_long = 201; | ||
| pub const SYS_setreuid: ::c_long = 203; | ||
| pub const SYS_setregid: ::c_long = 204; | ||
| pub const SYS_getrlimit: ::c_long = 191; | ||
| pub const SYS_getgroups: ::c_long = 205; | ||
| pub const SYS_fchown: ::c_long = 207; | ||
| pub const SYS_setresuid: ::c_long = 208; | ||
| pub const SYS_setresgid: ::c_long = 210; | ||
| pub const SYS_getresgid: ::c_long = 211; | ||
| pub const SYS_select: ::c_long = 142; | ||
| pub const SYS_getegid: ::c_long = 202; | ||
| pub const SYS_setgroups: ::c_long = 206; | ||
| pub const SYS_getresuid: ::c_long = 209; | ||
| pub const SYS_chown: ::c_long = 212; | ||
| pub const SYS_setfsuid: ::c_long = 215; | ||
| pub const SYS_setfsgid: ::c_long = 216; | ||
| pub const SYS_newfstatat: ::c_long = 293; | ||
| pub const SYS_s390_guarded_storage: ::c_long = 378; | ||
| pub const SYS_statx: ::c_long = 379; | ||
| pub const SYS_s390_sthyi: ::c_long = 380; | ||
| pub const SYS_kexec_file_load: ::c_long = 381; | ||
| pub const SYS_io_pgetevents: ::c_long = 382; | ||
| pub const SYS_rseq: ::c_long = 383; | ||
| pub const SYS_pkey_mprotect: ::c_long = 384; | ||
| pub const SYS_pkey_alloc: ::c_long = 385; | ||
| pub const SYS_pkey_free: ::c_long = 386; | ||
| pub const SYS_semtimedop: ::c_long = 392; | ||
| pub const SYS_semget: ::c_long = 393; | ||
| pub const SYS_semctl: ::c_long = 394; | ||
| pub const SYS_shmget: ::c_long = 395; | ||
| pub const SYS_shmctl: ::c_long = 396; | ||
| pub const SYS_shmat: ::c_long = 397; | ||
| pub const SYS_shmdt: ::c_long = 398; | ||
| pub const SYS_msgget: ::c_long = 399; | ||
| pub const SYS_msgsnd: ::c_long = 400; | ||
| pub const SYS_msgrcv: ::c_long = 401; | ||
| pub const SYS_msgctl: ::c_long = 402; | ||
| pub const SYS_pidfd_send_signal: ::c_long = 424; | ||
@@ -723,3 +710,2 @@ pub const SYS_io_uring_setup: ::c_long = 425; | ||
| pub const SYS_mount_setattr: ::c_long = 442; | ||
| pub const SYS_quotactl_fd: ::c_long = 443; | ||
| pub const SYS_landlock_create_ruleset: ::c_long = 444; | ||
@@ -732,2 +718,3 @@ pub const SYS_landlock_add_rule: ::c_long = 445; | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| pub const SYS_mseal: ::c_long = 462; | ||
| pub const SYS_cachestat: ::c_long = 451; | ||
| pub const SYS_fchmodat2: ::c_long = 452; |
@@ -121,4 +121,19 @@ pub type c_char = i8; | ||
| __unused1: ::c_long, | ||
| __unused2: ::c_long | ||
| __unused2: ::c_long, | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
@@ -149,2 +164,8 @@ | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
@@ -166,6 +187,6 @@ | ||
| && self | ||
| .xmm_space | ||
| .iter() | ||
| .zip(other.xmm_space.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .xmm_space | ||
| .iter() | ||
| .zip(other.xmm_space.iter()) | ||
| .all(|(a, b)| a == b) | ||
| // Ignore padding field | ||
@@ -188,4 +209,4 @@ } | ||
| .field("st_space", &self.st_space) | ||
| // FIXME: .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| // FIXME: .field("xmm_space", &self.xmm_space) | ||
| // Ignore padding field | ||
| .finish() | ||
@@ -218,6 +239,6 @@ } | ||
| && self | ||
| .__private | ||
| .iter() | ||
| .zip(other.__private.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__private | ||
| .iter() | ||
| .zip(other.__private.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -236,3 +257,3 @@ } | ||
| .field("uc_sigmask", &self.uc_sigmask) | ||
| // Ignore __private field | ||
| // Ignore __private field | ||
| .finish() | ||
@@ -590,2 +611,4 @@ } | ||
| pub const SYS_statx: ::c_long = 332; | ||
| pub const SYS_io_pgetevents: ::c_long = 333; | ||
| pub const SYS_rseq: ::c_long = 334; | ||
| pub const SYS_pidfd_send_signal: ::c_long = 424; | ||
@@ -918,8 +941,1 @@ pub const SYS_io_uring_setup: ::c_long = 425; | ||
| pub const FLUSHO: ::tcflag_t = 0x00001000; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
@@ -117,4 +117,3 @@ #[inline] | ||
| // argument, nor do their names clash with any declared types. | ||
| pub use open as open64; | ||
| pub use openat as openat64; | ||
| pub use {open as open64, openat as openat64}; | ||
@@ -121,0 +120,0 @@ #[inline] |
@@ -22,3 +22,5 @@ pub type pthread_t = *mut ::c_void; | ||
| pub type fsblkcnt_t = ::c_ulonglong; | ||
| pub type fsblkcnt64_t = ::c_ulonglong; | ||
| pub type fsfilcnt_t = ::c_ulonglong; | ||
| pub type fsfilcnt64_t = ::c_ulonglong; | ||
| pub type rlim_t = ::c_ulonglong; | ||
@@ -62,61 +64,57 @@ | ||
| cfg_if! { | ||
| if #[cfg(libc_union)] { | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| struct sifields_sigchld { | ||
| si_pid: ::pid_t, | ||
| si_uid: ::uid_t, | ||
| si_status: ::c_int, | ||
| si_utime: ::c_long, | ||
| si_stime: ::c_long, | ||
| } | ||
| impl ::Copy for sifields_sigchld {} | ||
| impl ::Clone for sifields_sigchld { | ||
| fn clone(&self) -> sifields_sigchld { | ||
| *self | ||
| } | ||
| } | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| struct sifields_sigchld { | ||
| si_pid: ::pid_t, | ||
| si_uid: ::uid_t, | ||
| si_status: ::c_int, | ||
| si_utime: ::c_long, | ||
| si_stime: ::c_long, | ||
| } | ||
| impl ::Copy for sifields_sigchld {} | ||
| impl ::Clone for sifields_sigchld { | ||
| fn clone(&self) -> sifields_sigchld { | ||
| *self | ||
| } | ||
| } | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| union sifields { | ||
| _align_pointer: *mut ::c_void, | ||
| sigchld: sifields_sigchld, | ||
| } | ||
| // Internal, for casts to access union fields | ||
| #[repr(C)] | ||
| union sifields { | ||
| _align_pointer: *mut ::c_void, | ||
| sigchld: sifields_sigchld, | ||
| } | ||
| // Internal, for casts to access union fields. Note that some variants | ||
| // of sifields start with a pointer, which makes the alignment of | ||
| // sifields vary on 32-bit and 64-bit architectures. | ||
| #[repr(C)] | ||
| struct siginfo_f { | ||
| _siginfo_base: [::c_int; 3], | ||
| sifields: sifields, | ||
| } | ||
| // Internal, for casts to access union fields. Note that some variants | ||
| // of sifields start with a pointer, which makes the alignment of | ||
| // sifields vary on 32-bit and 64-bit architectures. | ||
| #[repr(C)] | ||
| struct siginfo_f { | ||
| _siginfo_base: [::c_int; 3], | ||
| sifields: sifields, | ||
| } | ||
| impl siginfo_t { | ||
| unsafe fn sifields(&self) -> &sifields { | ||
| &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
| } | ||
| impl siginfo_t { | ||
| unsafe fn sifields(&self) -> &sifields { | ||
| &(*(self as *const siginfo_t as *const siginfo_f)).sifields | ||
| } | ||
| pub unsafe fn si_pid(&self) -> ::pid_t { | ||
| self.sifields().sigchld.si_pid | ||
| } | ||
| pub unsafe fn si_pid(&self) -> ::pid_t { | ||
| self.sifields().sigchld.si_pid | ||
| } | ||
| pub unsafe fn si_uid(&self) -> ::uid_t { | ||
| self.sifields().sigchld.si_uid | ||
| } | ||
| pub unsafe fn si_uid(&self) -> ::uid_t { | ||
| self.sifields().sigchld.si_uid | ||
| } | ||
| pub unsafe fn si_status(&self) -> ::c_int { | ||
| self.sifields().sigchld.si_status | ||
| } | ||
| pub unsafe fn si_status(&self) -> ::c_int { | ||
| self.sifields().sigchld.si_status | ||
| } | ||
| pub unsafe fn si_utime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_utime | ||
| } | ||
| pub unsafe fn si_utime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_utime | ||
| } | ||
| pub unsafe fn si_stime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_stime | ||
| } | ||
| } | ||
| pub unsafe fn si_stime(&self) -> ::c_long { | ||
| self.sifields().sigchld.si_stime | ||
| } | ||
@@ -150,5 +148,26 @@ } | ||
| pub sa_flags: ::c_int, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| } | ||
| // `mips*` targets swap the `s_errno` and `s_code` fields otherwise this struct is | ||
| // target-agnostic (see https://www.openwall.com/lists/musl/2016/01/27/1/2) | ||
| // | ||
| // FIXME(union): C implementation uses unions | ||
| pub struct siginfo_t { | ||
| pub si_signo: ::c_int, | ||
| #[cfg(not(target_arch = "mips"))] | ||
| pub si_errno: ::c_int, | ||
| pub si_code: ::c_int, | ||
| #[cfg(target_arch = "mips")] | ||
| pub si_errno: ::c_int, | ||
| #[doc(hidden)] | ||
| #[deprecated( | ||
| since = "0.2.54", | ||
| note = "Please leave a comment on https://github.com/rust-lang/libc/pull/1316 \ | ||
| if you're using this field" | ||
| )] | ||
| pub _pad: [::c_int; 29], | ||
| _align: [usize; 0], | ||
| } | ||
| pub struct statvfs { | ||
@@ -166,3 +185,3 @@ pub f_bsize: ::c_ulong, | ||
| #[cfg(target_pointer_width = "32")] | ||
| __f_unused: ::c_int, | ||
| __pad: ::c_int, | ||
| #[cfg(target_endian = "big")] | ||
@@ -172,5 +191,25 @@ pub f_fsid: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_spare: [::c_int; 6], | ||
| __f_reserved: [::c_int; 6], | ||
| } | ||
| 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: ::fsfilcnt64_t, | ||
| pub f_ffree: ::fsfilcnt64_t, | ||
| pub f_favail: ::fsfilcnt64_t, | ||
| #[cfg(target_endian = "little")] | ||
| pub f_fsid: ::c_ulong, | ||
| #[cfg(target_pointer_width = "32")] | ||
| __pad: ::c_int, | ||
| #[cfg(target_endian = "big")] | ||
| pub f_fsid: ::c_ulong, | ||
| pub f_flag: ::c_ulong, | ||
| pub f_namemax: ::c_ulong, | ||
| __f_reserved: [::c_int; 6], | ||
| } | ||
| pub struct termios { | ||
@@ -323,2 +362,3 @@ pub c_iflag: ::tcflag_t, | ||
| pub flags: ::__u32, | ||
| pub tx_metadata_len: ::__u32, | ||
| } | ||
@@ -368,10 +408,12 @@ | ||
| /* | ||
| * FIXME(musl): when musl headers are more up to date | ||
| * FIXME(musl): enable on all targets once musl headers are more up to date | ||
| */ | ||
| /// This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`. | ||
| /// Each is 4 bits. | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub tcpi_snd_rcv_wscale: u8, | ||
| /// This contains the bitfields `tcpi_delivery_rate_app_limited` (1 bit) and | ||
| /// `tcpi_fastopen_client_fail` (2 bits). | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub tcpi_delivery_fastopen_bitfields: u8, | ||
| */ | ||
| pub tcpi_rto: u32, | ||
@@ -421,6 +463,42 @@ pub tcpi_ato: u32, | ||
| pub tcpi_reord_seen: u32, | ||
| // FIXME(musl): to uncomment once CI musl is updated | ||
| //pub tcpi_rcv_ooopack: u32, | ||
| //pub tcpi_snd_wnd: u32, | ||
| // FIXME(musl): enable on all targets once CI musl is updated | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub tcpi_rcv_ooopack: u32, | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub tcpi_snd_wnd: u32, | ||
| } | ||
| // MIPS implementation is special (see mips arch folders) | ||
| #[cfg(not(target_arch = "mips"))] | ||
| pub struct statfs { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt_t, | ||
| pub f_bfree: ::fsblkcnt_t, | ||
| pub f_bavail: ::fsblkcnt_t, | ||
| pub f_files: ::fsfilcnt_t, | ||
| pub f_ffree: ::fsfilcnt_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| // MIPS implementation is special (see mips arch folders) | ||
| #[cfg(not(target_arch = "mips"))] | ||
| pub struct statfs64 { | ||
| pub f_type: ::c_ulong, | ||
| pub f_bsize: ::c_ulong, | ||
| pub f_blocks: ::fsblkcnt64_t, | ||
| pub f_bfree: ::fsblkcnt64_t, | ||
| pub f_bavail: ::fsblkcnt64_t, | ||
| pub f_files: ::fsfilcnt64_t, | ||
| pub f_ffree: ::fsfilcnt64_t, | ||
| pub f_fsid: ::fsid_t, | ||
| pub f_namelen: ::c_ulong, | ||
| pub f_frsize: ::c_ulong, | ||
| pub f_flags: ::c_ulong, | ||
| pub f_spare: [::c_ulong; 4], | ||
| } | ||
| } | ||
@@ -464,4 +542,13 @@ | ||
| #[cfg(target_env = "musl")] | ||
| #[cfg(not(target_arch = "loongarch64"))] | ||
| pub ut_session: ::c_long, | ||
| #[cfg(target_env = "musl")] | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub ut_session: ::c_int, | ||
| #[cfg(target_env = "musl")] | ||
| #[cfg(target_arch = "loongarch64")] | ||
| __ut_pad2: ::c_int, | ||
| #[cfg(target_env = "ohos")] | ||
@@ -508,3 +595,3 @@ #[cfg(target_endian = "little")] | ||
| .zip(other.__reserved.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -729,3 +816,6 @@ } | ||
| #[cfg(not(target_arch = "loongarch64"))] | ||
| pub const CPU_SETSIZE: ::c_int = 128; | ||
| #[cfg(target_arch = "loongarch64")] | ||
| pub const CPU_SETSIZE: ::c_int = 1024; | ||
@@ -1011,2 +1101,9 @@ pub const PTRACE_TRACEME: ::c_int = 0; | ||
| ) -> ::c_int; | ||
| pub fn getutxent() -> *mut utmpx; | ||
| pub fn getutxid(ut: *const utmpx) -> *mut utmpx; | ||
| pub fn getutxline(ut: *const utmpx) -> *mut utmpx; | ||
| pub fn pututxline(ut: *const utmpx) -> *mut utmpx; | ||
| pub fn setutxent(); | ||
| pub fn endutxent(); | ||
| } | ||
@@ -1019,20 +1116,25 @@ | ||
| cfg_if! { | ||
| if #[cfg(any(target_arch = "x86_64", | ||
| target_arch = "aarch64", | ||
| target_arch = "mips64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "s390x", | ||
| target_arch = "riscv64", | ||
| target_arch = "loongarch64"))] { | ||
| if #[cfg(any( | ||
| target_arch = "x86_64", | ||
| target_arch = "aarch64", | ||
| target_arch = "mips64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "s390x", | ||
| target_arch = "riscv64", | ||
| target_arch = "loongarch64" | ||
| ))] { | ||
| mod b64; | ||
| pub use self::b64::*; | ||
| } else if #[cfg(any(target_arch = "x86", | ||
| target_arch = "mips", | ||
| target_arch = "powerpc", | ||
| target_arch = "hexagon", | ||
| target_arch = "riscv32", | ||
| target_arch = "arm"))] { | ||
| } else if #[cfg(any( | ||
| target_arch = "x86", | ||
| target_arch = "mips", | ||
| target_arch = "powerpc", | ||
| target_arch = "hexagon", | ||
| target_arch = "riscv32", | ||
| target_arch = "arm" | ||
| ))] { | ||
| mod b32; | ||
| pub use self::b32::*; | ||
| } else { } | ||
| } else { | ||
| } | ||
| } |
@@ -68,4 +68,3 @@ pub type c_char = u8; | ||
| pub struct stat64 | ||
| { | ||
| pub struct stat64 { | ||
| pub st_dev: ::c_ulonglong, | ||
@@ -171,3 +170,3 @@ pub __pad1: ::c_uint, | ||
| pub sa_flags: ::c_ulong, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| pub sa_mask: sigset_t, | ||
@@ -246,2 +245,12 @@ } | ||
| } | ||
| // FIXME(1.0) this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", repr(align(8)))] | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| } | ||
| } | ||
@@ -919,11 +928,1 @@ | ||
| pub const SYS_set_mempolicy_home_node: ::c_long = 450; | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } else { | ||
| mod no_align; | ||
| pub use self::no_align::*; | ||
| } | ||
| } |
@@ -84,3 +84,3 @@ pub type c_char = i8; | ||
| pub struct pthread_attr_t { | ||
| __size: [u32; 9] | ||
| __size: [u32; 9], | ||
| } | ||
@@ -135,3 +135,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -149,3 +149,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -260,2 +260,12 @@ | ||
| } | ||
| // FIXME(1.0): this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", repr(align(8)))] | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| } | ||
| } | ||
@@ -687,11 +697,1 @@ | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } else { | ||
| mod no_align; | ||
| pub use self::no_align::*; | ||
| } | ||
| } |
@@ -64,3 +64,3 @@ pub type blkcnt_t = i64; | ||
| pub struct pthread_attr_t { | ||
| __size: [::c_ulong; 7] | ||
| __size: [::c_ulong; 7], | ||
| } | ||
@@ -103,3 +103,3 @@ | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -117,3 +117,3 @@ | ||
| __unused4: ::c_ulong, | ||
| __unused5: ::c_ulong | ||
| __unused5: ::c_ulong, | ||
| } | ||
@@ -191,2 +191,9 @@ | ||
| } | ||
| // FIXME(1.0): this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", repr(align(8)))] | ||
| pub struct sem_t { | ||
| __size: [::c_char; 32], | ||
| } | ||
| } | ||
@@ -202,11 +209,1 @@ | ||
| pub const SYS_gettid: ::c_long = 5178; // Valid for n64 | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } else { | ||
| mod no_align; | ||
| pub use self::no_align::*; | ||
| } | ||
| } |
@@ -26,6 +26,6 @@ pub type pthread_t = ::c_ulong; | ||
| pub const SA_NODEFER: ::c_int = 0x40000000; | ||
| pub const SA_RESETHAND: ::c_int = 0x80000000; | ||
| pub const SA_RESTART: ::c_int = 0x10000000; | ||
| pub const SA_NOCLDSTOP: ::c_int = 0x00000001; | ||
| pub const SA_NODEFER: ::c_uint = 0x40000000; | ||
| pub const SA_RESETHAND: ::c_uint = 0x80000000; | ||
| pub const SA_RESTART: ::c_uint = 0x10000000; | ||
| pub const SA_NOCLDSTOP: ::c_uint = 0x00000001; | ||
@@ -32,0 +32,0 @@ pub const EPOLL_CLOEXEC: ::c_int = 0x80000; |
@@ -20,3 +20,4 @@ pub type shmatt_t = ::c_ulong; | ||
| s! { | ||
| pub struct statvfs { // Different than GNU! | ||
| pub struct statvfs { | ||
| // Different than GNU! | ||
| pub f_bsize: ::c_ulong, | ||
@@ -83,2 +84,33 @@ pub f_frsize: ::c_ulong, | ||
| } | ||
| #[cfg_attr( | ||
| any( | ||
| target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64" | ||
| ), | ||
| repr(align(4)) | ||
| )] | ||
| #[cfg_attr( | ||
| not(any( | ||
| target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64" | ||
| )), | ||
| repr(align(8)) | ||
| )] | ||
| pub struct pthread_mutexattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
@@ -85,0 +117,0 @@ |
@@ -23,5 +23,5 @@ /// L4Re specifics | ||
| /// | 8bit granularity | 24bit offset .. | | ||
| gran_offset: l4_umword_t , | ||
| gran_offset: l4_umword_t, | ||
| /// Bitmap of CPUs. | ||
| map: l4_umword_t , | ||
| map: l4_umword_t, | ||
| } | ||
@@ -28,0 +28,0 @@ } |
@@ -37,3 +37,3 @@ //! Definitions for uclibc on 64bit systems | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -59,5 +59,5 @@ | ||
| pub struct siginfo_t { | ||
| si_signo: ::c_int, // signal number | ||
| si_errno: ::c_int, // if not zero: error value of signal, see errno.h | ||
| si_code: ::c_int, // signal code | ||
| si_signo: ::c_int, // signal number | ||
| si_errno: ::c_int, // if not zero: error value of signal, see errno.h | ||
| si_code: ::c_int, // signal code | ||
| pub _pad: [::c_int; 28], // unported union | ||
@@ -77,3 +77,3 @@ _align: [usize; 0], | ||
| __unused1: ::c_ulong, | ||
| __unused2: ::c_ulong | ||
| __unused2: ::c_ulong, | ||
| } | ||
@@ -115,14 +115,14 @@ | ||
| // ------------------------------------------------------------ | ||
| // definitions below are *unverified* and might **break** the software | ||
| // pub struct in_addr { | ||
| // pub s_addr: in_addr_t, | ||
| // } | ||
| // | ||
| // pub struct in6_addr { | ||
| // pub s6_addr: [u8; 16], | ||
| // #[cfg(not(libc_align))] | ||
| // __align: [u32; 0], | ||
| // } | ||
| /* ------------------------------------------------------------ | ||
| * definitions below are *unverified* and might **break** the software | ||
| */ | ||
| // pub struct in_addr { | ||
| // pub s_addr: in_addr_t, | ||
| // } | ||
| // | ||
| // pub struct in6_addr { | ||
| // pub s6_addr: [u8; 16], | ||
| // } | ||
| pub struct stat { | ||
@@ -138,3 +138,3 @@ pub st_dev: ::c_ulong, | ||
| pub st_rdev: ::c_ulong, // dev_t | ||
| pub st_size: off_t, // file size | ||
| pub st_size: off_t, // file size | ||
| pub st_blksize: ::blksize_t, | ||
@@ -148,3 +148,3 @@ pub st_blocks: ::blkcnt_t, | ||
| pub st_ctime_nsec: ::c_ulong, | ||
| st_pad4: [::c_long; 3] | ||
| st_pad4: [::c_long; 3], | ||
| } | ||
@@ -155,13 +155,15 @@ | ||
| pub sa_flags: ::c_ulong, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| pub sa_mask: ::sigset_t, | ||
| } | ||
| pub struct stack_t { // FIXME | ||
| pub struct stack_t { | ||
| // FIXME | ||
| pub ss_sp: *mut ::c_void, | ||
| pub ss_flags: ::c_int, | ||
| pub ss_size: ::size_t | ||
| pub ss_size: ::size_t, | ||
| } | ||
| pub struct statfs { // FIXME | ||
| pub struct statfs { | ||
| // FIXME | ||
| pub f_type: fsword_t, | ||
@@ -211,3 +213,4 @@ pub f_bsize: fsword_t, | ||
| pub struct msghdr { // FIXME | ||
| pub struct msghdr { | ||
| // FIXME | ||
| pub msg_name: *mut ::c_void, | ||
@@ -222,3 +225,4 @@ pub msg_namelen: ::socklen_t, | ||
| pub struct termios { // FIXME | ||
| pub struct termios { | ||
| // FIXME | ||
| pub c_iflag: ::tcflag_t, | ||
@@ -232,7 +236,9 @@ pub c_oflag: ::tcflag_t, | ||
| pub struct sigset_t { // FIXME | ||
| pub struct sigset_t { | ||
| // FIXME | ||
| __val: [::c_ulong; 16], | ||
| } | ||
| pub struct sysinfo { // FIXME | ||
| pub struct sysinfo { | ||
| // FIXME | ||
| pub uptime: ::c_long, | ||
@@ -254,3 +260,4 @@ pub loads: [::c_ulong; 3], | ||
| pub struct glob_t { // FIXME | ||
| pub struct glob_t { | ||
| // FIXME | ||
| pub gl_pathc: ::size_t, | ||
@@ -267,3 +274,4 @@ pub gl_pathv: *mut *mut c_char, | ||
| pub struct cpu_set_t { // FIXME | ||
| pub struct cpu_set_t { | ||
| // FIXME | ||
| #[cfg(target_pointer_width = "32")] | ||
@@ -275,7 +283,8 @@ bits: [u32; 32], | ||
| pub struct fsid_t { // FIXME | ||
| pub struct fsid_t { | ||
| // FIXME | ||
| __val: [::c_int; 2], | ||
| } | ||
| // FIXME this is actually a union | ||
| // FIXME(1.0): this is actually a union | ||
| pub struct sem_t { | ||
@@ -282,0 +291,0 @@ #[cfg(target_pointer_width = "32")] |
+124
-57
@@ -55,3 +55,6 @@ pub type blkcnt_t = i32; | ||
| cfg_if! { | ||
| if #[cfg(any(target_os = "horizon", all(target_os = "espidf", not(espidf_time32))))] { | ||
| if #[cfg(any( | ||
| target_os = "horizon", | ||
| all(target_os = "espidf", not(espidf_time32)) | ||
| ))] { | ||
| pub type time_t = ::c_longlong; | ||
@@ -65,3 +68,3 @@ } else { | ||
| if #[cfg(not(target_os = "horizon"))] { | ||
| s!{ | ||
| s! { | ||
| pub struct hostent { | ||
@@ -96,3 +99,4 @@ pub h_name: *mut ::c_char, | ||
| target_os = "espidf", | ||
| all(libc_cfg_target_vendor, target_arch = "powerpc", target_vendor = "nintendo"))))] | ||
| all(target_arch = "powerpc", target_vendor = "nintendo") | ||
| )))] | ||
| pub ai_addr: *mut sockaddr, | ||
@@ -177,3 +181,3 @@ | ||
| pub struct sigaction { | ||
| pub sa_handler: extern fn(arg1: ::c_int), | ||
| pub sa_handler: extern "C" fn(arg1: ::c_int), | ||
| pub sa_mask: sigset_t, | ||
@@ -189,7 +193,9 @@ pub sa_flags: ::c_int, | ||
| pub struct fd_set { // Unverified | ||
| fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE], | ||
| pub struct fd_set { | ||
| // Unverified | ||
| fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE], | ||
| } | ||
| pub struct passwd { // Unverified | ||
| pub struct passwd { | ||
| // Unverified | ||
| pub pw_name: *mut ::c_char, | ||
@@ -204,3 +210,4 @@ pub pw_passwd: *mut ::c_char, | ||
| pub struct termios { // Unverified | ||
| pub struct termios { | ||
| // Unverified | ||
| pub c_iflag: ::tcflag_t, | ||
@@ -218,7 +225,9 @@ pub c_oflag: ::tcflag_t, | ||
| pub struct sem_t { // Unverified | ||
| pub struct sem_t { | ||
| // Unverified | ||
| __size: [::c_char; 16], | ||
| } | ||
| pub struct Dl_info { // Unverified | ||
| pub struct Dl_info { | ||
| // Unverified | ||
| pub dli_fname: *const ::c_char, | ||
@@ -230,3 +239,4 @@ pub dli_fbase: *mut ::c_void, | ||
| pub struct utsname { // Unverified | ||
| pub struct utsname { | ||
| // Unverified | ||
| pub sysname: [::c_char; 65], | ||
@@ -237,10 +247,12 @@ pub nodename: [::c_char; 65], | ||
| pub machine: [::c_char; 65], | ||
| pub domainname: [::c_char; 65] | ||
| pub domainname: [::c_char; 65], | ||
| } | ||
| pub struct cpu_set_t { // Unverified | ||
| pub struct cpu_set_t { | ||
| // Unverified | ||
| bits: [u32; 32], | ||
| } | ||
| pub struct pthread_attr_t { // Unverified | ||
| pub struct pthread_attr_t { | ||
| // Unverified | ||
| #[cfg(not(target_os = "espidf"))] | ||
@@ -266,19 +278,95 @@ __size: [u8; __SIZEOF_PTHREAD_ATTR_T], | ||
| pub struct pthread_rwlockattr_t { // Unverified | ||
| __size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T] | ||
| pub struct pthread_rwlockattr_t { | ||
| // Unverified | ||
| __size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| #[cfg_attr( | ||
| all( | ||
| target_pointer_width = "32", | ||
| any(target_arch = "mips", target_arch = "arm", target_arch = "powerpc") | ||
| ), | ||
| repr(align(4)) | ||
| )] | ||
| #[cfg_attr( | ||
| any( | ||
| target_pointer_width = "64", | ||
| not(any(target_arch = "mips", target_arch = "arm", target_arch = "powerpc")) | ||
| ), | ||
| repr(align(8)) | ||
| )] | ||
| pub struct pthread_mutex_t { | ||
| // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| #[cfg_attr( | ||
| all( | ||
| target_pointer_width = "32", | ||
| any(target_arch = "mips", target_arch = "arm", target_arch = "powerpc") | ||
| ), | ||
| repr(align(4)) | ||
| )] | ||
| #[cfg_attr( | ||
| any( | ||
| target_pointer_width = "64", | ||
| not(any(target_arch = "mips", target_arch = "arm", target_arch = "powerpc")) | ||
| ), | ||
| repr(align(8)) | ||
| )] | ||
| pub struct pthread_rwlock_t { | ||
| // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| #[cfg_attr( | ||
| any( | ||
| target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64" | ||
| ), | ||
| repr(align(4)) | ||
| )] | ||
| #[cfg_attr( | ||
| not(any( | ||
| target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64" | ||
| )), | ||
| repr(align(8)) | ||
| )] | ||
| pub struct pthread_mutexattr_t { | ||
| // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct pthread_cond_t { | ||
| // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| // unverified constants | ||
| align_const! { | ||
| pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { | ||
| size: [__PTHREAD_INITIALIZER_BYTE; __SIZEOF_PTHREAD_MUTEX_T], | ||
| }; | ||
| pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { | ||
| size: [__PTHREAD_INITIALIZER_BYTE; __SIZEOF_PTHREAD_COND_T], | ||
| }; | ||
| pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { | ||
| size: [__PTHREAD_INITIALIZER_BYTE; __SIZEOF_PTHREAD_RWLOCK_T], | ||
| }; | ||
| } | ||
| pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { | ||
| size: [__PTHREAD_INITIALIZER_BYTE; __SIZEOF_PTHREAD_MUTEX_T], | ||
| }; | ||
| pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { | ||
| size: [__PTHREAD_INITIALIZER_BYTE; __SIZEOF_PTHREAD_COND_T], | ||
| }; | ||
| pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { | ||
| size: [__PTHREAD_INITIALIZER_BYTE; __SIZEOF_PTHREAD_RWLOCK_T], | ||
| }; | ||
@@ -699,3 +787,2 @@ cfg_if! { | ||
| pub const TRY_AGAIN: ::c_int = 213; | ||
| } else { | ||
@@ -765,3 +852,3 @@ pub const HOST_NOT_FOUND: ::c_int = 1; | ||
| (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); | ||
| return | ||
| return; | ||
| } | ||
@@ -772,3 +859,3 @@ | ||
| let fd = fd as usize; | ||
| return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0 | ||
| return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; | ||
| } | ||
@@ -780,3 +867,3 @@ | ||
| (*set).fds_bits[fd / bits] |= 1 << (fd % bits); | ||
| return | ||
| return; | ||
| } | ||
@@ -806,7 +893,3 @@ | ||
| #[cfg(not(all( | ||
| libc_cfg_target_vendor, | ||
| target_arch = "powerpc", | ||
| target_vendor = "nintendo" | ||
| )))] | ||
| #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] | ||
| #[cfg_attr(target_os = "espidf", link_name = "lwip_bind")] | ||
@@ -820,7 +903,3 @@ pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int; | ||
| pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; | ||
| #[cfg(not(all( | ||
| libc_cfg_target_vendor, | ||
| target_arch = "powerpc", | ||
| target_vendor = "nintendo" | ||
| )))] | ||
| #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] | ||
| #[cfg_attr(target_os = "espidf", link_name = "lwip_recvfrom")] | ||
@@ -835,7 +914,3 @@ pub fn recvfrom( | ||
| ) -> isize; | ||
| #[cfg(not(all( | ||
| libc_cfg_target_vendor, | ||
| target_arch = "powerpc", | ||
| target_vendor = "nintendo" | ||
| )))] | ||
| #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] | ||
| pub fn getnameinfo( | ||
@@ -851,2 +926,4 @@ sa: *const sockaddr, | ||
| pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; | ||
| // DIFF(main): changed to `*const *mut` in e77f551de9 | ||
| pub fn fexecve( | ||
@@ -857,2 +934,3 @@ fd: ::c_int, | ||
| ) -> ::c_int; | ||
| pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; | ||
@@ -941,12 +1019,1 @@ pub fn getgrgid_r( | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| #[macro_use] | ||
| mod align; | ||
| } else { | ||
| #[macro_use] | ||
| mod no_align; | ||
| } | ||
| } | ||
| expand_align!(); |
@@ -19,3 +19,3 @@ pub type nto_job_t = ::sync_t; | ||
| pub struct iov_t { | ||
| pub iov_base: *mut ::c_void, // union | ||
| pub iov_base: *mut ::c_void, // union | ||
| pub iov_len: ::size_t, | ||
@@ -134,3 +134,4 @@ } | ||
| pub struct _channel_connect_attr { // union | ||
| pub struct _channel_connect_attr { | ||
| // union | ||
| pub ev: ::__c_anonymous_struct_ev, | ||
@@ -185,3 +186,3 @@ } | ||
| pub timer_load_hi: u32, | ||
| pub nsec_stable: u64, // volatile | ||
| pub nsec_stable: u64, // volatile | ||
| pub timer_load_max: u64, | ||
@@ -218,3 +219,2 @@ pub timer_prog_time: u32, | ||
| s_no_extra_traits! { | ||
| #[repr(align(8))] | ||
@@ -221,0 +221,0 @@ pub struct syspage_entry { |
@@ -37,6 +37,3 @@ pub type c_char = i8; | ||
| pub cpu: x86_64_cpu_registers, | ||
| #[cfg(libc_union)] | ||
| pub fpu: x86_64_fpu_registers, | ||
| #[cfg(not(libc_union))] | ||
| __reserved: [u8; 1024], | ||
| } | ||
@@ -59,3 +56,3 @@ | ||
| pub st_regs: [u8; 80], | ||
| } | ||
| } | ||
@@ -85,3 +82,2 @@ pub struct fxsave_area_64 { | ||
| s_no_extra_traits! { | ||
| #[cfg(libc_union)] | ||
| pub union x86_64_fpu_registers { | ||
@@ -97,6 +93,4 @@ pub fsave_area: fsave_area_64, | ||
| if #[cfg(feature = "extra_traits")] { | ||
| #[cfg(libc_union)] | ||
| impl Eq for x86_64_fpu_registers {} | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for x86_64_fpu_registers { | ||
@@ -112,3 +106,2 @@ fn eq(&self, other: &x86_64_fpu_registers) -> bool { | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for x86_64_fpu_registers { | ||
@@ -126,3 +119,2 @@ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| #[cfg(libc_union)] | ||
| impl ::hash::Hash for x86_64_fpu_registers { | ||
@@ -129,0 +121,0 @@ fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
+17
-11
@@ -1,6 +0,2 @@ | ||
| use c_void; | ||
| use in6_addr; | ||
| use in_addr_t; | ||
| use timespec; | ||
| use DIR; | ||
| use {c_void, in6_addr, in_addr_t, timespec, DIR}; | ||
@@ -66,14 +62,24 @@ pub type nlink_t = u16; | ||
| pub pw_shell: *const c_char, | ||
| __reserved: [usize; __DEFAULT_RESERVED_SIZE__] | ||
| __reserved: [usize; __DEFAULT_RESERVED_SIZE__], | ||
| } | ||
| pub struct sem_t { __val: [usize; __SEM_SIZE__] } | ||
| pub struct sem_t { | ||
| __val: [usize; __SEM_SIZE__], | ||
| } | ||
| pub struct pthread_attr_t { __val: [usize; __PTHREAD_ATTR_SIZE__] } | ||
| pub struct pthread_attr_t { | ||
| __val: [usize; __PTHREAD_ATTR_SIZE__], | ||
| } | ||
| pub struct pthread_mutex_t { __val: [usize; __PTHREAD_MUTEX_SIZE__] } | ||
| pub struct pthread_mutex_t { | ||
| __val: [usize; __PTHREAD_MUTEX_SIZE__], | ||
| } | ||
| pub struct pthread_cond_t { __val: [usize; __PTHREAD_COND_SIZE__] } | ||
| pub struct pthread_cond_t { | ||
| __val: [usize; __PTHREAD_COND_SIZE__], | ||
| } | ||
| pub struct pthread_condattr_t { __val: [usize; __PTHREAD_CONDATTR_SIZE__] } | ||
| pub struct pthread_condattr_t { | ||
| __val: [usize; __PTHREAD_CONDATTR_SIZE__], | ||
| } | ||
@@ -80,0 +86,0 @@ pub struct Dl_info { |
+56
-53
@@ -78,3 +78,3 @@ pub type c_char = i8; | ||
| pub sun_family: ::sa_family_t, | ||
| pub sun_path: [::c_char; 108] | ||
| pub sun_path: [::c_char; 108], | ||
| } | ||
@@ -84,8 +84,4 @@ | ||
| pub ss_family: ::sa_family_t, | ||
| __ss_padding: [ | ||
| u8; | ||
| 128 - | ||
| ::core::mem::size_of::<sa_family_t>() - | ||
| ::core::mem::size_of::<c_ulong>() | ||
| ], | ||
| __ss_padding: | ||
| [u8; 128 - ::core::mem::size_of::<sa_family_t>() - ::core::mem::size_of::<c_ulong>()], | ||
| __ss_align: ::c_ulong, | ||
@@ -121,3 +117,3 @@ } | ||
| pub struct fd_set { | ||
| fds_bits: [::c_ulong; ::FD_SETSIZE / ULONG_SIZE], | ||
| fds_bits: [::c_ulong; ::FD_SETSIZE as usize / ULONG_SIZE], | ||
| } | ||
@@ -168,3 +164,3 @@ | ||
| pub sa_flags: ::c_ulong, | ||
| pub sa_restorer: ::Option<extern fn()>, | ||
| pub sa_restorer: ::Option<extern "C" fn()>, | ||
| pub sa_mask: ::sigset_t, | ||
@@ -592,3 +588,9 @@ } | ||
| pub const IP_DROP_MEMBERSHIP: ::c_int = 36; | ||
| pub const IP_TOS: ::c_int = 1; | ||
| pub const IP_RECVTOS: ::c_int = 2; | ||
| pub const IPPROTO_IGMP: ::c_int = 2; | ||
| pub const IPPROTO_PUP: ::c_int = 12; | ||
| pub const IPPROTO_IDP: ::c_int = 22; | ||
| pub const IPPROTO_RAW: ::c_int = 255; | ||
| pub const IPPROTO_MAX: ::c_int = 255; | ||
| // } | ||
@@ -818,2 +820,3 @@ | ||
| pub const SOCK_DGRAM: ::c_int = 2; | ||
| pub const SOCK_RAW: ::c_int = 3; | ||
| pub const SOCK_NONBLOCK: ::c_int = 0o4_000; | ||
@@ -1024,3 +1027,3 @@ pub const SOCK_CLOEXEC: ::c_int = 0o2_000_000; | ||
| (*set).fds_bits[fd / size] &= !(1 << (fd % size)); | ||
| return | ||
| return; | ||
| } | ||
@@ -1031,3 +1034,3 @@ | ||
| let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; | ||
| return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0 | ||
| return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; | ||
| } | ||
@@ -1039,3 +1042,3 @@ | ||
| (*set).fds_bits[fd / size] |= 1 << (fd % size); | ||
| return | ||
| return; | ||
| } | ||
@@ -1273,6 +1276,6 @@ | ||
| && self | ||
| .d_name | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .d_name | ||
| .iter() | ||
| .zip(other.d_name.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -1290,3 +1293,3 @@ } | ||
| .field("d_type", &self.d_type) | ||
| // FIXME: .field("d_name", &self.d_name) | ||
| // FIXME: .field("d_name", &self.d_name) | ||
| .finish() | ||
@@ -1310,6 +1313,6 @@ } | ||
| && self | ||
| .sun_path | ||
| .iter() | ||
| .zip(other.sun_path.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .sun_path | ||
| .iter() | ||
| .zip(other.sun_path.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -1324,3 +1327,3 @@ } | ||
| .field("sun_family", &self.sun_family) | ||
| // FIXME: .field("sun_path", &self.sun_path) | ||
| // FIXME: .field("sun_path", &self.sun_path) | ||
| .finish() | ||
@@ -1342,6 +1345,6 @@ } | ||
| && self | ||
| .__ss_padding | ||
| .iter() | ||
| .zip(other.__ss_padding.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .__ss_padding | ||
| .iter() | ||
| .zip(other.__ss_padding.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -1357,3 +1360,3 @@ } | ||
| .field("__ss_align", &self.__ss_align) | ||
| // FIXME: .field("__ss_padding", &self.__ss_padding) | ||
| // FIXME: .field("__ss_padding", &self.__ss_padding) | ||
| .finish() | ||
@@ -1378,26 +1381,26 @@ } | ||
| && self | ||
| .nodename | ||
| .iter() | ||
| .zip(other.nodename.iter()) | ||
| .all(|(a, b)| a == b) | ||
| .nodename | ||
| .iter() | ||
| .zip(other.nodename.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .release | ||
| .iter() | ||
| .zip(other.release.iter()) | ||
| .all(|(a, b)| a == b) | ||
| .release | ||
| .iter() | ||
| .zip(other.release.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .version | ||
| .iter() | ||
| .zip(other.version.iter()) | ||
| .all(|(a, b)| a == b) | ||
| .version | ||
| .iter() | ||
| .zip(other.version.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .machine | ||
| .iter() | ||
| .zip(other.machine.iter()) | ||
| .all(|(a, b)| a == b) | ||
| .machine | ||
| .iter() | ||
| .zip(other.machine.iter()) | ||
| .all(|(a, b)| a == b) | ||
| && self | ||
| .domainname | ||
| .iter() | ||
| .zip(other.domainname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| .domainname | ||
| .iter() | ||
| .zip(other.domainname.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -1411,8 +1414,8 @@ } | ||
| f.debug_struct("utsname") | ||
| // FIXME: .field("sysname", &self.sysname) | ||
| // FIXME: .field("nodename", &self.nodename) | ||
| // FIXME: .field("release", &self.release) | ||
| // FIXME: .field("version", &self.version) | ||
| // FIXME: .field("machine", &self.machine) | ||
| // FIXME: .field("domainname", &self.domainname) | ||
| // FIXME: .field("sysname", &self.sysname) | ||
| // FIXME: .field("nodename", &self.nodename) | ||
| // FIXME: .field("release", &self.release) | ||
| // FIXME: .field("version", &self.version) | ||
| // FIXME: .field("machine", &self.machine) | ||
| // FIXME: .field("domainname", &self.domainname) | ||
| .finish() | ||
@@ -1419,0 +1422,0 @@ } |
@@ -5,2 +5,3 @@ // Common functions that are unfortunately missing on illumos and | ||
| use core::cmp::min; | ||
| use unix::solarish::*; | ||
@@ -7,0 +8,0 @@ |
@@ -1,8 +0,5 @@ | ||
| use exit_status; | ||
| use NET_MAC_AWARE; | ||
| use NET_MAC_AWARE_INHERIT; | ||
| use PRIV_AWARE_RESET; | ||
| use PRIV_DEBUG; | ||
| use PRIV_PFEXEC; | ||
| use PRIV_XPOLICY; | ||
| use { | ||
| exit_status, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, | ||
| PRIV_XPOLICY, | ||
| }; | ||
@@ -49,6 +46,3 @@ pub type lgrp_rsrc_t = ::c_int; | ||
| s_no_extra_traits! { | ||
| #[cfg_attr(any( | ||
| target_arch = "x86", target_arch = "x86_64"), | ||
| repr(packed(4)) | ||
| )] | ||
| #[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), repr(packed(4)))] | ||
| pub struct epoll_event { | ||
@@ -89,6 +83,6 @@ pub events: u32, | ||
| && self | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -135,4 +129,3 @@ } | ||
| fn eq(&self, other: &epoll_event) -> bool { | ||
| self.events == other.events | ||
| && self.u64 == other.u64 | ||
| self.events == other.events && self.u64 == other.u64 | ||
| } | ||
@@ -139,0 +132,0 @@ } |
@@ -1,8 +0,5 @@ | ||
| use exit_status; | ||
| use NET_MAC_AWARE; | ||
| use NET_MAC_AWARE_INHERIT; | ||
| use PRIV_AWARE_RESET; | ||
| use PRIV_DEBUG; | ||
| use PRIV_PFEXEC; | ||
| use PRIV_XPOLICY; | ||
| use { | ||
| exit_status, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, | ||
| PRIV_XPOLICY, | ||
| }; | ||
@@ -67,3 +64,3 @@ pub type door_attr_t = ::c_uint; | ||
| pub d_descriptor: ::c_int, | ||
| pub d_id: ::door_id_t | ||
| pub d_id: ::door_id_t, | ||
| } | ||
@@ -106,3 +103,2 @@ | ||
| } | ||
| } | ||
@@ -125,6 +121,6 @@ | ||
| && self | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a,b)| a == b) | ||
| .ut_host | ||
| .iter() | ||
| .zip(other.ut_host.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
@@ -213,2 +209,3 @@ } | ||
| extern "C" { | ||
| // DIFF(main): changed to `*const *mut` in e77f551de9 | ||
| pub fn fexecve( | ||
@@ -215,0 +212,0 @@ fd: ::c_int, |
@@ -63,3 +63,2 @@ cfg_if! { | ||
| s_no_extra_traits! { | ||
| #[cfg(libc_union)] | ||
| pub union __c_anonymous_fp_reg_set { | ||
@@ -100,25 +99,22 @@ pub fpchip_state: __c_anonymous_fpchip_state, | ||
| if #[cfg(feature = "extra_traits")] { | ||
| #[cfg(libc_union)] | ||
| impl PartialEq for __c_anonymous_fp_reg_set { | ||
| fn eq(&self, other: &__c_anonymous_fp_reg_set) -> bool { | ||
| unsafe { | ||
| self.fpchip_state == other.fpchip_state || | ||
| self. | ||
| f_fpregs. | ||
| iter(). | ||
| zip(other.f_fpregs.iter()). | ||
| all(|(a, b)| a == b) | ||
| self.fpchip_state == other.fpchip_state | ||
| || self | ||
| .f_fpregs | ||
| .iter() | ||
| .zip(other.f_fpregs.iter()) | ||
| .all(|(a, b)| a == b) | ||
| } | ||
| } | ||
| } | ||
| #[cfg(libc_union)] | ||
| impl Eq for __c_anonymous_fp_reg_set {} | ||
| #[cfg(libc_union)] | ||
| impl ::fmt::Debug for __c_anonymous_fp_reg_set { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| unsafe { | ||
| f.debug_struct("__c_anonymous_fp_reg_set") | ||
| .field("fpchip_state", &{self.fpchip_state}) | ||
| .field("f_fpregs", &{self.f_fpregs}) | ||
| .finish() | ||
| f.debug_struct("__c_anonymous_fp_reg_set") | ||
| .field("fpchip_state", &{ self.fpchip_state }) | ||
| .field("f_fpregs", &{ self.f_fpregs }) | ||
| .finish() | ||
| } | ||
@@ -134,3 +130,3 @@ } | ||
| impl ::fmt::Debug for fpregset_t { | ||
| fn fmt(&self, f:&mut ::fmt::Formatter) -> ::fmt::Result { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("fpregset_t") | ||
@@ -143,4 +139,3 @@ .field("fp_reg_set", &self.fp_reg_set) | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.gregs == other.gregs && | ||
| self.fpregs == other.fpregs | ||
| self.gregs == other.gregs && self.fpregs == other.fpregs | ||
| } | ||
@@ -150,3 +145,3 @@ } | ||
| impl ::fmt::Debug for mcontext_t { | ||
| fn fmt(&self, f:&mut ::fmt::Formatter) -> ::fmt::Result { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("mcontext_t") | ||
@@ -170,3 +165,3 @@ .field("gregs", &self.gregs) | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f:&mut ::fmt::Formatter) -> ::fmt::Result { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
@@ -182,3 +177,2 @@ .field("uc_flags", &self.uc_flags) | ||
| } | ||
| } | ||
@@ -185,0 +179,0 @@ } |
+15
-11
@@ -1,6 +0,12 @@ | ||
| use super::{Send, Sync}; | ||
| //! [wasi-libc](https://github.com/WebAssembly/wasi-libc) definitions. | ||
| //! | ||
| //! `wasi-libc` project provides multiple libraries including emulated features, but we list only | ||
| //! basic features with `libc.a` here. | ||
| use core::iter::Iterator; | ||
| pub use ffi::c_void; | ||
| use c_void; | ||
| use super::{Send, Sync}; | ||
| pub type c_char = i8; | ||
@@ -49,3 +55,3 @@ pub type c_uchar = u8; | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| priv_: [f64; 4], | ||
| } | ||
@@ -383,13 +389,11 @@ } | ||
| #[allow(unused_unsafe)] | ||
| pub static CLOCK_MONOTONIC: clockid_t = | ||
| unsafe { clockid_t(ptr_addr_of!(_CLOCK_MONOTONIC)) }; | ||
| pub static CLOCK_MONOTONIC: clockid_t = clockid_t(core::ptr::addr_of!(_CLOCK_MONOTONIC)); | ||
| #[allow(unused_unsafe)] | ||
| pub static CLOCK_PROCESS_CPUTIME_ID: clockid_t = | ||
| unsafe { clockid_t(ptr_addr_of!(_CLOCK_PROCESS_CPUTIME_ID)) }; | ||
| clockid_t(core::ptr::addr_of!(_CLOCK_PROCESS_CPUTIME_ID)); | ||
| #[allow(unused_unsafe)] | ||
| pub static CLOCK_REALTIME: clockid_t = | ||
| unsafe { clockid_t(ptr_addr_of!(_CLOCK_REALTIME)) }; | ||
| pub static CLOCK_REALTIME: clockid_t = clockid_t(core::ptr::addr_of!(_CLOCK_REALTIME)); | ||
| #[allow(unused_unsafe)] | ||
| pub static CLOCK_THREAD_CPUTIME_ID: clockid_t = | ||
| unsafe { clockid_t(ptr_addr_of!(_CLOCK_THREAD_CPUTIME_ID)) }; | ||
| clockid_t(core::ptr::addr_of!(_CLOCK_THREAD_CPUTIME_ID)); | ||
| } | ||
@@ -467,3 +471,3 @@ } | ||
| let n = set.__nfds; | ||
| return set.__fds[..n].iter().any(|p| *p == fd) | ||
| return set.__fds[..n].iter().any(|p| *p == fd); | ||
| } | ||
@@ -482,3 +486,3 @@ | ||
| (*set).__nfds = 0; | ||
| return | ||
| return; | ||
| } | ||
@@ -485,0 +489,0 @@ } |
@@ -0,1 +1,21 @@ | ||
| cfg_if! { | ||
| if #[cfg(target_pointer_width = "64")] { | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4], | ||
| } | ||
| } | ||
| } else if #[cfg(target_pointer_width = "32")] { | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 6], | ||
| } | ||
| } | ||
| } | ||
| } | ||
| pub const L_tmpnam: ::c_uint = 14; | ||
@@ -17,8 +37,1 @@ pub const TMP_MAX: ::c_uint = 0x7fff; | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(libc_align)] { | ||
| mod align; | ||
| pub use self::align::*; | ||
| } | ||
| } |
+9
-20
| //! Windows CRT definitions | ||
| use c_void; | ||
| pub type c_schar = i8; | ||
@@ -257,2 +259,4 @@ pub type c_uchar = u8; | ||
| // DIFF(main): removed in 458c58f409 | ||
| // FIXME(msrv): done by `std` starting in 1.79.0 | ||
| // inline comment below appeases style checker | ||
@@ -458,2 +462,3 @@ #[cfg(all(target_env = "msvc", feature = "rustc-dep-of-std"))] // " if " | ||
| #[link_name = "_execv"] | ||
| // DIFF(main): changed to `intptr_t` in e77f551de9 | ||
| pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t; | ||
@@ -474,2 +479,3 @@ #[link_name = "_execve"] | ||
| ) -> ::c_int; | ||
| #[link_name = "_wexecv"] | ||
@@ -524,2 +530,5 @@ pub fn wexecv(prog: *const wchar_t, argv: *const *const wchar_t) -> ::intptr_t; | ||
| pub fn aligned_free(ptr: *mut ::c_void); | ||
| #[link_name = "_aligned_realloc"] | ||
| pub fn aligned_realloc(memblock: *mut ::c_void, size: size_t, alignment: size_t) | ||
| -> *mut c_void; | ||
| #[link_name = "_putenv"] | ||
@@ -576,22 +585,2 @@ pub fn putenv(envstring: *const ::c_char) -> ::c_int; | ||
| cfg_if! { | ||
| if #[cfg(libc_core_cvoid)] { | ||
| pub use ::ffi::c_void; | ||
| } else { | ||
| // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help | ||
| // enable more optimization opportunities around it recognizing things | ||
| // like malloc/free. | ||
| #[repr(u8)] | ||
| #[allow(missing_copy_implementations)] | ||
| #[allow(missing_debug_implementations)] | ||
| pub enum c_void { | ||
| // Two dummy variants so the #[repr] attribute can be used. | ||
| #[doc(hidden)] | ||
| __variant1, | ||
| #[doc(hidden)] | ||
| __variant2, | ||
| } | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(all(target_env = "gnu"))] { | ||
@@ -598,0 +587,0 @@ mod gnu; |
+0
-20
@@ -30,21 +30,1 @@ //! Xous C type definitions | ||
| pub const INT_MAX: c_int = 2147483647; | ||
| cfg_if! { | ||
| if #[cfg(libc_core_cvoid)] { | ||
| pub use ::ffi::c_void; | ||
| } else { | ||
| // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help | ||
| // enable more optimization opportunities around it recognizing things | ||
| // like malloc/free. | ||
| #[repr(u8)] | ||
| #[allow(missing_copy_implementations)] | ||
| #[allow(missing_debug_implementations)] | ||
| pub enum c_void { | ||
| // Two dummy variants so the #[repr] attribute can be used. | ||
| #[doc(hidden)] | ||
| __variant1, | ||
| #[doc(hidden)] | ||
| __variant2, | ||
| } | ||
| } | ||
| } |
@@ -1,5 +0,3 @@ | ||
| #![cfg(libc_const_extern_fn)] // If this does not hold, the file is empty | ||
| #[cfg(target_os = "linux")] | ||
| const _FOO: libc::c_uint = unsafe { libc::CMSG_SPACE(1) }; | ||
| //^ if CMSG_SPACE is not const, this will fail to compile |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| #[cfg_attr( | ||
| any( | ||
| target_pointer_width = "32", | ||
| target_arch = "x86_64" | ||
| ), | ||
| repr(align(4)))] | ||
| #[cfg_attr( | ||
| not(any( | ||
| target_pointer_width = "32", | ||
| target_arch = "x86_64" | ||
| )), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutexattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| pub struct pthread_rwlockattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "arm", | ||
| target_arch = "x86_64")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "arm", | ||
| target_arch = "x86_64"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutex_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "arm", | ||
| target_arch = "x86_64")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "arm", | ||
| target_arch = "x86_64"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_rwlock_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| #[cfg_attr(target_arch = "x86", | ||
| repr(align(4)))] | ||
| #[cfg_attr(not(target_arch = "x86"), | ||
| repr(align(8)))] | ||
| pub struct pthread_cond_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for pthread_cond_t { | ||
| fn eq(&self, other: &pthread_cond_t) -> bool { | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_cond_t {} | ||
| impl ::fmt::Debug for pthread_cond_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_cond_t") | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_cond_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| impl PartialEq for pthread_mutex_t { | ||
| fn eq(&self, other: &pthread_mutex_t) -> bool { | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_mutex_t {} | ||
| impl ::fmt::Debug for pthread_mutex_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_mutex_t") | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_mutex_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| impl PartialEq for pthread_rwlock_t { | ||
| fn eq(&self, other: &pthread_rwlock_t) -> bool { | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_rwlock_t {} | ||
| impl ::fmt::Debug for pthread_rwlock_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_rwlock_t") | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_rwlock_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| pub struct pthread_mutexattr_t { | ||
| #[cfg(target_arch = "x86_64")] | ||
| __align: [::c_int; 0], | ||
| #[cfg(not(target_arch = "x86_64"))] | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| pub struct pthread_rwlockattr_t { | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| pub struct pthread_condattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| pub struct pthread_mutex_t { | ||
| #[cfg(any(target_arch = "arm", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32")))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any(target_arch = "arm", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32"))))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| pub struct pthread_rwlock_t { | ||
| __align: [::c_long; 0], | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| pub struct pthread_cond_t { | ||
| __align: [*const ::c_void; 0], | ||
| #[cfg(not(target_env = "musl"))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for pthread_cond_t { | ||
| fn eq(&self, other: &pthread_cond_t) -> bool { | ||
| // Ignore __align field | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_cond_t {} | ||
| impl ::fmt::Debug for pthread_cond_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_cond_t") | ||
| // Ignore __align field | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_cond_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| // Ignore __align field | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| impl PartialEq for pthread_mutex_t { | ||
| fn eq(&self, other: &pthread_mutex_t) -> bool { | ||
| // Ignore __align field | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_mutex_t {} | ||
| impl ::fmt::Debug for pthread_mutex_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_mutex_t") | ||
| // Ignore __align field | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_mutex_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| // Ignore __align field | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| impl PartialEq for pthread_rwlock_t { | ||
| fn eq(&self, other: &pthread_rwlock_t) -> bool { | ||
| // Ignore __align field | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_rwlock_t {} | ||
| impl ::fmt::Debug for pthread_rwlock_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_rwlock_t") | ||
| // Ignore __align field | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_rwlock_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| // Ignore __align field | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| } |
| s! { | ||
| #[repr(align(4))] | ||
| pub struct in6_addr { | ||
| pub s6_addr: [u8; 16], | ||
| } | ||
| } | ||
| pub const IN6ADDR_LOOPBACK_INIT: in6_addr = in6_addr { | ||
| s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], | ||
| }; | ||
| pub const IN6ADDR_ANY_INIT: in6_addr = in6_addr { | ||
| s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | ||
| }; |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2] | ||
| } | ||
| } |
| pub type mcontext_t = *mut __darwin_mcontext64; | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct max_align_t { | ||
| priv_: f64 | ||
| } | ||
| } | ||
| s! { | ||
| pub struct ucontext_t { | ||
| pub uc_onstack: ::c_int, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_link: *mut ::ucontext_t, | ||
| pub uc_mcsize: usize, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| pub struct __darwin_mcontext64 { | ||
| pub __es: __darwin_arm_exception_state64, | ||
| pub __ss: __darwin_arm_thread_state64, | ||
| pub __ns: __darwin_arm_neon_state64, | ||
| } | ||
| pub struct __darwin_arm_exception_state64 { | ||
| pub __far: u64, | ||
| pub __esr: u32, | ||
| pub __exception: u32, | ||
| } | ||
| pub struct __darwin_arm_thread_state64 { | ||
| pub __x: [u64; 29], | ||
| pub __fp: u64, | ||
| pub __lr: u64, | ||
| pub __sp: u64, | ||
| pub __pc: u64, | ||
| pub __cpsr: u32, | ||
| pub __pad: u32, | ||
| } | ||
| // This type natively uses a uint128, but for a while we hacked | ||
| // it in with repr(align) and `[u64; 2]`. uint128 isn't available | ||
| // all the way back to our earliest supported versions so we | ||
| // preserver the old shim. | ||
| #[cfg_attr(not(libc_int128), repr(align(16)))] | ||
| pub struct __darwin_arm_neon_state64 { | ||
| #[cfg(libc_int128)] | ||
| pub __v: [::__uint128_t; 32], | ||
| #[cfg(not(libc_int128))] | ||
| pub __v: [[u64; 2]; 32], | ||
| pub __fpsr: u32, | ||
| pub __fpcr: u32, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2] | ||
| } | ||
| } |
| s! { | ||
| pub struct ctl_info { | ||
| pub ctl_id: u32, | ||
| pub ctl_name: [::c_char; MAX_KCTL_NAME], | ||
| } | ||
| } | ||
| pub const MAX_KCTL_NAME: usize = 96; |
| use {c_long, register_t}; | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub mc_onstack: register_t, | ||
| pub mc_rdi: register_t, | ||
| pub mc_rsi: register_t, | ||
| pub mc_rdx: register_t, | ||
| pub mc_rcx: register_t, | ||
| pub mc_r8: register_t, | ||
| pub mc_r9: register_t, | ||
| pub mc_rax: register_t, | ||
| pub mc_rbx: register_t, | ||
| pub mc_rbp: register_t, | ||
| pub mc_r10: register_t, | ||
| pub mc_r11: register_t, | ||
| pub mc_r12: register_t, | ||
| pub mc_r13: register_t, | ||
| pub mc_r14: register_t, | ||
| pub mc_r15: register_t, | ||
| pub mc_trapno: u32, | ||
| pub mc_fs: u16, | ||
| pub mc_gs: u16, | ||
| pub mc_addr: register_t, | ||
| pub mc_flags: u32, | ||
| pub mc_es: u16, | ||
| pub mc_ds: u16, | ||
| pub mc_err: register_t, | ||
| pub mc_rip: register_t, | ||
| pub mc_cs: register_t, | ||
| pub mc_rflags: register_t, | ||
| pub mc_rsp: register_t, | ||
| pub mc_ss: register_t, | ||
| pub mc_len: c_long, | ||
| pub mc_fpformat: c_long, | ||
| pub mc_ownedfp: c_long, | ||
| pub mc_fpstate: [c_long; 64], | ||
| pub mc_fsbase: register_t, | ||
| pub mc_gsbase: register_t, | ||
| pub mc_xfpustate: register_t, | ||
| pub mc_xfpustate_len: register_t, | ||
| pub mc_spare: [c_long; 4], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for mcontext_t { | ||
| fn eq(&self, other: &mcontext_t) -> bool { | ||
| self.mc_onstack == other.mc_onstack && | ||
| self.mc_rdi == other.mc_rdi && | ||
| self.mc_rsi == other.mc_rsi && | ||
| self.mc_rdx == other.mc_rdx && | ||
| self.mc_rcx == other.mc_rcx && | ||
| self.mc_r8 == other.mc_r8 && | ||
| self.mc_r9 == other.mc_r9 && | ||
| self.mc_rax == other.mc_rax && | ||
| self.mc_rbx == other.mc_rbx && | ||
| self.mc_rbp == other.mc_rbp && | ||
| self.mc_r10 == other.mc_r10 && | ||
| self.mc_r11 == other.mc_r11 && | ||
| self.mc_r12 == other.mc_r12 && | ||
| self.mc_r13 == other.mc_r13 && | ||
| self.mc_r14 == other.mc_r14 && | ||
| self.mc_r15 == other.mc_r15 && | ||
| self.mc_trapno == other.mc_trapno && | ||
| self.mc_fs == other.mc_fs && | ||
| self.mc_gs == other.mc_gs && | ||
| self.mc_addr == other.mc_addr && | ||
| self.mc_flags == other.mc_flags && | ||
| self.mc_es == other.mc_es && | ||
| self.mc_ds == other.mc_ds && | ||
| self.mc_err == other.mc_err && | ||
| self.mc_rip == other.mc_rip && | ||
| self.mc_cs == other.mc_cs && | ||
| self.mc_rflags == other.mc_rflags && | ||
| self.mc_rsp == other.mc_rsp && | ||
| self.mc_ss == other.mc_ss && | ||
| self.mc_len == other.mc_len && | ||
| self.mc_fpformat == other.mc_fpformat && | ||
| self.mc_ownedfp == other.mc_ownedfp && | ||
| self.mc_fpstate.iter().zip(other.mc_fpstate.iter()) | ||
| .all(|(a, b)| a == b) && | ||
| self.mc_fsbase == other.mc_fsbase && | ||
| self.mc_gsbase == other.mc_gsbase && | ||
| self.mc_xfpustate == other.mc_xfpustate && | ||
| self.mc_xfpustate_len == other.mc_xfpustate_len && | ||
| self.mc_spare == other.mc_spare | ||
| } | ||
| } | ||
| impl Eq for mcontext_t {} | ||
| impl ::fmt::Debug for mcontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("mcontext_t") | ||
| .field("mc_onstack", &self.mc_onstack) | ||
| .field("mc_rdi", &self.mc_rdi) | ||
| .field("mc_rsi", &self.mc_rsi) | ||
| .field("mc_rdx", &self.mc_rdx) | ||
| .field("mc_rcx", &self.mc_rcx) | ||
| .field("mc_r8", &self.mc_r8) | ||
| .field("mc_r9", &self.mc_r9) | ||
| .field("mc_rax", &self.mc_rax) | ||
| .field("mc_rbx", &self.mc_rbx) | ||
| .field("mc_rbp", &self.mc_rbp) | ||
| .field("mc_r10", &self.mc_r10) | ||
| .field("mc_r11", &self.mc_r11) | ||
| .field("mc_r12", &self.mc_r12) | ||
| .field("mc_r13", &self.mc_r13) | ||
| .field("mc_r14", &self.mc_r14) | ||
| .field("mc_r15", &self.mc_r15) | ||
| .field("mc_trapno", &self.mc_trapno) | ||
| .field("mc_fs", &self.mc_fs) | ||
| .field("mc_gs", &self.mc_gs) | ||
| .field("mc_addr", &self.mc_addr) | ||
| .field("mc_flags", &self.mc_flags) | ||
| .field("mc_es", &self.mc_es) | ||
| .field("mc_ds", &self.mc_ds) | ||
| .field("mc_err", &self.mc_err) | ||
| .field("mc_rip", &self.mc_rip) | ||
| .field("mc_cs", &self.mc_cs) | ||
| .field("mc_rflags", &self.mc_rflags) | ||
| .field("mc_rsp", &self.mc_rsp) | ||
| .field("mc_ss", &self.mc_ss) | ||
| .field("mc_len", &self.mc_len) | ||
| .field("mc_fpformat", &self.mc_fpformat) | ||
| .field("mc_ownedfp", &self.mc_ownedfp) | ||
| // FIXME: .field("mc_fpstate", &self.mc_fpstate) | ||
| .field("mc_fsbase", &self.mc_fsbase) | ||
| .field("mc_gsbase", &self.mc_gsbase) | ||
| .field("mc_xfpustate", &self.mc_xfpustate) | ||
| .field("mc_xfpustate_len", &self.mc_xfpustate_len) | ||
| .field("mc_spare", &self.mc_spare) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for mcontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.mc_onstack.hash(state); | ||
| self.mc_rdi.hash(state); | ||
| self.mc_rsi.hash(state); | ||
| self.mc_rdx.hash(state); | ||
| self.mc_rcx.hash(state); | ||
| self.mc_r8.hash(state); | ||
| self.mc_r9.hash(state); | ||
| self.mc_rax.hash(state); | ||
| self.mc_rbx.hash(state); | ||
| self.mc_rbp.hash(state); | ||
| self.mc_r10.hash(state); | ||
| self.mc_r11.hash(state); | ||
| self.mc_r12.hash(state); | ||
| self.mc_r13.hash(state); | ||
| self.mc_r14.hash(state); | ||
| self.mc_r15.hash(state); | ||
| self.mc_trapno.hash(state); | ||
| self.mc_fs.hash(state); | ||
| self.mc_gs.hash(state); | ||
| self.mc_addr.hash(state); | ||
| self.mc_flags.hash(state); | ||
| self.mc_es.hash(state); | ||
| self.mc_ds.hash(state); | ||
| self.mc_err.hash(state); | ||
| self.mc_rip.hash(state); | ||
| self.mc_cs.hash(state); | ||
| self.mc_rflags.hash(state); | ||
| self.mc_rsp.hash(state); | ||
| self.mc_ss.hash(state); | ||
| self.mc_len.hash(state); | ||
| self.mc_fpformat.hash(state); | ||
| self.mc_ownedfp.hash(state); | ||
| self.mc_fpstate.hash(state); | ||
| self.mc_fsbase.hash(state); | ||
| self.mc_gsbase.hash(state); | ||
| self.mc_xfpustate.hash(state); | ||
| self.mc_xfpustate_len.hash(state); | ||
| self.mc_spare.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } |
| // Placeholder file |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 2] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8] | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub __pad: [u8; 1024 / 8 - ::core::mem::size_of::<::sigset_t>()], | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| } | ||
| s! { | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub fault_address: ::c_ulonglong, | ||
| pub regs: [::c_ulonglong; 31], | ||
| pub sp: ::c_ulonglong, | ||
| pub pc: ::c_ulonglong, | ||
| pub pstate: ::c_ulonglong, | ||
| // nested arrays to get the right size/length while being able to | ||
| // auto-derive traits like Debug | ||
| __reserved: [[u64; 32]; 16], | ||
| } | ||
| } |
| s! { | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [::__uint128_t; 32], | ||
| pub fpsr: u32, | ||
| pub fpcr: u32, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(4))] | ||
| pub struct pthread_mutex_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_rwlock_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_mutexattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_rwlockattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| pub struct pthread_cond_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 3] | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for pthread_cond_t { | ||
| fn eq(&self, other: &pthread_cond_t) -> bool { | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_cond_t {} | ||
| impl ::fmt::Debug for pthread_cond_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_cond_t") | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_cond_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| pub struct pthread_mutex_t { | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| pub struct pthread_rwlock_t { | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| pub struct pthread_mutexattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| pub struct pthread_rwlockattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| pub struct pthread_condattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| pub struct pthread_cond_t { | ||
| __align: [*const ::c_void; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for pthread_cond_t { | ||
| fn eq(&self, other: &pthread_cond_t) -> bool { | ||
| self.size | ||
| .iter() | ||
| .zip(other.size.iter()) | ||
| .all(|(a,b)| a == b) | ||
| } | ||
| } | ||
| impl Eq for pthread_cond_t {} | ||
| impl ::fmt::Debug for pthread_cond_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("pthread_cond_t") | ||
| // FIXME: .field("size", &self.size) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for pthread_cond_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.size.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| #[cfg_attr(any(target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64", | ||
| target_arch = "aarch64", | ||
| target_arch = "riscv64", | ||
| target_arch = "riscv32", | ||
| target_arch = "loongarch64"), | ||
| repr(align(4)))] | ||
| #[cfg_attr(not(any(target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64", | ||
| target_arch = "aarch64", | ||
| target_arch = "riscv64", | ||
| target_arch = "riscv32", | ||
| target_arch = "loongarch64")), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutexattr_t { | ||
| #[doc(hidden)] | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[cfg_attr(any(target_env = "musl", target_env = "ohos", target_pointer_width = "32"), | ||
| repr(align(4)))] | ||
| #[cfg_attr(all(not(target_env = "musl"), | ||
| not(target_env = "ohos"), | ||
| target_pointer_width = "64"), | ||
| repr(align(8)))] | ||
| pub struct pthread_rwlockattr_t { | ||
| #[doc(hidden)] | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| #[doc(hidden)] | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_barrierattr_t { | ||
| #[doc(hidden)] | ||
| size: [u8; ::__SIZEOF_PTHREAD_BARRIERATTR_T], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct fanotify_event_metadata { | ||
| pub event_len: __u32, | ||
| pub vers: __u8, | ||
| pub reserved: __u8, | ||
| pub metadata_len: __u16, | ||
| pub mask: __u64, | ||
| pub fd: ::c_int, | ||
| pub pid: ::c_int, | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct tpacket_rollover_stats { | ||
| pub tp_all: ::__u64, | ||
| pub tp_huge: ::__u64, | ||
| pub tp_failed: ::__u64, | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct tpacket_hdr_v1 { | ||
| pub block_status: ::__u32, | ||
| pub num_pkts: ::__u32, | ||
| pub offset_to_first_pkt: ::__u32, | ||
| pub blk_len: ::__u32, | ||
| pub seq_num: ::__u64, | ||
| pub ts_first_pkt: ::tpacket_bd_ts, | ||
| pub ts_last_pkt: ::tpacket_bd_ts, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| #[cfg_attr(all(any(target_env = "musl", target_env = "ohos"), | ||
| target_pointer_width = "32"), | ||
| repr(align(4)))] | ||
| #[cfg_attr(all(any(target_env = "musl", target_env = "ohos"), | ||
| target_pointer_width = "64"), | ||
| repr(align(8)))] | ||
| #[cfg_attr(all(not(any(target_env = "musl", target_env = "ohos")), | ||
| target_arch = "x86"), | ||
| repr(align(4)))] | ||
| #[cfg_attr(all(not(any(target_env = "musl", target_env = "ohos")), | ||
| not(target_arch = "x86")), | ||
| repr(align(8)))] | ||
| pub struct pthread_cond_t { | ||
| #[doc(hidden)] | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "hexagon", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "x86_64", | ||
| target_arch = "x86")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "hexagon", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "x86_64", | ||
| target_arch = "x86"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutex_t { | ||
| #[doc(hidden)] | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "hexagon", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "x86_64", | ||
| target_arch = "x86")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "hexagon", | ||
| target_arch = "m68k", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "x86_64", | ||
| target_arch = "x86"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_rwlock_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "hexagon", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "x86_64", | ||
| target_arch = "x86")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "hexagon", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| target_arch = "x86_64", | ||
| target_arch = "x86"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_barrier_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_BARRIER_T], | ||
| } | ||
| // linux/can.h | ||
| #[repr(align(8))] | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct can_frame { | ||
| pub can_id: canid_t, | ||
| pub can_dlc: u8, | ||
| __pad: u8, | ||
| __res0: u8, | ||
| __res1: u8, | ||
| pub data: [u8; CAN_MAX_DLEN], | ||
| } | ||
| #[repr(align(8))] | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct canfd_frame { | ||
| pub can_id: canid_t, | ||
| pub len: u8, | ||
| pub flags: u8, | ||
| __res0: u8, | ||
| __res1: u8, | ||
| pub data: [u8; CANFD_MAX_DLEN], | ||
| } | ||
| #[repr(align(8))] | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct canxl_frame { | ||
| pub prio: canid_t, | ||
| pub flags: u8, | ||
| pub sdt: u8, | ||
| pub len: u16, | ||
| pub af: u32, | ||
| pub data: [u8; CANXL_MAX_DLEN], | ||
| } | ||
| } | ||
| }; | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 2] | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_mcontext: ::mcontext_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_regspace: [::c_ulong; 128], | ||
| } | ||
| } | ||
| cfg_if! { | ||
| if #[cfg(feature = "extra_traits")] { | ||
| impl PartialEq for ucontext_t { | ||
| fn eq(&self, other: &ucontext_t) -> bool { | ||
| self.uc_flags == other.uc_flags | ||
| && self.uc_link == other.uc_link | ||
| && self.uc_stack == other.uc_stack | ||
| && self.uc_mcontext == other.uc_mcontext | ||
| && self.uc_sigmask == other.uc_sigmask | ||
| } | ||
| } | ||
| impl Eq for ucontext_t {} | ||
| impl ::fmt::Debug for ucontext_t { | ||
| fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { | ||
| f.debug_struct("ucontext_t") | ||
| .field("uc_flags", &self.uc_link) | ||
| .field("uc_link", &self.uc_link) | ||
| .field("uc_stack", &self.uc_stack) | ||
| .field("uc_mcontext", &self.uc_mcontext) | ||
| .field("uc_sigmask", &self.uc_sigmask) | ||
| .finish() | ||
| } | ||
| } | ||
| impl ::hash::Hash for ucontext_t { | ||
| fn hash<H: ::hash::Hasher>(&self, state: &mut H) { | ||
| self.uc_flags.hash(state); | ||
| self.uc_link.hash(state); | ||
| self.uc_stack.hash(state); | ||
| self.uc_mcontext.hash(state); | ||
| self.uc_sigmask.hash(state); | ||
| } | ||
| } | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 2] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(2))] | ||
| pub struct max_align_t { | ||
| priv_: [i8; 20] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 4] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub __uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __fpregs: __riscv_mc_fp_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub union __riscv_mc_fp_state { | ||
| pub __f: __riscv_mc_f_ext_state, | ||
| pub __d: __riscv_mc_d_ext_state, | ||
| pub __q: __riscv_mc_q_ext_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_f_ext_state { | ||
| pub __f: [::c_uint; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_d_ext_state { | ||
| pub __f: [::c_ulonglong; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct __riscv_mc_q_ext_state { | ||
| pub __f: [::c_ulonglong; 64], | ||
| pub __fcsr: ::c_uint, | ||
| pub __glibc_reserved: [::c_uint; 3], | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 3] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 6] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8] | ||
| } | ||
| } | ||
| s! { | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub fault_address: ::c_ulonglong, | ||
| pub regs: [::c_ulonglong; 31], | ||
| pub sp: ::c_ulonglong, | ||
| pub pc: ::c_ulonglong, | ||
| pub pstate: ::c_ulonglong, | ||
| // nested arrays to get the right size/length while being able to | ||
| // auto-derive traits like Debug | ||
| __reserved: [[u64; 32]; 16], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } | ||
| extern "C" { | ||
| pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; | ||
| pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; | ||
| pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); | ||
| pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; | ||
| } |
| s! { | ||
| #[repr(align(16))] | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [[u64; 2]; 32], | ||
| pub fpsr: ::c_uint, | ||
| pub fpcr: ::c_uint, | ||
| } | ||
| } |
| s! { | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [::__uint128_t; 32], | ||
| pub fpsr: u32, | ||
| pub fpcr: u32, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } | ||
| s! { | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __pc: ::c_ulonglong, | ||
| pub __gregs: [::c_ulonglong; 32], | ||
| pub __flags: ::c_uint, | ||
| pub __extcontext: [::c_ulonglong; 0], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 4] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub __uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __fpregs: __riscv_mc_fp_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub union __riscv_mc_fp_state { | ||
| pub __f: __riscv_mc_f_ext_state, | ||
| pub __d: __riscv_mc_d_ext_state, | ||
| pub __q: __riscv_mc_q_ext_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_f_ext_state { | ||
| pub __f: [::c_uint; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_d_ext_state { | ||
| pub __f: [::c_ulonglong; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct __riscv_mc_q_ext_state { | ||
| pub __f: [::c_ulonglong; 64], | ||
| pub __fcsr: ::c_uint, | ||
| pub __glibc_reserved: [::c_uint; 3], | ||
| } | ||
| } | ||
| s! { | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 4] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } | ||
| s! { | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| __align: [::c_long; 0], | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: (i64, i64) | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 4] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: (i64, f64) | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(8))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 3] | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f32; 8] | ||
| } | ||
| } | ||
| s! { | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub fault_address: ::c_ulong, | ||
| pub regs: [::c_ulong; 31], | ||
| pub sp: ::c_ulong, | ||
| pub pc: ::c_ulong, | ||
| pub pstate: ::c_ulong, | ||
| __reserved: [[u64; 32]; 16], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| s! { | ||
| pub struct user_fpsimd_struct { | ||
| pub vregs: [::__uint128_t; 32], | ||
| pub fpsr: u32, | ||
| pub fpcr: u32, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } | ||
| s! { | ||
| pub struct ucontext_t { | ||
| pub uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __pc: ::c_ulonglong, | ||
| pub __gregs: [::c_ulonglong; 32], | ||
| pub __flags: ::c_uint, | ||
| pub __extcontext: [::c_ulonglong; 0], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct ucontext_t { | ||
| pub __uc_flags: ::c_ulong, | ||
| pub uc_link: *mut ucontext_t, | ||
| pub uc_stack: ::stack_t, | ||
| pub uc_sigmask: ::sigset_t, | ||
| pub uc_mcontext: mcontext_t, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct mcontext_t { | ||
| pub __gregs: [::c_ulong; 32], | ||
| pub __fpregs: __riscv_mc_fp_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub union __riscv_mc_fp_state { | ||
| pub __f: __riscv_mc_f_ext_state, | ||
| pub __d: __riscv_mc_d_ext_state, | ||
| pub __q: __riscv_mc_q_ext_state, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_f_ext_state { | ||
| pub __f: [::c_uint; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| pub struct __riscv_mc_d_ext_state { | ||
| pub __f: [::c_ulonglong; 32], | ||
| pub __fcsr: ::c_uint, | ||
| } | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct __riscv_mc_q_ext_state { | ||
| pub __f: [::c_ulonglong; 64], | ||
| pub __fcsr: ::c_uint, | ||
| pub __glibc_reserved: [::c_uint; 3], | ||
| } | ||
| } | ||
| s! { | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } | ||
| s! { | ||
| #[repr(align(8))] | ||
| pub struct clone_args { | ||
| pub flags: ::c_ulonglong, | ||
| pub pidfd: ::c_ulonglong, | ||
| pub child_tid: ::c_ulonglong, | ||
| pub parent_tid: ::c_ulonglong, | ||
| pub exit_signal: ::c_ulonglong, | ||
| pub stack: ::c_ulonglong, | ||
| pub stack_size: ::c_ulonglong, | ||
| pub tls: ::c_ulonglong, | ||
| pub set_tid: ::c_ulonglong, | ||
| pub set_tid_size: ::c_ulonglong, | ||
| pub cgroup: ::c_ulonglong, | ||
| } | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| pub struct pthread_mutexattr_t { | ||
| #[cfg(any(target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64", | ||
| target_arch = "riscv64", | ||
| target_arch = "riscv32", | ||
| target_arch = "loongarch64", | ||
| all(target_arch = "aarch64", | ||
| any(target_env = "musl", target_env = "ohos"))))] | ||
| __align: [::c_int; 0], | ||
| #[cfg(not(any(target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "mips64r6", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64", | ||
| target_arch = "riscv64", | ||
| target_arch = "riscv32", | ||
| target_arch = "loongarch64", | ||
| all(target_arch = "aarch64", | ||
| any(target_env = "musl", target_env = "ohos")))))] | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| pub struct pthread_rwlockattr_t { | ||
| #[cfg(any(target_env = "musl", target_env = "ohos"))] | ||
| __align: [::c_int; 0], | ||
| #[cfg(not(any(target_env = "musl", target_env = "ohos")))] | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], | ||
| } | ||
| pub struct pthread_condattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| pub struct pthread_barrierattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_BARRIERATTR_T], | ||
| } | ||
| pub struct fanotify_event_metadata { | ||
| __align: [::c_long; 0], | ||
| pub event_len: __u32, | ||
| pub vers: __u8, | ||
| pub reserved: __u8, | ||
| pub metadata_len: __u16, | ||
| pub mask: __u64, | ||
| pub fd: ::c_int, | ||
| pub pid: ::c_int, | ||
| } | ||
| pub struct tpacket_rollover_stats { | ||
| __align: [::c_long; 0], | ||
| pub tp_all: ::__u64, | ||
| pub tp_huge: ::__u64, | ||
| pub tp_failed: ::__u64, | ||
| } | ||
| pub struct tpacket_hdr_v1 { | ||
| __align: [::c_long; 0], | ||
| pub block_status: ::__u32, | ||
| pub num_pkts: ::__u32, | ||
| pub offset_to_first_pkt: ::__u32, | ||
| pub blk_len: ::__u32, | ||
| pub seq_num: ::__u64, | ||
| pub ts_first_pkt: ::tpacket_bd_ts, | ||
| pub ts_last_pkt: ::tpacket_bd_ts, | ||
| } | ||
| } | ||
| s_no_extra_traits! { | ||
| pub struct pthread_cond_t { | ||
| #[cfg(any(target_env = "musl", target_env = "ohos"))] | ||
| __align: [*const ::c_void; 0], | ||
| #[cfg(not(any(target_env = "musl", target_env = "ohos")))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| pub struct pthread_mutex_t { | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32")))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32"))))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| pub struct pthread_rwlock_t { | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32")))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32"))))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| pub struct pthread_barrier_t { | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32")))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any(target_arch = "mips", | ||
| target_arch = "mips32r6", | ||
| target_arch = "arm", | ||
| target_arch = "m68k", | ||
| target_arch = "csky", | ||
| target_arch = "powerpc", | ||
| target_arch = "sparc", | ||
| all(target_arch = "x86_64", | ||
| target_pointer_width = "32"))))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_BARRIER_T], | ||
| } | ||
| } | ||
| }; | ||
| } |
| s! { | ||
| // linux/openat2.h | ||
| #[non_exhaustive] | ||
| pub struct open_how { | ||
| pub flags: ::__u64, | ||
| pub mode: ::__u64, | ||
| pub resolve: ::__u64, | ||
| } | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| #[cfg_attr(any(target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64"), | ||
| repr(align(4)))] | ||
| #[cfg_attr(not(any(target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64")), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutexattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| }; | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| } | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| __align: [::c_long; 0], | ||
| } | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| } | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| pub struct sem_t { | ||
| #[cfg(target_pointer_width = "32")] | ||
| __size: [::c_char; 16], | ||
| #[cfg(target_pointer_width = "64")] | ||
| __size: [::c_char; 32], | ||
| __align: [::c_long; 0], | ||
| } | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| #[cfg_attr(target_pointer_width = "32", | ||
| repr(align(4)))] | ||
| #[cfg_attr(target_pointer_width = "64", | ||
| repr(align(8)))] | ||
| pub struct sem_t { | ||
| __size: [::c_char; 32], | ||
| } | ||
| } |
| s! { | ||
| // FIXME this is actually a union | ||
| pub struct sem_t { | ||
| __size: [::c_char; 32], | ||
| __align: [::c_long; 0], | ||
| } | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| pub struct pthread_mutex_t { | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(any(libc_align, | ||
| target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| pub struct pthread_rwlock_t { | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any( | ||
| target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc")))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| pub struct pthread_mutexattr_t { | ||
| #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64", | ||
| target_arch = "mips64", target_arch = "s390x", | ||
| target_arch = "sparc64"))] | ||
| __align: [::c_int; 0], | ||
| #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64", | ||
| target_arch = "mips64", target_arch = "s390x", | ||
| target_arch = "sparc64")))] | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| pub struct pthread_cond_t { | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| pub struct pthread_condattr_t { | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| } | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutex_t { // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| #[cfg_attr(all(target_pointer_width = "32", | ||
| any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc")), | ||
| repr(align(4)))] | ||
| #[cfg_attr(any(target_pointer_width = "64", | ||
| not(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))), | ||
| repr(align(8)))] | ||
| pub struct pthread_rwlock_t { // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| #[cfg_attr(any(target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64"), | ||
| repr(align(4)))] | ||
| #[cfg_attr(not(any(target_pointer_width = "32", | ||
| target_arch = "x86_64", | ||
| target_arch = "powerpc64", | ||
| target_arch = "mips64", | ||
| target_arch = "s390x", | ||
| target_arch = "sparc64")), | ||
| repr(align(8)))] | ||
| pub struct pthread_mutexattr_t { // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| #[repr(align(8))] | ||
| pub struct pthread_cond_t { // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| #[repr(align(4))] | ||
| pub struct pthread_condattr_t { // Unverified | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| }; | ||
| } |
| macro_rules! expand_align { | ||
| () => { | ||
| s! { | ||
| pub struct pthread_mutex_t { // Unverified | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc")))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], | ||
| } | ||
| pub struct pthread_rwlock_t { // Unverified | ||
| #[cfg(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc"))] | ||
| __align: [::c_long; 0], | ||
| #[cfg(not(any(target_arch = "mips", | ||
| target_arch = "arm", | ||
| target_arch = "powerpc")))] | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], | ||
| } | ||
| pub struct pthread_mutexattr_t { // Unverified | ||
| #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64", | ||
| target_arch = "mips64", target_arch = "s390x", | ||
| target_arch = "sparc64"))] | ||
| __align: [::c_int; 0], | ||
| #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64", | ||
| target_arch = "mips64", target_arch = "s390x", | ||
| target_arch = "sparc64")))] | ||
| __align: [::c_long; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], | ||
| } | ||
| pub struct pthread_cond_t { // Unverified | ||
| __align: [::c_longlong; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_COND_T], | ||
| } | ||
| pub struct pthread_condattr_t { // Unverified | ||
| __align: [::c_int; 0], | ||
| size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], | ||
| } | ||
| } | ||
| }; | ||
| } |
| s! { | ||
| pub struct in6_addr { | ||
| pub s6_addr: [u8; 16], | ||
| __align: [u32; 0], | ||
| } | ||
| } | ||
| pub const IN6ADDR_LOOPBACK_INIT: in6_addr = in6_addr { | ||
| s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], | ||
| __align: [0u32; 0], | ||
| }; | ||
| pub const IN6ADDR_ANY_INIT: in6_addr = in6_addr { | ||
| s6_addr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | ||
| __align: [0u32; 0], | ||
| }; |
| cfg_if! { | ||
| if #[cfg(target_pointer_width = "64")] { | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [f64; 4] | ||
| } | ||
| } | ||
| } else if #[cfg(target_pointer_width = "32")] { | ||
| s_no_extra_traits! { | ||
| #[allow(missing_debug_implementations)] | ||
| #[repr(align(16))] | ||
| pub struct max_align_t { | ||
| priv_: [i64; 6] | ||
| } | ||
| } | ||
| } | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display