aboutsummaryrefslogtreecommitdiff
path: root/include/env.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/env.hpp')
-rw-r--r--include/env.hpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/env.hpp b/include/env.hpp
index fa9c860..33e8068 100644
--- a/include/env.hpp
+++ b/include/env.hpp
@@ -7,6 +7,7 @@
#define OS_TYPE_WINDOWS 0
#define OS_TYPE_LINUX 1
#define OS_TYPE_APPLE 2
+#define OS_TYPE_OPENBSD 2
#if defined(_WIN32) || defined(_WIN64)
#if defined(_WIN64)
@@ -32,18 +33,21 @@
#include <Windows.h>
#endif
-#if defined(__linux__) || defined(__unix__) || defined(__APPLE__) || defined(_POSIX_VERSION)
- #define OS_FAMILY OS_FAMILY_POSIX
-#endif
-
#ifdef __linux__
+ #define OS_FAMILY OS_FAMILY_POSIX
#define OS_TYPE OS_TYPE_LINUX
#endif
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__MACOSX__)
+ #define OS_FAMILY OS_FAMILY_POSIX
#define OS_TYPE OS_TYPE_APPLE
#endif
+#ifdef __OpenBSD__
+ #define OS_FAMILY OS_FAMILY_POSIX
+ #define OS_TYPE OS_TYPE_OPENBSD
+#endif
+
#if defined(__GNUC__)
#if defined(__x86_64__) || defined(__pc64__)
#define SIBS_ENV_64BIT
@@ -61,7 +65,7 @@
#endif
#if !defined(OS_TYPE)
- #error "System not supported. Only Windows and linux systems supported right now"
+ #error "System not supported. Only Windows, linux, macos and openbsd systems supported right now"
#endif
#if !defined(DEBUG) && !defined(NDEBUG)