diff options
| author | Lou Berger <lberger@labn.net> | 2019-04-30 10:26:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-30 10:26:35 -0400 |
| commit | 31e944a8a74db137424fc8f3185750b445c58d8f (patch) | |
| tree | d9cccdb70da2a5c7ceb67e5f88427520930f8ed5 /lib/zebra.h | |
| parent | 5f4e7ff9e2680fe399ca8e70f20feea9cfd7ec24 (diff) | |
| parent | 8390828dacec2befdd8f71c7d08b17963a8a340a (diff) | |
Merge pull request #3045 from opensourcerouting/atoms
READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists
Diffstat (limited to 'lib/zebra.h')
| -rw-r--r-- | lib/zebra.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index b96fb5a206..b1ea43c747 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -335,45 +335,6 @@ struct in_pktinfo { #endif /* ndef BYTE_ORDER */ -/* MAX / MIN are not commonly defined, but useful */ -/* note: glibc sys/param.h has #define MIN(a,b) (((a)<(b))?(a):(b)) */ -#ifdef MAX -#undef MAX -#endif -#define MAX(a, b) \ - ({ \ - typeof(a) _max_a = (a); \ - typeof(b) _max_b = (b); \ - _max_a > _max_b ? _max_a : _max_b; \ - }) -#ifdef MIN -#undef MIN -#endif -#define MIN(a, b) \ - ({ \ - typeof(a) _min_a = (a); \ - typeof(b) _min_b = (b); \ - _min_a < _min_b ? _min_a : _min_b; \ - }) - -#ifndef offsetof -#ifdef __compiler_offsetof -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) -#else -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif -#endif - -#ifndef container_of -#define container_of(ptr, type, member) \ - ({ \ - const typeof(((type *)0)->member) *__mptr = (ptr); \ - (type *)((char *)__mptr - offsetof(type, member)); \ - }) -#endif - -#define ZEBRA_NUM_OF(x) (sizeof (x) / sizeof (x[0])) - /* For old definition. */ #ifndef IN6_ARE_ADDR_EQUAL #define IN6_ARE_ADDR_EQUAL IN6_IS_ADDR_EQUAL |
