summaryrefslogtreecommitdiffstats
path: root/HostPlatform.h
blob: e66ff0f2f13247184c4dfd6b2121642cf81eb21b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef HOSTPLATFORM_H_
#define HOSTPLATFORM_H_

#ifdef _WIN32
// Windows host platform
#define HOST_IS_WINDOWS
#elif defined (__APPLE__) || defined(__linux__) || defined(__linux) || defined(__GNU__) || defined(__sun) || defined(sun) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
// Posix host platform
#define HOST_IS_POSIX
#endif

inline bool hostIsWindows()
{
#ifdef HOST_IS_WINDOWS
	return true;
#else
	return false;
#endif
}

inline bool hostIsPosix()
{
#ifdef HOST_IS_POSIX
	return true;
#else
	return false;
#endif
}

#endif