[Click] compile time fixes

Eddie Kohler kohler at cs.ucla.edu
Mon May 3 22:53:01 EDT 2004


Hi Remo,

Remo Strotkamp wrote:
> Hey again,
> 
> here we go with compile time error fixes:
> 
> #1:
> change line 114 of include/net/checksum.h from
>   sum = csum_partial( src, len, sum);
> to
>   sum = csum_partial( (const unsigned char*) src, len, sum);

OK

> #2:
> in click/include/atomic.hh line 46: change from
>       atomic_clear_mask(u,  &_val);
> to
>     atomic_clear_mask(u, (long unsigned int*) &_val);
> 
> 
> #3: Now this one I have a really bad feeling about as it's in
>   files called atomic and atomic operations aren't my thingie!!!

Check out the new click/include/atomic.hh.  There is new code in
there, protected by "#ifdef __arm__".  (Is that the right symbol?
Please run "echo > /tmp/x.c; gcc -dM /tmp/x.c" and tell us the
output.)

> #4
> Now this one is getting even stranger....
> There are two static_assert statements in include/click/atomic.hh that make
> absolutely no sense:
> Line 71:    static_assert("no support for SMP on non-i386 machines");
> Line 98:    static_assert("no support for SMP on non-i386 machines");

Fixed.

> #5:  _aligned is used but never defined in elements/grid/gridproxy.cc.....
>    here's what I did, based on elements/ip/ipencap.{hh,cc}

Fixed -- in a slightly different way from your fix (the AlignmentInfo
should look at input number 1, not 0).

Eddie


More information about the click mailing list