From 0e6eef620d4b838fc558711cd2d5572ec7a576c2 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Mon, 31 May 2004 17:07:05 +0000 Subject: [PATCH] Use #include "alloca.h" --- lib/alloca.h | 19 +++++++++++++++++++ nest/rt-attr.c | 5 +---- nest/rt-table.c | 5 +---- 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 lib/alloca.h diff --git a/lib/alloca.h b/lib/alloca.h new file mode 100644 index 00000000..57816bd5 --- /dev/null +++ b/lib/alloca.h @@ -0,0 +1,19 @@ +/* + * BIRD Library -- Linked Lists + * + * (c) 2004 Martin Mares + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#ifndef _BIRD_ALLOCA_H_ +#define _BIRD_ALLOCA_H_ + +#ifdef HAVE_ALLOCA_H +#include +#else +#include +#endif + + +#endif diff --git a/nest/rt-attr.c b/nest/rt-attr.c index cccae2f6..ec8e69ba 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -44,10 +44,7 @@ * Routing tables always contain only cached &rta's. */ -#ifdef HAVE_ALLOCA_H -#include -#endif - +#include "alloca.h" #include "nest/bird.h" #include "nest/route.h" #include "nest/protocol.h" diff --git a/nest/rt-table.c b/nest/rt-table.c index db70b666..ec5412c2 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -41,10 +41,7 @@ #include "conf/conf.h" #include "filter/filter.h" #include "lib/string.h" - -#ifdef HAVE_ALLOCA_H -#include -#endif +#include "alloca.h" static slab *rte_slab; static linpool *rte_update_pool;