00001 /* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. 00002 00003 This file is part of GCC. 00004 00005 GCC is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2, or (at your option) 00008 any later version. 00009 00010 GCC is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with GCC; see the file COPYING. If not, write to 00017 the Free Software Foundation, 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. */ 00019 00020 /* As a special exception, if you include this header file into source 00021 files compiled by GCC, this header file does not by itself cause 00022 the resulting executable to be covered by the GNU General Public 00023 License. This exception does not however invalidate any other 00024 reasons why the executable file might be covered by the GNU General 00025 Public License. */ 00026 00027 /* 00028 * ISO C Standard: 7.15 Variable arguments <stdarg.h> 00029 */ 00030 00031 #ifndef _STDARG_H 00032 #ifndef _ANSI_STDARG_H_ 00033 #ifndef __need___va_list 00034 #define _STDARG_H 00035 #define _ANSI_STDARG_H_ 00036 #endif /* not __need___va_list */ 00037 #undef __need___va_list 00038 00039 /* Define __gnuc_va_list. */ 00040 00041 #ifndef __GNUC_VA_LIST 00042 #define __GNUC_VA_LIST 00043 typedef __builtin_va_list __gnuc_va_list; 00044 #endif 00045 00046 /* Define the standard macros for the user, 00047 if this invocation was from the user program. */ 00048 #ifdef _STDARG_H 00049 00050 #define va_start(v,l) __builtin_va_start(v,l) 00051 #define va_end(v) __builtin_va_end(v) 00052 #define va_arg(v,l) __builtin_va_arg(v,l) 00053 #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L 00054 #define va_copy(d,s) __builtin_va_copy(d,s) 00055 #endif 00056 #define __va_copy(d,s) __builtin_va_copy(d,s) 00057 00058 /* Define va_list, if desired, from __gnuc_va_list. */ 00059 /* We deliberately do not define va_list when called from 00060 stdio.h, because ANSI C says that stdio.h is not supposed to define 00061 va_list. stdio.h needs to have access to that data type, 00062 but must not use that name. It should use the name __gnuc_va_list, 00063 which is safe because it is reserved for the implementation. */ 00064 00065 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ 00066 #undef _VA_LIST 00067 #endif 00068 00069 #ifdef _BSD_VA_LIST 00070 #undef _BSD_VA_LIST 00071 #endif 00072 00073 #if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) 00074 /* SVR4.2 uses _VA_LIST for an internal alias for va_list, 00075 so we must avoid testing it and setting it here. 00076 SVR4 uses _VA_LIST as a flag in stdarg.h, but we should 00077 have no conflict with that. */ 00078 #ifndef _VA_LIST_ 00079 #define _VA_LIST_ 00080 #ifdef __i860__ 00081 #ifndef _VA_LIST 00082 #define _VA_LIST va_list 00083 #endif 00084 #endif /* __i860__ */ 00085 typedef __gnuc_va_list va_list; 00086 #ifdef _SCO_DS 00087 #define __VA_LIST 00088 #endif 00089 #endif /* _VA_LIST_ */ 00090 #else /* not __svr4__ || _SCO_DS */ 00091 00092 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. 00093 But on BSD NET2 we must not test or define or undef it. 00094 (Note that the comments in NET 2's ansi.h 00095 are incorrect for _VA_LIST_--see stdio.h!) */ 00096 #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT) 00097 /* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ 00098 #ifndef _VA_LIST_DEFINED 00099 /* The macro _VA_LIST is used in SCO Unix 3.2. */ 00100 #ifndef _VA_LIST 00101 /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ 00102 #ifndef _VA_LIST_T_H 00103 /* The macro __va_list__ is used by BeOS. */ 00104 #ifndef __va_list__ 00105 typedef __gnuc_va_list va_list; 00106 #endif /* not __va_list__ */ 00107 #endif /* not _VA_LIST_T_H */ 00108 #endif /* not _VA_LIST */ 00109 #endif /* not _VA_LIST_DEFINED */ 00110 #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__)) 00111 #define _VA_LIST_ 00112 #endif 00113 #ifndef _VA_LIST 00114 #define _VA_LIST 00115 #endif 00116 #ifndef _VA_LIST_DEFINED 00117 #define _VA_LIST_DEFINED 00118 #endif 00119 #ifndef _VA_LIST_T_H 00120 #define _VA_LIST_T_H 00121 #endif 00122 #ifndef __va_list__ 00123 #define __va_list__ 00124 #endif 00125 00126 #endif /* not _VA_LIST_, except on certain systems */ 00127 00128 #endif /* not __svr4__ */ 00129 00130 #endif /* _STDARG_H */ 00131 00132 #endif /* not _ANSI_STDARG_H_ */ 00133 #endif /* not _STDARG_H */
1.5.6