Libraries updates and cleanup

* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
This commit is contained in:
2012-11-15 12:06:41 +01:00
parent f6aac1c3b5
commit f14fb60209
1285 changed files with 44244 additions and 14308 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: vasprintf.c,v 1.12 2009/10/25 20:44:13 christos Exp $ */
/* $NetBSD: vasprintf.c,v 1.14 2012/03/15 18:22:30 christos Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: vasprintf.c,v 1.12 2009/10/25 20:44:13 christos Exp $");
__RCSID("$NetBSD: vasprintf.c,v 1.14 2012/03/15 18:22:30 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -40,10 +40,7 @@ __RCSID("$NetBSD: vasprintf.c,v 1.12 2009/10/25 20:44:13 christos Exp $");
#include "local.h"
int
vasprintf(str, fmt, ap)
char **str;
const char *fmt;
_BSD_VA_LIST_ ap;
vasprintf(char **str, const char *fmt, va_list ap)
{
int ret;
FILE f;
@@ -68,12 +65,12 @@ vasprintf(str, fmt, ap)
if (_base == NULL)
goto err;
*str = (char *)_base;
return (ret);
return ret;
err:
if (f._bf._base)
free(f._bf._base);
*str = NULL;
errno = ENOMEM;
return (-1);
return -1;
}