Module Name: src
Committed By: christos
Date: Sat Feb 4 16:31:02 UTC 2012
Modified Files:
src/external/bsd/ntp/dist/include: ntp_stdlib.h
src/external/bsd/ntp/dist/libntp: emalloc.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/dist/include/ntp_stdlib.h
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/ntp/dist/libntp/emalloc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/include/ntp_stdlib.h
diff -u src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.4 src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.5
--- src/external/bsd/ntp/dist/include/ntp_stdlib.h:1.4 Sat Feb 4 09:56:58 2012
+++ src/external/bsd/ntp/dist/include/ntp_stdlib.h Sat Feb 4 11:31:02 2012
@@ -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)
Index: src/external/bsd/ntp/dist/libntp/emalloc.c
diff -u src/external/bsd/ntp/dist/libntp/emalloc.c:1.1.1.2 src/external/bsd/ntp/dist/libntp/emalloc.c:1.2
--- src/external/bsd/ntp/dist/libntp/emalloc.c:1.1.1.2 Tue Jan 31 16:24:16 2012
+++ src/external/bsd/ntp/dist/libntp/emalloc.c Sat Feb 4 11:31:02 2012
@@ -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