diff options
| -rw-r--r-- | include/config.h.in | 18 | ||||
| -rw-r--r-- | include/utils.h | 2 | 
2 files changed, 19 insertions, 1 deletions
| diff --git a/include/config.h.in b/include/config.h.in index 85e1a2f..882f848 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -3,4 +3,22 @@  #define OMC_SYSCONFDIR "@SYSCONFDIR@/omc" +#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) +#define OMC_OS_WINDOWS + +#elif defined(__linux__) +#define OMC_OS_LINUX + +#elif defined(unix) || defined(__unix__) || defined(__unix) +#define OMC_OS_UNIX + +#elif defined(__APPLE_) && defined(__MACH__) +#define OMC_OS_DARWIN + +#else +#define OMC_OS_UNKNOWN +#error Operating system unknown/unsupported + +#endif // OS detection +  #endif // OMC_CONFIG_H
\ No newline at end of file diff --git a/include/utils.h b/include/utils.h index c5930d5..4816a31 100644 --- a/include/utils.h +++ b/include/utils.h @@ -9,7 +9,7 @@  #include <errno.h>  #include "system.h" -#if defined(__WIN32__) +#if defined(OMC_OS_WINDOWS)  #define PATH_ENV_VAR "path"  #define DIR_SEP "\\"  #define PATH_SEP ";" | 
