xref: /csrg-svn/sys/hp300/include/stdarg.h (revision 47791)
1*47791Sbostic /*-
2*47791Sbostic  * Copyright (c) 1991 The Regents of the University of California.
3*47791Sbostic  * All rights reserved.
4*47791Sbostic  *
5*47791Sbostic  * %sccs.include.redist.c%
6*47791Sbostic  *
7*47791Sbostic  *	@(#)stdarg.h	7.1 (Berkeley) 04/03/91
8*47791Sbostic  */
9*47791Sbostic 
10*47791Sbostic typedef char *va_list;
11*47791Sbostic 
12*47791Sbostic #define	va_arg(ap, type) \
13*47791Sbostic 	((type *)(ap += sizeof(type) < sizeof(int) ? \
14*47791Sbostic 		(abort(), 0) : sizeof(type)))[-1]
15*47791Sbostic 
16*47791Sbostic #define	va_end(ap)
17*47791Sbostic 
18*47791Sbostic #define	__va_promote(type) \
19*47791Sbostic 	(((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
20*47791Sbostic 
21*47791Sbostic #define	va_start(ap, last) \
22*47791Sbostic 	(ap = ((char *)&(last) + __va_promote(last)))
23