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