On Sunday 27 April 2008, Denys Vlasenko wrote:
> On Monday 28 April 2008 00:07, Mike Frysinger wrote:
> > libbb.h has this code snippet and comment:
> > enum {
> > ...
> > * The only known arch with some of these sigs not fitting
> > * into 32 bits is parisc (SIGXCPU=33, SIGXFSZ=34, SIGSTKFLT=36).
> > * Dance around with long long to guard against that...
> > */
> > BB_FATAL_SIGS = (int)(0
> > + (1LL << SIGHUP)
> > ...
> >
> > maybe it's just me, but i dont see any long long there and some of the
> > signals used are def larger than 31 which results in a warning during
> > compile time about shift being larger than type size ...
>
> 1LL is of type "long long", so "1LL << 36" should work
> without warning, I think. Maybe it warns about 2^36 being
> bigger than enum can hold?ah, sorry, i missed the connection between "long long" and "LL". i saw the (int) and got distracted by that. > Just tested this theory (added extra (1LL << 36) there) > and it builds without warnings. the report i was fielding was against busybox-1.10 and the code base there lacks the LL's. back porting that change addressed the issue indeed. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
