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 _FX_SYSTEM_H_ | 7 #ifndef _FX_SYSTEM_H_ |
8 #define _FX_SYSTEM_H_ | 8 #define _FX_SYSTEM_H_ |
| 9 |
9 #define _FX_WIN32_DESKTOP_ 1 | 10 #define _FX_WIN32_DESKTOP_ 1 |
10 #define _FX_LINUX_DESKTOP_ 4 | 11 #define _FX_LINUX_DESKTOP_ 4 |
11 #define _FX_MACOSX_ 7 | 12 #define _FX_MACOSX_ 7 |
12 #define _FX_ANDROID_ 12 | 13 #define _FX_ANDROID_ 12 |
| 14 |
13 #define _FXM_PLATFORM_WINDOWS_ 1 | 15 #define _FXM_PLATFORM_WINDOWS_ 1 |
14 #define _FXM_PLATFORM_LINUX_ 2 | 16 #define _FXM_PLATFORM_LINUX_ 2 |
15 #define _FXM_PLATFORM_APPLE_ 3 | 17 #define _FXM_PLATFORM_APPLE_ 3 |
16 #define _FXM_PLATFORM_ANDROID_ 4 | 18 #define _FXM_PLATFORM_ANDROID_ 4 |
17 | 19 |
18 #ifndef _FX_OS_ | 20 #ifndef _FX_OS_ |
19 #if defined(__ANDROID__) | 21 #if defined(__ANDROID__) |
20 #define _FX_OS_ _FX_ANDROID_ | 22 #define _FX_OS_ _FX_ANDROID_ |
21 #define _FXM_PLATFORM_ _FXM_PLATFORM_ANDROID_ | 23 #define _FXM_PLATFORM_ _FXM_PLATFORM_ANDROID_ |
22 #elif defined(_WIN32) || defined(_WIN64) | 24 #elif defined(_WIN32) || defined(_WIN64) |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 #if !defined(__STDC_FORMAT_MACROS) | 336 #if !defined(__STDC_FORMAT_MACROS) |
335 #define __STDC_FORMAT_MACROS | 337 #define __STDC_FORMAT_MACROS |
336 #endif | 338 #endif |
337 | 339 |
338 #include <inttypes.h> | 340 #include <inttypes.h> |
339 | 341 |
340 #if !defined(PRIuS) | 342 #if !defined(PRIuS) |
341 #define PRIuS "zu" | 343 #define PRIuS "zu" |
342 #endif | 344 #endif |
343 | 345 |
344 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 346 #else // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
345 | 347 |
346 #if !defined(PRIuS) | 348 #if !defined(PRIuS) |
347 #define PRIuS "Iu" | 349 #define PRIuS "Iu" |
348 #endif | 350 #endif |
349 | 351 |
350 #endif | 352 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
351 | 353 |
352 #endif | 354 // Prevent a function from ever being inlined, typically because we'd |
| 355 // like it to appear in stack traces. |
| 356 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 357 #define NEVER_INLINE __declspec(noinline) |
| 358 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 359 #define NEVER_INLINE __attribute__((__noinline__)) |
| 360 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 361 |
| 362 #endif // _FX_SYSTEM_H_ |
OLD | NEW |