0
0
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:
Pavel Tvrdík 2015-03-17 12:31:14 +01:00
parent 3e644333a2
commit 53e27ec79d
4 changed files with 12 additions and 5 deletions

View File

@ -25,3 +25,4 @@ event.h
checksum.c
checksum.h
alloca.h
null.h

View File

@ -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

View File

@ -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
View 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