summaryrefslogtreecommitdiff
path: root/lib/libwrap/mystdarg.h
blob: f22969dea52117126ad9f453fd6a6d2d68cf537a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*	$NetBSD: mystdarg.h,v 1.2 1997/10/09 21:20:37 christos Exp $	*/

 /*
  * What follows is an attempt to unify varargs.h and stdarg.h. I'd rather
  * have this than #ifdefs all over the code.
  */

#ifdef __STDC__
#include <stdarg.h>
#define VARARGS(func,type,arg) func(type arg, ...)
#define VASTART(ap,type,name)  va_start(ap,name)
#define VAEND(ap)              va_end(ap)
#else
#include <varargs.h>
#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