diff --git a/.github/workflows/check-and-lint.yaml b/.github/workflows/check-and-lint.yaml index 4fe0334..21d3b74 100644 --- a/.github/workflows/check-and-lint.yaml +++ b/.github/workflows/check-and-lint.yaml @@ -21,6 +21,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check + args: --all fmt: name: Rustfmt diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c2d11fa..3918eec 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -23,7 +23,7 @@ jobs: - name: Build run: cargo build --verbose - name: Run tests - run: cargo test --verbose + run: cargo test --verbose --all # NOTE disabled due to compiler failure in hv-fonseca crate # test-windows: # name: Cargo check and test on Windows @@ -33,4 +33,4 @@ jobs: # - name: Build # run: cargo build --verbose # - name: Run tests -# run: cargo test --verbose \ No newline at end of file +# run: cargo test --verbose --all \ No newline at end of file diff --git a/.gitignore b/.gitignore index afca43f..4a9ddba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target .idea *.o -*.a \ No newline at end of file +*.a +.DS_Store \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 8eeef6a..aefd14d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,7 +68,7 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -78,7 +78,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -139,9 +139,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" [[package]] name = "byteorder" @@ -151,9 +151,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.1.6" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" dependencies = [ "jobserver", "libc", @@ -386,7 +386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -519,7 +519,7 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -530,7 +530,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hv-fonseca-et-al-2006-sys" -version = "2.0.0-rc.2" +version = "2.0.2-rc.2" dependencies = [ "bindgen", "cc", @@ -538,7 +538,7 @@ dependencies = [ [[package]] name = "hv-wfg-sys" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bindgen", "cc", @@ -678,9 +678,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matrixmultiply" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" +checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" dependencies = [ "autocfg", "rawpointer", @@ -747,9 +747,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -801,7 +801,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "optirustic" -version = "0.1.0" +version = "0.2.3" dependencies = [ "chrono", "env_logger", @@ -832,9 +832,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.2.1" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ff2cf528c6c03d9ed653d6c4ce1dc0582dc4af309790ad92f07c1cd551b0be" +checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "num-traits", ] @@ -931,9 +931,12 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" @@ -1032,9 +1035,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -1084,7 +1087,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1119,18 +1122,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", @@ -1139,11 +1142,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1328,9 +1332,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.24" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a040b111774ab63a19ef46bbc149398ab372b4ccdcfd719e9814dbd7dfd76c8" +checksum = "901e8597c777fa042e9e245bd56c0dc4418c5db3f845b6ff94fbac732c6a0692" dependencies = [ "bytemuck", "safe_arch", @@ -1354,11 +1358,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1385,6 +1389,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -1469,3 +1482,24 @@ dependencies = [ "once_cell", "pkg-config", ] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index 59607b2..035507d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,52 @@ +[package] +name = "optirustic" +version = "0.2.3" +authors = ["Stefano Simoncelli <16114781+s-simoncelli@users.noreply.github.com>"] +edition = "2021" +rust-version = "1.80" +description = "A multi-objective optimisation framework for Rust" +repository = "https://github.com/s-simoncelli/optirustic" +keywords = ["genetic-algorithm", "optimisation", "multiobjective", "nsga2", "nsga3"] +categories = ["science", "algorithms"] +readme = "README.md" +license = "GPL-3.0-only" + [workspace] resolver = "2" -members = ["optirustic", "optirustic-macros", "hv-fonseca-et-al-2006-sys", "hv-wfg-sys"] -default-members = ["optirustic", "hv-fonseca-et-al-2006-sys", "hv-wfg-sys"] +members = ["optirustic-macros", "hv-fonseca-et-al-2006-sys", "hv-wfg-sys"] +default-members = ["optirustic-macros", "hv-fonseca-et-al-2006-sys", "hv-wfg-sys"] + +[lib] +name = "optirustic" + +[dependencies] +log = "0.4.21" +serde_json = "1.0" +serde = { version = "1.0.200", features = ["derive"] } +rand = "0.8.5" +rand_chacha = "0.3.1" +thiserror = "1.0.60" +rayon = "1.10.0" +env_logger = "0.11.3" +chrono = { version = "0.4.38", features = ["serde"] } +ordered-float = "4.2.0" +optirustic-macros = { path = "optirustic-macros", version = "0.1.0" } +hv-fonseca-et-al-2006-sys = { path = "hv-fonseca-et-al-2006-sys", version = "2.0.2-rc.2" } +hv-wfg-sys = { path = "hv-wfg-sys", version = "0.1.1" } +plotters = { version = "0.3.6", optional = true } +nalgebra = "0.33.0" + +[dev-dependencies] +float-cmp = "0.9.0" + +[features] +default = ["plot"] +plot = ["dep:plotters"] + +[package.metadata.docs.rs] +all-features = true +cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] +rustdoc-args = ["--html-in-header", "src/katex-header.html"] # Run test with optimisation to speed up tests solving optimisation problems. [profile.test] diff --git a/README.md b/README.md index 712974a..ea4f579 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Optirustic +[![Package](https://img.shields.io/crates/v/optirustic.svg)](https://crates.io/crates/optirustic) +[![Documentation](https://docs.rs/optirustic/badge.svg)](https://docs.rs/optirustic) + Optirustic is a framework written in Rust that provides algorithms and analysis tool to solve multi-objective problems using multi-objective evolutionary algorithms (MOEAs). It allows you to: @@ -7,8 +10,13 @@ evolutionary algorithms (MOEAs). It allows you to: - define minimisation and maximisation problems with custom objective functions; - define constraint and unconstrained variables (real, integer, boolean or choice); - use multi-thread to evaluate objectives and constraints on population with many individuals +- export the population history as JSON and resume its evolution from file + +At the moment, it comes with the `NSGA2` and `NSGA3` algorithms. -At the moment, it comes with the NSGA2 and NSGA3 algorithms. +The API documentation is available on [docs.rs](https://docs.rs/optirustic/). +Examples showcasing this library's features are available in +the [examples folder of this repository](examples/nsga2_sch.rs). ## Installing Optirustic @@ -76,7 +84,7 @@ impl SCHProblem { // Implement the function to evaluate the objectives and constraints. The `evaluate` // function below receives the individuals which contain the variables/solutions `x` -// proposed by the algorithm. The function must returns the evaluated objectives and +// proposed by the algorithm. The function must return the evaluated objectives and // constraints in the `EvaluationResult` struct. impl Evaluator for SCHProblem { fn evaluate(&self, i: &Individual) -> Result> { @@ -129,20 +137,15 @@ fn main() -> Result<(), Box> { } ``` -The full example is available in the [examples folder of this repository](optirustic/examples/nsga2_sch.rs) and can be +The full example is available in the [examples folder of this repository](examples/nsga2_sch.rs) and can be run using > cargo run --example nsga2_sch --release This is the serialised data exported by the -algorithm: [SCH_2obj_NSGA2_gen250.json](optirustic/examples/results/SCH_2obj_NSGA2_gen250.json) +algorithm: [SCH_2obj_NSGA2_gen250.json](examples/results/SCH_2obj_NSGA2_gen250.json) and these are the plotted solutions:
- Results + Results
- -## Additional examples - -Additional examples showcasing this library's features are available in -the [examples folder of this repository](optirustic/examples/nsga2_sch.rs). \ No newline at end of file diff --git a/optirustic/examples/nsga2_sch.rs b/examples/nsga2_sch.rs similarity index 100% rename from optirustic/examples/nsga2_sch.rs rename to examples/nsga2_sch.rs diff --git a/optirustic/examples/nsga2_zdt1.rs b/examples/nsga2_zdt1.rs similarity index 100% rename from optirustic/examples/nsga2_zdt1.rs rename to examples/nsga2_zdt1.rs diff --git a/optirustic/examples/nsga3_dtlz1.rs b/examples/nsga3_dtlz1.rs similarity index 97% rename from optirustic/examples/nsga3_dtlz1.rs rename to examples/nsga3_dtlz1.rs index f136b7d..dc9f887 100644 --- a/optirustic/examples/nsga3_dtlz1.rs +++ b/examples/nsga3_dtlz1.rs @@ -75,7 +75,7 @@ fn main() -> Result<(), Box> { .join("results"); algo.save_to_json(&destination, Some("DTLZ1_3obj"))?; - // algo.plot_objectives("optirustic/examples/results/DTLZ1_3obj.png")?; + // algo.plot_objectives("examples/results/DTLZ1_3obj.png")?; Ok(()) } diff --git a/optirustic/examples/nsga3_dtlz2.rs b/examples/nsga3_dtlz2.rs similarity index 100% rename from optirustic/examples/nsga3_dtlz2.rs rename to examples/nsga3_dtlz2.rs diff --git a/optirustic/examples/reference_points_1layer.rs b/examples/reference_points_1layer.rs similarity index 100% rename from optirustic/examples/reference_points_1layer.rs rename to examples/reference_points_1layer.rs diff --git a/optirustic/examples/reference_points_2layers.rs b/examples/reference_points_2layers.rs similarity index 100% rename from optirustic/examples/reference_points_2layers.rs rename to examples/reference_points_2layers.rs diff --git a/optirustic/examples/results/DTLZ1_3obj_NSGA3_gen400.json b/examples/results/DTLZ1_3obj_NSGA3_gen400.json similarity index 100% rename from optirustic/examples/results/DTLZ1_3obj_NSGA3_gen400.json rename to examples/results/DTLZ1_3obj_NSGA3_gen400.json diff --git a/optirustic/examples/results/DTLZ2_3obj_NSGA3_gen400.json b/examples/results/DTLZ2_3obj_NSGA3_gen400.json similarity index 99% rename from optirustic/examples/results/DTLZ2_3obj_NSGA3_gen400.json rename to examples/results/DTLZ2_3obj_NSGA3_gen400.json index 1c5eaf1..49ce44c 100644 --- a/optirustic/examples/results/DTLZ2_3obj_NSGA3_gen400.json +++ b/examples/results/DTLZ2_3obj_NSGA3_gen400.json @@ -130,8 +130,7 @@ ], "number_of_objectives": 3, "number_of_constraints": 1, - " - ": 12 + "number_of_variables": 12 }, "individuals": [ { diff --git a/optirustic/examples/results/SCH_2obj_NSGA2_gen250.json b/examples/results/SCH_2obj_NSGA2_gen250.json similarity index 100% rename from optirustic/examples/results/SCH_2obj_NSGA2_gen250.json rename to examples/results/SCH_2obj_NSGA2_gen250.json diff --git a/optirustic/examples/results/SCH_2obj_NSGA2_solutions.png b/examples/results/SCH_2obj_NSGA2_solutions.png similarity index 100% rename from optirustic/examples/results/SCH_2obj_NSGA2_solutions.png rename to examples/results/SCH_2obj_NSGA2_solutions.png diff --git a/optirustic/examples/results/ZDT1_2obj_NSGA2_gen1000.json b/examples/results/ZDT1_2obj_NSGA2_gen1000.json similarity index 100% rename from optirustic/examples/results/ZDT1_2obj_NSGA2_gen1000.json rename to examples/results/ZDT1_2obj_NSGA2_gen1000.json diff --git a/optirustic/examples/results/ref_points_1layer_3obj_5gaps.png b/examples/results/ref_points_1layer_3obj_5gaps.png similarity index 100% rename from optirustic/examples/results/ref_points_1layer_3obj_5gaps.png rename to examples/results/ref_points_1layer_3obj_5gaps.png diff --git a/optirustic/examples/results/ref_points_2layers_3obj_5gaps.png b/examples/results/ref_points_2layers_3obj_5gaps.png similarity index 100% rename from optirustic/examples/results/ref_points_2layers_3obj_5gaps.png rename to examples/results/ref_points_2layers_3obj_5gaps.png diff --git a/hv-fonseca-et-al-2006-sys/Cargo.toml b/hv-fonseca-et-al-2006-sys/Cargo.toml index 98c868c..dbf2f92 100644 --- a/hv-fonseca-et-al-2006-sys/Cargo.toml +++ b/hv-fonseca-et-al-2006-sys/Cargo.toml @@ -2,11 +2,11 @@ name = "hv-fonseca-et-al-2006-sys" description = "A wrapper for the hyper-volume algorithm by Fonseca et al. (2006) " homepage = "https://lopez-ibanez.eu/hypervolume" -authors = ["Stefano Simoncelli "] +authors = ["Stefano Simoncelli <16114781+s-simoncelli@users.noreply.github.com>"] repository = "https://github.com/s-simoncelli/optirustic" -version = "2.0.0-rc.2" +version = "2.0.2-rc.2" edition = "2021" -license = "LGPL-2" +license = "LGPL-2.1" [build-dependencies] bindgen = "0.69.4" diff --git a/hv-fonseca-et-al-2006-sys/README.md b/hv-fonseca-et-al-2006-sys/README.md index 206d89c..fa37cf6 100644 --- a/hv-fonseca-et-al-2006-sys/README.md +++ b/hv-fonseca-et-al-2006-sys/README.md @@ -16,3 +16,12 @@ indicator](http://dx.doi.org/10.1109/CEC.2006.1688440). In Proceedings of the 20 > Piscataway, NJ, July 2006. [ [bibtex](https://lopez-ibanez.eu/LopezIbanez_bib.html#FonPaqLop06:hypervolume) | [10.1109/CEC.2006.1688440](http://dx.doi.org/10.1109/CEC.2006.1688440) | [PDF](https://lopez-ibanez.eu/doc/FonPaqLop06-hypervolume.pdf) ] + +# How to use the bindings + +The `binding.rs` file is generated in the out directory, which is available in the `OUT_DIR` env variable. +Include the following macro call at the top of the Rust file: + +```rust +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); +``` \ No newline at end of file diff --git a/hv-fonseca-et-al-2006-sys/build.rs b/hv-fonseca-et-al-2006-sys/build.rs index 9564aec..84ed766 100644 --- a/hv-fonseca-et-al-2006-sys/build.rs +++ b/hv-fonseca-et-al-2006-sys/build.rs @@ -1,5 +1,6 @@ extern crate bindgen; +use std::env; use std::path::PathBuf; fn main() { @@ -15,8 +16,9 @@ fn main() { .generate() .expect("Unable to generate 'hv' bindings"); + let file = PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs"); bindings - .write_to_file("src/bindings.rs") + .write_to_file(file) .expect("Couldn't write 'hv' bindings"); // Compile library with version #4 - see section IV of the paper diff --git a/hv-fonseca-et-al-2006-sys/src/bindings.rs b/hv-fonseca-et-al-2006-sys/src/bindings.rs deleted file mode 100644 index dde34d8..0000000 --- a/hv-fonseca-et-al-2006-sys/src/bindings.rs +++ /dev/null @@ -1,13 +0,0 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -extern "C" { - pub static mut stop_dimension: ::std::os::raw::c_int; -} -extern "C" { - pub fn fpli_hv( - data: *mut f64, - d: ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - ref_: *const f64, - ) -> f64; -} diff --git a/hv-fonseca-et-al-2006-sys/src/lib.rs b/hv-fonseca-et-al-2006-sys/src/lib.rs index 8809ae8..6172df9 100644 --- a/hv-fonseca-et-al-2006-sys/src/lib.rs +++ b/hv-fonseca-et-al-2006-sys/src/lib.rs @@ -2,7 +2,7 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] -include!("bindings.rs"); +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); /// Calculate the hyper-volume using the algorithm proposed by [Fonseca et al. (2006)](http://dx.doi.org/10.1109/CEC.2006.1688440) /// for a problem with `d` objectives and `n` individuals. The function calls version 4 of the diff --git a/hv-wfg-sys/Cargo.toml b/hv-wfg-sys/Cargo.toml index b544f1f..36d58bb 100644 --- a/hv-wfg-sys/Cargo.toml +++ b/hv-wfg-sys/Cargo.toml @@ -2,11 +2,11 @@ name = "hv-wfg-sys" description = "A wrapper for the hyper-volume algorithm by While et al. (2012) " homepage = "https://github.com/lbradstreet/WFG-hypervolume/tree/master" -authors = ["Stefano Simoncelli "] +authors = ["Stefano Simoncelli <16114781+s-simoncelli@users.noreply.github.com>"] repository = "https://github.com/s-simoncelli/optirustic" -version = "0.1.0" +version = "0.1.1" edition = "2021" -license = "GPL-3" +license = "GPL-3.0-only" [build-dependencies] bindgen = "0.69.4" diff --git a/hv-wfg-sys/README.md b/hv-wfg-sys/README.md index 75693e0..7f74641 100644 --- a/hv-wfg-sys/README.md +++ b/hv-wfg-sys/README.md @@ -15,4 +15,14 @@ The following changes were applied to the code in the `vendor` folder (from comm - the code was cleanup by removing unnecessary dependencies, formatted and documentation was added; - the part of the code calculating the hyper-volume from input files was removed. -This code is re-released under the `GPL3` license. \ No newline at end of file +This code is re-released under the `GPL3` license. + +# How to use the bindings + +The `binding.rs` file is generated in the out directory, which is available in the `OUT_DIR` env variable. +Include the following macro call at the top of the Rust file: + +```rust +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); +``` + \ No newline at end of file diff --git a/hv-wfg-sys/build.rs b/hv-wfg-sys/build.rs index 6846311..9e3f831 100644 --- a/hv-wfg-sys/build.rs +++ b/hv-wfg-sys/build.rs @@ -1,5 +1,6 @@ extern crate bindgen; +use std::env; use std::path::PathBuf; fn main() { @@ -15,8 +16,9 @@ fn main() { .generate() .expect("Unable to generate 'wfg' bindings"); + let file = PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs"); bindings - .write_to_file("src/bindings.rs") + .write_to_file(file) .expect("Couldn't write 'wfg' bindings"); // Compile library for minimisation problems diff --git a/hv-wfg-sys/src/bindings.rs b/hv-wfg-sys/src/bindings.rs deleted file mode 100644 index 4b0eff8..0000000 --- a/hv-wfg-sys/src/bindings.rs +++ /dev/null @@ -1,7890 +0,0 @@ -/* automatically generated by rust-bindgen 0.69.4 */ - -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { - storage: Storage, -} -impl __BindgenBitfieldUnit { - #[inline] - pub const fn new(storage: Storage) -> Self { - Self { storage } - } -} -impl __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - byte & mask == mask - } - #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } - } - #[inline] - pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); - let mut val = 0; - for i in 0..(bit_width as usize) { - if self.get_bit(i + bit_offset) { - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - val |= 1 << index; - } - } - val - } - #[inline] - pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); - for i in 0..(bit_width as usize) { - let mask = 1 << i; - let val_bit_is_set = val & mask == mask; - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - self.set_bit(index + bit_offset, val_bit_is_set); - } - } -} -pub const __has_safe_buffers: u32 = 1; -pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 1; -pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const __DARWIN_ONLY_VERS_1050: u32 = 1; -pub const __DARWIN_UNIX03: u32 = 1; -pub const __DARWIN_64_BIT_INO_T: u32 = 1; -pub const __DARWIN_VERS_1050: u32 = 1; -pub const __DARWIN_NON_CANCELABLE: u32 = 0; -pub const __DARWIN_SUF_EXTSN: &[u8; 14] = b"$DARWIN_EXTSN\0"; -pub const __DARWIN_C_ANSI: u32 = 4096; -pub const __DARWIN_C_FULL: u32 = 900000; -pub const __DARWIN_C_LEVEL: u32 = 900000; -pub const __STDC_WANT_LIB_EXT1__: u32 = 1; -pub const __DARWIN_NO_LONG_LONG: u32 = 0; -pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1; -pub const _DARWIN_FEATURE_ONLY_64_BIT_INODE: u32 = 1; -pub const _DARWIN_FEATURE_ONLY_VERS_1050: u32 = 1; -pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3; -pub const __has_ptrcheck: u32 = 0; -pub const __API_TO_BE_DEPRECATED: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_MACOS: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_IOS: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_MACCATALYST: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_WATCHOS: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_TVOS: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_DRIVERKIT: u32 = 100000; -pub const __API_TO_BE_DEPRECATED_VISIONOS: u32 = 100000; -pub const __MAC_10_0: u32 = 1000; -pub const __MAC_10_1: u32 = 1010; -pub const __MAC_10_2: u32 = 1020; -pub const __MAC_10_3: u32 = 1030; -pub const __MAC_10_4: u32 = 1040; -pub const __MAC_10_5: u32 = 1050; -pub const __MAC_10_6: u32 = 1060; -pub const __MAC_10_7: u32 = 1070; -pub const __MAC_10_8: u32 = 1080; -pub const __MAC_10_9: u32 = 1090; -pub const __MAC_10_10: u32 = 101000; -pub const __MAC_10_10_2: u32 = 101002; -pub const __MAC_10_10_3: u32 = 101003; -pub const __MAC_10_11: u32 = 101100; -pub const __MAC_10_11_2: u32 = 101102; -pub const __MAC_10_11_3: u32 = 101103; -pub const __MAC_10_11_4: u32 = 101104; -pub const __MAC_10_12: u32 = 101200; -pub const __MAC_10_12_1: u32 = 101201; -pub const __MAC_10_12_2: u32 = 101202; -pub const __MAC_10_12_4: u32 = 101204; -pub const __MAC_10_13: u32 = 101300; -pub const __MAC_10_13_1: u32 = 101301; -pub const __MAC_10_13_2: u32 = 101302; -pub const __MAC_10_13_4: u32 = 101304; -pub const __MAC_10_14: u32 = 101400; -pub const __MAC_10_14_1: u32 = 101401; -pub const __MAC_10_14_4: u32 = 101404; -pub const __MAC_10_14_5: u32 = 101405; -pub const __MAC_10_14_6: u32 = 101406; -pub const __MAC_10_15: u32 = 101500; -pub const __MAC_10_15_1: u32 = 101501; -pub const __MAC_10_15_4: u32 = 101504; -pub const __MAC_10_16: u32 = 101600; -pub const __MAC_11_0: u32 = 110000; -pub const __MAC_11_1: u32 = 110100; -pub const __MAC_11_3: u32 = 110300; -pub const __MAC_11_4: u32 = 110400; -pub const __MAC_11_5: u32 = 110500; -pub const __MAC_11_6: u32 = 110600; -pub const __MAC_12_0: u32 = 120000; -pub const __MAC_12_1: u32 = 120100; -pub const __MAC_12_2: u32 = 120200; -pub const __MAC_12_3: u32 = 120300; -pub const __MAC_12_4: u32 = 120400; -pub const __MAC_12_5: u32 = 120500; -pub const __MAC_12_6: u32 = 120600; -pub const __MAC_12_7: u32 = 120700; -pub const __MAC_13_0: u32 = 130000; -pub const __MAC_13_1: u32 = 130100; -pub const __MAC_13_2: u32 = 130200; -pub const __MAC_13_3: u32 = 130300; -pub const __MAC_13_4: u32 = 130400; -pub const __MAC_13_5: u32 = 130500; -pub const __MAC_13_6: u32 = 130600; -pub const __MAC_14_0: u32 = 140000; -pub const __MAC_14_1: u32 = 140100; -pub const __MAC_14_2: u32 = 140200; -pub const __MAC_14_3: u32 = 140300; -pub const __MAC_14_4: u32 = 140400; -pub const __MAC_14_5: u32 = 140500; -pub const __IPHONE_2_0: u32 = 20000; -pub const __IPHONE_2_1: u32 = 20100; -pub const __IPHONE_2_2: u32 = 20200; -pub const __IPHONE_3_0: u32 = 30000; -pub const __IPHONE_3_1: u32 = 30100; -pub const __IPHONE_3_2: u32 = 30200; -pub const __IPHONE_4_0: u32 = 40000; -pub const __IPHONE_4_1: u32 = 40100; -pub const __IPHONE_4_2: u32 = 40200; -pub const __IPHONE_4_3: u32 = 40300; -pub const __IPHONE_5_0: u32 = 50000; -pub const __IPHONE_5_1: u32 = 50100; -pub const __IPHONE_6_0: u32 = 60000; -pub const __IPHONE_6_1: u32 = 60100; -pub const __IPHONE_7_0: u32 = 70000; -pub const __IPHONE_7_1: u32 = 70100; -pub const __IPHONE_8_0: u32 = 80000; -pub const __IPHONE_8_1: u32 = 80100; -pub const __IPHONE_8_2: u32 = 80200; -pub const __IPHONE_8_3: u32 = 80300; -pub const __IPHONE_8_4: u32 = 80400; -pub const __IPHONE_9_0: u32 = 90000; -pub const __IPHONE_9_1: u32 = 90100; -pub const __IPHONE_9_2: u32 = 90200; -pub const __IPHONE_9_3: u32 = 90300; -pub const __IPHONE_10_0: u32 = 100000; -pub const __IPHONE_10_1: u32 = 100100; -pub const __IPHONE_10_2: u32 = 100200; -pub const __IPHONE_10_3: u32 = 100300; -pub const __IPHONE_11_0: u32 = 110000; -pub const __IPHONE_11_1: u32 = 110100; -pub const __IPHONE_11_2: u32 = 110200; -pub const __IPHONE_11_3: u32 = 110300; -pub const __IPHONE_11_4: u32 = 110400; -pub const __IPHONE_12_0: u32 = 120000; -pub const __IPHONE_12_1: u32 = 120100; -pub const __IPHONE_12_2: u32 = 120200; -pub const __IPHONE_12_3: u32 = 120300; -pub const __IPHONE_12_4: u32 = 120400; -pub const __IPHONE_13_0: u32 = 130000; -pub const __IPHONE_13_1: u32 = 130100; -pub const __IPHONE_13_2: u32 = 130200; -pub const __IPHONE_13_3: u32 = 130300; -pub const __IPHONE_13_4: u32 = 130400; -pub const __IPHONE_13_5: u32 = 130500; -pub const __IPHONE_13_6: u32 = 130600; -pub const __IPHONE_13_7: u32 = 130700; -pub const __IPHONE_14_0: u32 = 140000; -pub const __IPHONE_14_1: u32 = 140100; -pub const __IPHONE_14_2: u32 = 140200; -pub const __IPHONE_14_3: u32 = 140300; -pub const __IPHONE_14_5: u32 = 140500; -pub const __IPHONE_14_4: u32 = 140400; -pub const __IPHONE_14_6: u32 = 140600; -pub const __IPHONE_14_7: u32 = 140700; -pub const __IPHONE_14_8: u32 = 140800; -pub const __IPHONE_15_0: u32 = 150000; -pub const __IPHONE_15_1: u32 = 150100; -pub const __IPHONE_15_2: u32 = 150200; -pub const __IPHONE_15_3: u32 = 150300; -pub const __IPHONE_15_4: u32 = 150400; -pub const __IPHONE_15_5: u32 = 150500; -pub const __IPHONE_15_6: u32 = 150600; -pub const __IPHONE_15_7: u32 = 150700; -pub const __IPHONE_15_8: u32 = 150800; -pub const __IPHONE_16_0: u32 = 160000; -pub const __IPHONE_16_1: u32 = 160100; -pub const __IPHONE_16_2: u32 = 160200; -pub const __IPHONE_16_3: u32 = 160300; -pub const __IPHONE_16_4: u32 = 160400; -pub const __IPHONE_16_5: u32 = 160500; -pub const __IPHONE_16_6: u32 = 160600; -pub const __IPHONE_16_7: u32 = 160700; -pub const __IPHONE_17_0: u32 = 170000; -pub const __IPHONE_17_1: u32 = 170100; -pub const __IPHONE_17_2: u32 = 170200; -pub const __IPHONE_17_3: u32 = 170300; -pub const __IPHONE_17_4: u32 = 170400; -pub const __IPHONE_17_5: u32 = 170500; -pub const __WATCHOS_1_0: u32 = 10000; -pub const __WATCHOS_2_0: u32 = 20000; -pub const __WATCHOS_2_1: u32 = 20100; -pub const __WATCHOS_2_2: u32 = 20200; -pub const __WATCHOS_3_0: u32 = 30000; -pub const __WATCHOS_3_1: u32 = 30100; -pub const __WATCHOS_3_1_1: u32 = 30101; -pub const __WATCHOS_3_2: u32 = 30200; -pub const __WATCHOS_4_0: u32 = 40000; -pub const __WATCHOS_4_1: u32 = 40100; -pub const __WATCHOS_4_2: u32 = 40200; -pub const __WATCHOS_4_3: u32 = 40300; -pub const __WATCHOS_5_0: u32 = 50000; -pub const __WATCHOS_5_1: u32 = 50100; -pub const __WATCHOS_5_2: u32 = 50200; -pub const __WATCHOS_5_3: u32 = 50300; -pub const __WATCHOS_6_0: u32 = 60000; -pub const __WATCHOS_6_1: u32 = 60100; -pub const __WATCHOS_6_2: u32 = 60200; -pub const __WATCHOS_7_0: u32 = 70000; -pub const __WATCHOS_7_1: u32 = 70100; -pub const __WATCHOS_7_2: u32 = 70200; -pub const __WATCHOS_7_3: u32 = 70300; -pub const __WATCHOS_7_4: u32 = 70400; -pub const __WATCHOS_7_5: u32 = 70500; -pub const __WATCHOS_7_6: u32 = 70600; -pub const __WATCHOS_8_0: u32 = 80000; -pub const __WATCHOS_8_1: u32 = 80100; -pub const __WATCHOS_8_3: u32 = 80300; -pub const __WATCHOS_8_4: u32 = 80400; -pub const __WATCHOS_8_5: u32 = 80500; -pub const __WATCHOS_8_6: u32 = 80600; -pub const __WATCHOS_8_7: u32 = 80700; -pub const __WATCHOS_8_8: u32 = 80800; -pub const __WATCHOS_9_0: u32 = 90000; -pub const __WATCHOS_9_1: u32 = 90100; -pub const __WATCHOS_9_2: u32 = 90200; -pub const __WATCHOS_9_3: u32 = 90300; -pub const __WATCHOS_9_4: u32 = 90400; -pub const __WATCHOS_9_5: u32 = 90500; -pub const __WATCHOS_9_6: u32 = 90600; -pub const __WATCHOS_10_0: u32 = 100000; -pub const __WATCHOS_10_1: u32 = 100100; -pub const __WATCHOS_10_2: u32 = 100200; -pub const __WATCHOS_10_3: u32 = 100300; -pub const __WATCHOS_10_4: u32 = 100400; -pub const __WATCHOS_10_5: u32 = 100500; -pub const __TVOS_9_0: u32 = 90000; -pub const __TVOS_9_1: u32 = 90100; -pub const __TVOS_9_2: u32 = 90200; -pub const __TVOS_10_0: u32 = 100000; -pub const __TVOS_10_0_1: u32 = 100001; -pub const __TVOS_10_1: u32 = 100100; -pub const __TVOS_10_2: u32 = 100200; -pub const __TVOS_11_0: u32 = 110000; -pub const __TVOS_11_1: u32 = 110100; -pub const __TVOS_11_2: u32 = 110200; -pub const __TVOS_11_3: u32 = 110300; -pub const __TVOS_11_4: u32 = 110400; -pub const __TVOS_12_0: u32 = 120000; -pub const __TVOS_12_1: u32 = 120100; -pub const __TVOS_12_2: u32 = 120200; -pub const __TVOS_12_3: u32 = 120300; -pub const __TVOS_12_4: u32 = 120400; -pub const __TVOS_13_0: u32 = 130000; -pub const __TVOS_13_2: u32 = 130200; -pub const __TVOS_13_3: u32 = 130300; -pub const __TVOS_13_4: u32 = 130400; -pub const __TVOS_14_0: u32 = 140000; -pub const __TVOS_14_1: u32 = 140100; -pub const __TVOS_14_2: u32 = 140200; -pub const __TVOS_14_3: u32 = 140300; -pub const __TVOS_14_5: u32 = 140500; -pub const __TVOS_14_6: u32 = 140600; -pub const __TVOS_14_7: u32 = 140700; -pub const __TVOS_15_0: u32 = 150000; -pub const __TVOS_15_1: u32 = 150100; -pub const __TVOS_15_2: u32 = 150200; -pub const __TVOS_15_3: u32 = 150300; -pub const __TVOS_15_4: u32 = 150400; -pub const __TVOS_15_5: u32 = 150500; -pub const __TVOS_15_6: u32 = 150600; -pub const __TVOS_16_0: u32 = 160000; -pub const __TVOS_16_1: u32 = 160100; -pub const __TVOS_16_2: u32 = 160200; -pub const __TVOS_16_3: u32 = 160300; -pub const __TVOS_16_4: u32 = 160400; -pub const __TVOS_16_5: u32 = 160500; -pub const __TVOS_16_6: u32 = 160600; -pub const __TVOS_17_0: u32 = 170000; -pub const __TVOS_17_1: u32 = 170100; -pub const __TVOS_17_2: u32 = 170200; -pub const __TVOS_17_3: u32 = 170300; -pub const __TVOS_17_4: u32 = 170400; -pub const __TVOS_17_5: u32 = 170500; -pub const __BRIDGEOS_2_0: u32 = 20000; -pub const __BRIDGEOS_3_0: u32 = 30000; -pub const __BRIDGEOS_3_1: u32 = 30100; -pub const __BRIDGEOS_3_4: u32 = 30400; -pub const __BRIDGEOS_4_0: u32 = 40000; -pub const __BRIDGEOS_4_1: u32 = 40100; -pub const __BRIDGEOS_5_0: u32 = 50000; -pub const __BRIDGEOS_5_1: u32 = 50100; -pub const __BRIDGEOS_5_3: u32 = 50300; -pub const __BRIDGEOS_6_0: u32 = 60000; -pub const __BRIDGEOS_6_2: u32 = 60200; -pub const __BRIDGEOS_6_4: u32 = 60400; -pub const __BRIDGEOS_6_5: u32 = 60500; -pub const __BRIDGEOS_6_6: u32 = 60600; -pub const __BRIDGEOS_7_0: u32 = 70000; -pub const __BRIDGEOS_7_1: u32 = 70100; -pub const __BRIDGEOS_7_2: u32 = 70200; -pub const __BRIDGEOS_7_3: u32 = 70300; -pub const __BRIDGEOS_7_4: u32 = 70400; -pub const __BRIDGEOS_7_6: u32 = 70600; -pub const __BRIDGEOS_8_0: u32 = 80000; -pub const __BRIDGEOS_8_1: u32 = 80100; -pub const __BRIDGEOS_8_2: u32 = 80200; -pub const __BRIDGEOS_8_3: u32 = 80300; -pub const __BRIDGEOS_8_4: u32 = 80400; -pub const __BRIDGEOS_8_5: u32 = 80500; -pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __DRIVERKIT_20_0: u32 = 200000; -pub const __DRIVERKIT_21_0: u32 = 210000; -pub const __DRIVERKIT_22_0: u32 = 220000; -pub const __DRIVERKIT_22_4: u32 = 220400; -pub const __DRIVERKIT_22_5: u32 = 220500; -pub const __DRIVERKIT_22_6: u32 = 220600; -pub const __DRIVERKIT_23_0: u32 = 230000; -pub const __DRIVERKIT_23_1: u32 = 230100; -pub const __DRIVERKIT_23_2: u32 = 230200; -pub const __DRIVERKIT_23_3: u32 = 230300; -pub const __DRIVERKIT_23_4: u32 = 230400; -pub const __DRIVERKIT_23_5: u32 = 230500; -pub const __VISIONOS_1_0: u32 = 10000; -pub const __VISIONOS_1_1: u32 = 10100; -pub const __VISIONOS_1_2: u32 = 10200; -pub const MAC_OS_X_VERSION_10_0: u32 = 1000; -pub const MAC_OS_X_VERSION_10_1: u32 = 1010; -pub const MAC_OS_X_VERSION_10_2: u32 = 1020; -pub const MAC_OS_X_VERSION_10_3: u32 = 1030; -pub const MAC_OS_X_VERSION_10_4: u32 = 1040; -pub const MAC_OS_X_VERSION_10_5: u32 = 1050; -pub const MAC_OS_X_VERSION_10_6: u32 = 1060; -pub const MAC_OS_X_VERSION_10_7: u32 = 1070; -pub const MAC_OS_X_VERSION_10_8: u32 = 1080; -pub const MAC_OS_X_VERSION_10_9: u32 = 1090; -pub const MAC_OS_X_VERSION_10_10: u32 = 101000; -pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; -pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; -pub const MAC_OS_X_VERSION_10_11: u32 = 101100; -pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; -pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; -pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; -pub const MAC_OS_X_VERSION_10_12: u32 = 101200; -pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; -pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; -pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; -pub const MAC_OS_X_VERSION_10_13: u32 = 101300; -pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; -pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; -pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; -pub const MAC_OS_X_VERSION_10_14: u32 = 101400; -pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; -pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; -pub const MAC_OS_X_VERSION_10_14_5: u32 = 101405; -pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; -pub const MAC_OS_X_VERSION_10_15: u32 = 101500; -pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; -pub const MAC_OS_X_VERSION_10_15_4: u32 = 101504; -pub const MAC_OS_X_VERSION_10_16: u32 = 101600; -pub const MAC_OS_VERSION_11_0: u32 = 110000; -pub const MAC_OS_VERSION_11_1: u32 = 110100; -pub const MAC_OS_VERSION_11_3: u32 = 110300; -pub const MAC_OS_VERSION_11_4: u32 = 110400; -pub const MAC_OS_VERSION_11_5: u32 = 110500; -pub const MAC_OS_VERSION_11_6: u32 = 110600; -pub const MAC_OS_VERSION_12_0: u32 = 120000; -pub const MAC_OS_VERSION_12_1: u32 = 120100; -pub const MAC_OS_VERSION_12_2: u32 = 120200; -pub const MAC_OS_VERSION_12_3: u32 = 120300; -pub const MAC_OS_VERSION_12_4: u32 = 120400; -pub const MAC_OS_VERSION_12_5: u32 = 120500; -pub const MAC_OS_VERSION_12_6: u32 = 120600; -pub const MAC_OS_VERSION_12_7: u32 = 120700; -pub const MAC_OS_VERSION_13_0: u32 = 130000; -pub const MAC_OS_VERSION_13_1: u32 = 130100; -pub const MAC_OS_VERSION_13_2: u32 = 130200; -pub const MAC_OS_VERSION_13_3: u32 = 130300; -pub const MAC_OS_VERSION_13_4: u32 = 130400; -pub const MAC_OS_VERSION_13_5: u32 = 130500; -pub const MAC_OS_VERSION_13_6: u32 = 130600; -pub const MAC_OS_VERSION_14_0: u32 = 140000; -pub const MAC_OS_VERSION_14_1: u32 = 140100; -pub const MAC_OS_VERSION_14_2: u32 = 140200; -pub const MAC_OS_VERSION_14_3: u32 = 140300; -pub const MAC_OS_VERSION_14_4: u32 = 140400; -pub const MAC_OS_VERSION_14_5: u32 = 140500; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 140500; -pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; -pub const __PTHREAD_SIZE__: u32 = 8176; -pub const __PTHREAD_ATTR_SIZE__: u32 = 56; -pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8; -pub const __PTHREAD_MUTEX_SIZE__: u32 = 56; -pub const __PTHREAD_CONDATTR_SIZE__: u32 = 8; -pub const __PTHREAD_COND_SIZE__: u32 = 40; -pub const __PTHREAD_ONCE_SIZE__: u32 = 8; -pub const __PTHREAD_RWLOCK_SIZE__: u32 = 192; -pub const __PTHREAD_RWLOCKATTR_SIZE__: u32 = 16; -pub const __DARWIN_WCHAR_MIN: i32 = -2147483648; -pub const _FORTIFY_SOURCE: u32 = 2; -pub const RENAME_SECLUDE: u32 = 1; -pub const RENAME_SWAP: u32 = 2; -pub const RENAME_EXCL: u32 = 4; -pub const RENAME_RESERVED1: u32 = 8; -pub const RENAME_NOFOLLOW_ANY: u32 = 16; -pub const SEEK_SET: u32 = 0; -pub const SEEK_CUR: u32 = 1; -pub const SEEK_END: u32 = 2; -pub const SEEK_HOLE: u32 = 3; -pub const SEEK_DATA: u32 = 4; -pub const __SLBF: u32 = 1; -pub const __SNBF: u32 = 2; -pub const __SRD: u32 = 4; -pub const __SWR: u32 = 8; -pub const __SRW: u32 = 16; -pub const __SEOF: u32 = 32; -pub const __SERR: u32 = 64; -pub const __SMBF: u32 = 128; -pub const __SAPP: u32 = 256; -pub const __SSTR: u32 = 512; -pub const __SOPT: u32 = 1024; -pub const __SNPT: u32 = 2048; -pub const __SOFF: u32 = 4096; -pub const __SMOD: u32 = 8192; -pub const __SALC: u32 = 16384; -pub const __SIGN: u32 = 32768; -pub const _IOFBF: u32 = 0; -pub const _IOLBF: u32 = 1; -pub const _IONBF: u32 = 2; -pub const BUFSIZ: u32 = 1024; -pub const EOF: i32 = -1; -pub const FOPEN_MAX: u32 = 20; -pub const FILENAME_MAX: u32 = 1024; -pub const P_tmpdir: &[u8; 10] = b"/var/tmp/\0"; -pub const L_tmpnam: u32 = 1024; -pub const TMP_MAX: u32 = 308915776; -pub const L_ctermid: u32 = 1024; -pub const _USE_FORTIFY_LEVEL: u32 = 2; -pub const __DARWIN_NSIG: u32 = 32; -pub const NSIG: u32 = 32; -pub const _ARM_SIGNAL_: u32 = 1; -pub const SIGHUP: u32 = 1; -pub const SIGINT: u32 = 2; -pub const SIGQUIT: u32 = 3; -pub const SIGILL: u32 = 4; -pub const SIGTRAP: u32 = 5; -pub const SIGABRT: u32 = 6; -pub const SIGIOT: u32 = 6; -pub const SIGEMT: u32 = 7; -pub const SIGFPE: u32 = 8; -pub const SIGKILL: u32 = 9; -pub const SIGBUS: u32 = 10; -pub const SIGSEGV: u32 = 11; -pub const SIGSYS: u32 = 12; -pub const SIGPIPE: u32 = 13; -pub const SIGALRM: u32 = 14; -pub const SIGTERM: u32 = 15; -pub const SIGURG: u32 = 16; -pub const SIGSTOP: u32 = 17; -pub const SIGTSTP: u32 = 18; -pub const SIGCONT: u32 = 19; -pub const SIGCHLD: u32 = 20; -pub const SIGTTIN: u32 = 21; -pub const SIGTTOU: u32 = 22; -pub const SIGIO: u32 = 23; -pub const SIGXCPU: u32 = 24; -pub const SIGXFSZ: u32 = 25; -pub const SIGVTALRM: u32 = 26; -pub const SIGPROF: u32 = 27; -pub const SIGWINCH: u32 = 28; -pub const SIGINFO: u32 = 29; -pub const SIGUSR1: u32 = 30; -pub const SIGUSR2: u32 = 31; -pub const __DARWIN_OPAQUE_ARM_THREAD_STATE64: u32 = 0; -pub const SIGEV_NONE: u32 = 0; -pub const SIGEV_SIGNAL: u32 = 1; -pub const SIGEV_THREAD: u32 = 3; -pub const ILL_NOOP: u32 = 0; -pub const ILL_ILLOPC: u32 = 1; -pub const ILL_ILLTRP: u32 = 2; -pub const ILL_PRVOPC: u32 = 3; -pub const ILL_ILLOPN: u32 = 4; -pub const ILL_ILLADR: u32 = 5; -pub const ILL_PRVREG: u32 = 6; -pub const ILL_COPROC: u32 = 7; -pub const ILL_BADSTK: u32 = 8; -pub const FPE_NOOP: u32 = 0; -pub const FPE_FLTDIV: u32 = 1; -pub const FPE_FLTOVF: u32 = 2; -pub const FPE_FLTUND: u32 = 3; -pub const FPE_FLTRES: u32 = 4; -pub const FPE_FLTINV: u32 = 5; -pub const FPE_FLTSUB: u32 = 6; -pub const FPE_INTDIV: u32 = 7; -pub const FPE_INTOVF: u32 = 8; -pub const SEGV_NOOP: u32 = 0; -pub const SEGV_MAPERR: u32 = 1; -pub const SEGV_ACCERR: u32 = 2; -pub const BUS_NOOP: u32 = 0; -pub const BUS_ADRALN: u32 = 1; -pub const BUS_ADRERR: u32 = 2; -pub const BUS_OBJERR: u32 = 3; -pub const TRAP_BRKPT: u32 = 1; -pub const TRAP_TRACE: u32 = 2; -pub const CLD_NOOP: u32 = 0; -pub const CLD_EXITED: u32 = 1; -pub const CLD_KILLED: u32 = 2; -pub const CLD_DUMPED: u32 = 3; -pub const CLD_TRAPPED: u32 = 4; -pub const CLD_STOPPED: u32 = 5; -pub const CLD_CONTINUED: u32 = 6; -pub const POLL_IN: u32 = 1; -pub const POLL_OUT: u32 = 2; -pub const POLL_MSG: u32 = 3; -pub const POLL_ERR: u32 = 4; -pub const POLL_PRI: u32 = 5; -pub const POLL_HUP: u32 = 6; -pub const SA_ONSTACK: u32 = 1; -pub const SA_RESTART: u32 = 2; -pub const SA_RESETHAND: u32 = 4; -pub const SA_NOCLDSTOP: u32 = 8; -pub const SA_NODEFER: u32 = 16; -pub const SA_NOCLDWAIT: u32 = 32; -pub const SA_SIGINFO: u32 = 64; -pub const SA_USERTRAMP: u32 = 256; -pub const SA_64REGSET: u32 = 512; -pub const SA_USERSPACE_MASK: u32 = 127; -pub const SIG_BLOCK: u32 = 1; -pub const SIG_UNBLOCK: u32 = 2; -pub const SIG_SETMASK: u32 = 3; -pub const SI_USER: u32 = 65537; -pub const SI_QUEUE: u32 = 65538; -pub const SI_TIMER: u32 = 65539; -pub const SI_ASYNCIO: u32 = 65540; -pub const SI_MESGQ: u32 = 65541; -pub const SS_ONSTACK: u32 = 1; -pub const SS_DISABLE: u32 = 4; -pub const MINSIGSTKSZ: u32 = 32768; -pub const SIGSTKSZ: u32 = 131072; -pub const SV_ONSTACK: u32 = 1; -pub const SV_INTERRUPT: u32 = 2; -pub const SV_RESETHAND: u32 = 4; -pub const SV_NODEFER: u32 = 16; -pub const SV_NOCLDSTOP: u32 = 8; -pub const SV_SIGINFO: u32 = 64; -pub const __WORDSIZE: u32 = 64; -pub const INT8_MAX: u32 = 127; -pub const INT16_MAX: u32 = 32767; -pub const INT32_MAX: u32 = 2147483647; -pub const INT64_MAX: u64 = 9223372036854775807; -pub const INT8_MIN: i32 = -128; -pub const INT16_MIN: i32 = -32768; -pub const INT32_MIN: i32 = -2147483648; -pub const INT64_MIN: i64 = -9223372036854775808; -pub const UINT8_MAX: u32 = 255; -pub const UINT16_MAX: u32 = 65535; -pub const UINT32_MAX: u32 = 4294967295; -pub const UINT64_MAX: i32 = -1; -pub const INT_LEAST8_MIN: i32 = -128; -pub const INT_LEAST16_MIN: i32 = -32768; -pub const INT_LEAST32_MIN: i32 = -2147483648; -pub const INT_LEAST64_MIN: i64 = -9223372036854775808; -pub const INT_LEAST8_MAX: u32 = 127; -pub const INT_LEAST16_MAX: u32 = 32767; -pub const INT_LEAST32_MAX: u32 = 2147483647; -pub const INT_LEAST64_MAX: u64 = 9223372036854775807; -pub const UINT_LEAST8_MAX: u32 = 255; -pub const UINT_LEAST16_MAX: u32 = 65535; -pub const UINT_LEAST32_MAX: u32 = 4294967295; -pub const UINT_LEAST64_MAX: i32 = -1; -pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i32 = -32768; -pub const INT_FAST32_MIN: i32 = -2147483648; -pub const INT_FAST64_MIN: i64 = -9223372036854775808; -pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u32 = 32767; -pub const INT_FAST32_MAX: u32 = 2147483647; -pub const INT_FAST64_MAX: u64 = 9223372036854775807; -pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: u32 = 65535; -pub const UINT_FAST32_MAX: u32 = 4294967295; -pub const UINT_FAST64_MAX: i32 = -1; -pub const INTPTR_MAX: u64 = 9223372036854775807; -pub const INTPTR_MIN: i64 = -9223372036854775808; -pub const UINTPTR_MAX: i32 = -1; -pub const SIZE_MAX: i32 = -1; -pub const RSIZE_MAX: i32 = -1; -pub const WINT_MIN: i32 = -2147483648; -pub const WINT_MAX: u32 = 2147483647; -pub const SIG_ATOMIC_MIN: i32 = -2147483648; -pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const PRIO_PROCESS: u32 = 0; -pub const PRIO_PGRP: u32 = 1; -pub const PRIO_USER: u32 = 2; -pub const PRIO_DARWIN_THREAD: u32 = 3; -pub const PRIO_DARWIN_PROCESS: u32 = 4; -pub const PRIO_MIN: i32 = -20; -pub const PRIO_MAX: u32 = 20; -pub const PRIO_DARWIN_BG: u32 = 4096; -pub const PRIO_DARWIN_NONUI: u32 = 4097; -pub const RUSAGE_SELF: u32 = 0; -pub const RUSAGE_CHILDREN: i32 = -1; -pub const RUSAGE_INFO_V0: u32 = 0; -pub const RUSAGE_INFO_V1: u32 = 1; -pub const RUSAGE_INFO_V2: u32 = 2; -pub const RUSAGE_INFO_V3: u32 = 3; -pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_V5: u32 = 5; -pub const RUSAGE_INFO_V6: u32 = 6; -pub const RUSAGE_INFO_CURRENT: u32 = 6; -pub const RU_PROC_RUNS_RESLIDE: u32 = 1; -pub const RLIMIT_CPU: u32 = 0; -pub const RLIMIT_FSIZE: u32 = 1; -pub const RLIMIT_DATA: u32 = 2; -pub const RLIMIT_STACK: u32 = 3; -pub const RLIMIT_CORE: u32 = 4; -pub const RLIMIT_AS: u32 = 5; -pub const RLIMIT_RSS: u32 = 5; -pub const RLIMIT_MEMLOCK: u32 = 6; -pub const RLIMIT_NPROC: u32 = 7; -pub const RLIMIT_NOFILE: u32 = 8; -pub const RLIM_NLIMITS: u32 = 9; -pub const _RLIMIT_POSIX_FLAG: u32 = 4096; -pub const RLIMIT_WAKEUPS_MONITOR: u32 = 1; -pub const RLIMIT_CPU_USAGE_MONITOR: u32 = 2; -pub const RLIMIT_THREAD_CPULIMITS: u32 = 3; -pub const RLIMIT_FOOTPRINT_INTERVAL: u32 = 4; -pub const WAKEMON_ENABLE: u32 = 1; -pub const WAKEMON_DISABLE: u32 = 2; -pub const WAKEMON_GET_PARAMS: u32 = 4; -pub const WAKEMON_SET_DEFAULTS: u32 = 8; -pub const WAKEMON_MAKE_FATAL: u32 = 16; -pub const CPUMON_MAKE_FATAL: u32 = 4096; -pub const FOOTPRINT_INTERVAL_RESET: u32 = 1; -pub const IOPOL_TYPE_DISK: u32 = 0; -pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; -pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; -pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; -pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; -pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; -pub const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS: u32 = 7; -pub const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE: u32 = 8; -pub const IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES: u32 = 9; -pub const IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY: u32 = 10; -pub const IOPOL_SCOPE_PROCESS: u32 = 0; -pub const IOPOL_SCOPE_THREAD: u32 = 1; -pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; -pub const IOPOL_DEFAULT: u32 = 0; -pub const IOPOL_IMPORTANT: u32 = 1; -pub const IOPOL_PASSIVE: u32 = 2; -pub const IOPOL_THROTTLE: u32 = 3; -pub const IOPOL_UTILITY: u32 = 4; -pub const IOPOL_STANDARD: u32 = 5; -pub const IOPOL_APPLICATION: u32 = 5; -pub const IOPOL_NORMAL: u32 = 1; -pub const IOPOL_ATIME_UPDATES_DEFAULT: u32 = 0; -pub const IOPOL_ATIME_UPDATES_OFF: u32 = 1; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT: u32 = 0; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; -pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; -pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; -pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; -pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; -pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; -pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; -pub const IOPOL_VFS_IGNORE_PERMISSIONS_OFF: u32 = 0; -pub const IOPOL_VFS_IGNORE_PERMISSIONS_ON: u32 = 1; -pub const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF: u32 = 0; -pub const IOPOL_VFS_SKIP_MTIME_UPDATE_ON: u32 = 1; -pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF: u32 = 0; -pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON: u32 = 1; -pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT: u32 = 0; -pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON: u32 = 1; -pub const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT: u32 = 0; -pub const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON: u32 = 1; -pub const WNOHANG: u32 = 1; -pub const WUNTRACED: u32 = 2; -pub const WCOREFLAG: u32 = 128; -pub const _WSTOPPED: u32 = 127; -pub const WEXITED: u32 = 4; -pub const WSTOPPED: u32 = 8; -pub const WCONTINUED: u32 = 16; -pub const WNOWAIT: u32 = 32; -pub const WAIT_ANY: i32 = -1; -pub const WAIT_MYPGRP: u32 = 0; -pub const _QUAD_HIGHWORD: u32 = 1; -pub const _QUAD_LOWWORD: u32 = 0; -pub const __DARWIN_LITTLE_ENDIAN: u32 = 1234; -pub const __DARWIN_BIG_ENDIAN: u32 = 4321; -pub const __DARWIN_PDP_ENDIAN: u32 = 3412; -pub const __DARWIN_BYTE_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const EXIT_FAILURE: u32 = 1; -pub const EXIT_SUCCESS: u32 = 0; -pub const RAND_MAX: u32 = 2147483647; -pub const __HAS_FIXED_CHK_PROTOTYPES: u32 = 1; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_longlong; -pub type __uint64_t = ::std::os::raw::c_ulonglong; -pub type __darwin_intptr_t = ::std::os::raw::c_long; -pub type __darwin_natural_t = ::std::os::raw::c_uint; -pub type __darwin_ct_rune_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union __mbstate_t { - pub __mbstate8: [::std::os::raw::c_char; 128usize], - pub _mbstateL: ::std::os::raw::c_longlong, -} -#[test] -fn bindgen_test_layout___mbstate_t() { - const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 128usize, - concat!("Size of: ", stringify!(__mbstate_t)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 8usize, - concat!("Alignment of ", stringify!(__mbstate_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__mbstate8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__mbstate8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mbstateL) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(_mbstateL) - ) - ); -} -pub type __darwin_mbstate_t = __mbstate_t; -pub type __darwin_ptrdiff_t = ::std::os::raw::c_long; -pub type __darwin_size_t = ::std::os::raw::c_ulong; -pub type __darwin_va_list = __builtin_va_list; -pub type __darwin_wchar_t = ::std::os::raw::c_int; -pub type __darwin_rune_t = __darwin_wchar_t; -pub type __darwin_wint_t = ::std::os::raw::c_int; -pub type __darwin_clock_t = ::std::os::raw::c_ulong; -pub type __darwin_socklen_t = __uint32_t; -pub type __darwin_ssize_t = ::std::os::raw::c_long; -pub type __darwin_time_t = ::std::os::raw::c_long; -pub type __darwin_blkcnt_t = __int64_t; -pub type __darwin_blksize_t = __int32_t; -pub type __darwin_dev_t = __int32_t; -pub type __darwin_fsblkcnt_t = ::std::os::raw::c_uint; -pub type __darwin_fsfilcnt_t = ::std::os::raw::c_uint; -pub type __darwin_gid_t = __uint32_t; -pub type __darwin_id_t = __uint32_t; -pub type __darwin_ino64_t = __uint64_t; -pub type __darwin_ino_t = __darwin_ino64_t; -pub type __darwin_mach_port_name_t = __darwin_natural_t; -pub type __darwin_mach_port_t = __darwin_mach_port_name_t; -pub type __darwin_mode_t = __uint16_t; -pub type __darwin_off_t = __int64_t; -pub type __darwin_pid_t = __int32_t; -pub type __darwin_sigset_t = __uint32_t; -pub type __darwin_suseconds_t = __int32_t; -pub type __darwin_uid_t = __uint32_t; -pub type __darwin_useconds_t = __uint32_t; -pub type __darwin_uuid_t = [::std::os::raw::c_uchar; 16usize]; -pub type __darwin_uuid_string_t = [::std::os::raw::c_char; 37usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_pthread_handler_rec { - pub __routine: ::std::option::Option, - pub __arg: *mut ::std::os::raw::c_void, - pub __next: *mut __darwin_pthread_handler_rec, -} -#[test] -fn bindgen_test_layout___darwin_pthread_handler_rec() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_pthread_handler_rec> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_pthread_handler_rec>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_pthread_handler_rec)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_pthread_handler_rec>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__routine) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__routine) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__arg) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__arg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__next) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_attr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 56usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_attr_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_attr_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_attr_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_attr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_attr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_attr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_attr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_cond_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 40usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_cond_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_cond_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_cond_t>(), - 48usize, - concat!("Size of: ", stringify!(_opaque_pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_cond_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_cond_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_condattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_condattr_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_condattr_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_condattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_condattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_mutex_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 56usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_mutex_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutex_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutex_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutex_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_mutexattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_mutexattr_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutexattr_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutexattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_once_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_once_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_once_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_once_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_once_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_once_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_once_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_once_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_once_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_rwlock_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 192usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_rwlock_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlock_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlock_t>(), - 200usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlock_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_rwlockattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 16usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlockattr_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(), - 24usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlockattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_t { - pub __sig: ::std::os::raw::c_long, - pub __cleanup_stack: *mut __darwin_pthread_handler_rec, - pub __opaque: [::std::os::raw::c_char; 8176usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_t() { - const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_t>(), - 8192usize, - concat!("Size of: ", stringify!(_opaque_pthread_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_stack) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__cleanup_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__opaque) - ) - ); -} -pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t; -pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; -pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t; -pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong; -pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; -pub type __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t; -pub type __darwin_pthread_once_t = _opaque_pthread_once_t; -pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t; -pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t; -pub type __darwin_pthread_t = *mut _opaque_pthread_t; -pub type __darwin_nl_item = ::std::os::raw::c_int; -pub type __darwin_wctrans_t = ::std::os::raw::c_int; -pub type __darwin_wctype_t = __uint32_t; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulonglong; -pub type register_t = i64; -pub type user_addr_t = u_int64_t; -pub type user_size_t = u_int64_t; -pub type user_ssize_t = i64; -pub type user_long_t = i64; -pub type user_ulong_t = u_int64_t; -pub type user_time_t = i64; -pub type user_off_t = i64; -pub type syscall_arg_t = u_int64_t; -pub type va_list = __darwin_va_list; -extern "C" { - pub fn renameat( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renamex_np( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renameatx_np( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *const ::std::os::raw::c_char, - arg5: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -pub type fpos_t = __darwin_off_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sbuf { - pub _base: *mut ::std::os::raw::c_uchar, - pub _size: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___sbuf() { - const UNINIT: ::std::mem::MaybeUninit<__sbuf> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sbuf>(), - 16usize, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._base) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_size) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sFILEX { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sFILE { - pub _p: *mut ::std::os::raw::c_uchar, - pub _r: ::std::os::raw::c_int, - pub _w: ::std::os::raw::c_int, - pub _flags: ::std::os::raw::c_short, - pub _file: ::std::os::raw::c_short, - pub _bf: __sbuf, - pub _lbfsize: ::std::os::raw::c_int, - pub _cookie: *mut ::std::os::raw::c_void, - pub _close: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub _read: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub _seek: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: fpos_t, - arg3: ::std::os::raw::c_int, - ) -> fpos_t, - >, - pub _write: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub _ub: __sbuf, - pub _extra: *mut __sFILEX, - pub _ur: ::std::os::raw::c_int, - pub _ubuf: [::std::os::raw::c_uchar; 3usize], - pub _nbuf: [::std::os::raw::c_uchar; 1usize], - pub _lb: __sbuf, - pub _blksize: ::std::os::raw::c_int, - pub _offset: fpos_t, -} -#[test] -fn bindgen_test_layout___sFILE() { - const UNINIT: ::std::mem::MaybeUninit<__sFILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sFILE>(), - 152usize, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._p) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_p) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._r) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._w) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._file) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_file) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._bf) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_bf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lbfsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lbfsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cookie) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_cookie) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._close) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._read) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_read) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._seek) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_seek) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._write) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_write) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._ub) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ub) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._extra) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_extra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._ur) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ur) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._ubuf) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ubuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._nbuf) as usize - ptr as usize }, - 119usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_nbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lb) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._blksize) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_blksize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_offset) - ) - ); -} -pub type FILE = __sFILE; -extern "C" { - pub static mut __stdinp: *mut FILE; -} -extern "C" { - pub static mut __stdoutp: *mut FILE; -} -extern "C" { - pub static mut __stderrp: *mut FILE; -} -extern "C" { - pub fn clearerr(arg1: *mut FILE); -} -extern "C" { - pub fn fclose(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn feof(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ferror(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fflush(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetc(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetpos(arg1: *mut FILE, arg2: *mut fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgets( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut FILE, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fopen( - __filename: *const ::std::os::raw::c_char, - __mode: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn fprintf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputs(arg1: *const ::std::os::raw::c_char, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fread( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __nitems: ::std::os::raw::c_ulong, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn freopen( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut FILE, - ) -> *mut FILE; -} -extern "C" { - pub fn fscanf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fseek( - arg1: *mut FILE, - arg2: ::std::os::raw::c_long, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fsetpos(arg1: *mut FILE, arg2: *const fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftell(arg1: *mut FILE) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn fwrite( - __ptr: *const ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __nitems: ::std::os::raw::c_ulong, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn getc(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gets(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn perror(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn printf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn puts(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn remove(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rename( - __old: *const ::std::os::raw::c_char, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rewind(arg1: *mut FILE); -} -extern "C" { - pub fn scanf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setbuf(arg1: *mut FILE, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn setvbuf( - arg1: *mut FILE, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sprintf( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sscanf( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tmpfile() -> *mut FILE; -} -extern "C" { - pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ungetc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfprintf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - arg3: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vprintf( - arg1: *const ::std::os::raw::c_char, - arg2: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsprintf( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ctermid(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fdopen(arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char) -> *mut FILE; -} -extern "C" { - pub fn fileno(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pclose(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn popen( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn __srget(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __svfscanf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - arg3: va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __swbuf(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flockfile(arg1: *mut FILE); -} -extern "C" { - pub fn ftrylockfile(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn funlockfile(arg1: *mut FILE); -} -extern "C" { - pub fn getc_unlocked(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar_unlocked() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc_unlocked(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar_unlocked(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getw(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putw(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tempnam( - __dir: *const ::std::os::raw::c_char, - __prefix: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -pub type off_t = __darwin_off_t; -extern "C" { - pub fn fseeko( - __stream: *mut FILE, - __offset: off_t, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftello(__stream: *mut FILE) -> off_t; -} -extern "C" { - pub fn snprintf( - __str: *mut ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfscanf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - arg1: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vscanf( - __format: *const ::std::os::raw::c_char, - arg1: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsnprintf( - __str: *mut ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - arg1: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsscanf( - __str: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - arg1: __builtin_va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dprintf( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vdprintf( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - arg3: va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getdelim( - __linep: *mut *mut ::std::os::raw::c_char, - __linecapp: *mut usize, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> isize; -} -extern "C" { - pub fn getline( - __linep: *mut *mut ::std::os::raw::c_char, - __linecapp: *mut usize, - __stream: *mut FILE, - ) -> isize; -} -extern "C" { - pub fn fmemopen( - __buf: *mut ::std::os::raw::c_void, - __size: usize, - __mode: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn open_memstream( - __bufp: *mut *mut ::std::os::raw::c_char, - __sizep: *mut usize, - ) -> *mut FILE; -} -extern "C" { - pub static sys_nerr: ::std::os::raw::c_int; -} -extern "C" { - pub static sys_errlist: [*const ::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn asprintf( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ctermid_r(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fgetln(arg1: *mut FILE, arg2: *mut usize) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fmtcheck( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn fpurge(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setbuffer( - arg1: *mut FILE, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn setlinebuf(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vasprintf( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn funopen( - arg1: *const ::std::os::raw::c_void, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg3: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg4: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: fpos_t, - arg3: ::std::os::raw::c_int, - ) -> fpos_t, - >, - arg5: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - ) -> *mut FILE; -} -extern "C" { - pub fn __sprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: usize, - arg4: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __snprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: usize, - arg3: ::std::os::raw::c_int, - arg4: usize, - arg5: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __vsprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: usize, - arg4: *const ::std::os::raw::c_char, - arg5: va_list, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __vsnprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: usize, - arg3: ::std::os::raw::c_int, - arg4: usize, - arg5: *const ::std::os::raw::c_char, - arg6: va_list, - ) -> ::std::os::raw::c_int; -} -pub const idtype_t_P_ALL: idtype_t = 0; -pub const idtype_t_P_PID: idtype_t = 1; -pub const idtype_t_P_PGID: idtype_t = 2; -pub type idtype_t = ::std::os::raw::c_uint; -pub type pid_t = __darwin_pid_t; -pub type id_t = __darwin_id_t; -pub type sig_atomic_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_exception_state { - pub __exception: __uint32_t, - pub __fsr: __uint32_t, - pub __far: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_exception_state() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_exception_state> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_exception_state>(), - 12usize, - concat!("Size of: ", stringify!(__darwin_arm_exception_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_exception_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_arm_exception_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__exception) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_exception_state), - "::", - stringify!(__exception) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fsr) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_exception_state), - "::", - stringify!(__fsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__far) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_exception_state), - "::", - stringify!(__far) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_exception_state64 { - pub __far: __uint64_t, - pub __esr: __uint32_t, - pub __exception: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_exception_state64() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_exception_state64> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_exception_state64>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_arm_exception_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_exception_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_arm_exception_state64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__far) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_exception_state64), - "::", - stringify!(__far) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__esr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_exception_state64), - "::", - stringify!(__esr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__exception) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_exception_state64), - "::", - stringify!(__exception) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_thread_state { - pub __r: [__uint32_t; 13usize], - pub __sp: __uint32_t, - pub __lr: __uint32_t, - pub __pc: __uint32_t, - pub __cpsr: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_thread_state() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_thread_state> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_thread_state>(), - 68usize, - concat!("Size of: ", stringify!(__darwin_arm_thread_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_thread_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_arm_thread_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state), - "::", - stringify!(__r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sp) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state), - "::", - stringify!(__sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__lr) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state), - "::", - stringify!(__lr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pc) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state), - "::", - stringify!(__pc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__cpsr) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state), - "::", - stringify!(__cpsr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_thread_state64 { - pub __x: [__uint64_t; 29usize], - pub __fp: __uint64_t, - pub __lr: __uint64_t, - pub __sp: __uint64_t, - pub __pc: __uint64_t, - pub __cpsr: __uint32_t, - pub __pad: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_thread_state64() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_thread_state64> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_thread_state64>(), - 272usize, - concat!("Size of: ", stringify!(__darwin_arm_thread_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_thread_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_arm_thread_state64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fp) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__fp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__lr) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__lr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sp) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pc) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__pc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__cpsr) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__cpsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_thread_state64), - "::", - stringify!(__pad) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_vfp_state { - pub __r: [__uint32_t; 64usize], - pub __fpscr: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_vfp_state() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_vfp_state> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_vfp_state>(), - 260usize, - concat!("Size of: ", stringify!(__darwin_arm_vfp_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_vfp_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_arm_vfp_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_vfp_state), - "::", - stringify!(__r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpscr) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_vfp_state), - "::", - stringify!(__fpscr) - ) - ); -} -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_neon_state64 { - pub __v: [__uint128_t; 32usize], - pub __fpsr: __uint32_t, - pub __fpcr: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_neon_state64() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_neon_state64> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_neon_state64>(), - 528usize, - concat!("Size of: ", stringify!(__darwin_arm_neon_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_neon_state64>(), - 16usize, - concat!("Alignment of ", stringify!(__darwin_arm_neon_state64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__v) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_neon_state64), - "::", - stringify!(__v) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpsr) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_neon_state64), - "::", - stringify!(__fpsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpcr) as usize - ptr as usize }, - 516usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_neon_state64), - "::", - stringify!(__fpcr) - ) - ); -} -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_neon_state { - pub __v: [__uint128_t; 16usize], - pub __fpsr: __uint32_t, - pub __fpcr: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_neon_state() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_neon_state> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_neon_state>(), - 272usize, - concat!("Size of: ", stringify!(__darwin_arm_neon_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_neon_state>(), - 16usize, - concat!("Alignment of ", stringify!(__darwin_arm_neon_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__v) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_neon_state), - "::", - stringify!(__v) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpsr) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_neon_state), - "::", - stringify!(__fpsr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fpcr) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_neon_state), - "::", - stringify!(__fpcr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __arm_pagein_state { - pub __pagein_error: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___arm_pagein_state() { - const UNINIT: ::std::mem::MaybeUninit<__arm_pagein_state> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__arm_pagein_state>(), - 4usize, - concat!("Size of: ", stringify!(__arm_pagein_state)) - ); - assert_eq!( - ::std::mem::align_of::<__arm_pagein_state>(), - 4usize, - concat!("Alignment of ", stringify!(__arm_pagein_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pagein_error) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__arm_pagein_state), - "::", - stringify!(__pagein_error) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __arm_legacy_debug_state { - pub __bvr: [__uint32_t; 16usize], - pub __bcr: [__uint32_t; 16usize], - pub __wvr: [__uint32_t; 16usize], - pub __wcr: [__uint32_t; 16usize], -} -#[test] -fn bindgen_test_layout___arm_legacy_debug_state() { - const UNINIT: ::std::mem::MaybeUninit<__arm_legacy_debug_state> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__arm_legacy_debug_state>(), - 256usize, - concat!("Size of: ", stringify!(__arm_legacy_debug_state)) - ); - assert_eq!( - ::std::mem::align_of::<__arm_legacy_debug_state>(), - 4usize, - concat!("Alignment of ", stringify!(__arm_legacy_debug_state)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bvr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__arm_legacy_debug_state), - "::", - stringify!(__bvr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bcr) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__arm_legacy_debug_state), - "::", - stringify!(__bcr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wvr) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__arm_legacy_debug_state), - "::", - stringify!(__wvr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wcr) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(__arm_legacy_debug_state), - "::", - stringify!(__wcr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_debug_state32 { - pub __bvr: [__uint32_t; 16usize], - pub __bcr: [__uint32_t; 16usize], - pub __wvr: [__uint32_t; 16usize], - pub __wcr: [__uint32_t; 16usize], - pub __mdscr_el1: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_debug_state32() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_debug_state32> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_debug_state32>(), - 264usize, - concat!("Size of: ", stringify!(__darwin_arm_debug_state32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_debug_state32>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_arm_debug_state32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bvr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state32), - "::", - stringify!(__bvr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bcr) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state32), - "::", - stringify!(__bcr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wvr) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state32), - "::", - stringify!(__wvr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wcr) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state32), - "::", - stringify!(__wcr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__mdscr_el1) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state32), - "::", - stringify!(__mdscr_el1) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_debug_state64 { - pub __bvr: [__uint64_t; 16usize], - pub __bcr: [__uint64_t; 16usize], - pub __wvr: [__uint64_t; 16usize], - pub __wcr: [__uint64_t; 16usize], - pub __mdscr_el1: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_arm_debug_state64() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_debug_state64> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_debug_state64>(), - 520usize, - concat!("Size of: ", stringify!(__darwin_arm_debug_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_debug_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_arm_debug_state64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bvr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state64), - "::", - stringify!(__bvr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__bcr) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state64), - "::", - stringify!(__bcr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wvr) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state64), - "::", - stringify!(__wvr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wcr) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state64), - "::", - stringify!(__wcr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__mdscr_el1) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_debug_state64), - "::", - stringify!(__mdscr_el1) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_arm_cpmu_state64 { - pub __ctrs: [__uint64_t; 16usize], -} -#[test] -fn bindgen_test_layout___darwin_arm_cpmu_state64() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_cpmu_state64> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_arm_cpmu_state64>(), - 128usize, - concat!("Size of: ", stringify!(__darwin_arm_cpmu_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_arm_cpmu_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_arm_cpmu_state64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ctrs) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_arm_cpmu_state64), - "::", - stringify!(__ctrs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext32 { - pub __es: __darwin_arm_exception_state, - pub __ss: __darwin_arm_thread_state, - pub __fs: __darwin_arm_vfp_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext32() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext32> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext32>(), - 340usize, - concat!("Size of: ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[repr(align(16))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext64 { - pub __es: __darwin_arm_exception_state64, - pub __ss: __darwin_arm_thread_state64, - pub __ns: __darwin_arm_neon_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext64() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext64> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64>(), - 816usize, - concat!("Size of: ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64>(), - 16usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ns) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__ns) - ) - ); -} -pub type mcontext_t = *mut __darwin_mcontext64; -pub type pthread_attr_t = __darwin_pthread_attr_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_sigaltstack { - pub ss_sp: *mut ::std::os::raw::c_void, - pub ss_size: __darwin_size_t, - pub ss_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___darwin_sigaltstack() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_sigaltstack> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_sigaltstack>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_sigaltstack>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_flags) - ) - ); -} -pub type stack_t = __darwin_sigaltstack; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_ucontext { - pub uc_onstack: ::std::os::raw::c_int, - pub uc_sigmask: __darwin_sigset_t, - pub uc_stack: __darwin_sigaltstack, - pub uc_link: *mut __darwin_ucontext, - pub uc_mcsize: __darwin_size_t, - pub uc_mcontext: *mut __darwin_mcontext64, -} -#[test] -fn bindgen_test_layout___darwin_ucontext() { - const UNINIT: ::std::mem::MaybeUninit<__darwin_ucontext> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__darwin_ucontext>(), - 56usize, - concat!("Size of: ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_ucontext>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_onstack) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_onstack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_mcsize) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcontext) - ) - ); -} -pub type ucontext_t = __darwin_ucontext; -pub type sigset_t = __darwin_sigset_t; -pub type uid_t = __darwin_uid_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigval { - pub sival_int: ::std::os::raw::c_int, - pub sival_ptr: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_sigval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigevent { - pub sigev_notify: ::std::os::raw::c_int, - pub sigev_signo: ::std::os::raw::c_int, - pub sigev_value: sigval, - pub sigev_notify_function: ::std::option::Option, - pub sigev_notify_attributes: *mut pthread_attr_t, -} -#[test] -fn bindgen_test_layout_sigevent() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify_function) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_function) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify_attributes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_attributes) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __siginfo { - pub si_signo: ::std::os::raw::c_int, - pub si_errno: ::std::os::raw::c_int, - pub si_code: ::std::os::raw::c_int, - pub si_pid: pid_t, - pub si_uid: uid_t, - pub si_status: ::std::os::raw::c_int, - pub si_addr: *mut ::std::os::raw::c_void, - pub si_value: sigval, - pub si_band: ::std::os::raw::c_long, - pub __pad: [::std::os::raw::c_ulong; 7usize], -} -#[test] -fn bindgen_test_layout___siginfo() { - const UNINIT: ::std::mem::MaybeUninit<__siginfo> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__siginfo>(), - 104usize, - concat!("Size of: ", stringify!(__siginfo)) - ); - assert_eq!( - ::std::mem::align_of::<__siginfo>(), - 8usize, - concat!("Alignment of ", stringify!(__siginfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_pid) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_uid) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_uid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_status) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_addr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_addr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_value) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_value) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).si_band) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_band) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(__pad) - ) - ); -} -pub type siginfo_t = __siginfo; -#[repr(C)] -#[derive(Copy, Clone)] -pub union __sigaction_u { - pub __sa_handler: ::std::option::Option, - pub __sa_sigaction: ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: *mut __siginfo, - arg3: *mut ::std::os::raw::c_void, - ), - >, -} -#[test] -fn bindgen_test_layout___sigaction_u() { - const UNINIT: ::std::mem::MaybeUninit<__sigaction_u> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sigaction_u>(), - 8usize, - concat!("Size of: ", stringify!(__sigaction_u)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction_u>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction_u)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sa_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sa_sigaction) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_sigaction) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __sigaction { - pub __sigaction_u: __sigaction_u, - pub sa_tramp: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut siginfo_t, - arg5: *mut ::std::os::raw::c_void, - ), - >, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___sigaction() { - const UNINIT: ::std::mem::MaybeUninit<__sigaction> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sigaction>(), - 24usize, - concat!("Size of: ", stringify!(__sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sigaction_u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_tramp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_tramp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_flags) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigaction { - pub __sigaction_u: __sigaction_u, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigaction() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__sigaction_u) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); -} -pub type sig_t = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigvec { - pub sv_handler: ::std::option::Option, - pub sv_mask: ::std::os::raw::c_int, - pub sv_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigvec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigvec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigvec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sv_handler) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_handler) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sv_mask) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sv_flags) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigstack { - pub ss_sp: *mut ::std::os::raw::c_char, - pub ss_onstack: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigstack() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigstack)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ss_onstack) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_onstack) - ) - ); -} -extern "C" { - pub fn signal( - arg1: ::std::os::raw::c_int, - arg2: ::std::option::Option, - ) -> ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: ::std::option::Option, - ), - >; -} -pub type int_least8_t = i8; -pub type int_least16_t = i16; -pub type int_least32_t = i32; -pub type int_least64_t = i64; -pub type uint_least8_t = u8; -pub type uint_least16_t = u16; -pub type uint_least32_t = u32; -pub type uint_least64_t = u64; -pub type int_fast8_t = i8; -pub type int_fast16_t = i16; -pub type int_fast32_t = i32; -pub type int_fast64_t = i64; -pub type uint_fast8_t = u8; -pub type uint_fast16_t = u16; -pub type uint_fast32_t = u32; -pub type uint_fast64_t = u64; -pub type intmax_t = ::std::os::raw::c_long; -pub type uintmax_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __darwin_time_t, - pub tv_usec: __darwin_suseconds_t, -} -#[test] -fn bindgen_test_layout_timeval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} -pub type rlim_t = __uint64_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage { - pub ru_utime: timeval, - pub ru_stime: timeval, - pub ru_maxrss: ::std::os::raw::c_long, - pub ru_ixrss: ::std::os::raw::c_long, - pub ru_idrss: ::std::os::raw::c_long, - pub ru_isrss: ::std::os::raw::c_long, - pub ru_minflt: ::std::os::raw::c_long, - pub ru_majflt: ::std::os::raw::c_long, - pub ru_nswap: ::std::os::raw::c_long, - pub ru_inblock: ::std::os::raw::c_long, - pub ru_oublock: ::std::os::raw::c_long, - pub ru_msgsnd: ::std::os::raw::c_long, - pub ru_msgrcv: ::std::os::raw::c_long, - pub ru_nsignals: ::std::os::raw::c_long, - pub ru_nvcsw: ::std::os::raw::c_long, - pub ru_nivcsw: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_rusage() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_utime) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_utime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_stime) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_stime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_maxrss) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_maxrss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_ixrss) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_ixrss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_idrss) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_idrss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_isrss) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_isrss) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_minflt) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_minflt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_majflt) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_majflt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_nswap) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nswap) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_inblock) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_inblock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_oublock) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_oublock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_msgsnd) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgsnd) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_msgrcv) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgrcv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_nsignals) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nsignals) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_nvcsw) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nvcsw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ru_nivcsw) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nivcsw) - ) - ); -} -pub type rusage_info_t = *mut ::std::os::raw::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v0 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(rusage_info_v0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v1 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v1() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage_info_v1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v2 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v2() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(rusage_info_v2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v3 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v3() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 232usize, - concat!("Size of: ", stringify!(rusage_info_v3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v3)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_serviced_system_time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v4 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, - pub ri_logical_writes: u64, - pub ri_lifetime_max_phys_footprint: u64, - pub ri_instructions: u64, - pub ri_cycles: u64, - pub ri_billed_energy: u64, - pub ri_serviced_energy: u64, - pub ri_interval_max_phys_footprint: u64, - pub ri_runnable_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v4() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 296usize, - concat!("Size of: ", stringify!(rusage_info_v4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v4)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_runnable_time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v5 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, - pub ri_logical_writes: u64, - pub ri_lifetime_max_phys_footprint: u64, - pub ri_instructions: u64, - pub ri_cycles: u64, - pub ri_billed_energy: u64, - pub ri_serviced_energy: u64, - pub ri_interval_max_phys_footprint: u64, - pub ri_runnable_time: u64, - pub ri_flags: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v5() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 304usize, - concat!("Size of: ", stringify!(rusage_info_v5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v5)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_runnable_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_flags) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v6 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, - pub ri_logical_writes: u64, - pub ri_lifetime_max_phys_footprint: u64, - pub ri_instructions: u64, - pub ri_cycles: u64, - pub ri_billed_energy: u64, - pub ri_serviced_energy: u64, - pub ri_interval_max_phys_footprint: u64, - pub ri_runnable_time: u64, - pub ri_flags: u64, - pub ri_user_ptime: u64, - pub ri_system_ptime: u64, - pub ri_pinstructions: u64, - pub ri_pcycles: u64, - pub ri_energy_nj: u64, - pub ri_penergy_nj: u64, - pub ri_secure_time_in_system: u64, - pub ri_secure_ptime_in_system: u64, - pub ri_reserved: [u64; 12usize], -} -#[test] -fn bindgen_test_layout_rusage_info_v6() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 464usize, - concat!("Size of: ", stringify!(rusage_info_v6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v6)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_runnable_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_flags) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_user_ptime) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_user_ptime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_system_ptime) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_system_ptime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pinstructions) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_pinstructions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_pcycles) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_pcycles) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_energy_nj) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_energy_nj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_penergy_nj) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_penergy_nj) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_secure_time_in_system) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_secure_time_in_system) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_secure_ptime_in_system) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_secure_ptime_in_system) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ri_reserved) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v6), - "::", - stringify!(ri_reserved) - ) - ); -} -pub type rusage_info_current = rusage_info_v6; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rlimit { - pub rlim_cur: rlim_t, - pub rlim_max: rlim_t, -} -#[test] -fn bindgen_test_layout_rlimit() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(rlimit)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rlimit)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rlim_cur) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_cur) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rlim_max) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_max) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct proc_rlimit_control_wakeupmon { - pub wm_flags: u32, - pub wm_rate: i32, -} -#[test] -fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wm_flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wm_rate) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_rate) - ) - ); -} -extern "C" { - pub fn getpriority(arg1: ::std::os::raw::c_int, arg2: id_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getiopolicy_np( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrlimit(arg1: ::std::os::raw::c_int, arg2: *mut rlimit) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrusage(arg1: ::std::os::raw::c_int, arg2: *mut rusage) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setpriority( - arg1: ::std::os::raw::c_int, - arg2: id_t, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setiopolicy_np( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setrlimit(arg1: ::std::os::raw::c_int, arg2: *const rlimit) -> ::std::os::raw::c_int; -} -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _OSUnalignedU16 { - pub __val: u16, -} -#[test] -fn bindgen_test_layout__OSUnalignedU16() { - const UNINIT: ::std::mem::MaybeUninit<_OSUnalignedU16> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_OSUnalignedU16>(), - 2usize, - concat!("Size of: ", stringify!(_OSUnalignedU16)) - ); - assert_eq!( - ::std::mem::align_of::<_OSUnalignedU16>(), - 1usize, - concat!("Alignment of ", stringify!(_OSUnalignedU16)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSUnalignedU16), - "::", - stringify!(__val) - ) - ); -} -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _OSUnalignedU32 { - pub __val: u32, -} -#[test] -fn bindgen_test_layout__OSUnalignedU32() { - const UNINIT: ::std::mem::MaybeUninit<_OSUnalignedU32> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_OSUnalignedU32>(), - 4usize, - concat!("Size of: ", stringify!(_OSUnalignedU32)) - ); - assert_eq!( - ::std::mem::align_of::<_OSUnalignedU32>(), - 1usize, - concat!("Alignment of ", stringify!(_OSUnalignedU32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSUnalignedU32), - "::", - stringify!(__val) - ) - ); -} -#[repr(C, packed)] -#[derive(Debug, Copy, Clone)] -pub struct _OSUnalignedU64 { - pub __val: u64, -} -#[test] -fn bindgen_test_layout__OSUnalignedU64() { - const UNINIT: ::std::mem::MaybeUninit<_OSUnalignedU64> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_OSUnalignedU64>(), - 8usize, - concat!("Size of: ", stringify!(_OSUnalignedU64)) - ); - assert_eq!( - ::std::mem::align_of::<_OSUnalignedU64>(), - 1usize, - concat!("Alignment of ", stringify!(_OSUnalignedU64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_OSUnalignedU64), - "::", - stringify!(__val) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union wait { - pub w_status: ::std::os::raw::c_int, - pub w_T: wait__bindgen_ty_1, - pub w_S: wait__bindgen_ty_2, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_1)) - ); -} -impl wait__bindgen_ty_1 { - #[inline] - pub fn w_Termsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set_w_Termsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn w_Coredump(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_w_Coredump(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn w_Retcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Retcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Filler(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Termsig: ::std::os::raw::c_uint, - w_Coredump: ::std::os::raw::c_uint, - w_Retcode: ::std::os::raw::c_uint, - w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let w_Termsig: u32 = unsafe { ::std::mem::transmute(w_Termsig) }; - w_Termsig as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let w_Coredump: u32 = unsafe { ::std::mem::transmute(w_Coredump) }; - w_Coredump as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Retcode: u32 = unsafe { ::std::mem::transmute(w_Retcode) }; - w_Retcode as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) }; - w_Filler as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_2 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_2)) - ); -} -impl wait__bindgen_ty_2 { - #[inline] - pub fn w_Stopval(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Stopval(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Stopsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Stopsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Filler(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Stopval: ::std::os::raw::c_uint, - w_Stopsig: ::std::os::raw::c_uint, - w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let w_Stopval: u32 = unsafe { ::std::mem::transmute(w_Stopval) }; - w_Stopval as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Stopsig: u32 = unsafe { ::std::mem::transmute(w_Stopsig) }; - w_Stopsig as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) }; - w_Filler as u64 - }); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout_wait() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w_status) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(w_status) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w_T) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w_S) as usize - ptr as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S)) - ); -} -extern "C" { - pub fn wait(arg1: *mut ::std::os::raw::c_int) -> pid_t; -} -extern "C" { - pub fn waitpid( - arg1: pid_t, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> pid_t; -} -extern "C" { - pub fn waitid( - arg1: idtype_t, - arg2: id_t, - arg3: *mut siginfo_t, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait3( - arg1: *mut ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut rusage, - ) -> pid_t; -} -extern "C" { - pub fn wait4( - arg1: pid_t, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut rusage, - ) -> pid_t; -} -extern "C" { - pub fn alloca(arg1: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -pub type ct_rune_t = __darwin_ct_rune_t; -pub type rune_t = __darwin_rune_t; -pub type wchar_t = __darwin_wchar_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct div_t { - pub quot: ::std::os::raw::c_int, - pub rem: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_div_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ldiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_ldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lldiv_t { - pub quot: ::std::os::raw::c_longlong, - pub rem: ::std::os::raw::c_longlong, -} -#[test] -fn bindgen_test_layout_lldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { - pub static mut __mb_cur_max: ::std::os::raw::c_int; -} -pub type malloc_type_id_t = ::std::os::raw::c_ulonglong; -extern "C" { - pub fn malloc_type_malloc( - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_calloc( - count: usize, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_free(ptr: *mut ::std::os::raw::c_void, type_id: malloc_type_id_t); -} -extern "C" { - pub fn malloc_type_realloc( - ptr: *mut ::std::os::raw::c_void, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_valloc( - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_aligned_alloc( - alignment: usize, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_posix_memalign( - memptr: *mut *mut ::std::os::raw::c_void, - alignment: usize, - size: usize, - type_id: malloc_type_id_t, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _malloc_zone_t { - _unused: [u8; 0], -} -pub type malloc_zone_t = _malloc_zone_t; -extern "C" { - pub fn malloc_type_zone_malloc( - zone: *mut malloc_zone_t, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_zone_calloc( - zone: *mut malloc_zone_t, - count: usize, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_zone_free( - zone: *mut malloc_zone_t, - ptr: *mut ::std::os::raw::c_void, - type_id: malloc_type_id_t, - ); -} -extern "C" { - pub fn malloc_type_zone_realloc( - zone: *mut malloc_zone_t, - ptr: *mut ::std::os::raw::c_void, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_zone_valloc( - zone: *mut malloc_zone_t, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc_type_zone_memalign( - zone: *mut malloc_zone_t, - alignment: usize, - size: usize, - type_id: malloc_type_id_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn calloc( - __count: ::std::os::raw::c_ulong, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn free(arg1: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn realloc( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn reallocf( - __ptr: *mut ::std::os::raw::c_void, - __size: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn valloc(arg1: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn aligned_alloc( - __alignment: ::std::os::raw::c_ulong, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn posix_memalign( - __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: usize, - __size: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn abort() -> !; -} -extern "C" { - pub fn abs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atexit(arg1: ::std::option::Option) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atof(arg1: *const ::std::os::raw::c_char) -> f64; -} -extern "C" { - pub fn atoi(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atol(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn atoll(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn bsearch( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn div(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> div_t; -} -extern "C" { - pub fn exit(arg1: ::std::os::raw::c_int) -> !; -} -extern "C" { - pub fn getenv(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn labs(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn ldiv(arg1: ::std::os::raw::c_long, arg2: ::std::os::raw::c_long) -> ldiv_t; -} -extern "C" { - pub fn llabs(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn lldiv(arg1: ::std::os::raw::c_longlong, arg2: ::std::os::raw::c_longlong) -> lldiv_t; -} -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbstowcs(arg1: *mut wchar_t, arg2: *const ::std::os::raw::c_char, arg3: usize) -> usize; -} -extern "C" { - pub fn mbtowc( - arg1: *mut wchar_t, - arg2: *const ::std::os::raw::c_char, - arg3: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qsort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn rand() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand(arg1: ::std::os::raw::c_uint); -} -extern "C" { - pub fn strtod( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f64; -} -extern "C" { - pub fn strtof( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f32; -} -extern "C" { - pub fn strtol( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn strtold( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f64; -} -extern "C" { - pub fn strtoll( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtoul( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtoull( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn system(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcstombs(arg1: *mut ::std::os::raw::c_char, arg2: *const wchar_t, arg3: usize) -> usize; -} -extern "C" { - pub fn wctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _Exit(arg1: ::std::os::raw::c_int) -> !; -} -extern "C" { - pub fn a64l(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn drand48() -> f64; -} -extern "C" { - pub fn ecvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn erand48(arg1: *mut ::std::os::raw::c_ushort) -> f64; -} -extern "C" { - pub fn fcvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gcvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getsubopt( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const *mut ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn grantpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initstate( - arg1: ::std::os::raw::c_uint, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn jrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn l64a(arg1: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn lcong48(arg1: *mut ::std::os::raw::c_ushort); -} -extern "C" { - pub fn lrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn mktemp(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mkstemp(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn nrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn posix_openpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ptsname(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ptsname_r( - fildes: ::std::os::raw::c_int, - buffer: *mut ::std::os::raw::c_char, - buflen: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putenv(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn random() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn rand_r(arg1: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}_realpath$DARWIN_EXTSN"] - pub fn realpath( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn seed48(arg1: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; -} -extern "C" { - pub fn setenv( - __name: *const ::std::os::raw::c_char, - __value: *const ::std::os::raw::c_char, - __overwrite: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setkey(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn setstate(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn srand48(arg1: ::std::os::raw::c_long); -} -extern "C" { - pub fn srandom(arg1: ::std::os::raw::c_uint); -} -extern "C" { - pub fn unlockpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unsetenv(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -pub type dev_t = __darwin_dev_t; -pub type mode_t = __darwin_mode_t; -extern "C" { - pub fn arc4random() -> u32; -} -extern "C" { - pub fn arc4random_addrandom(arg1: *mut ::std::os::raw::c_uchar, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __nbytes: usize); -} -extern "C" { - pub fn arc4random_stir(); -} -extern "C" { - pub fn arc4random_uniform(__upper_bound: u32) -> u32; -} -extern "C" { - pub fn atexit_b(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bsearch_b( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn cgetcap( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn cgetclose() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetent( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetfirst( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetmatch( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetnext( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetnum( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetset(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetstr( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetustr( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn daemon( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn devname(arg1: dev_t, arg2: mode_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn devname_r( - arg1: dev_t, - arg2: mode_t, - buf: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getbsize( - arg1: *mut ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_long, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getloadavg(arg1: *mut f64, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getprogname() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn setprogname(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn heapsort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn heapsort_b( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mergesort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mergesort_b( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn psort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn psort_b( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn psort_r( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - arg1: *mut ::std::os::raw::c_void, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn qsort_b( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn qsort_r( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - arg1: *mut ::std::os::raw::c_void, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn radixsort( - __base: *mut *const ::std::os::raw::c_uchar, - __nel: ::std::os::raw::c_int, - __table: *const ::std::os::raw::c_uchar, - __endbyte: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rpmatch(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sradixsort( - __base: *mut *const ::std::os::raw::c_uchar, - __nel: ::std::os::raw::c_int, - __table: *const ::std::os::raw::c_uchar, - __endbyte: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sranddev(); -} -extern "C" { - pub fn srandomdev(); -} -extern "C" { - pub fn strtonum( - __numstr: *const ::std::os::raw::c_char, - __minval: ::std::os::raw::c_longlong, - __maxval: ::std::os::raw::c_longlong, - __errstrp: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtoq( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtouq( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub static mut suboptarg: *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn memchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memcpy( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memmove( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __len: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset( - __b: *mut ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __len: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strcat( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcoll( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcspn( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strncat( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strpbrk( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strrchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strspn( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strstr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok( - __str: *mut ::std::os::raw::c_char, - __sep: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strxfrm( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtok_r( - __str: *mut ::std::os::raw::c_char, - __sep: *const ::std::os::raw::c_char, - __lasts: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strerror_r( - __errnum: ::std::os::raw::c_int, - __strerrbuf: *mut ::std::os::raw::c_char, - __buflen: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strdup(__s1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn memccpy( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn stpcpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stpncpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strndup( - __s1: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strnlen(__s1: *const ::std::os::raw::c_char, __n: usize) -> usize; -} -extern "C" { - pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -pub type rsize_t = __darwin_size_t; -pub type errno_t = ::std::os::raw::c_int; -extern "C" { - pub fn memset_s( - __s: *mut ::std::os::raw::c_void, - __smax: rsize_t, - __c: ::std::os::raw::c_int, - __n: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn memmem( - __big: *const ::std::os::raw::c_void, - __big_len: usize, - __little: *const ::std::os::raw::c_void, - __little_len: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset_pattern4( - __b: *mut ::std::os::raw::c_void, - __pattern4: *const ::std::os::raw::c_void, - __len: usize, - ); -} -extern "C" { - pub fn memset_pattern8( - __b: *mut ::std::os::raw::c_void, - __pattern8: *const ::std::os::raw::c_void, - __len: usize, - ); -} -extern "C" { - pub fn memset_pattern16( - __b: *mut ::std::os::raw::c_void, - __pattern16: *const ::std::os::raw::c_void, - __len: usize, - ); -} -extern "C" { - pub fn strcasestr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strnstr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - __len: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlcat( - __dst: *mut ::std::os::raw::c_char, - __source: *const ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strlcpy( - __dst: *mut ::std::os::raw::c_char, - __source: *const ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strmode(__mode: ::std::os::raw::c_int, __bp: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn strsep( - __stringp: *mut *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn swab( - arg1: *const ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: isize, - ); -} -extern "C" { - pub fn timingsafe_bcmp( - __b1: *const ::std::os::raw::c_void, - __b2: *const ::std::os::raw::c_void, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strsignal_r( - __sig: ::std::os::raw::c_int, - __strsignalbuf: *mut ::std::os::raw::c_char, - __buflen: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcmp( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcopy( - arg1: *const ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: usize, - ); -} -extern "C" { - pub fn bzero(arg1: *mut ::std::os::raw::c_void, arg2: ::std::os::raw::c_ulong); -} -extern "C" { - pub fn index( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn rindex( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ffs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fls(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; -} -#[doc = "A struct defining the objective values for an individual"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct point { - #[doc = "The list of objective values"] - pub objectives: *mut f64, -} -#[test] -fn bindgen_test_layout_point() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(point)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(point)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).objectives) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(point), - "::", - stringify!(objectives) - ) - ); -} -#[doc = "A struct defining the front with the objective valued."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct front { - #[doc = "The number of points or individuals in the front"] - pub number_of_individuals: ::std::os::raw::c_int, - #[doc = "The number of objectives"] - pub number_of_objectives: ::std::os::raw::c_int, - #[doc = "The points"] - pub points: *mut point, -} -#[test] -fn bindgen_test_layout_front() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(front)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(front)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).number_of_individuals) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(front), - "::", - stringify!(number_of_individuals) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).number_of_objectives) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(front), - "::", - stringify!(number_of_objectives) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).points) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(front), - "::", - stringify!(points) - ) - ); -} -#[doc = "A struct containing the front sets."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct front_set { - #[doc = "The vector of fronts."] - pub sets: *mut front, - #[doc = "The current recursion depth of `fs`."] - pub fr: ::std::os::raw::c_int, - #[doc = " The maximum recursion depth of `fs` allocated so far (for `opt.value()` == `0`)."] - pub fr_max: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_front_set() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(front_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(front_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sets) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(front_set), - "::", - stringify!(sets) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(front_set), - "::", - stringify!(fr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fr_max) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(front_set), - "::", - stringify!(fr_max) - ) - ); -} -extern "C" { - pub fn hv_2d(arg1: front, arg2: point) -> f64; -} -extern "C" { - pub fn hv(arg1: *mut front_set, arg2: front, arg3: point, arg4: ::std::os::raw::c_int) -> f64; -} -extern "C" { - #[doc = "Calculate the hyper-volume with the WFG algorithm"] - pub fn calculate_hypervolume(arg1: front, arg2: point) -> f64; -} -pub type __builtin_va_list = *mut ::std::os::raw::c_char; -pub type __uint128_t = u128; diff --git a/hv-wfg-sys/src/lib.rs b/hv-wfg-sys/src/lib.rs index 0db9665..bb017ce 100644 --- a/hv-wfg-sys/src/lib.rs +++ b/hv-wfg-sys/src/lib.rs @@ -5,7 +5,7 @@ use std::ffi::c_int; -include!("bindings.rs"); +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); /// Calculate the hyper-volume using the algorithm proposed by [While et al. (2012)](http://dx.doi.org/10.1109/TEVC.2010.2077298) /// for a problem with `d` objectives and `n` individuals. This function assumes that the objectives diff --git a/optirustic-macros/Cargo.toml b/optirustic-macros/Cargo.toml index bb624cf..25c91f0 100644 --- a/optirustic-macros/Cargo.toml +++ b/optirustic-macros/Cargo.toml @@ -2,11 +2,16 @@ name = "optirustic-macros" version = "0.1.0" edition = "2021" +repository = "https://github.com/s-simoncelli/optirustic" +authors = ["Stefano Simoncelli <16114781+s-simoncelli@users.noreply.github.com>"] +description = "A set of macros for the optirustic crate" +homepage = "https://github.com/s-simoncelli/optirustic" +license = "GPL-3.0-only" [lib] proc-macro = true [dependencies] -syn = { version = "*", features = ["full"] } -quote = "*" -proc-macro2 = "*" \ No newline at end of file +syn = { version = "2.0.72", features = ["full"] } +quote = "1.0.36" +proc-macro2 = "1.0.86" \ No newline at end of file diff --git a/optirustic/Cargo.lock b/optirustic/Cargo.lock deleted file mode 100644 index a4a44b6..0000000 --- a/optirustic/Cargo.lock +++ /dev/null @@ -1,832 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - -[[package]] -name = "anstyle-parse" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -dependencies = [ - "anstyle", - "windows-sys", -] - -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - -[[package]] -name = "bindgen" -version = "0.69.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "cc" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "colorchoice" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "either" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" - -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "float-cmp" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] - -[[package]] -name = "getrandom" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hv-3d" -version = "0.1.0" -dependencies = [ - "bindgen", - "cc", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.154" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" - -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if", - "windows-targets", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "optirustic" -version = "0.1.0" -dependencies = [ - "chrono", - "env_logger", - "float-cmp", - "hv-3d", - "log", - "ordered-float", - "rand", - "rand_chacha", - "rayon", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ordered-float" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "prettyplease" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "serde" -version = "1.0.200" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.200" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.116" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "syn" -version = "2.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" diff --git a/optirustic/Cargo.toml b/optirustic/Cargo.toml deleted file mode 100644 index 1ad428a..0000000 --- a/optirustic/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -[package] -name = "optirustic" -version = "0.1.0" -authors = ["Stefano Simoncelli <16114781+s-simoncelli@users.noreply.github.com>"] -edition = "2021" -rust-version = "1.80" -description = "A multi-objective optimisation framework in Rust" -repository = "https://github.com/s-simoncelli/optirustic" -#license = "MIT OR Apache-2.0" -keywords = ["genetic-algorithm", "optimisation", "multiobjective", "nsga2", "nsga3"] -categories = ["science", "algorithms"] -readme = "../README.md" - -[dependencies] -log = "0.4.21" -serde_json = "1.0" -serde = { version = "1.0.200", features = ["derive"] } -rand = "0.8.5" -rand_chacha = "0.3.1" -thiserror = "1.0.60" -rayon = "1.10.0" -env_logger = "0.11.3" -chrono = { version = "0.4.38", features = ["serde"] } -ordered-float = "4.2.0" -optirustic-macros = { path = "../optirustic-macros" } -hv-fonseca-et-al-2006-sys = { path = "../hv-fonseca-et-al-2006-sys" } -hv-wfg-sys = { path = "../hv-wfg-sys" } -plotters = { version = "0.3.6", optional = true } -nalgebra = "0.33.0" - -[dev-dependencies] -float-cmp = "0.9.0" - -[features] -default = ["plot"] -plot = ["dep:plotters"] \ No newline at end of file diff --git a/optirustic/src/.DS_Store b/src/.DS_Store similarity index 100% rename from optirustic/src/.DS_Store rename to src/.DS_Store diff --git a/optirustic/src/algorithms/.DS_Store b/src/algorithms/.DS_Store similarity index 100% rename from optirustic/src/algorithms/.DS_Store rename to src/algorithms/.DS_Store diff --git a/optirustic/src/algorithms/algorithm.rs b/src/algorithms/algorithm.rs similarity index 100% rename from optirustic/src/algorithms/algorithm.rs rename to src/algorithms/algorithm.rs diff --git a/optirustic/src/algorithms/mod.rs b/src/algorithms/mod.rs similarity index 100% rename from optirustic/src/algorithms/mod.rs rename to src/algorithms/mod.rs diff --git a/optirustic/src/algorithms/nsga2.rs b/src/algorithms/nsga2.rs similarity index 100% rename from optirustic/src/algorithms/nsga2.rs rename to src/algorithms/nsga2.rs diff --git a/optirustic/src/algorithms/nsga3/associate.rs b/src/algorithms/nsga3/associate.rs similarity index 100% rename from optirustic/src/algorithms/nsga3/associate.rs rename to src/algorithms/nsga3/associate.rs diff --git a/optirustic/src/algorithms/nsga3/mod.rs b/src/algorithms/nsga3/mod.rs similarity index 100% rename from optirustic/src/algorithms/nsga3/mod.rs rename to src/algorithms/nsga3/mod.rs diff --git a/optirustic/src/algorithms/nsga3/niching.rs b/src/algorithms/nsga3/niching.rs similarity index 100% rename from optirustic/src/algorithms/nsga3/niching.rs rename to src/algorithms/nsga3/niching.rs diff --git a/optirustic/src/algorithms/nsga3/normalise.rs b/src/algorithms/nsga3/normalise.rs similarity index 100% rename from optirustic/src/algorithms/nsga3/normalise.rs rename to src/algorithms/nsga3/normalise.rs diff --git a/optirustic/src/algorithms/nsga3/test_data/Associate_individuals.csv b/src/algorithms/nsga3/test_data/Associate_individuals.csv similarity index 100% rename from optirustic/src/algorithms/nsga3/test_data/Associate_individuals.csv rename to src/algorithms/nsga3/test_data/Associate_individuals.csv diff --git a/optirustic/src/algorithms/nsga3/test_data/Associate_ref_points.csv b/src/algorithms/nsga3/test_data/Associate_ref_points.csv similarity index 100% rename from optirustic/src/algorithms/nsga3/test_data/Associate_ref_points.csv rename to src/algorithms/nsga3/test_data/Associate_ref_points.csv diff --git a/optirustic/src/algorithms/nsga3/test_data/Normalise_normalised_objectives.csv b/src/algorithms/nsga3/test_data/Normalise_normalised_objectives.csv similarity index 100% rename from optirustic/src/algorithms/nsga3/test_data/Normalise_normalised_objectives.csv rename to src/algorithms/nsga3/test_data/Normalise_normalised_objectives.csv diff --git a/optirustic/src/algorithms/nsga3/test_data/Normalise_objectives.csv b/src/algorithms/nsga3/test_data/Normalise_objectives.csv similarity index 100% rename from optirustic/src/algorithms/nsga3/test_data/Normalise_objectives.csv rename to src/algorithms/nsga3/test_data/Normalise_objectives.csv diff --git a/optirustic/src/algorithms/stopping_condition.rs b/src/algorithms/stopping_condition.rs similarity index 100% rename from optirustic/src/algorithms/stopping_condition.rs rename to src/algorithms/stopping_condition.rs diff --git a/optirustic/src/core/constraint.rs b/src/core/constraint.rs similarity index 100% rename from optirustic/src/core/constraint.rs rename to src/core/constraint.rs diff --git a/optirustic/src/core/data.rs b/src/core/data.rs similarity index 100% rename from optirustic/src/core/data.rs rename to src/core/data.rs diff --git a/optirustic/src/core/error.rs b/src/core/error.rs similarity index 100% rename from optirustic/src/core/error.rs rename to src/core/error.rs diff --git a/optirustic/src/core/individual.rs b/src/core/individual.rs similarity index 100% rename from optirustic/src/core/individual.rs rename to src/core/individual.rs diff --git a/optirustic/src/core/mod.rs b/src/core/mod.rs similarity index 100% rename from optirustic/src/core/mod.rs rename to src/core/mod.rs diff --git a/optirustic/src/core/objective.rs b/src/core/objective.rs similarity index 100% rename from optirustic/src/core/objective.rs rename to src/core/objective.rs diff --git a/optirustic/src/core/problem.rs b/src/core/problem.rs similarity index 100% rename from optirustic/src/core/problem.rs rename to src/core/problem.rs diff --git a/optirustic/src/core/test_data/DTLZ1_objectives.csv b/src/core/test_data/DTLZ1_objectives.csv similarity index 100% rename from optirustic/src/core/test_data/DTLZ1_objectives.csv rename to src/core/test_data/DTLZ1_objectives.csv diff --git a/optirustic/src/core/test_data/DTLZ1_variables.csv b/src/core/test_data/DTLZ1_variables.csv similarity index 100% rename from optirustic/src/core/test_data/DTLZ1_variables.csv rename to src/core/test_data/DTLZ1_variables.csv diff --git a/optirustic/src/core/test_utils.rs b/src/core/test_utils.rs similarity index 100% rename from optirustic/src/core/test_utils.rs rename to src/core/test_utils.rs diff --git a/optirustic/src/core/utils.rs b/src/core/utils.rs similarity index 100% rename from optirustic/src/core/utils.rs rename to src/core/utils.rs diff --git a/optirustic/src/core/variable.rs b/src/core/variable.rs similarity index 100% rename from optirustic/src/core/variable.rs rename to src/core/variable.rs diff --git a/optirustic/src/katex-header.html b/src/katex-header.html similarity index 100% rename from optirustic/src/katex-header.html rename to src/katex-header.html diff --git a/optirustic/src/lib.rs b/src/lib.rs similarity index 100% rename from optirustic/src/lib.rs rename to src/lib.rs diff --git a/optirustic/src/metrics/distance.rs b/src/metrics/distance.rs similarity index 100% rename from optirustic/src/metrics/distance.rs rename to src/metrics/distance.rs diff --git a/optirustic/src/metrics/hypervolume.rs b/src/metrics/hypervolume.rs similarity index 100% rename from optirustic/src/metrics/hypervolume.rs rename to src/metrics/hypervolume.rs diff --git a/optirustic/src/metrics/hypervolume_2d.rs b/src/metrics/hypervolume_2d.rs similarity index 100% rename from optirustic/src/metrics/hypervolume_2d.rs rename to src/metrics/hypervolume_2d.rs diff --git a/optirustic/src/metrics/hypervolume_fonseca_2006.rs b/src/metrics/hypervolume_fonseca_2006.rs similarity index 100% rename from optirustic/src/metrics/hypervolume_fonseca_2006.rs rename to src/metrics/hypervolume_fonseca_2006.rs diff --git a/optirustic/src/metrics/hypervolume_while_2012.rs b/src/metrics/hypervolume_while_2012.rs similarity index 100% rename from optirustic/src/metrics/hypervolume_while_2012.rs rename to src/metrics/hypervolume_while_2012.rs diff --git a/optirustic/src/metrics/mod.rs b/src/metrics/mod.rs similarity index 100% rename from optirustic/src/metrics/mod.rs rename to src/metrics/mod.rs diff --git a/optirustic/src/metrics/test_data/c_max_t100_d2_n128 b/src/metrics/test_data/c_max_t100_d2_n128 similarity index 100% rename from optirustic/src/metrics/test_data/c_max_t100_d2_n128 rename to src/metrics/test_data/c_max_t100_d2_n128 diff --git a/optirustic/src/metrics/test_data/c_max_t100_d3_n128 b/src/metrics/test_data/c_max_t100_d3_n128 similarity index 100% rename from optirustic/src/metrics/test_data/c_max_t100_d3_n128 rename to src/metrics/test_data/c_max_t100_d3_n128 diff --git a/optirustic/src/metrics/test_data/c_max_t1_d3_n2048 b/src/metrics/test_data/c_max_t1_d3_n2048 similarity index 100% rename from optirustic/src/metrics/test_data/c_max_t1_d3_n2048 rename to src/metrics/test_data/c_max_t1_d3_n2048 diff --git a/optirustic/src/metrics/test_data/c_max_t1_d5_n1024 b/src/metrics/test_data/c_max_t1_d5_n1024 similarity index 100% rename from optirustic/src/metrics/test_data/c_max_t1_d5_n1024 rename to src/metrics/test_data/c_max_t1_d5_n1024 diff --git a/optirustic/src/operators/comparison.rs b/src/operators/comparison.rs similarity index 100% rename from optirustic/src/operators/comparison.rs rename to src/operators/comparison.rs diff --git a/optirustic/src/operators/crossover.rs b/src/operators/crossover.rs similarity index 100% rename from optirustic/src/operators/crossover.rs rename to src/operators/crossover.rs diff --git a/optirustic/src/operators/mod.rs b/src/operators/mod.rs similarity index 100% rename from optirustic/src/operators/mod.rs rename to src/operators/mod.rs diff --git a/optirustic/src/operators/mutation.rs b/src/operators/mutation.rs similarity index 100% rename from optirustic/src/operators/mutation.rs rename to src/operators/mutation.rs diff --git a/optirustic/src/operators/selector.rs b/src/operators/selector.rs similarity index 100% rename from optirustic/src/operators/selector.rs rename to src/operators/selector.rs diff --git a/optirustic/src/utils/algebra.rs b/src/utils/algebra.rs similarity index 100% rename from optirustic/src/utils/algebra.rs rename to src/utils/algebra.rs diff --git a/optirustic/src/utils/fast_non_dominated_sort.rs b/src/utils/fast_non_dominated_sort.rs similarity index 100% rename from optirustic/src/utils/fast_non_dominated_sort.rs rename to src/utils/fast_non_dominated_sort.rs diff --git a/optirustic/src/utils/mod.rs b/src/utils/mod.rs similarity index 100% rename from optirustic/src/utils/mod.rs rename to src/utils/mod.rs diff --git a/optirustic/src/utils/reference_points.rs b/src/utils/reference_points.rs similarity index 100% rename from optirustic/src/utils/reference_points.rs rename to src/utils/reference_points.rs