Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
OsDetection.h
Go to the documentation of this file.
1#ifndef STORM_UTILITY_OSDETECTION_H_
2#define STORM_UTILITY_OSDETECTION_H_
3
4#if defined __linux__ || defined __linux
5#define LINUX
6#define NOEXCEPT noexcept
7#include <cxxabi.h> // Required by ErrorHandling.h
8#include <execinfo.h> // Required by ErrorHandling.h
9#include <sys/mman.h>
10#include <sys/resource.h> // Required by storm.cpp, Memory Usage
11#include <sys/time.h> // Required by storm.cpp, Memory Usage
12#include <unistd.h>
13#define GetCurrentDir getcwd
14#elif defined TARGET_OS_MAC || defined __apple__ || defined __APPLE__
15#define MACOSX
16#define MACOS
17#define NOEXCEPT noexcept
18#define _DARWIN_USE_64_BIT_INODE
19#ifdef __arm64__
20#define APPLE_SILICON
21#endif
22#include <cxxabi.h> // Required by ErrorHandling.h
23#include <execinfo.h> // Required by ErrorHandling.h
24#include <sys/mman.h>
25#include <sys/resource.h> // Required by storm.cpp, Memory Usage
26#include <sys/time.h> // Required by storm.cpp, Memory Usage
27#include <unistd.h>
28#define GetCurrentDir getcwd
29#elif defined _WIN32 || defined _WIN64
30#define WINDOWS
31#define NOEXCEPT throw()
32#ifndef NOMINMAX
33#define NOMINMAX
34#undef min
35#undef max
36#endif
37#include <DbgHelp.h>
38#include <Psapi.h>
39#include <Windows.h>
40#include <direct.h>
41#include <winnt.h>
42#define strncpy strncpy_s
43#define sscanf sscanf_s
44#define GetCurrentDir _getcwd
45
46// This disables Warning C4250 - Diamond Inheritance Dominance
47#pragma warning(disable : 4250)
48
49#else
50#error Could not detect Operating System
51#endif
52
53#endif // STORM_UTILITY_OSDETECTION_H_