4 * handle variable argument list. Based on the Single UNIX(r)
5 * Specification, Version 2
7 * This file is part of the ReactOS Operating System.
10 * Created by KJK::Hyperion <noog@libero.it>
12 * THIS SOFTWARE IS NOT COPYRIGHTED
14 * This source code is offered for use in the public domain. You may
15 * use, modify or distribute it freely.
17 * This code is distributed in the hope that it will be useful but
18 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
19 * DISCLAMED. This includes but is not limited to warranties of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 #ifndef __STDARG_H_INCLUDED__
24 #define __STDARG_H_INCLUDED__
29 typedef char* va_list;
36 /* taken from mingw's stdarg.h */
38 /* Amount of space required in an argument list (ie. the stack) for an
39 argument of type t. */
40 #define __va_argsiz(t) \
41 (((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
43 #define va_start(ap, pN) \
44 ((ap) = ((va_list) (&pN) + __va_argsiz(pN)))
46 #define va_end(ap) ((void)0)
48 #define va_arg(ap, t) \
49 (((ap) = (ap) + __va_argsiz(t)), \
50 *((t*) (void*) ((ap) - __va_argsiz(t))))
52 #endif /* __STDARG_H_INCLUDED__ */