Mail Archives: cygwin/2004/05/23/08:14:13
> 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 -