diff options
| author | bors <bors@rust-lang.org> | 2024-08-30 05:13:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-30 05:13:13 +0000 |
| commit | f03c7b21700478c6c2b335b37caba72c3a06e447 (patch) | |
| tree | 5ea72db01aae5b01c502d58a9d4f69cbfab321af /library/std/src/sys | |
| parent | ad7a1aa32ab388dd9748a10a4c983df9da3d23cb (diff) | |
| parent | 23f4eae905486ee02cecee1200fb8623a7ef376a (diff) | |
| download | rust-f03c7b21700478c6c2b335b37caba72c3a06e447.tar.gz rust-f03c7b21700478c6c2b335b37caba72c3a06e447.zip | |
Auto merge of #3853 - rust-lang:rustup-2024-08-30, r=saethlin
Automatic Rustup
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/pal/windows/c.rs | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/windows/c.rs index 2f5d75dc4bc..b888eb7d95c 100644 --- a/library/std/src/sys/pal/windows/c.rs +++ b/library/std/src/sys/pal/windows/c.rs @@ -109,19 +109,15 @@ if #[cfg(not(target_vendor = "uwp"))] { } // Use raw-dylib to import ProcessPrng as we can't rely on there being an import library. -cfg_if::cfg_if! { -if #[cfg(not(target_vendor = "win7"))] { - #[cfg(target_arch = "x86")] - #[link(name = "bcryptprimitives", kind = "raw-dylib", import_name_type = "undecorated")] - extern "system" { - pub fn ProcessPrng(pbdata: *mut u8, cbdata: usize) -> BOOL; - } - #[cfg(not(target_arch = "x86"))] - #[link(name = "bcryptprimitives", kind = "raw-dylib")] - extern "system" { - pub fn ProcessPrng(pbdata: *mut u8, cbdata: usize) -> BOOL; - } -}} +#[cfg(not(target_vendor = "win7"))] +#[cfg_attr( + target_arch = "x86", + link(name = "bcryptprimitives", kind = "raw-dylib", import_name_type = "undecorated") +)] +#[cfg_attr(not(target_arch = "x86"), link(name = "bcryptprimitives", kind = "raw-dylib"))] +extern "system" { + pub fn ProcessPrng(pbdata: *mut u8, cbdata: usize) -> BOOL; +} // Functions that aren't available on every version of Windows that we support, // but we still use them and just provide some form of a fallback implementation. |
