Removed C90 limitations and NO_LONG_LONG related stuff as even MinGW on Windows 2000... master
authorRobert Pengelly <robertapengelly@hotmail.com>
Wed, 19 Aug 2026 11:37:17 +0000 (12:37 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Wed, 19 Aug 2026 11:37:17 +0000 (12:37 +0100)
Makefile.unix
expr.h
fixup.c
frag.h
intel.c
inttypes.h [deleted file]
listing.c
stdint.h [deleted file]

index 95c06c74e85fada569ae3b0f952724d8223ceab1..b9bb5897575cef9a6a90e2583ce772d56856c502 100644 (file)
@@ -5,7 +5,7 @@ SRCDIR              ?=  $(CURDIR)
 VPATH               :=  $(SRCDIR)
 
 CC                  :=  gcc
-CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra -ansi -pedantic -std=c90
+CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra
 
 CSRC                :=  as.c coff.c cstr.c elks.c expr.c fixup.c frag.c hashtab.c intel.c kwd.c lex.c lib.c list.c listing.c ll.c macro.c process.c report.c section.c symbol.c vector.c
 
diff --git a/expr.h b/expr.h
index 509d5716846f6a4c3063917423537fdd6f1ba971..f86a78b6726ab506610ea8d76f8542c6ab35102c 100644 (file)
--- a/expr.h
+++ b/expr.h
@@ -4,7 +4,7 @@
 #ifndef     _EXPR_H
 #define     _EXPR_H
 
-#include    "stdint.h"
+#include    <stdint.h>
 
 enum expr_type {
 
diff --git a/fixup.c b/fixup.c
index b565cb113dd7f30d95c34a823aa712e9a22e26f8..a12ccc7cf98ec6986f60db998c8ffb4589805ab2 100644 (file)
--- a/fixup.c
+++ b/fixup.c
@@ -429,7 +429,7 @@ static void adjust_reloc_symbols_of_section (struct section *section) {
 
 }
 
-#include    "inttypes.h"
+#include    <inttypes.h>
 int64_t machine_dependent_pcrel_from (struct fixup *fixup);
 
 int machine_dependent_force_relocation_local (struct fixup *fixup);
diff --git a/frag.h b/frag.h
index 9df428d58f611583fd0e3532cc8192a655543f29..37428b845e051765b975a3d1df4c70b2b4bdfd56 100644 (file)
--- a/frag.h
+++ b/frag.h
@@ -4,7 +4,7 @@
 #ifndef     _FRAG_H
 #define     _FRAG_H
 
-#include    "stdint.h"
+#include    <stdint.h>
 
 #define     RELAX_TYPE_NONE_NEEDED                          0
 #define     RELAX_TYPE_ALIGN                                1
diff --git a/intel.c b/intel.c
index 8891fb637b72ea444d76ca9b5ac4028ad089e8f6..51f5c4663373f0f25e8f307db1f249513a698913 100644 (file)
--- a/intel.c
+++ b/intel.c
@@ -4067,10 +4067,6 @@ static int fits_in_unsigned_word (uint64_t number) {
     return ((number & 0xffff) == number);
 }
 
-#if     defined (NO_LONG_LONG)
-# define    fits_in_signed_long(x)                          1
-# define    fits_in_unsigned_long(x)                        1     
-#else
 static int fits_in_signed_long (int64_t number) {
     return ((number >= -2147483647-1) && (number <= 2147483647));
 }
@@ -4078,7 +4074,6 @@ static int fits_in_signed_long (int64_t number) {
 static int fits_in_unsigned_long (uint64_t number) {
     return ((number & 0xffffffff) == number);
 }
-#endif
 
 static struct operand_type smallest_imm_type (int64_t number) {
     
diff --git a/inttypes.h b/inttypes.h
deleted file mode 100644 (file)
index 2ff8fed..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/******************************************************************************
- * @file            inttypes.h
- *****************************************************************************/
-#include    <limits.h>
-
-#if     defined (NO_LONG_LONG)
-# define    I64_FMT                     "l"
-#elif   defined (_MSVC_)
-# define    I64_FMT                     "I64"
-#elif   defined (__PRI_64_LENGTH_MODIFIER__)                                                        /* Mac */
-# define    I64_FMT                     __PRI_64_LENGTH_MODIFIER__
-#elif   (defined (SIZEOF_LONG) && SIZEOF_LONG >= 8) || ((ULONG_MAX >> 16) >> 16) == 0xffffffff
-# define    I64_FMT                     "l"
-#else
-# define    I64_FMT                     "ll"
-#endif
-
-#define     PRId64                      I64_FMT"d"
-#define     PRIi64                      I64_FMT"i"
-#define     PRIo64                      I64_FMT"o"
-#define     PRIu64                      I64_FMT"u"
-#define     PRIx64                      I64_FMT"x"
-#define     PRIX64                      I64_FMT"X"
-
index a8b7c8ad688f6a9aa75241722b018dd7ddbbff6f..bae60287ce4d928bc7528c86566ac38125cd80b2 100644 (file)
--- a/listing.c
+++ b/listing.c
@@ -132,7 +132,7 @@ void add_listing_message (char *message, const char *filename, unsigned long lin
 
 }
 
-#include    "inttypes.h"
+#include    <inttypes.h>
 
 void generate_listing (void) {
 
diff --git a/stdint.h b/stdint.h
deleted file mode 100644 (file)
index 164c733..0000000
--- a/stdint.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/******************************************************************************
- * @file            stdint.h
- *****************************************************************************/
-#ifndef     _STDINT_H_INCLUDED
-#ifndef     _STDINT_H
-#ifndef     _STDINT_H_
-
-#define     _STDINT_H_INCLUDED
-#define     _STDINT_H
-#define     _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 >> 16) >> 16) == 0xffffffff
-typedef     signed long                 int64_t;
-#else
-typedef     signed long long            int64_t;
-#endif
-#endif      /* _INT64_T */
-
-#ifndef     _UINT64_T
-#define     _UINT64_T
-#if     defined (NO_LONG_LONG) || ((ULONG_MAX >> 16) >> 16) == 0xffffffff
-typedef     unsigned long               uint64_t;
-#else
-typedef     unsigned long long          uint64_t;
-#endif
-#endif      /* _UINT64_T */
-
-#endif      /* _STDINT_H_ */
-#endif      /* _STDINT_H */
-#endif      /* _STDINT_H_INCLUDED */
-