Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen" To: Subject: RE: ftruncate64() question? Date: Sun, 23 May 2004 14:13:31 +0200 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> > 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/