summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-06-11 03:01:11 +0000
committerwtchang%redhat.com <devnull@localhost>2006-06-11 03:01:11 +0000
commitfc594cb0a012b076c56fbb1b91df0ac1f55782df (patch)
treef162bea3ea73e71f0c285e35e6d244a8240b73ff
parentb4d2c99a5c2e11d379e959edd44bd86e4493f200 (diff)
downloadnspr-hg-fc594cb0a012b076c56fbb1b91df0ac1f55782df.tar.gz
Bugzilla Bug 340956: when emulating PR_APPEND, we should use PR_Seek64
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: NSPR_4_6_BRANCH
-rw-r--r--pr/src/io/prfile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c
index cdde160b..d5610bf2 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 */