commit 5afaaf865f93965f2a13069d4890c1491664652f (tree) parent 7ca9b835a1fe285bf9942c978bf1c2c52e057dc7 Author: Jacob Young <jacobly0@users.noreply.github.com> Date: Fri, 21 Apr 2023 01:20:01 -0400 zig.h: fix msvc abi for f128 with a gnu compiler Diffstat:
| M | lib/zig.h | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/zig.h b/lib/zig.h @@ -3306,8 +3306,13 @@ typedef zig_repr_f128 zig_f128; #endif #endif -#if _MSC_VER && !defined(ZIG_TARGET_ABI_MSVC) -// Use gnu abi with the msvc compiler +#if !_MSC_VER && defined(ZIG_TARGET_ABI_MSVC) +// Emulate msvc abi on a gnu compiler +#define zig_bitSizeOf_c_longdouble 64 +typedef zig_repr_f64 zig_repr_c_longdouble; +typedef zig_f64 zig_c_longdouble; +#elif _MSC_VER && !defined(ZIG_TARGET_ABI_MSVC) +// Emulate gnu abi on an msvc compiler #define zig_bitSizeOf_c_longdouble 128 typedef zig_repr_f128 zig_repr_c_longdouble; typedef zig_f128 zig_c_longdouble;