__STDC__ is always defined on NetBSD.

This commit is contained in:
wiz 2002-05-26 00:02:06 +00:00
parent c632c8bea4
commit bf840df2cd
10 changed files with 28 additions and 205 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ssh.c,v 1.1.1.1 1995/10/08 23:08:46 gwr Exp $ */
/* $NetBSD: ssh.c,v 1.2 2002/05/26 00:09:09 wiz Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@ -53,11 +53,7 @@
#endif
#ifndef __P
#ifdef __STDC__
#define __P(x) x
#else /* STDC */
#define __P(x) ()
#endif /* STDC */
#endif /* __P */
extern char *optarg;

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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
xvprintf(format, ap);
va_end(ap);
xprintf("\n");
}

View File

@ -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);

View File

@ -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
va_start(ap, fmt);
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
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);

View File

@ -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)

View File

@ -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));

View File

@ -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