Loading core/jni/android/graphics/BitmapFactory.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -322,12 +322,12 @@ static jobject nativeDecodeStream(JNIEnv* env, jobject clazz, } static ssize_t getFDSize(int fd) { off_t curr = ::lseek(fd, 0, SEEK_CUR); off64_t curr = ::lseek64(fd, 0, SEEK_CUR); if (curr < 0) { return 0; } size_t size = ::lseek(fd, 0, SEEK_END); ::lseek(fd, curr, SEEK_SET); ::lseek64(fd, curr, SEEK_SET); return size; } Loading Loading @@ -374,8 +374,8 @@ static jobject nativeDecodeFileDescriptor(JNIEnv* env, jobject clazz, */ static SkStream* copyAssetToStream(Asset* asset) { // if we could "ref/reopen" the asset, we may not need to copy it here off_t size = asset->seek(0, SEEK_SET); if ((off_t)-1 == size) { off64_t size = asset->seek(0, SEEK_SET); if ((off64_t)-1 == size) { SkDebugf("---- copyAsset: asset rewind failed\n"); return NULL; } Loading @@ -388,7 +388,7 @@ static SkStream* copyAssetToStream(Asset* asset) { SkStream* stream = new SkMemoryStream(size); void* data = const_cast<void*>(stream->getMemoryBase()); off_t len = asset->read(data, size); off64_t len = asset->read(data, size); if (len != size) { SkDebugf("---- copyAsset: asset->read(%d) returned %d\n", size, len); delete stream; Loading core/jni/android/graphics/Typeface.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -72,8 +72,8 @@ public: virtual bool rewind() { off_t pos = fAsset->seek(0, SEEK_SET); return pos != (off_t)-1; off64_t pos = fAsset->seek(0, SEEK_SET); return pos != (off64_t)-1; } virtual size_t read(void* buffer, size_t size) Loading @@ -88,10 +88,10 @@ public: // asset->seek returns new total offset // we want to return amount that was skipped off_t oldOffset = fAsset->seek(0, SEEK_CUR); off64_t oldOffset = fAsset->seek(0, SEEK_CUR); if (-1 == oldOffset) return 0; off_t newOffset = fAsset->seek(size, SEEK_CUR); off64_t newOffset = fAsset->seek(size, SEEK_CUR); if (-1 == newOffset) return 0; Loading core/jni/android/graphics/Utils.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ using namespace android; bool AssetStreamAdaptor::rewind() { off_t pos = fAsset->seek(0, SEEK_SET); if (pos == (off_t)-1) { off64_t pos = fAsset->seek(0, SEEK_SET); if (pos == (off64_t)-1) { SkDebugf("----- fAsset->seek(rewind) failed\n"); return false; } Loading @@ -38,12 +38,12 @@ size_t AssetStreamAdaptor::read(void* buffer, size_t size) { // asset->seek returns new total offset // we want to return amount that was skipped off_t oldOffset = fAsset->seek(0, SEEK_CUR); off64_t oldOffset = fAsset->seek(0, SEEK_CUR); if (-1 == oldOffset) { SkDebugf("---- fAsset->seek(oldOffset) failed\n"); return 0; } off_t newOffset = fAsset->seek(size, SEEK_CUR); off64_t newOffset = fAsset->seek(size, SEEK_CUR); if (-1 == newOffset) { SkDebugf("---- fAsset->seek(%d) failed\n", size); return 0; Loading core/jni/android/graphics/Utils.h +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public: } private: int fFD; off_t fCurr; off64_t fCurr; }; jobject nullObjectReturn(const char msg[]); Loading core/jni/android_util_AssetManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ static jint android_content_AssetManager_openAsset(JNIEnv* env, jobject clazz, static jobject returnParcelFileDescriptor(JNIEnv* env, Asset* a, jlongArray outOffsets) { off_t startOffset, length; off64_t startOffset, length; int fd = a->openFileDescriptor(&startOffset, &length); delete a; Loading Loading
core/jni/android/graphics/BitmapFactory.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -322,12 +322,12 @@ static jobject nativeDecodeStream(JNIEnv* env, jobject clazz, } static ssize_t getFDSize(int fd) { off_t curr = ::lseek(fd, 0, SEEK_CUR); off64_t curr = ::lseek64(fd, 0, SEEK_CUR); if (curr < 0) { return 0; } size_t size = ::lseek(fd, 0, SEEK_END); ::lseek(fd, curr, SEEK_SET); ::lseek64(fd, curr, SEEK_SET); return size; } Loading Loading @@ -374,8 +374,8 @@ static jobject nativeDecodeFileDescriptor(JNIEnv* env, jobject clazz, */ static SkStream* copyAssetToStream(Asset* asset) { // if we could "ref/reopen" the asset, we may not need to copy it here off_t size = asset->seek(0, SEEK_SET); if ((off_t)-1 == size) { off64_t size = asset->seek(0, SEEK_SET); if ((off64_t)-1 == size) { SkDebugf("---- copyAsset: asset rewind failed\n"); return NULL; } Loading @@ -388,7 +388,7 @@ static SkStream* copyAssetToStream(Asset* asset) { SkStream* stream = new SkMemoryStream(size); void* data = const_cast<void*>(stream->getMemoryBase()); off_t len = asset->read(data, size); off64_t len = asset->read(data, size); if (len != size) { SkDebugf("---- copyAsset: asset->read(%d) returned %d\n", size, len); delete stream; Loading
core/jni/android/graphics/Typeface.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -72,8 +72,8 @@ public: virtual bool rewind() { off_t pos = fAsset->seek(0, SEEK_SET); return pos != (off_t)-1; off64_t pos = fAsset->seek(0, SEEK_SET); return pos != (off64_t)-1; } virtual size_t read(void* buffer, size_t size) Loading @@ -88,10 +88,10 @@ public: // asset->seek returns new total offset // we want to return amount that was skipped off_t oldOffset = fAsset->seek(0, SEEK_CUR); off64_t oldOffset = fAsset->seek(0, SEEK_CUR); if (-1 == oldOffset) return 0; off_t newOffset = fAsset->seek(size, SEEK_CUR); off64_t newOffset = fAsset->seek(size, SEEK_CUR); if (-1 == newOffset) return 0; Loading
core/jni/android/graphics/Utils.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ using namespace android; bool AssetStreamAdaptor::rewind() { off_t pos = fAsset->seek(0, SEEK_SET); if (pos == (off_t)-1) { off64_t pos = fAsset->seek(0, SEEK_SET); if (pos == (off64_t)-1) { SkDebugf("----- fAsset->seek(rewind) failed\n"); return false; } Loading @@ -38,12 +38,12 @@ size_t AssetStreamAdaptor::read(void* buffer, size_t size) { // asset->seek returns new total offset // we want to return amount that was skipped off_t oldOffset = fAsset->seek(0, SEEK_CUR); off64_t oldOffset = fAsset->seek(0, SEEK_CUR); if (-1 == oldOffset) { SkDebugf("---- fAsset->seek(oldOffset) failed\n"); return 0; } off_t newOffset = fAsset->seek(size, SEEK_CUR); off64_t newOffset = fAsset->seek(size, SEEK_CUR); if (-1 == newOffset) { SkDebugf("---- fAsset->seek(%d) failed\n", size); return 0; Loading
core/jni/android/graphics/Utils.h +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public: } private: int fFD; off_t fCurr; off64_t fCurr; }; jobject nullObjectReturn(const char msg[]); Loading
core/jni/android_util_AssetManager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ static jint android_content_AssetManager_openAsset(JNIEnv* env, jobject clazz, static jobject returnParcelFileDescriptor(JNIEnv* env, Asset* a, jlongArray outOffsets) { off_t startOffset, length; off64_t startOffset, length; int fd = a->openFileDescriptor(&startOffset, &length); delete a; Loading