xref: /original-bsd/sys/sparc/include/varargs.h (revision 5debf01e)
1 /*
2  * Copyright (c) 1992 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This software was developed by the Computer Systems Engineering group
6  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7  * contributed to Berkeley.
8  *
9  * All advertising materials mentioning features or use of this software
10  * must display the following acknowledgement:
11  *	This product includes software developed by the University of
12  *	California, Lawrence Berkeley Laboratories.
13  *
14  * %sccs.include.redist.c%
15  *
16  *	@(#)varargs.h	7.2 (Berkeley) 07/21/92
17  *
18  * from: $Header: varargs.h,v 1.4 92/06/17 06:10:31 torek Exp $
19  */
20 
21 #ifndef _MACHINE_VARARGS_H_
22 #define	_MACHINE_VARARGS_H_
23 
24 typedef char *va_list;
25 #define	va_dcl	int va_alist;
26 #define	va_start(ap) (__builtin_saveregs(), (ap) = (char *)&va_alist)
27 #define va_arg(ap, t)	(((t *)(ap += sizeof(t)))[-1])
28 #define va_end(ap) /* empty */
29 
30 #endif /* !_MACHINE_VARARGS_H_ */
31