[Spam?]Re: problem concating (>>) to a large file
Eric Blake
ebb9@byu.net
Tue May 29 21:35:00 GMT 2007
Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> I fixed both bugs in CVS. It's rather disappointing that
>
> SetFilePointer (handle, 0, NULL, FILE_END);
>
> fails for files > 4Gigs. It's actually required that the offset_high
> pointer is a valid pointer to a LONG containing 0. Oh well.
Nice catch; I was trying to spot it myself, and it is crystal clear now that I
go reread the msdn page on SetFilePointer, but I wasn't seeing it on my own.
At least it was twice as generous as ftell/fseek failing on files > 2GB - 1
byte.
Shoot - now that means I have to fix coreutils ASAP so that the trivial 'cat
smallfile >> smallfile' will once again work for snapshot users, now that you
correctly took away the non-POSIX seek in exec()! Thanks for the quick
turnaround on fixing the cygwin side of this, and for the OP's persistence.
And thank goodness for sparse files in NTFS (as I don't really have 4 gig of
disk space available in my /tmp).
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list