diff options
author | wtchang%redhat.com <devnull@localhost> | 2006-06-12 20:29:02 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2006-06-12 20:29:02 +0000 |
commit | 8dd48a5b3b6489131d569dc97912a6d1c9443d70 (patch) | |
tree | 63079b3f43583bf6731d4b0311aeea2318491822 | |
parent | d8a8588e64c7fadd5f1e687d66f7d8437ab2a049 (diff) | |
download | nspr-hg-MOZILLA_1_8_0_BRANCH.tar.gz |
Bugzilla Bug 340956: when emulating PR_APPEND, we should use PR_Seek64MOZILLA_1_8_0_BRANCH
instead of PR_Seek, otherwise it won't work on large files. The patch is
contributed by Nils Maier <MaierMan@web.de> and Masatoshi Kimura (:emk)
<VYV03354@nifty.ne.jp>. r=wtc. Thanks to Nils Maier for tracking down the
bug. a=dveditz for approval1.8.0.5+.
Tag: MOZILLA_1_8_0_BRANCH
-rw-r--r-- | pr/src/io/prfile.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c index d91bffa2..cdd6dbfc 100644 --- a/pr/src/io/prfile.c +++ b/pr/src/io/prfile.c @@ -99,10 +99,9 @@ static PRInt32 PR_CALLBACK FileWrite(PRFileDesc *fd, const void *buf, PRInt32 am count = 0; #if !defined(_PR_HAVE_O_APPEND) /* Bugzilla: 4090, 276330 */ - if ( PR_TRUE == fd->secret->appendMode ) { - rv = PR_Seek(fd, 0, PR_SEEK_END ); - if ( -1 == rv ) { - return rv; + if (fd->secret->appendMode) { + if (PR_Seek64(fd, 0, PR_SEEK_END) == -1) { + return -1; } } /* if (fd->secret->appendMode...) */ #endif /* _PR_HAVE_O_APPEND */ |