whoops - forgot to commit header files
[reactos.git] / posix / include / stdarg.h
1 /*
2 * stdarg.h
3 *
4 * handle variable argument list. Based on the Single UNIX(r)
5 * Specification, Version 2
6 *
7 * This file is part of the ReactOS Operating System.
8 *
9 * Contributors:
10 * Created by KJK::Hyperion <noog@libero.it>
11 *
12 * THIS SOFTWARE IS NOT COPYRIGHTED
13 *
14 * This source code is offered for use in the public domain. You may
15 * use, modify or distribute it freely.
16 *
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.
21 *
22 */
23 #ifndef __STDARG_H_INCLUDED__
24 #define __STDARG_H_INCLUDED__
25
26 /* OBJECTS */
27
28 /* TYPES */
29 typedef char* va_list;
30
31 /* CONSTANTS */
32
33 /* PROTOTYPES */
34
35 /* MACROS */
36 /* taken from mingw's stdarg.h */
37
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))
42
43 #define va_start(ap, pN) \
44 ((ap) = ((va_list) (&pN) + __va_argsiz(pN)))
45
46 #define va_end(ap) ((void)0)
47
48 #define va_arg(ap, t) \
49 (((ap) = (ap) + __va_argsiz(t)), \
50 *((t*) (void*) ((ap) - __va_argsiz(t))))
51
52 #endif /* __STDARG_H_INCLUDED__ */
53
54 /* EOF */
55