aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-11-17 22:18:42 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-11-17 22:18:42 +0000
commit8f4dfcaa1fa1f21e16a4759693fe735568bb138f (patch)
tree10d2f2f773d0afd26dfb7c25486d01c4d6db8936
parenta2f1155cf2c41e8a388faba9e1609adc2fea0255 (diff)
downloadnewlib-8f4dfcaa1fa1f21e16a4759693fe735568bb138f.zip
newlib-8f4dfcaa1fa1f21e16a4759693fe735568bb138f.tar.gz
newlib-8f4dfcaa1fa1f21e16a4759693fe735568bb138f.tar.bz2
* fhandler.cc (fhandler_base::lseek): Include high order offset
bits in return value.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c3fe0a0..9884d80 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-17 Brian Ford <ford@vss.fsi.com>
+
+ * fhandler.cc (fhandler_base::lseek): Include high order offset
+ bits in return value.
+
2003-11-17 Corinna Vinschen <corinna@vinschen.de>
* bsdlib.cc (getprogname): New function.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 834ea5f..b27ab67 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -874,6 +874,9 @@ fhandler_base::lseek (_off64_t offset, int whence)
}
else
{
+ if (poff_high)
+ res += (_off64_t) *poff_high << 32;
+
/* When next we write(), we will check to see if *this* seek went beyond
the end of the file, and back-seek and fill with zeros if so - DJ */
set_did_lseek ();