From 5860b639c6416d80a4f8276f8ccbfe4c0ad577e5 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Sun, 11 Oct 2015 03:12:35 +0200 Subject: [PATCH] Add support for -D__NetBSD__ --- libtcc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libtcc.c b/libtcc.c index df98bb0..2b48d8f 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1138,6 +1138,11 @@ LIBTCCAPI TCCState *tcc_new(void) tcc_define_symbol(s, "__FreeBSD_kernel__", NULL); # endif #endif +# if defined(__NetBSD__) +# define str(s) #s + tcc_define_symbol(s, "__NetBSD__", str( __NetBSD__)); +# undef str +# endif /* TinyCC & gcc defines */ #if defined TCC_TARGET_PE && defined TCC_TARGET_X86_64