Statistics
| Branch: | Revision:

iof-bird / bird-2.0.1 / lib / alloca.h @ 6b3f1a54

History | View | Annotate | Download (362 Bytes)

1
/*
2
 *        BIRD Library -- Alloca.h
3
 *
4
 *        (c) 2004 Ondrej Filip <feela@network.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
#ifndef _BIRD_ALLOCA_H_
10
#define _BIRD_ALLOCA_H_
11

    
12
#ifdef HAVE_ALLOCA_H
13
#include <alloca.h>
14
#else
15
#include <stdlib.h>
16
#endif
17

    
18
#define allocz(len) ({ void *_x = alloca(len); memset(_x, 0, len); _x; })
19

    
20
#endif