summaryrefslogtreecommitdiffstats
path: root/lib/birdlib.h
blob: fb4814f9b168ee0e9e760cd560371e4ae2c4227c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 *	BIRD Library
 *
 *	(c) 1998 Martin Mares <mj@ucw.cz>
 *
 *	Can be freely distributed and used under the terms of the GNU GPL.
 */

#ifndef _BIRD_BIRDLIB_H_
#define _BIRD_BIRDLIB_H_

/* Ugly structure offset handling macros */

#define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i)
#define SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i)))

#endif