Return-Path: Received: from [8.12.47.4] ([8.12.47.4]:20631 "EHLO jlevon" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726590AbgAWLBe (ORCPT ); Thu, 23 Jan 2020 06:01:34 -0500 From: john.levon@joyent.com Subject: [PATCH 6/8] pre-define __unix__ and friends Date: Thu, 23 Jan 2020 02:57:01 -0800 Message-Id: <20200123105703.17454-7-john.levon@joyent.com> In-Reply-To: <20200123105703.17454-1-john.levon@joyent.com> References: <20200123105703.17454-1-john.levon@joyent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: smatch-owner@vger.kernel.org List-ID: To: smatch@vger.kernel.org Cc: John Levon , Luc Van Oostenryck From: John Levon GCC defines these, so should we. Signed-off-by: John Levon Signed-off-by: Luc Van Oostenryck --- 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