diff options
author | Kenny Root <kroot@google.com> | 2010-11-24 12:56:06 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2010-12-08 11:21:30 -0800 |
commit | ddb76c4644756b31be948d70aaa8ee541dd94999 (patch) | |
tree | 782d260d2da982941148be7c1a0a0780749cdfdc /libs/utils/FileMap.cpp | |
parent | 8028a951c3aa74990907efb9376d1093d84084af (diff) |
Change assets to use 64-bit API
The asset system and supporting libraries were using off_t instead of
off64_t to access files larger than 2GB (32-bit signed). This change
replaces all off_t with off64_t and lseek64.
There is a new utils/Compat.h added for Mac OS compatibility.
Also fixed some size-related compiler warnings.
Bug: 3205336
Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
Diffstat (limited to 'libs/utils/FileMap.cpp')
-rw-r--r-- | libs/utils/FileMap.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/utils/FileMap.cpp b/libs/utils/FileMap.cpp index f1f8bdadffeb..c220a9016f79 100644 --- a/libs/utils/FileMap.cpp +++ b/libs/utils/FileMap.cpp @@ -88,11 +88,12 @@ FileMap::~FileMap(void) * * Returns "false" on failure. */ -bool FileMap::create(const char* origFileName, int fd, off_t offset, size_t length, bool readOnly) +bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t length, + bool readOnly) { #ifdef HAVE_WIN32_FILEMAP int adjust; - off_t adjOffset; + off64_t adjOffset; size_t adjLength; if (mPageSize == -1) { @@ -131,7 +132,7 @@ bool FileMap::create(const char* origFileName, int fd, off_t offset, size_t leng #endif #ifdef HAVE_POSIX_FILEMAP int prot, flags, adjust; - off_t adjOffset; + off64_t adjOffset; size_t adjLength; void* ptr; |