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: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, Mike Frysinger <vapier at gentoo dot org>, <libc-alpha at sourceware dot org>
- Date: Thu, 20 Mar 2014 12:11:20 +0000
- 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> <3427802 dot 83HSs9lgGH at vapier> <532956D4 dot 5020804 at cs dot ucla dot edu> <9842031 dot PgVxWc0IpI at vapier> <5329DC42 dot 2000409 at cs dot ucla dot edu> <Pine dot LNX dot 4 dot 64 dot 1403191841590 dot 14867 at digraph dot polyomino dot org dot uk> <532A41AA dot 9060208 at cs dot ucla dot edu> <Pine dot LNX dot 4 dot 64 dot 1403200139320 dot 7236 at digraph dot polyomino dot org dot uk> <20140320042640 dot GX26358 at brightrain dot aerifal dot cx>
On Thu, 20 Mar 2014, Rich Felker wrote:
> On Thu, Mar 20, 2014 at 01:46:15AM +0000, Joseph S. Myers wrote:
> > There's another problem with using such an assertion in fts.h: it's not
> > the correct condition for the two ABIs to be the same. On MIPS n64,
> > struct stat and struct stat64 have different layout and so
> > _FILE_OFFSET_BITS=64 is an ABI change despite __off_t and __off64_t having
> > the same size (and part of the public fts interface is a pointer to struct
> > stat).
>
> This is beyond disgusting; why was something like that ever allowed
> into the ABI, rather than just using the stat64 struct/syscall (or
> whichever one is saner) regardless of whether the stat or stat64
> userspace function is called?
This predates my maintaining the MIPS port, and long predates notions of
carefully choosing the best ABI, hopefully architecture-independent,
rather than having an ABI that at least approximately follows some other
Unix for that architecture. (I don't know if this particular ABI
peculiarity - a userspace-only peculiarity, there's only one set of n64
syscalls - arises from an attempt to be IRIX-compatible, but some
peculiarities do.)
--
Joseph S. Myers
joseph@codesourcery.com