aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/windows/bits.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2020-11-19 19:03:08 +0200
committerGitHub <noreply@github.com>2020-11-19 19:03:08 +0200
commitcf819b95fe7dec15f4ed87cd4bd8ae0be8ce7fdf (patch)
tree612ec79d1895e59d3ac50a8a2b8c0d59d34d2772 /lib/std/os/windows/bits.zig
parent25ec2dbc1e2302d1138749262b588d3e438fcd55 (diff)
parent3a28b659bd66a1312f5586b7fc8afdd6c6a32eb2 (diff)
downloadzig-cf819b95fe7dec15f4ed87cd4bd8ae0be8ce7fdf.tar.gz
zig-cf819b95fe7dec15f4ed87cd4bd8ae0be8ce7fdf.zip
Merge pull request #6829 from tadeokondrak/error-unsupported-callconv
stage1: Compile error instead of falling back to C for unsupported cc
Diffstat (limited to 'lib/std/os/windows/bits.zig')
-rw-r--r--lib/std/os/windows/bits.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/os/windows/bits.zig b/lib/std/os/windows/bits.zig
index f1f583b68d..fa98d15b19 100644
--- a/lib/std/os/windows/bits.zig
+++ b/lib/std/os/windows/bits.zig
@@ -24,6 +24,11 @@ pub const STD_OUTPUT_HANDLE = maxInt(DWORD) - 11 + 1;
/// The standard error device. Initially, this is the active console screen buffer, CONOUT$.
pub const STD_ERROR_HANDLE = maxInt(DWORD) - 12 + 1;
+pub const WINAPI: builtin.CallingConvention = if (builtin.arch == .i386)
+ .Stdcall
+else
+ .C;
+
pub const BOOL = c_int;
pub const BOOLEAN = BYTE;
pub const BYTE = u8;
@@ -1150,7 +1155,7 @@ pub const EXCEPTION_POINTERS = extern struct {
ContextRecord: PCONTEXT,
};
-pub const VECTORED_EXCEPTION_HANDLER = fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(.Stdcall) c_long;
+pub const VECTORED_EXCEPTION_HANDLER = fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(WINAPI) c_long;
pub const OBJECT_ATTRIBUTES = extern struct {
Length: ULONG,