>From 2b59d921e71c106f12e115351158913d043c8d8d Mon Sep 17 00:00:00 2001 From: Petr Skocik Date: Mon, 17 Jul 2017 15:34:45 +0200 Subject: [PATCH] add missing standard macros and iso646.h --- include/iso646.h | 16 ++++++++++++++++ libtcc.c | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 include/iso646.h diff --git a/include/iso646.h b/include/iso646.h new file mode 100644 index 0000000..8c1898f --- /dev/null +++ b/include/iso646.h @@ -0,0 +1,16 @@ +#ifndef _ISO646_H +#define _ISO646_H + +#define and && +#define and_eq &= +#define bitand & +#define bitor | +#define compl ~ +#define not ! +#define not_eq != +#define or || +#define or_eq |= +#define xor ^ +#define xor_eq ^= + +#endif diff --git a/libtcc.c b/libtcc.c index bf13724..dfd982f 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1,7 +1,7 @@ /* * TCC - Tiny C Compiler * - * Copyright (c) 2001-2004 Fabrice Bellard + * Copyright (c) 2001-2004, 2017 Fabrice Bellard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -775,6 +775,9 @@ LIBTCCAPI TCCState *tcc_new(void) tcc_define_symbol(s, "__STDC__", NULL); tcc_define_symbol(s, "__STDC_VERSION__", "199901L"); tcc_define_symbol(s, "__STDC_HOSTED__", NULL); + tcc_define_symbol(s, "__STDC_NO_ATOMICS__", "1"); + tcc_define_symbol(s, "__STDC_NO_COMPLEX__", "1"); + tcc_define_symbol(s, "__STDC_NO_THREADS__", "1"); /* target defines */ #if defined(TCC_TARGET_I386) -- 2.13.0