This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Make _FILE_OFFSET_BITS=64 default.
- From: Russ Allbery <eagle at eyrie dot org>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: OndÅej BÃlka <neleai at seznam dot cz>, Paul Eggert <eggert at cs dot ucla dot edu>, Denis Obrezkov <reprofy at etersoft dot ru>, libc-alpha at sourceware dot org
- Date: Wed, 05 Mar 2014 11:12:34 -0800
- Subject: Re: [RFC] Make _FILE_OFFSET_BITS=64 default.
- Authentication-results: sourceware.org; auth=none
- References: <1393521776-1102-1-git-send-email-reprofy at etersoft dot ru> <530F79C1 dot 2040508 at cs dot ucla dot edu> <20140305091331 dot GA6031 at domone dot podge> <5316FF9F dot 1060301 at redhat dot com> <20140305180704 dot GM184 at brightrain dot aerifal dot cx> <53176EEE dot 8070500 at redhat dot com>
Florian Weimer <fweimer@redhat.com> writes:
> On 03/05/2014 07:07 PM, Rich Felker wrote:
>> 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?
I'm fairly sure you're right.
#ifndef __off_t_defined
# ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
# else
typedef __off64_t off_t;
# endif
# define __off_t_defined
#endif
> While these aren't supposed to be used in public header files, such a
> change seems fairly risky to me.
Yes, if the lengths of those types change, any software that uses off_t
and ino_t in on-disk binary data structures will find that a newly-built
version of that software will no longer be able to read the old data
files. Now obviously that's a badly-designed disk format, shouldn't have
been done that way, etc., but I know that people have done that.
This is not specifically a glibc ABI change, but it would be quite
surprising.
I think one might also run into trouble when one rebuilds software with
this change that links with a shared library that predates the change and
uses off_t or ino_t in public ABIs, or vice versa.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>