aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-01-21 02:19:45 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-01-22 23:24:20 +0100
commit207720e399eca88230e20b82af12ea486618af74 (patch)
tree968f79de38e29feae1b95acebc0fdf5f350d1670
parenteeb1054a7aa52c672ad53bc197e2dc71956f64e4 (diff)
downloadsparse-207720e399eca88230e20b82af12ea486618af74.tar.gz
detect OS_UNIX as native OS
If nothing more specific matches but __unix__ or __unix is defined, use OS_UNIX as the native OS. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--machine.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/machine.h b/machine.h
index 8f02b619..fdd5c68f 100644
--- a/machine.h
+++ b/machine.h
@@ -94,6 +94,7 @@ enum {
OS_NETBSD,
OS_OPENBSD,
OS_SUNOS,
+ OS_UNIX,
OS_UNKNOWN,
};
@@ -111,6 +112,8 @@ enum {
#define OS_NATIVE OS_OPENBSD
#elif defined(__sun__) || defined(__sun)
#define OS_NATIVE OS_SUNOS
+#elif defined(__unix__) || defined(__unix)
+#define OS_UNIX OS_UNIX
#else
#define OS_NATIVE OS_UNKNOWN
#endif