Clean up cfg-gating of ProcessPrng extern · patricklam/verify-rust-std@e99c681 (original) (raw)

`@@ -109,19 +109,22 @@ if #[cfg(not(target_vendor = "uwp"))] {

`

109

109

`}

`

110

110

``

111

111

`// 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

`+

}

`

125

128

``

126

129

`// Functions that aren't available on every version of Windows that we support,

`

127

130

`// but we still use them and just provide some form of a fallback implementation.

`