2 * xmalloc.c -- allocate space or die
4 * For license terms, see the file COPYING in this directory.
10 #if defined(STDC_HEADERS)
13 #include "fetchmail.h"
15 #if defined(HAVE_VOIDPOINTER)
16 #define XMALLOCTYPE void
18 #define XMALLOCTYPE char
26 p = (XMALLOCTYPE *) malloc(n);
27 if (p == (XMALLOCTYPE *) 0) {
28 fputs("fetchmail: malloc failed\n",stderr);
34 char *xstrdup(char *s)
37 p = (char *) xmalloc(strlen(s)+1);
42 /* xmalloc.c ends here */