TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
stdarg.h
1 
30 /* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2009 Free Software Foundation, Inc.
31 
32 This file is part of GCC.
33 
34 GCC is free software; you can redistribute it and/or modify
35 it under the terms of the GNU General Public License as published by
36 the Free Software Foundation; either version 3, or (at your option)
37 any later version.
38 
39 GCC is distributed in the hope that it will be useful,
40 but WITHOUT ANY WARRANTY; without even the implied warranty of
41 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 GNU General Public License for more details.
43 
44 Under Section 7 of GPL version 3, you are granted additional
45 permissions described in the GCC Runtime Library Exception, version
46 3.1, as published by the Free Software Foundation.
47 
48 You should have received a copy of the GNU General Public License and
49 a copy of the GCC Runtime Library Exception along with this program;
50 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
51 <http://www.gnu.org/licenses/>. */
52 
53 /*
54  * ISO C Standard: 7.15 Variable arguments <stdarg.h>
55  */
56 
57 #ifndef _STDARG_H
58 #ifndef _ANSI_STDARG_H_
59 #ifndef __need___va_list
60 #define _STDARG_H
61 #define _ANSI_STDARG_H_
62 #endif /* not __need___va_list */
63 #undef __need___va_list
64 
65 /* Define __gnuc_va_list. */
66 
67 #ifndef __GNUC_VA_LIST
68 #define __GNUC_VA_LIST
69 typedef __builtin_va_list __gnuc_va_list;
70 #endif
71 
72 /* Define the standard macros for the user,
73  if this invocation was from the user program. */
74 #ifdef _STDARG_H
75 
76 #define va_start(v,l) __builtin_va_start(v,l)
77 #define va_end(v) __builtin_va_end(v)
78 #define va_arg(v,l) __builtin_va_arg(v,l)
79 #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L || defined(__GXX_EXPERIMENTAL_CXX0X__)
80 #define va_copy(d,s) __builtin_va_copy(d,s)
81 #endif
82 #define __va_copy(d,s) __builtin_va_copy(d,s)
83 
84 /* Define va_list, if desired, from __gnuc_va_list. */
85 /* We deliberately do not define va_list when called from
86  stdio.h, because ANSI C says that stdio.h is not supposed to define
87  va_list. stdio.h needs to have access to that data type,
88  but must not use that name. It should use the name __gnuc_va_list,
89  which is safe because it is reserved for the implementation. */
90 
91 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
92 #undef _VA_LIST
93 #endif
94 
95 #ifdef _BSD_VA_LIST
96 #undef _BSD_VA_LIST
97 #endif
98 
99 #if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
100 /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
101  so we must avoid testing it and setting it here.
102  SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
103  have no conflict with that. */
104 #ifndef _VA_LIST_
105 #define _VA_LIST_
106 #ifdef __i860__
107 #ifndef _VA_LIST
108 #define _VA_LIST va_list
109 #endif
110 #endif /* __i860__ */
111 typedef __gnuc_va_list va_list;
112 #ifdef _SCO_DS
113 #define __VA_LIST
114 #endif
115 #endif /* _VA_LIST_ */
116 #else /* not __svr4__ || _SCO_DS */
117 
118 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
119  But on BSD NET2 we must not test or define or undef it.
120  (Note that the comments in NET 2's ansi.h
121  are incorrect for _VA_LIST_--see stdio.h!) */
122 #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
123 /* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */
124 #ifndef _VA_LIST_DEFINED
125 /* The macro _VA_LIST is used in SCO Unix 3.2. */
126 #ifndef _VA_LIST
127 /* The macro _VA_LIST_T_H is used in the Bull dpx2 */
128 #ifndef _VA_LIST_T_H
129 /* The macro __va_list__ is used by BeOS. */
130 #ifndef __va_list__
131 typedef __gnuc_va_list va_list;
132 #endif /* not __va_list__ */
133 #endif /* not _VA_LIST_T_H */
134 #endif /* not _VA_LIST */
135 #endif /* not _VA_LIST_DEFINED */
136 #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
137 #define _VA_LIST_
138 #endif
139 #ifndef _VA_LIST
140 #define _VA_LIST
141 #endif
142 #ifndef _VA_LIST_DEFINED
143 #define _VA_LIST_DEFINED
144 #endif
145 #ifndef _VA_LIST_T_H
146 #define _VA_LIST_T_H
147 #endif
148 #ifndef __va_list__
149 #define __va_list__
150 #endif
151 
152 #endif /* not _VA_LIST_, except on certain systems */
153 
154 #endif /* not __svr4__ */
155 
156 #endif /* _STDARG_H */
157 
158 #endif /* not _ANSI_STDARG_H_ */
159 #endif /* not _STDARG_H */