xref: /original-bsd/sys/hp300/include/varargs.h (revision 3705696b)
1 /*-
2  * Copyright (c) 1990, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)varargs.h	8.1 (Berkeley) 06/10/93
8  */
9 
10 #ifndef _VARARGS_H_
11 #define	_VARARGS_H_
12 
13 typedef char *va_list;
14 
15 #define	va_dcl	int va_alist;
16 
17 #define	va_start(ap) \
18 	ap = (char *)&va_alist
19 
20 #ifdef KERNEL
21 #define	va_arg(ap, type) \
22 	((type *)(ap += sizeof(type)))[-1]
23 #else
24 #define	va_arg(ap, type) \
25 	((type *)(ap += sizeof(type) < sizeof(int) ? \
26 		(abort(), 0) : sizeof(type)))[-1]
27 #endif
28 
29 #define	va_end(ap)
30 
31 #endif /* !_VARARGS_H_ */
32