On Sat, 2 Jun 2001, Marcus Meissner wrote:
> -/* This is for glibc on Linux, it will turn on 64 bit file support at compile time */
> -#define _FILE_OFFSET_BITS 64
> +#include <features.h>
> +/* This is for glibc on Linux, it will turn on 64 bit file support at
> + * compile time
> + * Since glibc 2.1.x has various degrees of broken mmap64 prototypes,
> + * we do not use this on glibc 2.1.x systems.
> + */
> +#if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ > 1)
> +# define _FILE_OFFSET_BITS 64
> +#endif
> +
That's probably not going to work. The features.h is the only header that
checks whether _FILE_OFFSET_BITS is defined, and it's protected against
multiple inclusion, so _FILE_OFFSET_BITS must be defined *before* you
include features.h. If you must check version, use autoconf.