Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
2013-12-06 12:04:52 +01:00
parent ff10274392
commit 84d9c625bf
4655 changed files with 379317 additions and 151059 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: xmalloc.c,v 1.11 2011/05/25 14:41:46 christos Exp $ */
/* $NetBSD: xmalloc.c,v 1.12 2013/01/24 17:57:29 christos Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -77,7 +77,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: xmalloc.c,v 1.11 2011/05/25 14:41:46 christos Exp $");
__RCSID("$NetBSD: xmalloc.c,v 1.12 2013/01/24 17:57:29 christos Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -369,12 +369,13 @@ irealloc(void *cp, size_t nbytes)
*(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
#endif
return(cp);
} else
xfree(cp);
}
if ((res = imalloc(nbytes)) == NULL)
return (NULL);
if (cp != res) /* common optimization if "compacting" */
if (cp != res) { /* common optimization if "compacting" */
memcpy(res, cp, (nbytes < onb) ? nbytes : onb);
xfree(cp);
}
return (res);
}