summaryrefslogtreecommitdiffstats
path: root/lib/birdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r--lib/birdlib.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
new file mode 100644
index 0000000..fb4814f
--- /dev/null
+++ b/lib/birdlib.h
@@ -0,0 +1,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