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