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 >I can find some archived cygwin messages referencing bug fixes to >ftruncate64 in the cygwin.dll. However, using ftruncate64 results in an >unresolved symbol. You don't use ftruncate64. You use ftruncate. Cygwin is 64 bit by default. >In fact based on those messages, I inserted the following code in my >program as a workaround for a truncate64() function: How about referencing these messages so we'd have some clue as to what you're talking about? cgf -- 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/