155126Storek /* 255126Storek * Copyright (c) 1992 The Regents of the University of California. 355126Storek * All rights reserved. 455126Storek * 555126Storek * This software was developed by the Computer Systems Engineering group 655126Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 755126Storek * contributed to Berkeley. 855126Storek * 9*55501Sbostic * All advertising materials mentioning features or use of this software 10*55501Sbostic * must display the following acknowledgement: 11*55501Sbostic * This product includes software developed by the University of 12*55501Sbostic * California, Lawrence Berkeley Laboratories. 13*55501Sbostic * 1455126Storek * %sccs.include.redist.c% 1555126Storek * 16*55501Sbostic * @(#)stdarg.h 7.2 (Berkeley) 07/21/92 1755126Storek * 1855126Storek * from: $Header: stdarg.h,v 1.5 92/06/17 06:10:29 torek Exp $ 1955126Storek */ 2055126Storek 2155126Storek /* 2255126Storek * SPARC stdarg.h 2355126Storek */ 2455126Storek 2555126Storek #ifndef _MACHINE_STDARG_H 2655126Storek #define _MACHINE_STDARG_H 2755126Storek 2855126Storek typedef char *va_list; 2955126Storek 3055126Storek /* 3155126Storek * va_start sets ap to point to the first variable argument. 3255126Storek * The `last fixed argument' parameter l is ignored (and should 3355126Storek * never have been included in the ANSI standard!). 3455126Storek * 3555126Storek * va_end cleans up after va_start. There is nothing to do there. 3655126Storek */ 3755126Storek #define va_start(ap, l) (__builtin_saveregs(), \ 3855126Storek ap = (char *)__builtin_next_arg()) 3955126Storek #define va_end(ap) /* empty */ 4055126Storek 4155126Storek /* 4255126Storek * va_arg picks up the next argument of type `t'. Appending an 4355126Storek * asterisk to t must produce a pointer to t (i.e., t may not be, 4455126Storek * e.g., `int (*)()'). In addition, t must not be any type which 4555126Storek * undergoes promotion to some other type (e.g., char): it must 4655126Storek * be the promoted type instead. 4755126Storek */ 4855126Storek #define va_arg(ap, t) (((t *)(ap += sizeof(t)))[-1]) 4955126Storek 5055126Storek #endif /* _MACHINE_STDARG_H */ 51