1236769Sobrien/*	$NetBSD: make_malloc.h,v 1.4 2009/01/24 14:43:29 dsl Exp $	*/
2236769Sobrien
3236769Sobrien/*-
4236769Sobrien * Copyright (c) 2009 The NetBSD Foundation, Inc.
5236769Sobrien * All rights reserved.
6236769Sobrien *
7236769Sobrien * Redistribution and use in source and binary forms, with or without
8236769Sobrien * modification, are permitted provided that the following conditions
9236769Sobrien * are met:
10236769Sobrien * 1. Redistributions of source code must retain the above copyright
11236769Sobrien *    notice, this list of conditions and the following disclaimer.
12236769Sobrien * 2. Redistributions in binary form must reproduce the above copyright
13236769Sobrien *    notice, this list of conditions and the following disclaimer in the
14236769Sobrien *    documentation and/or other materials provided with the distribution.
15236769Sobrien *
16236769Sobrien * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17236769Sobrien * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18236769Sobrien * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19236769Sobrien * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20236769Sobrien * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21236769Sobrien * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22236769Sobrien * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23236769Sobrien * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24236769Sobrien * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25236769Sobrien * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26236769Sobrien * POSSIBILITY OF SUCH DAMAGE.
27236769Sobrien */
28236769Sobrien
29236769Sobrien#ifndef USE_EMALLOC
30236769Sobrienvoid *bmake_malloc(size_t);
31236769Sobrienvoid *bmake_realloc(void *, size_t);
32236769Sobrienchar *bmake_strdup(const char *);
33236769Sobrienchar *bmake_strndup(const char *, size_t);
34236769Sobrien#else
35236769Sobrien#include <util.h>
36236769Sobrien#define bmake_malloc(x)         emalloc(x)
37236769Sobrien#define bmake_realloc(x,y)      erealloc(x,y)
38236769Sobrien#define bmake_strdup(x)         estrdup(x)
39236769Sobrien#define bmake_strndup(x,y)      estrndup(x,y)
40236769Sobrien#endif
41236769Sobrien
42