diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/birdlib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index d21cdf1f..aaa7a0a3 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -37,6 +37,9 @@ struct align_probe { char x; long int y; }; #define ABS(a) ((a)>=0 ? (a) : -(a)) #define DELTA(a,b) (((a)>=(b))?(a)-(b):(b)-(a)) #define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a))) +#define BYTES(n) ((((uint) (n)) + 7) / 8) +#define CALL(fn, args...) ({ if (fn) fn(args); }) +#define ADVANCE(w, r, l) ({ r -= l; w += l; }) /* Bitfield macros */ |