| Index: runtime/bin/file_linux.cc
|
| ===================================================================
|
| --- runtime/bin/file_linux.cc (revision 31864)
|
| +++ runtime/bin/file_linux.cc (working copy)
|
| @@ -77,19 +77,19 @@
|
| }
|
|
|
|
|
| -off64_t File::Position() {
|
| +int64_t File::Position() {
|
| ASSERT(handle_->fd() >= 0);
|
| return lseek64(handle_->fd(), 0, SEEK_CUR);
|
| }
|
|
|
|
|
| -bool File::SetPosition(off64_t position) {
|
| +bool File::SetPosition(int64_t position) {
|
| ASSERT(handle_->fd() >= 0);
|
| return lseek64(handle_->fd(), position, SEEK_SET) >= 0;
|
| }
|
|
|
|
|
| -bool File::Truncate(off64_t length) {
|
| +bool File::Truncate(int64_t length) {
|
| ASSERT(handle_->fd() >= 0);
|
| return TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
|
| ftruncate64(handle_->fd(), length) != -1);
|
| @@ -102,7 +102,7 @@
|
| }
|
|
|
|
|
| -off64_t File::Length() {
|
| +int64_t File::Length() {
|
| ASSERT(handle_->fd() >= 0);
|
| struct stat64 st;
|
| if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(fstat64(handle_->fd(), &st)) == 0) {
|
| @@ -135,7 +135,7 @@
|
| return NULL;
|
| }
|
| if (((mode & kWrite) != 0) && ((mode & kTruncate) == 0)) {
|
| - off64_t position = lseek64(fd, 0, SEEK_END);
|
| + int64_t position = lseek64(fd, 0, SEEK_END);
|
| if (position < 0) {
|
| return NULL;
|
| }
|
| @@ -243,8 +243,8 @@
|
| VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(old_fd));
|
| return false;
|
| }
|
| - off64_t offset = 0;
|
| - int result = 1;
|
| + int64_t offset = 0;
|
| + intptr_t result = 1;
|
| while (result > 0) {
|
| // Loop to ensure we copy everything, and not only up to 2GB.
|
| result = TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
|
| @@ -284,7 +284,7 @@
|
| }
|
|
|
|
|
| -off64_t File::LengthFromPath(const char* name) {
|
| +int64_t File::LengthFromPath(const char* name) {
|
| struct stat64 st;
|
| if (TEMP_FAILURE_RETRY_BLOCK_SIGNALS(stat64(name, &st)) == 0) {
|
| return st.st_size;
|
|
|