-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Cleanup preprocessor usage (#61)
- Loading branch information
Showing
18 changed files
with
134 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
#if defined(_MSC_VER) | ||
#define SAFETYHOOK_COMPILER_MSVC 1 | ||
#define SAFETYHOOK_COMPILER_GCC 0 | ||
#define SAFETYHOOK_COMPILER_CLANG 0 | ||
#elif defined(__GNUC__) | ||
#define SAFETYHOOK_COMPILER_MSVC 0 | ||
#define SAFETYHOOK_COMPILER_GCC 1 | ||
#define SAFETYHOOK_COMPILER_CLANG 0 | ||
#elif defined(__clang__) | ||
#define SAFETYHOOK_COMPILER_MSVC 0 | ||
#define SAFETYHOOK_COMPILER_GCC 0 | ||
#define SAFETYHOOK_COMPILER_CLANG 1 | ||
#else | ||
#error "Unsupported compiler" | ||
#endif | ||
|
||
#if SAFETYHOOK_COMPILER_MSVC | ||
#if defined(_M_IX86) | ||
#define SAFETYHOOK_ARCH_X86_32 1 | ||
#define SAFETYHOOK_ARCH_X86_64 0 | ||
#elif defined(_M_X64) | ||
#define SAFETYHOOK_ARCH_X86_32 0 | ||
#define SAFETYHOOK_ARCH_X86_64 1 | ||
#else | ||
#error "Unsupported architecture" | ||
#endif | ||
#elif SAFETYHOOK_COMPILER_GCC || SAFETYHOOK_COMPILER_CLANG | ||
#if defined(__i386__) | ||
#define SAFETYHOOK_ARCH_X86_32 1 | ||
#define SAFETYHOOK_ARCH_X86_64 0 | ||
#elif defined(__x86_64__) | ||
#define SAFETYHOOK_ARCH_X86_32 0 | ||
#define SAFETYHOOK_ARCH_X86_64 1 | ||
#else | ||
#error "Unsupported architecture" | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.