diff options
-rw-r--r-- | include/cru/common/platform/osx/Convert.h | 7 | ||||
-rw-r--r-- | include/cru/common/platform/osx/Exception.h | 7 | ||||
-rw-r--r-- | include/cru/common/platform/unix/UnixFileStream.h | 6 | ||||
-rw-r--r-- | include/cru/common/platform/unix/UnixPipe.h | 6 |
4 files changed, 14 insertions, 12 deletions
diff --git a/include/cru/common/platform/osx/Convert.h b/include/cru/common/platform/osx/Convert.h index 503576be..395cbbae 100644 --- a/include/cru/common/platform/osx/Convert.h +++ b/include/cru/common/platform/osx/Convert.h @@ -1,6 +1,9 @@ #pragma once #include "../../PreConfig.h" -#ifdef CRU_PLATFORM_OSX + +#ifndef CRU_PLATFORM_OSX +#error "This file can only be included on osx." +#endif #include "../../String.h" @@ -13,5 +16,3 @@ String Convert(CFStringRef string); CFRange Convert(const Range& range); Range Convert(const CFRange& range); } // namespace cru::platform::osx - -#endif diff --git a/include/cru/common/platform/osx/Exception.h b/include/cru/common/platform/osx/Exception.h index 53e874e9..5ab14ebd 100644 --- a/include/cru/common/platform/osx/Exception.h +++ b/include/cru/common/platform/osx/Exception.h @@ -1,6 +1,9 @@ #pragma once #include "../../PreConfig.h" -#ifdef CRU_PLATFORM_OSX + +#ifndef CRU_PLATFORM_OSX +#error "This file can only be included on osx." +#endif #include "../Exception.h" @@ -10,5 +13,3 @@ class OsxException : public PlatformException { using PlatformException::PlatformException; }; } // namespace cru::platform::osx - -#endif diff --git a/include/cru/common/platform/unix/UnixFileStream.h b/include/cru/common/platform/unix/UnixFileStream.h index 06b45d08..43615776 100644 --- a/include/cru/common/platform/unix/UnixFileStream.h +++ b/include/cru/common/platform/unix/UnixFileStream.h @@ -2,7 +2,9 @@ #include "../../PreConfig.h" -#ifdef CRU_PLATFORM_UNIX +#ifndef CRU_PLATFORM_UNIX +#error "This file can only be included on unix." +#endif #include "../../io/Stream.h" @@ -48,5 +50,3 @@ class UnixFileStream : public io::Stream { bool auto_close_; }; } // namespace cru::platform::unix - -#endif diff --git a/include/cru/common/platform/unix/UnixPipe.h b/include/cru/common/platform/unix/UnixPipe.h index 2ea80bde..afe6024a 100644 --- a/include/cru/common/platform/unix/UnixPipe.h +++ b/include/cru/common/platform/unix/UnixPipe.h @@ -2,7 +2,9 @@ #include "../../PreConfig.h" -#ifdef CRU_PLATFORM_UNIX +#ifndef CRU_PLATFORM_UNIX +#error "This file can only be included on unix." +#endif #include "../../Base.h" #include "../../Bitmask.h" @@ -65,5 +67,3 @@ class UnixPipe : public Object { int write_fd_; }; } // namespace cru::platform::unix - -#endif |