On Sunday 10 June 2012 06:45:34 Stéphane Lesage wrote: > Le 05/06/2012 03:42, Charles Manning a écrit : > >> I found the problem: my loff_t type is 32 bits... > > > > Just curious... What compiler are you using? > > Hi, > > My embedded target is Analog Devices Blackfin processor, I'm using the > Visual DSP toolchain. > > For the test on my Windows PC, I used GCC 4.4.0 under MinGW 3.15.2. > BTW, the 'oflags' from fcntl.h have different values than > CONFIG_YAFFSFS_PROVIDE_VALUES. > So I can't compile dtest.c with YAFFS values. > I can compile stephanetest.c if I remove the includes and keep only > yaffsfs.h. > > On both platforms, loff_t is not defined. So I defined it to int. loff_t is supposed to be 64-bits, but allowing for 32-bits provides the option to compile yaffs in a lighter-weight mode that dumps the 64-bit calculations. Thus I think it probably worth keeping the 32-bit stuff. -- Charles