add prototype for getsubopt(3)
[unix-history] / usr / src / include / stdarg.h
CommitLineData
c98fe9aa
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
31ebf403 7 * @(#)stdarg.h 5.5 (Berkeley) %G%
c98fe9aa
KB
8 */
9
31ebf403
KB
10#ifndef _STDARG_H
11#define _STDARG_H
12
c98fe9aa
KB
13typedef char *va_list;
14
c98fe9aa 15#define va_arg(ap, type) \
0f72c2ef 16 ((type *)(ap += sizeof(type) < sizeof(int) ? \
b197dab6 17 (abort(), 0) : sizeof(type)))[-1]
0f72c2ef 18
c98fe9aa 19#define va_end(ap)
0f72c2ef
KB
20
21#define __va_promote(type) \
22 (((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
23
c98fe9aa 24#define va_start(ap, last) \
0f72c2ef 25 (ap = ((char *)&(last) + __va_promote(last)))
31ebf403
KB
26
27#endif /* !_STDARG_H */