If I don't include -D_FILE_OFFSET_BITS=64 then I have a size mismatch on apr_finfo_t.
My test case uses apr_dir_read: apr_finfo_t finfo; apr_dir_read(&finfo, APR_FINFO_DIRENT, dir); // finfo.name - has garbage in it do to the size mismatch in apr_finfo_t My apr library has sizeof(apr_finfo_t) == 88 and my code has sizeof(apr_finfo_t) == 96. The bug appears to be in the configure script. If try and pass configure a custom CFLAGS then --enable-lfs is ignored. configure CFLAGS=-D_FILE_OFFSET_BITS=64 --enable-lfs # LFS request is ignored. configure --enable-lfs # LFS is enabled. (If I then manually add -D_FILE_OFFSET_BITS=64 to build/apr_rules.mk my test works.) Thanks - Scott > -----Original Message----- > From: Joe Orton [mailto:[EMAIL PROTECTED] > Sent: Monday, May 15, 2006 8:56 AM > To: [email protected] > Subject: Re: Compiling with __USE_LARGEFILE64 on linux (RH8). > > On Mon, May 15, 2006 at 08:45:39AM -0400, Scott Greig wrote: > > My bad, I've been using -D_LARGEFILE64_SOURCE just typed it > wrong in > > the email. > > I also need -D_FILE_OFFSET_BITS=64. Both flags are used to > build my > > main application. > > > > I tried running configure on a RH8 machine. > > > > configure CFLAGS="-D_FILE_OFFSET_BITS=64" --enable-lfs > > > > I get the following message: > > ... > > Check for compiler flags... > > Checking whether to enable -D_LARGEFILE64_SOURCE... no > > > > If I remove the CFLAGS setting it works fine. > > Right, so build APR like that, as I said. How does your app > fail? Why are you messing around with all these flags? > > Don't use -D_FILE_OFFSET_BITS=64. > > joe >
