This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cp problem on Win95 / lseek past EOF


Someone else complained about cp.exe not working on Win95, and
I am also having problems.  My problem appears to be that Win95
does not deal properly with "holey" files.  When GNU cp finds a
block of zeros in the input, by default it lseek()s past that
section in the output instead of writing it.  It seems that
on Win95 this doesn't zero the unwritten section, but leaves
garbage in it.  It seems to me the library needs to deal with
this behavior by actually writing the zeros.

I was trying to find out whether the behavior of the relevant
Win32 calls (SetFilePosition and WriteFile, specifically)
was defined, but it doesn't seem to be documented.  Does NT have
to follow the Unix behavior because of POSIX?  In any case, cp
seemed to work on NT, although the little test program I wrote
(which did write/lseek/write/lseek-to-hole/read) still failed.

-Vince Del Vecchio
vince.delvecchio@analog.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]