Re: [PATCH xfsprogs 01/14] configure: use AC_SYS_LARGEFILE

Felix Janda
2016-08-12T16:55:46Z

Christoph Hellwig wrote:
> On Tue, Aug 09, 2016 at 07:41:05PM +0200, Felix Janda wrote:
> > Thanks for reviewing the patch series!
> >
> > > Does this also error out for libraries that don't support large
> > > off_t at all? I think that would be helpful to add if not there yet.
> >
> > I do not quite understand. Do you refer to libraries using libxfs or
> > the external libraries used by xfsprogs?
>
> I meant C libraries, sorry. E.g. uclibc used to not support LFS
> many years ago, although they probably fixed it up by now.

Thaks for clarifying.

If a libc does not support LFS, with this patch series the build will
fail soon, because of the off_t size check in xfs.h.

The support of transparent LFS in different c libraries on linux seems
to be the following:

glibc: since version 2.2 (2000)
uClibc: since version 0.9.11 (2002)
dietlibc: since version 0.8 (2001)
klibc: AFAICS since beginning only transparent LFS
musl: since beginning only transparent LFS
bionic: In 2015 _FILE_OFFSET_BITS was implemented "mostly"...
newlib: (except on cygwin) does not seem to have support for transparent LFS

Note that LFS can be configured out of uClibc. However its headers
error out when it is configured out and an application sets
_FILE_OFFSET_BITS. (So in the case of xfsprogs it would have errored
out in this situation already earlier.)

So it seems that this patch series breaks newlib support...

Felix