Please stop screwing up loop.c

Denys Vlasenko vda.linux at googlemail.com
Tue Mar 16 00:32:40 UTC 2010


On Monday 15 March 2010 23:00, Rob Landley wrote:
> In current git:
> 
> git checkout -f && git clean -fdx && make defconfig && make 
> 
>   CC      libbb/loop.o
> In file included from /usr/include/asm/types.h:4,
>                  from /usr/include/linux/loop.h:27,
>                  from libbb/loop.c:17:
> /usr/include/asm-generic/int-ll64.h:27: error: conflicting types for 
> ‘bb_hack___s64’
> include/fix_u32.h:38: error: previous declaration of ‘bb_hack___s64’ was here
> /usr/include/asm-generic/int-ll64.h:28: error: conflicting types for 
> ‘bb_hack___u64’
> include/fix_u32.h:33: error: previous declaration of ‘bb_hack___u64’ was here
> make[1]: *** [libbb/loop.o] Error 1
> make: *** [libbb] Error 2
> 
> Denys, why did you need to mess with this?

Do you really think I change files just for fun?

Do you think people send emails where they _lie_
that loop.c fails to compile for them?

> It was simple, and it worked  
> without bothering us for years.  If BSD can't properly emulate a Linux API 
> that says "linux" in the header name, this is BSD's problem.
> You broke "make  
> defconfig" using the Ubuntu 9.04 host toolchain on the current clean git 
> repository.

Please try current git. I added this to fix_u32.h:

/* Try hard to pull in u32 types and such.
 * Otherwise, #include "fix_u32.h" + #include <linux/foo.h>
 * may end up typedef'ing bb_hack_u32 inside foo.h,
 * and repeated typedefs aren't allowed in C/C++.
 */
#include <asm/types.h>
#include <linux/types.h>

/* In case above includes still failed to provide the types,
 * provide them ourself
 */


> I spent months getting this can of worms closed last time.  Don't try to "fix" 
> broken toolchains, you just break non-broken toolchains and complicate the 
> hell out of the code in the process.

Of course, Ubuntu 9.04 toolchain is not broken, it's perfect
in every imaginable way. It will never need any fixes.
All such problems are only in the past.

Or maybe whenever the first problem with it will be found,
we will declare it obsolete and say that whoever sits on it
is screwed and we are not going to cater for their ridiculous
demands to support it.

I'm sure users will love this attitude.

-- 
vda


More information about the busybox mailing list