OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ |
8 #define CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ |
9 | 9 |
10 #include <assert.h> | 10 #include <assert.h> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 #ifndef FALSE | 85 #ifndef FALSE |
86 #define FALSE 0 | 86 #define FALSE 0 |
87 #endif | 87 #endif |
88 | 88 |
89 #ifdef __cplusplus | 89 #ifdef __cplusplus |
90 static_assert(TRUE == true, "true_needs_to_be_true"); | 90 static_assert(TRUE == true, "true_needs_to_be_true"); |
91 static_assert(FALSE == false, "false_needs_to_be_false"); | 91 static_assert(FALSE == false, "false_needs_to_be_false"); |
92 #endif | 92 #endif |
93 | 93 |
94 #ifndef NULL | |
95 #define NULL 0 | |
96 #endif | |
97 | |
98 #ifndef ASSERT | 94 #ifndef ASSERT |
99 #ifndef NDEBUG | 95 #ifndef NDEBUG |
100 #define ASSERT assert | 96 #define ASSERT assert |
101 #else | 97 #else |
102 #define ASSERT(a) | 98 #define ASSERT(a) |
103 #endif | 99 #endif |
104 #endif | 100 #endif |
105 | 101 |
106 #if defined(__clang__) || defined(__GNUC__) | 102 #if defined(__clang__) || defined(__GNUC__) |
107 #define PDFIUM_IMMEDIATE_CRASH() __builtin_trap() | 103 #define PDFIUM_IMMEDIATE_CRASH() __builtin_trap() |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 | 328 |
333 // Prevent a function from ever being inlined, typically because we'd | 329 // Prevent a function from ever being inlined, typically because we'd |
334 // like it to appear in stack traces. | 330 // like it to appear in stack traces. |
335 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 331 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
336 #define NEVER_INLINE __declspec(noinline) | 332 #define NEVER_INLINE __declspec(noinline) |
337 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 333 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
338 #define NEVER_INLINE __attribute__((__noinline__)) | 334 #define NEVER_INLINE __attribute__((__noinline__)) |
339 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 335 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
340 | 336 |
341 #endif // CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ | 337 #endif // CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ |
OLD | NEW |