order_base_2(n) is implemented with a variable, which keeps it from being used at file scope. Implement it instead as ilog2(2*n-1).
This will change the behavior of the macro for most values with high bit set. So, for 32-bit unsigned ints greater than 0x80000000, order_base_2(n) will essentially ignore the high order bit. It seems that many uses of order_base_2 are in roundup_pow_of_two, and that already didn't work for cases when the high order bit was set (1<<32 is not defined, and is often computed as 1).
I don't think that this macro is used in cases where this change matters.