summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/sprintf.c
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2002-05-26 14:43:59 +0000
committerwiz <wiz@NetBSD.org>2002-05-26 14:43:59 +0000
commit3fb28eec1f0ef05fee55cc6fb876fd8414ca7de2 (patch)
tree6278601a38e0f5c2f353dcdb834e91cab025e3bc /lib/libc/stdio/sprintf.c
parent94a6bb8164fe5282cc97c8a5cdf9261e9db1f416 (diff)
__STDC__ is always defined on NetBSD.
Diffstat (limited to 'lib/libc/stdio/sprintf.c')
-rw-r--r--lib/libc/stdio/sprintf.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c
index 5a9f40a3865..348fd232b2f 100644
--- a/lib/libc/stdio/sprintf.c
+++ b/lib/libc/stdio/sprintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sprintf.c,v 1.10 2001/12/07 11:47:44 yamt Exp $ */
+/* $NetBSD: sprintf.c,v 1.11 2002/05/26 14:44:00 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,30 +41,20 @@
#if 0
static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: sprintf.c,v 1.10 2001/12/07 11:47:44 yamt Exp $");
+__RCSID("$NetBSD: sprintf.c,v 1.11 2002/05/26 14:44:00 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <errno.h>
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
+
#include "local.h"
int
-#if __STDC__
sprintf(char *str, char const *fmt, ...)
-#else
-sprintf(str, fmt, va_alist)
- char *str;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -79,11 +69,7 @@ sprintf(str, fmt, va_alist)
f._flags = __SWR | __SSTR;
f._bf._base = f._p = (unsigned char *)str;
f._bf._size = f._w = INT_MAX;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = vfprintf(&f, fmt, ap);
va_end(ap);
*f._p = 0;