File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed
library/std/src/sys/pal/windows Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -109,19 +109,22 @@ if #[cfg(not(target_vendor = "uwp"))] {
109109}
110110
111111// Use raw-dylib to import ProcessPrng as we can't rely on there being an import library.
112- cfg_if:: cfg_if! {
113- if #[ cfg( not( target_vendor = "win7" ) ) ] {
114- #[ cfg( target_arch = "x86" ) ]
115- #[ link( name = "bcryptprimitives" , kind = "raw-dylib" , import_name_type = "undecorated" ) ]
116- extern "system" {
117- pub fn ProcessPrng ( pbdata: * mut u8 , cbdata: usize ) -> BOOL ;
118- }
119- #[ cfg( not( target_arch = "x86" ) ) ]
120- #[ link( name = "bcryptprimitives" , kind = "raw-dylib" ) ]
121- extern "system" {
122- pub fn ProcessPrng ( pbdata: * mut u8 , cbdata: usize ) -> BOOL ;
123- }
124- } }
112+ #[ cfg( not( target_vendor = "win7" ) ) ]
113+ #[ cfg_attr(
114+ target_arch = "x86" ,
115+ link(
116+ name = "bcryptprimitives" ,
117+ kind = "raw-dylib" ,
118+ import_name_type = "undecorated"
119+ )
120+ ) ]
121+ #[ cfg_attr(
122+ not( target_arch = "x86" ) ,
123+ link( name = "bcryptprimitives" , kind = "raw-dylib" )
124+ ) ]
125+ extern "system" {
126+ pub fn ProcessPrng ( pbdata : * mut u8 , cbdata : usize ) -> BOOL ;
127+ }
125128
126129// Functions that aren't available on every version of Windows that we support,
127130// but we still use them and just provide some form of a fallback implementation.
You can’t perform that action at this time.
0 commit comments