gputils/libgputils-1.5.2.patch
2025-01-27 11:14:34 +11:00

36 lines
1.2 KiB
Diff

diff --git a/libgputils/gpcoffgen.h b/libgputils/gpcoffgen.h
index 41d3f89..8ee08b9 100644
--- a/libgputils/gpcoffgen.h
+++ b/libgputils/gpcoffgen.h
@@ -88,7 +88,7 @@ extern gp_reloc_t *gp_coffgen_add_reloc(gp_section_t *Section);
#define RELOC_DISABLE_WARN (1 << 0)
#define RELOC_ENABLE_CINIT_WARN (1 << 1)
-extern void gp_coffgen_check_relocations(const gp_object_t *Object, unsigned int Behavior);
+extern void gp_coffgen_check_relocations(const gp_object_t *Object, gp_boolean Behavior);
extern gp_boolean gp_coffgen_del_reloc(gp_section_t *Section, gp_reloc_t *Relocation);
extern const char *gp_coffgen_reloc_type_to_str(uint16_t Type);
diff --git a/libgputils/gptypes.h b/libgputils/gptypes.h
index 95eb609..8356d8f 100644
--- a/libgputils/gptypes.h
+++ b/libgputils/gptypes.h
@@ -26,10 +26,14 @@ Boston, MA 02111-1307, USA. */
#include "stdhdr.h"
-typedef enum {
- false = (0 == 1),
- true = (0 == 0)
-} gp_boolean;
+#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
+// ISO C standard >= C23
+#define gp_boolean bool
+#else
+#define gp_boolean _Bool
+#define true 1
+#define false 0
+#endif
typedef long gp_symvalue_t;