This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Make _FILE_OFFSET_BITS=64 default.


On Wed, Mar 05, 2014 at 07:37:34PM +0100, Florian Weimer wrote:
> On 03/05/2014 07:07 PM, Rich Felker wrote:
> >On Wed, Mar 05, 2014 at 11:42:39AM +0100, Florian Weimer wrote:
> >>On 03/05/2014 10:13 AM, OndÅej BÃlka wrote:
> >>
> >>>Changing default would be better. I dig while how to do it and can not
> >>>find a nonugly solution. How should we do this?
> >>
> >>Isn't this a global ABI change?  I don't think we can do this.
> >
> >No, it's just a change in the default exposed features. There's no ABI
> >issue because programs built with _FILE_OFFSET_BITS=64 access
> >different symbols (the nasty namespace-violating ones with the 64
> >suffix) rather than the ordinary ones.
> 
> Doesn't it changes the definition of off_t and ino_t as well?  While
> these aren't supposed to be used in public header files, such a
> change seems fairly risky to me.

Yes it does, but at the same time it switches which functions you are
calling to the versions that expect 64-bit inodes and offsets. You
can't end up in a situation where you're calling the 32-bit functions
but off_t is 64-bit. What can happen is that you have two translation
units of the application (e.g. one from the main program and one from
a third-party library) that are using mismatching definitions of
off_t, and this is very problematic, but it's ALREADY happening now
due to the poor choice of defaults. On most properly built real-world
distros, the vast majority of packages are built with
-D_FILE_OFFSET_BITS=64 because failure to do so results in all kinds
of breakage (not just stat; failure to open large files too). But a
few package maintainers forget it, and then you have bugs. Just making
the correct setting the default would largely make the problem go
away.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]