From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23353 invoked by alias); 23 May 2004 12:13:53 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 23338 invoked from network); 23 May 2004 12:13:50 -0000 Received: from unknown (HELO av5-2-sn3.vrr.skanova.net) (81.228.9.114) by sourceware.org with SMTP; 23 May 2004 12:13:50 -0000 Received: by av5-2-sn3.vrr.skanova.net (Postfix, from userid 502) id A010237E62; Sun, 23 May 2004 14:13:49 +0200 (CEST) Received: from smtp1-1-sn3.vrr.skanova.net (smtp1-1-sn3.vrr.skanova.net [81.228.9.177]) by av5-2-sn3.vrr.skanova.net (Postfix) with ESMTP id 937B637E4E for ; Sun, 23 May 2004 14:13:49 +0200 (CEST) Received: from P450 (t7o62p14.telia.com [217.208.205.14]) by smtp1-1-sn3.vrr.skanova.net (Postfix) with SMTP id 0B8D738017 for ; Sun, 23 May 2004 14:13:49 +0200 (CEST) From: "Hannu E K Nevalainen" To: Subject: RE: ftruncate64() question? Date: Sun, 23 May 2004 21:14:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <20040523025407.GA5586@coe.bosbc.com> X-SW-Source: 2004-05/txt/msg00774.txt.bz2 > From: Christopher Faylor > Sent: Sunday, May 23, 2004 4:54 AM > On Sat, May 22, 2004 at 04:24:22PM -0400, Bill C. Riemers wrote: > >> What's wrong with ftruncate? > > > >ftruncate fails with files larger >= 2GB because off_t gets > >interpreted as 32 bit signed integer... > > bash-2.05b$ cat off_t.c > #include > #include > int > main (int argc, char **argv) > { > printf ("sizeof(off_t) = %d\n", sizeof(off_t)); > exit (0); > } > > bash-2.05b$ ./off_t > sizeof(off_t) = 8 FWIW/WAG - without having seen the code: To me this looks as Bill's code must be wrong; resulting in a cast into a 32-bit signed value - or maybe using the wrong datatype for the off_t value. /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E ** on a mailing list; please keep replies on that particular list ** -- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); -- --END OF MESSAGE-- -- 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/