From e8d0894fc15fa36b8ff832e9027f02e086be91ce Mon Sep 17 00:00:00 2001 From: Jesper Brynolf Date: Mon, 9 Sep 2024 19:14:22 +0200 Subject: [PATCH] Dependency Update Updates all the dependencies of the crate in order to be able to use newer versions of rust and and remove old lints and checks. - Updates Rust edition to 2021 - Updates MSRV to 1.74.0 - Updates crate dependencies. - Updates lock file. - Updates minimum supported tpm2-tss version to 4.0.1. - Updates the Fedora version the CI test image is based on to 37. Co-authored-by: Ionut Mihalcea Co-authored-by: Travis Finkenauer Co-authored-by: William Brown Signed-off-by: Jesper Brynolf --- .clippy.toml | 2 +- .github/workflows/ci.yml | 6 +- Cargo.toml | 2 +- README.md | 4 +- tss-esapi-sys/Cargo.toml | 6 +- tss-esapi-sys/README.md | 2 +- tss-esapi-sys/build.rs | 3 +- tss-esapi-sys/regenerate-bindings.sh | 2 +- .../src/bindings/aarch64-unknown-linux-gnu.rs | 4413 ++++----------- .../src/bindings/arm-unknown-linux-gnueabi.rs | 4102 ++++---------- .../src/bindings/x86_64-unknown-linux-gnu.rs | 4910 ++++++----------- tss-esapi/Cargo.toml | 18 +- .../tpm_commands/attestation_commands.rs | 2 - tss-esapi/src/lib.rs | 8 +- tss-esapi/tests/Cargo.lock.frozen | 508 +- tss-esapi/tests/Dockerfile-fedora | 2 +- tss-esapi/tests/Dockerfile-ubuntu | 18 +- tss-esapi/tests/create_frozen_cargo_lock | 16 + tss-esapi/tests/cross-compile.sh | 2 +- tss-esapi/tests/valgrind.sh | 1 + 20 files changed, 4038 insertions(+), 9989 deletions(-) create mode 100755 tss-esapi/tests/create_frozen_cargo_lock diff --git a/.clippy.toml b/.clippy.toml index e90d7e34..3b9db9df 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1 +1 @@ -msrv = "1.66.0" +msrv = "1.74.0" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f7f281e..1de026f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - name: Build the container run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools - name: Run the container - run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh + run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.74.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh # All in one job as I think it is a big overhead to build and run the Docker # container? tests-ubuntu: @@ -52,7 +52,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build the container - run: docker build -t ubuntucontainer tss-esapi/tests/ --build-arg TPM2_TSS_VERSION=4.0.1 --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools + run: docker build -t ubuntucontainer tss-esapi/tests/ --build-arg TPM2_TSS_VERSION=4.1.3 --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tools - name: Run the container run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/all-ubuntu.sh @@ -118,6 +118,6 @@ jobs: - name: Build the container run: docker build -t ubuntucontainer tss-esapi/tests/ --file tss-esapi/tests/Dockerfile-ubuntu --target tpm2-tss - name: Check Clippy lints MSRV - run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.66.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh + run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi --env RUST_TOOLCHAIN_VERSION=1.74.0 ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh - name: Check Clippy lints latest run: docker run -v $(pwd):/tmp/rust-tss-esapi -w /tmp/rust-tss-esapi/tss-esapi ubuntucontainer /tmp/rust-tss-esapi/tss-esapi/tests/lint-checks.sh diff --git a/Cargo.toml b/Cargo.toml index 7432e3ec..e88eb84a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] -members = ["tss-esapi", "tss-esapi-sys"] resolver = "2" +members = ["tss-esapi", "tss-esapi-sys"] diff --git a/README.md b/README.md index 9f4a3f60..dee736ba 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ At the moment we test (via CI) and support the following Rust compiler versions: * On Ubuntu we test with: - The latest stable compiler version, as accessible through `rustup`. - - The 1.66 compiler version. -* On Fedora we test with the compiler version included with the Fedora 36 release. + - The 1.74.0 compiler version. +* On Fedora we test with the compiler version included with the Fedora 38 release. * On Fedora rawhide we test with the compiler version included. If you need support for other versions of the compiler, get in touch with us to see what we can do! diff --git a/tss-esapi-sys/Cargo.toml b/tss-esapi-sys/Cargo.toml index 0e8615fc..5cba60b4 100644 --- a/tss-esapi-sys/Cargo.toml +++ b/tss-esapi-sys/Cargo.toml @@ -2,7 +2,7 @@ name = "tss-esapi-sys" version = "0.5.0" authors = ["Parsec Project Contributors"] -edition = "2018" +edition = "2021" description = "FFI wrapper around TSS 2.0 Enhanced System API" readme = "README.md" keywords = ["tpm", "tss", "esys", "esapi"] @@ -11,10 +11,10 @@ license = "Apache-2.0" repository = "https://github.com/parallaxsecond/rust-tss-esapi" documentation = "https://docs.rs/crate/tss-esapi-sys" links = "tss2-esys" -rust-version = "1.66.0" +rust-version = "1.74.0" [build-dependencies] -bindgen = { version = "0.66.1", optional = true } +bindgen = { version = "0.70.1", optional = true } pkg-config = "0.3.18" target-lexicon = "0.12.0" cfg-if = "1.0.0" diff --git a/tss-esapi-sys/README.md b/tss-esapi-sys/README.md index 6f87584f..6d347dba 100644 --- a/tss-esapi-sys/README.md +++ b/tss-esapi-sys/README.md @@ -18,7 +18,7 @@ must therefore link to all of them at build time. The paths to the libraries are discovered using `pkg-config` - make sure they are discoverable in this way on your system. Our build script looks for -`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `3.2.2` is +`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `4.0.1` is required for all of them. Having installed the open-source implementation libraries at `/usr/local/lib` (by default), it diff --git a/tss-esapi-sys/build.rs b/tss-esapi-sys/build.rs index d261d567..e2b26232 100644 --- a/tss-esapi-sys/build.rs +++ b/tss-esapi-sys/build.rs @@ -53,7 +53,7 @@ pub mod tpm2_tss { fs::read_dir, path::{Path, PathBuf}, }; - const MINIMUM_VERSION: &str = "3.2.2"; + const MINIMUM_VERSION: &str = "4.0.1"; const PATH_ENV_VAR_NAME: &str = "TPM2_TSS_PATH"; /// The installed tpm2-tss libraries that are of @@ -119,6 +119,7 @@ pub mod tpm2_tss { fn bindgen_builder(&self) -> bindgen::Builder { let mut builder = bindgen::Builder::default() .size_t_is_usize(false) + .rust_target(bindgen::RustTarget::Stable_1_73) // lower or equal to MSRV. .clang_arg(self.tss2_esys.include_dir_arg()) .clang_arg(self.tss2_tctildr.include_dir_arg()) .clang_arg(self.tss2_mu.include_dir_arg()) diff --git a/tss-esapi-sys/regenerate-bindings.sh b/tss-esapi-sys/regenerate-bindings.sh index af5dafba..3979c487 100755 --- a/tss-esapi-sys/regenerate-bindings.sh +++ b/tss-esapi-sys/regenerate-bindings.sh @@ -11,7 +11,7 @@ set -euf -o pipefail OPENSSL_GIT="https://github.com/openssl/openssl.git" OPENSSL_VERSION="OpenSSL_1_1_1j" TPM2_TSS_GIT="https://github.com/tpm2-software/tpm2-tss.git" -TPM2_TSS_VERSION="3.2.2" +TPM2_TSS_VERSION="4.0.1" export SYSROOT="/tmp/sysroot" diff --git a/tss-esapi-sys/src/bindings/aarch64-unknown-linux-gnu.rs b/tss-esapi-sys/src/bindings/aarch64-unknown-linux-gnu.rs index 9300d8d3..09917c9d 100644 --- a/tss-esapi-sys/src/bindings/aarch64-unknown-linux-gnu.rs +++ b/tss-esapi-sys/src/bindings/aarch64-unknown-linux-gnu.rs @@ -1,5 +1,5 @@ -/* automatically generated by rust-bindgen 0.69.4 */ -/* TPM2_TSS_VERSION="3.2.2" */ +/* automatically generated by rust-bindgen 0.70.1 */ +/* TPM2_TSS_VERSION="4.0.1" */ pub const _STDINT_H: u32 = 1; pub const _FEATURES_H: u32 = 1; @@ -18,9 +18,6 @@ pub const __USE_POSIX199506: u32 = 1; pub const __USE_XOPEN2K: u32 = 1; pub const __USE_XOPEN2K8: u32 = 1; pub const _ATFILE_SOURCE: u32 = 1; -pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_TIME64_COMPAT32: u32 = 0; -pub const __TIMESIZE: u32 = 64; pub const __USE_MISC: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; @@ -28,30 +25,30 @@ pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_60559_BFP__: u32 = 201404; pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 35; +pub const __GLIBC_MINOR__: u32 = 31; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; -pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __WORDSIZE: u32 = 32; +pub const __WORDSIZE32_SIZE_ULONG: u32 = 0; +pub const __WORDSIZE32_PTRDIFF_LONG: u32 = 0; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 0; +pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const __GLIBC_USE_LIB_EXT2: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; -pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _BITS_TYPES_H: u32 = 1; +pub const __TIMESIZE: u32 = 32; pub const _BITS_TYPESIZES_H: u32 = 1; -pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; -pub const __INO_T_MATCHES_INO64_T: u32 = 1; -pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; -pub const __STATFS_MATCHES_STATFS64: u32 = 1; +pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 0; +pub const __STATFS_MATCHES_STATFS64: u32 = 0; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const _BITS_WCHAR_H: u32 = 1; @@ -76,22 +73,22 @@ pub const UINT_LEAST8_MAX: u32 = 255; pub const UINT_LEAST16_MAX: u32 = 65535; pub const UINT_LEAST32_MAX: u32 = 4294967295; pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i64 = -9223372036854775808; -pub const INT_FAST32_MIN: i64 = -9223372036854775808; +pub const INT_FAST16_MIN: i32 = -2147483648; +pub const INT_FAST32_MIN: i32 = -2147483648; pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u64 = 9223372036854775807; -pub const INT_FAST32_MAX: u64 = 9223372036854775807; +pub const INT_FAST16_MAX: u32 = 2147483647; +pub const INT_FAST32_MAX: u32 = 2147483647; pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: i32 = -1; -pub const UINT_FAST32_MAX: i32 = -1; -pub const INTPTR_MIN: i64 = -9223372036854775808; -pub const INTPTR_MAX: u64 = 9223372036854775807; -pub const UINTPTR_MAX: i32 = -1; -pub const PTRDIFF_MIN: i64 = -9223372036854775808; -pub const PTRDIFF_MAX: u64 = 9223372036854775807; +pub const UINT_FAST16_MAX: u32 = 4294967295; +pub const UINT_FAST32_MAX: u32 = 4294967295; +pub const INTPTR_MIN: i32 = -2147483648; +pub const INTPTR_MAX: u32 = 2147483647; +pub const UINTPTR_MAX: u32 = 4294967295; +pub const PTRDIFF_MIN: i32 = -2147483648; +pub const PTRDIFF_MAX: u32 = 2147483647; pub const SIG_ATOMIC_MIN: i32 = -2147483648; pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const SIZE_MAX: i32 = -1; +pub const SIZE_MAX: u32 = 4294967295; pub const WINT_MIN: u32 = 0; pub const WINT_MAX: u32 = 4294967295; pub const TSS2_RC_LAYER_SHIFT: u32 = 16; @@ -243,162 +240,128 @@ pub const ESYS_TR_RH_ACT_FIRST: u32 = 288; pub const ESYS_TR_RH_ACT_LAST: u32 = 303; pub const _INTTYPES_H: u32 = 1; pub const ____gwchar_t_defined: u32 = 1; -pub const __PRI64_PREFIX: &[u8; 2] = b"l\0"; -pub const __PRIPTR_PREFIX: &[u8; 2] = b"l\0"; +pub const __PRI64_PREFIX: &[u8; 3] = b"ll\0"; pub const PRId8: &[u8; 2] = b"d\0"; pub const PRId16: &[u8; 2] = b"d\0"; pub const PRId32: &[u8; 2] = b"d\0"; -pub const PRId64: &[u8; 3] = b"ld\0"; +pub const PRId64: &[u8; 4] = b"lld\0"; pub const PRIdLEAST8: &[u8; 2] = b"d\0"; pub const PRIdLEAST16: &[u8; 2] = b"d\0"; pub const PRIdLEAST32: &[u8; 2] = b"d\0"; -pub const PRIdLEAST64: &[u8; 3] = b"ld\0"; +pub const PRIdLEAST64: &[u8; 4] = b"lld\0"; pub const PRIdFAST8: &[u8; 2] = b"d\0"; -pub const PRIdFAST16: &[u8; 3] = b"ld\0"; -pub const PRIdFAST32: &[u8; 3] = b"ld\0"; -pub const PRIdFAST64: &[u8; 3] = b"ld\0"; +pub const PRIdFAST64: &[u8; 4] = b"lld\0"; pub const PRIi8: &[u8; 2] = b"i\0"; pub const PRIi16: &[u8; 2] = b"i\0"; pub const PRIi32: &[u8; 2] = b"i\0"; -pub const PRIi64: &[u8; 3] = b"li\0"; +pub const PRIi64: &[u8; 4] = b"lli\0"; pub const PRIiLEAST8: &[u8; 2] = b"i\0"; pub const PRIiLEAST16: &[u8; 2] = b"i\0"; pub const PRIiLEAST32: &[u8; 2] = b"i\0"; -pub const PRIiLEAST64: &[u8; 3] = b"li\0"; +pub const PRIiLEAST64: &[u8; 4] = b"lli\0"; pub const PRIiFAST8: &[u8; 2] = b"i\0"; -pub const PRIiFAST16: &[u8; 3] = b"li\0"; -pub const PRIiFAST32: &[u8; 3] = b"li\0"; -pub const PRIiFAST64: &[u8; 3] = b"li\0"; +pub const PRIiFAST64: &[u8; 4] = b"lli\0"; pub const PRIo8: &[u8; 2] = b"o\0"; pub const PRIo16: &[u8; 2] = b"o\0"; pub const PRIo32: &[u8; 2] = b"o\0"; -pub const PRIo64: &[u8; 3] = b"lo\0"; +pub const PRIo64: &[u8; 4] = b"llo\0"; pub const PRIoLEAST8: &[u8; 2] = b"o\0"; pub const PRIoLEAST16: &[u8; 2] = b"o\0"; pub const PRIoLEAST32: &[u8; 2] = b"o\0"; -pub const PRIoLEAST64: &[u8; 3] = b"lo\0"; +pub const PRIoLEAST64: &[u8; 4] = b"llo\0"; pub const PRIoFAST8: &[u8; 2] = b"o\0"; -pub const PRIoFAST16: &[u8; 3] = b"lo\0"; -pub const PRIoFAST32: &[u8; 3] = b"lo\0"; -pub const PRIoFAST64: &[u8; 3] = b"lo\0"; +pub const PRIoFAST64: &[u8; 4] = b"llo\0"; pub const PRIu8: &[u8; 2] = b"u\0"; pub const PRIu16: &[u8; 2] = b"u\0"; pub const PRIu32: &[u8; 2] = b"u\0"; -pub const PRIu64: &[u8; 3] = b"lu\0"; +pub const PRIu64: &[u8; 4] = b"llu\0"; pub const PRIuLEAST8: &[u8; 2] = b"u\0"; pub const PRIuLEAST16: &[u8; 2] = b"u\0"; pub const PRIuLEAST32: &[u8; 2] = b"u\0"; -pub const PRIuLEAST64: &[u8; 3] = b"lu\0"; +pub const PRIuLEAST64: &[u8; 4] = b"llu\0"; pub const PRIuFAST8: &[u8; 2] = b"u\0"; -pub const PRIuFAST16: &[u8; 3] = b"lu\0"; -pub const PRIuFAST32: &[u8; 3] = b"lu\0"; -pub const PRIuFAST64: &[u8; 3] = b"lu\0"; +pub const PRIuFAST64: &[u8; 4] = b"llu\0"; pub const PRIx8: &[u8; 2] = b"x\0"; pub const PRIx16: &[u8; 2] = b"x\0"; pub const PRIx32: &[u8; 2] = b"x\0"; -pub const PRIx64: &[u8; 3] = b"lx\0"; +pub const PRIx64: &[u8; 4] = b"llx\0"; pub const PRIxLEAST8: &[u8; 2] = b"x\0"; pub const PRIxLEAST16: &[u8; 2] = b"x\0"; pub const PRIxLEAST32: &[u8; 2] = b"x\0"; -pub const PRIxLEAST64: &[u8; 3] = b"lx\0"; +pub const PRIxLEAST64: &[u8; 4] = b"llx\0"; pub const PRIxFAST8: &[u8; 2] = b"x\0"; -pub const PRIxFAST16: &[u8; 3] = b"lx\0"; -pub const PRIxFAST32: &[u8; 3] = b"lx\0"; -pub const PRIxFAST64: &[u8; 3] = b"lx\0"; +pub const PRIxFAST64: &[u8; 4] = b"llx\0"; pub const PRIX8: &[u8; 2] = b"X\0"; pub const PRIX16: &[u8; 2] = b"X\0"; pub const PRIX32: &[u8; 2] = b"X\0"; -pub const PRIX64: &[u8; 3] = b"lX\0"; +pub const PRIX64: &[u8; 4] = b"llX\0"; pub const PRIXLEAST8: &[u8; 2] = b"X\0"; pub const PRIXLEAST16: &[u8; 2] = b"X\0"; pub const PRIXLEAST32: &[u8; 2] = b"X\0"; -pub const PRIXLEAST64: &[u8; 3] = b"lX\0"; +pub const PRIXLEAST64: &[u8; 4] = b"llX\0"; pub const PRIXFAST8: &[u8; 2] = b"X\0"; -pub const PRIXFAST16: &[u8; 3] = b"lX\0"; -pub const PRIXFAST32: &[u8; 3] = b"lX\0"; -pub const PRIXFAST64: &[u8; 3] = b"lX\0"; -pub const PRIdMAX: &[u8; 3] = b"ld\0"; -pub const PRIiMAX: &[u8; 3] = b"li\0"; -pub const PRIoMAX: &[u8; 3] = b"lo\0"; -pub const PRIuMAX: &[u8; 3] = b"lu\0"; -pub const PRIxMAX: &[u8; 3] = b"lx\0"; -pub const PRIXMAX: &[u8; 3] = b"lX\0"; -pub const PRIdPTR: &[u8; 3] = b"ld\0"; -pub const PRIiPTR: &[u8; 3] = b"li\0"; -pub const PRIoPTR: &[u8; 3] = b"lo\0"; -pub const PRIuPTR: &[u8; 3] = b"lu\0"; -pub const PRIxPTR: &[u8; 3] = b"lx\0"; -pub const PRIXPTR: &[u8; 3] = b"lX\0"; +pub const PRIXFAST64: &[u8; 4] = b"llX\0"; +pub const PRIdMAX: &[u8; 4] = b"lld\0"; +pub const PRIiMAX: &[u8; 4] = b"lli\0"; +pub const PRIoMAX: &[u8; 4] = b"llo\0"; +pub const PRIuMAX: &[u8; 4] = b"llu\0"; +pub const PRIxMAX: &[u8; 4] = b"llx\0"; +pub const PRIXMAX: &[u8; 4] = b"llX\0"; pub const SCNd8: &[u8; 4] = b"hhd\0"; pub const SCNd16: &[u8; 3] = b"hd\0"; pub const SCNd32: &[u8; 2] = b"d\0"; -pub const SCNd64: &[u8; 3] = b"ld\0"; +pub const SCNd64: &[u8; 4] = b"lld\0"; pub const SCNdLEAST8: &[u8; 4] = b"hhd\0"; pub const SCNdLEAST16: &[u8; 3] = b"hd\0"; pub const SCNdLEAST32: &[u8; 2] = b"d\0"; -pub const SCNdLEAST64: &[u8; 3] = b"ld\0"; +pub const SCNdLEAST64: &[u8; 4] = b"lld\0"; pub const SCNdFAST8: &[u8; 4] = b"hhd\0"; -pub const SCNdFAST16: &[u8; 3] = b"ld\0"; -pub const SCNdFAST32: &[u8; 3] = b"ld\0"; -pub const SCNdFAST64: &[u8; 3] = b"ld\0"; +pub const SCNdFAST64: &[u8; 4] = b"lld\0"; pub const SCNi8: &[u8; 4] = b"hhi\0"; pub const SCNi16: &[u8; 3] = b"hi\0"; pub const SCNi32: &[u8; 2] = b"i\0"; -pub const SCNi64: &[u8; 3] = b"li\0"; +pub const SCNi64: &[u8; 4] = b"lli\0"; pub const SCNiLEAST8: &[u8; 4] = b"hhi\0"; pub const SCNiLEAST16: &[u8; 3] = b"hi\0"; pub const SCNiLEAST32: &[u8; 2] = b"i\0"; -pub const SCNiLEAST64: &[u8; 3] = b"li\0"; +pub const SCNiLEAST64: &[u8; 4] = b"lli\0"; pub const SCNiFAST8: &[u8; 4] = b"hhi\0"; -pub const SCNiFAST16: &[u8; 3] = b"li\0"; -pub const SCNiFAST32: &[u8; 3] = b"li\0"; -pub const SCNiFAST64: &[u8; 3] = b"li\0"; +pub const SCNiFAST64: &[u8; 4] = b"lli\0"; pub const SCNu8: &[u8; 4] = b"hhu\0"; pub const SCNu16: &[u8; 3] = b"hu\0"; pub const SCNu32: &[u8; 2] = b"u\0"; -pub const SCNu64: &[u8; 3] = b"lu\0"; +pub const SCNu64: &[u8; 4] = b"llu\0"; pub const SCNuLEAST8: &[u8; 4] = b"hhu\0"; pub const SCNuLEAST16: &[u8; 3] = b"hu\0"; pub const SCNuLEAST32: &[u8; 2] = b"u\0"; -pub const SCNuLEAST64: &[u8; 3] = b"lu\0"; +pub const SCNuLEAST64: &[u8; 4] = b"llu\0"; pub const SCNuFAST8: &[u8; 4] = b"hhu\0"; -pub const SCNuFAST16: &[u8; 3] = b"lu\0"; -pub const SCNuFAST32: &[u8; 3] = b"lu\0"; -pub const SCNuFAST64: &[u8; 3] = b"lu\0"; +pub const SCNuFAST64: &[u8; 4] = b"llu\0"; pub const SCNo8: &[u8; 4] = b"hho\0"; pub const SCNo16: &[u8; 3] = b"ho\0"; pub const SCNo32: &[u8; 2] = b"o\0"; -pub const SCNo64: &[u8; 3] = b"lo\0"; +pub const SCNo64: &[u8; 4] = b"llo\0"; pub const SCNoLEAST8: &[u8; 4] = b"hho\0"; pub const SCNoLEAST16: &[u8; 3] = b"ho\0"; pub const SCNoLEAST32: &[u8; 2] = b"o\0"; -pub const SCNoLEAST64: &[u8; 3] = b"lo\0"; +pub const SCNoLEAST64: &[u8; 4] = b"llo\0"; pub const SCNoFAST8: &[u8; 4] = b"hho\0"; -pub const SCNoFAST16: &[u8; 3] = b"lo\0"; -pub const SCNoFAST32: &[u8; 3] = b"lo\0"; -pub const SCNoFAST64: &[u8; 3] = b"lo\0"; +pub const SCNoFAST64: &[u8; 4] = b"llo\0"; pub const SCNx8: &[u8; 4] = b"hhx\0"; pub const SCNx16: &[u8; 3] = b"hx\0"; pub const SCNx32: &[u8; 2] = b"x\0"; -pub const SCNx64: &[u8; 3] = b"lx\0"; +pub const SCNx64: &[u8; 4] = b"llx\0"; pub const SCNxLEAST8: &[u8; 4] = b"hhx\0"; pub const SCNxLEAST16: &[u8; 3] = b"hx\0"; pub const SCNxLEAST32: &[u8; 2] = b"x\0"; -pub const SCNxLEAST64: &[u8; 3] = b"lx\0"; +pub const SCNxLEAST64: &[u8; 4] = b"llx\0"; pub const SCNxFAST8: &[u8; 4] = b"hhx\0"; -pub const SCNxFAST16: &[u8; 3] = b"lx\0"; -pub const SCNxFAST32: &[u8; 3] = b"lx\0"; -pub const SCNxFAST64: &[u8; 3] = b"lx\0"; -pub const SCNdMAX: &[u8; 3] = b"ld\0"; -pub const SCNiMAX: &[u8; 3] = b"li\0"; -pub const SCNoMAX: &[u8; 3] = b"lo\0"; -pub const SCNuMAX: &[u8; 3] = b"lu\0"; -pub const SCNxMAX: &[u8; 3] = b"lx\0"; -pub const SCNdPTR: &[u8; 3] = b"ld\0"; -pub const SCNiPTR: &[u8; 3] = b"li\0"; -pub const SCNoPTR: &[u8; 3] = b"lo\0"; -pub const SCNuPTR: &[u8; 3] = b"lu\0"; -pub const SCNxPTR: &[u8; 3] = b"lx\0"; +pub const SCNxFAST64: &[u8; 4] = b"llx\0"; +pub const SCNdMAX: &[u8; 4] = b"lld\0"; +pub const SCNiMAX: &[u8; 4] = b"lli\0"; +pub const SCNoMAX: &[u8; 4] = b"llo\0"; +pub const SCNuMAX: &[u8; 4] = b"llu\0"; +pub const SCNxMAX: &[u8; 4] = b"llx\0"; pub const _STDLIB_H: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; @@ -409,9 +372,10 @@ pub const WNOWAIT: u32 = 16777216; pub const __WNOTHREAD: u32 = 536870912; pub const __WALL: u32 = 1073741824; pub const __WCLONE: u32 = 2147483648; +pub const __ENUM_IDTYPE_T: u32 = 1; pub const __W_CONTINUED: u32 = 65535; pub const __WCOREFLAG: u32 = 128; -pub const __HAVE_FLOAT128: u32 = 1; +pub const __HAVE_FLOAT128: u32 = 0; pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; pub const __HAVE_FLOAT64X: u32 = 1; pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; @@ -453,6 +417,7 @@ pub const BYTE_ORDER: u32 = 1234; pub const _BITS_BYTESWAP_H: u32 = 1; pub const _BITS_UINTN_IDENTITY_H: u32 = 1; pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &[u8; 6] = b"stosl\0"; pub const __sigset_t_defined: u32 = 1; pub const __timeval_defined: u32 = 1; pub const _STRUCT_TIMESPEC: u32 = 1; @@ -460,17 +425,17 @@ pub const FD_SETSIZE: u32 = 1024; pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; pub const _THREAD_SHARED_TYPES_H: u32 = 1; pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 64; -pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 48; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; -pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 24; +pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 36; +pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 32; +pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 20; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; +pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1; -pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; +pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 0; pub const __have_pthread_attr_t: u32 = 1; pub const _ALLOCA_H: u32 = 1; pub type __u_char = ::std::os::raw::c_uchar; @@ -483,8 +448,8 @@ 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_long; -pub type __uint64_t = ::std::os::raw::c_ulong; +pub type __int64_t = ::std::os::raw::c_longlong; +pub type __uint64_t = ::std::os::raw::c_ulonglong; pub type __int_least8_t = __int8_t; pub type __uint_least8_t = __uint8_t; pub type __int_least16_t = __int16_t; @@ -493,19 +458,19 @@ pub type __int_least32_t = __int32_t; pub type __uint_least32_t = __uint32_t; pub type __int_least64_t = __int64_t; pub type __uint_least64_t = __uint64_t; -pub type __quad_t = ::std::os::raw::c_long; -pub type __u_quad_t = ::std::os::raw::c_ulong; -pub type __intmax_t = ::std::os::raw::c_long; -pub type __uintmax_t = ::std::os::raw::c_ulong; -pub type __dev_t = ::std::os::raw::c_ulong; +pub type __quad_t = ::std::os::raw::c_longlong; +pub type __u_quad_t = ::std::os::raw::c_ulonglong; +pub type __intmax_t = ::std::os::raw::c_longlong; +pub type __uintmax_t = ::std::os::raw::c_ulonglong; +pub type __dev_t = __uint64_t; pub type __uid_t = ::std::os::raw::c_uint; pub type __gid_t = ::std::os::raw::c_uint; pub type __ino_t = ::std::os::raw::c_ulong; -pub type __ino64_t = ::std::os::raw::c_ulong; +pub type __ino64_t = __uint64_t; pub type __mode_t = ::std::os::raw::c_uint; pub type __nlink_t = ::std::os::raw::c_uint; pub type __off_t = ::std::os::raw::c_long; -pub type __off64_t = ::std::os::raw::c_long; +pub type __off64_t = __int64_t; pub type __pid_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -519,52 +484,47 @@ fn bindgen_test_layout___fsid_t() { assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__fsid_t)) + "Size of __fsid_t" ); assert_eq!( ::std::mem::align_of::<__fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) + "Alignment of __fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) + "Offset of field: __fsid_t::__val" ); } pub type __clock_t = ::std::os::raw::c_long; pub type __rlim_t = ::std::os::raw::c_ulong; -pub type __rlim64_t = ::std::os::raw::c_ulong; +pub type __rlim64_t = __uint64_t; pub type __id_t = ::std::os::raw::c_uint; pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; -pub type __suseconds64_t = ::std::os::raw::c_long; pub type __daddr_t = ::std::os::raw::c_int; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; pub type __timer_t = *mut ::std::os::raw::c_void; -pub type __blksize_t = ::std::os::raw::c_int; +pub type __blksize_t = ::std::os::raw::c_long; pub type __blkcnt_t = ::std::os::raw::c_long; -pub type __blkcnt64_t = ::std::os::raw::c_long; +pub type __blkcnt64_t = __int64_t; pub type __fsblkcnt_t = ::std::os::raw::c_ulong; -pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; +pub type __fsblkcnt64_t = __uint64_t; pub type __fsfilcnt_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; -pub type __fsword_t = ::std::os::raw::c_long; -pub type __ssize_t = ::std::os::raw::c_long; +pub type __fsfilcnt64_t = __uint64_t; +pub type __fsword_t = ::std::os::raw::c_int; +pub type __ssize_t = ::std::os::raw::c_int; pub type __syscall_slong_t = ::std::os::raw::c_long; pub type __syscall_ulong_t = ::std::os::raw::c_ulong; pub type __loff_t = __off64_t; pub type __caddr_t = *mut ::std::os::raw::c_char; -pub type __intptr_t = ::std::os::raw::c_long; +pub type __intptr_t = ::std::os::raw::c_int; pub type __socklen_t = ::std::os::raw::c_uint; pub type __sig_atomic_t = ::std::os::raw::c_int; +pub type __time64_t = __int64_t; pub type int_least8_t = __int_least8_t; pub type int_least16_t = __int_least16_t; pub type int_least32_t = __int_least32_t; @@ -574,13 +534,13 @@ pub type uint_least16_t = __uint_least16_t; pub type uint_least32_t = __uint_least32_t; pub type uint_least64_t = __uint_least64_t; pub type int_fast8_t = ::std::os::raw::c_schar; -pub type int_fast16_t = ::std::os::raw::c_long; -pub type int_fast32_t = ::std::os::raw::c_long; -pub type int_fast64_t = ::std::os::raw::c_long; +pub type int_fast16_t = ::std::os::raw::c_int; +pub type int_fast32_t = ::std::os::raw::c_int; +pub type int_fast64_t = ::std::os::raw::c_longlong; pub type uint_fast8_t = ::std::os::raw::c_uchar; -pub type uint_fast16_t = ::std::os::raw::c_ulong; -pub type uint_fast32_t = ::std::os::raw::c_ulong; -pub type uint_fast64_t = ::std::os::raw::c_ulong; +pub type uint_fast16_t = ::std::os::raw::c_uint; +pub type uint_fast32_t = ::std::os::raw::c_uint; +pub type uint_fast64_t = ::std::os::raw::c_ulonglong; pub type intmax_t = __intmax_t; pub type uintmax_t = __uintmax_t; pub type size_t = ::std::os::raw::c_ulong; @@ -610,52 +570,32 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(TSS2_ABI_VERSION)) + "Size of TSS2_ABI_VERSION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2_ABI_VERSION)) + "Alignment of TSS2_ABI_VERSION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssCreator) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssCreator) - ) + "Offset of field: TSS2_ABI_VERSION::tssCreator" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssFamily) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssFamily) - ) + "Offset of field: TSS2_ABI_VERSION::tssFamily" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssLevel) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssLevel) - ) + "Offset of field: TSS2_ABI_VERSION::tssLevel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssVersion) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssVersion) - ) + "Offset of field: TSS2_ABI_VERSION::tssVersion" ); } pub type TSS2_RC = u32; @@ -742,22 +682,17 @@ fn bindgen_test_layout_TPMS_EMPTY() { assert_eq!( ::std::mem::size_of::(), 1usize, - concat!("Size of: ", stringify!(TPMS_EMPTY)) + "Size of TPMS_EMPTY" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMS_EMPTY)) + "Alignment of TPMS_EMPTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).empty) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_EMPTY), - "::", - stringify!(empty) - ) + "Offset of field: TPMS_EMPTY::empty" ); } #[repr(C)] @@ -774,32 +709,22 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_ALGORITHM_DESCRIPTION)) + "Size of TPMS_ALGORITHM_DESCRIPTION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DESCRIPTION)) + "Alignment of TPMS_ALGORITHM_DESCRIPTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DESCRIPTION), - "::", - stringify!(alg) - ) + "Offset of field: TPMS_ALGORITHM_DESCRIPTION::alg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DESCRIPTION), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_ALGORITHM_DESCRIPTION::attributes" ); } #[repr(C)] @@ -815,65 +740,36 @@ pub union TPMU_HA { fn bindgen_test_layout_TPMU_HA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(TPMU_HA)) - ); + assert_eq!(::std::mem::size_of::(), 64usize, "Size of TPMU_HA"); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMU_HA)) + "Alignment of TPMU_HA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha1) - ) + "Offset of field: TPMU_HA::sha1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha256) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha256) - ) + "Offset of field: TPMU_HA::sha256" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha384) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha384) - ) + "Offset of field: TPMU_HA::sha384" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha512) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha512) - ) + "Offset of field: TPMU_HA::sha512" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm3_256) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sm3_256) - ) + "Offset of field: TPMU_HA::sm3_256" ); } impl Default for TPMU_HA { @@ -895,35 +791,21 @@ pub struct TPMT_HA { fn bindgen_test_layout_TPMT_HA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 66usize, - concat!("Size of: ", stringify!(TPMT_HA)) - ); + assert_eq!(::std::mem::size_of::(), 66usize, "Size of TPMT_HA"); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_HA)) + "Alignment of TPMT_HA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_HA), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMT_HA::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_HA), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_HA::digest" ); } impl Default for TPMT_HA { @@ -948,32 +830,22 @@ fn bindgen_test_layout_TPM2B_DIGEST() { assert_eq!( ::std::mem::size_of::(), 66usize, - concat!("Size of: ", stringify!(TPM2B_DIGEST)) + "Size of TPM2B_DIGEST" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_DIGEST)) + "Alignment of TPM2B_DIGEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DIGEST), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_DIGEST::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DIGEST), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_DIGEST::buffer" ); } impl Default for TPM2B_DIGEST { @@ -998,32 +870,22 @@ fn bindgen_test_layout_TPM2B_DATA() { assert_eq!( ::std::mem::size_of::(), 66usize, - concat!("Size of: ", stringify!(TPM2B_DATA)) + "Size of TPM2B_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_DATA)) + "Alignment of TPM2B_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_DATA::buffer" ); } impl Default for TPM2B_DATA { @@ -1051,32 +913,22 @@ fn bindgen_test_layout_TPM2B_EVENT() { assert_eq!( ::std::mem::size_of::(), 1026usize, - concat!("Size of: ", stringify!(TPM2B_EVENT)) + "Size of TPM2B_EVENT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_EVENT)) + "Alignment of TPM2B_EVENT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_EVENT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_EVENT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_EVENT), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_EVENT::buffer" ); } impl Default for TPM2B_EVENT { @@ -1101,32 +953,22 @@ fn bindgen_test_layout_TPM2B_MAX_BUFFER() { assert_eq!( ::std::mem::size_of::(), 1026usize, - concat!("Size of: ", stringify!(TPM2B_MAX_BUFFER)) + "Size of TPM2B_MAX_BUFFER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_MAX_BUFFER)) + "Alignment of TPM2B_MAX_BUFFER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_BUFFER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_MAX_BUFFER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_BUFFER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_MAX_BUFFER::buffer" ); } impl Default for TPM2B_MAX_BUFFER { @@ -1151,32 +993,22 @@ fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() { assert_eq!( ::std::mem::size_of::(), 2050usize, - concat!("Size of: ", stringify!(TPM2B_MAX_NV_BUFFER)) + "Size of TPM2B_MAX_NV_BUFFER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_MAX_NV_BUFFER)) + "Alignment of TPM2B_MAX_NV_BUFFER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_NV_BUFFER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_MAX_NV_BUFFER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_NV_BUFFER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_MAX_NV_BUFFER::buffer" ); } impl Default for TPM2B_MAX_NV_BUFFER { @@ -1202,32 +1034,22 @@ fn bindgen_test_layout_TPM2B_IV() { assert_eq!( ::std::mem::size_of::(), 18usize, - concat!("Size of: ", stringify!(TPM2B_IV)) + "Size of TPM2B_IV" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_IV)) + "Alignment of TPM2B_IV" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_IV), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_IV::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_IV), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_IV::buffer" ); } #[repr(C)] @@ -1243,32 +1065,22 @@ fn bindgen_test_layout_TPMU_NAME() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(TPMU_NAME)) + "Size of TPMU_NAME" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_NAME)) + "Alignment of TPMU_NAME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_NAME), - "::", - stringify!(digest) - ) + "Offset of field: TPMU_NAME::digest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_NAME), - "::", - stringify!(handle) - ) + "Offset of field: TPMU_NAME::handle" ); } impl Default for TPMU_NAME { @@ -1293,32 +1105,22 @@ fn bindgen_test_layout_TPM2B_NAME() { assert_eq!( ::std::mem::size_of::(), 70usize, - concat!("Size of: ", stringify!(TPM2B_NAME)) + "Size of TPM2B_NAME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_NAME)) + "Alignment of TPM2B_NAME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NAME), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_NAME::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NAME), - "::", - stringify!(name) - ) + "Offset of field: TPM2B_NAME::name" ); } impl Default for TPM2B_NAME { @@ -1343,32 +1145,22 @@ fn bindgen_test_layout_TPMS_PCR_SELECT() { assert_eq!( ::std::mem::size_of::(), 5usize, - concat!("Size of: ", stringify!(TPMS_PCR_SELECT)) + "Size of TPMS_PCR_SELECT" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMS_PCR_SELECT)) + "Alignment of TPMS_PCR_SELECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECT), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_PCR_SELECT::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECT), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_PCR_SELECT::pcrSelect" ); } #[repr(C)] @@ -1385,42 +1177,27 @@ fn bindgen_test_layout_TPMS_PCR_SELECTION() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_PCR_SELECTION)) + "Size of TPMS_PCR_SELECTION" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_PCR_SELECTION)) + "Alignment of TPMS_PCR_SELECTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_PCR_SELECTION::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_PCR_SELECTION::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_PCR_SELECTION::pcrSelect" ); } #[repr(C)] @@ -1437,42 +1214,27 @@ fn bindgen_test_layout_TPMT_TK_CREATION() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_CREATION)) + "Size of TPMT_TK_CREATION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_CREATION)) + "Alignment of TPMT_TK_CREATION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_CREATION::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_CREATION::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_CREATION::digest" ); } impl Default for TPMT_TK_CREATION { @@ -1498,42 +1260,27 @@ fn bindgen_test_layout_TPMT_TK_VERIFIED() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_VERIFIED)) + "Size of TPMT_TK_VERIFIED" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_VERIFIED)) + "Alignment of TPMT_TK_VERIFIED" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_VERIFIED::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_VERIFIED::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_VERIFIED::digest" ); } impl Default for TPMT_TK_VERIFIED { @@ -1559,42 +1306,27 @@ fn bindgen_test_layout_TPMT_TK_AUTH() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_AUTH)) + "Size of TPMT_TK_AUTH" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_AUTH)) + "Alignment of TPMT_TK_AUTH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_AUTH::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_AUTH::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_AUTH::digest" ); } impl Default for TPMT_TK_AUTH { @@ -1620,42 +1352,27 @@ fn bindgen_test_layout_TPMT_TK_HASHCHECK() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_HASHCHECK)) + "Size of TPMT_TK_HASHCHECK" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_HASHCHECK)) + "Alignment of TPMT_TK_HASHCHECK" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_HASHCHECK::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_HASHCHECK::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_HASHCHECK::digest" ); } impl Default for TPMT_TK_HASHCHECK { @@ -1680,32 +1397,22 @@ fn bindgen_test_layout_TPMS_ALG_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_ALG_PROPERTY)) + "Size of TPMS_ALG_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ALG_PROPERTY)) + "Alignment of TPMS_ALG_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALG_PROPERTY), - "::", - stringify!(alg) - ) + "Offset of field: TPMS_ALG_PROPERTY::alg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALG_PROPERTY), - "::", - stringify!(algProperties) - ) + "Offset of field: TPMS_ALG_PROPERTY::algProperties" ); } #[repr(C)] @@ -1721,32 +1428,22 @@ fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_PROPERTY)) + "Size of TPMS_TAGGED_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_PROPERTY)) + "Alignment of TPMS_TAGGED_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PROPERTY), - "::", - stringify!(property) - ) + "Offset of field: TPMS_TAGGED_PROPERTY::property" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PROPERTY), - "::", - stringify!(value) - ) + "Offset of field: TPMS_TAGGED_PROPERTY::value" ); } #[repr(C)] @@ -1764,42 +1461,27 @@ fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_PCR_SELECT)) + "Size of TPMS_TAGGED_PCR_SELECT" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_PCR_SELECT)) + "Alignment of TPMS_TAGGED_PCR_SELECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(tag) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 5usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::pcrSelect" ); } #[repr(C)] @@ -1815,32 +1497,22 @@ fn bindgen_test_layout_TPMS_TAGGED_POLICY() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_POLICY)) + "Size of TPMS_TAGGED_POLICY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_POLICY)) + "Alignment of TPMS_TAGGED_POLICY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_POLICY), - "::", - stringify!(handle) - ) + "Offset of field: TPMS_TAGGED_POLICY::handle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).policyHash) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_POLICY), - "::", - stringify!(policyHash) - ) + "Offset of field: TPMS_TAGGED_POLICY::policyHash" ); } impl Default for TPMS_TAGGED_POLICY { @@ -1866,42 +1538,27 @@ fn bindgen_test_layout_TPMS_ACT_DATA() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_ACT_DATA)) + "Size of TPMS_ACT_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ACT_DATA)) + "Alignment of TPMS_ACT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(handle) - ) + "Offset of field: TPMS_ACT_DATA::handle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(timeout) - ) + "Offset of field: TPMS_ACT_DATA::timeout" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_ACT_DATA::attributes" ); } #[repr(C)] @@ -1917,32 +1574,22 @@ fn bindgen_test_layout_TPML_CC() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_CC)) + "Size of TPML_CC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_CC)) + "Alignment of TPML_CC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_CC), - "::", - stringify!(count) - ) + "Offset of field: TPML_CC::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandCodes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_CC), - "::", - stringify!(commandCodes) - ) + "Offset of field: TPML_CC::commandCodes" ); } impl Default for TPML_CC { @@ -1967,32 +1614,22 @@ fn bindgen_test_layout_TPML_CCA() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_CCA)) + "Size of TPML_CCA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_CCA)) + "Alignment of TPML_CCA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_CCA), - "::", - stringify!(count) - ) + "Offset of field: TPML_CCA::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandAttributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_CCA), - "::", - stringify!(commandAttributes) - ) + "Offset of field: TPML_CCA::commandAttributes" ); } impl Default for TPML_CCA { @@ -2017,32 +1654,22 @@ fn bindgen_test_layout_TPML_ALG() { assert_eq!( ::std::mem::size_of::(), 260usize, - concat!("Size of: ", stringify!(TPML_ALG)) + "Size of TPML_ALG" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ALG)) + "Alignment of TPML_ALG" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG), - "::", - stringify!(count) - ) + "Offset of field: TPML_ALG::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG), - "::", - stringify!(algorithms) - ) + "Offset of field: TPML_ALG::algorithms" ); } impl Default for TPML_ALG { @@ -2067,32 +1694,22 @@ fn bindgen_test_layout_TPML_HANDLE() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_HANDLE)) + "Size of TPML_HANDLE" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_HANDLE)) + "Alignment of TPML_HANDLE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_HANDLE), - "::", - stringify!(count) - ) + "Offset of field: TPML_HANDLE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_HANDLE), - "::", - stringify!(handle) - ) + "Offset of field: TPML_HANDLE::handle" ); } impl Default for TPML_HANDLE { @@ -2117,32 +1734,22 @@ fn bindgen_test_layout_TPML_DIGEST() { assert_eq!( ::std::mem::size_of::(), 532usize, - concat!("Size of: ", stringify!(TPML_DIGEST)) + "Size of TPML_DIGEST" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_DIGEST)) + "Alignment of TPML_DIGEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST), - "::", - stringify!(count) - ) + "Offset of field: TPML_DIGEST::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST), - "::", - stringify!(digests) - ) + "Offset of field: TPML_DIGEST::digests" ); } impl Default for TPML_DIGEST { @@ -2167,32 +1774,22 @@ fn bindgen_test_layout_TPML_DIGEST_VALUES() { assert_eq!( ::std::mem::size_of::(), 1060usize, - concat!("Size of: ", stringify!(TPML_DIGEST_VALUES)) + "Size of TPML_DIGEST_VALUES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_DIGEST_VALUES)) + "Alignment of TPML_DIGEST_VALUES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST_VALUES), - "::", - stringify!(count) - ) + "Offset of field: TPML_DIGEST_VALUES::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST_VALUES), - "::", - stringify!(digests) - ) + "Offset of field: TPML_DIGEST_VALUES::digests" ); } impl Default for TPML_DIGEST_VALUES { @@ -2217,32 +1814,22 @@ fn bindgen_test_layout_TPML_PCR_SELECTION() { assert_eq!( ::std::mem::size_of::(), 132usize, - concat!("Size of: ", stringify!(TPML_PCR_SELECTION)) + "Size of TPML_PCR_SELECTION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_PCR_SELECTION)) + "Alignment of TPML_PCR_SELECTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_PCR_SELECTION), - "::", - stringify!(count) - ) + "Offset of field: TPML_PCR_SELECTION::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelections) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_PCR_SELECTION), - "::", - stringify!(pcrSelections) - ) + "Offset of field: TPML_PCR_SELECTION::pcrSelections" ); } #[repr(C)] @@ -2258,32 +1845,22 @@ fn bindgen_test_layout_TPML_ALG_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_ALG_PROPERTY)) + "Size of TPML_ALG_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ALG_PROPERTY)) + "Alignment of TPML_ALG_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_ALG_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG_PROPERTY), - "::", - stringify!(algProperties) - ) + "Offset of field: TPML_ALG_PROPERTY::algProperties" ); } impl Default for TPML_ALG_PROPERTY { @@ -2309,32 +1886,22 @@ fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_TAGGED_TPM_PROPERTY)) + "Size of TPML_TAGGED_TPM_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_TPM_PROPERTY)) + "Alignment of TPML_TAGGED_TPM_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_TPM_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_TPM_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tpmProperty) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_TPM_PROPERTY), - "::", - stringify!(tpmProperty) - ) + "Offset of field: TPML_TAGGED_TPM_PROPERTY::tpmProperty" ); } impl Default for TPML_TAGGED_TPM_PROPERTY { @@ -2360,32 +1927,22 @@ fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_TAGGED_PCR_PROPERTY)) + "Size of TPML_TAGGED_PCR_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_PCR_PROPERTY)) + "Alignment of TPML_TAGGED_PCR_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_PCR_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_PCR_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrProperty) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_PCR_PROPERTY), - "::", - stringify!(pcrProperty) - ) + "Offset of field: TPML_TAGGED_PCR_PROPERTY::pcrProperty" ); } impl Default for TPML_TAGGED_PCR_PROPERTY { @@ -2410,32 +1967,22 @@ fn bindgen_test_layout_TPML_ECC_CURVE() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_ECC_CURVE)) + "Size of TPML_ECC_CURVE" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ECC_CURVE)) + "Alignment of TPML_ECC_CURVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ECC_CURVE), - "::", - stringify!(count) - ) + "Offset of field: TPML_ECC_CURVE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ECC_CURVE), - "::", - stringify!(eccCurves) - ) + "Offset of field: TPML_ECC_CURVE::eccCurves" ); } impl Default for TPML_ECC_CURVE { @@ -2460,32 +2007,22 @@ fn bindgen_test_layout_TPML_TAGGED_POLICY() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_TAGGED_POLICY)) + "Size of TPML_TAGGED_POLICY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_POLICY)) + "Alignment of TPML_TAGGED_POLICY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_POLICY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_POLICY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).policies) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_POLICY), - "::", - stringify!(policies) - ) + "Offset of field: TPML_TAGGED_POLICY::policies" ); } impl Default for TPML_TAGGED_POLICY { @@ -2510,32 +2047,22 @@ fn bindgen_test_layout_TPML_ACT_DATA() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_ACT_DATA)) + "Size of TPML_ACT_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ACT_DATA)) + "Alignment of TPML_ACT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ACT_DATA), - "::", - stringify!(count) - ) + "Offset of field: TPML_ACT_DATA::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actData) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ACT_DATA), - "::", - stringify!(actData) - ) + "Offset of field: TPML_ACT_DATA::actData" ); } impl Default for TPML_ACT_DATA { @@ -2561,32 +2088,22 @@ fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_INTEL_PTT_PROPERTY)) + "Size of TPML_INTEL_PTT_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_INTEL_PTT_PROPERTY)) + "Alignment of TPML_INTEL_PTT_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_INTEL_PTT_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_INTEL_PTT_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_INTEL_PTT_PROPERTY), - "::", - stringify!(property) - ) + "Offset of field: TPML_INTEL_PTT_PROPERTY::property" ); } impl Default for TPML_INTEL_PTT_PROPERTY { @@ -2621,132 +2138,72 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPMU_CAPABILITIES)) + "Size of TPMU_CAPABILITIES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_CAPABILITIES)) + "Alignment of TPMU_CAPABILITIES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(algorithms) - ) + "Offset of field: TPMU_CAPABILITIES::algorithms" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handles) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(handles) - ) + "Offset of field: TPMU_CAPABILITIES::handles" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).command) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(command) - ) + "Offset of field: TPMU_CAPABILITIES::command" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ppCommands) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(ppCommands) - ) + "Offset of field: TPMU_CAPABILITIES::ppCommands" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditCommands) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(auditCommands) - ) + "Offset of field: TPMU_CAPABILITIES::auditCommands" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assignedPCR) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(assignedPCR) - ) + "Offset of field: TPMU_CAPABILITIES::assignedPCR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tpmProperties) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(tpmProperties) - ) + "Offset of field: TPMU_CAPABILITIES::tpmProperties" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrProperties) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(pcrProperties) - ) + "Offset of field: TPMU_CAPABILITIES::pcrProperties" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(eccCurves) - ) + "Offset of field: TPMU_CAPABILITIES::eccCurves" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicies) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(authPolicies) - ) + "Offset of field: TPMU_CAPABILITIES::authPolicies" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(actData) - ) + "Offset of field: TPMU_CAPABILITIES::actData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).intelPttProperty) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(intelPttProperty) - ) + "Offset of field: TPMU_CAPABILITIES::intelPttProperty" ); } impl Default for TPMU_CAPABILITIES { @@ -2771,32 +2228,22 @@ fn bindgen_test_layout_TPMS_CAPABILITY_DATA() { assert_eq!( ::std::mem::size_of::(), 1032usize, - concat!("Size of: ", stringify!(TPMS_CAPABILITY_DATA)) + "Size of TPMS_CAPABILITY_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_CAPABILITY_DATA)) + "Alignment of TPMS_CAPABILITY_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CAPABILITY_DATA), - "::", - stringify!(capability) - ) + "Offset of field: TPMS_CAPABILITY_DATA::capability" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CAPABILITY_DATA), - "::", - stringify!(data) - ) + "Offset of field: TPMS_CAPABILITY_DATA::data" ); } impl Default for TPMS_CAPABILITY_DATA { @@ -2823,52 +2270,32 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(TPMS_CLOCK_INFO)) + "Size of TPMS_CLOCK_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_CLOCK_INFO)) + "Alignment of TPMS_CLOCK_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(clock) - ) + "Offset of field: TPMS_CLOCK_INFO::clock" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resetCount) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(resetCount) - ) + "Offset of field: TPMS_CLOCK_INFO::resetCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).restartCount) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(restartCount) - ) + "Offset of field: TPMS_CLOCK_INFO::restartCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).safe) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(safe) - ) + "Offset of field: TPMS_CLOCK_INFO::safe" ); } #[repr(C)] @@ -2884,32 +2311,22 @@ fn bindgen_test_layout_TPMS_TIME_INFO() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(TPMS_TIME_INFO)) + "Size of TPMS_TIME_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_TIME_INFO)) + "Alignment of TPMS_TIME_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_INFO), - "::", - stringify!(time) - ) + "Offset of field: TPMS_TIME_INFO::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_INFO), - "::", - stringify!(clockInfo) - ) + "Offset of field: TPMS_TIME_INFO::clockInfo" ); } #[repr(C)] @@ -2926,32 +2343,22 @@ fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(TPMS_TIME_ATTEST_INFO)) + "Size of TPMS_TIME_ATTEST_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_TIME_ATTEST_INFO)) + "Alignment of TPMS_TIME_ATTEST_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_ATTEST_INFO), - "::", - stringify!(time) - ) + "Offset of field: TPMS_TIME_ATTEST_INFO::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_ATTEST_INFO), - "::", - stringify!(firmwareVersion) - ) + "Offset of field: TPMS_TIME_ATTEST_INFO::firmwareVersion" ); } #[repr(C)] @@ -2967,32 +2374,22 @@ fn bindgen_test_layout_TPMS_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 140usize, - concat!("Size of: ", stringify!(TPMS_CERTIFY_INFO)) + "Size of TPMS_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CERTIFY_INFO)) + "Alignment of TPMS_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CERTIFY_INFO), - "::", - stringify!(name) - ) + "Offset of field: TPMS_CERTIFY_INFO::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qualifiedName) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CERTIFY_INFO), - "::", - stringify!(qualifiedName) - ) + "Offset of field: TPMS_CERTIFY_INFO::qualifiedName" ); } impl Default for TPMS_CERTIFY_INFO { @@ -3017,32 +2414,22 @@ fn bindgen_test_layout_TPMS_QUOTE_INFO() { assert_eq!( ::std::mem::size_of::(), 200usize, - concat!("Size of: ", stringify!(TPMS_QUOTE_INFO)) + "Size of TPMS_QUOTE_INFO" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_QUOTE_INFO)) + "Alignment of TPMS_QUOTE_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_QUOTE_INFO), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_QUOTE_INFO::pcrSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_QUOTE_INFO), - "::", - stringify!(pcrDigest) - ) + "Offset of field: TPMS_QUOTE_INFO::pcrDigest" ); } impl Default for TPMS_QUOTE_INFO { @@ -3070,52 +2457,32 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { assert_eq!( ::std::mem::size_of::(), 144usize, - concat!("Size of: ", stringify!(TPMS_COMMAND_AUDIT_INFO)) + "Size of TPMS_COMMAND_AUDIT_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_COMMAND_AUDIT_INFO)) + "Alignment of TPMS_COMMAND_AUDIT_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditCounter) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(auditCounter) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::auditCounter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digestAlg) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(digestAlg) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::digestAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditDigest) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(auditDigest) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::auditDigest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandDigest) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(commandDigest) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::commandDigest" ); } impl Default for TPMS_COMMAND_AUDIT_INFO { @@ -3141,32 +2508,22 @@ fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(TPMS_SESSION_AUDIT_INFO)) + "Size of TPMS_SESSION_AUDIT_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SESSION_AUDIT_INFO)) + "Alignment of TPMS_SESSION_AUDIT_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveSession) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SESSION_AUDIT_INFO), - "::", - stringify!(exclusiveSession) - ) + "Offset of field: TPMS_SESSION_AUDIT_INFO::exclusiveSession" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionDigest) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SESSION_AUDIT_INFO), - "::", - stringify!(sessionDigest) - ) + "Offset of field: TPMS_SESSION_AUDIT_INFO::sessionDigest" ); } impl Default for TPMS_SESSION_AUDIT_INFO { @@ -3191,32 +2548,22 @@ fn bindgen_test_layout_TPMS_CREATION_INFO() { assert_eq!( ::std::mem::size_of::(), 136usize, - concat!("Size of: ", stringify!(TPMS_CREATION_INFO)) + "Size of TPMS_CREATION_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CREATION_INFO)) + "Alignment of TPMS_CREATION_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objectName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_INFO), - "::", - stringify!(objectName) - ) + "Offset of field: TPMS_CREATION_INFO::objectName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creationHash) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_INFO), - "::", - stringify!(creationHash) - ) + "Offset of field: TPMS_CREATION_INFO::creationHash" ); } impl Default for TPMS_CREATION_INFO { @@ -3242,42 +2589,27 @@ fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 2122usize, - concat!("Size of: ", stringify!(TPMS_NV_CERTIFY_INFO)) + "Size of TPMS_NV_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_NV_CERTIFY_INFO)) + "Alignment of TPMS_NV_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(indexName) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::indexName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(offset) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::offset" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvContents) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(nvContents) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::nvContents" ); } impl Default for TPMS_NV_CERTIFY_INFO { @@ -3303,32 +2635,22 @@ fn bindgen_test_layout_TPMS_NV_DIGEST_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 136usize, - concat!("Size of: ", stringify!(TPMS_NV_DIGEST_CERTIFY_INFO)) + "Size of TPMS_NV_DIGEST_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_NV_DIGEST_CERTIFY_INFO)) + "Alignment of TPMS_NV_DIGEST_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_DIGEST_CERTIFY_INFO), - "::", - stringify!(indexName) - ) + "Offset of field: TPMS_NV_DIGEST_CERTIFY_INFO::indexName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvDigest) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_DIGEST_CERTIFY_INFO), - "::", - stringify!(nvDigest) - ) + "Offset of field: TPMS_NV_DIGEST_CERTIFY_INFO::nvDigest" ); } impl Default for TPMS_NV_DIGEST_CERTIFY_INFO { @@ -3359,82 +2681,47 @@ fn bindgen_test_layout_TPMU_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2128usize, - concat!("Size of: ", stringify!(TPMU_ATTEST)) + "Size of TPMU_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMU_ATTEST)) + "Alignment of TPMU_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).certify) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(certify) - ) + "Offset of field: TPMU_ATTEST::certify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(creation) - ) + "Offset of field: TPMU_ATTEST::creation" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quote) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(quote) - ) + "Offset of field: TPMU_ATTEST::quote" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandAudit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(commandAudit) - ) + "Offset of field: TPMU_ATTEST::commandAudit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAudit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(sessionAudit) - ) + "Offset of field: TPMU_ATTEST::sessionAudit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(time) - ) + "Offset of field: TPMU_ATTEST::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nv) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(nv) - ) + "Offset of field: TPMU_ATTEST::nv" ); } impl Default for TPMU_ATTEST { @@ -3464,82 +2751,47 @@ fn bindgen_test_layout_TPMS_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2304usize, - concat!("Size of: ", stringify!(TPMS_ATTEST)) + "Size of TPMS_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_ATTEST)) + "Alignment of TPMS_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(magic) - ) + "Offset of field: TPMS_ATTEST::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(type_) - ) + "Offset of field: TPMS_ATTEST::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qualifiedSigner) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(qualifiedSigner) - ) + "Offset of field: TPMS_ATTEST::qualifiedSigner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraData) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(extraData) - ) + "Offset of field: TPMS_ATTEST::extraData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(clockInfo) - ) + "Offset of field: TPMS_ATTEST::clockInfo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(firmwareVersion) - ) + "Offset of field: TPMS_ATTEST::firmwareVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attested) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(attested) - ) + "Offset of field: TPMS_ATTEST::attested" ); } impl Default for TPMS_ATTEST { @@ -3564,32 +2816,22 @@ fn bindgen_test_layout_TPM2B_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2306usize, - concat!("Size of: ", stringify!(TPM2B_ATTEST)) + "Size of TPM2B_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ATTEST)) + "Alignment of TPM2B_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ATTEST), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ATTEST::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attestationData) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ATTEST), - "::", - stringify!(attestationData) - ) + "Offset of field: TPM2B_ATTEST::attestationData" ); } impl Default for TPM2B_ATTEST { @@ -3616,52 +2858,32 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { assert_eq!( ::std::mem::size_of::(), 140usize, - concat!("Size of: ", stringify!(TPMS_AUTH_COMMAND)) + "Size of TPMS_AUTH_COMMAND" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_AUTH_COMMAND)) + "Alignment of TPMS_AUTH_COMMAND" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionHandle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(sessionHandle) - ) + "Offset of field: TPMS_AUTH_COMMAND::sessionHandle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(nonce) - ) + "Offset of field: TPMS_AUTH_COMMAND::nonce" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(sessionAttributes) - ) + "Offset of field: TPMS_AUTH_COMMAND::sessionAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(hmac) - ) + "Offset of field: TPMS_AUTH_COMMAND::hmac" ); } impl Default for TPMS_AUTH_COMMAND { @@ -3687,42 +2909,27 @@ fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { assert_eq!( ::std::mem::size_of::(), 134usize, - concat!("Size of: ", stringify!(TPMS_AUTH_RESPONSE)) + "Size of TPMS_AUTH_RESPONSE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_AUTH_RESPONSE)) + "Alignment of TPMS_AUTH_RESPONSE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(nonce) - ) + "Offset of field: TPMS_AUTH_RESPONSE::nonce" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(sessionAttributes) - ) + "Offset of field: TPMS_AUTH_RESPONSE::sessionAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(hmac) - ) + "Offset of field: TPMS_AUTH_RESPONSE::hmac" ); } impl Default for TPMS_AUTH_RESPONSE { @@ -3753,62 +2960,37 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_SYM_KEY_BITS)) + "Size of TPMU_SYM_KEY_BITS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SYM_KEY_BITS)) + "Alignment of TPMU_SYM_KEY_BITS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(aes) - ) + "Offset of field: TPMU_SYM_KEY_BITS::aes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(sm4) - ) + "Offset of field: TPMU_SYM_KEY_BITS::sm4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(camellia) - ) + "Offset of field: TPMU_SYM_KEY_BITS::camellia" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SYM_KEY_BITS::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(exclusiveOr) - ) + "Offset of field: TPMU_SYM_KEY_BITS::exclusiveOr" ); } impl Default for TPMU_SYM_KEY_BITS { @@ -3835,52 +3017,32 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_SYM_MODE)) + "Size of TPMU_SYM_MODE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SYM_MODE)) + "Alignment of TPMU_SYM_MODE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(aes) - ) + "Offset of field: TPMU_SYM_MODE::aes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(sm4) - ) + "Offset of field: TPMU_SYM_MODE::sm4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(camellia) - ) + "Offset of field: TPMU_SYM_MODE::camellia" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SYM_MODE::sym" ); } impl Default for TPMU_SYM_MODE { @@ -3906,42 +3068,27 @@ fn bindgen_test_layout_TPMT_SYM_DEF() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SYM_DEF)) + "Size of TPMT_SYM_DEF" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SYM_DEF)) + "Alignment of TPMT_SYM_DEF" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(algorithm) - ) + "Offset of field: TPMT_SYM_DEF::algorithm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMT_SYM_DEF::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(mode) - ) + "Offset of field: TPMT_SYM_DEF::mode" ); } impl Default for TPMT_SYM_DEF { @@ -3967,42 +3114,27 @@ fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SYM_DEF_OBJECT)) + "Size of TPMT_SYM_DEF_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SYM_DEF_OBJECT)) + "Alignment of TPMT_SYM_DEF_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(algorithm) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::algorithm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(mode) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::mode" ); } impl Default for TPMT_SYM_DEF_OBJECT { @@ -4027,32 +3159,22 @@ fn bindgen_test_layout_TPM2B_SYM_KEY() { assert_eq!( ::std::mem::size_of::(), 34usize, - concat!("Size of: ", stringify!(TPM2B_SYM_KEY)) + "Size of TPM2B_SYM_KEY" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SYM_KEY)) + "Alignment of TPM2B_SYM_KEY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SYM_KEY), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SYM_KEY::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SYM_KEY), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_SYM_KEY::buffer" ); } #[repr(C)] @@ -4067,22 +3189,17 @@ fn bindgen_test_layout_TPMS_SYMCIPHER_PARMS() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMS_SYMCIPHER_PARMS)) + "Size of TPMS_SYMCIPHER_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SYMCIPHER_PARMS)) + "Alignment of TPMS_SYMCIPHER_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SYMCIPHER_PARMS), - "::", - stringify!(sym) - ) + "Offset of field: TPMS_SYMCIPHER_PARMS::sym" ); } impl Default for TPMS_SYMCIPHER_PARMS { @@ -4107,32 +3224,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() { assert_eq!( ::std::mem::size_of::(), 258usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE_DATA)) + "Size of TPM2B_SENSITIVE_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_DATA)) + "Alignment of TPM2B_SENSITIVE_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_SENSITIVE_DATA::buffer" ); } impl Default for TPM2B_SENSITIVE_DATA { @@ -4158,32 +3265,22 @@ fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() { assert_eq!( ::std::mem::size_of::(), 324usize, - concat!("Size of: ", stringify!(TPMS_SENSITIVE_CREATE)) + "Size of TPMS_SENSITIVE_CREATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SENSITIVE_CREATE)) + "Alignment of TPMS_SENSITIVE_CREATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userAuth) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SENSITIVE_CREATE), - "::", - stringify!(userAuth) - ) + "Offset of field: TPMS_SENSITIVE_CREATE::userAuth" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SENSITIVE_CREATE), - "::", - stringify!(data) - ) + "Offset of field: TPMS_SENSITIVE_CREATE::data" ); } impl Default for TPMS_SENSITIVE_CREATE { @@ -4209,32 +3306,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() { assert_eq!( ::std::mem::size_of::(), 326usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE_CREATE)) + "Size of TPM2B_SENSITIVE_CREATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_CREATE)) + "Alignment of TPM2B_SENSITIVE_CREATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_CREATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE_CREATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_CREATE), - "::", - stringify!(sensitive) - ) + "Offset of field: TPM2B_SENSITIVE_CREATE::sensitive" ); } impl Default for TPM2B_SENSITIVE_CREATE { @@ -4258,22 +3345,17 @@ fn bindgen_test_layout_TPMS_SCHEME_HASH() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_HASH)) + "Size of TPMS_SCHEME_HASH" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_HASH)) + "Alignment of TPMS_SCHEME_HASH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_HASH), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_HASH::hashAlg" ); } #[repr(C)] @@ -4289,32 +3371,22 @@ fn bindgen_test_layout_TPMS_SCHEME_ECDAA() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_ECDAA)) + "Size of TPMS_SCHEME_ECDAA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_ECDAA)) + "Alignment of TPMS_SCHEME_ECDAA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_ECDAA), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_ECDAA::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_ECDAA), - "::", - stringify!(count) - ) + "Offset of field: TPMS_SCHEME_ECDAA::count" ); } pub type TPMI_ALG_KEYEDHASH_SCHEME = TPM2_ALG_ID; @@ -4332,32 +3404,22 @@ fn bindgen_test_layout_TPMS_SCHEME_XOR() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_XOR)) + "Size of TPMS_SCHEME_XOR" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_XOR)) + "Alignment of TPMS_SCHEME_XOR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_XOR), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_XOR::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_XOR), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_SCHEME_XOR::kdf" ); } #[repr(C)] @@ -4374,32 +3436,22 @@ fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_SCHEME_KEYEDHASH)) + "Size of TPMU_SCHEME_KEYEDHASH" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SCHEME_KEYEDHASH)) + "Alignment of TPMU_SCHEME_KEYEDHASH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SCHEME_KEYEDHASH), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SCHEME_KEYEDHASH::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SCHEME_KEYEDHASH), - "::", - stringify!(exclusiveOr) - ) + "Offset of field: TPMU_SCHEME_KEYEDHASH::exclusiveOr" ); } impl Default for TPMU_SCHEME_KEYEDHASH { @@ -4425,32 +3477,22 @@ fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_KEYEDHASH_SCHEME)) + "Size of TPMT_KEYEDHASH_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_KEYEDHASH_SCHEME)) + "Alignment of TPMT_KEYEDHASH_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KEYEDHASH_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_KEYEDHASH_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KEYEDHASH_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_KEYEDHASH_SCHEME::details" ); } impl Default for TPMT_KEYEDHASH_SCHEME { @@ -4487,92 +3529,52 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_SIG_SCHEME)) + "Size of TPMU_SIG_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SIG_SCHEME)) + "Alignment of TPMU_SIG_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_SIG_SCHEME::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_SIG_SCHEME::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_SIG_SCHEME::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_SIG_SCHEME::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_SIG_SCHEME::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_SIG_SCHEME::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SIG_SCHEME::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SIG_SCHEME::any" ); } impl Default for TPMU_SIG_SCHEME { @@ -4597,32 +3599,22 @@ fn bindgen_test_layout_TPMT_SIG_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SIG_SCHEME)) + "Size of TPMT_SIG_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SIG_SCHEME)) + "Alignment of TPMT_SIG_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIG_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_SIG_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIG_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_SIG_SCHEME::details" ); } impl Default for TPMT_SIG_SCHEME { @@ -4657,52 +3649,32 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_KDF_SCHEME)) + "Size of TPMU_KDF_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_KDF_SCHEME)) + "Alignment of TPMU_KDF_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mgf1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(mgf1) - ) + "Offset of field: TPMU_KDF_SCHEME::mgf1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_56a) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf1_sp800_56a) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf1_sp800_56a" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf2) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_108) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf1_sp800_108) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf1_sp800_108" ); } impl Default for TPMU_KDF_SCHEME { @@ -4727,32 +3699,22 @@ fn bindgen_test_layout_TPMT_KDF_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMT_KDF_SCHEME)) + "Size of TPMT_KDF_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_KDF_SCHEME)) + "Alignment of TPMT_KDF_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KDF_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_KDF_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KDF_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_KDF_SCHEME::details" ); } impl Default for TPMT_KDF_SCHEME { @@ -4787,122 +3749,67 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_ASYM_SCHEME)) + "Size of TPMU_ASYM_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_ASYM_SCHEME)) + "Alignment of TPMU_ASYM_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdh) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdh) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecmqv) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecmqv) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecmqv" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_ASYM_SCHEME::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsaes) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsaes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oaep) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(oaep) - ) + "Offset of field: TPMU_ASYM_SCHEME::oaep" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anySig) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(anySig) - ) + "Offset of field: TPMU_ASYM_SCHEME::anySig" ); } impl Default for TPMU_ASYM_SCHEME { @@ -4927,32 +3834,22 @@ fn bindgen_test_layout_TPMT_ASYM_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_ASYM_SCHEME)) + "Size of TPMT_ASYM_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_ASYM_SCHEME)) + "Alignment of TPMT_ASYM_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ASYM_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_ASYM_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ASYM_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_ASYM_SCHEME::details" ); } impl Default for TPMT_ASYM_SCHEME { @@ -4978,32 +3875,22 @@ fn bindgen_test_layout_TPMT_RSA_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_RSA_SCHEME)) + "Size of TPMT_RSA_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_RSA_SCHEME)) + "Alignment of TPMT_RSA_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_RSA_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_RSA_SCHEME::details" ); } impl Default for TPMT_RSA_SCHEME { @@ -5029,32 +3916,22 @@ fn bindgen_test_layout_TPMT_RSA_DECRYPT() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_RSA_DECRYPT)) + "Size of TPMT_RSA_DECRYPT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_RSA_DECRYPT)) + "Alignment of TPMT_RSA_DECRYPT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_DECRYPT), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_RSA_DECRYPT::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_DECRYPT), - "::", - stringify!(details) - ) + "Offset of field: TPMT_RSA_DECRYPT::details" ); } impl Default for TPMT_RSA_DECRYPT { @@ -5079,32 +3956,22 @@ fn bindgen_test_layout_TPM2B_PUBLIC_KEY_RSA() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPM2B_PUBLIC_KEY_RSA)) + "Size of TPM2B_PUBLIC_KEY_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PUBLIC_KEY_RSA)) + "Alignment of TPM2B_PUBLIC_KEY_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC_KEY_RSA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PUBLIC_KEY_RSA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC_KEY_RSA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PUBLIC_KEY_RSA::buffer" ); } impl Default for TPM2B_PUBLIC_KEY_RSA { @@ -5131,32 +3998,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { assert_eq!( ::std::mem::size_of::(), 258usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE_KEY_RSA)) + "Size of TPM2B_PRIVATE_KEY_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE_KEY_RSA)) + "Alignment of TPM2B_PRIVATE_KEY_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_KEY_RSA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE_KEY_RSA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_KEY_RSA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE_KEY_RSA::buffer" ); } impl Default for TPM2B_PRIVATE_KEY_RSA { @@ -5181,32 +4038,22 @@ fn bindgen_test_layout_TPM2B_ECC_PARAMETER() { assert_eq!( ::std::mem::size_of::(), 130usize, - concat!("Size of: ", stringify!(TPM2B_ECC_PARAMETER)) + "Size of TPM2B_ECC_PARAMETER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ECC_PARAMETER)) + "Alignment of TPM2B_ECC_PARAMETER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_PARAMETER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ECC_PARAMETER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_PARAMETER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_ECC_PARAMETER::buffer" ); } impl Default for TPM2B_ECC_PARAMETER { @@ -5231,32 +4078,22 @@ fn bindgen_test_layout_TPMS_ECC_POINT() { assert_eq!( ::std::mem::size_of::(), 260usize, - concat!("Size of: ", stringify!(TPMS_ECC_POINT)) + "Size of TPMS_ECC_POINT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ECC_POINT)) + "Alignment of TPMS_ECC_POINT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_POINT), - "::", - stringify!(x) - ) + "Offset of field: TPMS_ECC_POINT::x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 130usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_POINT), - "::", - stringify!(y) - ) + "Offset of field: TPMS_ECC_POINT::y" ); } impl Default for TPMS_ECC_POINT { @@ -5281,32 +4118,22 @@ fn bindgen_test_layout_TPM2B_ECC_POINT() { assert_eq!( ::std::mem::size_of::(), 262usize, - concat!("Size of: ", stringify!(TPM2B_ECC_POINT)) + "Size of TPM2B_ECC_POINT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ECC_POINT)) + "Alignment of TPM2B_ECC_POINT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_POINT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ECC_POINT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).point) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_POINT), - "::", - stringify!(point) - ) + "Offset of field: TPM2B_ECC_POINT::point" ); } impl Default for TPM2B_ECC_POINT { @@ -5333,32 +4160,22 @@ fn bindgen_test_layout_TPMT_ECC_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_ECC_SCHEME)) + "Size of TPMT_ECC_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_ECC_SCHEME)) + "Alignment of TPMT_ECC_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ECC_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_ECC_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ECC_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_ECC_SCHEME::details" ); } impl Default for TPMT_ECC_SCHEME { @@ -5393,122 +4210,67 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { assert_eq!( ::std::mem::size_of::(), 924usize, - concat!("Size of: ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) + "Size of TPMS_ALGORITHM_DETAIL_ECC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) + "Alignment of TPMS_ALGORITHM_DETAIL_ECC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(curveID) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::curveID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keySize) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(keySize) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::keySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::kdf" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sign) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(sign) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::sign" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(p) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::p" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(a) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::a" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, 274usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(b) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::b" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gX) as usize - ptr as usize }, 404usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(gX) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::gX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gY) as usize - ptr as usize }, 534usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(gY) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::gY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize }, 664usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(n) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::n" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, 794usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(h) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::h" ); } impl Default for TPMS_ALGORITHM_DETAIL_ECC { @@ -5533,32 +4295,22 @@ fn bindgen_test_layout_TPMS_SIGNATURE_RSA() { assert_eq!( ::std::mem::size_of::(), 516usize, - concat!("Size of: ", stringify!(TPMS_SIGNATURE_RSA)) + "Size of TPMS_SIGNATURE_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SIGNATURE_RSA)) + "Alignment of TPMS_SIGNATURE_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_RSA), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_SIGNATURE_RSA::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sig) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_RSA), - "::", - stringify!(sig) - ) + "Offset of field: TPMS_SIGNATURE_RSA::sig" ); } impl Default for TPMS_SIGNATURE_RSA { @@ -5586,42 +4338,27 @@ fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { assert_eq!( ::std::mem::size_of::(), 262usize, - concat!("Size of: ", stringify!(TPMS_SIGNATURE_ECC)) + "Size of TPMS_SIGNATURE_ECC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SIGNATURE_ECC)) + "Alignment of TPMS_SIGNATURE_ECC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_SIGNATURE_ECC::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signatureR) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(signatureR) - ) + "Offset of field: TPMS_SIGNATURE_ECC::signatureR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signatureS) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(signatureS) - ) + "Offset of field: TPMS_SIGNATURE_ECC::signatureS" ); } impl Default for TPMS_SIGNATURE_ECC { @@ -5656,92 +4393,52 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { assert_eq!( ::std::mem::size_of::(), 516usize, - concat!("Size of: ", stringify!(TPMU_SIGNATURE)) + "Size of TPMU_SIGNATURE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SIGNATURE)) + "Alignment of TPMU_SIGNATURE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_SIGNATURE::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_SIGNATURE::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_SIGNATURE::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_SIGNATURE::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_SIGNATURE::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_SIGNATURE::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SIGNATURE::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SIGNATURE::any" ); } impl Default for TPMU_SIGNATURE { @@ -5766,32 +4463,22 @@ fn bindgen_test_layout_TPMT_SIGNATURE() { assert_eq!( ::std::mem::size_of::(), 518usize, - concat!("Size of: ", stringify!(TPMT_SIGNATURE)) + "Size of TPMT_SIGNATURE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SIGNATURE)) + "Alignment of TPMT_SIGNATURE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIGNATURE), - "::", - stringify!(sigAlg) - ) + "Offset of field: TPMT_SIGNATURE::sigAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signature) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIGNATURE), - "::", - stringify!(signature) - ) + "Offset of field: TPMT_SIGNATURE::signature" ); } impl Default for TPMT_SIGNATURE { @@ -5819,52 +4506,32 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { assert_eq!( ::std::mem::size_of::(), 512usize, - concat!("Size of: ", stringify!(TPMU_ENCRYPTED_SECRET)) + "Size of TPMU_ENCRYPTED_SECRET" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMU_ENCRYPTED_SECRET)) + "Alignment of TPMU_ENCRYPTED_SECRET" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::ecc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(keyedHash) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::keyedHash" ); } impl Default for TPMU_ENCRYPTED_SECRET { @@ -5890,32 +4557,22 @@ fn bindgen_test_layout_TPM2B_ENCRYPTED_SECRET() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPM2B_ENCRYPTED_SECRET)) + "Size of TPM2B_ENCRYPTED_SECRET" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ENCRYPTED_SECRET)) + "Alignment of TPM2B_ENCRYPTED_SECRET" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ENCRYPTED_SECRET), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ENCRYPTED_SECRET::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).secret) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ENCRYPTED_SECRET), - "::", - stringify!(secret) - ) + "Offset of field: TPM2B_ENCRYPTED_SECRET::secret" ); } impl Default for TPM2B_ENCRYPTED_SECRET { @@ -5943,52 +4600,32 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPMU_PUBLIC_ID)) + "Size of TPMU_PUBLIC_ID" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_PUBLIC_ID)) + "Alignment of TPMU_PUBLIC_ID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(keyedHash) - ) + "Offset of field: TPMU_PUBLIC_ID::keyedHash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_PUBLIC_ID::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_PUBLIC_ID::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_PUBLIC_ID::ecc" ); } impl Default for TPMU_PUBLIC_ID { @@ -6012,22 +4649,17 @@ fn bindgen_test_layout_TPMS_KEYEDHASH_PARMS() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMS_KEYEDHASH_PARMS)) + "Size of TPMS_KEYEDHASH_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_KEYEDHASH_PARMS)) + "Alignment of TPMS_KEYEDHASH_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_KEYEDHASH_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_KEYEDHASH_PARMS::scheme" ); } impl Default for TPMS_KEYEDHASH_PARMS { @@ -6052,32 +4684,22 @@ fn bindgen_test_layout_TPMS_ASYM_PARMS() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_ASYM_PARMS)) + "Size of TPMS_ASYM_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ASYM_PARMS)) + "Alignment of TPMS_ASYM_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ASYM_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_ASYM_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ASYM_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_ASYM_PARMS::scheme" ); } impl Default for TPMS_ASYM_PARMS { @@ -6104,52 +4726,32 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TPMS_RSA_PARMS)) + "Size of TPMS_RSA_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_RSA_PARMS)) + "Alignment of TPMS_RSA_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_RSA_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_RSA_PARMS::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMS_RSA_PARMS::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(exponent) - ) + "Offset of field: TPMS_RSA_PARMS::exponent" ); } impl Default for TPMS_RSA_PARMS { @@ -6176,52 +4778,32 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { assert_eq!( ::std::mem::size_of::(), 18usize, - concat!("Size of: ", stringify!(TPMS_ECC_PARMS)) + "Size of TPMS_ECC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ECC_PARMS)) + "Alignment of TPMS_ECC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_ECC_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_ECC_PARMS::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(curveID) - ) + "Offset of field: TPMS_ECC_PARMS::curveID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_ECC_PARMS::kdf" ); } impl Default for TPMS_ECC_PARMS { @@ -6249,62 +4831,37 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TPMU_PUBLIC_PARMS)) + "Size of TPMU_PUBLIC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_PUBLIC_PARMS)) + "Alignment of TPMU_PUBLIC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHashDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(keyedHashDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::keyedHashDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(symDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::symDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(rsaDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::rsaDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(eccDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::eccDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).asymDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(asymDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::asymDetail" ); } impl Default for TPMU_PUBLIC_PARMS { @@ -6329,32 +4886,22 @@ fn bindgen_test_layout_TPMT_PUBLIC_PARMS() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(TPMT_PUBLIC_PARMS)) + "Size of TPMT_PUBLIC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_PUBLIC_PARMS)) + "Alignment of TPMT_PUBLIC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC_PARMS), - "::", - stringify!(type_) - ) + "Offset of field: TPMT_PUBLIC_PARMS::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC_PARMS), - "::", - stringify!(parameters) - ) + "Offset of field: TPMT_PUBLIC_PARMS::parameters" ); } impl Default for TPMT_PUBLIC_PARMS { @@ -6383,72 +4930,42 @@ fn bindgen_test_layout_TPMT_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 612usize, - concat!("Size of: ", stringify!(TPMT_PUBLIC)) + "Size of TPMT_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_PUBLIC)) + "Alignment of TPMT_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(type_) - ) + "Offset of field: TPMT_PUBLIC::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(nameAlg) - ) + "Offset of field: TPMT_PUBLIC::nameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objectAttributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(objectAttributes) - ) + "Offset of field: TPMT_PUBLIC::objectAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(authPolicy) - ) + "Offset of field: TPMT_PUBLIC::authPolicy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(parameters) - ) + "Offset of field: TPMT_PUBLIC::parameters" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).unique) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(unique) - ) + "Offset of field: TPMT_PUBLIC::unique" ); } impl Default for TPMT_PUBLIC { @@ -6473,32 +4990,22 @@ fn bindgen_test_layout_TPM2B_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 616usize, - concat!("Size of: ", stringify!(TPM2B_PUBLIC)) + "Size of TPM2B_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_PUBLIC)) + "Alignment of TPM2B_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PUBLIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).publicArea) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC), - "::", - stringify!(publicArea) - ) + "Offset of field: TPM2B_PUBLIC::publicArea" ); } impl Default for TPM2B_PUBLIC { @@ -6523,32 +5030,22 @@ fn bindgen_test_layout_TPM2B_TEMPLATE() { assert_eq!( ::std::mem::size_of::(), 614usize, - concat!("Size of: ", stringify!(TPM2B_TEMPLATE)) + "Size of TPM2B_TEMPLATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_TEMPLATE)) + "Alignment of TPM2B_TEMPLATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_TEMPLATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_TEMPLATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_TEMPLATE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_TEMPLATE::buffer" ); } impl Default for TPM2B_TEMPLATE { @@ -6574,32 +5071,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE_VENDOR_SPECIFIC() { assert_eq!( ::std::mem::size_of::(), 1282usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) + "Size of TPM2B_PRIVATE_VENDOR_SPECIFIC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) + "Alignment of TPM2B_PRIVATE_VENDOR_SPECIFIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE_VENDOR_SPECIFIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE_VENDOR_SPECIFIC::buffer" ); } impl Default for TPM2B_PRIVATE_VENDOR_SPECIFIC { @@ -6628,62 +5115,37 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { assert_eq!( ::std::mem::size_of::(), 1282usize, - concat!("Size of: ", stringify!(TPMU_SENSITIVE_COMPOSITE)) + "Size of TPMU_SENSITIVE_COMPOSITE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SENSITIVE_COMPOSITE)) + "Alignment of TPMU_SENSITIVE_COMPOSITE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::ecc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(bits) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::bits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::any" ); } impl Default for TPMU_SENSITIVE_COMPOSITE { @@ -6710,52 +5172,32 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 1416usize, - concat!("Size of: ", stringify!(TPMT_SENSITIVE)) + "Size of TPMT_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SENSITIVE)) + "Alignment of TPMT_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitiveType) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(sensitiveType) - ) + "Offset of field: TPMT_SENSITIVE::sensitiveType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authValue) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(authValue) - ) + "Offset of field: TPMT_SENSITIVE::authValue" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seedValue) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(seedValue) - ) + "Offset of field: TPMT_SENSITIVE::seedValue" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 134usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(sensitive) - ) + "Offset of field: TPMT_SENSITIVE::sensitive" ); } impl Default for TPMT_SENSITIVE { @@ -6780,32 +5222,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 1418usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE)) + "Size of TPM2B_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE)) + "Alignment of TPM2B_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitiveArea) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE), - "::", - stringify!(sensitiveArea) - ) + "Offset of field: TPM2B_SENSITIVE::sensitiveArea" ); } impl Default for TPM2B_SENSITIVE { @@ -6831,42 +5263,27 @@ fn bindgen_test_layout__PRIVATE() { assert_eq!( ::std::mem::size_of::<_PRIVATE>(), 1550usize, - concat!("Size of: ", stringify!(_PRIVATE)) + "Size of _PRIVATE" ); assert_eq!( ::std::mem::align_of::<_PRIVATE>(), 2usize, - concat!("Alignment of ", stringify!(_PRIVATE)) + "Alignment of _PRIVATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityOuter) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(integrityOuter) - ) + "Offset of field: _PRIVATE::integrityOuter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityInner) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(integrityInner) - ) + "Offset of field: _PRIVATE::integrityInner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(sensitive) - ) + "Offset of field: _PRIVATE::sensitive" ); } impl Default for _PRIVATE { @@ -6891,32 +5308,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE() { assert_eq!( ::std::mem::size_of::(), 1552usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE)) + "Size of TPM2B_PRIVATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE)) + "Alignment of TPM2B_PRIVATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE::buffer" ); } impl Default for TPM2B_PRIVATE { @@ -6941,32 +5348,22 @@ fn bindgen_test_layout_TPMS_ID_OBJECT() { assert_eq!( ::std::mem::size_of::(), 132usize, - concat!("Size of: ", stringify!(TPMS_ID_OBJECT)) + "Size of TPMS_ID_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ID_OBJECT)) + "Alignment of TPMS_ID_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityHMAC) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ID_OBJECT), - "::", - stringify!(integrityHMAC) - ) + "Offset of field: TPMS_ID_OBJECT::integrityHMAC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encIdentity) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ID_OBJECT), - "::", - stringify!(encIdentity) - ) + "Offset of field: TPMS_ID_OBJECT::encIdentity" ); } impl Default for TPMS_ID_OBJECT { @@ -6991,32 +5388,22 @@ fn bindgen_test_layout_TPM2B_ID_OBJECT() { assert_eq!( ::std::mem::size_of::(), 134usize, - concat!("Size of: ", stringify!(TPM2B_ID_OBJECT)) + "Size of TPM2B_ID_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ID_OBJECT)) + "Alignment of TPM2B_ID_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ID_OBJECT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ID_OBJECT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).credential) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ID_OBJECT), - "::", - stringify!(credential) - ) + "Offset of field: TPM2B_ID_OBJECT::credential" ); } impl Default for TPM2B_ID_OBJECT { @@ -7044,32 +5431,22 @@ fn bindgen_test_layout_TPMS_NV_PIN_COUNTER_PARAMETERS() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) + "Size of TPMS_NV_PIN_COUNTER_PARAMETERS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) + "Alignment of TPMS_NV_PIN_COUNTER_PARAMETERS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pinCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS), - "::", - stringify!(pinCount) - ) + "Offset of field: TPMS_NV_PIN_COUNTER_PARAMETERS::pinCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pinLimit) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS), - "::", - stringify!(pinLimit) - ) + "Offset of field: TPMS_NV_PIN_COUNTER_PARAMETERS::pinLimit" ); } pub type TPMA_NV = u32; @@ -7089,62 +5466,37 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 80usize, - concat!("Size of: ", stringify!(TPMS_NV_PUBLIC)) + "Size of TPMS_NV_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_NV_PUBLIC)) + "Alignment of TPMS_NV_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvIndex) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(nvIndex) - ) + "Offset of field: TPMS_NV_PUBLIC::nvIndex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(nameAlg) - ) + "Offset of field: TPMS_NV_PUBLIC::nameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_NV_PUBLIC::attributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(authPolicy) - ) + "Offset of field: TPMS_NV_PUBLIC::authPolicy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataSize) as usize - ptr as usize }, 78usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(dataSize) - ) + "Offset of field: TPMS_NV_PUBLIC::dataSize" ); } impl Default for TPMS_NV_PUBLIC { @@ -7169,32 +5521,22 @@ fn bindgen_test_layout_TPM2B_NV_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 84usize, - concat!("Size of: ", stringify!(TPM2B_NV_PUBLIC)) + "Size of TPM2B_NV_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_NV_PUBLIC)) + "Alignment of TPM2B_NV_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NV_PUBLIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_NV_PUBLIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvPublic) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NV_PUBLIC), - "::", - stringify!(nvPublic) - ) + "Offset of field: TPM2B_NV_PUBLIC::nvPublic" ); } impl Default for TPM2B_NV_PUBLIC { @@ -7220,32 +5562,22 @@ fn bindgen_test_layout_TPM2B_CONTEXT_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 5122usize, - concat!("Size of: ", stringify!(TPM2B_CONTEXT_SENSITIVE)) + "Size of TPM2B_CONTEXT_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_CONTEXT_SENSITIVE)) + "Alignment of TPM2B_CONTEXT_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_SENSITIVE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CONTEXT_SENSITIVE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_SENSITIVE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_CONTEXT_SENSITIVE::buffer" ); } impl Default for TPM2B_CONTEXT_SENSITIVE { @@ -7270,32 +5602,22 @@ fn bindgen_test_layout_TPMS_CONTEXT_DATA() { assert_eq!( ::std::mem::size_of::(), 5188usize, - concat!("Size of: ", stringify!(TPMS_CONTEXT_DATA)) + "Size of TPMS_CONTEXT_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CONTEXT_DATA)) + "Alignment of TPMS_CONTEXT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrity) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT_DATA), - "::", - stringify!(integrity) - ) + "Offset of field: TPMS_CONTEXT_DATA::integrity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encrypted) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT_DATA), - "::", - stringify!(encrypted) - ) + "Offset of field: TPMS_CONTEXT_DATA::encrypted" ); } impl Default for TPMS_CONTEXT_DATA { @@ -7320,32 +5642,22 @@ fn bindgen_test_layout_TPM2B_CONTEXT_DATA() { assert_eq!( ::std::mem::size_of::(), 5190usize, - concat!("Size of: ", stringify!(TPM2B_CONTEXT_DATA)) + "Size of TPM2B_CONTEXT_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_CONTEXT_DATA)) + "Alignment of TPM2B_CONTEXT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CONTEXT_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_CONTEXT_DATA::buffer" ); } impl Default for TPM2B_CONTEXT_DATA { @@ -7372,52 +5684,32 @@ fn bindgen_test_layout_TPMS_CONTEXT() { assert_eq!( ::std::mem::size_of::(), 5208usize, - concat!("Size of: ", stringify!(TPMS_CONTEXT)) + "Size of TPMS_CONTEXT" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_CONTEXT)) + "Alignment of TPMS_CONTEXT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(sequence) - ) + "Offset of field: TPMS_CONTEXT::sequence" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedHandle) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(savedHandle) - ) + "Offset of field: TPMS_CONTEXT::savedHandle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMS_CONTEXT::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contextBlob) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(contextBlob) - ) + "Offset of field: TPMS_CONTEXT::contextBlob" ); } impl Default for TPMS_CONTEXT { @@ -7447,82 +5739,47 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { assert_eq!( ::std::mem::size_of::(), 408usize, - concat!("Size of: ", stringify!(TPMS_CREATION_DATA)) + "Size of TPMS_CREATION_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_CREATION_DATA)) + "Alignment of TPMS_CREATION_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_CREATION_DATA::pcrSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(pcrDigest) - ) + "Offset of field: TPMS_CREATION_DATA::pcrDigest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).locality) as usize - ptr as usize }, 198usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(locality) - ) + "Offset of field: TPMS_CREATION_DATA::locality" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentNameAlg) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentNameAlg) - ) + "Offset of field: TPMS_CREATION_DATA::parentNameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentName) as usize - ptr as usize }, 202usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentName) - ) + "Offset of field: TPMS_CREATION_DATA::parentName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentQualifiedName) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentQualifiedName) - ) + "Offset of field: TPMS_CREATION_DATA::parentQualifiedName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outsideInfo) as usize - ptr as usize }, 342usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(outsideInfo) - ) + "Offset of field: TPMS_CREATION_DATA::outsideInfo" ); } impl Default for TPMS_CREATION_DATA { @@ -7547,32 +5804,22 @@ fn bindgen_test_layout_TPM2B_CREATION_DATA() { assert_eq!( ::std::mem::size_of::(), 412usize, - concat!("Size of: ", stringify!(TPM2B_CREATION_DATA)) + "Size of TPM2B_CREATION_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_CREATION_DATA)) + "Alignment of TPM2B_CREATION_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CREATION_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CREATION_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creationData) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CREATION_DATA), - "::", - stringify!(creationData) - ) + "Offset of field: TPM2B_CREATION_DATA::creationData" ); } impl Default for TPM2B_CREATION_DATA { @@ -7599,32 +5846,22 @@ fn bindgen_test_layout_TPMS_AC_OUTPUT() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_AC_OUTPUT)) + "Size of TPMS_AC_OUTPUT" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_AC_OUTPUT)) + "Alignment of TPMS_AC_OUTPUT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AC_OUTPUT), - "::", - stringify!(tag) - ) + "Offset of field: TPMS_AC_OUTPUT::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AC_OUTPUT), - "::", - stringify!(data) - ) + "Offset of field: TPMS_AC_OUTPUT::data" ); } #[repr(C)] @@ -7640,32 +5877,22 @@ fn bindgen_test_layout_TPML_AC_CAPABILITIES() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_AC_CAPABILITIES)) + "Size of TPML_AC_CAPABILITIES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_AC_CAPABILITIES)) + "Alignment of TPML_AC_CAPABILITIES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_AC_CAPABILITIES), - "::", - stringify!(count) - ) + "Offset of field: TPML_AC_CAPABILITIES::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).acCapabilities) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_AC_CAPABILITIES), - "::", - stringify!(acCapabilities) - ) + "Offset of field: TPML_AC_CAPABILITIES::acCapabilities" ); } impl Default for TPML_AC_CAPABILITIES { @@ -7689,45 +5916,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { 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!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } extern "C" { @@ -7807,92 +6015,52 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) + "Size of TSS2_TCTI_CONTEXT_COMMON_V1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) + "Alignment of TSS2_TCTI_CONTEXT_COMMON_V1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(magic) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(version) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).transmit) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(transmit) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::transmit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).receive) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(receive) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::receive" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).finalize) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(finalize) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::finalize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(cancel) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::cancel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).getPollHandles) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(getPollHandles) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::getPollHandles" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).setLocality) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(setLocality) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::setLocality" ); } #[repr(C)] @@ -7909,32 +6077,22 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V2() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) + "Size of TSS2_TCTI_CONTEXT_COMMON_V2" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) + "Alignment of TSS2_TCTI_CONTEXT_COMMON_V2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).v1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V2), - "::", - stringify!(v1) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V2::v1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).makeSticky) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V2), - "::", - stringify!(makeSticky) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V2::makeSticky" ); } pub type TSS2_TCTI_CONTEXT_COMMON_CURRENT = TSS2_TCTI_CONTEXT_COMMON_V2; @@ -7954,62 +6112,37 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(TSS2_TCTI_INFO)) + "Size of TSS2_TCTI_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_INFO)) + "Alignment of TSS2_TCTI_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(version) - ) + "Offset of field: TSS2_TCTI_INFO::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(name) - ) + "Offset of field: TSS2_TCTI_INFO::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(description) - ) + "Offset of field: TSS2_TCTI_INFO::description" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config_help) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(config_help) - ) + "Offset of field: TSS2_TCTI_INFO::config_help" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).init) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(init) - ) + "Offset of field: TSS2_TCTI_INFO::init" ); } impl Default for TSS2_TCTI_INFO { @@ -8043,32 +6176,22 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_COMMAND() { assert_eq!( ::std::mem::size_of::(), 424usize, - concat!("Size of: ", stringify!(TSS2L_SYS_AUTH_COMMAND)) + "Size of TSS2L_SYS_AUTH_COMMAND" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_COMMAND)) + "Alignment of TSS2L_SYS_AUTH_COMMAND" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_COMMAND), - "::", - stringify!(count) - ) + "Offset of field: TSS2L_SYS_AUTH_COMMAND::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_COMMAND), - "::", - stringify!(auths) - ) + "Offset of field: TSS2L_SYS_AUTH_COMMAND::auths" ); } impl Default for TSS2L_SYS_AUTH_COMMAND { @@ -8094,32 +6217,22 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_RESPONSE() { assert_eq!( ::std::mem::size_of::(), 404usize, - concat!("Size of: ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) + "Size of TSS2L_SYS_AUTH_RESPONSE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) + "Alignment of TSS2L_SYS_AUTH_RESPONSE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_RESPONSE), - "::", - stringify!(count) - ) + "Offset of field: TSS2L_SYS_AUTH_RESPONSE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_RESPONSE), - "::", - stringify!(auths) - ) + "Offset of field: TSS2L_SYS_AUTH_RESPONSE::auths" ); } impl Default for TSS2L_SYS_AUTH_RESPONSE { @@ -14218,8 +12331,8 @@ pub type __gwchar_t = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct imaxdiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, + pub quot: ::std::os::raw::c_longlong, + pub rem: ::std::os::raw::c_longlong, } #[test] fn bindgen_test_layout_imaxdiv_t() { @@ -14228,32 +12341,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -14290,7 +12393,10 @@ extern "C" { __base: ::std::os::raw::c_int, ) -> uintmax_t; } -pub type _Float128 = u128; +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 _Float32 = f32; pub type _Float64 = f64; pub type _Float32x = f64; @@ -14305,35 +12411,21 @@ pub struct div_t { 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::size_of::(), 8usize, "Size of div_t"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(div_t)) + "Alignment of 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) - ) + "Offset of field: div_t::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) - ) + "Offset of field: div_t::rem" ); } #[repr(C)] @@ -14346,35 +12438,21 @@ pub struct ldiv_t { 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::size_of::(), 16usize, "Size of ldiv_t"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) + "Alignment of 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) - ) + "Offset of field: ldiv_t::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) - ) + "Offset of field: ldiv_t::rem" ); } #[repr(C)] @@ -14387,35 +12465,21 @@ pub struct lldiv_t { 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::size_of::(), 16usize, "Size of lldiv_t"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) + "Alignment of 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) - ) + "Offset of field: lldiv_t::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) - ) + "Offset of field: lldiv_t::rem" ); } extern "C" { @@ -14544,22 +12608,17 @@ fn bindgen_test_layout___sigset_t() { assert_eq!( ::std::mem::size_of::<__sigset_t>(), 128usize, - concat!("Size of: ", stringify!(__sigset_t)) + "Size of __sigset_t" ); assert_eq!( ::std::mem::align_of::<__sigset_t>(), 8usize, - concat!("Alignment of ", stringify!(__sigset_t)) + "Alignment of __sigset_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) + "Offset of field: __sigset_t::__val" ); } pub type sigset_t = __sigset_t; @@ -14573,35 +12632,21 @@ pub struct timeval { 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::size_of::(), 16usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of 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) - ) + "Offset of field: timeval::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) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -14617,32 +12662,22 @@ fn bindgen_test_layout_timespec() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(timespec)) + "Size of timespec" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timespec)) + "Alignment of timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: timespec::tv_nsec" ); } pub type suseconds_t = __suseconds_t; @@ -14656,25 +12691,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) + "Offset of field: fd_set::__fds_bits" ); } pub type fd_mask = __fd_mask; @@ -14702,102 +12728,6 @@ pub type blkcnt_t = __blkcnt_t; pub type fsblkcnt_t = __fsblkcnt_t; pub type fsfilcnt_t = __fsfilcnt_t; #[repr(C)] -#[derive(Copy, Clone)] -pub union __atomic_wide_counter { - pub __value64: ::std::os::raw::c_ulonglong, - pub __value32: __atomic_wide_counter__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __atomic_wide_counter__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__atomic_wide_counter__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__low) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__high) - ) - ); -} -#[test] -fn bindgen_test_layout___atomic_wide_counter() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter>(), - 8usize, - concat!("Alignment of ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value64) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value32) - ) - ); -} -impl Default for __atomic_wide_counter { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_internal_list { pub __prev: *mut __pthread_internal_list, @@ -14811,32 +12741,22 @@ fn bindgen_test_layout___pthread_internal_list() { assert_eq!( ::std::mem::size_of::<__pthread_internal_list>(), 16usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) + "Size of __pthread_internal_list" ); assert_eq!( ::std::mem::align_of::<__pthread_internal_list>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) + "Alignment of __pthread_internal_list" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) + "Offset of field: __pthread_internal_list::__prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) + "Offset of field: __pthread_internal_list::__next" ); } impl Default for __pthread_internal_list { @@ -14862,22 +12782,17 @@ fn bindgen_test_layout___pthread_internal_slist() { assert_eq!( ::std::mem::size_of::<__pthread_internal_slist>(), 8usize, - concat!("Size of: ", stringify!(__pthread_internal_slist)) + "Size of __pthread_internal_slist" ); assert_eq!( ::std::mem::align_of::<__pthread_internal_slist>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_slist)) + "Alignment of __pthread_internal_slist" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_slist), - "::", - stringify!(__next) - ) + "Offset of field: __pthread_internal_slist::__next" ); } impl Default for __pthread_internal_slist { @@ -14891,15 +12806,87 @@ impl Default for __pthread_internal_slist { } pub type __pthread_slist_t = __pthread_internal_slist; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Copy, Clone)] pub struct __pthread_mutex_s { pub __lock: ::std::os::raw::c_int, pub __count: ::std::os::raw::c_uint, pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_int, - pub __list: __pthread_list_t, + pub __nusers: ::std::os::raw::c_uint, + pub __bindgen_anon_1: __pthread_mutex_s__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_mutex_s__bindgen_ty_1 { + pub __elision_data: __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1, + pub __list: __pthread_slist_t, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1 { + pub __espins: ::std::os::raw::c_short, + pub __eelision: ::std::os::raw::c_short, +} +#[test] +fn bindgen_test_layout___pthread_mutex_s__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s__bindgen_ty_1__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_mutex_s__bindgen_ty_1__bindgen_ty_1>(), + 4usize, + "Size of __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_mutex_s__bindgen_ty_1__bindgen_ty_1>(), + 2usize, + "Alignment of __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__espins) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1::__espins" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__eelision) as usize - ptr as usize }, + 2usize, + "Offset of field: __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1::__eelision" + ); +} +#[test] +fn bindgen_test_layout___pthread_mutex_s__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_mutex_s__bindgen_ty_1>(), + 8usize, + "Size of __pthread_mutex_s__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_mutex_s__bindgen_ty_1>(), + 8usize, + "Alignment of __pthread_mutex_s__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__elision_data) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_mutex_s__bindgen_ty_1::__elision_data" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_mutex_s__bindgen_ty_1::__list" + ); +} +impl Default for __pthread_mutex_s__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } } #[test] fn bindgen_test_layout___pthread_mutex_s() { @@ -14907,83 +12894,38 @@ fn bindgen_test_layout___pthread_mutex_s() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__pthread_mutex_s>(), - 40usize, - concat!("Size of: ", stringify!(__pthread_mutex_s)) + 32usize, + "Size of __pthread_mutex_s" ); assert_eq!( ::std::mem::align_of::<__pthread_mutex_s>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_mutex_s)) + "Alignment of __pthread_mutex_s" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__lock) - ) + "Offset of field: __pthread_mutex_s::__lock" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__count) - ) + "Offset of field: __pthread_mutex_s::__count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__owner) - ) + "Offset of field: __pthread_mutex_s::__owner" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__nusers) - ) + "Offset of field: __pthread_mutex_s::__kind" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__kind) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__spins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__list) - ) + "Offset of field: __pthread_mutex_s::__nusers" ); } impl Default for __pthread_mutex_s { @@ -15004,11 +12946,11 @@ pub struct __pthread_rwlock_arch_t { pub __writers_futex: ::std::os::raw::c_uint, pub __pad3: ::std::os::raw::c_uint, pub __pad4: ::std::os::raw::c_uint, + pub __flags: ::std::os::raw::c_uchar, + pub __shared: ::std::os::raw::c_uchar, + pub __rwelision: ::std::os::raw::c_schar, + pub __pad2: ::std::os::raw::c_uchar, pub __cur_writer: ::std::os::raw::c_int, - pub __shared: ::std::os::raw::c_int, - pub __pad1: ::std::os::raw::c_ulong, - pub __pad2: ::std::os::raw::c_ulong, - pub __flags: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout___pthread_rwlock_arch_t() { @@ -15017,219 +12959,265 @@ fn bindgen_test_layout___pthread_rwlock_arch_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__pthread_rwlock_arch_t>(), - 56usize, - concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) + 32usize, + "Size of __pthread_rwlock_arch_t" ); assert_eq!( ::std::mem::align_of::<__pthread_rwlock_arch_t>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) + 4usize, + "Alignment of __pthread_rwlock_arch_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__readers) - ) + "Offset of field: __pthread_rwlock_arch_t::__readers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers) - ) + "Offset of field: __pthread_rwlock_arch_t::__writers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__wrphase_futex) - ) + "Offset of field: __pthread_rwlock_arch_t::__wrphase_futex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers_futex) - ) + "Offset of field: __pthread_rwlock_arch_t::__writers_futex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad3) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad4) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad4" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__cur_writer) - ) + "Offset of field: __pthread_rwlock_arch_t::__flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__shared) - ) + 25usize, + "Offset of field: __pthread_rwlock_arch_t::__shared" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad1) - ) + unsafe { ::std::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize }, + 26usize, + "Offset of field: __pthread_rwlock_arch_t::__rwelision" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad2) - ) + 27usize, + "Offset of field: __pthread_rwlock_arch_t::__pad2" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__flags) - ) + unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize }, + 28usize, + "Offset of field: __pthread_rwlock_arch_t::__cur_writer" ); } #[repr(C)] #[derive(Copy, Clone)] pub struct __pthread_cond_s { - pub __wseq: __atomic_wide_counter, - pub __g1_start: __atomic_wide_counter, + pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, + pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, pub __g_refs: [::std::os::raw::c_uint; 2usize], pub __g_size: [::std::os::raw::c_uint; 2usize], pub __g1_orig_size: ::std::os::raw::c_uint, pub __wrefs: ::std::os::raw::c_uint, pub __g_signals: [::std::os::raw::c_uint; 2usize], } +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_1 { + pub __wseq: ::std::os::raw::c_ulonglong, + pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} #[test] -fn bindgen_test_layout___pthread_cond_s() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::<__pthread_cond_s>(), - 48usize, - concat!("Size of: ", stringify!(__pthread_cond_s)) + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( - ::std::mem::align_of::<__pthread_cond_s>(), + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 4usize, + "Alignment of __pthread_cond_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1::__low" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, + 4usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1::__high" + ); +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s)) + "Alignment of __pthread_cond_s__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wseq) - ) + "Offset of field: __pthread_cond_s__bindgen_ty_1::__wseq" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__wseq32) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1::__wseq32" + ); +} +impl Default for __pthread_cond_s__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_2 { + pub __g1_start: ::std::os::raw::c_ulonglong, + pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_2__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 4usize, + "Alignment of __pthread_cond_s__bindgen_ty_2__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1::__low" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, + 4usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1::__high" + ); +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_2> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_2" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + "Alignment of __pthread_cond_s__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2::__g1_start" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__g1_start32) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2::__g1_start32" + ); +} +impl Default for __pthread_cond_s__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout___pthread_cond_s() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s>(), + 48usize, + "Size of __pthread_cond_s" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s>(), 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_start) - ) + "Alignment of __pthread_cond_s" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_refs) - ) + "Offset of field: __pthread_cond_s::__g_refs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_size) - ) + "Offset of field: __pthread_cond_s::__g_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_orig_size) - ) + "Offset of field: __pthread_cond_s::__g1_orig_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wrefs) - ) + "Offset of field: __pthread_cond_s::__wrefs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_signals) - ) + "Offset of field: __pthread_cond_s::__g_signals" ); } impl Default for __pthread_cond_s { @@ -15241,43 +13229,11 @@ impl Default for __pthread_cond_s { } } } -pub type __tss_t = ::std::os::raw::c_uint; -pub type __thrd_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __once_flag { - pub __data: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___once_flag() { - const UNINIT: ::std::mem::MaybeUninit<__once_flag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__once_flag>(), - 4usize, - concat!("Size of: ", stringify!(__once_flag)) - ); - assert_eq!( - ::std::mem::align_of::<__once_flag>(), - 4usize, - concat!("Alignment of ", stringify!(__once_flag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__once_flag), - "::", - stringify!(__data) - ) - ); -} pub type pthread_t = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Copy, Clone)] pub union pthread_mutexattr_t { - pub __size: [::std::os::raw::c_char; 8usize], + pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } #[test] @@ -15286,33 +13242,23 @@ fn bindgen_test_layout_pthread_mutexattr_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) + 4usize, + "Size of pthread_mutexattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) + "Alignment of pthread_mutexattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_mutexattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_mutexattr_t::__align" ); } impl Default for pthread_mutexattr_t { @@ -15327,7 +13273,7 @@ impl Default for pthread_mutexattr_t { #[repr(C)] #[derive(Copy, Clone)] pub union pthread_condattr_t { - pub __size: [::std::os::raw::c_char; 8usize], + pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } #[test] @@ -15336,33 +13282,23 @@ fn bindgen_test_layout_pthread_condattr_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) + 4usize, + "Size of pthread_condattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) + "Alignment of pthread_condattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_condattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_condattr_t::__align" ); } impl Default for pthread_condattr_t { @@ -15379,7 +13315,7 @@ pub type pthread_once_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Copy, Clone)] pub union pthread_attr_t { - pub __size: [::std::os::raw::c_char; 64usize], + pub __size: [::std::os::raw::c_char; 36usize], pub __align: ::std::os::raw::c_long, } #[test] @@ -15388,33 +13324,23 @@ fn bindgen_test_layout_pthread_attr_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(pthread_attr_t)) + 40usize, + "Size of pthread_attr_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) + "Alignment of pthread_attr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_attr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_attr_t::__align" ); } impl Default for pthread_attr_t { @@ -15430,7 +13356,7 @@ impl Default for pthread_attr_t { #[derive(Copy, Clone)] pub union pthread_mutex_t { pub __data: __pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 48usize], + pub __size: [::std::os::raw::c_char; 24usize], pub __align: ::std::os::raw::c_long, } #[test] @@ -15439,43 +13365,28 @@ fn bindgen_test_layout_pthread_mutex_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) + 32usize, + "Size of pthread_mutex_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) + "Alignment of pthread_mutex_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_mutex_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_mutex_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_mutex_t::__align" ); } impl Default for pthread_mutex_t { @@ -15501,42 +13412,27 @@ fn bindgen_test_layout_pthread_cond_t() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) + "Size of pthread_cond_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) + "Alignment of pthread_cond_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_cond_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_cond_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_cond_t::__align" ); } impl Default for pthread_cond_t { @@ -15552,7 +13448,7 @@ impl Default for pthread_cond_t { #[derive(Copy, Clone)] pub union pthread_rwlock_t { pub __data: __pthread_rwlock_arch_t, - pub __size: [::std::os::raw::c_char; 56usize], + pub __size: [::std::os::raw::c_char; 32usize], pub __align: ::std::os::raw::c_long, } #[test] @@ -15561,43 +13457,28 @@ fn bindgen_test_layout_pthread_rwlock_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) + 32usize, + "Size of pthread_rwlock_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) + "Alignment of pthread_rwlock_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_rwlock_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_rwlock_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_rwlock_t::__align" ); } impl Default for pthread_rwlock_t { @@ -15622,32 +13503,22 @@ fn bindgen_test_layout_pthread_rwlockattr_t() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) + "Size of pthread_rwlockattr_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) + "Alignment of pthread_rwlockattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_rwlockattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_rwlockattr_t::__align" ); } impl Default for pthread_rwlockattr_t { @@ -15663,7 +13534,7 @@ pub type pthread_spinlock_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Copy, Clone)] pub union pthread_barrier_t { - pub __size: [::std::os::raw::c_char; 32usize], + pub __size: [::std::os::raw::c_char; 20usize], pub __align: ::std::os::raw::c_long, } #[test] @@ -15672,33 +13543,23 @@ fn bindgen_test_layout_pthread_barrier_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) + 24usize, + "Size of pthread_barrier_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) + "Alignment of pthread_barrier_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_barrier_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_barrier_t::__align" ); } impl Default for pthread_barrier_t { @@ -15713,7 +13574,7 @@ impl Default for pthread_barrier_t { #[repr(C)] #[derive(Copy, Clone)] pub union pthread_barrierattr_t { - pub __size: [::std::os::raw::c_char; 8usize], + pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } #[test] @@ -15723,33 +13584,23 @@ fn bindgen_test_layout_pthread_barrierattr_t() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) + 4usize, + "Size of pthread_barrierattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) + "Alignment of pthread_barrierattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_barrierattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_barrierattr_t::__align" ); } impl Default for pthread_barrierattr_t { @@ -15795,82 +13646,47 @@ fn bindgen_test_layout_random_data() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(random_data)) + "Size of random_data" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(random_data)) + "Alignment of random_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(fptr) - ) + "Offset of field: random_data::fptr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rptr) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rptr) - ) + "Offset of field: random_data::rptr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(state) - ) + "Offset of field: random_data::state" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_type) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_type) - ) + "Offset of field: random_data::rand_type" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_deg) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_deg) - ) + "Offset of field: random_data::rand_deg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_sep) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_sep) - ) + "Offset of field: random_data::rand_sep" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end_ptr) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(end_ptr) - ) + "Offset of field: random_data::end_ptr" ); } impl Default for random_data { @@ -15957,62 +13773,37 @@ fn bindgen_test_layout_drand48_data() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(drand48_data)) + "Size of drand48_data" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(drand48_data)) + "Alignment of drand48_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__x) - ) + "Offset of field: drand48_data::__x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__old_x) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__old_x) - ) + "Offset of field: drand48_data::__old_x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__c) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__c) - ) + "Offset of field: drand48_data::__c" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__init) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__init) - ) + "Offset of field: drand48_data::__init" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__a) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__a) - ) + "Offset of field: drand48_data::__a" ); } extern "C" { @@ -16084,9 +13875,6 @@ extern "C" { __size: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn free(__ptr: *mut ::std::os::raw::c_void); -} extern "C" { pub fn reallocarray( __ptr: *mut ::std::os::raw::c_void, @@ -16094,6 +13882,9 @@ extern "C" { __size: size_t, ) -> *mut ::std::os::raw::c_void; } +extern "C" { + pub fn free(__ptr: *mut ::std::os::raw::c_void); +} extern "C" { pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } diff --git a/tss-esapi-sys/src/bindings/arm-unknown-linux-gnueabi.rs b/tss-esapi-sys/src/bindings/arm-unknown-linux-gnueabi.rs index fd1ad14d..3d1d25a8 100644 --- a/tss-esapi-sys/src/bindings/arm-unknown-linux-gnueabi.rs +++ b/tss-esapi-sys/src/bindings/arm-unknown-linux-gnueabi.rs @@ -1,5 +1,5 @@ -/* automatically generated by rust-bindgen 0.69.4 */ -/* TPM2_TSS_VERSION="3.2.2" */ +/* automatically generated by rust-bindgen 0.70.1 */ +/* TPM2_TSS_VERSION="4.0.1" */ pub const _STDINT_H: u32 = 1; pub const _FEATURES_H: u32 = 1; @@ -18,11 +18,6 @@ pub const __USE_POSIX199506: u32 = 1; pub const __USE_XOPEN2K: u32 = 1; pub const __USE_XOPEN2K8: u32 = 1; pub const _ATFILE_SOURCE: u32 = 1; -pub const __WORDSIZE: u32 = 32; -pub const __WORDSIZE_TIME64_COMPAT32: u32 = 0; -pub const __WORDSIZE32_SIZE_ULONG: u32 = 0; -pub const __WORDSIZE32_PTRDIFF_LONG: u32 = 0; -pub const __TIMESIZE: u32 = 32; pub const __USE_MISC: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; @@ -30,30 +25,30 @@ pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_60559_BFP__: u32 = 201404; pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 35; +pub const __GLIBC_MINOR__: u32 = 31; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; -pub const __NO_LONG_DOUBLE_MATH: u32 = 1; -pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __WORDSIZE: u32 = 32; +pub const __WORDSIZE32_SIZE_ULONG: u32 = 0; +pub const __WORDSIZE32_PTRDIFF_LONG: u32 = 0; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 0; +pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const __GLIBC_USE_LIB_EXT2: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; -pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _BITS_TYPES_H: u32 = 1; +pub const __TIMESIZE: u32 = 32; pub const _BITS_TYPESIZES_H: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 0; pub const __STATFS_MATCHES_STATFS64: u32 = 0; -pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 0; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const _BITS_WCHAR_H: u32 = 1; @@ -377,12 +372,13 @@ pub const WNOWAIT: u32 = 16777216; pub const __WNOTHREAD: u32 = 536870912; pub const __WALL: u32 = 1073741824; pub const __WCLONE: u32 = 2147483648; +pub const __ENUM_IDTYPE_T: u32 = 1; pub const __W_CONTINUED: u32 = 65535; pub const __WCOREFLAG: u32 = 128; pub const __HAVE_FLOAT128: u32 = 0; pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; -pub const __HAVE_FLOAT64X: u32 = 0; -pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 0; +pub const __HAVE_FLOAT64X: u32 = 1; +pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; pub const __HAVE_FLOAT16: u32 = 0; pub const __HAVE_FLOAT32: u32 = 1; pub const __HAVE_FLOAT64: u32 = 1; @@ -421,6 +417,7 @@ pub const BYTE_ORDER: u32 = 1234; pub const _BITS_BYTESWAP_H: u32 = 1; pub const _BITS_UINTN_IDENTITY_H: u32 = 1; pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &[u8; 6] = b"stosl\0"; pub const __sigset_t_defined: u32 = 1; pub const __timeval_defined: u32 = 1; pub const _STRUCT_TIMESPEC: u32 = 1; @@ -428,15 +425,15 @@ pub const FD_SETSIZE: u32 = 1024; pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; pub const _THREAD_SHARED_TYPES_H: u32 = 1; pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 36; pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 24; +pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 36; pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 32; pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 20; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1; pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 0; pub const __have_pthread_attr_t: u32 = 1; @@ -487,22 +484,17 @@ fn bindgen_test_layout___fsid_t() { assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__fsid_t)) + "Size of __fsid_t" ); assert_eq!( ::std::mem::align_of::<__fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) + "Alignment of __fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) + "Offset of field: __fsid_t::__val" ); } pub type __clock_t = ::std::os::raw::c_long; @@ -512,7 +504,6 @@ pub type __id_t = ::std::os::raw::c_uint; pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; -pub type __suseconds64_t = __int64_t; pub type __daddr_t = ::std::os::raw::c_int; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; @@ -579,52 +570,32 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(TSS2_ABI_VERSION)) + "Size of TSS2_ABI_VERSION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2_ABI_VERSION)) + "Alignment of TSS2_ABI_VERSION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssCreator) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssCreator) - ) + "Offset of field: TSS2_ABI_VERSION::tssCreator" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssFamily) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssFamily) - ) + "Offset of field: TSS2_ABI_VERSION::tssFamily" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssLevel) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssLevel) - ) + "Offset of field: TSS2_ABI_VERSION::tssLevel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssVersion) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssVersion) - ) + "Offset of field: TSS2_ABI_VERSION::tssVersion" ); } pub type TSS2_RC = u32; @@ -711,22 +682,17 @@ fn bindgen_test_layout_TPMS_EMPTY() { assert_eq!( ::std::mem::size_of::(), 1usize, - concat!("Size of: ", stringify!(TPMS_EMPTY)) + "Size of TPMS_EMPTY" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMS_EMPTY)) + "Alignment of TPMS_EMPTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).empty) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_EMPTY), - "::", - stringify!(empty) - ) + "Offset of field: TPMS_EMPTY::empty" ); } #[repr(C)] @@ -743,32 +709,22 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_ALGORITHM_DESCRIPTION)) + "Size of TPMS_ALGORITHM_DESCRIPTION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DESCRIPTION)) + "Alignment of TPMS_ALGORITHM_DESCRIPTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DESCRIPTION), - "::", - stringify!(alg) - ) + "Offset of field: TPMS_ALGORITHM_DESCRIPTION::alg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DESCRIPTION), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_ALGORITHM_DESCRIPTION::attributes" ); } #[repr(C)] @@ -784,65 +740,36 @@ pub union TPMU_HA { fn bindgen_test_layout_TPMU_HA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(TPMU_HA)) - ); + assert_eq!(::std::mem::size_of::(), 64usize, "Size of TPMU_HA"); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMU_HA)) + "Alignment of TPMU_HA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha1) - ) + "Offset of field: TPMU_HA::sha1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha256) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha256) - ) + "Offset of field: TPMU_HA::sha256" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha384) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha384) - ) + "Offset of field: TPMU_HA::sha384" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha512) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha512) - ) + "Offset of field: TPMU_HA::sha512" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm3_256) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sm3_256) - ) + "Offset of field: TPMU_HA::sm3_256" ); } impl Default for TPMU_HA { @@ -864,35 +791,21 @@ pub struct TPMT_HA { fn bindgen_test_layout_TPMT_HA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 66usize, - concat!("Size of: ", stringify!(TPMT_HA)) - ); + assert_eq!(::std::mem::size_of::(), 66usize, "Size of TPMT_HA"); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_HA)) + "Alignment of TPMT_HA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_HA), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMT_HA::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_HA), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_HA::digest" ); } impl Default for TPMT_HA { @@ -917,32 +830,22 @@ fn bindgen_test_layout_TPM2B_DIGEST() { assert_eq!( ::std::mem::size_of::(), 66usize, - concat!("Size of: ", stringify!(TPM2B_DIGEST)) + "Size of TPM2B_DIGEST" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_DIGEST)) + "Alignment of TPM2B_DIGEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DIGEST), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_DIGEST::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DIGEST), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_DIGEST::buffer" ); } impl Default for TPM2B_DIGEST { @@ -967,32 +870,22 @@ fn bindgen_test_layout_TPM2B_DATA() { assert_eq!( ::std::mem::size_of::(), 66usize, - concat!("Size of: ", stringify!(TPM2B_DATA)) + "Size of TPM2B_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_DATA)) + "Alignment of TPM2B_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_DATA::buffer" ); } impl Default for TPM2B_DATA { @@ -1020,32 +913,22 @@ fn bindgen_test_layout_TPM2B_EVENT() { assert_eq!( ::std::mem::size_of::(), 1026usize, - concat!("Size of: ", stringify!(TPM2B_EVENT)) + "Size of TPM2B_EVENT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_EVENT)) + "Alignment of TPM2B_EVENT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_EVENT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_EVENT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_EVENT), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_EVENT::buffer" ); } impl Default for TPM2B_EVENT { @@ -1070,32 +953,22 @@ fn bindgen_test_layout_TPM2B_MAX_BUFFER() { assert_eq!( ::std::mem::size_of::(), 1026usize, - concat!("Size of: ", stringify!(TPM2B_MAX_BUFFER)) + "Size of TPM2B_MAX_BUFFER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_MAX_BUFFER)) + "Alignment of TPM2B_MAX_BUFFER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_BUFFER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_MAX_BUFFER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_BUFFER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_MAX_BUFFER::buffer" ); } impl Default for TPM2B_MAX_BUFFER { @@ -1120,32 +993,22 @@ fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() { assert_eq!( ::std::mem::size_of::(), 2050usize, - concat!("Size of: ", stringify!(TPM2B_MAX_NV_BUFFER)) + "Size of TPM2B_MAX_NV_BUFFER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_MAX_NV_BUFFER)) + "Alignment of TPM2B_MAX_NV_BUFFER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_NV_BUFFER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_MAX_NV_BUFFER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_NV_BUFFER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_MAX_NV_BUFFER::buffer" ); } impl Default for TPM2B_MAX_NV_BUFFER { @@ -1171,32 +1034,22 @@ fn bindgen_test_layout_TPM2B_IV() { assert_eq!( ::std::mem::size_of::(), 18usize, - concat!("Size of: ", stringify!(TPM2B_IV)) + "Size of TPM2B_IV" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_IV)) + "Alignment of TPM2B_IV" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_IV), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_IV::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_IV), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_IV::buffer" ); } #[repr(C)] @@ -1212,32 +1065,22 @@ fn bindgen_test_layout_TPMU_NAME() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(TPMU_NAME)) + "Size of TPMU_NAME" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_NAME)) + "Alignment of TPMU_NAME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_NAME), - "::", - stringify!(digest) - ) + "Offset of field: TPMU_NAME::digest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_NAME), - "::", - stringify!(handle) - ) + "Offset of field: TPMU_NAME::handle" ); } impl Default for TPMU_NAME { @@ -1262,32 +1105,22 @@ fn bindgen_test_layout_TPM2B_NAME() { assert_eq!( ::std::mem::size_of::(), 70usize, - concat!("Size of: ", stringify!(TPM2B_NAME)) + "Size of TPM2B_NAME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_NAME)) + "Alignment of TPM2B_NAME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NAME), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_NAME::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NAME), - "::", - stringify!(name) - ) + "Offset of field: TPM2B_NAME::name" ); } impl Default for TPM2B_NAME { @@ -1312,32 +1145,22 @@ fn bindgen_test_layout_TPMS_PCR_SELECT() { assert_eq!( ::std::mem::size_of::(), 5usize, - concat!("Size of: ", stringify!(TPMS_PCR_SELECT)) + "Size of TPMS_PCR_SELECT" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMS_PCR_SELECT)) + "Alignment of TPMS_PCR_SELECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECT), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_PCR_SELECT::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECT), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_PCR_SELECT::pcrSelect" ); } #[repr(C)] @@ -1354,42 +1177,27 @@ fn bindgen_test_layout_TPMS_PCR_SELECTION() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_PCR_SELECTION)) + "Size of TPMS_PCR_SELECTION" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_PCR_SELECTION)) + "Alignment of TPMS_PCR_SELECTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_PCR_SELECTION::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_PCR_SELECTION::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_PCR_SELECTION::pcrSelect" ); } #[repr(C)] @@ -1406,42 +1214,27 @@ fn bindgen_test_layout_TPMT_TK_CREATION() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_CREATION)) + "Size of TPMT_TK_CREATION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_CREATION)) + "Alignment of TPMT_TK_CREATION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_CREATION::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_CREATION::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_CREATION::digest" ); } impl Default for TPMT_TK_CREATION { @@ -1467,42 +1260,27 @@ fn bindgen_test_layout_TPMT_TK_VERIFIED() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_VERIFIED)) + "Size of TPMT_TK_VERIFIED" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_VERIFIED)) + "Alignment of TPMT_TK_VERIFIED" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_VERIFIED::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_VERIFIED::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_VERIFIED::digest" ); } impl Default for TPMT_TK_VERIFIED { @@ -1528,42 +1306,27 @@ fn bindgen_test_layout_TPMT_TK_AUTH() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_AUTH)) + "Size of TPMT_TK_AUTH" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_AUTH)) + "Alignment of TPMT_TK_AUTH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_AUTH::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_AUTH::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_AUTH::digest" ); } impl Default for TPMT_TK_AUTH { @@ -1589,42 +1352,27 @@ fn bindgen_test_layout_TPMT_TK_HASHCHECK() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_HASHCHECK)) + "Size of TPMT_TK_HASHCHECK" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_HASHCHECK)) + "Alignment of TPMT_TK_HASHCHECK" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_HASHCHECK::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_HASHCHECK::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_HASHCHECK::digest" ); } impl Default for TPMT_TK_HASHCHECK { @@ -1649,32 +1397,22 @@ fn bindgen_test_layout_TPMS_ALG_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_ALG_PROPERTY)) + "Size of TPMS_ALG_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ALG_PROPERTY)) + "Alignment of TPMS_ALG_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALG_PROPERTY), - "::", - stringify!(alg) - ) + "Offset of field: TPMS_ALG_PROPERTY::alg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALG_PROPERTY), - "::", - stringify!(algProperties) - ) + "Offset of field: TPMS_ALG_PROPERTY::algProperties" ); } #[repr(C)] @@ -1690,32 +1428,22 @@ fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_PROPERTY)) + "Size of TPMS_TAGGED_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_PROPERTY)) + "Alignment of TPMS_TAGGED_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PROPERTY), - "::", - stringify!(property) - ) + "Offset of field: TPMS_TAGGED_PROPERTY::property" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PROPERTY), - "::", - stringify!(value) - ) + "Offset of field: TPMS_TAGGED_PROPERTY::value" ); } #[repr(C)] @@ -1733,42 +1461,27 @@ fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_PCR_SELECT)) + "Size of TPMS_TAGGED_PCR_SELECT" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_PCR_SELECT)) + "Alignment of TPMS_TAGGED_PCR_SELECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(tag) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 5usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::pcrSelect" ); } #[repr(C)] @@ -1784,32 +1497,22 @@ fn bindgen_test_layout_TPMS_TAGGED_POLICY() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_POLICY)) + "Size of TPMS_TAGGED_POLICY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_POLICY)) + "Alignment of TPMS_TAGGED_POLICY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_POLICY), - "::", - stringify!(handle) - ) + "Offset of field: TPMS_TAGGED_POLICY::handle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).policyHash) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_POLICY), - "::", - stringify!(policyHash) - ) + "Offset of field: TPMS_TAGGED_POLICY::policyHash" ); } impl Default for TPMS_TAGGED_POLICY { @@ -1835,42 +1538,27 @@ fn bindgen_test_layout_TPMS_ACT_DATA() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_ACT_DATA)) + "Size of TPMS_ACT_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ACT_DATA)) + "Alignment of TPMS_ACT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(handle) - ) + "Offset of field: TPMS_ACT_DATA::handle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(timeout) - ) + "Offset of field: TPMS_ACT_DATA::timeout" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_ACT_DATA::attributes" ); } #[repr(C)] @@ -1886,32 +1574,22 @@ fn bindgen_test_layout_TPML_CC() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_CC)) + "Size of TPML_CC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_CC)) + "Alignment of TPML_CC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_CC), - "::", - stringify!(count) - ) + "Offset of field: TPML_CC::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandCodes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_CC), - "::", - stringify!(commandCodes) - ) + "Offset of field: TPML_CC::commandCodes" ); } impl Default for TPML_CC { @@ -1936,32 +1614,22 @@ fn bindgen_test_layout_TPML_CCA() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_CCA)) + "Size of TPML_CCA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_CCA)) + "Alignment of TPML_CCA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_CCA), - "::", - stringify!(count) - ) + "Offset of field: TPML_CCA::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandAttributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_CCA), - "::", - stringify!(commandAttributes) - ) + "Offset of field: TPML_CCA::commandAttributes" ); } impl Default for TPML_CCA { @@ -1986,32 +1654,22 @@ fn bindgen_test_layout_TPML_ALG() { assert_eq!( ::std::mem::size_of::(), 260usize, - concat!("Size of: ", stringify!(TPML_ALG)) + "Size of TPML_ALG" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ALG)) + "Alignment of TPML_ALG" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG), - "::", - stringify!(count) - ) + "Offset of field: TPML_ALG::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG), - "::", - stringify!(algorithms) - ) + "Offset of field: TPML_ALG::algorithms" ); } impl Default for TPML_ALG { @@ -2036,32 +1694,22 @@ fn bindgen_test_layout_TPML_HANDLE() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_HANDLE)) + "Size of TPML_HANDLE" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_HANDLE)) + "Alignment of TPML_HANDLE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_HANDLE), - "::", - stringify!(count) - ) + "Offset of field: TPML_HANDLE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_HANDLE), - "::", - stringify!(handle) - ) + "Offset of field: TPML_HANDLE::handle" ); } impl Default for TPML_HANDLE { @@ -2086,32 +1734,22 @@ fn bindgen_test_layout_TPML_DIGEST() { assert_eq!( ::std::mem::size_of::(), 532usize, - concat!("Size of: ", stringify!(TPML_DIGEST)) + "Size of TPML_DIGEST" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_DIGEST)) + "Alignment of TPML_DIGEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST), - "::", - stringify!(count) - ) + "Offset of field: TPML_DIGEST::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST), - "::", - stringify!(digests) - ) + "Offset of field: TPML_DIGEST::digests" ); } impl Default for TPML_DIGEST { @@ -2136,32 +1774,22 @@ fn bindgen_test_layout_TPML_DIGEST_VALUES() { assert_eq!( ::std::mem::size_of::(), 1060usize, - concat!("Size of: ", stringify!(TPML_DIGEST_VALUES)) + "Size of TPML_DIGEST_VALUES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_DIGEST_VALUES)) + "Alignment of TPML_DIGEST_VALUES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST_VALUES), - "::", - stringify!(count) - ) + "Offset of field: TPML_DIGEST_VALUES::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST_VALUES), - "::", - stringify!(digests) - ) + "Offset of field: TPML_DIGEST_VALUES::digests" ); } impl Default for TPML_DIGEST_VALUES { @@ -2186,32 +1814,22 @@ fn bindgen_test_layout_TPML_PCR_SELECTION() { assert_eq!( ::std::mem::size_of::(), 132usize, - concat!("Size of: ", stringify!(TPML_PCR_SELECTION)) + "Size of TPML_PCR_SELECTION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_PCR_SELECTION)) + "Alignment of TPML_PCR_SELECTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_PCR_SELECTION), - "::", - stringify!(count) - ) + "Offset of field: TPML_PCR_SELECTION::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelections) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_PCR_SELECTION), - "::", - stringify!(pcrSelections) - ) + "Offset of field: TPML_PCR_SELECTION::pcrSelections" ); } #[repr(C)] @@ -2227,32 +1845,22 @@ fn bindgen_test_layout_TPML_ALG_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_ALG_PROPERTY)) + "Size of TPML_ALG_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ALG_PROPERTY)) + "Alignment of TPML_ALG_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_ALG_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG_PROPERTY), - "::", - stringify!(algProperties) - ) + "Offset of field: TPML_ALG_PROPERTY::algProperties" ); } impl Default for TPML_ALG_PROPERTY { @@ -2278,32 +1886,22 @@ fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_TAGGED_TPM_PROPERTY)) + "Size of TPML_TAGGED_TPM_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_TPM_PROPERTY)) + "Alignment of TPML_TAGGED_TPM_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_TPM_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_TPM_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tpmProperty) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_TPM_PROPERTY), - "::", - stringify!(tpmProperty) - ) + "Offset of field: TPML_TAGGED_TPM_PROPERTY::tpmProperty" ); } impl Default for TPML_TAGGED_TPM_PROPERTY { @@ -2329,32 +1927,22 @@ fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_TAGGED_PCR_PROPERTY)) + "Size of TPML_TAGGED_PCR_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_PCR_PROPERTY)) + "Alignment of TPML_TAGGED_PCR_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_PCR_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_PCR_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrProperty) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_PCR_PROPERTY), - "::", - stringify!(pcrProperty) - ) + "Offset of field: TPML_TAGGED_PCR_PROPERTY::pcrProperty" ); } impl Default for TPML_TAGGED_PCR_PROPERTY { @@ -2379,32 +1967,22 @@ fn bindgen_test_layout_TPML_ECC_CURVE() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_ECC_CURVE)) + "Size of TPML_ECC_CURVE" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ECC_CURVE)) + "Alignment of TPML_ECC_CURVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ECC_CURVE), - "::", - stringify!(count) - ) + "Offset of field: TPML_ECC_CURVE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ECC_CURVE), - "::", - stringify!(eccCurves) - ) + "Offset of field: TPML_ECC_CURVE::eccCurves" ); } impl Default for TPML_ECC_CURVE { @@ -2429,32 +2007,22 @@ fn bindgen_test_layout_TPML_TAGGED_POLICY() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_TAGGED_POLICY)) + "Size of TPML_TAGGED_POLICY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_POLICY)) + "Alignment of TPML_TAGGED_POLICY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_POLICY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_POLICY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).policies) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_POLICY), - "::", - stringify!(policies) - ) + "Offset of field: TPML_TAGGED_POLICY::policies" ); } impl Default for TPML_TAGGED_POLICY { @@ -2479,32 +2047,22 @@ fn bindgen_test_layout_TPML_ACT_DATA() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_ACT_DATA)) + "Size of TPML_ACT_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ACT_DATA)) + "Alignment of TPML_ACT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ACT_DATA), - "::", - stringify!(count) - ) + "Offset of field: TPML_ACT_DATA::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actData) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ACT_DATA), - "::", - stringify!(actData) - ) + "Offset of field: TPML_ACT_DATA::actData" ); } impl Default for TPML_ACT_DATA { @@ -2530,32 +2088,22 @@ fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_INTEL_PTT_PROPERTY)) + "Size of TPML_INTEL_PTT_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_INTEL_PTT_PROPERTY)) + "Alignment of TPML_INTEL_PTT_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_INTEL_PTT_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_INTEL_PTT_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_INTEL_PTT_PROPERTY), - "::", - stringify!(property) - ) + "Offset of field: TPML_INTEL_PTT_PROPERTY::property" ); } impl Default for TPML_INTEL_PTT_PROPERTY { @@ -2590,132 +2138,72 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPMU_CAPABILITIES)) + "Size of TPMU_CAPABILITIES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_CAPABILITIES)) + "Alignment of TPMU_CAPABILITIES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(algorithms) - ) + "Offset of field: TPMU_CAPABILITIES::algorithms" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handles) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(handles) - ) + "Offset of field: TPMU_CAPABILITIES::handles" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).command) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(command) - ) + "Offset of field: TPMU_CAPABILITIES::command" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ppCommands) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(ppCommands) - ) + "Offset of field: TPMU_CAPABILITIES::ppCommands" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditCommands) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(auditCommands) - ) + "Offset of field: TPMU_CAPABILITIES::auditCommands" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assignedPCR) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(assignedPCR) - ) + "Offset of field: TPMU_CAPABILITIES::assignedPCR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tpmProperties) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(tpmProperties) - ) + "Offset of field: TPMU_CAPABILITIES::tpmProperties" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrProperties) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(pcrProperties) - ) + "Offset of field: TPMU_CAPABILITIES::pcrProperties" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(eccCurves) - ) + "Offset of field: TPMU_CAPABILITIES::eccCurves" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicies) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(authPolicies) - ) + "Offset of field: TPMU_CAPABILITIES::authPolicies" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(actData) - ) + "Offset of field: TPMU_CAPABILITIES::actData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).intelPttProperty) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(intelPttProperty) - ) + "Offset of field: TPMU_CAPABILITIES::intelPttProperty" ); } impl Default for TPMU_CAPABILITIES { @@ -2740,32 +2228,22 @@ fn bindgen_test_layout_TPMS_CAPABILITY_DATA() { assert_eq!( ::std::mem::size_of::(), 1032usize, - concat!("Size of: ", stringify!(TPMS_CAPABILITY_DATA)) + "Size of TPMS_CAPABILITY_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_CAPABILITY_DATA)) + "Alignment of TPMS_CAPABILITY_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CAPABILITY_DATA), - "::", - stringify!(capability) - ) + "Offset of field: TPMS_CAPABILITY_DATA::capability" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CAPABILITY_DATA), - "::", - stringify!(data) - ) + "Offset of field: TPMS_CAPABILITY_DATA::data" ); } impl Default for TPMS_CAPABILITY_DATA { @@ -2792,52 +2270,32 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(TPMS_CLOCK_INFO)) + "Size of TPMS_CLOCK_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_CLOCK_INFO)) + "Alignment of TPMS_CLOCK_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(clock) - ) + "Offset of field: TPMS_CLOCK_INFO::clock" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resetCount) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(resetCount) - ) + "Offset of field: TPMS_CLOCK_INFO::resetCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).restartCount) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(restartCount) - ) + "Offset of field: TPMS_CLOCK_INFO::restartCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).safe) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(safe) - ) + "Offset of field: TPMS_CLOCK_INFO::safe" ); } #[repr(C)] @@ -2853,32 +2311,22 @@ fn bindgen_test_layout_TPMS_TIME_INFO() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(TPMS_TIME_INFO)) + "Size of TPMS_TIME_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_TIME_INFO)) + "Alignment of TPMS_TIME_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_INFO), - "::", - stringify!(time) - ) + "Offset of field: TPMS_TIME_INFO::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_INFO), - "::", - stringify!(clockInfo) - ) + "Offset of field: TPMS_TIME_INFO::clockInfo" ); } #[repr(C)] @@ -2895,32 +2343,22 @@ fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(TPMS_TIME_ATTEST_INFO)) + "Size of TPMS_TIME_ATTEST_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_TIME_ATTEST_INFO)) + "Alignment of TPMS_TIME_ATTEST_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_ATTEST_INFO), - "::", - stringify!(time) - ) + "Offset of field: TPMS_TIME_ATTEST_INFO::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_ATTEST_INFO), - "::", - stringify!(firmwareVersion) - ) + "Offset of field: TPMS_TIME_ATTEST_INFO::firmwareVersion" ); } #[repr(C)] @@ -2936,32 +2374,22 @@ fn bindgen_test_layout_TPMS_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 140usize, - concat!("Size of: ", stringify!(TPMS_CERTIFY_INFO)) + "Size of TPMS_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CERTIFY_INFO)) + "Alignment of TPMS_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CERTIFY_INFO), - "::", - stringify!(name) - ) + "Offset of field: TPMS_CERTIFY_INFO::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qualifiedName) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CERTIFY_INFO), - "::", - stringify!(qualifiedName) - ) + "Offset of field: TPMS_CERTIFY_INFO::qualifiedName" ); } impl Default for TPMS_CERTIFY_INFO { @@ -2986,32 +2414,22 @@ fn bindgen_test_layout_TPMS_QUOTE_INFO() { assert_eq!( ::std::mem::size_of::(), 200usize, - concat!("Size of: ", stringify!(TPMS_QUOTE_INFO)) + "Size of TPMS_QUOTE_INFO" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_QUOTE_INFO)) + "Alignment of TPMS_QUOTE_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_QUOTE_INFO), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_QUOTE_INFO::pcrSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_QUOTE_INFO), - "::", - stringify!(pcrDigest) - ) + "Offset of field: TPMS_QUOTE_INFO::pcrDigest" ); } impl Default for TPMS_QUOTE_INFO { @@ -3039,52 +2457,32 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { assert_eq!( ::std::mem::size_of::(), 144usize, - concat!("Size of: ", stringify!(TPMS_COMMAND_AUDIT_INFO)) + "Size of TPMS_COMMAND_AUDIT_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_COMMAND_AUDIT_INFO)) + "Alignment of TPMS_COMMAND_AUDIT_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditCounter) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(auditCounter) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::auditCounter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digestAlg) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(digestAlg) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::digestAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditDigest) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(auditDigest) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::auditDigest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandDigest) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(commandDigest) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::commandDigest" ); } impl Default for TPMS_COMMAND_AUDIT_INFO { @@ -3110,32 +2508,22 @@ fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(TPMS_SESSION_AUDIT_INFO)) + "Size of TPMS_SESSION_AUDIT_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SESSION_AUDIT_INFO)) + "Alignment of TPMS_SESSION_AUDIT_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveSession) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SESSION_AUDIT_INFO), - "::", - stringify!(exclusiveSession) - ) + "Offset of field: TPMS_SESSION_AUDIT_INFO::exclusiveSession" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionDigest) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SESSION_AUDIT_INFO), - "::", - stringify!(sessionDigest) - ) + "Offset of field: TPMS_SESSION_AUDIT_INFO::sessionDigest" ); } impl Default for TPMS_SESSION_AUDIT_INFO { @@ -3160,32 +2548,22 @@ fn bindgen_test_layout_TPMS_CREATION_INFO() { assert_eq!( ::std::mem::size_of::(), 136usize, - concat!("Size of: ", stringify!(TPMS_CREATION_INFO)) + "Size of TPMS_CREATION_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CREATION_INFO)) + "Alignment of TPMS_CREATION_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objectName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_INFO), - "::", - stringify!(objectName) - ) + "Offset of field: TPMS_CREATION_INFO::objectName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creationHash) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_INFO), - "::", - stringify!(creationHash) - ) + "Offset of field: TPMS_CREATION_INFO::creationHash" ); } impl Default for TPMS_CREATION_INFO { @@ -3211,42 +2589,27 @@ fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 2122usize, - concat!("Size of: ", stringify!(TPMS_NV_CERTIFY_INFO)) + "Size of TPMS_NV_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_NV_CERTIFY_INFO)) + "Alignment of TPMS_NV_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(indexName) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::indexName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(offset) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::offset" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvContents) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(nvContents) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::nvContents" ); } impl Default for TPMS_NV_CERTIFY_INFO { @@ -3272,32 +2635,22 @@ fn bindgen_test_layout_TPMS_NV_DIGEST_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 136usize, - concat!("Size of: ", stringify!(TPMS_NV_DIGEST_CERTIFY_INFO)) + "Size of TPMS_NV_DIGEST_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_NV_DIGEST_CERTIFY_INFO)) + "Alignment of TPMS_NV_DIGEST_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_DIGEST_CERTIFY_INFO), - "::", - stringify!(indexName) - ) + "Offset of field: TPMS_NV_DIGEST_CERTIFY_INFO::indexName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvDigest) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_DIGEST_CERTIFY_INFO), - "::", - stringify!(nvDigest) - ) + "Offset of field: TPMS_NV_DIGEST_CERTIFY_INFO::nvDigest" ); } impl Default for TPMS_NV_DIGEST_CERTIFY_INFO { @@ -3328,82 +2681,47 @@ fn bindgen_test_layout_TPMU_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2128usize, - concat!("Size of: ", stringify!(TPMU_ATTEST)) + "Size of TPMU_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMU_ATTEST)) + "Alignment of TPMU_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).certify) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(certify) - ) + "Offset of field: TPMU_ATTEST::certify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(creation) - ) + "Offset of field: TPMU_ATTEST::creation" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quote) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(quote) - ) + "Offset of field: TPMU_ATTEST::quote" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandAudit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(commandAudit) - ) + "Offset of field: TPMU_ATTEST::commandAudit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAudit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(sessionAudit) - ) + "Offset of field: TPMU_ATTEST::sessionAudit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(time) - ) + "Offset of field: TPMU_ATTEST::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nv) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(nv) - ) + "Offset of field: TPMU_ATTEST::nv" ); } impl Default for TPMU_ATTEST { @@ -3433,82 +2751,47 @@ fn bindgen_test_layout_TPMS_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2304usize, - concat!("Size of: ", stringify!(TPMS_ATTEST)) + "Size of TPMS_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_ATTEST)) + "Alignment of TPMS_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(magic) - ) + "Offset of field: TPMS_ATTEST::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(type_) - ) + "Offset of field: TPMS_ATTEST::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qualifiedSigner) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(qualifiedSigner) - ) + "Offset of field: TPMS_ATTEST::qualifiedSigner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraData) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(extraData) - ) + "Offset of field: TPMS_ATTEST::extraData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(clockInfo) - ) + "Offset of field: TPMS_ATTEST::clockInfo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(firmwareVersion) - ) + "Offset of field: TPMS_ATTEST::firmwareVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attested) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(attested) - ) + "Offset of field: TPMS_ATTEST::attested" ); } impl Default for TPMS_ATTEST { @@ -3533,32 +2816,22 @@ fn bindgen_test_layout_TPM2B_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2306usize, - concat!("Size of: ", stringify!(TPM2B_ATTEST)) + "Size of TPM2B_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ATTEST)) + "Alignment of TPM2B_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ATTEST), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ATTEST::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attestationData) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ATTEST), - "::", - stringify!(attestationData) - ) + "Offset of field: TPM2B_ATTEST::attestationData" ); } impl Default for TPM2B_ATTEST { @@ -3585,52 +2858,32 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { assert_eq!( ::std::mem::size_of::(), 140usize, - concat!("Size of: ", stringify!(TPMS_AUTH_COMMAND)) + "Size of TPMS_AUTH_COMMAND" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_AUTH_COMMAND)) + "Alignment of TPMS_AUTH_COMMAND" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionHandle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(sessionHandle) - ) + "Offset of field: TPMS_AUTH_COMMAND::sessionHandle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(nonce) - ) + "Offset of field: TPMS_AUTH_COMMAND::nonce" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(sessionAttributes) - ) + "Offset of field: TPMS_AUTH_COMMAND::sessionAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(hmac) - ) + "Offset of field: TPMS_AUTH_COMMAND::hmac" ); } impl Default for TPMS_AUTH_COMMAND { @@ -3656,42 +2909,27 @@ fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { assert_eq!( ::std::mem::size_of::(), 134usize, - concat!("Size of: ", stringify!(TPMS_AUTH_RESPONSE)) + "Size of TPMS_AUTH_RESPONSE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_AUTH_RESPONSE)) + "Alignment of TPMS_AUTH_RESPONSE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(nonce) - ) + "Offset of field: TPMS_AUTH_RESPONSE::nonce" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(sessionAttributes) - ) + "Offset of field: TPMS_AUTH_RESPONSE::sessionAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(hmac) - ) + "Offset of field: TPMS_AUTH_RESPONSE::hmac" ); } impl Default for TPMS_AUTH_RESPONSE { @@ -3722,62 +2960,37 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_SYM_KEY_BITS)) + "Size of TPMU_SYM_KEY_BITS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SYM_KEY_BITS)) + "Alignment of TPMU_SYM_KEY_BITS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(aes) - ) + "Offset of field: TPMU_SYM_KEY_BITS::aes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(sm4) - ) + "Offset of field: TPMU_SYM_KEY_BITS::sm4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(camellia) - ) + "Offset of field: TPMU_SYM_KEY_BITS::camellia" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SYM_KEY_BITS::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(exclusiveOr) - ) + "Offset of field: TPMU_SYM_KEY_BITS::exclusiveOr" ); } impl Default for TPMU_SYM_KEY_BITS { @@ -3804,52 +3017,32 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_SYM_MODE)) + "Size of TPMU_SYM_MODE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SYM_MODE)) + "Alignment of TPMU_SYM_MODE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(aes) - ) + "Offset of field: TPMU_SYM_MODE::aes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(sm4) - ) + "Offset of field: TPMU_SYM_MODE::sm4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(camellia) - ) + "Offset of field: TPMU_SYM_MODE::camellia" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SYM_MODE::sym" ); } impl Default for TPMU_SYM_MODE { @@ -3875,42 +3068,27 @@ fn bindgen_test_layout_TPMT_SYM_DEF() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SYM_DEF)) + "Size of TPMT_SYM_DEF" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SYM_DEF)) + "Alignment of TPMT_SYM_DEF" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(algorithm) - ) + "Offset of field: TPMT_SYM_DEF::algorithm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMT_SYM_DEF::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(mode) - ) + "Offset of field: TPMT_SYM_DEF::mode" ); } impl Default for TPMT_SYM_DEF { @@ -3936,42 +3114,27 @@ fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SYM_DEF_OBJECT)) + "Size of TPMT_SYM_DEF_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SYM_DEF_OBJECT)) + "Alignment of TPMT_SYM_DEF_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(algorithm) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::algorithm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(mode) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::mode" ); } impl Default for TPMT_SYM_DEF_OBJECT { @@ -3996,32 +3159,22 @@ fn bindgen_test_layout_TPM2B_SYM_KEY() { assert_eq!( ::std::mem::size_of::(), 34usize, - concat!("Size of: ", stringify!(TPM2B_SYM_KEY)) + "Size of TPM2B_SYM_KEY" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SYM_KEY)) + "Alignment of TPM2B_SYM_KEY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SYM_KEY), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SYM_KEY::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SYM_KEY), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_SYM_KEY::buffer" ); } #[repr(C)] @@ -4036,22 +3189,17 @@ fn bindgen_test_layout_TPMS_SYMCIPHER_PARMS() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMS_SYMCIPHER_PARMS)) + "Size of TPMS_SYMCIPHER_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SYMCIPHER_PARMS)) + "Alignment of TPMS_SYMCIPHER_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SYMCIPHER_PARMS), - "::", - stringify!(sym) - ) + "Offset of field: TPMS_SYMCIPHER_PARMS::sym" ); } impl Default for TPMS_SYMCIPHER_PARMS { @@ -4076,32 +3224,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() { assert_eq!( ::std::mem::size_of::(), 258usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE_DATA)) + "Size of TPM2B_SENSITIVE_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_DATA)) + "Alignment of TPM2B_SENSITIVE_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_SENSITIVE_DATA::buffer" ); } impl Default for TPM2B_SENSITIVE_DATA { @@ -4127,32 +3265,22 @@ fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() { assert_eq!( ::std::mem::size_of::(), 324usize, - concat!("Size of: ", stringify!(TPMS_SENSITIVE_CREATE)) + "Size of TPMS_SENSITIVE_CREATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SENSITIVE_CREATE)) + "Alignment of TPMS_SENSITIVE_CREATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userAuth) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SENSITIVE_CREATE), - "::", - stringify!(userAuth) - ) + "Offset of field: TPMS_SENSITIVE_CREATE::userAuth" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SENSITIVE_CREATE), - "::", - stringify!(data) - ) + "Offset of field: TPMS_SENSITIVE_CREATE::data" ); } impl Default for TPMS_SENSITIVE_CREATE { @@ -4178,32 +3306,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() { assert_eq!( ::std::mem::size_of::(), 326usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE_CREATE)) + "Size of TPM2B_SENSITIVE_CREATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_CREATE)) + "Alignment of TPM2B_SENSITIVE_CREATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_CREATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE_CREATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_CREATE), - "::", - stringify!(sensitive) - ) + "Offset of field: TPM2B_SENSITIVE_CREATE::sensitive" ); } impl Default for TPM2B_SENSITIVE_CREATE { @@ -4227,22 +3345,17 @@ fn bindgen_test_layout_TPMS_SCHEME_HASH() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_HASH)) + "Size of TPMS_SCHEME_HASH" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_HASH)) + "Alignment of TPMS_SCHEME_HASH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_HASH), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_HASH::hashAlg" ); } #[repr(C)] @@ -4258,32 +3371,22 @@ fn bindgen_test_layout_TPMS_SCHEME_ECDAA() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_ECDAA)) + "Size of TPMS_SCHEME_ECDAA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_ECDAA)) + "Alignment of TPMS_SCHEME_ECDAA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_ECDAA), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_ECDAA::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_ECDAA), - "::", - stringify!(count) - ) + "Offset of field: TPMS_SCHEME_ECDAA::count" ); } pub type TPMI_ALG_KEYEDHASH_SCHEME = TPM2_ALG_ID; @@ -4301,32 +3404,22 @@ fn bindgen_test_layout_TPMS_SCHEME_XOR() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_XOR)) + "Size of TPMS_SCHEME_XOR" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_XOR)) + "Alignment of TPMS_SCHEME_XOR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_XOR), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_XOR::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_XOR), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_SCHEME_XOR::kdf" ); } #[repr(C)] @@ -4343,32 +3436,22 @@ fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_SCHEME_KEYEDHASH)) + "Size of TPMU_SCHEME_KEYEDHASH" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SCHEME_KEYEDHASH)) + "Alignment of TPMU_SCHEME_KEYEDHASH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SCHEME_KEYEDHASH), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SCHEME_KEYEDHASH::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SCHEME_KEYEDHASH), - "::", - stringify!(exclusiveOr) - ) + "Offset of field: TPMU_SCHEME_KEYEDHASH::exclusiveOr" ); } impl Default for TPMU_SCHEME_KEYEDHASH { @@ -4394,32 +3477,22 @@ fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_KEYEDHASH_SCHEME)) + "Size of TPMT_KEYEDHASH_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_KEYEDHASH_SCHEME)) + "Alignment of TPMT_KEYEDHASH_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KEYEDHASH_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_KEYEDHASH_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KEYEDHASH_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_KEYEDHASH_SCHEME::details" ); } impl Default for TPMT_KEYEDHASH_SCHEME { @@ -4456,92 +3529,52 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_SIG_SCHEME)) + "Size of TPMU_SIG_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SIG_SCHEME)) + "Alignment of TPMU_SIG_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_SIG_SCHEME::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_SIG_SCHEME::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_SIG_SCHEME::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_SIG_SCHEME::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_SIG_SCHEME::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_SIG_SCHEME::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SIG_SCHEME::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SIG_SCHEME::any" ); } impl Default for TPMU_SIG_SCHEME { @@ -4566,32 +3599,22 @@ fn bindgen_test_layout_TPMT_SIG_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SIG_SCHEME)) + "Size of TPMT_SIG_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SIG_SCHEME)) + "Alignment of TPMT_SIG_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIG_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_SIG_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIG_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_SIG_SCHEME::details" ); } impl Default for TPMT_SIG_SCHEME { @@ -4626,52 +3649,32 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_KDF_SCHEME)) + "Size of TPMU_KDF_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_KDF_SCHEME)) + "Alignment of TPMU_KDF_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mgf1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(mgf1) - ) + "Offset of field: TPMU_KDF_SCHEME::mgf1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_56a) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf1_sp800_56a) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf1_sp800_56a" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf2) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_108) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf1_sp800_108) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf1_sp800_108" ); } impl Default for TPMU_KDF_SCHEME { @@ -4696,32 +3699,22 @@ fn bindgen_test_layout_TPMT_KDF_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMT_KDF_SCHEME)) + "Size of TPMT_KDF_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_KDF_SCHEME)) + "Alignment of TPMT_KDF_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KDF_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_KDF_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KDF_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_KDF_SCHEME::details" ); } impl Default for TPMT_KDF_SCHEME { @@ -4756,122 +3749,67 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_ASYM_SCHEME)) + "Size of TPMU_ASYM_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_ASYM_SCHEME)) + "Alignment of TPMU_ASYM_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdh) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdh) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecmqv) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecmqv) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecmqv" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_ASYM_SCHEME::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsaes) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsaes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oaep) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(oaep) - ) + "Offset of field: TPMU_ASYM_SCHEME::oaep" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anySig) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(anySig) - ) + "Offset of field: TPMU_ASYM_SCHEME::anySig" ); } impl Default for TPMU_ASYM_SCHEME { @@ -4896,32 +3834,22 @@ fn bindgen_test_layout_TPMT_ASYM_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_ASYM_SCHEME)) + "Size of TPMT_ASYM_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_ASYM_SCHEME)) + "Alignment of TPMT_ASYM_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ASYM_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_ASYM_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ASYM_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_ASYM_SCHEME::details" ); } impl Default for TPMT_ASYM_SCHEME { @@ -4947,32 +3875,22 @@ fn bindgen_test_layout_TPMT_RSA_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_RSA_SCHEME)) + "Size of TPMT_RSA_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_RSA_SCHEME)) + "Alignment of TPMT_RSA_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_RSA_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_RSA_SCHEME::details" ); } impl Default for TPMT_RSA_SCHEME { @@ -4998,32 +3916,22 @@ fn bindgen_test_layout_TPMT_RSA_DECRYPT() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_RSA_DECRYPT)) + "Size of TPMT_RSA_DECRYPT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_RSA_DECRYPT)) + "Alignment of TPMT_RSA_DECRYPT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_DECRYPT), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_RSA_DECRYPT::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_DECRYPT), - "::", - stringify!(details) - ) + "Offset of field: TPMT_RSA_DECRYPT::details" ); } impl Default for TPMT_RSA_DECRYPT { @@ -5048,32 +3956,22 @@ fn bindgen_test_layout_TPM2B_PUBLIC_KEY_RSA() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPM2B_PUBLIC_KEY_RSA)) + "Size of TPM2B_PUBLIC_KEY_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PUBLIC_KEY_RSA)) + "Alignment of TPM2B_PUBLIC_KEY_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC_KEY_RSA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PUBLIC_KEY_RSA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC_KEY_RSA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PUBLIC_KEY_RSA::buffer" ); } impl Default for TPM2B_PUBLIC_KEY_RSA { @@ -5100,32 +3998,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { assert_eq!( ::std::mem::size_of::(), 258usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE_KEY_RSA)) + "Size of TPM2B_PRIVATE_KEY_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE_KEY_RSA)) + "Alignment of TPM2B_PRIVATE_KEY_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_KEY_RSA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE_KEY_RSA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_KEY_RSA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE_KEY_RSA::buffer" ); } impl Default for TPM2B_PRIVATE_KEY_RSA { @@ -5150,32 +4038,22 @@ fn bindgen_test_layout_TPM2B_ECC_PARAMETER() { assert_eq!( ::std::mem::size_of::(), 130usize, - concat!("Size of: ", stringify!(TPM2B_ECC_PARAMETER)) + "Size of TPM2B_ECC_PARAMETER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ECC_PARAMETER)) + "Alignment of TPM2B_ECC_PARAMETER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_PARAMETER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ECC_PARAMETER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_PARAMETER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_ECC_PARAMETER::buffer" ); } impl Default for TPM2B_ECC_PARAMETER { @@ -5200,32 +4078,22 @@ fn bindgen_test_layout_TPMS_ECC_POINT() { assert_eq!( ::std::mem::size_of::(), 260usize, - concat!("Size of: ", stringify!(TPMS_ECC_POINT)) + "Size of TPMS_ECC_POINT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ECC_POINT)) + "Alignment of TPMS_ECC_POINT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_POINT), - "::", - stringify!(x) - ) + "Offset of field: TPMS_ECC_POINT::x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 130usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_POINT), - "::", - stringify!(y) - ) + "Offset of field: TPMS_ECC_POINT::y" ); } impl Default for TPMS_ECC_POINT { @@ -5250,32 +4118,22 @@ fn bindgen_test_layout_TPM2B_ECC_POINT() { assert_eq!( ::std::mem::size_of::(), 262usize, - concat!("Size of: ", stringify!(TPM2B_ECC_POINT)) + "Size of TPM2B_ECC_POINT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ECC_POINT)) + "Alignment of TPM2B_ECC_POINT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_POINT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ECC_POINT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).point) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_POINT), - "::", - stringify!(point) - ) + "Offset of field: TPM2B_ECC_POINT::point" ); } impl Default for TPM2B_ECC_POINT { @@ -5302,32 +4160,22 @@ fn bindgen_test_layout_TPMT_ECC_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_ECC_SCHEME)) + "Size of TPMT_ECC_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_ECC_SCHEME)) + "Alignment of TPMT_ECC_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ECC_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_ECC_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ECC_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_ECC_SCHEME::details" ); } impl Default for TPMT_ECC_SCHEME { @@ -5362,122 +4210,67 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { assert_eq!( ::std::mem::size_of::(), 924usize, - concat!("Size of: ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) + "Size of TPMS_ALGORITHM_DETAIL_ECC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) + "Alignment of TPMS_ALGORITHM_DETAIL_ECC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(curveID) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::curveID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keySize) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(keySize) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::keySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::kdf" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sign) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(sign) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::sign" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(p) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::p" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(a) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::a" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, 274usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(b) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::b" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gX) as usize - ptr as usize }, 404usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(gX) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::gX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gY) as usize - ptr as usize }, 534usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(gY) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::gY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize }, 664usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(n) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::n" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, 794usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(h) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::h" ); } impl Default for TPMS_ALGORITHM_DETAIL_ECC { @@ -5502,32 +4295,22 @@ fn bindgen_test_layout_TPMS_SIGNATURE_RSA() { assert_eq!( ::std::mem::size_of::(), 516usize, - concat!("Size of: ", stringify!(TPMS_SIGNATURE_RSA)) + "Size of TPMS_SIGNATURE_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SIGNATURE_RSA)) + "Alignment of TPMS_SIGNATURE_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_RSA), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_SIGNATURE_RSA::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sig) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_RSA), - "::", - stringify!(sig) - ) + "Offset of field: TPMS_SIGNATURE_RSA::sig" ); } impl Default for TPMS_SIGNATURE_RSA { @@ -5555,42 +4338,27 @@ fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { assert_eq!( ::std::mem::size_of::(), 262usize, - concat!("Size of: ", stringify!(TPMS_SIGNATURE_ECC)) + "Size of TPMS_SIGNATURE_ECC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SIGNATURE_ECC)) + "Alignment of TPMS_SIGNATURE_ECC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_SIGNATURE_ECC::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signatureR) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(signatureR) - ) + "Offset of field: TPMS_SIGNATURE_ECC::signatureR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signatureS) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(signatureS) - ) + "Offset of field: TPMS_SIGNATURE_ECC::signatureS" ); } impl Default for TPMS_SIGNATURE_ECC { @@ -5625,92 +4393,52 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { assert_eq!( ::std::mem::size_of::(), 516usize, - concat!("Size of: ", stringify!(TPMU_SIGNATURE)) + "Size of TPMU_SIGNATURE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SIGNATURE)) + "Alignment of TPMU_SIGNATURE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_SIGNATURE::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_SIGNATURE::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_SIGNATURE::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_SIGNATURE::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_SIGNATURE::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_SIGNATURE::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SIGNATURE::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SIGNATURE::any" ); } impl Default for TPMU_SIGNATURE { @@ -5735,32 +4463,22 @@ fn bindgen_test_layout_TPMT_SIGNATURE() { assert_eq!( ::std::mem::size_of::(), 518usize, - concat!("Size of: ", stringify!(TPMT_SIGNATURE)) + "Size of TPMT_SIGNATURE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SIGNATURE)) + "Alignment of TPMT_SIGNATURE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIGNATURE), - "::", - stringify!(sigAlg) - ) + "Offset of field: TPMT_SIGNATURE::sigAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signature) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIGNATURE), - "::", - stringify!(signature) - ) + "Offset of field: TPMT_SIGNATURE::signature" ); } impl Default for TPMT_SIGNATURE { @@ -5788,52 +4506,32 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { assert_eq!( ::std::mem::size_of::(), 512usize, - concat!("Size of: ", stringify!(TPMU_ENCRYPTED_SECRET)) + "Size of TPMU_ENCRYPTED_SECRET" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMU_ENCRYPTED_SECRET)) + "Alignment of TPMU_ENCRYPTED_SECRET" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::ecc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(keyedHash) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::keyedHash" ); } impl Default for TPMU_ENCRYPTED_SECRET { @@ -5859,32 +4557,22 @@ fn bindgen_test_layout_TPM2B_ENCRYPTED_SECRET() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPM2B_ENCRYPTED_SECRET)) + "Size of TPM2B_ENCRYPTED_SECRET" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ENCRYPTED_SECRET)) + "Alignment of TPM2B_ENCRYPTED_SECRET" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ENCRYPTED_SECRET), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ENCRYPTED_SECRET::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).secret) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ENCRYPTED_SECRET), - "::", - stringify!(secret) - ) + "Offset of field: TPM2B_ENCRYPTED_SECRET::secret" ); } impl Default for TPM2B_ENCRYPTED_SECRET { @@ -5912,52 +4600,32 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPMU_PUBLIC_ID)) + "Size of TPMU_PUBLIC_ID" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_PUBLIC_ID)) + "Alignment of TPMU_PUBLIC_ID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(keyedHash) - ) + "Offset of field: TPMU_PUBLIC_ID::keyedHash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_PUBLIC_ID::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_PUBLIC_ID::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_PUBLIC_ID::ecc" ); } impl Default for TPMU_PUBLIC_ID { @@ -5981,22 +4649,17 @@ fn bindgen_test_layout_TPMS_KEYEDHASH_PARMS() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMS_KEYEDHASH_PARMS)) + "Size of TPMS_KEYEDHASH_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_KEYEDHASH_PARMS)) + "Alignment of TPMS_KEYEDHASH_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_KEYEDHASH_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_KEYEDHASH_PARMS::scheme" ); } impl Default for TPMS_KEYEDHASH_PARMS { @@ -6021,32 +4684,22 @@ fn bindgen_test_layout_TPMS_ASYM_PARMS() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_ASYM_PARMS)) + "Size of TPMS_ASYM_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ASYM_PARMS)) + "Alignment of TPMS_ASYM_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ASYM_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_ASYM_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ASYM_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_ASYM_PARMS::scheme" ); } impl Default for TPMS_ASYM_PARMS { @@ -6073,52 +4726,32 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TPMS_RSA_PARMS)) + "Size of TPMS_RSA_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_RSA_PARMS)) + "Alignment of TPMS_RSA_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_RSA_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_RSA_PARMS::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMS_RSA_PARMS::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(exponent) - ) + "Offset of field: TPMS_RSA_PARMS::exponent" ); } impl Default for TPMS_RSA_PARMS { @@ -6145,52 +4778,32 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { assert_eq!( ::std::mem::size_of::(), 18usize, - concat!("Size of: ", stringify!(TPMS_ECC_PARMS)) + "Size of TPMS_ECC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ECC_PARMS)) + "Alignment of TPMS_ECC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_ECC_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_ECC_PARMS::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(curveID) - ) + "Offset of field: TPMS_ECC_PARMS::curveID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_ECC_PARMS::kdf" ); } impl Default for TPMS_ECC_PARMS { @@ -6218,62 +4831,37 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TPMU_PUBLIC_PARMS)) + "Size of TPMU_PUBLIC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_PUBLIC_PARMS)) + "Alignment of TPMU_PUBLIC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHashDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(keyedHashDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::keyedHashDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(symDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::symDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(rsaDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::rsaDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(eccDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::eccDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).asymDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(asymDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::asymDetail" ); } impl Default for TPMU_PUBLIC_PARMS { @@ -6298,32 +4886,22 @@ fn bindgen_test_layout_TPMT_PUBLIC_PARMS() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(TPMT_PUBLIC_PARMS)) + "Size of TPMT_PUBLIC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_PUBLIC_PARMS)) + "Alignment of TPMT_PUBLIC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC_PARMS), - "::", - stringify!(type_) - ) + "Offset of field: TPMT_PUBLIC_PARMS::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC_PARMS), - "::", - stringify!(parameters) - ) + "Offset of field: TPMT_PUBLIC_PARMS::parameters" ); } impl Default for TPMT_PUBLIC_PARMS { @@ -6352,72 +4930,42 @@ fn bindgen_test_layout_TPMT_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 612usize, - concat!("Size of: ", stringify!(TPMT_PUBLIC)) + "Size of TPMT_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_PUBLIC)) + "Alignment of TPMT_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(type_) - ) + "Offset of field: TPMT_PUBLIC::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(nameAlg) - ) + "Offset of field: TPMT_PUBLIC::nameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objectAttributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(objectAttributes) - ) + "Offset of field: TPMT_PUBLIC::objectAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(authPolicy) - ) + "Offset of field: TPMT_PUBLIC::authPolicy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(parameters) - ) + "Offset of field: TPMT_PUBLIC::parameters" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).unique) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(unique) - ) + "Offset of field: TPMT_PUBLIC::unique" ); } impl Default for TPMT_PUBLIC { @@ -6442,32 +4990,22 @@ fn bindgen_test_layout_TPM2B_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 616usize, - concat!("Size of: ", stringify!(TPM2B_PUBLIC)) + "Size of TPM2B_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_PUBLIC)) + "Alignment of TPM2B_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PUBLIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).publicArea) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC), - "::", - stringify!(publicArea) - ) + "Offset of field: TPM2B_PUBLIC::publicArea" ); } impl Default for TPM2B_PUBLIC { @@ -6492,32 +5030,22 @@ fn bindgen_test_layout_TPM2B_TEMPLATE() { assert_eq!( ::std::mem::size_of::(), 614usize, - concat!("Size of: ", stringify!(TPM2B_TEMPLATE)) + "Size of TPM2B_TEMPLATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_TEMPLATE)) + "Alignment of TPM2B_TEMPLATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_TEMPLATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_TEMPLATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_TEMPLATE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_TEMPLATE::buffer" ); } impl Default for TPM2B_TEMPLATE { @@ -6543,32 +5071,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE_VENDOR_SPECIFIC() { assert_eq!( ::std::mem::size_of::(), 1282usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) + "Size of TPM2B_PRIVATE_VENDOR_SPECIFIC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) + "Alignment of TPM2B_PRIVATE_VENDOR_SPECIFIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE_VENDOR_SPECIFIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE_VENDOR_SPECIFIC::buffer" ); } impl Default for TPM2B_PRIVATE_VENDOR_SPECIFIC { @@ -6597,62 +5115,37 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { assert_eq!( ::std::mem::size_of::(), 1282usize, - concat!("Size of: ", stringify!(TPMU_SENSITIVE_COMPOSITE)) + "Size of TPMU_SENSITIVE_COMPOSITE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SENSITIVE_COMPOSITE)) + "Alignment of TPMU_SENSITIVE_COMPOSITE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::ecc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(bits) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::bits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::any" ); } impl Default for TPMU_SENSITIVE_COMPOSITE { @@ -6679,52 +5172,32 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 1416usize, - concat!("Size of: ", stringify!(TPMT_SENSITIVE)) + "Size of TPMT_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SENSITIVE)) + "Alignment of TPMT_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitiveType) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(sensitiveType) - ) + "Offset of field: TPMT_SENSITIVE::sensitiveType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authValue) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(authValue) - ) + "Offset of field: TPMT_SENSITIVE::authValue" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seedValue) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(seedValue) - ) + "Offset of field: TPMT_SENSITIVE::seedValue" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 134usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(sensitive) - ) + "Offset of field: TPMT_SENSITIVE::sensitive" ); } impl Default for TPMT_SENSITIVE { @@ -6749,32 +5222,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 1418usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE)) + "Size of TPM2B_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE)) + "Alignment of TPM2B_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitiveArea) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE), - "::", - stringify!(sensitiveArea) - ) + "Offset of field: TPM2B_SENSITIVE::sensitiveArea" ); } impl Default for TPM2B_SENSITIVE { @@ -6800,42 +5263,27 @@ fn bindgen_test_layout__PRIVATE() { assert_eq!( ::std::mem::size_of::<_PRIVATE>(), 1550usize, - concat!("Size of: ", stringify!(_PRIVATE)) + "Size of _PRIVATE" ); assert_eq!( ::std::mem::align_of::<_PRIVATE>(), 2usize, - concat!("Alignment of ", stringify!(_PRIVATE)) + "Alignment of _PRIVATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityOuter) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(integrityOuter) - ) + "Offset of field: _PRIVATE::integrityOuter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityInner) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(integrityInner) - ) + "Offset of field: _PRIVATE::integrityInner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(sensitive) - ) + "Offset of field: _PRIVATE::sensitive" ); } impl Default for _PRIVATE { @@ -6860,32 +5308,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE() { assert_eq!( ::std::mem::size_of::(), 1552usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE)) + "Size of TPM2B_PRIVATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE)) + "Alignment of TPM2B_PRIVATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE::buffer" ); } impl Default for TPM2B_PRIVATE { @@ -6910,32 +5348,22 @@ fn bindgen_test_layout_TPMS_ID_OBJECT() { assert_eq!( ::std::mem::size_of::(), 132usize, - concat!("Size of: ", stringify!(TPMS_ID_OBJECT)) + "Size of TPMS_ID_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ID_OBJECT)) + "Alignment of TPMS_ID_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityHMAC) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ID_OBJECT), - "::", - stringify!(integrityHMAC) - ) + "Offset of field: TPMS_ID_OBJECT::integrityHMAC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encIdentity) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ID_OBJECT), - "::", - stringify!(encIdentity) - ) + "Offset of field: TPMS_ID_OBJECT::encIdentity" ); } impl Default for TPMS_ID_OBJECT { @@ -6960,32 +5388,22 @@ fn bindgen_test_layout_TPM2B_ID_OBJECT() { assert_eq!( ::std::mem::size_of::(), 134usize, - concat!("Size of: ", stringify!(TPM2B_ID_OBJECT)) + "Size of TPM2B_ID_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ID_OBJECT)) + "Alignment of TPM2B_ID_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ID_OBJECT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ID_OBJECT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).credential) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ID_OBJECT), - "::", - stringify!(credential) - ) + "Offset of field: TPM2B_ID_OBJECT::credential" ); } impl Default for TPM2B_ID_OBJECT { @@ -7013,32 +5431,22 @@ fn bindgen_test_layout_TPMS_NV_PIN_COUNTER_PARAMETERS() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) + "Size of TPMS_NV_PIN_COUNTER_PARAMETERS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) + "Alignment of TPMS_NV_PIN_COUNTER_PARAMETERS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pinCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS), - "::", - stringify!(pinCount) - ) + "Offset of field: TPMS_NV_PIN_COUNTER_PARAMETERS::pinCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pinLimit) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS), - "::", - stringify!(pinLimit) - ) + "Offset of field: TPMS_NV_PIN_COUNTER_PARAMETERS::pinLimit" ); } pub type TPMA_NV = u32; @@ -7058,62 +5466,37 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 80usize, - concat!("Size of: ", stringify!(TPMS_NV_PUBLIC)) + "Size of TPMS_NV_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_NV_PUBLIC)) + "Alignment of TPMS_NV_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvIndex) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(nvIndex) - ) + "Offset of field: TPMS_NV_PUBLIC::nvIndex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(nameAlg) - ) + "Offset of field: TPMS_NV_PUBLIC::nameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_NV_PUBLIC::attributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(authPolicy) - ) + "Offset of field: TPMS_NV_PUBLIC::authPolicy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataSize) as usize - ptr as usize }, 78usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(dataSize) - ) + "Offset of field: TPMS_NV_PUBLIC::dataSize" ); } impl Default for TPMS_NV_PUBLIC { @@ -7138,32 +5521,22 @@ fn bindgen_test_layout_TPM2B_NV_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 84usize, - concat!("Size of: ", stringify!(TPM2B_NV_PUBLIC)) + "Size of TPM2B_NV_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_NV_PUBLIC)) + "Alignment of TPM2B_NV_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NV_PUBLIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_NV_PUBLIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvPublic) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NV_PUBLIC), - "::", - stringify!(nvPublic) - ) + "Offset of field: TPM2B_NV_PUBLIC::nvPublic" ); } impl Default for TPM2B_NV_PUBLIC { @@ -7189,32 +5562,22 @@ fn bindgen_test_layout_TPM2B_CONTEXT_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 5122usize, - concat!("Size of: ", stringify!(TPM2B_CONTEXT_SENSITIVE)) + "Size of TPM2B_CONTEXT_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_CONTEXT_SENSITIVE)) + "Alignment of TPM2B_CONTEXT_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_SENSITIVE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CONTEXT_SENSITIVE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_SENSITIVE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_CONTEXT_SENSITIVE::buffer" ); } impl Default for TPM2B_CONTEXT_SENSITIVE { @@ -7239,32 +5602,22 @@ fn bindgen_test_layout_TPMS_CONTEXT_DATA() { assert_eq!( ::std::mem::size_of::(), 5188usize, - concat!("Size of: ", stringify!(TPMS_CONTEXT_DATA)) + "Size of TPMS_CONTEXT_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CONTEXT_DATA)) + "Alignment of TPMS_CONTEXT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrity) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT_DATA), - "::", - stringify!(integrity) - ) + "Offset of field: TPMS_CONTEXT_DATA::integrity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encrypted) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT_DATA), - "::", - stringify!(encrypted) - ) + "Offset of field: TPMS_CONTEXT_DATA::encrypted" ); } impl Default for TPMS_CONTEXT_DATA { @@ -7289,32 +5642,22 @@ fn bindgen_test_layout_TPM2B_CONTEXT_DATA() { assert_eq!( ::std::mem::size_of::(), 5190usize, - concat!("Size of: ", stringify!(TPM2B_CONTEXT_DATA)) + "Size of TPM2B_CONTEXT_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_CONTEXT_DATA)) + "Alignment of TPM2B_CONTEXT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CONTEXT_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_CONTEXT_DATA::buffer" ); } impl Default for TPM2B_CONTEXT_DATA { @@ -7341,52 +5684,32 @@ fn bindgen_test_layout_TPMS_CONTEXT() { assert_eq!( ::std::mem::size_of::(), 5208usize, - concat!("Size of: ", stringify!(TPMS_CONTEXT)) + "Size of TPMS_CONTEXT" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_CONTEXT)) + "Alignment of TPMS_CONTEXT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(sequence) - ) + "Offset of field: TPMS_CONTEXT::sequence" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedHandle) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(savedHandle) - ) + "Offset of field: TPMS_CONTEXT::savedHandle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMS_CONTEXT::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contextBlob) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(contextBlob) - ) + "Offset of field: TPMS_CONTEXT::contextBlob" ); } impl Default for TPMS_CONTEXT { @@ -7416,82 +5739,47 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { assert_eq!( ::std::mem::size_of::(), 408usize, - concat!("Size of: ", stringify!(TPMS_CREATION_DATA)) + "Size of TPMS_CREATION_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_CREATION_DATA)) + "Alignment of TPMS_CREATION_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_CREATION_DATA::pcrSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(pcrDigest) - ) + "Offset of field: TPMS_CREATION_DATA::pcrDigest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).locality) as usize - ptr as usize }, 198usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(locality) - ) + "Offset of field: TPMS_CREATION_DATA::locality" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentNameAlg) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentNameAlg) - ) + "Offset of field: TPMS_CREATION_DATA::parentNameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentName) as usize - ptr as usize }, 202usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentName) - ) + "Offset of field: TPMS_CREATION_DATA::parentName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentQualifiedName) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentQualifiedName) - ) + "Offset of field: TPMS_CREATION_DATA::parentQualifiedName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outsideInfo) as usize - ptr as usize }, 342usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(outsideInfo) - ) + "Offset of field: TPMS_CREATION_DATA::outsideInfo" ); } impl Default for TPMS_CREATION_DATA { @@ -7516,32 +5804,22 @@ fn bindgen_test_layout_TPM2B_CREATION_DATA() { assert_eq!( ::std::mem::size_of::(), 412usize, - concat!("Size of: ", stringify!(TPM2B_CREATION_DATA)) + "Size of TPM2B_CREATION_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_CREATION_DATA)) + "Alignment of TPM2B_CREATION_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CREATION_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CREATION_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creationData) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CREATION_DATA), - "::", - stringify!(creationData) - ) + "Offset of field: TPM2B_CREATION_DATA::creationData" ); } impl Default for TPM2B_CREATION_DATA { @@ -7568,32 +5846,22 @@ fn bindgen_test_layout_TPMS_AC_OUTPUT() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_AC_OUTPUT)) + "Size of TPMS_AC_OUTPUT" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_AC_OUTPUT)) + "Alignment of TPMS_AC_OUTPUT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AC_OUTPUT), - "::", - stringify!(tag) - ) + "Offset of field: TPMS_AC_OUTPUT::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AC_OUTPUT), - "::", - stringify!(data) - ) + "Offset of field: TPMS_AC_OUTPUT::data" ); } #[repr(C)] @@ -7609,32 +5877,22 @@ fn bindgen_test_layout_TPML_AC_CAPABILITIES() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_AC_CAPABILITIES)) + "Size of TPML_AC_CAPABILITIES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_AC_CAPABILITIES)) + "Alignment of TPML_AC_CAPABILITIES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_AC_CAPABILITIES), - "::", - stringify!(count) - ) + "Offset of field: TPML_AC_CAPABILITIES::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).acCapabilities) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_AC_CAPABILITIES), - "::", - stringify!(acCapabilities) - ) + "Offset of field: TPML_AC_CAPABILITIES::acCapabilities" ); } impl Default for TPML_AC_CAPABILITIES { @@ -7658,45 +5916,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { 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!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } extern "C" { @@ -7776,92 +6015,52 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) + "Size of TSS2_TCTI_CONTEXT_COMMON_V1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) + "Alignment of TSS2_TCTI_CONTEXT_COMMON_V1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(magic) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(version) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).transmit) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(transmit) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::transmit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).receive) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(receive) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::receive" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).finalize) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(finalize) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::finalize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(cancel) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::cancel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).getPollHandles) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(getPollHandles) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::getPollHandles" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).setLocality) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(setLocality) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::setLocality" ); } #[repr(C)] @@ -7878,32 +6077,22 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V2() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) + "Size of TSS2_TCTI_CONTEXT_COMMON_V2" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) + "Alignment of TSS2_TCTI_CONTEXT_COMMON_V2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).v1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V2), - "::", - stringify!(v1) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V2::v1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).makeSticky) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V2), - "::", - stringify!(makeSticky) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V2::makeSticky" ); } pub type TSS2_TCTI_CONTEXT_COMMON_CURRENT = TSS2_TCTI_CONTEXT_COMMON_V2; @@ -7923,62 +6112,37 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TSS2_TCTI_INFO)) + "Size of TSS2_TCTI_INFO" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_INFO)) + "Alignment of TSS2_TCTI_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(version) - ) + "Offset of field: TSS2_TCTI_INFO::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(name) - ) + "Offset of field: TSS2_TCTI_INFO::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(description) - ) + "Offset of field: TSS2_TCTI_INFO::description" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config_help) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(config_help) - ) + "Offset of field: TSS2_TCTI_INFO::config_help" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).init) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(init) - ) + "Offset of field: TSS2_TCTI_INFO::init" ); } impl Default for TSS2_TCTI_INFO { @@ -8012,32 +6176,22 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_COMMAND() { assert_eq!( ::std::mem::size_of::(), 424usize, - concat!("Size of: ", stringify!(TSS2L_SYS_AUTH_COMMAND)) + "Size of TSS2L_SYS_AUTH_COMMAND" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_COMMAND)) + "Alignment of TSS2L_SYS_AUTH_COMMAND" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_COMMAND), - "::", - stringify!(count) - ) + "Offset of field: TSS2L_SYS_AUTH_COMMAND::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_COMMAND), - "::", - stringify!(auths) - ) + "Offset of field: TSS2L_SYS_AUTH_COMMAND::auths" ); } impl Default for TSS2L_SYS_AUTH_COMMAND { @@ -8063,32 +6217,22 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_RESPONSE() { assert_eq!( ::std::mem::size_of::(), 404usize, - concat!("Size of: ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) + "Size of TSS2L_SYS_AUTH_RESPONSE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) + "Alignment of TSS2L_SYS_AUTH_RESPONSE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_RESPONSE), - "::", - stringify!(count) - ) + "Offset of field: TSS2L_SYS_AUTH_RESPONSE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_RESPONSE), - "::", - stringify!(auths) - ) + "Offset of field: TSS2L_SYS_AUTH_RESPONSE::auths" ); } impl Default for TSS2L_SYS_AUTH_RESPONSE { @@ -14197,32 +12341,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -14259,9 +12393,14 @@ extern "C" { __base: ::std::os::raw::c_int, ) -> uintmax_t; } +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 _Float32 = f32; pub type _Float64 = f64; pub type _Float32x = f64; +pub type _Float64x = f64; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct div_t { @@ -14272,35 +12411,21 @@ pub struct div_t { 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::size_of::(), 8usize, "Size of div_t"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(div_t)) + "Alignment of 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) - ) + "Offset of field: div_t::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) - ) + "Offset of field: div_t::rem" ); } #[repr(C)] @@ -14313,35 +12438,21 @@ pub struct ldiv_t { 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::(), - 8usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of ldiv_t"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(ldiv_t)) + "Alignment of 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) - ) + "Offset of field: ldiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) + "Offset of field: ldiv_t::rem" ); } #[repr(C)] @@ -14354,35 +12465,21 @@ pub struct lldiv_t { 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::size_of::(), 16usize, "Size of lldiv_t"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) + "Alignment of 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) - ) + "Offset of field: lldiv_t::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) - ) + "Offset of field: lldiv_t::rem" ); } extern "C" { @@ -14511,22 +12608,17 @@ fn bindgen_test_layout___sigset_t() { assert_eq!( ::std::mem::size_of::<__sigset_t>(), 128usize, - concat!("Size of: ", stringify!(__sigset_t)) + "Size of __sigset_t" ); assert_eq!( ::std::mem::align_of::<__sigset_t>(), 4usize, - concat!("Alignment of ", stringify!(__sigset_t)) + "Alignment of __sigset_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) + "Offset of field: __sigset_t::__val" ); } pub type sigset_t = __sigset_t; @@ -14540,35 +12632,21 @@ pub struct timeval { 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::(), - 8usize, - concat!("Size of: ", stringify!(timeval)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of 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) - ) + "Offset of field: timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -14584,32 +12662,22 @@ fn bindgen_test_layout_timespec() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(timespec)) + "Size of timespec" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timespec)) + "Alignment of timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: timespec::tv_nsec" ); } pub type suseconds_t = __suseconds_t; @@ -14623,25 +12691,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) + "Offset of field: fd_set::__fds_bits" ); } pub type fd_mask = __fd_mask; @@ -14669,102 +12728,6 @@ pub type blkcnt_t = __blkcnt_t; pub type fsblkcnt_t = __fsblkcnt_t; pub type fsfilcnt_t = __fsfilcnt_t; #[repr(C)] -#[derive(Copy, Clone)] -pub union __atomic_wide_counter { - pub __value64: ::std::os::raw::c_ulonglong, - pub __value32: __atomic_wide_counter__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __atomic_wide_counter__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__atomic_wide_counter__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__low) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__high) - ) - ); -} -#[test] -fn bindgen_test_layout___atomic_wide_counter() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter>(), - 8usize, - concat!("Alignment of ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value64) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value32) - ) - ); -} -impl Default for __atomic_wide_counter { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_internal_list { pub __prev: *mut __pthread_internal_list, @@ -14778,32 +12741,22 @@ fn bindgen_test_layout___pthread_internal_list() { assert_eq!( ::std::mem::size_of::<__pthread_internal_list>(), 8usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) + "Size of __pthread_internal_list" ); assert_eq!( ::std::mem::align_of::<__pthread_internal_list>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) + "Alignment of __pthread_internal_list" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) + "Offset of field: __pthread_internal_list::__prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) + "Offset of field: __pthread_internal_list::__next" ); } impl Default for __pthread_internal_list { @@ -14829,22 +12782,17 @@ fn bindgen_test_layout___pthread_internal_slist() { assert_eq!( ::std::mem::size_of::<__pthread_internal_slist>(), 4usize, - concat!("Size of: ", stringify!(__pthread_internal_slist)) + "Size of __pthread_internal_slist" ); assert_eq!( ::std::mem::align_of::<__pthread_internal_slist>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_internal_slist)) + "Alignment of __pthread_internal_slist" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_slist), - "::", - stringify!(__next) - ) + "Offset of field: __pthread_internal_slist::__next" ); } impl Default for __pthread_internal_slist { @@ -14870,9 +12818,41 @@ pub struct __pthread_mutex_s { #[repr(C)] #[derive(Copy, Clone)] pub union __pthread_mutex_s__bindgen_ty_1 { - pub __spins: ::std::os::raw::c_int, + pub __elision_data: __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1, pub __list: __pthread_slist_t, } +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1 { + pub __espins: ::std::os::raw::c_short, + pub __eelision: ::std::os::raw::c_short, +} +#[test] +fn bindgen_test_layout___pthread_mutex_s__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s__bindgen_ty_1__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_mutex_s__bindgen_ty_1__bindgen_ty_1>(), + 4usize, + "Size of __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_mutex_s__bindgen_ty_1__bindgen_ty_1>(), + 2usize, + "Alignment of __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__espins) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1::__espins" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__eelision) as usize - ptr as usize }, + 2usize, + "Offset of field: __pthread_mutex_s__bindgen_ty_1__bindgen_ty_1::__eelision" + ); +} #[test] fn bindgen_test_layout___pthread_mutex_s__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s__bindgen_ty_1> = @@ -14881,32 +12861,22 @@ fn bindgen_test_layout___pthread_mutex_s__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__pthread_mutex_s__bindgen_ty_1>(), 4usize, - concat!("Size of: ", stringify!(__pthread_mutex_s__bindgen_ty_1)) + "Size of __pthread_mutex_s__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__pthread_mutex_s__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_mutex_s__bindgen_ty_1)) + "Alignment of __pthread_mutex_s__bindgen_ty_1" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__elision_data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s__bindgen_ty_1), - "::", - stringify!(__spins) - ) + "Offset of field: __pthread_mutex_s__bindgen_ty_1::__elision_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s__bindgen_ty_1), - "::", - stringify!(__list) - ) + "Offset of field: __pthread_mutex_s__bindgen_ty_1::__list" ); } impl Default for __pthread_mutex_s__bindgen_ty_1 { @@ -14925,62 +12895,37 @@ fn bindgen_test_layout___pthread_mutex_s() { assert_eq!( ::std::mem::size_of::<__pthread_mutex_s>(), 24usize, - concat!("Size of: ", stringify!(__pthread_mutex_s)) + "Size of __pthread_mutex_s" ); assert_eq!( ::std::mem::align_of::<__pthread_mutex_s>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_mutex_s)) + "Alignment of __pthread_mutex_s" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__lock) - ) + "Offset of field: __pthread_mutex_s::__lock" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__count) - ) + "Offset of field: __pthread_mutex_s::__count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__owner) - ) + "Offset of field: __pthread_mutex_s::__owner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__kind) - ) + "Offset of field: __pthread_mutex_s::__kind" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__nusers) - ) + "Offset of field: __pthread_mutex_s::__nusers" ); } impl Default for __pthread_mutex_s { @@ -15003,7 +12948,7 @@ pub struct __pthread_rwlock_arch_t { pub __pad4: ::std::os::raw::c_uint, pub __flags: ::std::os::raw::c_uchar, pub __shared: ::std::os::raw::c_uchar, - pub __pad1: ::std::os::raw::c_uchar, + pub __rwelision: ::std::os::raw::c_schar, pub __pad2: ::std::os::raw::c_uchar, pub __cur_writer: ::std::os::raw::c_int, } @@ -15015,218 +12960,264 @@ fn bindgen_test_layout___pthread_rwlock_arch_t() { assert_eq!( ::std::mem::size_of::<__pthread_rwlock_arch_t>(), 32usize, - concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) + "Size of __pthread_rwlock_arch_t" ); assert_eq!( ::std::mem::align_of::<__pthread_rwlock_arch_t>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) + "Alignment of __pthread_rwlock_arch_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__readers) - ) + "Offset of field: __pthread_rwlock_arch_t::__readers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers) - ) + "Offset of field: __pthread_rwlock_arch_t::__writers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__wrphase_futex) - ) + "Offset of field: __pthread_rwlock_arch_t::__wrphase_futex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers_futex) - ) + "Offset of field: __pthread_rwlock_arch_t::__writers_futex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad3) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad4) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__flags) - ) + "Offset of field: __pthread_rwlock_arch_t::__flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize }, 25usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__shared) - ) + "Offset of field: __pthread_rwlock_arch_t::__shared" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize }, 26usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad1) - ) + "Offset of field: __pthread_rwlock_arch_t::__rwelision" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, 27usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad2) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__cur_writer) - ) + "Offset of field: __pthread_rwlock_arch_t::__cur_writer" ); } #[repr(C)] #[derive(Copy, Clone)] pub struct __pthread_cond_s { - pub __wseq: __atomic_wide_counter, - pub __g1_start: __atomic_wide_counter, + pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, + pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, pub __g_refs: [::std::os::raw::c_uint; 2usize], pub __g_size: [::std::os::raw::c_uint; 2usize], pub __g1_orig_size: ::std::os::raw::c_uint, pub __wrefs: ::std::os::raw::c_uint, pub __g_signals: [::std::os::raw::c_uint; 2usize], } +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_1 { + pub __wseq: ::std::os::raw::c_ulonglong, + pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} #[test] -fn bindgen_test_layout___pthread_cond_s() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::<__pthread_cond_s>(), - 48usize, - concat!("Size of: ", stringify!(__pthread_cond_s)) + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( - ::std::mem::align_of::<__pthread_cond_s>(), + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 4usize, + "Alignment of __pthread_cond_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1::__low" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, + 4usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1::__high" + ); +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s)) + "Size of __pthread_cond_s__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(), + 8usize, + "Alignment of __pthread_cond_s__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wseq) - ) + "Offset of field: __pthread_cond_s__bindgen_ty_1::__wseq" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__wseq32) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1::__wseq32" + ); +} +impl Default for __pthread_cond_s__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_2 { + pub __g1_start: ::std::os::raw::c_ulonglong, + pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_2__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 4usize, + "Alignment of __pthread_cond_s__bindgen_ty_2__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1::__low" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, + 4usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1::__high" + ); +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_2> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_2" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + "Alignment of __pthread_cond_s__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2::__g1_start" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__g1_start32) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2::__g1_start32" + ); +} +impl Default for __pthread_cond_s__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout___pthread_cond_s() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s>(), + 48usize, + "Size of __pthread_cond_s" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s>(), 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_start) - ) + "Alignment of __pthread_cond_s" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_refs) - ) + "Offset of field: __pthread_cond_s::__g_refs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_size) - ) + "Offset of field: __pthread_cond_s::__g_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_orig_size) - ) + "Offset of field: __pthread_cond_s::__g1_orig_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wrefs) - ) + "Offset of field: __pthread_cond_s::__wrefs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_signals) - ) + "Offset of field: __pthread_cond_s::__g_signals" ); } impl Default for __pthread_cond_s { @@ -15238,38 +13229,6 @@ impl Default for __pthread_cond_s { } } } -pub type __tss_t = ::std::os::raw::c_uint; -pub type __thrd_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __once_flag { - pub __data: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___once_flag() { - const UNINIT: ::std::mem::MaybeUninit<__once_flag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__once_flag>(), - 4usize, - concat!("Size of: ", stringify!(__once_flag)) - ); - assert_eq!( - ::std::mem::align_of::<__once_flag>(), - 4usize, - concat!("Alignment of ", stringify!(__once_flag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__once_flag), - "::", - stringify!(__data) - ) - ); -} pub type pthread_t = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Copy, Clone)] @@ -15284,32 +13243,22 @@ fn bindgen_test_layout_pthread_mutexattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) + "Size of pthread_mutexattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) + "Alignment of pthread_mutexattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_mutexattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_mutexattr_t::__align" ); } impl Default for pthread_mutexattr_t { @@ -15334,32 +13283,22 @@ fn bindgen_test_layout_pthread_condattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) + "Size of pthread_condattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) + "Alignment of pthread_condattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_condattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_condattr_t::__align" ); } impl Default for pthread_condattr_t { @@ -15386,32 +13325,22 @@ fn bindgen_test_layout_pthread_attr_t() { assert_eq!( ::std::mem::size_of::(), 36usize, - concat!("Size of: ", stringify!(pthread_attr_t)) + "Size of pthread_attr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) + "Alignment of pthread_attr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_attr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_attr_t::__align" ); } impl Default for pthread_attr_t { @@ -15437,42 +13366,27 @@ fn bindgen_test_layout_pthread_mutex_t() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) + "Size of pthread_mutex_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) + "Alignment of pthread_mutex_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_mutex_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_mutex_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_mutex_t::__align" ); } impl Default for pthread_mutex_t { @@ -15498,42 +13412,27 @@ fn bindgen_test_layout_pthread_cond_t() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) + "Size of pthread_cond_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) + "Alignment of pthread_cond_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_cond_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_cond_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_cond_t::__align" ); } impl Default for pthread_cond_t { @@ -15559,42 +13458,27 @@ fn bindgen_test_layout_pthread_rwlock_t() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) + "Size of pthread_rwlock_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) + "Alignment of pthread_rwlock_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_rwlock_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_rwlock_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_rwlock_t::__align" ); } impl Default for pthread_rwlock_t { @@ -15619,32 +13503,22 @@ fn bindgen_test_layout_pthread_rwlockattr_t() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) + "Size of pthread_rwlockattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) + "Alignment of pthread_rwlockattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_rwlockattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_rwlockattr_t::__align" ); } impl Default for pthread_rwlockattr_t { @@ -15670,32 +13544,22 @@ fn bindgen_test_layout_pthread_barrier_t() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) + "Size of pthread_barrier_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) + "Alignment of pthread_barrier_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_barrier_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_barrier_t::__align" ); } impl Default for pthread_barrier_t { @@ -15721,32 +13585,22 @@ fn bindgen_test_layout_pthread_barrierattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) + "Size of pthread_barrierattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) + "Alignment of pthread_barrierattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_barrierattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_barrierattr_t::__align" ); } impl Default for pthread_barrierattr_t { @@ -15792,82 +13646,47 @@ fn bindgen_test_layout_random_data() { assert_eq!( ::std::mem::size_of::(), 28usize, - concat!("Size of: ", stringify!(random_data)) + "Size of random_data" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(random_data)) + "Alignment of random_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(fptr) - ) + "Offset of field: random_data::fptr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rptr) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rptr) - ) + "Offset of field: random_data::rptr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(state) - ) + "Offset of field: random_data::state" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_type) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_type) - ) + "Offset of field: random_data::rand_type" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_deg) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_deg) - ) + "Offset of field: random_data::rand_deg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_sep) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_sep) - ) + "Offset of field: random_data::rand_sep" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end_ptr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(end_ptr) - ) + "Offset of field: random_data::end_ptr" ); } impl Default for random_data { @@ -15954,62 +13773,37 @@ fn bindgen_test_layout_drand48_data() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(drand48_data)) + "Size of drand48_data" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(drand48_data)) + "Alignment of drand48_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__x) - ) + "Offset of field: drand48_data::__x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__old_x) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__old_x) - ) + "Offset of field: drand48_data::__old_x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__c) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__c) - ) + "Offset of field: drand48_data::__c" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__init) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__init) - ) + "Offset of field: drand48_data::__init" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__a) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__a) - ) + "Offset of field: drand48_data::__a" ); } extern "C" { @@ -16081,9 +13875,6 @@ extern "C" { __size: ::std::os::raw::c_uint, ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn free(__ptr: *mut ::std::os::raw::c_void); -} extern "C" { pub fn reallocarray( __ptr: *mut ::std::os::raw::c_void, @@ -16091,6 +13882,9 @@ extern "C" { __size: size_t, ) -> *mut ::std::os::raw::c_void; } +extern "C" { + pub fn free(__ptr: *mut ::std::os::raw::c_void); +} extern "C" { pub fn alloca(__size: ::std::os::raw::c_uint) -> *mut ::std::os::raw::c_void; } diff --git a/tss-esapi-sys/src/bindings/x86_64-unknown-linux-gnu.rs b/tss-esapi-sys/src/bindings/x86_64-unknown-linux-gnu.rs index 05d3f51c..d6023261 100644 --- a/tss-esapi-sys/src/bindings/x86_64-unknown-linux-gnu.rs +++ b/tss-esapi-sys/src/bindings/x86_64-unknown-linux-gnu.rs @@ -1,5 +1,5 @@ -/* automatically generated by rust-bindgen 0.69.4 */ -/* TPM2_TSS_VERSION="3.2.2" */ +/* automatically generated by rust-bindgen 0.70.1 */ +/* TPM2_TSS_VERSION="4.0.1" */ pub const _STDINT_H: u32 = 1; pub const _FEATURES_H: u32 = 1; @@ -18,10 +18,6 @@ pub const __USE_POSIX199506: u32 = 1; pub const __USE_XOPEN2K: u32 = 1; pub const __USE_XOPEN2K8: u32 = 1; pub const _ATFILE_SOURCE: u32 = 1; -pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; -pub const __SYSCALL_WORDSIZE: u32 = 64; -pub const __TIMESIZE: u32 = 64; pub const __USE_MISC: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; @@ -29,31 +25,31 @@ pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_60559_BFP__: u32 = 201404; pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 35; +pub const __GLIBC_MINOR__: u32 = 31; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; -pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __WORDSIZE: u32 = 64; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; +pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const __GLIBC_USE_LIB_EXT2: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; -pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _BITS_TYPES_H: u32 = 1; +pub const __TIMESIZE: u32 = 64; pub const _BITS_TYPESIZES_H: u32 = 1; pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; pub const __INO_T_MATCHES_INO64_T: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; pub const __STATFS_MATCHES_STATFS64: u32 = 1; -pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const _BITS_WCHAR_H: u32 = 1; @@ -150,6 +146,7 @@ pub const TSS2_BASE_RC_BAD_KEY: u32 = 50; pub const TSS2_BASE_RC_NO_HANDLE: u32 = 51; pub const TSS2_BASE_RC_NOT_PROVISIONED: u32 = 52; pub const TSS2_BASE_RC_ALREADY_PROVISIONED: u32 = 53; +pub const TSS2_BASE_RC_CALLBACK_NULL: u32 = 54; pub const TSS2_LAYER_IMPLEMENTATION_SPECIFIC_OFFSET: u32 = 63488; pub const TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT: u32 = 11; pub const TPM2_MAX_COMMAND_SIZE: u32 = 4096; @@ -242,7 +239,25 @@ pub const ESYS_TR_RH_PLATFORM: u32 = 268; pub const ESYS_TR_RH_PLATFORM_NV: u32 = 269; pub const ESYS_TR_RH_AUTH_FIRST: u32 = 272; pub const ESYS_TR_RH_ACT_FIRST: u32 = 288; +pub const ESYS_TR_RH_ACT_0: u32 = 288; +pub const ESYS_TR_RH_ACT_1: u32 = 289; +pub const ESYS_TR_RH_ACT_2: u32 = 290; +pub const ESYS_TR_RH_ACT_3: u32 = 291; +pub const ESYS_TR_RH_ACT_4: u32 = 292; +pub const ESYS_TR_RH_ACT_5: u32 = 293; +pub const ESYS_TR_RH_ACT_6: u32 = 294; +pub const ESYS_TR_RH_ACT_7: u32 = 295; +pub const ESYS_TR_RH_ACT_8: u32 = 296; +pub const ESYS_TR_RH_ACT_9: u32 = 297; +pub const ESYS_TR_RH_ACT_A: u32 = 298; +pub const ESYS_TR_RH_ACT_B: u32 = 299; +pub const ESYS_TR_RH_ACT_C: u32 = 300; +pub const ESYS_TR_RH_ACT_D: u32 = 301; +pub const ESYS_TR_RH_ACT_E: u32 = 302; +pub const ESYS_TR_RH_ACT_F: u32 = 303; pub const ESYS_TR_RH_ACT_LAST: u32 = 303; +pub const ESYS_TR_RH_AC_FIRST: u32 = 320; +pub const ESYS_TR_RH_AC_LAST: u32 = 65855; pub const _INTTYPES_H: u32 = 1; pub const ____gwchar_t_defined: u32 = 1; pub const __PRI64_PREFIX: &[u8; 2] = b"l\0"; @@ -411,6 +426,7 @@ pub const WNOWAIT: u32 = 16777216; pub const __WNOTHREAD: u32 = 536870912; pub const __WALL: u32 = 1073741824; pub const __WCLONE: u32 = 2147483648; +pub const __ENUM_IDTYPE_T: u32 = 1; pub const __W_CONTINUED: u32 = 65535; pub const __WCOREFLAG: u32 = 128; pub const __HAVE_FLOAT128: u32 = 0; @@ -455,6 +471,7 @@ pub const BYTE_ORDER: u32 = 1234; pub const _BITS_BYTESWAP_H: u32 = 1; pub const _BITS_UINTN_IDENTITY_H: u32 = 1; pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &[u8; 6] = b"stosq\0"; pub const __sigset_t_defined: u32 = 1; pub const __timeval_defined: u32 = 1; pub const _STRUCT_TIMESPEC: u32 = 1; @@ -521,22 +538,17 @@ fn bindgen_test_layout___fsid_t() { assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__fsid_t)) + "Size of __fsid_t" ); assert_eq!( ::std::mem::align_of::<__fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) + "Alignment of __fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) + "Offset of field: __fsid_t::__val" ); } pub type __clock_t = ::std::os::raw::c_long; @@ -546,7 +558,6 @@ pub type __id_t = ::std::os::raw::c_uint; pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; -pub type __suseconds64_t = ::std::os::raw::c_long; pub type __daddr_t = ::std::os::raw::c_int; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; @@ -612,52 +623,32 @@ fn bindgen_test_layout_TSS2_ABI_VERSION() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(TSS2_ABI_VERSION)) + "Size of TSS2_ABI_VERSION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2_ABI_VERSION)) + "Alignment of TSS2_ABI_VERSION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssCreator) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssCreator) - ) + "Offset of field: TSS2_ABI_VERSION::tssCreator" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssFamily) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssFamily) - ) + "Offset of field: TSS2_ABI_VERSION::tssFamily" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssLevel) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssLevel) - ) + "Offset of field: TSS2_ABI_VERSION::tssLevel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tssVersion) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TSS2_ABI_VERSION), - "::", - stringify!(tssVersion) - ) + "Offset of field: TSS2_ABI_VERSION::tssVersion" ); } pub type TSS2_RC = u32; @@ -699,6 +690,7 @@ pub type TPMA_X509_KEY_USAGE = u32; pub type TPMA_ACT = u32; pub type TPMI_YES_NO = BYTE; pub type TPMI_DH_OBJECT = TPM2_HANDLE; +pub type TPMI_DH_PARENT = TPM2_HANDLE; pub type TPMI_DH_PERSISTENT = TPM2_HANDLE; pub type TPMI_DH_ENTITY = TPM2_HANDLE; pub type TPMI_DH_PCR = TPM2_HANDLE; @@ -735,7 +727,7 @@ pub type TPMI_ALG_CIPHER_MODE = TPM2_ALG_ID; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct TPMS_EMPTY { - pub empty: [BYTE; 1usize], + pub empty: [UINT8; 1usize], } #[test] fn bindgen_test_layout_TPMS_EMPTY() { @@ -744,69 +736,23 @@ fn bindgen_test_layout_TPMS_EMPTY() { assert_eq!( ::std::mem::size_of::(), 1usize, - concat!("Size of: ", stringify!(TPMS_EMPTY)) + "Size of TPMS_EMPTY" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMS_EMPTY)) + "Alignment of TPMS_EMPTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).empty) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_EMPTY), - "::", - stringify!(empty) - ) - ); -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct TPMS_ALGORITHM_DESCRIPTION { - pub alg: TPM2_ALG_ID, - pub attributes: TPMA_ALGORITHM, -} -#[test] -fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() { - 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!(TPMS_ALGORITHM_DESCRIPTION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DESCRIPTION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DESCRIPTION), - "::", - stringify!(alg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DESCRIPTION), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_EMPTY::empty" ); } #[repr(C)] #[derive(Copy, Clone)] pub union TPMU_HA { + pub sha: [BYTE; 20usize], pub sha1: [BYTE; 20usize], pub sha256: [BYTE; 32usize], pub sha384: [BYTE; 48usize], @@ -817,65 +763,41 @@ pub union TPMU_HA { fn bindgen_test_layout_TPMU_HA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(TPMU_HA)) - ); + assert_eq!(::std::mem::size_of::(), 64usize, "Size of TPMU_HA"); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMU_HA)) + "Alignment of TPMU_HA" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sha) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_HA::sha" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha1) - ) + "Offset of field: TPMU_HA::sha1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha256) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha256) - ) + "Offset of field: TPMU_HA::sha256" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha384) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha384) - ) + "Offset of field: TPMU_HA::sha384" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha512) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sha512) - ) + "Offset of field: TPMU_HA::sha512" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm3_256) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_HA), - "::", - stringify!(sm3_256) - ) + "Offset of field: TPMU_HA::sm3_256" ); } impl Default for TPMU_HA { @@ -897,35 +819,21 @@ pub struct TPMT_HA { fn bindgen_test_layout_TPMT_HA() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 66usize, - concat!("Size of: ", stringify!(TPMT_HA)) - ); + assert_eq!(::std::mem::size_of::(), 66usize, "Size of TPMT_HA"); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_HA)) + "Alignment of TPMT_HA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_HA), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMT_HA::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_HA), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_HA::digest" ); } impl Default for TPMT_HA { @@ -950,32 +858,22 @@ fn bindgen_test_layout_TPM2B_DIGEST() { assert_eq!( ::std::mem::size_of::(), 66usize, - concat!("Size of: ", stringify!(TPM2B_DIGEST)) + "Size of TPM2B_DIGEST" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_DIGEST)) + "Alignment of TPM2B_DIGEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DIGEST), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_DIGEST::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DIGEST), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_DIGEST::buffer" ); } impl Default for TPM2B_DIGEST { @@ -1000,32 +898,22 @@ fn bindgen_test_layout_TPM2B_DATA() { assert_eq!( ::std::mem::size_of::(), 66usize, - concat!("Size of: ", stringify!(TPM2B_DATA)) + "Size of TPM2B_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_DATA)) + "Alignment of TPM2B_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_DATA::buffer" ); } impl Default for TPM2B_DATA { @@ -1053,32 +941,22 @@ fn bindgen_test_layout_TPM2B_EVENT() { assert_eq!( ::std::mem::size_of::(), 1026usize, - concat!("Size of: ", stringify!(TPM2B_EVENT)) + "Size of TPM2B_EVENT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_EVENT)) + "Alignment of TPM2B_EVENT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_EVENT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_EVENT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_EVENT), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_EVENT::buffer" ); } impl Default for TPM2B_EVENT { @@ -1103,32 +981,22 @@ fn bindgen_test_layout_TPM2B_MAX_BUFFER() { assert_eq!( ::std::mem::size_of::(), 1026usize, - concat!("Size of: ", stringify!(TPM2B_MAX_BUFFER)) + "Size of TPM2B_MAX_BUFFER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_MAX_BUFFER)) + "Alignment of TPM2B_MAX_BUFFER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_BUFFER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_MAX_BUFFER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_BUFFER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_MAX_BUFFER::buffer" ); } impl Default for TPM2B_MAX_BUFFER { @@ -1153,32 +1021,22 @@ fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() { assert_eq!( ::std::mem::size_of::(), 2050usize, - concat!("Size of: ", stringify!(TPM2B_MAX_NV_BUFFER)) + "Size of TPM2B_MAX_NV_BUFFER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_MAX_NV_BUFFER)) + "Alignment of TPM2B_MAX_NV_BUFFER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_NV_BUFFER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_MAX_NV_BUFFER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_MAX_NV_BUFFER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_MAX_NV_BUFFER::buffer" ); } impl Default for TPM2B_MAX_NV_BUFFER { @@ -1204,32 +1062,22 @@ fn bindgen_test_layout_TPM2B_IV() { assert_eq!( ::std::mem::size_of::(), 18usize, - concat!("Size of: ", stringify!(TPM2B_IV)) + "Size of TPM2B_IV" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_IV)) + "Alignment of TPM2B_IV" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_IV), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_IV::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_IV), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_IV::buffer" ); } #[repr(C)] @@ -1245,32 +1093,22 @@ fn bindgen_test_layout_TPMU_NAME() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(TPMU_NAME)) + "Size of TPMU_NAME" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_NAME)) + "Alignment of TPMU_NAME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_NAME), - "::", - stringify!(digest) - ) + "Offset of field: TPMU_NAME::digest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_NAME), - "::", - stringify!(handle) - ) + "Offset of field: TPMU_NAME::handle" ); } impl Default for TPMU_NAME { @@ -1295,32 +1133,22 @@ fn bindgen_test_layout_TPM2B_NAME() { assert_eq!( ::std::mem::size_of::(), 70usize, - concat!("Size of: ", stringify!(TPM2B_NAME)) + "Size of TPM2B_NAME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_NAME)) + "Alignment of TPM2B_NAME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NAME), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_NAME::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NAME), - "::", - stringify!(name) - ) + "Offset of field: TPM2B_NAME::name" ); } impl Default for TPM2B_NAME { @@ -1345,32 +1173,22 @@ fn bindgen_test_layout_TPMS_PCR_SELECT() { assert_eq!( ::std::mem::size_of::(), 5usize, - concat!("Size of: ", stringify!(TPMS_PCR_SELECT)) + "Size of TPMS_PCR_SELECT" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMS_PCR_SELECT)) + "Alignment of TPMS_PCR_SELECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECT), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_PCR_SELECT::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECT), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_PCR_SELECT::pcrSelect" ); } #[repr(C)] @@ -1387,42 +1205,27 @@ fn bindgen_test_layout_TPMS_PCR_SELECTION() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_PCR_SELECTION)) + "Size of TPMS_PCR_SELECTION" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_PCR_SELECTION)) + "Alignment of TPMS_PCR_SELECTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_PCR_SELECTION::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_PCR_SELECTION::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(TPMS_PCR_SELECTION), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_PCR_SELECTION::pcrSelect" ); } #[repr(C)] @@ -1439,42 +1242,27 @@ fn bindgen_test_layout_TPMT_TK_CREATION() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_CREATION)) + "Size of TPMT_TK_CREATION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_CREATION)) + "Alignment of TPMT_TK_CREATION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_CREATION::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_CREATION::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_CREATION), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_CREATION::digest" ); } impl Default for TPMT_TK_CREATION { @@ -1500,42 +1288,27 @@ fn bindgen_test_layout_TPMT_TK_VERIFIED() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_VERIFIED)) + "Size of TPMT_TK_VERIFIED" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_VERIFIED)) + "Alignment of TPMT_TK_VERIFIED" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_VERIFIED::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_VERIFIED::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_VERIFIED), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_VERIFIED::digest" ); } impl Default for TPMT_TK_VERIFIED { @@ -1561,42 +1334,27 @@ fn bindgen_test_layout_TPMT_TK_AUTH() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_AUTH)) + "Size of TPMT_TK_AUTH" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_AUTH)) + "Alignment of TPMT_TK_AUTH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_AUTH::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_AUTH::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_AUTH), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_AUTH::digest" ); } impl Default for TPMT_TK_AUTH { @@ -1622,42 +1380,27 @@ fn bindgen_test_layout_TPMT_TK_HASHCHECK() { assert_eq!( ::std::mem::size_of::(), 76usize, - concat!("Size of: ", stringify!(TPMT_TK_HASHCHECK)) + "Size of TPMT_TK_HASHCHECK" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_TK_HASHCHECK)) + "Alignment of TPMT_TK_HASHCHECK" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(tag) - ) + "Offset of field: TPMT_TK_HASHCHECK::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMT_TK_HASHCHECK::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_TK_HASHCHECK), - "::", - stringify!(digest) - ) + "Offset of field: TPMT_TK_HASHCHECK::digest" ); } impl Default for TPMT_TK_HASHCHECK { @@ -1682,32 +1425,22 @@ fn bindgen_test_layout_TPMS_ALG_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_ALG_PROPERTY)) + "Size of TPMS_ALG_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ALG_PROPERTY)) + "Alignment of TPMS_ALG_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALG_PROPERTY), - "::", - stringify!(alg) - ) + "Offset of field: TPMS_ALG_PROPERTY::alg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALG_PROPERTY), - "::", - stringify!(algProperties) - ) + "Offset of field: TPMS_ALG_PROPERTY::algProperties" ); } #[repr(C)] @@ -1723,32 +1456,22 @@ fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_PROPERTY)) + "Size of TPMS_TAGGED_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_PROPERTY)) + "Alignment of TPMS_TAGGED_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PROPERTY), - "::", - stringify!(property) - ) + "Offset of field: TPMS_TAGGED_PROPERTY::property" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PROPERTY), - "::", - stringify!(value) - ) + "Offset of field: TPMS_TAGGED_PROPERTY::value" ); } #[repr(C)] @@ -1766,42 +1489,27 @@ fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_PCR_SELECT)) + "Size of TPMS_TAGGED_PCR_SELECT" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_PCR_SELECT)) + "Alignment of TPMS_TAGGED_PCR_SELECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(tag) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(sizeofSelect) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::sizeofSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 5usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_PCR_SELECT), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_TAGGED_PCR_SELECT::pcrSelect" ); } #[repr(C)] @@ -1817,32 +1525,22 @@ fn bindgen_test_layout_TPMS_TAGGED_POLICY() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(TPMS_TAGGED_POLICY)) + "Size of TPMS_TAGGED_POLICY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_TAGGED_POLICY)) + "Alignment of TPMS_TAGGED_POLICY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_POLICY), - "::", - stringify!(handle) - ) + "Offset of field: TPMS_TAGGED_POLICY::handle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).policyHash) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TAGGED_POLICY), - "::", - stringify!(policyHash) - ) + "Offset of field: TPMS_TAGGED_POLICY::policyHash" ); } impl Default for TPMS_TAGGED_POLICY { @@ -1868,42 +1566,27 @@ fn bindgen_test_layout_TPMS_ACT_DATA() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_ACT_DATA)) + "Size of TPMS_ACT_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_ACT_DATA)) + "Alignment of TPMS_ACT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(handle) - ) + "Offset of field: TPMS_ACT_DATA::handle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(timeout) - ) + "Offset of field: TPMS_ACT_DATA::timeout" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ACT_DATA), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_ACT_DATA::attributes" ); } #[repr(C)] @@ -1919,32 +1602,22 @@ fn bindgen_test_layout_TPML_CC() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_CC)) + "Size of TPML_CC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_CC)) + "Alignment of TPML_CC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_CC), - "::", - stringify!(count) - ) + "Offset of field: TPML_CC::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandCodes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_CC), - "::", - stringify!(commandCodes) - ) + "Offset of field: TPML_CC::commandCodes" ); } impl Default for TPML_CC { @@ -1969,32 +1642,22 @@ fn bindgen_test_layout_TPML_CCA() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_CCA)) + "Size of TPML_CCA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_CCA)) + "Alignment of TPML_CCA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_CCA), - "::", - stringify!(count) - ) + "Offset of field: TPML_CCA::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandAttributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_CCA), - "::", - stringify!(commandAttributes) - ) + "Offset of field: TPML_CCA::commandAttributes" ); } impl Default for TPML_CCA { @@ -2019,32 +1682,22 @@ fn bindgen_test_layout_TPML_ALG() { assert_eq!( ::std::mem::size_of::(), 260usize, - concat!("Size of: ", stringify!(TPML_ALG)) + "Size of TPML_ALG" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ALG)) + "Alignment of TPML_ALG" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG), - "::", - stringify!(count) - ) + "Offset of field: TPML_ALG::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG), - "::", - stringify!(algorithms) - ) + "Offset of field: TPML_ALG::algorithms" ); } impl Default for TPML_ALG { @@ -2069,32 +1722,22 @@ fn bindgen_test_layout_TPML_HANDLE() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_HANDLE)) + "Size of TPML_HANDLE" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_HANDLE)) + "Alignment of TPML_HANDLE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_HANDLE), - "::", - stringify!(count) - ) + "Offset of field: TPML_HANDLE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_HANDLE), - "::", - stringify!(handle) - ) + "Offset of field: TPML_HANDLE::handle" ); } impl Default for TPML_HANDLE { @@ -2119,32 +1762,22 @@ fn bindgen_test_layout_TPML_DIGEST() { assert_eq!( ::std::mem::size_of::(), 532usize, - concat!("Size of: ", stringify!(TPML_DIGEST)) + "Size of TPML_DIGEST" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_DIGEST)) + "Alignment of TPML_DIGEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST), - "::", - stringify!(count) - ) + "Offset of field: TPML_DIGEST::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST), - "::", - stringify!(digests) - ) + "Offset of field: TPML_DIGEST::digests" ); } impl Default for TPML_DIGEST { @@ -2169,32 +1802,22 @@ fn bindgen_test_layout_TPML_DIGEST_VALUES() { assert_eq!( ::std::mem::size_of::(), 1060usize, - concat!("Size of: ", stringify!(TPML_DIGEST_VALUES)) + "Size of TPML_DIGEST_VALUES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_DIGEST_VALUES)) + "Alignment of TPML_DIGEST_VALUES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST_VALUES), - "::", - stringify!(count) - ) + "Offset of field: TPML_DIGEST_VALUES::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_DIGEST_VALUES), - "::", - stringify!(digests) - ) + "Offset of field: TPML_DIGEST_VALUES::digests" ); } impl Default for TPML_DIGEST_VALUES { @@ -2219,32 +1842,22 @@ fn bindgen_test_layout_TPML_PCR_SELECTION() { assert_eq!( ::std::mem::size_of::(), 132usize, - concat!("Size of: ", stringify!(TPML_PCR_SELECTION)) + "Size of TPML_PCR_SELECTION" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_PCR_SELECTION)) + "Alignment of TPML_PCR_SELECTION" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_PCR_SELECTION), - "::", - stringify!(count) - ) + "Offset of field: TPML_PCR_SELECTION::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelections) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_PCR_SELECTION), - "::", - stringify!(pcrSelections) - ) + "Offset of field: TPML_PCR_SELECTION::pcrSelections" ); } #[repr(C)] @@ -2260,32 +1873,22 @@ fn bindgen_test_layout_TPML_ALG_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_ALG_PROPERTY)) + "Size of TPML_ALG_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ALG_PROPERTY)) + "Alignment of TPML_ALG_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_ALG_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ALG_PROPERTY), - "::", - stringify!(algProperties) - ) + "Offset of field: TPML_ALG_PROPERTY::algProperties" ); } impl Default for TPML_ALG_PROPERTY { @@ -2311,32 +1914,22 @@ fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_TAGGED_TPM_PROPERTY)) + "Size of TPML_TAGGED_TPM_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_TPM_PROPERTY)) + "Alignment of TPML_TAGGED_TPM_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_TPM_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_TPM_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tpmProperty) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_TPM_PROPERTY), - "::", - stringify!(tpmProperty) - ) + "Offset of field: TPML_TAGGED_TPM_PROPERTY::tpmProperty" ); } impl Default for TPML_TAGGED_TPM_PROPERTY { @@ -2362,32 +1955,22 @@ fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_TAGGED_PCR_PROPERTY)) + "Size of TPML_TAGGED_PCR_PROPERTY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_PCR_PROPERTY)) + "Alignment of TPML_TAGGED_PCR_PROPERTY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_PCR_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_PCR_PROPERTY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrProperty) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_PCR_PROPERTY), - "::", - stringify!(pcrProperty) - ) + "Offset of field: TPML_TAGGED_PCR_PROPERTY::pcrProperty" ); } impl Default for TPML_TAGGED_PCR_PROPERTY { @@ -2412,32 +1995,22 @@ fn bindgen_test_layout_TPML_ECC_CURVE() { assert_eq!( ::std::mem::size_of::(), 1020usize, - concat!("Size of: ", stringify!(TPML_ECC_CURVE)) + "Size of TPML_ECC_CURVE" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ECC_CURVE)) + "Alignment of TPML_ECC_CURVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ECC_CURVE), - "::", - stringify!(count) - ) + "Offset of field: TPML_ECC_CURVE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ECC_CURVE), - "::", - stringify!(eccCurves) - ) + "Offset of field: TPML_ECC_CURVE::eccCurves" ); } impl Default for TPML_ECC_CURVE { @@ -2462,32 +2035,22 @@ fn bindgen_test_layout_TPML_TAGGED_POLICY() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_TAGGED_POLICY)) + "Size of TPML_TAGGED_POLICY" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_TAGGED_POLICY)) + "Alignment of TPML_TAGGED_POLICY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_POLICY), - "::", - stringify!(count) - ) + "Offset of field: TPML_TAGGED_POLICY::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).policies) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_TAGGED_POLICY), - "::", - stringify!(policies) - ) + "Offset of field: TPML_TAGGED_POLICY::policies" ); } impl Default for TPML_TAGGED_POLICY { @@ -2512,32 +2075,22 @@ fn bindgen_test_layout_TPML_ACT_DATA() { assert_eq!( ::std::mem::size_of::(), 1012usize, - concat!("Size of: ", stringify!(TPML_ACT_DATA)) + "Size of TPML_ACT_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_ACT_DATA)) + "Alignment of TPML_ACT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_ACT_DATA), - "::", - stringify!(count) - ) + "Offset of field: TPML_ACT_DATA::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actData) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_ACT_DATA), - "::", - stringify!(actData) - ) + "Offset of field: TPML_ACT_DATA::actData" ); } impl Default for TPML_ACT_DATA { @@ -2551,47 +2104,36 @@ impl Default for TPML_ACT_DATA { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct TPML_INTEL_PTT_PROPERTY { - pub count: UINT32, - pub property: [UINT32; 256usize], +pub struct TPM2B_MAX_CAP_BUFFER { + pub size: UINT16, + pub buffer: [BYTE; 1024usize], } #[test] -fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); +fn bindgen_test_layout_TPM2B_MAX_CAP_BUFFER() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 1028usize, - concat!("Size of: ", stringify!(TPML_INTEL_PTT_PROPERTY)) + ::std::mem::size_of::(), + 1026usize, + "Size of TPM2B_MAX_CAP_BUFFER" ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(TPML_INTEL_PTT_PROPERTY)) + ::std::mem::align_of::(), + 2usize, + "Alignment of TPM2B_MAX_CAP_BUFFER" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_INTEL_PTT_PROPERTY), - "::", - stringify!(count) - ) + "Offset of field: TPM2B_MAX_CAP_BUFFER::size" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_INTEL_PTT_PROPERTY), - "::", - stringify!(property) - ) + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, + 2usize, + "Offset of field: TPM2B_MAX_CAP_BUFFER::buffer" ); } -impl Default for TPML_INTEL_PTT_PROPERTY { +impl Default for TPM2B_MAX_CAP_BUFFER { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -2614,7 +2156,7 @@ pub union TPMU_CAPABILITIES { pub eccCurves: TPML_ECC_CURVE, pub authPolicies: TPML_TAGGED_POLICY, pub actData: TPML_ACT_DATA, - pub intelPttProperty: TPML_INTEL_PTT_PROPERTY, + pub vendor: TPM2B_MAX_CAP_BUFFER, } #[test] fn bindgen_test_layout_TPMU_CAPABILITIES() { @@ -2623,132 +2165,72 @@ fn bindgen_test_layout_TPMU_CAPABILITIES() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPMU_CAPABILITIES)) + "Size of TPMU_CAPABILITIES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_CAPABILITIES)) + "Alignment of TPMU_CAPABILITIES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(algorithms) - ) + "Offset of field: TPMU_CAPABILITIES::algorithms" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handles) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(handles) - ) + "Offset of field: TPMU_CAPABILITIES::handles" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).command) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(command) - ) + "Offset of field: TPMU_CAPABILITIES::command" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ppCommands) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(ppCommands) - ) + "Offset of field: TPMU_CAPABILITIES::ppCommands" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditCommands) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(auditCommands) - ) + "Offset of field: TPMU_CAPABILITIES::auditCommands" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assignedPCR) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(assignedPCR) - ) + "Offset of field: TPMU_CAPABILITIES::assignedPCR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tpmProperties) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(tpmProperties) - ) + "Offset of field: TPMU_CAPABILITIES::tpmProperties" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrProperties) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(pcrProperties) - ) + "Offset of field: TPMU_CAPABILITIES::pcrProperties" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(eccCurves) - ) + "Offset of field: TPMU_CAPABILITIES::eccCurves" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicies) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(authPolicies) - ) + "Offset of field: TPMU_CAPABILITIES::authPolicies" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(actData) - ) + "Offset of field: TPMU_CAPABILITIES::actData" ); assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).intelPttProperty) as usize - ptr as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vendor) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_CAPABILITIES), - "::", - stringify!(intelPttProperty) - ) + "Offset of field: TPMU_CAPABILITIES::vendor" ); } impl Default for TPMU_CAPABILITIES { @@ -2773,32 +2255,22 @@ fn bindgen_test_layout_TPMS_CAPABILITY_DATA() { assert_eq!( ::std::mem::size_of::(), 1032usize, - concat!("Size of: ", stringify!(TPMS_CAPABILITY_DATA)) + "Size of TPMS_CAPABILITY_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_CAPABILITY_DATA)) + "Alignment of TPMS_CAPABILITY_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CAPABILITY_DATA), - "::", - stringify!(capability) - ) + "Offset of field: TPMS_CAPABILITY_DATA::capability" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CAPABILITY_DATA), - "::", - stringify!(data) - ) + "Offset of field: TPMS_CAPABILITY_DATA::data" ); } impl Default for TPMS_CAPABILITY_DATA { @@ -2825,52 +2297,32 @@ fn bindgen_test_layout_TPMS_CLOCK_INFO() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(TPMS_CLOCK_INFO)) + "Size of TPMS_CLOCK_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_CLOCK_INFO)) + "Alignment of TPMS_CLOCK_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(clock) - ) + "Offset of field: TPMS_CLOCK_INFO::clock" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resetCount) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(resetCount) - ) + "Offset of field: TPMS_CLOCK_INFO::resetCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).restartCount) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(restartCount) - ) + "Offset of field: TPMS_CLOCK_INFO::restartCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).safe) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CLOCK_INFO), - "::", - stringify!(safe) - ) + "Offset of field: TPMS_CLOCK_INFO::safe" ); } #[repr(C)] @@ -2886,32 +2338,22 @@ fn bindgen_test_layout_TPMS_TIME_INFO() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(TPMS_TIME_INFO)) + "Size of TPMS_TIME_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_TIME_INFO)) + "Alignment of TPMS_TIME_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_INFO), - "::", - stringify!(time) - ) + "Offset of field: TPMS_TIME_INFO::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_INFO), - "::", - stringify!(clockInfo) - ) + "Offset of field: TPMS_TIME_INFO::clockInfo" ); } #[repr(C)] @@ -2928,32 +2370,22 @@ fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(TPMS_TIME_ATTEST_INFO)) + "Size of TPMS_TIME_ATTEST_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_TIME_ATTEST_INFO)) + "Alignment of TPMS_TIME_ATTEST_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_ATTEST_INFO), - "::", - stringify!(time) - ) + "Offset of field: TPMS_TIME_ATTEST_INFO::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TPMS_TIME_ATTEST_INFO), - "::", - stringify!(firmwareVersion) - ) + "Offset of field: TPMS_TIME_ATTEST_INFO::firmwareVersion" ); } #[repr(C)] @@ -2969,32 +2401,22 @@ fn bindgen_test_layout_TPMS_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 140usize, - concat!("Size of: ", stringify!(TPMS_CERTIFY_INFO)) + "Size of TPMS_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CERTIFY_INFO)) + "Alignment of TPMS_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CERTIFY_INFO), - "::", - stringify!(name) - ) + "Offset of field: TPMS_CERTIFY_INFO::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qualifiedName) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CERTIFY_INFO), - "::", - stringify!(qualifiedName) - ) + "Offset of field: TPMS_CERTIFY_INFO::qualifiedName" ); } impl Default for TPMS_CERTIFY_INFO { @@ -3019,32 +2441,22 @@ fn bindgen_test_layout_TPMS_QUOTE_INFO() { assert_eq!( ::std::mem::size_of::(), 200usize, - concat!("Size of: ", stringify!(TPMS_QUOTE_INFO)) + "Size of TPMS_QUOTE_INFO" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_QUOTE_INFO)) + "Alignment of TPMS_QUOTE_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_QUOTE_INFO), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_QUOTE_INFO::pcrSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_QUOTE_INFO), - "::", - stringify!(pcrDigest) - ) + "Offset of field: TPMS_QUOTE_INFO::pcrDigest" ); } impl Default for TPMS_QUOTE_INFO { @@ -3072,52 +2484,32 @@ fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() { assert_eq!( ::std::mem::size_of::(), 144usize, - concat!("Size of: ", stringify!(TPMS_COMMAND_AUDIT_INFO)) + "Size of TPMS_COMMAND_AUDIT_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_COMMAND_AUDIT_INFO)) + "Alignment of TPMS_COMMAND_AUDIT_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditCounter) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(auditCounter) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::auditCounter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).digestAlg) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(digestAlg) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::digestAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auditDigest) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(auditDigest) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::auditDigest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandDigest) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMS_COMMAND_AUDIT_INFO), - "::", - stringify!(commandDigest) - ) + "Offset of field: TPMS_COMMAND_AUDIT_INFO::commandDigest" ); } impl Default for TPMS_COMMAND_AUDIT_INFO { @@ -3143,32 +2535,22 @@ fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(TPMS_SESSION_AUDIT_INFO)) + "Size of TPMS_SESSION_AUDIT_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SESSION_AUDIT_INFO)) + "Alignment of TPMS_SESSION_AUDIT_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveSession) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SESSION_AUDIT_INFO), - "::", - stringify!(exclusiveSession) - ) + "Offset of field: TPMS_SESSION_AUDIT_INFO::exclusiveSession" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionDigest) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SESSION_AUDIT_INFO), - "::", - stringify!(sessionDigest) - ) + "Offset of field: TPMS_SESSION_AUDIT_INFO::sessionDigest" ); } impl Default for TPMS_SESSION_AUDIT_INFO { @@ -3193,32 +2575,22 @@ fn bindgen_test_layout_TPMS_CREATION_INFO() { assert_eq!( ::std::mem::size_of::(), 136usize, - concat!("Size of: ", stringify!(TPMS_CREATION_INFO)) + "Size of TPMS_CREATION_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CREATION_INFO)) + "Alignment of TPMS_CREATION_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objectName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_INFO), - "::", - stringify!(objectName) - ) + "Offset of field: TPMS_CREATION_INFO::objectName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creationHash) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_INFO), - "::", - stringify!(creationHash) - ) + "Offset of field: TPMS_CREATION_INFO::creationHash" ); } impl Default for TPMS_CREATION_INFO { @@ -3244,42 +2616,27 @@ fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 2122usize, - concat!("Size of: ", stringify!(TPMS_NV_CERTIFY_INFO)) + "Size of TPMS_NV_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_NV_CERTIFY_INFO)) + "Alignment of TPMS_NV_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(indexName) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::indexName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(offset) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::offset" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvContents) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_CERTIFY_INFO), - "::", - stringify!(nvContents) - ) + "Offset of field: TPMS_NV_CERTIFY_INFO::nvContents" ); } impl Default for TPMS_NV_CERTIFY_INFO { @@ -3305,32 +2662,22 @@ fn bindgen_test_layout_TPMS_NV_DIGEST_CERTIFY_INFO() { assert_eq!( ::std::mem::size_of::(), 136usize, - concat!("Size of: ", stringify!(TPMS_NV_DIGEST_CERTIFY_INFO)) + "Size of TPMS_NV_DIGEST_CERTIFY_INFO" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_NV_DIGEST_CERTIFY_INFO)) + "Alignment of TPMS_NV_DIGEST_CERTIFY_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_DIGEST_CERTIFY_INFO), - "::", - stringify!(indexName) - ) + "Offset of field: TPMS_NV_DIGEST_CERTIFY_INFO::indexName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvDigest) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_DIGEST_CERTIFY_INFO), - "::", - stringify!(nvDigest) - ) + "Offset of field: TPMS_NV_DIGEST_CERTIFY_INFO::nvDigest" ); } impl Default for TPMS_NV_DIGEST_CERTIFY_INFO { @@ -3361,82 +2708,47 @@ fn bindgen_test_layout_TPMU_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2128usize, - concat!("Size of: ", stringify!(TPMU_ATTEST)) + "Size of TPMU_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMU_ATTEST)) + "Alignment of TPMU_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).certify) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(certify) - ) + "Offset of field: TPMU_ATTEST::certify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(creation) - ) + "Offset of field: TPMU_ATTEST::creation" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quote) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(quote) - ) + "Offset of field: TPMU_ATTEST::quote" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).commandAudit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(commandAudit) - ) + "Offset of field: TPMU_ATTEST::commandAudit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAudit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(sessionAudit) - ) + "Offset of field: TPMU_ATTEST::sessionAudit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(time) - ) + "Offset of field: TPMU_ATTEST::time" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nv) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ATTEST), - "::", - stringify!(nv) - ) + "Offset of field: TPMU_ATTEST::nv" ); } impl Default for TPMU_ATTEST { @@ -3466,82 +2778,47 @@ fn bindgen_test_layout_TPMS_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2304usize, - concat!("Size of: ", stringify!(TPMS_ATTEST)) + "Size of TPMS_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_ATTEST)) + "Alignment of TPMS_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(magic) - ) + "Offset of field: TPMS_ATTEST::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(type_) - ) + "Offset of field: TPMS_ATTEST::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qualifiedSigner) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(qualifiedSigner) - ) + "Offset of field: TPMS_ATTEST::qualifiedSigner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraData) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(extraData) - ) + "Offset of field: TPMS_ATTEST::extraData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(clockInfo) - ) + "Offset of field: TPMS_ATTEST::clockInfo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(firmwareVersion) - ) + "Offset of field: TPMS_ATTEST::firmwareVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attested) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ATTEST), - "::", - stringify!(attested) - ) + "Offset of field: TPMS_ATTEST::attested" ); } impl Default for TPMS_ATTEST { @@ -3566,32 +2843,22 @@ fn bindgen_test_layout_TPM2B_ATTEST() { assert_eq!( ::std::mem::size_of::(), 2306usize, - concat!("Size of: ", stringify!(TPM2B_ATTEST)) + "Size of TPM2B_ATTEST" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ATTEST)) + "Alignment of TPM2B_ATTEST" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ATTEST), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ATTEST::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attestationData) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ATTEST), - "::", - stringify!(attestationData) - ) + "Offset of field: TPM2B_ATTEST::attestationData" ); } impl Default for TPM2B_ATTEST { @@ -3618,52 +2885,32 @@ fn bindgen_test_layout_TPMS_AUTH_COMMAND() { assert_eq!( ::std::mem::size_of::(), 140usize, - concat!("Size of: ", stringify!(TPMS_AUTH_COMMAND)) + "Size of TPMS_AUTH_COMMAND" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_AUTH_COMMAND)) + "Alignment of TPMS_AUTH_COMMAND" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionHandle) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(sessionHandle) - ) + "Offset of field: TPMS_AUTH_COMMAND::sessionHandle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(nonce) - ) + "Offset of field: TPMS_AUTH_COMMAND::nonce" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(sessionAttributes) - ) + "Offset of field: TPMS_AUTH_COMMAND::sessionAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_COMMAND), - "::", - stringify!(hmac) - ) + "Offset of field: TPMS_AUTH_COMMAND::hmac" ); } impl Default for TPMS_AUTH_COMMAND { @@ -3689,42 +2936,27 @@ fn bindgen_test_layout_TPMS_AUTH_RESPONSE() { assert_eq!( ::std::mem::size_of::(), 134usize, - concat!("Size of: ", stringify!(TPMS_AUTH_RESPONSE)) + "Size of TPMS_AUTH_RESPONSE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_AUTH_RESPONSE)) + "Alignment of TPMS_AUTH_RESPONSE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(nonce) - ) + "Offset of field: TPMS_AUTH_RESPONSE::nonce" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(sessionAttributes) - ) + "Offset of field: TPMS_AUTH_RESPONSE::sessionAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AUTH_RESPONSE), - "::", - stringify!(hmac) - ) + "Offset of field: TPMS_AUTH_RESPONSE::hmac" ); } impl Default for TPMS_AUTH_RESPONSE { @@ -3747,6 +2979,7 @@ pub union TPMU_SYM_KEY_BITS { pub camellia: TPMI_CAMELLIA_KEY_BITS, pub sym: TPM2_KEY_BITS, pub exclusiveOr: TPMI_ALG_HASH, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { @@ -3755,62 +2988,42 @@ fn bindgen_test_layout_TPMU_SYM_KEY_BITS() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_SYM_KEY_BITS)) + "Size of TPMU_SYM_KEY_BITS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SYM_KEY_BITS)) + "Alignment of TPMU_SYM_KEY_BITS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(aes) - ) + "Offset of field: TPMU_SYM_KEY_BITS::aes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(sm4) - ) + "Offset of field: TPMU_SYM_KEY_BITS::sm4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(camellia) - ) + "Offset of field: TPMU_SYM_KEY_BITS::camellia" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SYM_KEY_BITS::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_KEY_BITS), - "::", - stringify!(exclusiveOr) - ) + "Offset of field: TPMU_SYM_KEY_BITS::exclusiveOr" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SYM_KEY_BITS::null" ); } impl Default for TPMU_SYM_KEY_BITS { @@ -3829,6 +3042,8 @@ pub union TPMU_SYM_MODE { pub sm4: TPMI_ALG_SYM_MODE, pub camellia: TPMI_ALG_SYM_MODE, pub sym: TPMI_ALG_SYM_MODE, + pub exclusiveOr: TPMS_EMPTY, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_SYM_MODE() { @@ -3837,52 +3052,42 @@ fn bindgen_test_layout_TPMU_SYM_MODE() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_SYM_MODE)) + "Size of TPMU_SYM_MODE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SYM_MODE)) + "Alignment of TPMU_SYM_MODE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(aes) - ) + "Offset of field: TPMU_SYM_MODE::aes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(sm4) - ) + "Offset of field: TPMU_SYM_MODE::sm4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(camellia) - ) + "Offset of field: TPMU_SYM_MODE::camellia" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SYM_MODE), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SYM_MODE::sym" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SYM_MODE::exclusiveOr" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SYM_MODE::null" ); } impl Default for TPMU_SYM_MODE { @@ -3908,42 +3113,27 @@ fn bindgen_test_layout_TPMT_SYM_DEF() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SYM_DEF)) + "Size of TPMT_SYM_DEF" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SYM_DEF)) + "Alignment of TPMT_SYM_DEF" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(algorithm) - ) + "Offset of field: TPMT_SYM_DEF::algorithm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMT_SYM_DEF::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF), - "::", - stringify!(mode) - ) + "Offset of field: TPMT_SYM_DEF::mode" ); } impl Default for TPMT_SYM_DEF { @@ -3969,42 +3159,27 @@ fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SYM_DEF_OBJECT)) + "Size of TPMT_SYM_DEF_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SYM_DEF_OBJECT)) + "Alignment of TPMT_SYM_DEF_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(algorithm) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::algorithm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SYM_DEF_OBJECT), - "::", - stringify!(mode) - ) + "Offset of field: TPMT_SYM_DEF_OBJECT::mode" ); } impl Default for TPMT_SYM_DEF_OBJECT { @@ -4029,32 +3204,22 @@ fn bindgen_test_layout_TPM2B_SYM_KEY() { assert_eq!( ::std::mem::size_of::(), 34usize, - concat!("Size of: ", stringify!(TPM2B_SYM_KEY)) + "Size of TPM2B_SYM_KEY" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SYM_KEY)) + "Alignment of TPM2B_SYM_KEY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SYM_KEY), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SYM_KEY::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SYM_KEY), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_SYM_KEY::buffer" ); } #[repr(C)] @@ -4069,22 +3234,17 @@ fn bindgen_test_layout_TPMS_SYMCIPHER_PARMS() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMS_SYMCIPHER_PARMS)) + "Size of TPMS_SYMCIPHER_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SYMCIPHER_PARMS)) + "Alignment of TPMS_SYMCIPHER_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SYMCIPHER_PARMS), - "::", - stringify!(sym) - ) + "Offset of field: TPMS_SYMCIPHER_PARMS::sym" ); } impl Default for TPMS_SYMCIPHER_PARMS { @@ -4097,6 +3257,149 @@ impl Default for TPMS_SYMCIPHER_PARMS { } } #[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct TPM2B_LABEL { + pub size: UINT16, + pub buffer: [BYTE; 32usize], +} +#[test] +fn bindgen_test_layout_TPM2B_LABEL() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 34usize, + "Size of TPM2B_LABEL" + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + "Alignment of TPM2B_LABEL" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 0usize, + "Offset of field: TPM2B_LABEL::size" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, + 2usize, + "Offset of field: TPM2B_LABEL::buffer" + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct TPMS_DERIVE { + pub label: TPM2B_LABEL, + pub context: TPM2B_LABEL, +} +#[test] +fn bindgen_test_layout_TPMS_DERIVE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 68usize, + "Size of TPMS_DERIVE" + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + "Alignment of TPMS_DERIVE" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMS_DERIVE::label" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, + 34usize, + "Offset of field: TPMS_DERIVE::context" + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TPM2B_DERIVE { + pub size: UINT16, + pub buffer: [BYTE; 68usize], +} +#[test] +fn bindgen_test_layout_TPM2B_DERIVE() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 70usize, + "Size of TPM2B_DERIVE" + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + "Alignment of TPM2B_DERIVE" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 0usize, + "Offset of field: TPM2B_DERIVE::size" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, + 2usize, + "Offset of field: TPM2B_DERIVE::buffer" + ); +} +impl Default for TPM2B_DERIVE { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union TPMU_SENSITIVE_CREATE { + pub create: [BYTE; 256usize], + pub derive: TPMS_DERIVE, +} +#[test] +fn bindgen_test_layout_TPMU_SENSITIVE_CREATE() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + "Size of TPMU_SENSITIVE_CREATE" + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + "Alignment of TPMU_SENSITIVE_CREATE" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).create) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SENSITIVE_CREATE::create" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).derive) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SENSITIVE_CREATE::derive" + ); +} +impl Default for TPMU_SENSITIVE_CREATE { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct TPM2B_SENSITIVE_DATA { pub size: UINT16, @@ -4109,32 +3412,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() { assert_eq!( ::std::mem::size_of::(), 258usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE_DATA)) + "Size of TPM2B_SENSITIVE_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_DATA)) + "Alignment of TPM2B_SENSITIVE_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_SENSITIVE_DATA::buffer" ); } impl Default for TPM2B_SENSITIVE_DATA { @@ -4160,32 +3453,22 @@ fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() { assert_eq!( ::std::mem::size_of::(), 324usize, - concat!("Size of: ", stringify!(TPMS_SENSITIVE_CREATE)) + "Size of TPMS_SENSITIVE_CREATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SENSITIVE_CREATE)) + "Alignment of TPMS_SENSITIVE_CREATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userAuth) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SENSITIVE_CREATE), - "::", - stringify!(userAuth) - ) + "Offset of field: TPMS_SENSITIVE_CREATE::userAuth" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SENSITIVE_CREATE), - "::", - stringify!(data) - ) + "Offset of field: TPMS_SENSITIVE_CREATE::data" ); } impl Default for TPMS_SENSITIVE_CREATE { @@ -4211,32 +3494,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() { assert_eq!( ::std::mem::size_of::(), 326usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE_CREATE)) + "Size of TPM2B_SENSITIVE_CREATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_CREATE)) + "Alignment of TPM2B_SENSITIVE_CREATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_CREATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE_CREATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE_CREATE), - "::", - stringify!(sensitive) - ) + "Offset of field: TPM2B_SENSITIVE_CREATE::sensitive" ); } impl Default for TPM2B_SENSITIVE_CREATE { @@ -4260,22 +3533,17 @@ fn bindgen_test_layout_TPMS_SCHEME_HASH() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_HASH)) + "Size of TPMS_SCHEME_HASH" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_HASH)) + "Alignment of TPMS_SCHEME_HASH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_HASH), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_HASH::hashAlg" ); } #[repr(C)] @@ -4291,32 +3559,22 @@ fn bindgen_test_layout_TPMS_SCHEME_ECDAA() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_ECDAA)) + "Size of TPMS_SCHEME_ECDAA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_ECDAA)) + "Alignment of TPMS_SCHEME_ECDAA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_ECDAA), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_ECDAA::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_ECDAA), - "::", - stringify!(count) - ) + "Offset of field: TPMS_SCHEME_ECDAA::count" ); } pub type TPMI_ALG_KEYEDHASH_SCHEME = TPM2_ALG_ID; @@ -4334,32 +3592,22 @@ fn bindgen_test_layout_TPMS_SCHEME_XOR() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMS_SCHEME_XOR)) + "Size of TPMS_SCHEME_XOR" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SCHEME_XOR)) + "Alignment of TPMS_SCHEME_XOR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_XOR), - "::", - stringify!(hashAlg) - ) + "Offset of field: TPMS_SCHEME_XOR::hashAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SCHEME_XOR), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_SCHEME_XOR::kdf" ); } #[repr(C)] @@ -4367,6 +3615,7 @@ fn bindgen_test_layout_TPMS_SCHEME_XOR() { pub union TPMU_SCHEME_KEYEDHASH { pub hmac: TPMS_SCHEME_HMAC, pub exclusiveOr: TPMS_SCHEME_XOR, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { @@ -4376,32 +3625,27 @@ fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_SCHEME_KEYEDHASH)) + "Size of TPMU_SCHEME_KEYEDHASH" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SCHEME_KEYEDHASH)) + "Alignment of TPMU_SCHEME_KEYEDHASH" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SCHEME_KEYEDHASH), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SCHEME_KEYEDHASH::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SCHEME_KEYEDHASH), - "::", - stringify!(exclusiveOr) - ) + "Offset of field: TPMU_SCHEME_KEYEDHASH::exclusiveOr" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SCHEME_KEYEDHASH::null" ); } impl Default for TPMU_SCHEME_KEYEDHASH { @@ -4427,32 +3671,22 @@ fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_KEYEDHASH_SCHEME)) + "Size of TPMT_KEYEDHASH_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_KEYEDHASH_SCHEME)) + "Alignment of TPMT_KEYEDHASH_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KEYEDHASH_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_KEYEDHASH_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KEYEDHASH_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_KEYEDHASH_SCHEME::details" ); } impl Default for TPMT_KEYEDHASH_SCHEME { @@ -4481,6 +3715,7 @@ pub union TPMU_SIG_SCHEME { pub ecschnorr: TPMS_SIG_SCHEME_ECSCHNORR, pub hmac: TPMS_SCHEME_HMAC, pub any: TPMS_SCHEME_HASH, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_SIG_SCHEME() { @@ -4489,92 +3724,57 @@ fn bindgen_test_layout_TPMU_SIG_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_SIG_SCHEME)) + "Size of TPMU_SIG_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SIG_SCHEME)) + "Alignment of TPMU_SIG_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_SIG_SCHEME::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_SIG_SCHEME::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_SIG_SCHEME::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_SIG_SCHEME::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_SIG_SCHEME::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_SIG_SCHEME::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SIG_SCHEME::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIG_SCHEME), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SIG_SCHEME::any" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SIG_SCHEME::null" ); } impl Default for TPMU_SIG_SCHEME { @@ -4599,32 +3799,22 @@ fn bindgen_test_layout_TPMT_SIG_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_SIG_SCHEME)) + "Size of TPMT_SIG_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SIG_SCHEME)) + "Alignment of TPMT_SIG_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIG_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_SIG_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIG_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_SIG_SCHEME::details" ); } impl Default for TPMT_SIG_SCHEME { @@ -4651,6 +3841,7 @@ pub union TPMU_KDF_SCHEME { pub kdf1_sp800_56a: TPMS_SCHEME_KDF1_SP800_56A, pub kdf2: TPMS_SCHEME_KDF2, pub kdf1_sp800_108: TPMS_SCHEME_KDF1_SP800_108, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_KDF_SCHEME() { @@ -4659,52 +3850,37 @@ fn bindgen_test_layout_TPMU_KDF_SCHEME() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(TPMU_KDF_SCHEME)) + "Size of TPMU_KDF_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_KDF_SCHEME)) + "Alignment of TPMU_KDF_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mgf1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(mgf1) - ) + "Offset of field: TPMU_KDF_SCHEME::mgf1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_56a) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf1_sp800_56a) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf1_sp800_56a" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf2) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf1_sp800_108) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_KDF_SCHEME), - "::", - stringify!(kdf1_sp800_108) - ) + "Offset of field: TPMU_KDF_SCHEME::kdf1_sp800_108" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_KDF_SCHEME::null" ); } impl Default for TPMU_KDF_SCHEME { @@ -4729,32 +3905,22 @@ fn bindgen_test_layout_TPMT_KDF_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMT_KDF_SCHEME)) + "Size of TPMT_KDF_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_KDF_SCHEME)) + "Alignment of TPMT_KDF_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KDF_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_KDF_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_KDF_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_KDF_SCHEME::details" ); } impl Default for TPMT_KDF_SCHEME { @@ -4781,6 +3947,7 @@ pub union TPMU_ASYM_SCHEME { pub rsaes: TPMS_ENC_SCHEME_RSAES, pub oaep: TPMS_ENC_SCHEME_OAEP, pub anySig: TPMS_SCHEME_HASH, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_ASYM_SCHEME() { @@ -4789,122 +3956,72 @@ fn bindgen_test_layout_TPMU_ASYM_SCHEME() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(TPMU_ASYM_SCHEME)) + "Size of TPMU_ASYM_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_ASYM_SCHEME)) + "Alignment of TPMU_ASYM_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdh) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdh) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecmqv) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecmqv) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecmqv" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_ASYM_SCHEME::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_ASYM_SCHEME::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaes) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(rsaes) - ) + "Offset of field: TPMU_ASYM_SCHEME::rsaes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oaep) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(oaep) - ) + "Offset of field: TPMU_ASYM_SCHEME::oaep" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anySig) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ASYM_SCHEME), - "::", - stringify!(anySig) - ) + "Offset of field: TPMU_ASYM_SCHEME::anySig" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_ASYM_SCHEME::null" ); } impl Default for TPMU_ASYM_SCHEME { @@ -4929,32 +4046,22 @@ fn bindgen_test_layout_TPMT_ASYM_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_ASYM_SCHEME)) + "Size of TPMT_ASYM_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_ASYM_SCHEME)) + "Alignment of TPMT_ASYM_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ASYM_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_ASYM_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ASYM_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_ASYM_SCHEME::details" ); } impl Default for TPMT_ASYM_SCHEME { @@ -4980,32 +4087,22 @@ fn bindgen_test_layout_TPMT_RSA_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_RSA_SCHEME)) + "Size of TPMT_RSA_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_RSA_SCHEME)) + "Alignment of TPMT_RSA_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_RSA_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_RSA_SCHEME::details" ); } impl Default for TPMT_RSA_SCHEME { @@ -5031,32 +4128,22 @@ fn bindgen_test_layout_TPMT_RSA_DECRYPT() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_RSA_DECRYPT)) + "Size of TPMT_RSA_DECRYPT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_RSA_DECRYPT)) + "Alignment of TPMT_RSA_DECRYPT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_DECRYPT), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_RSA_DECRYPT::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_RSA_DECRYPT), - "::", - stringify!(details) - ) + "Offset of field: TPMT_RSA_DECRYPT::details" ); } impl Default for TPMT_RSA_DECRYPT { @@ -5081,32 +4168,22 @@ fn bindgen_test_layout_TPM2B_PUBLIC_KEY_RSA() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPM2B_PUBLIC_KEY_RSA)) + "Size of TPM2B_PUBLIC_KEY_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PUBLIC_KEY_RSA)) + "Alignment of TPM2B_PUBLIC_KEY_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC_KEY_RSA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PUBLIC_KEY_RSA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC_KEY_RSA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PUBLIC_KEY_RSA::buffer" ); } impl Default for TPM2B_PUBLIC_KEY_RSA { @@ -5123,7 +4200,7 @@ pub type TPMI_RSA_KEY_BITS = TPM2_KEY_BITS; #[derive(Debug, Copy, Clone)] pub struct TPM2B_PRIVATE_KEY_RSA { pub size: UINT16, - pub buffer: [BYTE; 256usize], + pub buffer: [BYTE; 1280usize], } #[test] fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { @@ -5132,33 +4209,23 @@ fn bindgen_test_layout_TPM2B_PRIVATE_KEY_RSA() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 258usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE_KEY_RSA)) + 1282usize, + "Size of TPM2B_PRIVATE_KEY_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE_KEY_RSA)) + "Alignment of TPM2B_PRIVATE_KEY_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_KEY_RSA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE_KEY_RSA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_KEY_RSA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE_KEY_RSA::buffer" ); } impl Default for TPM2B_PRIVATE_KEY_RSA { @@ -5183,32 +4250,22 @@ fn bindgen_test_layout_TPM2B_ECC_PARAMETER() { assert_eq!( ::std::mem::size_of::(), 130usize, - concat!("Size of: ", stringify!(TPM2B_ECC_PARAMETER)) + "Size of TPM2B_ECC_PARAMETER" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ECC_PARAMETER)) + "Alignment of TPM2B_ECC_PARAMETER" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_PARAMETER), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ECC_PARAMETER::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_PARAMETER), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_ECC_PARAMETER::buffer" ); } impl Default for TPM2B_ECC_PARAMETER { @@ -5233,32 +4290,22 @@ fn bindgen_test_layout_TPMS_ECC_POINT() { assert_eq!( ::std::mem::size_of::(), 260usize, - concat!("Size of: ", stringify!(TPMS_ECC_POINT)) + "Size of TPMS_ECC_POINT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ECC_POINT)) + "Alignment of TPMS_ECC_POINT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_POINT), - "::", - stringify!(x) - ) + "Offset of field: TPMS_ECC_POINT::x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 130usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_POINT), - "::", - stringify!(y) - ) + "Offset of field: TPMS_ECC_POINT::y" ); } impl Default for TPMS_ECC_POINT { @@ -5283,32 +4330,22 @@ fn bindgen_test_layout_TPM2B_ECC_POINT() { assert_eq!( ::std::mem::size_of::(), 262usize, - concat!("Size of: ", stringify!(TPM2B_ECC_POINT)) + "Size of TPM2B_ECC_POINT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ECC_POINT)) + "Alignment of TPM2B_ECC_POINT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_POINT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ECC_POINT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).point) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ECC_POINT), - "::", - stringify!(point) - ) + "Offset of field: TPM2B_ECC_POINT::point" ); } impl Default for TPM2B_ECC_POINT { @@ -5335,32 +4372,22 @@ fn bindgen_test_layout_TPMT_ECC_SCHEME() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMT_ECC_SCHEME)) + "Size of TPMT_ECC_SCHEME" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_ECC_SCHEME)) + "Alignment of TPMT_ECC_SCHEME" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ECC_SCHEME), - "::", - stringify!(scheme) - ) + "Offset of field: TPMT_ECC_SCHEME::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_ECC_SCHEME), - "::", - stringify!(details) - ) + "Offset of field: TPMT_ECC_SCHEME::details" ); } impl Default for TPMT_ECC_SCHEME { @@ -5395,122 +4422,67 @@ fn bindgen_test_layout_TPMS_ALGORITHM_DETAIL_ECC() { assert_eq!( ::std::mem::size_of::(), 924usize, - concat!("Size of: ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) + "Size of TPMS_ALGORITHM_DETAIL_ECC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DETAIL_ECC)) + "Alignment of TPMS_ALGORITHM_DETAIL_ECC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(curveID) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::curveID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keySize) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(keySize) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::keySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::kdf" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sign) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(sign) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::sign" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(p) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::p" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(a) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::a" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, 274usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(b) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::b" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gX) as usize - ptr as usize }, 404usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(gX) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::gX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gY) as usize - ptr as usize }, 534usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(gY) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::gY" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize }, 664usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(n) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::n" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, 794usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ALGORITHM_DETAIL_ECC), - "::", - stringify!(h) - ) + "Offset of field: TPMS_ALGORITHM_DETAIL_ECC::h" ); } impl Default for TPMS_ALGORITHM_DETAIL_ECC { @@ -5535,32 +4507,22 @@ fn bindgen_test_layout_TPMS_SIGNATURE_RSA() { assert_eq!( ::std::mem::size_of::(), 516usize, - concat!("Size of: ", stringify!(TPMS_SIGNATURE_RSA)) + "Size of TPMS_SIGNATURE_RSA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SIGNATURE_RSA)) + "Alignment of TPMS_SIGNATURE_RSA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_RSA), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_SIGNATURE_RSA::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sig) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_RSA), - "::", - stringify!(sig) - ) + "Offset of field: TPMS_SIGNATURE_RSA::sig" ); } impl Default for TPMS_SIGNATURE_RSA { @@ -5588,42 +4550,27 @@ fn bindgen_test_layout_TPMS_SIGNATURE_ECC() { assert_eq!( ::std::mem::size_of::(), 262usize, - concat!("Size of: ", stringify!(TPMS_SIGNATURE_ECC)) + "Size of TPMS_SIGNATURE_ECC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_SIGNATURE_ECC)) + "Alignment of TPMS_SIGNATURE_ECC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(hash) - ) + "Offset of field: TPMS_SIGNATURE_ECC::hash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signatureR) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(signatureR) - ) + "Offset of field: TPMS_SIGNATURE_ECC::signatureR" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signatureS) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_SIGNATURE_ECC), - "::", - stringify!(signatureS) - ) + "Offset of field: TPMS_SIGNATURE_ECC::signatureS" ); } impl Default for TPMS_SIGNATURE_ECC { @@ -5650,6 +4597,7 @@ pub union TPMU_SIGNATURE { pub ecschnorr: TPMS_SIGNATURE_ECSCHNORR, pub hmac: TPMT_HA, pub any: TPMS_SCHEME_HASH, + pub null: TPMS_EMPTY, } #[test] fn bindgen_test_layout_TPMU_SIGNATURE() { @@ -5658,92 +4606,57 @@ fn bindgen_test_layout_TPMU_SIGNATURE() { assert_eq!( ::std::mem::size_of::(), 516usize, - concat!("Size of: ", stringify!(TPMU_SIGNATURE)) + "Size of TPMU_SIGNATURE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SIGNATURE)) + "Alignment of TPMU_SIGNATURE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(rsassa) - ) + "Offset of field: TPMU_SIGNATURE::rsassa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(rsapss) - ) + "Offset of field: TPMU_SIGNATURE::rsapss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecdsa) - ) + "Offset of field: TPMU_SIGNATURE::ecdsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecdaa) - ) + "Offset of field: TPMU_SIGNATURE::ecdaa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(sm2) - ) + "Offset of field: TPMU_SIGNATURE::sm2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(ecschnorr) - ) + "Offset of field: TPMU_SIGNATURE::ecschnorr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(hmac) - ) + "Offset of field: TPMU_SIGNATURE::hmac" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SIGNATURE), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SIGNATURE::any" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).null) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_SIGNATURE::null" ); } impl Default for TPMU_SIGNATURE { @@ -5768,32 +4681,22 @@ fn bindgen_test_layout_TPMT_SIGNATURE() { assert_eq!( ::std::mem::size_of::(), 518usize, - concat!("Size of: ", stringify!(TPMT_SIGNATURE)) + "Size of TPMT_SIGNATURE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SIGNATURE)) + "Alignment of TPMT_SIGNATURE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigAlg) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIGNATURE), - "::", - stringify!(sigAlg) - ) + "Offset of field: TPMT_SIGNATURE::sigAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signature) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SIGNATURE), - "::", - stringify!(signature) - ) + "Offset of field: TPMT_SIGNATURE::signature" ); } impl Default for TPMT_SIGNATURE { @@ -5821,52 +4724,32 @@ fn bindgen_test_layout_TPMU_ENCRYPTED_SECRET() { assert_eq!( ::std::mem::size_of::(), 512usize, - concat!("Size of: ", stringify!(TPMU_ENCRYPTED_SECRET)) + "Size of TPMU_ENCRYPTED_SECRET" ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(TPMU_ENCRYPTED_SECRET)) + "Alignment of TPMU_ENCRYPTED_SECRET" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::ecc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_ENCRYPTED_SECRET), - "::", - stringify!(keyedHash) - ) + "Offset of field: TPMU_ENCRYPTED_SECRET::keyedHash" ); } impl Default for TPMU_ENCRYPTED_SECRET { @@ -5892,32 +4775,22 @@ fn bindgen_test_layout_TPM2B_ENCRYPTED_SECRET() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPM2B_ENCRYPTED_SECRET)) + "Size of TPM2B_ENCRYPTED_SECRET" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ENCRYPTED_SECRET)) + "Alignment of TPM2B_ENCRYPTED_SECRET" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ENCRYPTED_SECRET), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ENCRYPTED_SECRET::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).secret) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ENCRYPTED_SECRET), - "::", - stringify!(secret) - ) + "Offset of field: TPM2B_ENCRYPTED_SECRET::secret" ); } impl Default for TPM2B_ENCRYPTED_SECRET { @@ -5937,6 +4810,7 @@ pub union TPMU_PUBLIC_ID { pub sym: TPM2B_DIGEST, pub rsa: TPM2B_PUBLIC_KEY_RSA, pub ecc: TPMS_ECC_POINT, + pub derive: TPMS_DERIVE, } #[test] fn bindgen_test_layout_TPMU_PUBLIC_ID() { @@ -5945,52 +4819,37 @@ fn bindgen_test_layout_TPMU_PUBLIC_ID() { assert_eq!( ::std::mem::size_of::(), 514usize, - concat!("Size of: ", stringify!(TPMU_PUBLIC_ID)) + "Size of TPMU_PUBLIC_ID" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_PUBLIC_ID)) + "Alignment of TPMU_PUBLIC_ID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHash) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(keyedHash) - ) + "Offset of field: TPMU_PUBLIC_ID::keyedHash" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_PUBLIC_ID::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_PUBLIC_ID::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_ID), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_PUBLIC_ID::ecc" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).derive) as usize - ptr as usize }, + 0usize, + "Offset of field: TPMU_PUBLIC_ID::derive" ); } impl Default for TPMU_PUBLIC_ID { @@ -6014,22 +4873,17 @@ fn bindgen_test_layout_TPMS_KEYEDHASH_PARMS() { assert_eq!( ::std::mem::size_of::(), 6usize, - concat!("Size of: ", stringify!(TPMS_KEYEDHASH_PARMS)) + "Size of TPMS_KEYEDHASH_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_KEYEDHASH_PARMS)) + "Alignment of TPMS_KEYEDHASH_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_KEYEDHASH_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_KEYEDHASH_PARMS::scheme" ); } impl Default for TPMS_KEYEDHASH_PARMS { @@ -6054,32 +4908,22 @@ fn bindgen_test_layout_TPMS_ASYM_PARMS() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(TPMS_ASYM_PARMS)) + "Size of TPMS_ASYM_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ASYM_PARMS)) + "Alignment of TPMS_ASYM_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ASYM_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_ASYM_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ASYM_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_ASYM_PARMS::scheme" ); } impl Default for TPMS_ASYM_PARMS { @@ -6106,52 +4950,32 @@ fn bindgen_test_layout_TPMS_RSA_PARMS() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TPMS_RSA_PARMS)) + "Size of TPMS_RSA_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_RSA_PARMS)) + "Alignment of TPMS_RSA_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_RSA_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_RSA_PARMS::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(keyBits) - ) + "Offset of field: TPMS_RSA_PARMS::keyBits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_RSA_PARMS), - "::", - stringify!(exponent) - ) + "Offset of field: TPMS_RSA_PARMS::exponent" ); } impl Default for TPMS_RSA_PARMS { @@ -6178,52 +5002,32 @@ fn bindgen_test_layout_TPMS_ECC_PARMS() { assert_eq!( ::std::mem::size_of::(), 18usize, - concat!("Size of: ", stringify!(TPMS_ECC_PARMS)) + "Size of TPMS_ECC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ECC_PARMS)) + "Alignment of TPMS_ECC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symmetric) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(symmetric) - ) + "Offset of field: TPMS_ECC_PARMS::symmetric" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(scheme) - ) + "Offset of field: TPMS_ECC_PARMS::scheme" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curveID) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(curveID) - ) + "Offset of field: TPMS_ECC_PARMS::curveID" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ECC_PARMS), - "::", - stringify!(kdf) - ) + "Offset of field: TPMS_ECC_PARMS::kdf" ); } impl Default for TPMS_ECC_PARMS { @@ -6251,62 +5055,37 @@ fn bindgen_test_layout_TPMU_PUBLIC_PARMS() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(TPMU_PUBLIC_PARMS)) + "Size of TPMU_PUBLIC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMU_PUBLIC_PARMS)) + "Alignment of TPMU_PUBLIC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedHashDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(keyedHashDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::keyedHashDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).symDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(symDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::symDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(rsaDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::rsaDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eccDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(eccDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::eccDetail" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).asymDetail) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_PUBLIC_PARMS), - "::", - stringify!(asymDetail) - ) + "Offset of field: TPMU_PUBLIC_PARMS::asymDetail" ); } impl Default for TPMU_PUBLIC_PARMS { @@ -6331,32 +5110,22 @@ fn bindgen_test_layout_TPMT_PUBLIC_PARMS() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(TPMT_PUBLIC_PARMS)) + "Size of TPMT_PUBLIC_PARMS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_PUBLIC_PARMS)) + "Alignment of TPMT_PUBLIC_PARMS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC_PARMS), - "::", - stringify!(type_) - ) + "Offset of field: TPMT_PUBLIC_PARMS::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC_PARMS), - "::", - stringify!(parameters) - ) + "Offset of field: TPMT_PUBLIC_PARMS::parameters" ); } impl Default for TPMT_PUBLIC_PARMS { @@ -6385,72 +5154,42 @@ fn bindgen_test_layout_TPMT_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 612usize, - concat!("Size of: ", stringify!(TPMT_PUBLIC)) + "Size of TPMT_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMT_PUBLIC)) + "Alignment of TPMT_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(type_) - ) + "Offset of field: TPMT_PUBLIC::type_" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(nameAlg) - ) + "Offset of field: TPMT_PUBLIC::nameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).objectAttributes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(objectAttributes) - ) + "Offset of field: TPMT_PUBLIC::objectAttributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(authPolicy) - ) + "Offset of field: TPMT_PUBLIC::authPolicy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(parameters) - ) + "Offset of field: TPMT_PUBLIC::parameters" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).unique) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(TPMT_PUBLIC), - "::", - stringify!(unique) - ) + "Offset of field: TPMT_PUBLIC::unique" ); } impl Default for TPMT_PUBLIC { @@ -6475,32 +5214,22 @@ fn bindgen_test_layout_TPM2B_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 616usize, - concat!("Size of: ", stringify!(TPM2B_PUBLIC)) + "Size of TPM2B_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_PUBLIC)) + "Alignment of TPM2B_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PUBLIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).publicArea) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PUBLIC), - "::", - stringify!(publicArea) - ) + "Offset of field: TPM2B_PUBLIC::publicArea" ); } impl Default for TPM2B_PUBLIC { @@ -6525,32 +5254,22 @@ fn bindgen_test_layout_TPM2B_TEMPLATE() { assert_eq!( ::std::mem::size_of::(), 614usize, - concat!("Size of: ", stringify!(TPM2B_TEMPLATE)) + "Size of TPM2B_TEMPLATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_TEMPLATE)) + "Alignment of TPM2B_TEMPLATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_TEMPLATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_TEMPLATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_TEMPLATE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_TEMPLATE::buffer" ); } impl Default for TPM2B_TEMPLATE { @@ -6576,32 +5295,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE_VENDOR_SPECIFIC() { assert_eq!( ::std::mem::size_of::(), 1282usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) + "Size of TPM2B_PRIVATE_VENDOR_SPECIFIC" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC)) + "Alignment of TPM2B_PRIVATE_VENDOR_SPECIFIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE_VENDOR_SPECIFIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE_VENDOR_SPECIFIC), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE_VENDOR_SPECIFIC::buffer" ); } impl Default for TPM2B_PRIVATE_VENDOR_SPECIFIC { @@ -6630,62 +5339,37 @@ fn bindgen_test_layout_TPMU_SENSITIVE_COMPOSITE() { assert_eq!( ::std::mem::size_of::(), 1282usize, - concat!("Size of: ", stringify!(TPMU_SENSITIVE_COMPOSITE)) + "Size of TPMU_SENSITIVE_COMPOSITE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMU_SENSITIVE_COMPOSITE)) + "Alignment of TPMU_SENSITIVE_COMPOSITE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(rsa) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::rsa" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(ecc) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::ecc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(bits) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::bits" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(sym) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::sym" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMU_SENSITIVE_COMPOSITE), - "::", - stringify!(any) - ) + "Offset of field: TPMU_SENSITIVE_COMPOSITE::any" ); } impl Default for TPMU_SENSITIVE_COMPOSITE { @@ -6712,52 +5396,32 @@ fn bindgen_test_layout_TPMT_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 1416usize, - concat!("Size of: ", stringify!(TPMT_SENSITIVE)) + "Size of TPMT_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMT_SENSITIVE)) + "Alignment of TPMT_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitiveType) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(sensitiveType) - ) + "Offset of field: TPMT_SENSITIVE::sensitiveType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authValue) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(authValue) - ) + "Offset of field: TPMT_SENSITIVE::authValue" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seedValue) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(seedValue) - ) + "Offset of field: TPMT_SENSITIVE::seedValue" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 134usize, - concat!( - "Offset of field: ", - stringify!(TPMT_SENSITIVE), - "::", - stringify!(sensitive) - ) + "Offset of field: TPMT_SENSITIVE::sensitive" ); } impl Default for TPMT_SENSITIVE { @@ -6782,32 +5446,22 @@ fn bindgen_test_layout_TPM2B_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 1418usize, - concat!("Size of: ", stringify!(TPM2B_SENSITIVE)) + "Size of TPM2B_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_SENSITIVE)) + "Alignment of TPM2B_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_SENSITIVE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitiveArea) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_SENSITIVE), - "::", - stringify!(sensitiveArea) - ) + "Offset of field: TPM2B_SENSITIVE::sensitiveArea" ); } impl Default for TPM2B_SENSITIVE { @@ -6833,42 +5487,27 @@ fn bindgen_test_layout__PRIVATE() { assert_eq!( ::std::mem::size_of::<_PRIVATE>(), 1550usize, - concat!("Size of: ", stringify!(_PRIVATE)) + "Size of _PRIVATE" ); assert_eq!( ::std::mem::align_of::<_PRIVATE>(), 2usize, - concat!("Alignment of ", stringify!(_PRIVATE)) + "Alignment of _PRIVATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityOuter) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(integrityOuter) - ) + "Offset of field: _PRIVATE::integrityOuter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityInner) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(integrityInner) - ) + "Offset of field: _PRIVATE::integrityInner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(_PRIVATE), - "::", - stringify!(sensitive) - ) + "Offset of field: _PRIVATE::sensitive" ); } impl Default for _PRIVATE { @@ -6893,32 +5532,22 @@ fn bindgen_test_layout_TPM2B_PRIVATE() { assert_eq!( ::std::mem::size_of::(), 1552usize, - concat!("Size of: ", stringify!(TPM2B_PRIVATE)) + "Size of TPM2B_PRIVATE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_PRIVATE)) + "Alignment of TPM2B_PRIVATE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_PRIVATE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_PRIVATE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_PRIVATE::buffer" ); } impl Default for TPM2B_PRIVATE { @@ -6943,32 +5572,22 @@ fn bindgen_test_layout_TPMS_ID_OBJECT() { assert_eq!( ::std::mem::size_of::(), 132usize, - concat!("Size of: ", stringify!(TPMS_ID_OBJECT)) + "Size of TPMS_ID_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_ID_OBJECT)) + "Alignment of TPMS_ID_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrityHMAC) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ID_OBJECT), - "::", - stringify!(integrityHMAC) - ) + "Offset of field: TPMS_ID_OBJECT::integrityHMAC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encIdentity) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_ID_OBJECT), - "::", - stringify!(encIdentity) - ) + "Offset of field: TPMS_ID_OBJECT::encIdentity" ); } impl Default for TPMS_ID_OBJECT { @@ -6993,32 +5612,22 @@ fn bindgen_test_layout_TPM2B_ID_OBJECT() { assert_eq!( ::std::mem::size_of::(), 134usize, - concat!("Size of: ", stringify!(TPM2B_ID_OBJECT)) + "Size of TPM2B_ID_OBJECT" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_ID_OBJECT)) + "Alignment of TPM2B_ID_OBJECT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ID_OBJECT), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_ID_OBJECT::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).credential) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_ID_OBJECT), - "::", - stringify!(credential) - ) + "Offset of field: TPM2B_ID_OBJECT::credential" ); } impl Default for TPM2B_ID_OBJECT { @@ -7046,32 +5655,22 @@ fn bindgen_test_layout_TPMS_NV_PIN_COUNTER_PARAMETERS() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) + "Size of TPMS_NV_PIN_COUNTER_PARAMETERS" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS)) + "Alignment of TPMS_NV_PIN_COUNTER_PARAMETERS" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pinCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS), - "::", - stringify!(pinCount) - ) + "Offset of field: TPMS_NV_PIN_COUNTER_PARAMETERS::pinCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pinLimit) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PIN_COUNTER_PARAMETERS), - "::", - stringify!(pinLimit) - ) + "Offset of field: TPMS_NV_PIN_COUNTER_PARAMETERS::pinLimit" ); } pub type TPMA_NV = u32; @@ -7091,62 +5690,37 @@ fn bindgen_test_layout_TPMS_NV_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 80usize, - concat!("Size of: ", stringify!(TPMS_NV_PUBLIC)) + "Size of TPMS_NV_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_NV_PUBLIC)) + "Alignment of TPMS_NV_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvIndex) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(nvIndex) - ) + "Offset of field: TPMS_NV_PUBLIC::nvIndex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nameAlg) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(nameAlg) - ) + "Offset of field: TPMS_NV_PUBLIC::nameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(attributes) - ) + "Offset of field: TPMS_NV_PUBLIC::attributes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).authPolicy) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(authPolicy) - ) + "Offset of field: TPMS_NV_PUBLIC::authPolicy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataSize) as usize - ptr as usize }, 78usize, - concat!( - "Offset of field: ", - stringify!(TPMS_NV_PUBLIC), - "::", - stringify!(dataSize) - ) + "Offset of field: TPMS_NV_PUBLIC::dataSize" ); } impl Default for TPMS_NV_PUBLIC { @@ -7171,32 +5745,22 @@ fn bindgen_test_layout_TPM2B_NV_PUBLIC() { assert_eq!( ::std::mem::size_of::(), 84usize, - concat!("Size of: ", stringify!(TPM2B_NV_PUBLIC)) + "Size of TPM2B_NV_PUBLIC" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_NV_PUBLIC)) + "Alignment of TPM2B_NV_PUBLIC" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NV_PUBLIC), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_NV_PUBLIC::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nvPublic) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_NV_PUBLIC), - "::", - stringify!(nvPublic) - ) + "Offset of field: TPM2B_NV_PUBLIC::nvPublic" ); } impl Default for TPM2B_NV_PUBLIC { @@ -7222,32 +5786,22 @@ fn bindgen_test_layout_TPM2B_CONTEXT_SENSITIVE() { assert_eq!( ::std::mem::size_of::(), 5122usize, - concat!("Size of: ", stringify!(TPM2B_CONTEXT_SENSITIVE)) + "Size of TPM2B_CONTEXT_SENSITIVE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_CONTEXT_SENSITIVE)) + "Alignment of TPM2B_CONTEXT_SENSITIVE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_SENSITIVE), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CONTEXT_SENSITIVE::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_SENSITIVE), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_CONTEXT_SENSITIVE::buffer" ); } impl Default for TPM2B_CONTEXT_SENSITIVE { @@ -7272,32 +5826,22 @@ fn bindgen_test_layout_TPMS_CONTEXT_DATA() { assert_eq!( ::std::mem::size_of::(), 5188usize, - concat!("Size of: ", stringify!(TPMS_CONTEXT_DATA)) + "Size of TPMS_CONTEXT_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPMS_CONTEXT_DATA)) + "Alignment of TPMS_CONTEXT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrity) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT_DATA), - "::", - stringify!(integrity) - ) + "Offset of field: TPMS_CONTEXT_DATA::integrity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encrypted) as usize - ptr as usize }, 66usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT_DATA), - "::", - stringify!(encrypted) - ) + "Offset of field: TPMS_CONTEXT_DATA::encrypted" ); } impl Default for TPMS_CONTEXT_DATA { @@ -7322,32 +5866,22 @@ fn bindgen_test_layout_TPM2B_CONTEXT_DATA() { assert_eq!( ::std::mem::size_of::(), 5190usize, - concat!("Size of: ", stringify!(TPM2B_CONTEXT_DATA)) + "Size of TPM2B_CONTEXT_DATA" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TPM2B_CONTEXT_DATA)) + "Alignment of TPM2B_CONTEXT_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CONTEXT_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CONTEXT_DATA), - "::", - stringify!(buffer) - ) + "Offset of field: TPM2B_CONTEXT_DATA::buffer" ); } impl Default for TPM2B_CONTEXT_DATA { @@ -7374,52 +5908,32 @@ fn bindgen_test_layout_TPMS_CONTEXT() { assert_eq!( ::std::mem::size_of::(), 5208usize, - concat!("Size of: ", stringify!(TPMS_CONTEXT)) + "Size of TPMS_CONTEXT" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TPMS_CONTEXT)) + "Alignment of TPMS_CONTEXT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(sequence) - ) + "Offset of field: TPMS_CONTEXT::sequence" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedHandle) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(savedHandle) - ) + "Offset of field: TPMS_CONTEXT::savedHandle" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(hierarchy) - ) + "Offset of field: TPMS_CONTEXT::hierarchy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contextBlob) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CONTEXT), - "::", - stringify!(contextBlob) - ) + "Offset of field: TPMS_CONTEXT::contextBlob" ); } impl Default for TPMS_CONTEXT { @@ -7449,82 +5963,47 @@ fn bindgen_test_layout_TPMS_CREATION_DATA() { assert_eq!( ::std::mem::size_of::(), 408usize, - concat!("Size of: ", stringify!(TPMS_CREATION_DATA)) + "Size of TPMS_CREATION_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_CREATION_DATA)) + "Alignment of TPMS_CREATION_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(pcrSelect) - ) + "Offset of field: TPMS_CREATION_DATA::pcrSelect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize }, 132usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(pcrDigest) - ) + "Offset of field: TPMS_CREATION_DATA::pcrDigest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).locality) as usize - ptr as usize }, 198usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(locality) - ) + "Offset of field: TPMS_CREATION_DATA::locality" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentNameAlg) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentNameAlg) - ) + "Offset of field: TPMS_CREATION_DATA::parentNameAlg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentName) as usize - ptr as usize }, 202usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentName) - ) + "Offset of field: TPMS_CREATION_DATA::parentName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parentQualifiedName) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(parentQualifiedName) - ) + "Offset of field: TPMS_CREATION_DATA::parentQualifiedName" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outsideInfo) as usize - ptr as usize }, 342usize, - concat!( - "Offset of field: ", - stringify!(TPMS_CREATION_DATA), - "::", - stringify!(outsideInfo) - ) + "Offset of field: TPMS_CREATION_DATA::outsideInfo" ); } impl Default for TPMS_CREATION_DATA { @@ -7549,32 +6028,22 @@ fn bindgen_test_layout_TPM2B_CREATION_DATA() { assert_eq!( ::std::mem::size_of::(), 412usize, - concat!("Size of: ", stringify!(TPM2B_CREATION_DATA)) + "Size of TPM2B_CREATION_DATA" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPM2B_CREATION_DATA)) + "Alignment of TPM2B_CREATION_DATA" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CREATION_DATA), - "::", - stringify!(size) - ) + "Offset of field: TPM2B_CREATION_DATA::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creationData) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPM2B_CREATION_DATA), - "::", - stringify!(creationData) - ) + "Offset of field: TPM2B_CREATION_DATA::creationData" ); } impl Default for TPM2B_CREATION_DATA { @@ -7601,32 +6070,22 @@ fn bindgen_test_layout_TPMS_AC_OUTPUT() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(TPMS_AC_OUTPUT)) + "Size of TPMS_AC_OUTPUT" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPMS_AC_OUTPUT)) + "Alignment of TPMS_AC_OUTPUT" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AC_OUTPUT), - "::", - stringify!(tag) - ) + "Offset of field: TPMS_AC_OUTPUT::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPMS_AC_OUTPUT), - "::", - stringify!(data) - ) + "Offset of field: TPMS_AC_OUTPUT::data" ); } #[repr(C)] @@ -7642,32 +6101,22 @@ fn bindgen_test_layout_TPML_AC_CAPABILITIES() { assert_eq!( ::std::mem::size_of::(), 1028usize, - concat!("Size of: ", stringify!(TPML_AC_CAPABILITIES)) + "Size of TPML_AC_CAPABILITIES" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TPML_AC_CAPABILITIES)) + "Alignment of TPML_AC_CAPABILITIES" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TPML_AC_CAPABILITIES), - "::", - stringify!(count) - ) + "Offset of field: TPML_AC_CAPABILITIES::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).acCapabilities) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TPML_AC_CAPABILITIES), - "::", - stringify!(acCapabilities) - ) + "Offset of field: TPML_AC_CAPABILITIES::acCapabilities" ); } impl Default for TPML_AC_CAPABILITIES { @@ -7679,6 +6128,47 @@ impl Default for TPML_AC_CAPABILITIES { } } } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TPML_INTEL_PTT_PROPERTY { + pub count: UINT32, + pub property: [UINT32; 256usize], +} +#[test] +fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1028usize, + "Size of TPML_INTEL_PTT_PROPERTY" + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + "Alignment of TPML_INTEL_PTT_PROPERTY" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 0usize, + "Offset of field: TPML_INTEL_PTT_PROPERTY::count" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize }, + 4usize, + "Offset of field: TPML_INTEL_PTT_PROPERTY::property" + ); +} +impl Default for TPML_INTEL_PTT_PROPERTY { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type nfds_t = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -7691,45 +6181,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { 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!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } extern "C" { @@ -7809,92 +6280,52 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V1() { assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) + "Size of TSS2_TCTI_CONTEXT_COMMON_V1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V1)) + "Alignment of TSS2_TCTI_CONTEXT_COMMON_V1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(magic) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(version) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).transmit) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(transmit) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::transmit" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).receive) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(receive) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::receive" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).finalize) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(finalize) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::finalize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cancel) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(cancel) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::cancel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).getPollHandles) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(getPollHandles) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::getPollHandles" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).setLocality) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V1), - "::", - stringify!(setLocality) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V1::setLocality" ); } #[repr(C)] @@ -7911,32 +6342,22 @@ fn bindgen_test_layout_TSS2_TCTI_CONTEXT_COMMON_V2() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) + "Size of TSS2_TCTI_CONTEXT_COMMON_V2" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_CONTEXT_COMMON_V2)) + "Alignment of TSS2_TCTI_CONTEXT_COMMON_V2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).v1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V2), - "::", - stringify!(v1) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V2::v1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).makeSticky) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_CONTEXT_COMMON_V2), - "::", - stringify!(makeSticky) - ) + "Offset of field: TSS2_TCTI_CONTEXT_COMMON_V2::makeSticky" ); } pub type TSS2_TCTI_CONTEXT_COMMON_CURRENT = TSS2_TCTI_CONTEXT_COMMON_V2; @@ -7956,62 +6377,37 @@ fn bindgen_test_layout_TSS2_TCTI_INFO() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(TSS2_TCTI_INFO)) + "Size of TSS2_TCTI_INFO" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(TSS2_TCTI_INFO)) + "Alignment of TSS2_TCTI_INFO" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(version) - ) + "Offset of field: TSS2_TCTI_INFO::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(name) - ) + "Offset of field: TSS2_TCTI_INFO::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(description) - ) + "Offset of field: TSS2_TCTI_INFO::description" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config_help) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(config_help) - ) + "Offset of field: TSS2_TCTI_INFO::config_help" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).init) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(TSS2_TCTI_INFO), - "::", - stringify!(init) - ) + "Offset of field: TSS2_TCTI_INFO::init" ); } impl Default for TSS2_TCTI_INFO { @@ -8045,32 +6441,22 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_COMMAND() { assert_eq!( ::std::mem::size_of::(), 424usize, - concat!("Size of: ", stringify!(TSS2L_SYS_AUTH_COMMAND)) + "Size of TSS2L_SYS_AUTH_COMMAND" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_COMMAND)) + "Alignment of TSS2L_SYS_AUTH_COMMAND" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_COMMAND), - "::", - stringify!(count) - ) + "Offset of field: TSS2L_SYS_AUTH_COMMAND::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_COMMAND), - "::", - stringify!(auths) - ) + "Offset of field: TSS2L_SYS_AUTH_COMMAND::auths" ); } impl Default for TSS2L_SYS_AUTH_COMMAND { @@ -8096,32 +6482,22 @@ fn bindgen_test_layout_TSS2L_SYS_AUTH_RESPONSE() { assert_eq!( ::std::mem::size_of::(), 404usize, - concat!("Size of: ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) + "Size of TSS2L_SYS_AUTH_RESPONSE" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(TSS2L_SYS_AUTH_RESPONSE)) + "Alignment of TSS2L_SYS_AUTH_RESPONSE" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_RESPONSE), - "::", - stringify!(count) - ) + "Offset of field: TSS2L_SYS_AUTH_RESPONSE::count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).auths) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(TSS2L_SYS_AUTH_RESPONSE), - "::", - stringify!(auths) - ) + "Offset of field: TSS2L_SYS_AUTH_RESPONSE::auths" ); } impl Default for TSS2L_SYS_AUTH_RESPONSE { @@ -8935,6 +7311,31 @@ extern "C" { rspAuthsArray: *mut TSS2L_SYS_AUTH_RESPONSE, ) -> TSS2_RC; } +extern "C" { + pub fn Tss2_Sys_MAC_Prepare( + sysContext: *mut TSS2_SYS_CONTEXT, + handle: TPMI_DH_OBJECT, + buffer: *const TPM2B_MAX_BUFFER, + inScheme: TPMI_ALG_MAC_SCHEME, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_Sys_MAC_Complete( + sysContext: *mut TSS2_SYS_CONTEXT, + outMAC: *mut TPM2B_DIGEST, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_Sys_MAC( + sysContext: *mut TSS2_SYS_CONTEXT, + handle: TPMI_DH_OBJECT, + cmdAuths: *const TSS2L_SYS_AUTH_COMMAND, + buffer: *const TPM2B_MAX_BUFFER, + inScheme: TPMI_ALG_MAC_SCHEME, + outMAC: *mut TPM2B_DIGEST, + rspAuths: *mut TSS2L_SYS_AUTH_RESPONSE, + ) -> TSS2_RC; +} extern "C" { pub fn Tss2_Sys_GetRandom_Prepare( sysContext: *mut TSS2_SYS_CONTEXT, @@ -8999,34 +7400,59 @@ extern "C" { ) -> TSS2_RC; } extern "C" { - pub fn Tss2_Sys_HashSequenceStart_Prepare( + pub fn Tss2_Sys_MAC_Start_Prepare( sysContext: *mut TSS2_SYS_CONTEXT, + handle: TPMI_DH_OBJECT, auth: *const TPM2B_AUTH, - hashAlg: TPMI_ALG_HASH, + inScheme: TPMI_ALG_MAC_SCHEME, ) -> TSS2_RC; } extern "C" { - pub fn Tss2_Sys_HashSequenceStart_Complete( + pub fn Tss2_Sys_MAC_Start_Complete( sysContext: *mut TSS2_SYS_CONTEXT, sequenceHandle: *mut TPMI_DH_OBJECT, ) -> TSS2_RC; } extern "C" { - pub fn Tss2_Sys_HashSequenceStart( + pub fn Tss2_Sys_MAC_Start( sysContext: *mut TSS2_SYS_CONTEXT, - cmdAuthsArray: *const TSS2L_SYS_AUTH_COMMAND, + handle: TPMI_DH_OBJECT, + cmdAuths: *const TSS2L_SYS_AUTH_COMMAND, auth: *const TPM2B_AUTH, - hashAlg: TPMI_ALG_HASH, + inScheme: TPMI_ALG_MAC_SCHEME, sequenceHandle: *mut TPMI_DH_OBJECT, rspAuthsArray: *mut TSS2L_SYS_AUTH_RESPONSE, ) -> TSS2_RC; } extern "C" { - pub fn Tss2_Sys_SequenceUpdate_Prepare( + pub fn Tss2_Sys_HashSequenceStart_Prepare( sysContext: *mut TSS2_SYS_CONTEXT, - sequenceHandle: TPMI_DH_OBJECT, - buffer: *const TPM2B_MAX_BUFFER, - ) -> TSS2_RC; + auth: *const TPM2B_AUTH, + hashAlg: TPMI_ALG_HASH, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_Sys_HashSequenceStart_Complete( + sysContext: *mut TSS2_SYS_CONTEXT, + sequenceHandle: *mut TPMI_DH_OBJECT, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_Sys_HashSequenceStart( + sysContext: *mut TSS2_SYS_CONTEXT, + cmdAuthsArray: *const TSS2L_SYS_AUTH_COMMAND, + auth: *const TPM2B_AUTH, + hashAlg: TPMI_ALG_HASH, + sequenceHandle: *mut TPMI_DH_OBJECT, + rspAuthsArray: *mut TSS2L_SYS_AUTH_RESPONSE, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_Sys_SequenceUpdate_Prepare( + sysContext: *mut TSS2_SYS_CONTEXT, + sequenceHandle: TPMI_DH_OBJECT, + buffer: *const TPM2B_MAX_BUFFER, + ) -> TSS2_RC; } extern "C" { pub fn Tss2_Sys_SequenceUpdate_Complete(sysContext: *mut TSS2_SYS_CONTEXT) -> TSS2_RC; @@ -10985,6 +9411,246 @@ pub type ESYS_TR = u32; pub struct ESYS_CONTEXT { _unused: [u8; 0], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ESYS_CRYPTO_CONTEXT_BLOB { + _unused: [u8; 0], +} +pub type ESYS_CRYPTO_HASH_START_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut *mut ESYS_CRYPTO_CONTEXT_BLOB, + hashAlg: TPM2_ALG_ID, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_HASH_UPDATE_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut ESYS_CRYPTO_CONTEXT_BLOB, + buffer: *const u8, + size: size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_HASH_FINISH_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut *mut ESYS_CRYPTO_CONTEXT_BLOB, + buffer: *mut u8, + size: *mut size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_HASH_ABORT_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut *mut ESYS_CRYPTO_CONTEXT_BLOB, + userdata: *mut ::std::os::raw::c_void, + ), +>; +pub type ESYS_CRYPTO_HMAC_START_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut *mut ESYS_CRYPTO_CONTEXT_BLOB, + hashAlg: TPM2_ALG_ID, + key: *const u8, + size: size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_HMAC_UPDATE_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut ESYS_CRYPTO_CONTEXT_BLOB, + buffer: *const u8, + size: size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_HMAC_FINISH_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut *mut ESYS_CRYPTO_CONTEXT_BLOB, + buffer: *mut u8, + size: *mut size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_HMAC_ABORT_FNP = ::std::option::Option< + unsafe extern "C" fn( + context: *mut *mut ESYS_CRYPTO_CONTEXT_BLOB, + userdata: *mut ::std::os::raw::c_void, + ), +>; +pub type ESYS_CRYPTO_GET_RANDOM2B_FNP = ::std::option::Option< + unsafe extern "C" fn( + nonce: *mut TPM2B_NONCE, + num_bytes: size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_GET_ECDH_POINT_FNP = ::std::option::Option< + unsafe extern "C" fn( + key: *mut TPM2B_PUBLIC, + max_out_size: size_t, + Z: *mut TPM2B_ECC_PARAMETER, + Q: *mut TPMS_ECC_POINT, + out_buffer: *mut BYTE, + out_size: *mut size_t, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_AES_ENCRYPT_FNP = ::std::option::Option< + unsafe extern "C" fn( + key: *mut u8, + tpm_sym_alg: TPM2_ALG_ID, + key_bits: TPMI_AES_KEY_BITS, + tpm_mode: TPM2_ALG_ID, + buffer: *mut u8, + buffer_size: size_t, + iv: *mut u8, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_AES_DECRYPT_FNP = ::std::option::Option< + unsafe extern "C" fn( + key: *mut u8, + tpm_sym_alg: TPM2_ALG_ID, + key_bits: TPMI_AES_KEY_BITS, + tpm_mode: TPM2_ALG_ID, + buffer: *mut u8, + buffer_size: size_t, + iv: *mut u8, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_PK_RSA_ENCRYPT_FNP = ::std::option::Option< + unsafe extern "C" fn( + pub_tpm_key: *mut TPM2B_PUBLIC, + in_size: size_t, + in_buffer: *mut BYTE, + max_out_size: size_t, + out_buffer: *mut BYTE, + out_size: *mut size_t, + label: *const ::std::os::raw::c_char, + userdata: *mut ::std::os::raw::c_void, + ) -> TSS2_RC, +>; +pub type ESYS_CRYPTO_INIT_FNP = + ::std::option::Option TSS2_RC>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ESYS_CRYPTO_CALLBACKS { + pub rsa_pk_encrypt: ESYS_CRYPTO_PK_RSA_ENCRYPT_FNP, + pub hash_start: ESYS_CRYPTO_HASH_START_FNP, + pub hash_update: ESYS_CRYPTO_HASH_UPDATE_FNP, + pub hash_finish: ESYS_CRYPTO_HASH_FINISH_FNP, + pub hash_abort: ESYS_CRYPTO_HASH_ABORT_FNP, + pub hmac_start: ESYS_CRYPTO_HMAC_START_FNP, + pub hmac_update: ESYS_CRYPTO_HMAC_UPDATE_FNP, + pub hmac_finish: ESYS_CRYPTO_HMAC_FINISH_FNP, + pub hmac_abort: ESYS_CRYPTO_HMAC_ABORT_FNP, + pub get_random2b: ESYS_CRYPTO_GET_RANDOM2B_FNP, + pub get_ecdh_point: ESYS_CRYPTO_GET_ECDH_POINT_FNP, + pub aes_encrypt: ESYS_CRYPTO_AES_ENCRYPT_FNP, + pub aes_decrypt: ESYS_CRYPTO_AES_DECRYPT_FNP, + pub init: ESYS_CRYPTO_INIT_FNP, + pub userdata: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_ESYS_CRYPTO_CALLBACKS() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 120usize, + "Size of ESYS_CRYPTO_CALLBACKS" + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + "Alignment of ESYS_CRYPTO_CALLBACKS" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsa_pk_encrypt) as usize - ptr as usize }, + 0usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::rsa_pk_encrypt" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hash_start) as usize - ptr as usize }, + 8usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hash_start" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hash_update) as usize - ptr as usize }, + 16usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hash_update" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hash_finish) as usize - ptr as usize }, + 24usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hash_finish" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hash_abort) as usize - ptr as usize }, + 32usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hash_abort" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hmac_start) as usize - ptr as usize }, + 40usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hmac_start" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hmac_update) as usize - ptr as usize }, + 48usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hmac_update" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hmac_finish) as usize - ptr as usize }, + 56usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hmac_finish" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hmac_abort) as usize - ptr as usize }, + 64usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::hmac_abort" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).get_random2b) as usize - ptr as usize }, + 72usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::get_random2b" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).get_ecdh_point) as usize - ptr as usize }, + 80usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::get_ecdh_point" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).aes_encrypt) as usize - ptr as usize }, + 88usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::aes_encrypt" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).aes_decrypt) as usize - ptr as usize }, + 96usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::aes_decrypt" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).init) as usize - ptr as usize }, + 104usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::init" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userdata) as usize - ptr as usize }, + 112usize, + "Offset of field: ESYS_CRYPTO_CALLBACKS::userdata" + ); +} +impl Default for ESYS_CRYPTO_CALLBACKS { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} extern "C" { pub fn Esys_Initialize( esys_context: *mut *mut ESYS_CONTEXT, @@ -11441,6 +10107,95 @@ extern "C" { extern "C" { pub fn Esys_ACT_SetTimeout_Finish(esysContext: *mut ESYS_CONTEXT) -> TSS2_RC; } +extern "C" { + pub fn Esys_AC_GetCapability_Async( + esysContext: *mut ESYS_CONTEXT, + optionalSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + ac: ESYS_TR, + capability: TPM_AT, + count: UINT32, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_AC_GetCapability_Finish( + esysContext: *mut ESYS_CONTEXT, + moreData: *mut TPMI_YES_NO, + capabilityData: *mut *mut TPML_AC_CAPABILITIES, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_AC_GetCapability( + esysContext: *mut ESYS_CONTEXT, + optionalSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + ac: ESYS_TR, + capability: TPM_AT, + count: UINT32, + moreData: *mut TPMI_YES_NO, + capabilityData: *mut *mut TPML_AC_CAPABILITIES, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_AC_Send_Async( + esysContext: *mut ESYS_CONTEXT, + sendObject: ESYS_TR, + nvAuthHandle: ESYS_TR, + optionalSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + ac: ESYS_TR, + acDataIn: *mut TPM2B_MAX_BUFFER, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_AC_Send_Finish( + esysContext: *mut ESYS_CONTEXT, + acDataOut: *mut *mut TPMS_AC_OUTPUT, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_AC_Send( + esysContext: *mut ESYS_CONTEXT, + sendObject: ESYS_TR, + nvAuthHandle: ESYS_TR, + optionalSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + ac: ESYS_TR, + acDataIn: *mut TPM2B_MAX_BUFFER, + acDataOut: *mut *mut TPMS_AC_OUTPUT, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_Policy_AC_SendSelect_Async( + esysContext: *mut ESYS_CONTEXT, + policySession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + objectName: *mut TPM2B_NAME, + authHandleName: *mut TPM2B_NAME, + acName: *mut TPM2B_NAME, + includeObject: TPMI_YES_NO, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_Policy_AC_SendSelect_Finish(esysContext: *mut ESYS_CONTEXT) -> TSS2_RC; +} +extern "C" { + pub fn Esys_Policy_AC_SendSelect( + esysContext: *mut ESYS_CONTEXT, + policySession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + objectName: *mut TPM2B_NAME, + authHandleName: *mut TPM2B_NAME, + acName: *mut TPM2B_NAME, + includeObject: TPMI_YES_NO, + ) -> TSS2_RC; +} extern "C" { pub fn Esys_MakeCredential( esysContext: *mut ESYS_CONTEXT, @@ -11970,6 +10725,35 @@ extern "C" { outHMAC: *mut *mut TPM2B_DIGEST, ) -> TSS2_RC; } +extern "C" { + pub fn Esys_MAC_Async( + esysContext: *mut ESYS_CONTEXT, + handle: ESYS_TR, + handleSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + buffer: *const TPM2B_MAX_BUFFER, + inScheme: TPMI_ALG_MAC_SCHEME, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_MAC_Finish( + esysContext: *mut ESYS_CONTEXT, + outMAC: *mut *mut TPM2B_DIGEST, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_MAC( + esysContext: *mut ESYS_CONTEXT, + handle: ESYS_TR, + handleSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + buffer: *const TPM2B_MAX_BUFFER, + inScheme: TPMI_ALG_MAC_SCHEME, + outMAC: *mut *mut TPM2B_DIGEST, + ) -> TSS2_RC; +} extern "C" { pub fn Esys_GetRandom( esysContext: *mut ESYS_CONTEXT, @@ -12045,6 +10829,35 @@ extern "C" { sequenceHandle: *mut ESYS_TR, ) -> TSS2_RC; } +extern "C" { + pub fn Esys_MAC_Start( + esysContext: *mut ESYS_CONTEXT, + handle: ESYS_TR, + handleSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + auth: *const TPM2B_AUTH, + inScheme: TPMI_ALG_MAC_SCHEME, + sequenceHandle: *mut ESYS_TR, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_MAC_Start_Async( + esysContext: *mut ESYS_CONTEXT, + handle: ESYS_TR, + handleSession1: ESYS_TR, + optionalSession2: ESYS_TR, + optionalSession3: ESYS_TR, + auth: *const TPM2B_AUTH, + inScheme: TPMI_ALG_MAC_SCHEME, + ) -> TSS2_RC; +} +extern "C" { + pub fn Esys_MAC_Start_Finish( + esysContext: *mut ESYS_CONTEXT, + sequenceHandle: *mut ESYS_TR, + ) -> TSS2_RC; +} extern "C" { pub fn Esys_HashSequenceStart( esysContext: *mut ESYS_CONTEXT, @@ -14216,6 +13029,12 @@ extern "C" { sys_context: *mut *mut TSS2_SYS_CONTEXT, ) -> TSS2_RC; } +extern "C" { + pub fn Esys_SetCryptoCallbacks( + esysContext: *mut ESYS_CONTEXT, + callbacks: *mut ESYS_CRYPTO_CALLBACKS, + ) -> TSS2_RC; +} pub type __gwchar_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -14230,32 +13049,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -14292,6 +13101,10 @@ extern "C" { __base: ::std::os::raw::c_int, ) -> uintmax_t; } +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 _Float32 = f32; pub type _Float64 = f64; pub type _Float32x = f64; @@ -14306,35 +13119,21 @@ pub struct div_t { 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::size_of::(), 8usize, "Size of div_t"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(div_t)) + "Alignment of 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) - ) + "Offset of field: div_t::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) - ) + "Offset of field: div_t::rem" ); } #[repr(C)] @@ -14347,35 +13146,21 @@ pub struct ldiv_t { 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::size_of::(), 16usize, "Size of ldiv_t"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) + "Alignment of 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) - ) + "Offset of field: ldiv_t::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) - ) + "Offset of field: ldiv_t::rem" ); } #[repr(C)] @@ -14388,35 +13173,21 @@ pub struct lldiv_t { 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::size_of::(), 16usize, "Size of lldiv_t"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) + "Alignment of 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) - ) + "Offset of field: lldiv_t::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) - ) + "Offset of field: lldiv_t::rem" ); } extern "C" { @@ -14545,22 +13316,17 @@ fn bindgen_test_layout___sigset_t() { assert_eq!( ::std::mem::size_of::<__sigset_t>(), 128usize, - concat!("Size of: ", stringify!(__sigset_t)) + "Size of __sigset_t" ); assert_eq!( ::std::mem::align_of::<__sigset_t>(), 8usize, - concat!("Alignment of ", stringify!(__sigset_t)) + "Alignment of __sigset_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) + "Offset of field: __sigset_t::__val" ); } pub type sigset_t = __sigset_t; @@ -14574,35 +13340,21 @@ pub struct timeval { 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::size_of::(), 16usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of 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) - ) + "Offset of field: timeval::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) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -14618,32 +13370,22 @@ fn bindgen_test_layout_timespec() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(timespec)) + "Size of timespec" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timespec)) + "Alignment of timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: timespec::tv_nsec" ); } pub type suseconds_t = __suseconds_t; @@ -14657,25 +13399,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) + "Offset of field: fd_set::__fds_bits" ); } pub type fd_mask = __fd_mask; @@ -14703,102 +13436,6 @@ pub type blkcnt_t = __blkcnt_t; pub type fsblkcnt_t = __fsblkcnt_t; pub type fsfilcnt_t = __fsfilcnt_t; #[repr(C)] -#[derive(Copy, Clone)] -pub union __atomic_wide_counter { - pub __value64: ::std::os::raw::c_ulonglong, - pub __value32: __atomic_wide_counter__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __atomic_wide_counter__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__atomic_wide_counter__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__low) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__high) - ) - ); -} -#[test] -fn bindgen_test_layout___atomic_wide_counter() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter>(), - 8usize, - concat!("Alignment of ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value64) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value32) - ) - ); -} -impl Default for __atomic_wide_counter { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_internal_list { pub __prev: *mut __pthread_internal_list, @@ -14812,32 +13449,22 @@ fn bindgen_test_layout___pthread_internal_list() { assert_eq!( ::std::mem::size_of::<__pthread_internal_list>(), 16usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) + "Size of __pthread_internal_list" ); assert_eq!( ::std::mem::align_of::<__pthread_internal_list>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) + "Alignment of __pthread_internal_list" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) + "Offset of field: __pthread_internal_list::__prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) + "Offset of field: __pthread_internal_list::__next" ); } impl Default for __pthread_internal_list { @@ -14863,22 +13490,17 @@ fn bindgen_test_layout___pthread_internal_slist() { assert_eq!( ::std::mem::size_of::<__pthread_internal_slist>(), 8usize, - concat!("Size of: ", stringify!(__pthread_internal_slist)) + "Size of __pthread_internal_slist" ); assert_eq!( ::std::mem::align_of::<__pthread_internal_slist>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_slist)) + "Alignment of __pthread_internal_slist" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_slist), - "::", - stringify!(__next) - ) + "Offset of field: __pthread_internal_slist::__next" ); } impl Default for __pthread_internal_slist { @@ -14910,92 +13532,52 @@ fn bindgen_test_layout___pthread_mutex_s() { assert_eq!( ::std::mem::size_of::<__pthread_mutex_s>(), 40usize, - concat!("Size of: ", stringify!(__pthread_mutex_s)) + "Size of __pthread_mutex_s" ); assert_eq!( ::std::mem::align_of::<__pthread_mutex_s>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_mutex_s)) + "Alignment of __pthread_mutex_s" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__lock) - ) + "Offset of field: __pthread_mutex_s::__lock" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__count) - ) + "Offset of field: __pthread_mutex_s::__count" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__owner) - ) + "Offset of field: __pthread_mutex_s::__owner" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__nusers) - ) + "Offset of field: __pthread_mutex_s::__nusers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__kind) - ) + "Offset of field: __pthread_mutex_s::__kind" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__spins) - ) + "Offset of field: __pthread_mutex_s::__spins" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__elision) as usize - ptr as usize }, 22usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__elision) - ) + "Offset of field: __pthread_mutex_s::__elision" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__list) - ) + "Offset of field: __pthread_mutex_s::__list" ); } impl Default for __pthread_mutex_s { @@ -15031,228 +13613,269 @@ fn bindgen_test_layout___pthread_rwlock_arch_t() { assert_eq!( ::std::mem::size_of::<__pthread_rwlock_arch_t>(), 56usize, - concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) + "Size of __pthread_rwlock_arch_t" ); assert_eq!( ::std::mem::align_of::<__pthread_rwlock_arch_t>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) + "Alignment of __pthread_rwlock_arch_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__readers) - ) + "Offset of field: __pthread_rwlock_arch_t::__readers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers) - ) + "Offset of field: __pthread_rwlock_arch_t::__writers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__wrphase_futex) - ) + "Offset of field: __pthread_rwlock_arch_t::__wrphase_futex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers_futex) - ) + "Offset of field: __pthread_rwlock_arch_t::__writers_futex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad3) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad4) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__cur_writer) - ) + "Offset of field: __pthread_rwlock_arch_t::__cur_writer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__shared) - ) + "Offset of field: __pthread_rwlock_arch_t::__shared" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__rwelision) - ) + "Offset of field: __pthread_rwlock_arch_t::__rwelision" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, 33usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad1) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad2) - ) + "Offset of field: __pthread_rwlock_arch_t::__pad2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__flags) - ) + "Offset of field: __pthread_rwlock_arch_t::__flags" ); } #[repr(C)] #[derive(Copy, Clone)] pub struct __pthread_cond_s { - pub __wseq: __atomic_wide_counter, - pub __g1_start: __atomic_wide_counter, + pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, + pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, pub __g_refs: [::std::os::raw::c_uint; 2usize], pub __g_size: [::std::os::raw::c_uint; 2usize], pub __g1_orig_size: ::std::os::raw::c_uint, pub __wrefs: ::std::os::raw::c_uint, pub __g_signals: [::std::os::raw::c_uint; 2usize], } +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_1 { + pub __wseq: ::std::os::raw::c_ulonglong, + pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} #[test] -fn bindgen_test_layout___pthread_cond_s() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::<__pthread_cond_s>(), - 48usize, - concat!("Size of: ", stringify!(__pthread_cond_s)) + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( - ::std::mem::align_of::<__pthread_cond_s>(), + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 4usize, + "Alignment of __pthread_cond_s__bindgen_ty_1__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1::__low" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, + 4usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1::__high" + ); +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s)) + "Size of __pthread_cond_s__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(), + 8usize, + "Alignment of __pthread_cond_s__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wseq) - ) + "Offset of field: __pthread_cond_s__bindgen_ty_1::__wseq" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__wseq32) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_1::__wseq32" + ); +} +impl Default for __pthread_cond_s__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_2 { + pub __g1_start: ::std::os::raw::c_ulonglong, + pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_2__bindgen_ty_1" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 4usize, + "Alignment of __pthread_cond_s__bindgen_ty_2__bindgen_ty_1" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1::__low" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, + 4usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1::__high" + ); +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s__bindgen_ty_2> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + "Size of __pthread_cond_s__bindgen_ty_2" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + "Alignment of __pthread_cond_s__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2::__g1_start" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__g1_start32) as usize - ptr as usize }, + 0usize, + "Offset of field: __pthread_cond_s__bindgen_ty_2::__g1_start32" + ); +} +impl Default for __pthread_cond_s__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[test] +fn bindgen_test_layout___pthread_cond_s() { + const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__pthread_cond_s>(), + 48usize, + "Size of __pthread_cond_s" + ); + assert_eq!( + ::std::mem::align_of::<__pthread_cond_s>(), 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_start) - ) + "Alignment of __pthread_cond_s" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_refs) - ) + "Offset of field: __pthread_cond_s::__g_refs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_size) - ) + "Offset of field: __pthread_cond_s::__g_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_orig_size) - ) + "Offset of field: __pthread_cond_s::__g1_orig_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wrefs) - ) + "Offset of field: __pthread_cond_s::__wrefs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_signals) - ) + "Offset of field: __pthread_cond_s::__g_signals" ); } impl Default for __pthread_cond_s { @@ -15264,38 +13887,6 @@ impl Default for __pthread_cond_s { } } } -pub type __tss_t = ::std::os::raw::c_uint; -pub type __thrd_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct __once_flag { - pub __data: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___once_flag() { - const UNINIT: ::std::mem::MaybeUninit<__once_flag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__once_flag>(), - 4usize, - concat!("Size of: ", stringify!(__once_flag)) - ); - assert_eq!( - ::std::mem::align_of::<__once_flag>(), - 4usize, - concat!("Alignment of ", stringify!(__once_flag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__once_flag), - "::", - stringify!(__data) - ) - ); -} pub type pthread_t = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Copy, Clone)] @@ -15310,32 +13901,22 @@ fn bindgen_test_layout_pthread_mutexattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) + "Size of pthread_mutexattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) + "Alignment of pthread_mutexattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_mutexattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_mutexattr_t::__align" ); } impl Default for pthread_mutexattr_t { @@ -15360,32 +13941,22 @@ fn bindgen_test_layout_pthread_condattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) + "Size of pthread_condattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) + "Alignment of pthread_condattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_condattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_condattr_t::__align" ); } impl Default for pthread_condattr_t { @@ -15412,32 +13983,22 @@ fn bindgen_test_layout_pthread_attr_t() { assert_eq!( ::std::mem::size_of::(), 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) + "Size of pthread_attr_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) + "Alignment of pthread_attr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_attr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_attr_t::__align" ); } impl Default for pthread_attr_t { @@ -15463,42 +14024,27 @@ fn bindgen_test_layout_pthread_mutex_t() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) + "Size of pthread_mutex_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) + "Alignment of pthread_mutex_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_mutex_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_mutex_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_mutex_t::__align" ); } impl Default for pthread_mutex_t { @@ -15524,42 +14070,27 @@ fn bindgen_test_layout_pthread_cond_t() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) + "Size of pthread_cond_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) + "Alignment of pthread_cond_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_cond_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_cond_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_cond_t::__align" ); } impl Default for pthread_cond_t { @@ -15585,42 +14116,27 @@ fn bindgen_test_layout_pthread_rwlock_t() { assert_eq!( ::std::mem::size_of::(), 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) + "Size of pthread_rwlock_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) + "Alignment of pthread_rwlock_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) + "Offset of field: pthread_rwlock_t::__data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_rwlock_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_rwlock_t::__align" ); } impl Default for pthread_rwlock_t { @@ -15645,32 +14161,22 @@ fn bindgen_test_layout_pthread_rwlockattr_t() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) + "Size of pthread_rwlockattr_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) + "Alignment of pthread_rwlockattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_rwlockattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_rwlockattr_t::__align" ); } impl Default for pthread_rwlockattr_t { @@ -15696,32 +14202,22 @@ fn bindgen_test_layout_pthread_barrier_t() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) + "Size of pthread_barrier_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) + "Alignment of pthread_barrier_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_barrier_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_barrier_t::__align" ); } impl Default for pthread_barrier_t { @@ -15747,32 +14243,22 @@ fn bindgen_test_layout_pthread_barrierattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) + "Size of pthread_barrierattr_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) + "Alignment of pthread_barrierattr_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) + "Offset of field: pthread_barrierattr_t::__size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) + "Offset of field: pthread_barrierattr_t::__align" ); } impl Default for pthread_barrierattr_t { @@ -15818,82 +14304,47 @@ fn bindgen_test_layout_random_data() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(random_data)) + "Size of random_data" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(random_data)) + "Alignment of random_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(fptr) - ) + "Offset of field: random_data::fptr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rptr) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rptr) - ) + "Offset of field: random_data::rptr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(state) - ) + "Offset of field: random_data::state" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_type) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_type) - ) + "Offset of field: random_data::rand_type" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_deg) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_deg) - ) + "Offset of field: random_data::rand_deg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rand_sep) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_sep) - ) + "Offset of field: random_data::rand_sep" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end_ptr) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(end_ptr) - ) + "Offset of field: random_data::end_ptr" ); } impl Default for random_data { @@ -15980,62 +14431,37 @@ fn bindgen_test_layout_drand48_data() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(drand48_data)) + "Size of drand48_data" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(drand48_data)) + "Alignment of drand48_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__x) - ) + "Offset of field: drand48_data::__x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__old_x) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__old_x) - ) + "Offset of field: drand48_data::__old_x" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__c) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__c) - ) + "Offset of field: drand48_data::__c" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__init) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__init) - ) + "Offset of field: drand48_data::__init" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__a) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__a) - ) + "Offset of field: drand48_data::__a" ); } extern "C" { @@ -16107,9 +14533,6 @@ extern "C" { __size: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn free(__ptr: *mut ::std::os::raw::c_void); -} extern "C" { pub fn reallocarray( __ptr: *mut ::std::os::raw::c_void, @@ -16117,6 +14540,9 @@ extern "C" { __size: size_t, ) -> *mut ::std::os::raw::c_void; } +extern "C" { + pub fn free(__ptr: *mut ::std::os::raw::c_void); +} extern "C" { pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } @@ -17238,22 +15664,6 @@ extern "C" { dest: *mut TPMS_ALG_PROPERTY, ) -> TSS2_RC; } -extern "C" { - pub fn Tss2_MU_TPMS_ALGORITHM_DESCRIPTION_Marshal( - src: *const TPMS_ALGORITHM_DESCRIPTION, - buffer: *mut u8, - buffer_size: size_t, - offset: *mut size_t, - ) -> TSS2_RC; -} -extern "C" { - pub fn Tss2_MU_TPMS_ALGORITHM_DESCRIPTION_Unmarshal( - buffer: *const u8, - buffer_size: size_t, - offset: *mut size_t, - dest: *mut TPMS_ALGORITHM_DESCRIPTION, - ) -> TSS2_RC; -} extern "C" { pub fn Tss2_MU_TPMS_TAGGED_PROPERTY_Marshal( src: *const TPMS_TAGGED_PROPERTY, @@ -17990,22 +16400,6 @@ extern "C" { dest: *mut TPML_TAGGED_TPM_PROPERTY, ) -> TSS2_RC; } -extern "C" { - pub fn Tss2_MU_TPML_INTEL_PTT_PROPERTY_Marshal( - src: *const TPML_INTEL_PTT_PROPERTY, - buffer: *mut u8, - buffer_size: size_t, - offset: *mut size_t, - ) -> TSS2_RC; -} -extern "C" { - pub fn Tss2_MU_TPML_INTEL_PTT_PROPERTY_Unmarshal( - buffer: *const u8, - buffer_size: size_t, - offset: *mut size_t, - dest: *mut TPML_INTEL_PTT_PROPERTY, - ) -> TSS2_RC; -} extern "C" { pub fn Tss2_MU_TPML_AC_CAPABILITIES_Marshal( src: *const TPML_AC_CAPABILITIES, @@ -18708,3 +17102,35 @@ extern "C" { out: *mut TPMS_EMPTY, ) -> TSS2_RC; } +extern "C" { + pub fn Tss2_MU_TPM2B_MAX_CAP_BUFFER_Marshal( + src: *const TPM2B_MAX_CAP_BUFFER, + buffer: *mut u8, + buffer_size: size_t, + offset: *mut size_t, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_MU_TPM2B_MAX_CAP_BUFFER_Unmarshal( + buffer: *const u8, + buffer_size: size_t, + offset: *mut size_t, + dest: *mut TPM2B_MAX_CAP_BUFFER, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_MU_TPML_INTEL_PTT_PROPERTY_Marshal( + src: *const TPML_INTEL_PTT_PROPERTY, + buffer: *mut u8, + buffer_size: size_t, + offset: *mut size_t, + ) -> TSS2_RC; +} +extern "C" { + pub fn Tss2_MU_TPML_INTEL_PTT_PROPERTY_Unmarshal( + buffer: *const u8, + buffer_size: size_t, + offset: *mut size_t, + dest: *mut TPML_INTEL_PTT_PROPERTY, + ) -> TSS2_RC; +} diff --git a/tss-esapi/Cargo.toml b/tss-esapi/Cargo.toml index f5d26495..893b755a 100644 --- a/tss-esapi/Cargo.toml +++ b/tss-esapi/Cargo.toml @@ -2,7 +2,7 @@ name = "tss-esapi" version = "8.0.0-alpha" authors = ["Parsec Project Contributors"] -edition = "2018" # TODO Update edition to 2021 - Remove the disabled lints that are due to using old edition. +edition = "2021" description = "Rust-native wrapper around TSS 2.0 Enhanced System API" readme = "README.md" keywords = ["tpm", "tss", "esys", "esapi"] @@ -10,7 +10,7 @@ categories = ["api-bindings", "external-ffi-bindings", "cryptography"] license = "Apache-2.0" repository = "https://github.com/parallaxsecond/rust-tss-esapi" documentation = "https://docs.rs/crate/tss-esapi" -rust-version = "1.66.0" +rust-version = "1.74.0" [[example]] name = "hmac" @@ -20,30 +20,30 @@ name = "certify" required-features = ["abstraction"] [dependencies] -bitfield = "0.14" +bitfield = "0.17.0" serde = { version = "1.0.115", features = [ "derive", ], optional = true, default-features = false } malloced = "1.3.1" log = "0.4.11" enumflags2 = "0.7.7" -num-derive = "0.3.2" +num-derive = "0.4.2" num-traits = "0.2.12" hostname-validator = "1.1.0" regex = "1.3.9" zeroize = { version = "1.5.7", features = ["zeroize_derive"] } tss-esapi-sys = { path = "../tss-esapi-sys", version = "0.5.0" } oid = { version = "0.2.1", optional = true } -picky-asn1 = { version = "0.8.0", optional = true } -picky-asn1-x509 = { version = "0.12.0", optional = true } +picky-asn1 = { version = "0.9.0", optional = true } +picky-asn1-x509 = { version = "0.13.0", optional = true } cfg-if = "1.0.0" -strum = { version = "0.25.0", optional = true } -strum_macros = { version = "0.25.0", optional = true } +strum = { version = "0.26.3", optional = true } +strum_macros = { version = "0.26.4", optional = true } paste = "1.0.14" getrandom = "0.2.11" [dev-dependencies] -env_logger = "0.9.0" +env_logger = "0.11.5" sha2 = "0.10.1" serde_json = "^1.0.108" tss-esapi = { path = ".", features = [ diff --git a/tss-esapi/src/context/tpm_commands/attestation_commands.rs b/tss-esapi/src/context/tpm_commands/attestation_commands.rs index 9afab587..e9bd965d 100644 --- a/tss-esapi/src/context/tpm_commands/attestation_commands.rs +++ b/tss-esapi/src/context/tpm_commands/attestation_commands.rs @@ -249,8 +249,6 @@ impl Context { signing_scheme: SignatureScheme, creation_ticket: CreationTicket, ) -> Result<(Attest, Signature)> { - use std::convert::TryInto; - let mut certify_info_ptr = null_mut(); let mut signature_ptr = null_mut(); ReturnCode::ensure_success( diff --git a/tss-esapi/src/lib.rs b/tss-esapi/src/lib.rs index 365f2173..0c17936f 100644 --- a/tss-esapi/src/lib.rs +++ b/tss-esapi/src/lib.rs @@ -29,10 +29,7 @@ missing_copy_implementations, rustdoc::broken_intra_doc_links, )] -// This comes from Zeroize they changed version of Syn used -// when zeroize_derive was updated to Rust Edition 2021. -// TODO: Remove this when updating Rust Edition. -#![allow(clippy::multiple_crate_versions)] + //! # TSS 2.0 Rust Wrapper over Enhanced System API //! This crate exposes the functionality of the TCG Software Stack Enhanced System API to //! Rust developers, both directly through FFI bindings and through more Rust-tailored interfaces @@ -63,7 +60,7 @@ //! are at most one level away from root. //! //! Minimum supported Rust version (MSRV): -//! We currently check with version 1.66.0 of the Rust compiler during CI builds. +//! We currently check with version 1.74.0 of the Rust compiler during CI builds. //! //! # Notes on code safety: //! * thread safety is ensured by the required mutability of the `Context` structure within the @@ -95,6 +92,7 @@ //! controlled through environment variables as explained //! [here](https://github.com/tpm2-software/tpm2-tss/blob/main/doc/logging.md#runtime-log-level). //! + mod context; pub mod error; diff --git a/tss-esapi/tests/Cargo.lock.frozen b/tss-esapi/tests/Cargo.lock.frozen index 094d607f..0176ff37 100644 --- a/tss-esapi/tests/Cargo.lock.frozen +++ b/tss-esapi/tests/Cargo.lock.frozen @@ -4,22 +4,60 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] -name = "atty" -version = "0.2.14" +name = "anstream" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", ] [[package]] @@ -30,44 +68,41 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.21.4" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" -version = "0.66.1" +version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ "bitflags", "cexpr", "clang-sys", - "lazy_static", - "lazycell", + "itertools", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.49", - "which", + "syn", ] [[package]] name = "bitfield" -version = "0.14.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" +checksum = "f798d2d157e547aa99aab0967df39edd0b70307312b6f8bd2848e6abe40896e0" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block-buffer" @@ -78,15 +113,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -104,20 +130,26 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", "libloading", ] +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -144,62 +176,51 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "enumflags2" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] -name = "env_logger" -version = "0.9.3" +name = "env_filter" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ - "atty", - "humantime", "log", "regex", - "termcolor", -] - -[[package]] -name = "errno" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "env_logger" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ - "cc", - "libc", + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", ] [[package]] @@ -212,6 +233,17 @@ dependencies = [ "version_check", ] +[[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" @@ -220,27 +252,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "home" -version = "0.5.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hostname-validator" @@ -255,50 +269,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] -name = "itoa" -version = "1.0.10" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] -name = "lazy_static" -version = "1.4.0" +name = "itertools" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] [[package]] -name = "lazycell" -version = "1.3.0" +name = "itoa" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" - [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "malloced" @@ -308,9 +319,9 @@ checksum = "6dfebb2f9e0b39509c62eead6ec7ae0c0ed45bb61d12bbcf4e976c566c5400ec" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "minimal-lexical" @@ -330,20 +341,20 @@ dependencies = [ [[package]] name = "num-derive" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -357,29 +368,17 @@ dependencies = [ "serde", ] -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "picky-asn1" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295eea0f33c16be21e2a98b908fdd4d73c04dd48c8480991b76dbcf0cb58b212" +checksum = "360019b238b11b8c0e88cd9db3a6677f1af122e3422d0a26a2b576f084d9be36" dependencies = [ "oid", "serde", @@ -388,9 +387,9 @@ dependencies = [ [[package]] name = "picky-asn1-der" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df7873a9e36d42dadb393bea5e211fe83d793c172afad5fb4ec846ec582793f" +checksum = "04784987e157b5a8f832ce68b3364915dc6ef4bed94a6e10e241fa1bae3db2e3" dependencies = [ "picky-asn1", "serde", @@ -399,9 +398,9 @@ dependencies = [ [[package]] name = "picky-asn1-x509" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5f20f71a68499ff32310f418a6fad8816eac1a2859ed3f0c5c741389dd6208" +checksum = "f3384ff768b1c4a04532916be77935f634a4738d3b2138da98798e90352fadf4" dependencies = [ "base64", "oid", @@ -412,43 +411,43 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.49", + "syn", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "92de25114670a878b1261c79c9f8f729fb97e95bac93f6312f583c60dd6a1dfe" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "5907a1b7c277254a8b15170f6e7c97cfa60ee7872a3217663bb81151e48184bb" dependencies = [ "proc-macro2", ] [[package]] name = "regex" -version = "1.9.6" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -458,9 +457,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -469,9 +468,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustc-hash" @@ -479,19 +478,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustix" -version = "0.38.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "rustversion" version = "1.0.14" @@ -506,44 +492,44 @@ checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "semver" -version = "1.0.19" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.12" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" dependencies = [ "itoa", "ryu", @@ -563,45 +549,34 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.49", + "syn", ] [[package]] name = "syn" -version = "1.0.109" +version = "2.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" dependencies = [ "proc-macro2", "quote", @@ -610,18 +585,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" - -[[package]] -name = "termcolor" -version = "1.3.0" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" -dependencies = [ - "winapi-util", -] +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tss-esapi" @@ -631,6 +597,7 @@ dependencies = [ "cfg-if", "enumflags2", "env_logger", + "getrandom", "hostname-validator", "log", "malloced", @@ -647,6 +614,7 @@ dependencies = [ "sha2", "strum", "strum_macros", + "tss-esapi", "tss-esapi-sys", "zeroize", ] @@ -656,7 +624,9 @@ name = "tss-esapi-sys" version = "0.5.0" dependencies = [ "bindgen", + "cfg-if", "pkg-config", + "semver", "target-lexicon", ] @@ -673,61 +643,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "version_check" -version = "0.9.4" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[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 = "winapi" -version = "0.3.9" +name = "version_check" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "winapi-util" -version = "0.1.6" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "winapi", + "windows-targets 0.48.5", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -736,13 +684,29 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -751,47 +715,95 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -804,5 +816,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn", ] diff --git a/tss-esapi/tests/Dockerfile-fedora b/tss-esapi/tests/Dockerfile-fedora index 79a9cf0a..cafbe04e 100644 --- a/tss-esapi/tests/Dockerfile-fedora +++ b/tss-esapi/tests/Dockerfile-fedora @@ -1,4 +1,4 @@ -FROM fedora:36 +FROM fedora:38 RUN dnf install -y \ tpm2-tss-devel tpm2-abrmd tpm2-tools \ diff --git a/tss-esapi/tests/Dockerfile-ubuntu b/tss-esapi/tests/Dockerfile-ubuntu index 1541e05e..300eb842 100644 --- a/tss-esapi/tests/Dockerfile-ubuntu +++ b/tss-esapi/tests/Dockerfile-ubuntu @@ -1,4 +1,4 @@ -FROM ghcr.io/tpm2-software/ubuntu-18.04:latest AS base +FROM ghcr.io/tpm2-software/ubuntu-20.04:latest AS base FROM base AS rust-toolchain # Install Rust toolchain @@ -6,11 +6,23 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" FROM rust-toolchain AS tpm2-tss +ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig +# Download and install openssl +ENV OPENSSL_VERSION="OpenSSL_1_1_1j" +RUN git clone https://github.com/openssl/openssl.git --branch ${OPENSSL_VERSION} +RUN pushd openssl \ + && ./bootstrap \ + && ./configure \ + && make clean \ + && make -j$(nproc) \ + && make install \ + popd + # Download and install the TSS library -ENV TPM2_TSS_BINDINGS_VERSION=3.2.2 +ENV TPM2_TSS_BINDINGS_VERSION=4.0.1 ARG TPM2_TSS_VERSION=$TPM2_TSS_BINDINGS_VERSION ENV TPM2_TSS_VERSION=$TPM2_TSS_VERSION -ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig + RUN git clone https://github.com/tpm2-software/tpm2-tss.git --branch $TPM2_TSS_VERSION RUN cd tpm2-tss \ && ./bootstrap \ diff --git a/tss-esapi/tests/create_frozen_cargo_lock b/tss-esapi/tests/create_frozen_cargo_lock new file mode 100755 index 00000000..5209f127 --- /dev/null +++ b/tss-esapi/tests/create_frozen_cargo_lock @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Copyright 2024 Contributors to the Parsec project. +# SPDX-License-Identifier: Apache-2.0 + +export MSRV=1.74.0 +export EXEC_DIR="tss-esapi" + +if [[ "$(basename `pwd`)" != "$EXEC_DIR" ]]; then + echo "Script should be run from ./$EXEC_DIR ." + exit 1 +fi + +rustup toolchain install $MSRV +cargo +$MSRV build +cp ../Cargo.lock tests/Cargo.lock.frozen \ No newline at end of file diff --git a/tss-esapi/tests/cross-compile.sh b/tss-esapi/tests/cross-compile.sh index 43517339..ee4db839 100755 --- a/tss-esapi/tests/cross-compile.sh +++ b/tss-esapi/tests/cross-compile.sh @@ -11,7 +11,7 @@ set -euf -o pipefail OPENSSL_GIT="https://github.com/openssl/openssl.git" OPENSSL_VERSION="OpenSSL_1_1_1j" TPM2_TSS_GIT="https://github.com/tpm2-software/tpm2-tss.git" -TPM2_TSS_VERSION="3.2.2" +TPM2_TSS_VERSION="4.0.1" export SYSROOT="/tmp/sysroot" diff --git a/tss-esapi/tests/valgrind.sh b/tss-esapi/tests/valgrind.sh index 1936ddda..d8034d9a 100755 --- a/tss-esapi/tests/valgrind.sh +++ b/tss-esapi/tests/valgrind.sh @@ -18,6 +18,7 @@ tpm2_startup -c -T mssim ########################## # Install cargo-valgrind # ########################## +apt update apt install -y valgrind cargo install cargo-valgrind