summaryrefslogtreecommitdiff
path: root/lib/libwrap
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
commit3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch)
tree1a8b19c5db03f8c989fc8228811837b182feb7a3 /lib/libwrap
parentcc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff)
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'lib/libwrap')
-rw-r--r--lib/libwrap/diag.c16
-rw-r--r--lib/libwrap/tcpd.h22
-rw-r--r--lib/libwrap/update.c16
3 files changed, 17 insertions, 37 deletions
diff --git a/lib/libwrap/diag.c b/lib/libwrap/diag.c
index ed8d064ed56..4a1ea0db067 100644
--- a/lib/libwrap/diag.c
+++ b/lib/libwrap/diag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diag.c,v 1.1 1997/02/26 03:06:50 downsj Exp $ */
+/* $OpenBSD: diag.c,v 1.2 2002/02/19 19:39:37 millert Exp $ */
/*
* Routines to report various classes of problems. Each report is decorated
@@ -15,7 +15,7 @@
#if 0
static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
#else
-static char rcsid[] = "$OpenBSD: diag.c,v 1.1 1997/02/26 03:06:50 downsj Exp $";
+static char rcsid[] = "$OpenBSD: diag.c,v 1.2 2002/02/19 19:39:37 millert Exp $";
#endif
#endif
@@ -53,23 +53,23 @@ va_list ap;
/* tcpd_warn - report problem of some sort and proceed */
-void VARARGS(tcpd_warn, char *, format)
+void tcpd_warn(char *format, ...)
{
va_list ap;
- VASTART(ap, char *, format);
+ va_start(ap, format);
tcpd_diag(LOG_ERR, "warning", format, ap);
- VAEND(ap);
+ va_end(ap);
}
/* tcpd_jump - report serious problem and jump */
-void VARARGS(tcpd_jump, char *, format)
+void tcpd_jump(char *format, ...)
{
va_list ap;
- VASTART(ap, char *, format);
+ va_start(ap, format);
tcpd_diag(LOG_ERR, "error", format, ap);
- VAEND(ap);
+ va_end(ap);
longjmp(tcpd_buf, AC_ERROR);
}
diff --git a/lib/libwrap/tcpd.h b/lib/libwrap/tcpd.h
index a49c71f44e1..fed8e6c888c 100644
--- a/lib/libwrap/tcpd.h
+++ b/lib/libwrap/tcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpd.h,v 1.12 2002/02/16 21:27:29 millert Exp $ */
+/* $OpenBSD: tcpd.h,v 1.13 2002/02/19 19:39:38 millert Exp $ */
/*
* Copyright (c) 1997, Jason Downs. All rights reserved.
@@ -219,24 +219,4 @@ extern void process_options(char *, struct request_info *);
extern int dry_run; /* verification flag */
__END_DECLS
-
-#ifdef _TCPD_PRIVATE
- /*
- * What follows is an attempt to unify varargs.h and stdarg.h. I'd rather
- * have this than #ifdefs all over the code.
- *
- * The code using these must include the proper system header.
- */
-
-#ifdef __STDC__
-#define VARARGS(func,type,arg) func(type arg, ...)
-#define VASTART(ap,type,name) va_start(ap,name)
-#define VAEND(ap) va_end(ap)
-#else
-#define VARARGS(func,type,arg) func(va_alist) va_dcl
-#define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type)
-#define VAEND(ap) va_end(ap);}
-#endif
-#endif /* _TCPD_PRIVATE */
-
#endif /* _TCPD_H_ */
diff --git a/lib/libwrap/update.c b/lib/libwrap/update.c
index 6200324a60d..aac3807755f 100644
--- a/lib/libwrap/update.c
+++ b/lib/libwrap/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.3 2001/11/07 18:49:21 deraadt Exp $ */
+/* $OpenBSD: update.c,v 1.4 2002/02/19 19:39:38 millert Exp $ */
/*
* Routines for controlled update/initialization of request structures.
@@ -19,7 +19,7 @@
#if 0
static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56";
#else
-static char rcsid[] = "$OpenBSD: update.c,v 1.3 2001/11/07 18:49:21 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: update.c,v 1.4 2002/02/19 19:39:38 millert Exp $";
#endif
#endif
@@ -89,7 +89,7 @@ va_list ap;
/* request_init - initialize request structure */
-struct request_info *VARARGS(request_init, struct request_info *, request)
+struct request_info *request_init(struct request_info *request, ...)
{
static struct request_info default_info;
struct request_info *r;
@@ -100,7 +100,7 @@ struct request_info *VARARGS(request_init, struct request_info *, request)
* members, to avoid pulling in the whole socket module when it is not
* really needed.
*/
- VASTART(ap, struct request_info *, request);
+ va_start(ap, request);
*request = default_info;
request->fd = -1;
strlcpy(request->daemon, unknown, sizeof(request->daemon));
@@ -108,19 +108,19 @@ struct request_info *VARARGS(request_init, struct request_info *, request)
request->client->request = request;
request->server->request = request;
r = request_fill(request, ap);
- VAEND(ap);
+ va_end(ap);
return (r);
}
/* request_set - update request structure */
-struct request_info *VARARGS(request_set, struct request_info *, request)
+struct request_info *request_set(struct request_info *request, ...)
{
struct request_info *r;
va_list ap;
- VASTART(ap, struct request_info *, request);
+ va_start(ap, request);
r = request_fill(request, ap);
- VAEND(ap);
+ va_end(ap);
return (r);
}