Skip to content

Commit

Permalink
add defined() for WIN32 and _MSC_VER
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik van der Heijden committed Aug 28, 2015
1 parent 2acfcd8 commit 43ece80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/mpack/mpack-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void mpack_assert_fail(const char* message) {

#if defined(__GCC__) || defined(__clang__)
__builtin_trap();
#elif WIN32
#elif defined(WIN32)
__debugbreak();
#endif

Expand All @@ -89,7 +89,7 @@ void mpack_break_hit(const char* message) {

#if defined(__GCC__) || defined(__clang__)
__builtin_trap();
#elif WIN32
#elif defined(WIN32)
__debugbreak();
#elif MPACK_STDLIB
abort();
Expand Down
2 changes: 1 addition & 1 deletion src/mpack/mpack-platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ extern "C" {
#define MPACK_UNREACHABLE __builtin_unreachable()
#define MPACK_NORETURN(fn) fn __attribute__((noreturn))
#define MPACK_ALWAYS_INLINE __attribute__((always_inline)) static inline
#elif _MSC_VER
#elif defined(_MSC_VER)
#define MPACK_UNREACHABLE __assume(0)
#define MPACK_NORETURN(fn) __declspec(noreturn) fn
#define MPACK_ALWAYS_INLINE __forceinline static
Expand Down

0 comments on commit 43ece80

Please sign in to comment.