mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 15:42:49 +00:00
d6856859d3
* standard library knows if it is linking against libc and will sometimes call libc functions in that case instead of providing redundant definitions * fix infinite loop bug when resolving use declarations * allow calling the same C function from different C imports. closes #277 * push more logic from compiler to std/bootstrap.zig * standard library provides way to access errno closes #274 * fix compile error in standard library for windows * add implementation of getRandomBytes for windows
18 lines
558 B
Zig
18 lines
558 B
Zig
pub extern fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR,
|
|
pszProvider: LPCTSTR, dwProvType: DWORD, dwFlags: DWORD) -> bool;
|
|
|
|
pub extern fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool;
|
|
|
|
pub extern fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool;
|
|
|
|
pub const PROV_RSA_FULL = 1;
|
|
|
|
|
|
pub const BYTE = u8;
|
|
pub const DWORD = u32;
|
|
// TODO something about unicode WCHAR vs char
|
|
pub const TCHAR = u8;
|
|
pub const LPCTSTR = ?&const TCHAR;
|
|
pub const ULONG_PTR = usize;
|
|
pub const HCRYPTPROV = ULONG_PTR;
|