How to support LFS on ppc

JohnsonCheng JohnsonCheng at
Wed Sep 14 21:45:54 EST 2005

Dear Stephane,

Great. It's work when I use %lld instead of %ld.

Johnson Cheng

-----Original Message-----
From: Fillod Stephane [mailto:stephane.fillod at] 
Sent: Wednesday, September 14, 2005 5:48 PM
To: linux-ppc-embedded
Cc: JohnsonCheng
Subject: RE: How to support LFS on ppc 

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

Actually not problem with LFS, but with int types.

>#define _FILE_OFFSET_BITS 64
>#include <sys/stat.h>
>#include <unistd.h>
>Int main()
>           struct stat buf;
>           stat64("/3G",&buf);
>           printf("size of test = %ld \n",buf.st_size);
Try %lld instead. Or to be portable, #include <inttypes.h>
and printf("size of test = %" PRId64 "\n", buf.st_size);


More information about the Linuxppc-embedded mailing list