[PATCH 6/8] pre-define __unix__ and friends [email protected] Thu, 23 Jan 2020 02:57:01 -0800 Newsgroups org.kernel.vger.smatch Message-ID <[email protected]> From: John Levon <[email protected]> GCC defines these, so should we. Signed-off-by: John Levon <[email protected]> Signed-off-by: Luc Van Oostenryck <[email protected]> --- lib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib.c b/lib.c index c85ce247..40e81ae2 100644 --- a/lib.c +++ b/lib.c @@ -1394,6 +1394,13 @@ static void predefined_macros(void) break; } +#if defined(__unix__) + predefine("__unix__", 1, "1"); + predefine("__unix", 1, "1"); + predefine_nostd("unix"); +#endif + + #if defined(__sun__) || defined(__sun) predefine("__sun__", 1, "1"); predefine("__sun", 1, "1"); -- 2.23.0