Add other data types
authorRobert Pengelly <robertapengelly@hotmail.com>
Mon, 29 Sep 2025 12:23:43 +0000 (13:23 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Mon, 29 Sep 2025 12:23:43 +0000 (13:23 +0100)
fixup.c
stdint.h

diff --git a/fixup.c b/fixup.c
index 303bd4ad5248111fb93fb86f03c53cc2540a5dcf..b565cb113dd7f30d95c34a823aa712e9a22e26f8 100644 (file)
--- 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);
             
             }
index 8ae53eefe0293b311dc5433f3751db62e2d53ef7..fc8eb0a75c73e5d6b2836582ff59e78c3ea324f3 100644 (file)
--- a/stdint.h
+++ b/stdint.h
 
 #include    <limits.h>
 
+/* 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