diff options
author | Christopher Faylor <me@cgf.cx> | 2006-08-19 21:44:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-08-19 21:44:58 +0000 |
commit | ffa6849093a4f4051bc3052e40db31b282164869 (patch) | |
tree | 80ab1b738ea19dbe1dc64fe04e0ef66dda8898bf | |
parent | a0922fcb048fb8c4c1cc59db5740f1e599287d16 (diff) | |
download | cygnal-ffa6849093a4f4051bc3052e40db31b282164869.tar.gz cygnal-ffa6849093a4f4051bc3052e40db31b282164869.tar.bz2 cygnal-ffa6849093a4f4051bc3052e40db31b282164869.zip |
* fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
non-error return from lseek.
-rw-r--r-- | winsup/cygwin/ChangeLog | 11 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e3c31d59f..12515a880 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2006-08-20 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp> + + * fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for + non-error return from lseek. + 2006-08-17 Corinna Vinschen <corinna@vinschen.de> * fhandler_serial.cc (raw_read): Evaluate minchars taking the @@ -66,7 +71,7 @@ method. * include/fcntl.h: Add POSIX_FADV_* flags. Add declarations of posix_fadvise and posix_fallocate. - * include/cygwin/version.h: Bump API minor number. + * include/cygwin/version.h: Bump API minor number. 2006-08-02 Christopher Faylor <cgf@timesys.com> @@ -112,7 +117,7 @@ 2006-07-31 Corinna Vinschen <corinna@vinschen.de> * autoload.cc: Drop LoadDLLprime for wsock32 since no wsock32 function - is used anymore. Drop all unused ws2_32.dll functions. + is used anymore. Drop all unused ws2_32.dll functions. 2006-07-28 Corinna Vinschen <corinna@vinschen.de> @@ -546,7 +551,7 @@ (cygwin_accept): Ditto. * poll.cc (poll): Don't call recvfrom on a listening socket. Remove special case for failing recvfrom. - * include/sys/socket.h: Declare recv* and send* functions ssize_t as + * include/sys/socket.h: Declare recv* and send* functions ssize_t as requested by POSIX. 2006-07-10 Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index e1a4887ee..6a79d9e77 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1216,7 +1216,7 @@ fhandler_disk_file::pread (void *buf, size_t count, _off64_t offset) { size_t tmp_count = count; read (buf, tmp_count); - if (lseek (curpos, SEEK_SET) == 0) + if (lseek (curpos, SEEK_SET) >= 0) res = (ssize_t) tmp_count; else res = -1; |