]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/libsa/i386/stdarg.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
29 * Revision 1.2 1998/09/30 21:21:00 wsanchez
30 * Merged in IntelMerge1 (mburg: Intel support)
32 * Revision 1.1.2.1 1998/09/30 18:19:49 mburg
33 * Changes for Intel port
35 * Revision 1.1.1.1 1998/03/07 02:25:36 wsanchez
36 * Import of OSF Mach kernel (~mburg)
38 * Revision 1.1.2.1 1996/09/17 16:56:26 bruel
39 * created from standalone mach servers
40 * [1996/09/17 16:18:07 bruel]
45 #ifndef _MACHINE_STDARG_H
46 #define _MACHINE_STDARG_H
48 #include <machine/va_list.h>
50 /* Amount of space required in an argument list for an arg of type TYPE.
51 TYPE may alternatively be an expression whose type is used. */
53 #define __va_rounded_size(TYPE) \
54 (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
56 #define va_start(AP, LASTARG) \
57 (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
59 void va_end (va_list); /* Defined in gnulib */
62 #define va_arg(AP, mode) \
63 (AP += __va_rounded_size (mode), \
64 *((mode *) (AP - __va_rounded_size (mode))))
66 #endif /* _MACHINE_STDARG_H */