diff options
Diffstat (limited to 'include/cru/common')
-rw-r--r-- | include/cru/common/ErrnoException.hpp | 6 | ||||
-rw-r--r-- | include/cru/common/PreConfig.hpp | 4 | ||||
-rw-r--r-- | include/cru/common/io/UnixFileStream.hpp | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/cru/common/ErrnoException.hpp b/include/cru/common/ErrnoException.hpp index 6feb1aca..d1390cf2 100644 --- a/include/cru/common/ErrnoException.hpp +++ b/include/cru/common/ErrnoException.hpp @@ -1,5 +1,9 @@ #pragma once +#include "PreConfig.hpp" + +#ifdef CRU_PLATFORM_UNIX + #include "Exception.hpp" namespace cru { @@ -20,3 +24,5 @@ class ErrnoException : public Exception { int errno_code_; }; } // namespace cru + +#endif diff --git a/include/cru/common/PreConfig.hpp b/include/cru/common/PreConfig.hpp index 6011dc54..ba0f5bd8 100644 --- a/include/cru/common/PreConfig.hpp +++ b/include/cru/common/PreConfig.hpp @@ -10,3 +10,7 @@ #ifdef CRU_PLATFORM_WINDOWS #define _CRT_SECURE_NO_WARNINGS #endif + +#if defined(CRU_PLATFORM_OSX) || defined(CRU_PLATFORM_LINUX) +#define CRU_PLATFORM_UNIX +#endif diff --git a/include/cru/common/io/UnixFileStream.hpp b/include/cru/common/io/UnixFileStream.hpp index c8c3fe52..afeab184 100644 --- a/include/cru/common/io/UnixFileStream.hpp +++ b/include/cru/common/io/UnixFileStream.hpp @@ -1,5 +1,9 @@ #pragma once +#include "../PreConfig.hpp" + +#ifdef CRU_PLATFORM_UNIX + #include "../String.hpp" #include "OpenFileFlag.hpp" #include "Stream.hpp" @@ -39,3 +43,5 @@ class UnixFileStream : public Stream { bool closed_ = false; }; } // namespace cru::io + +#endif |