From 18092ddc866425598abf4521d9ed4eda9573fdaa Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 24 Nov 2010 12:56:06 -0800 Subject: 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 --- libs/utils/FileMap.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libs/utils/FileMap.cpp') diff --git a/libs/utils/FileMap.cpp b/libs/utils/FileMap.cpp index f1f8bdadff..c220a9016f 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; -- cgit v1.2.3-59-g8ed1b