Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/dist There is no point in creating an entry...



details:   https://anonhg.NetBSD.org/src/rev/30dacab3d602
branches:  trunk
changeset: 773506:30dacab3d602
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 04 16:31:02 2012 +0000

description:
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.

diffstat:

 external/bsd/ntp/dist/include/ntp_stdlib.h |  5 ++---
 external/bsd/ntp/dist/libntp/emalloc.c     |  4 +++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 3aeb8747789a -r 30dacab3d602 external/bsd/ntp/dist/include/ntp_stdlib.h
--- a/external/bsd/ntp/dist/include/ntp_stdlib.h        Sat Feb 04 16:29:14 2012 +0000
+++ b/external/bsd/ntp/dist/include/ntp_stdlib.h        Sat Feb 04 16:31:02 2012 +0000
@@ -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 @@
 #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)
diff -r 3aeb8747789a -r 30dacab3d602 external/bsd/ntp/dist/libntp/emalloc.c
--- a/external/bsd/ntp/dist/libntp/emalloc.c    Sat Feb 04 16:29:14 2012 +0000
+++ b/external/bsd/ntp/dist/libntp/emalloc.c    Sat Feb 04 16:31:02 2012 +0000
@@ -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 @@
 }
 
 
+#if 0
 #ifndef EREALLOC_CALLSITE
 void *
 emalloc(size_t newsz)
@@ -95,4 +96,5 @@
        return ereallocz(NULL, newsz, 0, FALSE);
 }
 #endif
+#endif
 



Home | Main Index | Thread Index | Old Index