diff options
| author | wiz <wiz@NetBSD.org> | 2002-05-26 14:43:59 +0000 |
|---|---|---|
| committer | wiz <wiz@NetBSD.org> | 2002-05-26 14:43:59 +0000 |
| commit | 3fb28eec1f0ef05fee55cc6fb876fd8414ca7de2 (patch) | |
| tree | 6278601a38e0f5c2f353dcdb834e91cab025e3bc /lib/libc/stdio/asprintf.c | |
| parent | 94a6bb8164fe5282cc97c8a5cdf9261e9db1f416 (diff) | |
__STDC__ is always defined on NetBSD.
Diffstat (limited to 'lib/libc/stdio/asprintf.c')
| -rw-r--r-- | lib/libc/stdio/asprintf.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c index fe891ff560e..59820bc1e4c 100644 --- a/lib/libc/stdio/asprintf.c +++ b/lib/libc/stdio/asprintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: asprintf.c,v 1.10 2001/12/07 11:47:41 yamt Exp $ */ +/* $NetBSD: asprintf.c,v 1.11 2002/05/26 14:43:59 wiz Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -29,19 +29,15 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: asprintf.c,v 1.10 2001/12/07 11:47:41 yamt Exp $"); +__RCSID("$NetBSD: asprintf.c,v 1.11 2002/05/26 14:43:59 wiz Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include <assert.h> +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> -#if __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif #include "local.h" #ifdef __weak_alias @@ -49,14 +45,7 @@ __weak_alias(asprintf, _asprintf) #endif int -#if __STDC__ asprintf(char **str, char const *fmt, ...) -#else -asprintf(str, fmt, va_alist) - char **str; - const char *fmt; - va_dcl -#endif { int ret; va_list ap; @@ -73,11 +62,7 @@ asprintf(str, fmt, va_alist) if (f._bf._base == NULL) goto err; f._bf._size = f._w = 127; /* Leave room for the NUL */ -#if __STDC__ va_start(ap, fmt); -#else - va_start(ap); -#endif ret = vfprintf(&f, fmt, ap); va_end(ap); if (ret == -1) |
