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: [PING][PATCH] Warn about using _ino_t without -D_FILE_OFFSET_BITS=64.


> On 03/21/2014 06:11 AM, Joseph S. Myers wrote:
> > * Adding *64 versions of interfaces without them (at least fts).
> 
> This is a messy situation.  GNU applications typically use Gnulib's 
> version of fts, and Gnulib's interface has diverged from libc's.  The 
> Gnulib interface and implementation support features that glibc doesn't, 
> e.g., checking for directory loops, and these are used by programs like 
> 'rm -r' and 'chmod -R'.
> 
> One possible way forward would be to deprecate the current fts API, and 
> switch to the gnulib API (with room for future extensions), retaining 
> binary support for old applications that dynamically link to the new 
> glibc.  This would be some work, though.

I don't think it's so hard.  But the first question is if perhaps we
shouldn't just deprecate fts entirely and not support a new one in libc.
If there is no great benefit to having this in libc vs just everyone
building their own from gnulib, that might be simpler.  Before deciding
where to go, we should see what the current versions of 4.4BSD-derived
systems are doing for fts.  Compatibility with 4.4BSD libc was the original
reason we (I) added fts.

> It is odd that libc supports two different 64-bit ABIs for 'stat' etc. 
> on all 64-bit platforms, one hardly ever used.  It might make sense to 
> deprecate the rarely-used ABI, i.e., have _FILE_OFFSET_BITS=64 be a 
> no-op on 64-bit platforms.  This should fix the C++ ABI problem you 
> mentioned (bug #15766).

I think that was always the intent.  Perhaps we should also consider what
we ought to be doing better in API/ABI checking that could be made to
ensure that we maintain the desired invariant in the future.

> 1. These libraries are compiled with -D_FILE_OFFSET_BITS=64, so 
> theycurrently should have problems unless applications are also built 
> with-D_FILE_OFFSET_BITS=64.  Changing the default will fix these problems.
> 
> flac
> fltk
> GraphicsMagick
> hdf5
> ImageMagick

You didn't list elfutils ({-libelf,{-devel}}).  That is built with
-D_FILE_OFFSET_BITS=64 but uses off64_t et al in its public API headers,
so it should not have a problem.  I don't know if your method of analysis
groks those cases or not.


Thanks,
Roland


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