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 ...
> -mike
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?
Just tested this theory (added extra (1LL << 36) there)
and it builds without warnings.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox