[PATCH 5/5] Bionic lacks transparent LFS migrations; provide a workaround

Rich Felker dalias at libc.org
Mon Apr 27 23:01:47 UTC 2015


On Mon, Apr 27, 2015 at 06:30:59AM +0000, dietmar.schindler at manroland-web.com wrote:
> > On Friday, 24 April 2015, at 4:12 am, Matt Whitlock wrote:
> > > +#if defined(__BIONIC__) && _FILE_OFFSET_BITS == 64
> >
> > The preprocessor needs to test whether _FILE_OFFSET_BITS is defined before using it in an
> > expression.
> 
> That's not true. INTERNATIONAL STANDARD ©ISO/IEC ISO/IEC 9899:201x,
> Programming languages - C, 6.10.1 Conditional inclusion, §4:
> "... After all replacements due to macro expansion and the *defined*
> unary operator have been performed, all remaining identifiers ...
> are replaced with the pp-number 0..."
> 
> Thus, it's not needed to write
> 
> > #if defined(__BIONIC__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64

It's a matter of policy. While it's valid C, -Wundef generates
warnings for such usage and thus policy is to avoid it.

Rich


More information about the busybox mailing list