| 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_FXCRT_INCLUDE_FX_SYSTEM_H_ |
| 8 #define CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ |
| 9 | 9 |
| 10 #include <assert.h> | 10 #include <assert.h> |
| 11 #include <math.h> | 11 #include <math.h> |
| 12 #include <stdarg.h> | 12 #include <stdarg.h> |
| 13 #include <stddef.h> | 13 #include <stddef.h> |
| 14 #include <stdint.h> | 14 #include <stdint.h> |
| 15 #include <stdio.h> | 15 #include <stdio.h> |
| 16 #include <stdlib.h> | 16 #include <stdlib.h> |
| 17 #include <string.h> | 17 #include <string.h> |
| 18 #include <wchar.h> | 18 #include <wchar.h> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ | 62 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ |
| 63 #include <Carbon/Carbon.h> | 63 #include <Carbon/Carbon.h> |
| 64 #include <libkern/OSAtomic.h> | 64 #include <libkern/OSAtomic.h> |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 #ifdef __cplusplus | 67 #ifdef __cplusplus |
| 68 extern "C" { | 68 extern "C" { |
| 69 #endif | 69 #endif |
| 70 typedef void* FX_POSITION; // Keep until fxcrt containers gone | 70 typedef void* FX_POSITION; // Keep until fxcrt containers gone |
| 71 typedef uint32_t FX_DWORD; // Keep - "an efficient type" | 71 typedef uint32_t FX_DWORD; // Keep - "an efficient type" |
| 72 typedef float FX_FLOAT; // Keep, allow upgrade to doubles. | 72 typedef float FX_FLOAT; // Keep, allow upgrade to doubles. |
| 73 typedef double FX_DOUBLE; // Keep, allow downgrade to floats. | 73 typedef double FX_DOUBLE; // Keep, allow downgrade to floats. |
| 74 typedef int FX_BOOL; // Keep, sadly not always 0 or 1. | 74 typedef int FX_BOOL; // Keep, sadly not always 0 or 1. |
| 75 typedef char FX_CHAR; // Keep, questionable signedness. | 75 typedef char FX_CHAR; // Keep, questionable signedness. |
| 76 typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. | 76 typedef wchar_t FX_WCHAR; // Keep, maybe bad platform wchars. |
| 77 | 77 |
| 78 // PDFium string sizes are limited to 2^31-1, and the value is signed to | 78 // PDFium string sizes are limited to 2^31-1, and the value is signed to |
| 79 // allow -1 as a placeholder for "unknown". | 79 // allow -1 as a placeholder for "unknown". |
| 80 // TODO(palmer): it should be a |size_t|, or at least unsigned. | 80 // TODO(palmer): it should be a |size_t|, or at least unsigned. |
| 81 typedef int FX_STRSIZE; | 81 typedef int FX_STRSIZE; |
| 82 | 82 |
| 83 #ifndef TRUE | 83 #ifndef TRUE |
| 84 #define TRUE 1 | 84 #define TRUE 1 |
| 85 #endif | 85 #endif |
| 86 | 86 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 310 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 311 | 311 |
| 312 // Prevent a function from ever being inlined, typically because we'd | 312 // Prevent a function from ever being inlined, typically because we'd |
| 313 // like it to appear in stack traces. | 313 // like it to appear in stack traces. |
| 314 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 314 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 315 #define NEVER_INLINE __declspec(noinline) | 315 #define NEVER_INLINE __declspec(noinline) |
| 316 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 316 #else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 317 #define NEVER_INLINE __attribute__((__noinline__)) | 317 #define NEVER_INLINE __attribute__((__noinline__)) |
| 318 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 318 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 319 | 319 |
| 320 #endif // CORE_INCLUDE_FXCRT_FX_SYSTEM_H_ | 320 #endif // CORE_FXCRT_INCLUDE_FX_SYSTEM_H_ |
| OLD | NEW |