From 8168269c901e3b71773792b623f0b4564705c7c4 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Mon, 29 Sep 2025 13:23:43 +0100 Subject: [PATCH] Add other data types --- fixup.c | 2 +- stdint.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/fixup.c b/fixup.c index 303bd4a..b565cb1 100644 --- a/fixup.c +++ b/fixup.c @@ -540,7 +540,7 @@ static unsigned long fixup_section (struct section *section) { if ((add_number & mask) && (fixup->fixup_signed ? ((add_number & mask) != mask) : (-add_number & mask))) { report_at (0, 0, REPORT_ERROR, (add_number > 1000) ? - "value of %#"PRIx64"too large for field of %u byte%s at %#lx" : "value of %"PRIu64" too large for field of %u byte%s at %#lx", + "value of %#"PRIx64" too large for field of %u byte%s at %#lx" : "value of %"PRIu64" too large for field of %u byte%s at %#lx", add_number, fixup->size, ((fixup->size == 1) ? "" : "s"), fixup->frag->address + fixup->where); } diff --git a/stdint.h b/stdint.h index 8ae53ee..fc8eb0a 100644 --- a/stdint.h +++ b/stdint.h @@ -11,6 +11,21 @@ #include +/* Add all data types (even though we don't use them) as the project seems to fail to build on some systems. */ +typedef signed char int8_t; +typedef unsigned char uint8_t; + +typedef signed short int16_t; +typedef unsigned short uint16_t; + +#if INT_MAX > 32767 +typedef signed int int32_t; +typedef unsigned int uint32_t; +#else +typedef signed long int32_t; +typedef unsigned long uint32_t; +#endif + #ifndef _INT64_T #define _INT64_T #if defined (NO_LONG_LONG) || ULONG_MAX > 4294967295UL -- 2.34.1