* Thibaut VARENE <[EMAIL PROTECTED]> [070818 16:57]: > On 4/18/07, Tim Kientzle <[EMAIL PROTECTED]> wrote: > >I'm not familiar with USE_FILE_OFFSET64, I thought the correct > >incantation was this: > > > > gcc -D_FILE_OFFSET_BITS=64 > > > >Have you tried this? > > This actually fixes it indeed. And guess what, in ap_config_auto.h > which is included by httpd.h: > > /* build flag: -D_FILE_OFFSET_BITS=64 */ > #ifndef _FILE_OFFSET_BITS > #define _FILE_OFFSET_BITS 64 > #endif > > I think you probably want to add this to archive.h...
archive.h is far too late for this. _FILE_OFFSET_BITS must be set before feature.h (or any other glibc header, as those include feature.h) is first included. I think a proper test would be to have the following (after including the system headers, as then __GLIBC__ should be defined if it is glibc). #ifdef __GLIBC__ #ifndef __USE_FILE_OFFSET64 #error You must define _FILE_OFFSET_BITS to 64 before the first glibc header, or your offset lengths of 32 bit will be incompatible with libarchive using 64 bit. #endif #endif There might be ways to help libraries to still link against libarchive without having to change their off_t to 64 bit, but using off64_t in those cases. But then programs would still have to make sure to always use off64_t when communicating with libarchive and hard to find bugs could arise from them not doing everywhere. So I guess just forcing the program using this to use 64 bit offsets as above it the best solution. (and nowadays programs have really no excuse for limiting themself still to 4 GB (or even 2GB) files). Hochachtungsvoll, Bernhard R. Link -- "Never contain programs so few bugs, as when no debugging tools are available!" Niklaus Wirth -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]