eo301@0
|
1 /*===---- stdarg.h - Variable argument handling ----------------------------===
|
eo301@0
|
2 *
|
eo301@0
|
3 * Copyright (c) 2008 Eli Friedman
|
eo301@0
|
4 *
|
eo301@0
|
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
|
eo301@0
|
6 * of this software and associated documentation files (the "Software"), to deal
|
eo301@0
|
7 * in the Software without restriction, including without limitation the rights
|
eo301@0
|
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
eo301@0
|
9 * copies of the Software, and to permit persons to whom the Software is
|
eo301@0
|
10 * furnished to do so, subject to the following conditions:
|
eo301@0
|
11 *
|
eo301@0
|
12 * The above copyright notice and this permission notice shall be included in
|
eo301@0
|
13 * all copies or substantial portions of the Software.
|
eo301@0
|
14 *
|
eo301@0
|
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
eo301@0
|
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
eo301@0
|
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
eo301@0
|
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
eo301@0
|
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
eo301@0
|
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
eo301@0
|
21 * THE SOFTWARE.
|
eo301@0
|
22 *
|
eo301@0
|
23 *===-----------------------------------------------------------------------===
|
eo301@0
|
24 */
|
eo301@0
|
25
|
eo301@0
|
26 #ifndef __STDARG_H
|
eo301@0
|
27 #define __STDARG_H
|
eo301@0
|
28
|
eo301@0
|
29 #ifndef _VA_LIST
|
eo301@0
|
30 typedef __builtin_va_list va_list;
|
eo301@0
|
31 #define _VA_LIST
|
eo301@0
|
32 #endif
|
eo301@0
|
33 #define va_start(ap, param) __builtin_va_start(ap, param)
|
eo301@0
|
34 #define va_end(ap) __builtin_va_end(ap)
|
eo301@0
|
35 #define va_arg(ap, type) __builtin_va_arg(ap, type)
|
eo301@0
|
36
|
eo301@0
|
37 /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
|
eo301@0
|
38 * or -ansi is not specified, since it was not part of C90.
|
eo301@0
|
39 */
|
eo301@0
|
40 #define __va_copy(d,s) __builtin_va_copy(d,s)
|
eo301@0
|
41
|
eo301@0
|
42 #if __STDC_VERSION__ >= 199900L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
|
eo301@0
|
43 #define va_copy(dest, src) __builtin_va_copy(dest, src)
|
eo301@0
|
44 #endif
|
eo301@0
|
45
|
eo301@0
|
46 /* Hack required to make standard headers work, at least on Ubuntu */
|
eo301@0
|
47 #define __GNUC_VA_LIST 1
|
eo301@0
|
48 typedef __builtin_va_list __gnuc_va_list;
|
eo301@0
|
49
|
eo301@0
|
50 #endif /* __STDARG_H */
|