1/* Just a replacement, if the original malloc is not
2   GNU-compliant. See autoconf documentation. */
3
4#if HAVE_CONFIG_H
5#include <ldns/config.h>
6#endif
7
8void *calloc();
9
10#if !HAVE_BZERO && HAVE_MEMSET
11# define bzero(buf, bytes)	((void) memset (buf, 0, bytes))
12#endif
13
14void *
15calloc(size_t num, size_t size)
16{
17	void *new = malloc(num * size);
18	if (!new) {
19		return NULL;
20	}
21	bzero(new, num * size);
22	return new;
23}
24
25