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_INCLUDE_FXCRT_FX_SYSTEM_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
9 | 9 |
10 #include <assert.h> | 10 #include <assert.h> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #endif | 85 #endif |
86 | 86 |
87 #ifndef TRUE | 87 #ifndef TRUE |
88 #define TRUE 1 | 88 #define TRUE 1 |
89 #endif | 89 #endif |
90 | 90 |
91 #ifndef FALSE | 91 #ifndef FALSE |
92 #define FALSE 0 | 92 #define FALSE 0 |
93 #endif | 93 #endif |
94 | 94 |
| 95 #ifdef __cplusplus |
| 96 static_assert(TRUE == true, "true_needs_to_be_true"); |
| 97 static_assert(FALSE == false, "false_needs_to_be_false"); |
| 98 #endif |
| 99 |
95 #ifndef NULL | 100 #ifndef NULL |
96 #define NULL 0 | 101 #define NULL 0 |
97 #endif | 102 #endif |
98 | 103 |
99 #define FXSYS_assert assert | 104 #define FXSYS_assert assert |
100 #ifndef ASSERT | 105 #ifndef ASSERT |
101 #ifdef _DEBUG | 106 #ifdef _DEBUG |
102 #define ASSERT FXSYS_assert | 107 #define ASSERT FXSYS_assert |
103 #else | 108 #else |
104 #define ASSERT(a) | 109 #define ASSERT(a) |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 314 |
310 // Prevent a function from ever being inlined, typically because we'd | 315 // Prevent a function from ever being inlined, typically because we'd |
311 // like it to appear in stack traces. | 316 // like it to appear in stack traces. |
312 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 317 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
313 #define NEVER_INLINE __declspec(noinline) | 318 #define NEVER_INLINE __declspec(noinline) |
314 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 319 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
315 #define NEVER_INLINE __attribute__((__noinline__)) | 320 #define NEVER_INLINE __attribute__((__noinline__)) |
316 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 321 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
317 | 322 |
318 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 323 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
OLD | NEW |