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 #else | |
99 static_assert(TRUE == 1, "true_needs_to_be_one"); | |
Tom Sepez
2015/10/15 17:08:31
If it's not C++, we don't get static_assert, do we
Lei Zhang
2015/10/19 08:56:18
I'll just drop this then.
| |
100 static_assert(FALSE == 0, "false_needs_to_be_zero"); | |
101 #endif | |
102 | |
95 #ifndef NULL | 103 #ifndef NULL |
96 #define NULL 0 | 104 #define NULL 0 |
97 #endif | 105 #endif |
98 | 106 |
99 #define FXSYS_assert assert | 107 #define FXSYS_assert assert |
100 #ifndef ASSERT | 108 #ifndef ASSERT |
101 #ifdef _DEBUG | 109 #ifdef _DEBUG |
102 #define ASSERT FXSYS_assert | 110 #define ASSERT FXSYS_assert |
103 #else | 111 #else |
104 #define ASSERT(a) | 112 #define ASSERT(a) |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 | 317 |
310 // Prevent a function from ever being inlined, typically because we'd | 318 // Prevent a function from ever being inlined, typically because we'd |
311 // like it to appear in stack traces. | 319 // like it to appear in stack traces. |
312 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 320 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
313 #define NEVER_INLINE __declspec(noinline) | 321 #define NEVER_INLINE __declspec(noinline) |
314 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 322 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
315 #define NEVER_INLINE __attribute__((__noinline__)) | 323 #define NEVER_INLINE __attribute__((__noinline__)) |
316 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 324 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
317 | 325 |
318 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 326 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ |
OLD | NEW |