authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-24 04:18:13-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-24 04:18:13-04:00
log8f0dfcbcfb8e4525006de4aa8f3f7a596e7208d5
tree79532b92c9309e669fc7c96420e1efe9b7dd1f44
parent59410a2f138e2a24a81e795b18e18f3dbfc2009d

Revert "windows API functions are not stdcalls"

This reverts commit 59410a2f138e2a24a81e795b18e18f3dbfc2009d. yes they are

1 files changed, 13 insertions(+), 13 deletions(-)

std/os/windows/index.zig+13-13
...@@ -1,46 +1,46 @@...@@ -1,46 +1,46 @@
1pub const ERROR = @import("error.zig");1pub const ERROR = @import("error.zig");
22
3pub extern "kernel32" fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR,3pub extern "kernel32" stdcallcc fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR,
4 pszProvider: LPCTSTR, dwProvType: DWORD, dwFlags: DWORD) -> bool;4 pszProvider: LPCTSTR, dwProvType: DWORD, dwFlags: DWORD) -> bool;
55
6pub extern "kernel32" fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool;6pub extern "kernel32" stdcallcc fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool;
77
8pub extern "kernel32" fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool;8pub extern "kernel32" stdcallcc fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool;
99
10pub extern "kernel32" fn ExitProcess(exit_code: UINT) -> noreturn;10pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: UINT) -> noreturn;
1111
12pub extern "kernel32" fn GetCommandLine() -> LPTSTR;12pub extern "kernel32" stdcallcc fn GetCommandLine() -> LPTSTR;
1313
14pub extern "kernel32" fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool;14pub extern "kernel32" stdcallcc fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool;
1515
16/// Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis.16/// Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis.
17/// Multiple threads do not overwrite each other's last-error code.17/// Multiple threads do not overwrite each other's last-error code.
18pub extern "kernel32" fn GetLastError() -> DWORD;18pub extern "kernel32" stdcallcc fn GetLastError() -> DWORD;
1919
20/// Retrieves file information for the specified file.20/// Retrieves file information for the specified file.
21pub extern "kernel32" fn GetFileInformationByHandleEx(in_hFile: HANDLE,21pub extern "kernel32" stdcallcc fn GetFileInformationByHandleEx(in_hFile: HANDLE,
22 in_FileInformationClass: FILE_INFO_BY_HANDLE_CLASS, out_lpFileInformation: &c_void,22 in_FileInformationClass: FILE_INFO_BY_HANDLE_CLASS, out_lpFileInformation: &c_void,
23 in_dwBufferSize: DWORD) -> bool;23 in_dwBufferSize: DWORD) -> bool;
2424
25/// Retrieves a handle to the specified standard device (standard input, standard output, or standard error).25/// Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
26pub extern "kernel32" fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE;26pub extern "kernel32" stdcallcc fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE;
2727
28/// Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.28/// Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.
29/// This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx.29/// This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx.
30pub extern "kernel32" fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID,30pub extern "kernel32" stdcallcc fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID,
31 in_nNumberOfBytesToRead: DWORD, out_lpNumberOfBytesRead: &DWORD,31 in_nNumberOfBytesToRead: DWORD, out_lpNumberOfBytesRead: &DWORD,
32 in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL;32 in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL;
3333
34/// Writes data to the specified file or input/output (I/O) device.34/// Writes data to the specified file or input/output (I/O) device.
35/// This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx.35/// This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx.
36pub extern "kernel32" fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void,36pub extern "kernel32" stdcallcc fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void,
37 in_nNumberOfBytesToWrite: DWORD, out_lpNumberOfBytesWritten: ?&DWORD,37 in_nNumberOfBytesToWrite: DWORD, out_lpNumberOfBytesWritten: ?&DWORD,
38 in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL;38 in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL;
3939
40pub extern "kernel32" fn Sleep(dwMilliseconds: DWORD);40pub extern "kernel32" stdcallcc fn Sleep(dwMilliseconds: DWORD);
4141
4242
43pub extern "user32" fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int;43pub extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int;
4444
45pub const PROV_RSA_FULL = 1;45pub const PROV_RSA_FULL = 1;
4646