]> Kevux Git Server - fll/commitdiff
Bugfix: The f_int_128_t is using incorrect size.
authorKevin Day <thekevinday@gmail.com>
Sat, 14 Jan 2023 06:49:09 +0000 (00:49 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 14 Jan 2023 06:49:09 +0000 (00:49 -0600)
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

index df67b3987f832191235d9959d8a80dd79bfeae3e..aae9f66afa15ba62c6f5d9c881c2257d2ab000f1 100644 (file)
@@ -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;