diff options
author | wtchang%redhat.com <devnull@localhost> | 2006-06-11 02:58:08 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2006-06-11 02:58:08 +0000 |
commit | 9a5f452eb9f4cafd459fbfbbe28b8ad6d99f985e (patch) | |
tree | fba3ca21450fe49308b968be4a64374d4c0d22e9 | |
parent | f4ceb15022b94cd81d86eb343e95ac18c230924e (diff) | |
download | nspr-hg-9a5f452eb9f4cafd459fbfbbe28b8ad6d99f985e.tar.gz |
Bugzilla Bug 340956: when emulating PR_APPEND, we should use PR_Seek64DOM_AGNOSTIC3_PRE_MERGEDOM_AGNOSTIC3_BASE3
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.
Tag: NSPRPUB_PRE_4_2_CLIENT_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 5b4c0742..545fa712 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 */ |