tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: routing socket rou(n)ding?

>> #define RT_ROUNDUP2(a, n)       ((a) > 0 ? (1 + (((a) - 1) | ((n) - 1))) : 
>> (n))
>> #define RT_ROUNDUP(a)           RT_ROUNDUP2((a), sizeof(uint64_t))

> Those macros [were] changed for NetBSD-6 so that the routing messages
> are identical for 32-bit and 64-bit kernels. the price of breaking (formerly) correct code dating from the
days before the macros made it into the include files.

This is ugly, on a par with the SCM_RIGHTS flag day.  A code author's
choices are to forego backward compatability, forego forward
compatability, or write two versions, one for old kernels and one for
new.  ABI compatability is all very well, but there are at least a few
of us out here who care about API compatability too.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index