From d8d11e225413a3d494222ce57b655fd61fd36bb6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 30 Oct 2025 12:00:59 +0100 Subject: [PATCH] add 'system' to variadic ABIs --- src/items/external-blocks.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index c360189ba9..b3a1d2fe9b 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -124,7 +124,7 @@ r[items.extern.abi.c] * `unsafe extern "C"` --- The "C" ABI matches the default ABI chosen by the dominant C compiler for the target. r[items.extern.abi.system] -* `unsafe extern "system"` --- This is equivalent to `extern "C"` except on Windows x86_32 where it is equivalent to `"stdcall"`. +* `unsafe extern "system"` --- This is equivalent to `extern "C"` except on Windows x86_32 where it is equivalent to `"stdcall"` for non-variadic functions, and equivalent to `"C"` for variadic functions. > [!NOTE] > As the correct underlying ABI on Windows is target-specific, it's best to use `extern "system"` when attempting to link Windows API functions that don't use an explicitly defined ABI. @@ -257,6 +257,7 @@ Variadic parameters can only be specified within `extern` blocks with the follow - `"C"` - `"cdecl"` - `"efiapi"` +- `"system"` - `"sysv64"` - `"win64"`