diff options
author | John Levon <john.levon@joyent.com> | 2020-01-20 02:48:03 -0800 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-01-22 23:24:20 +0100 |
commit | 4efeeb73f74194ae81b3243cbfe6cbf5fdbb29d3 (patch) | |
tree | 99577a9e8cf93c2cfd13853d8586d61d2b74a821 | |
parent | a2bf440057d2fd9ed1bf29a42d253efbf08db4ce (diff) | |
download | sparse-4efeeb73f74194ae81b3243cbfe6cbf5fdbb29d3.tar.gz |
pre-define __unix__ and friends
GCC defines these, so should we.
Signed-off-by: John Levon <john.levon@joyent.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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"); |