diff options
author | dec05eba <dec05eba@protonmail.com> | 2017-12-30 05:33:25 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2017-12-30 05:33:25 +0100 |
commit | 7c215c39d530f01235043a131d64d4c7f766e9ab (patch) | |
tree | d72effe043a46566e34276525081637cad1bb7a0 /include/env.hpp | |
parent | abab2184ade33097f3441f8cdd95dd27c5653930 (diff) | |
parent | 98ad7dd049a366e21d60a34548736a3c8ef72877 (diff) |
Merge release_0.1.0 to master
Add support for windows
Diffstat (limited to 'include/env.hpp')
-rw-r--r-- | include/env.hpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/include/env.hpp b/include/env.hpp index f5b1213..51ee2bd 100644 --- a/include/env.hpp +++ b/include/env.hpp @@ -4,6 +4,9 @@ #define OS_FAMILY_WINDOWS 0 #define OS_FAMILY_POSIX 1 +#define OS_TYPE_WINDOWS 0 +#define OS_TYPE_LINUX 1 + #if defined(_WIN32) || defined(_WIN64) #if defined(_WIN64) #define CISB_ENV_64BIT @@ -11,12 +14,31 @@ #define CISB_ENV_32BIT #endif #define OS_FAMILY OS_FAMILY_WINDOWS + #define OS_TYPE OS_TYPE_WINDOWS + + #ifndef UNICODE + #define UNICODE + #endif + + #ifndef _UNICODE + #define _UNICODE + #endif + + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + + #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_TYPE OS_TYPE_LINUX +#endif + #if defined(__GNUC__) #if defined(__x86_64__) || defined(__pc64__) #define CISB_ENV_64BIT @@ -30,7 +52,11 @@ #endif #if !defined(OS_FAMILY) - #error "System not support. Only Windows and Posix systems support" + #error "System not supported. Only Windows and Posix systems supported right now" +#endif + +#if !defined(OS_TYPE) + #error "System not supported. Only Windows and linux systems supported right now" #endif #if !defined(DEBUG) && !defined(NDEBUG) |