std C/C++ patch #9

Eddie Kohler kohler at icir.org
Tue Apr 30 00:14:06 EDT 2002


Hi Scott,

I've updated the repository to use two new macros,
CLICK_SIZE_PACKED_STRUCTURE (for the arm-gcc case: to convince the compiler
that a structure needs to be smaller than it might like) and
CLICK_PACKED_STRUCTURE (for the FDDI/BridgeMessage case: where holes INSIDE
the structure are not allowed). Defined in config.h[.in].

CLICK_PACKED_STRUCTURE will cause an error when used w/o GCC. I expect the
user to redefine it appropriately -- probably by #defining it to /*empty*/
and hoping for the best.

Also, I added a bunch of static_asserts to ensure that all the address
structures really have the right size.

What do you think?

Eddie



More information about the click mailing list