mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-11 17:08:46 +00:00
Separate a definition of NULL to standalone header
A lib/list.h had circular dependency through include nest/bird.h nest/bird.h requires lib/birdlib.h lib/birdlib.h requires timer.h timer.h requires lib/resource.h lib/resource.h requires lib/list.h
This commit is contained in:
parent
3e644333a2
commit
53e27ec79d
@ -25,3 +25,4 @@ event.h
|
||||
checksum.c
|
||||
checksum.h
|
||||
alloca.h
|
||||
null.h
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "timer.h"
|
||||
#include "alloca.h"
|
||||
#include "lib/null.h"
|
||||
|
||||
/* Ugly structure offset handling macros */
|
||||
|
||||
@ -43,10 +44,6 @@
|
||||
#define BIT32_CLR(b,p) ((b)[(p)/32] &= ~BIT32_VAL(p))
|
||||
#define BIT32_ZERO(b,l) memset((b), 0, (l)/8)
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *) 0)
|
||||
#endif
|
||||
|
||||
#ifndef IPV6
|
||||
#define IP_VERSION 4
|
||||
#else
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#define _BIRD_LISTS_C_
|
||||
|
||||
#include "nest/bird.h"
|
||||
#include "lib/null.h"
|
||||
#include "lib/lists.h"
|
||||
|
||||
/**
|
||||
|
9
lib/null.h
Normal file
9
lib/null.h
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
* BIRD Library -- NULL
|
||||
*
|
||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||
*/
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *) 0)
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user