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