xref: /csrg-svn/sys/hp300/include/varargs.h (revision 66435)
141888Sbostic /*-
263160Sbostic  * Copyright (c) 1990, 1993
363160Sbostic  *	The Regents of the University of California.  All rights reserved.
4*66435Sbostic  * (c) UNIX System Laboratories, Inc.
5*66435Sbostic  * All or some portions of this file are derived from material licensed
6*66435Sbostic  * to the University of California by American Telephone and Telegraph
7*66435Sbostic  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8*66435Sbostic  * the permission of UNIX System Laboratories, Inc.
941888Sbostic  *
1041888Sbostic  * %sccs.include.redist.c%
1141888Sbostic  *
12*66435Sbostic  *	@(#)varargs.h	8.2 (Berkeley) 03/22/94
1341888Sbostic  */
1412198Ssam 
1547788Sbostic #ifndef _VARARGS_H_
1647788Sbostic #define	_VARARGS_H_
1747788Sbostic 
1852584Sbostic typedef char *va_list;
1941888Sbostic 
2041890Sbostic #define	va_dcl	int va_alist;
2141888Sbostic 
2241888Sbostic #define	va_start(ap) \
2341888Sbostic 	ap = (char *)&va_alist
2447788Sbostic 
2552584Sbostic #ifdef KERNEL
2652584Sbostic #define	va_arg(ap, type) \
2752584Sbostic 	((type *)(ap += sizeof(type)))[-1]
2852584Sbostic #else
2952584Sbostic #define	va_arg(ap, type) \
3052584Sbostic 	((type *)(ap += sizeof(type) < sizeof(int) ? \
3152584Sbostic 		(abort(), 0) : sizeof(type)))[-1]
3252584Sbostic #endif
3352584Sbostic 
3452584Sbostic #define	va_end(ap)
3552584Sbostic 
3647788Sbostic #endif /* !_VARARGS_H_ */
37