From de6cf7f23de860c9202eb8b7758f2f999a4fd7db Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 14 Jan 2023 00:49:09 -0600 Subject: [PATCH] Bugfix: The f_int_128_t is using incorrect size. The wrong wrapping define macros are being used. - Use __SIZEOF_INT128__ instead of _di_f_int_128_t_. - Use #ifdef instead of #ifndef. --- level_0/f_type/c/type.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/level_0/f_type/c/type.h b/level_0/f_type/c/type.h index df67b39..aae9f66 100644 --- a/level_0/f_type/c/type.h +++ b/level_0/f_type/c/type.h @@ -186,7 +186,7 @@ extern "C" { #define F_type_size_64_positive_d 0x7ffffffffffffffe #define F_type_size_64_unsigned_d 0xfffffffffffffffe - #ifndef _di_f_int_128_t_ + #ifdef __SIZEOF_INT128__ #define F_type_size_128_negative_d 0x7fffffffffffffffffffffff #define F_type_size_128_positive_d 0x7ffffffffffffffffffffffe #define F_type_size_128_unsigned_d 0xfffffffffffffffffffffffe @@ -194,7 +194,7 @@ extern "C" { #define F_type_size_128_negative_d F_type_size_64_negative_d #define F_type_size_128_positive_d F_type_size_64_positive_d #define F_type_size_128_unsigned_d F_type_size_64_unsigned_d - #endif // _di_f_int_128_t_ + #endif // __SIZEOF_INT128__ #define F_type_size_max_8_negative_d 0x80 #define F_type_size_max_8_positive_d 0x7f @@ -212,7 +212,7 @@ extern "C" { #define F_type_size_max_64_positive_d 0x7fffffffffffffff #define F_type_size_max_64_unsigned_d 0xffffffffffffffff - #ifndef _di_f_int_128_t_ + #ifdef __SIZEOF_INT128__ #define F_type_size_max_128_negative_d 0x800000000000000000000000 #define F_type_size_max_128_positive_d 0x7fffffffffffffffffffffff #define F_type_size_max_128_unsigned_d 0xffffffffffffffffffffffff @@ -220,7 +220,7 @@ extern "C" { #define F_type_size_max_128_negative_d F_type_size_max_64_negative_d #define F_type_size_max_128_positive_d F_type_size_max_64_positive_d #define F_type_size_max_128_unsigned_d F_type_size_max_64_unsigned_d - #endif // _di_f_int_128_t_ + #endif // __SIZEOF_INT128__ #endif // _di_f_type_sizes_d_ /** @@ -946,7 +946,7 @@ extern "C" { * * This provides the types without the normal "f_" leading prefixes to be more in line with the core types like int64_t. */ -#ifndef __SIZEOF_INT128__ +#ifdef __SIZEOF_INT128__ #ifndef _di_f_int128_t_ typedef __int128_t int128_t; -- 1.8.3.1