diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-31 12:34:27 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-31 20:05:52 +0000 |
commit | 83fc223a843b3534961764d269c5e789dc6cb0f7 (patch) | |
tree | f3764d1b09c93d22faa3ee8543fbcf0cd1b1a340 /core/fxcrt/fx_system.h | |
parent | ac66da22f47bd9081652f235754edad59ef876f3 (diff) | |
download | pdfium-83fc223a843b3534961764d269c5e789dc6cb0f7.tar.xz |
Move FX_FILESIZE to fx_system.h
Remove dependency on fx_stream.h from fx_safe_types.h.
We're going to hit cylces in include file dependencies
otherwise when the partition allocator work is landed.
Change-Id: I35bf78038a08599559b959f1403aa0f8fbf87739
Reviewed-on: https://pdfium-review.googlesource.com/3552
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_system.h')
-rw-r--r-- | core/fxcrt/fx_system.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fxcrt/fx_system.h b/core/fxcrt/fx_system.h index a99a18a332..89042daf71 100644 --- a/core/fxcrt/fx_system.h +++ b/core/fxcrt/fx_system.h @@ -77,6 +77,16 @@ extern "C" { // TODO(palmer): it should be a |size_t|, or at least unsigned. typedef int FX_STRSIZE; +// PDFium file sizes match the platform, but PDFium itself does not support +// files larger than 2GB even if the platform does. The value must be signed +// to support -1 error returns. +// TODO(tsepez): support larger files. +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define FX_FILESIZE int32_t +#else // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#define FX_FILESIZE off_t +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + #ifndef ASSERT #ifndef NDEBUG #define ASSERT assert |