Add.
[shishi.git] / asn1 / mem.h
blobe4af84445dee68fcd7f3af48bf4b861574be61d5
1 #ifndef MEM_H
2 # define MEM_H
4 /* Use _asn1_afree() when calling alloca, or
5 * memory leaks may occur in systems which do not
6 * support alloca.
7 */
8 #ifdef HAVE_ALLOCA
9 # define _asn1_alloca alloca
10 # define _asn1_afree(x)
11 #else
12 # define _asn1_alloca _asn1_malloc
13 # define _asn1_afree _asn1_free
14 #endif /* HAVE_ALLOCA */
16 #define _asn1_malloc malloc
17 #define _asn1_free free
18 #define _asn1_calloc calloc
19 #define _asn1_realloc realloc
20 #define _asn1_strdup strdup
22 #endif /* MEM_H */