From 4efeeb73f74194ae81b3243cbfe6cbf5fdbb29d3 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 20 Jan 2020 02:48:03 -0800 Subject: pre-define __unix__ and friends GCC defines these, so should we. Signed-off-by: John Levon Signed-off-by: Luc Van Oostenryck --- lib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib.c b/lib.c index 2de2887f..f15e4d99 100644 --- a/lib.c +++ b/lib.c @@ -1402,6 +1402,12 @@ static void predefined_macros(void) if (arch_target->predefine) arch_target->predefine(arch_target); + if (arch_os >= OS_UNIX) { + predefine("__unix__", 1, "1"); + predefine("__unix", 1, "1"); + predefine_nostd("unix"); + } + if (arch_os == OS_SUNOS) { predefine("__sun__", 1, "1"); predefine("__sun", 1, "1"); -- cgit 1.2.3-korg