Skip to contentSkip to conversation

pre-define __unix__ and friends

PATCH New [email protected] 1 participant 1 message Jan 20, 2020 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pre-define __unix__ and friends

From: John Levon <[email protected]>

GCC defines these, so should we.

---
 lib.c | 4 ++++
 1 file changed, 4 insertions(+)
lib.c +4 -0
index 9b03895c..739074d1 100644
@@ -1507,6 +1507,10 @@ static void predefined_macros(void)
 	if (optimize_size)
 		predefine("__OPTIMIZE_SIZE__", 0, "1");
 
+	predefine("__unix__", 1, "1");
+	predefine("__unix", 1, "1");
+	predefine("unix", 1, "1");
+
 	predefine("__PRAGMA_REDEFINE_EXTNAME", 1, "1");
 
 	// Temporary hacks
Signature · 1 line
2.23.0