From 4443f99c676ec3805d631c14a5bd0ab38b3cb4b5 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Wed, 19 Aug 2026 12:38:08 +0100 Subject: [PATCH] Removed C90 limitations and NO_LONG_LONG related stuff as even MinGW on Windows 2000 works --- cc.h | 2 +- eval.c | 2 +- stdint.h | 49 ------------------------------------------------- token.c | 2 +- 4 files changed, 3 insertions(+), 52 deletions(-) delete mode 100755 stdint.h diff --git a/cc.h b/cc.h index a014e70..6aaf209 100755 --- a/cc.h +++ b/cc.h @@ -4,10 +4,10 @@ #ifndef _CC_H #define _CC_H +#include #include #include "list.h" -#include "stdint.h" #include "vector.h" struct cc_state { diff --git a/eval.c b/eval.c index ece45d4..edceb08 100755 --- a/eval.c +++ b/eval.c @@ -3,6 +3,7 @@ *****************************************************************************/ #include #include +#include #include #include #include @@ -13,7 +14,6 @@ #include "lib.h" #include "macro.h" #include "report.h" -#include "stdint.h" static uint64_t eval_expr (uint64_t lhs, char *start, char **pp, int outer_prec, int brackets); diff --git a/stdint.h b/stdint.h deleted file mode 100755 index 1b97ab8..0000000 --- a/stdint.h +++ /dev/null @@ -1,49 +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 - -/* 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 */ diff --git a/token.c b/token.c index 605ff8b..dc24298 100755 --- a/token.c +++ b/token.c @@ -765,7 +765,7 @@ static int chrpos (char *s, int ch) { } -#include "stdint.h" +#include static int hex_char (uint64_t *out, struct token *tok, int idx) { -- 2.34.1