Skip to content

Commit

Permalink
Rollup merge of #98516 - dlrobertson:uefi_va_list, r=joshtriplett
Browse files Browse the repository at this point in the history
library: fix uefi va_list type definition

For uefi the `va_list` should always be the void pointer variant.

Related to: #44930
  • Loading branch information
Dylan-DPC authored Jun 29, 2022
2 parents 7b9a7ef + 3b117c4 commit 375ab3e
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions library/core/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ impl fmt::Debug for c_void {
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios")),
target_family = "wasm",
target_arch = "asmjs",
windows
target_os = "uefi",
windows,
))]
#[repr(transparent)]
#[unstable(
Expand All @@ -254,7 +255,8 @@ pub struct VaListImpl<'f> {
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios")),
target_family = "wasm",
target_arch = "asmjs",
windows
target_os = "uefi",
windows,
))]
#[unstable(
feature = "c_variadic",
Expand All @@ -276,7 +278,8 @@ impl<'f> fmt::Debug for VaListImpl<'f> {
#[cfg(all(
target_arch = "aarch64",
not(any(target_os = "macos", target_os = "ios")),
not(windows)
not(target_os = "uefi"),
not(windows),
))]
#[repr(C)]
#[derive(Debug)]
Expand All @@ -297,7 +300,7 @@ pub struct VaListImpl<'f> {
}

/// PowerPC ABI implementation of a `va_list`.
#[cfg(all(target_arch = "powerpc", not(windows)))]
#[cfg(all(target_arch = "powerpc", not(target_os = "uefi"), not(windows)))]
#[repr(C)]
#[derive(Debug)]
#[unstable(
Expand All @@ -317,7 +320,7 @@ pub struct VaListImpl<'f> {
}

/// x86_64 ABI implementation of a `va_list`.
#[cfg(all(target_arch = "x86_64", not(windows)))]
#[cfg(all(target_arch = "x86_64", not(target_os = "uefi"), not(windows)))]
#[repr(C)]
#[derive(Debug)]
#[unstable(
Expand Down Expand Up @@ -354,7 +357,8 @@ pub struct VaList<'a, 'f: 'a> {
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios")),
target_family = "wasm",
target_arch = "asmjs",
windows
target_os = "uefi",
windows,
))]
inner: VaListImpl<'f>,

Expand All @@ -363,7 +367,8 @@ pub struct VaList<'a, 'f: 'a> {
any(not(target_arch = "aarch64"), not(any(target_os = "macos", target_os = "ios"))),
not(target_family = "wasm"),
not(target_arch = "asmjs"),
not(windows)
not(target_os = "uefi"),
not(windows),
))]
inner: &'a mut VaListImpl<'f>,

Expand All @@ -375,7 +380,8 @@ pub struct VaList<'a, 'f: 'a> {
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios")),
target_family = "wasm",
target_arch = "asmjs",
windows
target_os = "uefi",
windows,
))]
#[unstable(
feature = "c_variadic",
Expand All @@ -396,7 +402,8 @@ impl<'f> VaListImpl<'f> {
any(not(target_arch = "aarch64"), not(any(target_os = "macos", target_os = "ios"))),
not(target_family = "wasm"),
not(target_arch = "asmjs"),
not(windows)
not(target_os = "uefi"),
not(windows),
))]
#[unstable(
feature = "c_variadic",
Expand Down

0 comments on commit 375ab3e

Please sign in to comment.