There is no point in creating an entry point for emalloc(), when all the other

functions are just defined in terms of ereallocz(). Fixes the sun2 build
because it avoids the conflict with emalloc() from libutil.
This commit is contained in:
christos 2012-02-04 16:31:02 +00:00
parent a8b152431d
commit b8867d0ef6
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntp_stdlib.h,v 1.4 2012/02/04 14:56:58 he Exp $ */
/* $NetBSD: ntp_stdlib.h,v 1.5 2012/02/04 16:31:02 christos Exp $ */
/*
* ntp_stdlib.h - Prototypes for NTP lib.
@ -90,8 +90,7 @@ extern u_int32 addr2refid (sockaddr_u *);
#ifndef EREALLOC_CALLSITE /* ntp_malloc.h defines */
extern void * ereallocz (void *, size_t, size_t, int);
#define erealloczsite(p, n, o, z, f, l) ereallocz(p, n, o, (z))
#define emalloc(arg) ntp_emalloc(arg)
extern void * emalloc (size_t);
#define emalloc(n) ereallocz(NULL, n, 0, FALSE)
#define emalloc_zero(c) ereallocz(NULL, (c), 0, TRUE)
#define erealloc(p, c) ereallocz(p, (c), 0, FALSE)
#define erealloc_zero(p, n, o) ereallocz(p, n, (o), TRUE)

View File

@ -1,4 +1,4 @@
/* $NetBSD: emalloc.c,v 1.1.1.2 2012/01/31 21:24:16 kardel Exp $ */
/* $NetBSD: emalloc.c,v 1.2 2012/02/04 16:31:02 christos Exp $ */
/*
* emalloc - return new memory obtained from the system. Belch if none.
@ -88,6 +88,7 @@ estrdup_impl(
}
#if 0
#ifndef EREALLOC_CALLSITE
void *
emalloc(size_t newsz)
@ -95,4 +96,5 @@ emalloc(size_t newsz)
return ereallocz(NULL, newsz, 0, FALSE);
}
#endif
#endif