summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/base/logging.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/third_party/base/logging.h b/third_party/base/logging.h
index 98ed9c5da0..bf4faea57e 100644
--- a/third_party/base/logging.h
+++ b/third_party/base/logging.h
@@ -8,10 +8,17 @@
#include <assert.h>
#include <stdlib.h>
-#define CHECK(condition) \
- if (!(condition)) { \
- abort(); \
- *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42; \
+#ifndef _WIN32
+#define NULL_DEREF_IF_POSSIBLE \
+ *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42;
+#else
+#define NULL_DEREF_IF_POSSIBLE
+#endif
+
+#define CHECK(condition) \
+ if (!(condition)) { \
+ abort(); \
+ NULL_DEREF_IF_POSSIBLE \
}
#define NOTREACHED() assert(false)