Re: PATCH: pread() return non-zero if read beyond end of file

2017-11-06 Thread Xiaofeng Liu via cygwin-patches
try again, after saving the diff in linux first. git diff                                                                                             diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc               index bc8fead..525cb32 100644               

Re: PATCH: pread() return non-zero if read beyond end of file

2017-11-06 Thread Xiaofeng Liu via cygwin-patches
Sorry it keeps failing if I send the git diff in the attachment. I will try copy the text again. git diffdiff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.ccindex bc8fead..525cb32 100644--- a/winsup/cygwin/fhandler_disk_file.cc+++ b/winsup/cygwin/fhandler_disk

Re: PATCH: pread() return non-zero if read beyond end of file

2017-11-06 Thread Corinna Vinschen
Hi, On Nov 6 19:20, Xiaofeng Liu via cygwin-patches wrote: > pread() return 0 if read beyond end of file in linux, but not zero in cygwin.  > I have a small code to show the problem: > #include > #include > #include > #include > #include > #include > > int main() > { > const char* file =

PATCH: pread() return non-zero if read beyond end of file

2017-11-06 Thread Xiaofeng Liu via cygwin-patches
pread() return 0 if read beyond end of file in linux, but not zero in cygwin.  I have a small code to show the problem: #include #include #include #include #include #include int main() { const char* file = "/home/xliu/work/exome/a.bam"; struct stat st; stat(file, &st); char buf[65536