How to support LFS on ppc

JohnsonCheng JohnsonCheng at
Wed Sep 14 19:12:09 EST 2005

Dear All,


I have a problem about Large File System on ppc. The following is my example


#define _FILE_OFFSET_BITS 64

#include <sys/stat.h>

#include <unistd.h>

Int main()


           struct stat buf;


           printf("size of test = %ld \n",buf.st_size);


     printf("size of test 2= %ld\n",buf.st_size);

           return 0;



The conclusion is as following:

size of test = 2141735952

size of test 2= 805910402


But the real size of 3G file is 3145728000. I think it maybe the offset is
wrong, but I don't know how to correct it. Can someone give me some advise.



Johnson Cheng

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Linuxppc-embedded mailing list