X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Eric Blake <ebb9@byu.net>
Subject:  Re: [Spam?]Re: problem concating (>>) to a large file
Date: Tue, 29 May 2007 19:46:00 +0000 (UTC)
Lines: 24
Message-ID:  <loom.20070529T213218-447@post.gmane.org>
References:  <001201c79ea3$4d82bce0$8500a8c0@RUSNAK> <4656D47E.5050906@byu.net> <001201c79f49$b57b3c90$8500a8c0@RUSNAK> <46582F2B.2000300@byu.net> <000001c7a1d8$c2178e40$8500a8c0@RUSNAK> <loom.20070529T161539-287@post.gmane.org> <loom.20070529T172200-251@post.gmane.org> <20070529172832.GF6003@calimero.vinschen.de>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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/

