diff options
author | pommicket <pommicket@gmail.com> | 2022-02-17 17:38:52 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-17 17:38:52 -0500 |
commit | e94266df3dba36f2998fd85c6aa269f3e6351225 (patch) | |
tree | 9034f3d975ea817b3e7d6e912fcacaf62dd0cd29 /05/tcc-0.9.25 | |
parent | e900dd8d6f2ff7cef66fbd31898d375b71ef53d6 (diff) |
working (?) tcc build
Diffstat (limited to '05/tcc-0.9.25')
-rw-r--r-- | 05/tcc-0.9.25/config.h | 2 | ||||
-rw-r--r-- | 05/tcc-0.9.25/libtcc.c | 4 | ||||
-rw-r--r-- | 05/tcc-0.9.25/tcc.h | 7 | ||||
-rw-r--r-- | 05/tcc-0.9.25/tccpp.c | 5 |
4 files changed, 13 insertions, 5 deletions
diff --git a/05/tcc-0.9.25/config.h b/05/tcc-0.9.25/config.h index abc985d..7e4096c 100644 --- a/05/tcc-0.9.25/config.h +++ b/05/tcc-0.9.25/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_TCCDIR # define CONFIG_TCCDIR "/usr/local/lib/tcc-bootstrap" #endif -#define TCC_VERSION "0.9.27" +#define TCC_VERSION "0.9.25" #define CONFIG_TCC_STATIC 1 #define TCC_TARGET_X86_64 1 #define CONFIG_TCC_ELFINTERP "/XXX" diff --git a/05/tcc-0.9.25/libtcc.c b/05/tcc-0.9.25/libtcc.c index f842f27..3311357 100644 --- a/05/tcc-0.9.25/libtcc.c +++ b/05/tcc-0.9.25/libtcc.c @@ -2178,7 +2178,7 @@ typedef struct FlagDef { const char *name; } FlagDef; -static const FlagDef warning_defs[] = { +static FlagDef warning_defs[] = { { 0, 0, "unsupported" }, { 0, 0, "write-strings" }, { 0, 0, "error" }, @@ -2235,7 +2235,7 @@ int tcc_set_warning(TCCState *s, const char *warning_name, int value) } } -static const FlagDef flag_defs[] = { +static FlagDef flag_defs[] = { { 0, 0, "unsigned-char" }, { 0, FD_INVERT, "signed-char" }, { 0, FD_INVERT, "common" }, diff --git a/05/tcc-0.9.25/tcc.h b/05/tcc-0.9.25/tcc.h index 4070249..b4789da 100644 --- a/05/tcc-0.9.25/tcc.h +++ b/05/tcc-0.9.25/tcc.h @@ -37,6 +37,13 @@ #include <signal.h> #include <setjmp.h> #include <time.h> +#ifdef __GNUC__ +#include <inttypes.h> +#include <sys/mman.h> +#include <sys/time.h> +#include <unistd.h> +#include <fcntl.h> +#endif #ifdef _WIN32 #include <windows.h> diff --git a/05/tcc-0.9.25/tccpp.c b/05/tcc-0.9.25/tccpp.c index ff17d8b..9ae2a1e 100644 --- a/05/tcc-0.9.25/tccpp.c +++ b/05/tcc-0.9.25/tccpp.c @@ -20,7 +20,7 @@ static const char tcc_keywords[] = -#define DEF(id, str) str "\0" +#define DEF(id, str) str "\n" #include "tcctok.h" #undef DEF ; @@ -862,6 +862,7 @@ static inline void define_push(int v, int macro_type, int *str, Sym *first_arg) s = sym_push2(&define_stack, v, macro_type, (long)str); s->next = first_arg; + table_ident[v - TOK_IDENT]->sym_define = s; } @@ -2883,7 +2884,7 @@ void preprocess_new() r = p; for(;;) { c = *r++; - if (c == '\0') + if (c == '\n') break; } ts = tok_alloc(p, r - p - 1); |