64-bit stat (or not) in 32-bit Fedora binaries

Eric Sandeen sandeen at redhat.com
Wed Feb 20 15:40:00 UTC 2013


On 2/20/13 8:23 AM, Chris Adams wrote:
> Once upon a time, Bill Nottingham <notting at redhat.com> said:
>> Florian Weimer (fweimer at redhat.com) said: 
>>> If we add -DFILE_OFFSET_BITS=64 to the default CFLAGS, this comes
>>> pretty close to an ABI bump.  But considering the numbers, I wonder
>>> if it's the right thing to do if we need to cope with 64-bit inode
>>> numbers.
>>
>> It's kind of a shame we just did the mass rebuild, if we're
>> going to have to do part of it again if we change this.
> 
> I don't think you should add that to unsuspecting code.  It isn't
> default because it can create incompatible libraries, can break code
> that doesn't use the right types.
> 

Agreed.

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.

-Eric


More information about the devel mailing list