delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/23/08:14:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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" <garbage_collector AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: ftruncate64() question?
Date: Sun, 23 May 2004 14:13:31 +0200
Message-ID: <NGBBLLIAMFLGJEOAJCCEIEPNDKAA.garbage_collector@telia.com>
MIME-Version: 1.0
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 <sys/types.h>
>   #include <stdio.h>
>   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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019