aboutsummaryrefslogtreecommitdiffstats
path: root/xmalloc.h
blob: e186501350c1a8125fa6a845f49bdf4c90bf5cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* xmalloc.h -- split out of fetchmail.h */

#ifndef XMALLOC_H
#define XMALLOC_H

#include "config.h"

/* xmalloc.c */
#if defined(HAVE_VOIDPOINTER)
#define XMALLOCTYPE void
#else
#define XMALLOCTYPE char
#endif
XMALLOCTYPE *xmalloc(size_t);
XMALLOCTYPE *xrealloc(/*@null@*/ XMALLOCTYPE *, size_t);
#define xfree(p) { if (p) { free(p); } (p) = 0; }
char *xstrdup(const char *);

#endif