diff mbox series

pre-define __unix__ and friends

Message ID 20200120104803.20864-1-john.levon@joyent.com (mailing list archive)
State Mainlined, archived
Headers show
Series pre-define __unix__ and friends | expand

Commit Message

John Levon Jan. 20, 2020, 10:48 a.m. UTC
From: John Levon <john.levon@joyent.com>

GCC defines these, so should we.

Signed-off-by: John Levon <john.levon@joyent.com>
---
 lib.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/lib.c b/lib.c
index 9b03895c..739074d1 100644
--- a/lib.c
+++ b/lib.c
@@ -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