#ifndef SIBS_ENV_HPP #define SIBS_ENV_HPP #define OS_FAMILY_WINDOWS 0 #define OS_FAMILY_POSIX 1 #define OS_TYPE_WINDOWS 0 #define OS_TYPE_LINUX 1 #define OS_TYPE_APPLE 2 #define OS_TYPE_OPENBSD 3 #define OS_TYPE_HAIKU 10 #if defined(_WIN32) || defined(_WIN64) #if defined(_WIN64) #define SIBS_ENV_64BIT #else #define SIBS_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 #endif #ifdef __linux__ #define OS_FAMILY OS_FAMILY_POSIX #define OS_TYPE OS_TYPE_LINUX #endif #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 #ifdef __HAIKU__ #define OS_FAMILY OS_FAMILY_POSIX #define OS_TYPE OS_TYPE_HAIKU #endif #ifdef __CYGWIN__ #define OS_FAMILY OS_FAMILY_POSIX #define OS_TYPE OS_TYPE_LINUX #endif #ifdef __EMSCRIPTEN__ #define OS_FAMILY OS_FAMILY_POSIX #define OS_TYPE OS_TYPE_LINUX #endif #if defined(__GNUC__) #if defined(__x86_64__) || defined(__pc64__) #define SIBS_ENV_64BIT #else #define SIBS_ENV_32BIT #endif #endif #if !defined(SIBS_ENV_32BIT) && !defined(SIBS_ENV_64BIT) #error "System is not detected as either 32-bit or 64-bit" #endif #if !defined(OS_FAMILY) #error "System not supported. Only Windows and Posix systems supported right now" #endif #if !defined(OS_TYPE) #error "System not supported. Only Windows, linux, macos and openbsd systems supported right now" #endif #if !defined(DEBUG) && !defined(NDEBUG) #define DEBUG #endif #endif // SIBS_ENV_HPP