summaryrefslogtreecommitdiff
path: root/lib
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
parent94a6bb8164fe5282cc97c8a5cdf9261e9db1f416 (diff)
__STDC__ is always defined on NetBSD.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdio/asprintf.c21
-rw-r--r--lib/libc/stdio/fprintf.c21
-rw-r--r--lib/libc/stdio/fscanf.c28
-rw-r--r--lib/libc/stdio/fvwrite.h6
-rw-r--r--lib/libc/stdio/printf.c21
-rw-r--r--lib/libc/stdio/scanf.c20
-rw-r--r--lib/libc/stdio/snprintf.c23
-rw-r--r--lib/libc/stdio/sprintf.c24
-rw-r--r--lib/libc/stdio/sscanf.c22
-rw-r--r--lib/libc/stdio/vfprintf.c11
-rw-r--r--lib/libc/stdio/vfscanf.c10
11 files changed, 37 insertions, 170 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)
diff --git a/lib/libc/stdio/fprintf.c b/lib/libc/stdio/fprintf.c
index dc6850f7707..41aeadcc20c 100644
--- a/lib/libc/stdio/fprintf.c
+++ b/lib/libc/stdio/fprintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fprintf.c,v 1.8 1999/09/20 04:39:27 lukem Exp $ */
+/* $NetBSD: fprintf.c,v 1.9 2002/05/26 14:43:59 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,28 +41,17 @@
#if 0
static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: fprintf.c,v 1.8 1999/09/20 04:39:27 lukem Exp $");
+__RCSID("$NetBSD: fprintf.c,v 1.9 2002/05/26 14:43:59 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 <stdio.h>
int
-#if __STDC__
fprintf(FILE *fp, const char *fmt, ...)
-#else
-fprintf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -70,11 +59,7 @@ fprintf(fp, fmt, va_alist)
_DIAGASSERT(fp != NULL);
_DIAGASSERT(fmt != NULL);
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = vfprintf(fp, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/fscanf.c b/lib/libc/stdio/fscanf.c
index 9a24cbd3423..ff62d07bdc4 100644
--- a/lib/libc/stdio/fscanf.c
+++ b/lib/libc/stdio/fscanf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fscanf.c,v 1.9 2002/05/24 22:17:20 thorpej Exp $ */
+/* $NetBSD: fscanf.c,v 1.10 2002/05/26 14:43:59 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,42 +41,24 @@
#if 0
static char sccsid[] = "@(#)fscanf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: fscanf.c,v 1.9 2002/05/24 22:17:20 thorpej Exp $");
+__RCSID("$NetBSD: fscanf.c,v 1.10 2002/05/26 14:43:59 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 <stdio.h>
#include "local.h"
int
-#if __STDC__
-fscanf(FILE *fp, char const *fmt, ...) {
- int ret;
- va_list ap;
-
- va_start(ap, fmt);
-#else
-fscanf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
+fscanf(FILE *fp, char const *fmt, ...)
{
int ret;
va_list ap;
- _DIAGASSERT(fp != NULL);
- _DIAGASSERT(fmt != NULL);
-
- va_start(ap);
-#endif
+ va_start(ap, fmt);
ret = __svfscanf(fp, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/fvwrite.h b/lib/libc/stdio/fvwrite.h
index 74d9a22e1d9..ba721b23c93 100644
--- a/lib/libc/stdio/fvwrite.h
+++ b/lib/libc/stdio/fvwrite.h
@@ -1,4 +1,4 @@
-/* $NetBSD: fvwrite.h,v 1.4 1998/09/08 15:10:12 kleink Exp $ */
+/* $NetBSD: fvwrite.h,v 1.5 2002/05/26 14:43:59 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -51,8 +51,4 @@ struct __suio {
int uio_resid;
};
-#if __STDC__ || __cplusplus
extern int __sfvwrite(FILE *, struct __suio *);
-#else
-extern int __sfvwrite();
-#endif
diff --git a/lib/libc/stdio/printf.c b/lib/libc/stdio/printf.c
index aab554ccc5b..90162998998 100644
--- a/lib/libc/stdio/printf.c
+++ b/lib/libc/stdio/printf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: printf.c,v 1.8 1999/09/20 04:39:31 lukem Exp $ */
+/* $NetBSD: printf.c,v 1.9 2002/05/26 14:43:59 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,37 +41,22 @@
#if 0
static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: printf.c,v 1.8 1999/09/20 04:39:31 lukem Exp $");
+__RCSID("$NetBSD: printf.c,v 1.9 2002/05/26 14:43:59 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 <stdio.h>
int
-#if __STDC__
printf(char const *fmt, ...)
-#else
-printf(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
-
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = vfprintf(stdout, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c
index dd88c6c5382..c72647d129a 100644
--- a/lib/libc/stdio/scanf.c
+++ b/lib/libc/stdio/scanf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: scanf.c,v 1.9 2002/05/24 22:17:20 thorpej Exp $ */
+/* $NetBSD: scanf.c,v 1.10 2002/05/26 14:44:00 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,40 +41,26 @@
#if 0
static char sccsid[] = "@(#)scanf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: scanf.c,v 1.9 2002/05/24 22:17:20 thorpej Exp $");
+__RCSID("$NetBSD: scanf.c,v 1.10 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 <stdio.h>
#include "local.h"
int
-#if __STDC__
scanf(char const *fmt, ...)
-#else
-scanf(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
_DIAGASSERT(fmt != NULL);
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = __svfscanf(stdin, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c
index 5c35a8365b3..6e41038461c 100644
--- a/lib/libc/stdio/snprintf.c
+++ b/lib/libc/stdio/snprintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: snprintf.c,v 1.15 2001/12/07 11:47:43 yamt Exp $ */
+/* $NetBSD: snprintf.c,v 1.16 2002/05/26 14:44:00 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: snprintf.c,v 1.15 2001/12/07 11:47:43 yamt Exp $");
+__RCSID("$NetBSD: snprintf.c,v 1.16 2002/05/26 14:44:00 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -49,12 +49,9 @@ __RCSID("$NetBSD: snprintf.c,v 1.15 2001/12/07 11:47:43 yamt Exp $");
#include <assert.h>
#include <errno.h>
-#include <stdio.h>
-#if __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include <stdio.h>
+
#include "local.h"
#ifdef __weak_alias
@@ -62,15 +59,7 @@ __weak_alias(snprintf,_snprintf)
#endif
int
-#if __STDC__
snprintf(char *str, size_t n, char const *fmt, ...)
-#else
-snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -84,11 +73,7 @@ snprintf(str, n, fmt, va_alist)
errno = EINVAL;
return (-1);
}
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
_FILEEXT_SETUP(&f, &fext);
f._file = -1;
f._flags = __SWR | __SSTR;
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;
diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c
index 9ba37f55e2b..5ce6505143f 100644
--- a/lib/libc/stdio/sscanf.c
+++ b/lib/libc/stdio/sscanf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sscanf.c,v 1.12 2001/12/07 11:47:44 yamt Exp $ */
+/* $NetBSD: sscanf.c,v 1.13 2002/05/26 14:44:00 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,19 +41,16 @@
#if 0
static char sccsid[] = "@(#)sscanf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: sscanf.c,v 1.12 2001/12/07 11:47:44 yamt Exp $");
+__RCSID("$NetBSD: sscanf.c,v 1.13 2002/05/26 14:44:00 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
#include <errno.h>
+#include <stdarg.h>
#include <stdio.h>
#include <string.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+
#include "local.h"
static int eofread __P((void *, char *, int));
@@ -70,14 +67,7 @@ eofread(cookie, buf, len)
}
int
-#if __STDC__
sscanf(const char *str, char const *fmt, ...)
-#else
-sscanf(str, fmt, va_alist)
- const char *str;
- char *fmt;
- va_dcl
-#endif
{
int ret;
va_list ap;
@@ -95,11 +85,7 @@ sscanf(str, fmt, va_alist)
f._read = eofread;
_UB(&f)._base = NULL;
f._lb._base = NULL;
-#if __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
ret = __svfscanf(&f, fmt, ap);
va_end(ap);
return (ret);
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 4bc49374961..cd53f635bd1 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vfprintf.c,v 1.42 2001/12/07 11:47:44 yamt Exp $ */
+/* $NetBSD: vfprintf.c,v 1.43 2002/05/26 14:44:00 wiz Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -41,7 +41,7 @@
#if 0
static char *sccsid = "@(#)vfprintf.c 5.50 (Berkeley) 12/16/92";
#else
-__RCSID("$NetBSD: vfprintf.c,v 1.42 2001/12/07 11:47:44 yamt Exp $");
+__RCSID("$NetBSD: vfprintf.c,v 1.43 2002/05/26 14:44:00 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -56,6 +56,7 @@ __RCSID("$NetBSD: vfprintf.c,v 1.42 2001/12/07 11:47:44 yamt Exp $");
#include <assert.h>
#include <errno.h>
+#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
@@ -63,12 +64,6 @@ __RCSID("$NetBSD: vfprintf.c,v 1.42 2001/12/07 11:47:44 yamt Exp $");
#include <string.h>
#include <wchar.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
#include "local.h"
#include "fvwrite.h"
#include "extern.h"
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index 631f5b20fa8..b674a75c2b7 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vfscanf.c,v 1.31 2002/05/24 22:17:20 thorpej Exp $ */
+/* $NetBSD: vfscanf.c,v 1.32 2002/05/26 14:44:00 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: vfscanf.c,v 1.31 2002/05/24 22:17:20 thorpej Exp $");
+__RCSID("$NetBSD: vfscanf.c,v 1.32 2002/05/26 14:44:00 wiz Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -50,15 +50,11 @@ __RCSID("$NetBSD: vfscanf.c,v 1.31 2002/05/24 22:17:20 thorpej Exp $");
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
+#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "local.h"
#include "reentrant.h"