Linus Torvalds [off-list ref] wrote:
On Thu, 5 Apr 2007, Shawn O. Pearce wrote:
quoted
Sure, OK, but that libc function doesn't exist on Mac OS X:
My bad. It's *not* linux-specific like the OSX man-page apparently says,
it's very traditional. But the right name is "lseek64()" (and offt64_t for
the size).
Sorry for the confusion, that manpage snippet came from a Gentoo/x86
system. But I digress, you are right, the right interfaces to be
using here is lseek64 and open64.
Now those also don't eixst on OSX, because as you pointed out, they
have no legacy to deal with and are just using sizeof off_t == 8.
So we'd probably have to do something like:
#ifndef _LFS_LARGEFILE
#define open64 open
#define lseek64 lseek
#endif
and then start using the open64/lseek64 variants instead. Or do
the reverse #define's. ;-)
--
Shawn.