summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2002-05-26 00:02:06 +0000
committerwiz <wiz@NetBSD.org>2002-05-26 00:02:06 +0000
commitbf840df2cdba0729bc7a94289ba477c48b4e0da7 (patch)
treecc28a6a0021548208caaf586c2671ec502420f5e /libexec
parentc632c8bea4d53868b577c0e9e15ed54638ff7320 (diff)
__STDC__ is always defined on NetBSD.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/fingerd/fingerd.c22
-rw-r--r--libexec/identd/identd.c6
-rw-r--r--libexec/ld.aout_so/rtld.c19
-rw-r--r--libexec/ld.elf_so/debug.c21
-rw-r--r--libexec/ld.elf_so/rtld.c15
-rw-r--r--libexec/ld.elf_so/xprintf.c91
-rw-r--r--libexec/mail.local/mail.local.c23
-rw-r--r--libexec/rexecd/rexecd.c22
-rw-r--r--libexec/telnetd/defs.h6
9 files changed, 26 insertions, 199 deletions
diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c
index 3c582c8724b..46d5fc971fd 100644
--- a/libexec/fingerd/fingerd.c
+++ b/libexec/fingerd/fingerd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fingerd.c,v 1.14 2002/04/09 00:55:15 thorpej Exp $ */
+/* $NetBSD: fingerd.c,v 1.15 2002/05/26 00:02:06 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "from: @(#)fingerd.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: fingerd.c,v 1.14 2002/04/09 00:55:15 thorpej Exp $");
+__RCSID("$NetBSD: fingerd.c,v 1.15 2002/05/26 00:02:06 wiz Exp $");
#endif
#endif /* not lint */
@@ -57,6 +57,7 @@ __RCSID("$NetBSD: fingerd.c,v 1.14 2002/04/09 00:55:15 thorpej Exp $");
#include <unistd.h>
#include <syslog.h>
#include <netdb.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -214,27 +215,12 @@ main(argc, argv)
exit(0);
}
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
void
-#if __STDC__
err(const char *fmt, ...)
-#else
-err(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
va_list ap;
-#if __STDC__
+
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
(void) vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
exit(1);
diff --git a/libexec/identd/identd.c b/libexec/identd/identd.c
index d00934dfeda..33a07cacaa9 100644
--- a/libexec/identd/identd.c
+++ b/libexec/identd/identd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: identd.c,v 1.11 2001/09/16 16:34:26 wiz Exp $ */
+/* $NetBSD: identd.c,v 1.12 2002/05/26 00:02:07 wiz Exp $ */
/*
** identd.c A TCP/IP link identification protocol server
@@ -11,10 +11,6 @@
** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
*/
-#if !defined(__STDC__) && !defined(_AIX)
-#define void int
-#endif
-
#if defined(IRIX) || defined(SVR4) || defined(NeXT) || (defined(sco) && sco >= 42) || defined(_AIX4) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(ultrix)
# define SIGRETURN_TYPE void
# define SIGRETURN_TYPE_IS_VOID
diff --git a/libexec/ld.aout_so/rtld.c b/libexec/ld.aout_so/rtld.c
index bc35b8e7168..b8baf09d007 100644
--- a/libexec/ld.aout_so/rtld.c
+++ b/libexec/ld.aout_so/rtld.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.82 2001/09/20 20:55:29 wiz Exp $ */
+/* $NetBSD: rtld.c,v 1.83 2002/05/26 00:02:07 wiz Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -46,15 +46,11 @@
#include <dlfcn.h>
#include <fcntl.h>
#include <a.out.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "shlib.h"
#include "ld.h"
@@ -1911,21 +1907,12 @@ __dlexit()
}
void
-#if __STDC__
xprintf(char *fmt, ...)
-#else
-xprintf(fmt, va_alist)
-char *fmt;
-#endif
{
char buf[256];
va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
+ va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
(void)write(1, buf, strlen(buf));
va_end(ap);
diff --git a/libexec/ld.elf_so/debug.c b/libexec/ld.elf_so/debug.c
index 138148d0885..dc22c1e8cfc 100644
--- a/libexec/ld.elf_so/debug.c
+++ b/libexec/ld.elf_so/debug.c
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.2 1999/03/01 16:40:07 christos Exp $ */
+/* $NetBSD: debug.c,v 1.3 2002/05/26 00:02:07 wiz Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -36,11 +36,7 @@
*/
#include <sys/cdefs.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include "debug.h"
#include "rtldenv.h"
@@ -49,26 +45,13 @@
int debug = 0;
void
-#ifdef __STDC__
debug_printf(const char *format, ...)
-#else
-debug_printf(va_alist)
- va_dcl
-#endif
{
if(debug) {
va_list ap;
-#ifdef __STDC__
- va_start(ap, format);
-#else
- const char *format;
-
- va_start(ap);
- format = va_arg(ap, const char *);
-#endif
+ va_start(ap, format);
xvprintf(format, ap);
-
va_end(ap);
xprintf("\n");
}
diff --git a/libexec/ld.elf_so/rtld.c b/libexec/ld.elf_so/rtld.c
index 50b5f652bd4..66509f688bd 100644
--- a/libexec/ld.elf_so/rtld.c
+++ b/libexec/ld.elf_so/rtld.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.48 2002/02/03 23:34:42 thorpej Exp $ */
+/* $NetBSD: rtld.c,v 1.49 2002/05/26 00:02:07 wiz Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -867,23 +867,12 @@ _rtld_dladdr(addr, info)
* will return the message.
*/
void
-#ifdef __STDC__
_rtld_error(const char *fmt,...)
-#else
-_rtld_error(va_alist)
- va_dcl
-#endif
{
static char buf[512];
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- const char *fmt;
- va_start(ap);
- fmt = va_arg(ap, const char *);
-#endif
+ va_start(ap, fmt);
xvsnprintf(buf, sizeof buf, fmt, ap);
error_message = buf;
va_end(ap);
diff --git a/libexec/ld.elf_so/xprintf.c b/libexec/ld.elf_so/xprintf.c
index 3f4509e8790..a93ac8995ae 100644
--- a/libexec/ld.elf_so/xprintf.c
+++ b/libexec/ld.elf_so/xprintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xprintf.c,v 1.8 2001/08/14 20:13:56 eeh Exp $ */
+/* $NetBSD: xprintf.c,v 1.9 2002/05/26 00:02:07 wiz Exp $ */
/*
* Copyright 1996 Matt Thomas <matt@3am-software.com>
@@ -33,11 +33,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef RTLD_LOADER
#define SZ_SHORT 0x01
@@ -213,23 +209,11 @@ xvprintf(fmt, ap)
}
void
-#ifdef __STDC__
xprintf(const char *fmt, ...)
-#else
-xprintf(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- const char *fmt;
-
- va_start(ap);
- fmt = va_arg(ap, const char *);
-#endif
xvprintf(fmt, ap);
@@ -237,26 +221,12 @@ xprintf(va_alist)
}
void
-#ifdef __STDC__
xsnprintf(char *buf, size_t buflen, const char *fmt, ...)
-#else
-xsnprintf(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
+
va_start(ap, fmt);
-#else
- char *buf;
- size_t buflen;
- const char *fmt;
- va_start(ap);
- buf = va_arg(ap, char *);
- buflen = va_arg(ap, size_t);
- fmt = va_arg(ap, const char *);
-#endif
xvsnprintf(buf, buflen, fmt, ap);
va_end(ap);
@@ -275,25 +245,11 @@ xstrerror(error)
}
void
-#ifdef __STDC__
xerrx(int eval, const char *fmt, ...)
-#else
-xerrx(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- int eval;
- const char *fmt;
-
- va_start(ap);
- eval = va_arg(ap, int);
- fmt = va_arg(ap, const char *);
-#endif
+ va_start(ap, fmt);
xvprintf(fmt, ap);
va_end(ap);
@@ -301,25 +257,12 @@ xerrx(va_alist)
}
void
-#ifdef __STDC__
xerr(int eval, const char *fmt, ...)
-#else
-xerr(va_alist)
- va_dcl
-#endif
{
int saved_errno = errno;
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- int eval;
- const char *fmt;
- va_start(ap);
- eval = va_arg(ap, int);
- fmt = va_arg(ap, const char *);
-#endif
+ va_start(ap, fmt);
xvprintf(fmt, ap);
va_end(ap);
@@ -328,23 +271,12 @@ xerr(va_alist)
}
void
-#ifdef __STDC__
xwarn(const char *fmt, ...)
-#else
-xwarn(va_alist)
- va_dcl
-#endif
{
int saved_errno = errno;
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- const char *fmt;
- va_start(ap);
- fmt = va_arg(ap, const char *);
-#endif
+ va_start(ap, fmt);
xvprintf(fmt, ap);
va_end(ap);
@@ -353,22 +285,11 @@ xwarn(va_alist)
}
void
-#ifdef __STDC__
xwarnx(const char *fmt, ...)
-#else
-xwarnx(va_alist)
- va_dcl
-#endif
{
va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- const char *fmt;
- va_start(ap);
- fmt = va_arg(ap, const char *);
-#endif
+ va_start(ap, fmt);
xvprintf(fmt, ap);
(void) write(2, "\n", 1);
va_end(ap);
diff --git a/libexec/mail.local/mail.local.c b/libexec/mail.local/mail.local.c
index bec3a4c4c17..c72ce993b3a 100644
--- a/libexec/mail.local/mail.local.c
+++ b/libexec/mail.local/mail.local.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mail.local.c,v 1.19 2001/12/20 20:10:35 soren Exp $ */
+/* $NetBSD: mail.local.c,v 1.20 2002/05/26 00:02:08 wiz Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95";
#else
-__RCSID("$NetBSD: mail.local.c,v 1.19 2001/12/20 20:10:35 soren Exp $");
+__RCSID("$NetBSD: mail.local.c,v 1.20 2002/05/26 00:02:08 wiz Exp $");
#endif
#endif /* not lint */
@@ -54,6 +54,7 @@ __RCSID("$NetBSD: mail.local.c,v 1.19 2001/12/20 20:10:35 soren Exp $");
#include <fcntl.h>
#include <pwd.h>
#include <netdb.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -305,28 +306,12 @@ usage()
err(FATAL, "usage: mail.local [-l] [-f from] user ...");
}
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
void
-#if __STDC__
err(int isfatal, const char *fmt, ...)
-#else
-err(isfatal, fmt)
- int isfatal;
- char *fmt;
- va_dcl
-#endif
{
va_list ap;
-#if __STDC__
+
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
vsyslog(LOG_ERR, fmt, ap);
va_end(ap);
if (isfatal)
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c
index 1414b3675ed..745ada9cbe0 100644
--- a/libexec/rexecd/rexecd.c
+++ b/libexec/rexecd/rexecd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rexecd.c,v 1.9 2001/09/24 13:22:31 wiz Exp $ */
+/* $NetBSD: rexecd.c,v 1.10 2002/05/26 00:02:08 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0
static char sccsid[] = "from: @(#)rexecd.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: rexecd.c,v 1.9 2001/09/24 13:22:31 wiz Exp $");
+__RCSID("$NetBSD: rexecd.c,v 1.10 2002/05/26 00:02:08 wiz Exp $");
#endif
#endif /* not lint */
@@ -59,6 +59,7 @@ __RCSID("$NetBSD: rexecd.c,v 1.9 2001/09/24 13:22:31 wiz Exp $");
#include <paths.h>
#include <pwd.h>
#include <signal.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -287,30 +288,13 @@ doit(f, fromp)
exit(1);
}
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
void
-#ifdef __STDC__
error(const char *fmt, ...)
-#else
-error(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
{
char buf[BUFSIZ];
va_list ap;
-#ifdef __STDC__
va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-
buf[0] = 1;
(void)vsnprintf(buf+1, sizeof(buf) - 1, fmt, ap);
(void)write(2, buf, strlen(buf));
diff --git a/libexec/telnetd/defs.h b/libexec/telnetd/defs.h
index 4a1d45c041f..b2e479bace9 100644
--- a/libexec/telnetd/defs.h
+++ b/libexec/telnetd/defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.10 2001/08/24 00:14:03 wiz Exp $ */
+/* $NetBSD: defs.h,v 1.11 2002/05/26 00:02:08 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -83,9 +83,7 @@
#include <arpa/telnet.h>
#include <stdio.h>
-#ifdef __STDC__
#include <stdlib.h>
-#endif
#include <signal.h>
#include <errno.h>
#include <netdb.h>
@@ -118,9 +116,7 @@ typedef unsigned char cc_t;
#include <time.h>
-#ifdef __STDC__
#include <unistd.h>
-#endif
#ifndef _POSIX_VDISABLE
# ifdef VDISABLE