On Wed, Feb 20, 2013 at 09:40:00AM -0600, Eric Sandeen wrote:
I really don't think it's safe to add -D_FILE_OFFSET_BITS=64
to the
default CFLAGS. Code will start getting bigger numbers and will
need to cope appropriately lest they overflow. It'd be draconian
but I'd prefer to do something like was done for open() (I think?)
a while back and fail to link if the 64 bit interfaces aren't used.
That'd require each app/maintainer to do an audit and be thoughtful
about the fixes.
The problem with similar hacks (e.g. add deprecated attribute to
stat, fstat etc. #if __WORDSIZE == 32 && !defined(__USE_FILE_OFFSET64)
) is that they could very well break autoconf tests and silently disable
support for various parts of packages. Hard to track issues.
Scanning for __xstat etc. symbols in 32-bit packages is IMHO better, and
just nagging package maintainers until it is fixed.
Of course, the script needs to be smart, because e.g. glibc will always
contain __xstat symbol, as it is part of the exported ABI.
Jakub