xref: /utopia/UTPA2-700.0.x/projects/tools/lint/aeon_include/stdarg.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi /* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
2*53ee8cc1Swenshuai.xi 
3*53ee8cc1Swenshuai.xi This file is part of GCC.
4*53ee8cc1Swenshuai.xi 
5*53ee8cc1Swenshuai.xi GCC is free software; you can redistribute it and/or modify
6*53ee8cc1Swenshuai.xi it under the terms of the GNU General Public License as published by
7*53ee8cc1Swenshuai.xi the Free Software Foundation; either version 2, or (at your option)
8*53ee8cc1Swenshuai.xi any later version.
9*53ee8cc1Swenshuai.xi 
10*53ee8cc1Swenshuai.xi GCC is distributed in the hope that it will be useful,
11*53ee8cc1Swenshuai.xi but WITHOUT ANY WARRANTY; without even the implied warranty of
12*53ee8cc1Swenshuai.xi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*53ee8cc1Swenshuai.xi GNU General Public License for more details.
14*53ee8cc1Swenshuai.xi 
15*53ee8cc1Swenshuai.xi You should have received a copy of the GNU General Public License
16*53ee8cc1Swenshuai.xi along with GCC; see the file COPYING.  If not, write to
17*53ee8cc1Swenshuai.xi the Free Software Foundation, 51 Franklin Street, Fifth Floor,
18*53ee8cc1Swenshuai.xi Boston, MA 02110-1301, USA.  */
19*53ee8cc1Swenshuai.xi 
20*53ee8cc1Swenshuai.xi /* As a special exception, if you include this header file into source
21*53ee8cc1Swenshuai.xi    files compiled by GCC, this header file does not by itself cause
22*53ee8cc1Swenshuai.xi    the resulting executable to be covered by the GNU General Public
23*53ee8cc1Swenshuai.xi    License.  This exception does not however invalidate any other
24*53ee8cc1Swenshuai.xi    reasons why the executable file might be covered by the GNU General
25*53ee8cc1Swenshuai.xi    Public License.  */
26*53ee8cc1Swenshuai.xi 
27*53ee8cc1Swenshuai.xi /*
28*53ee8cc1Swenshuai.xi  * ISO C Standard:  7.15  Variable arguments  <stdarg.h>
29*53ee8cc1Swenshuai.xi  */
30*53ee8cc1Swenshuai.xi 
31*53ee8cc1Swenshuai.xi #ifndef _STDARG_H
32*53ee8cc1Swenshuai.xi #ifndef _ANSI_STDARG_H_
33*53ee8cc1Swenshuai.xi #ifndef __need___va_list
34*53ee8cc1Swenshuai.xi #define _STDARG_H
35*53ee8cc1Swenshuai.xi #define _ANSI_STDARG_H_
36*53ee8cc1Swenshuai.xi #endif /* not __need___va_list */
37*53ee8cc1Swenshuai.xi #undef __need___va_list
38*53ee8cc1Swenshuai.xi 
39*53ee8cc1Swenshuai.xi /* Define __gnuc_va_list.  */
40*53ee8cc1Swenshuai.xi 
41*53ee8cc1Swenshuai.xi #ifndef __GNUC_VA_LIST
42*53ee8cc1Swenshuai.xi #define __GNUC_VA_LIST
43*53ee8cc1Swenshuai.xi typedef __builtin_va_list __gnuc_va_list;
44*53ee8cc1Swenshuai.xi #endif
45*53ee8cc1Swenshuai.xi 
46*53ee8cc1Swenshuai.xi /* Define the standard macros for the user,
47*53ee8cc1Swenshuai.xi    if this invocation was from the user program.  */
48*53ee8cc1Swenshuai.xi #ifdef _STDARG_H
49*53ee8cc1Swenshuai.xi 
50*53ee8cc1Swenshuai.xi #define va_start(v,l)	__builtin_va_start(v,l)
51*53ee8cc1Swenshuai.xi #define va_end(v)	__builtin_va_end(v)
52*53ee8cc1Swenshuai.xi #define va_arg(v,l)	__builtin_va_arg(v,l)
53*53ee8cc1Swenshuai.xi #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
54*53ee8cc1Swenshuai.xi #define va_copy(d,s)	__builtin_va_copy(d,s)
55*53ee8cc1Swenshuai.xi #endif
56*53ee8cc1Swenshuai.xi #define __va_copy(d,s)	__builtin_va_copy(d,s)
57*53ee8cc1Swenshuai.xi 
58*53ee8cc1Swenshuai.xi /* Define va_list, if desired, from __gnuc_va_list. */
59*53ee8cc1Swenshuai.xi /* We deliberately do not define va_list when called from
60*53ee8cc1Swenshuai.xi    stdio.h, because ANSI C says that stdio.h is not supposed to define
61*53ee8cc1Swenshuai.xi    va_list.  stdio.h needs to have access to that data type,
62*53ee8cc1Swenshuai.xi    but must not use that name.  It should use the name __gnuc_va_list,
63*53ee8cc1Swenshuai.xi    which is safe because it is reserved for the implementation.  */
64*53ee8cc1Swenshuai.xi 
65*53ee8cc1Swenshuai.xi #ifdef _HIDDEN_VA_LIST  /* On OSF1, this means varargs.h is "half-loaded".  */
66*53ee8cc1Swenshuai.xi #undef _VA_LIST
67*53ee8cc1Swenshuai.xi #endif
68*53ee8cc1Swenshuai.xi 
69*53ee8cc1Swenshuai.xi #ifdef _BSD_VA_LIST
70*53ee8cc1Swenshuai.xi #undef _BSD_VA_LIST
71*53ee8cc1Swenshuai.xi #endif
72*53ee8cc1Swenshuai.xi 
73*53ee8cc1Swenshuai.xi #if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
74*53ee8cc1Swenshuai.xi /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
75*53ee8cc1Swenshuai.xi    so we must avoid testing it and setting it here.
76*53ee8cc1Swenshuai.xi    SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
77*53ee8cc1Swenshuai.xi    have no conflict with that.  */
78*53ee8cc1Swenshuai.xi #ifndef _VA_LIST_
79*53ee8cc1Swenshuai.xi #define _VA_LIST_
80*53ee8cc1Swenshuai.xi #ifdef __i860__
81*53ee8cc1Swenshuai.xi #ifndef _VA_LIST
82*53ee8cc1Swenshuai.xi #define _VA_LIST va_list
83*53ee8cc1Swenshuai.xi #endif
84*53ee8cc1Swenshuai.xi #endif /* __i860__ */
85*53ee8cc1Swenshuai.xi typedef __gnuc_va_list va_list;
86*53ee8cc1Swenshuai.xi #ifdef _SCO_DS
87*53ee8cc1Swenshuai.xi #define __VA_LIST
88*53ee8cc1Swenshuai.xi #endif
89*53ee8cc1Swenshuai.xi #endif /* _VA_LIST_ */
90*53ee8cc1Swenshuai.xi #else /* not __svr4__ || _SCO_DS */
91*53ee8cc1Swenshuai.xi 
92*53ee8cc1Swenshuai.xi /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
93*53ee8cc1Swenshuai.xi    But on BSD NET2 we must not test or define or undef it.
94*53ee8cc1Swenshuai.xi    (Note that the comments in NET 2's ansi.h
95*53ee8cc1Swenshuai.xi    are incorrect for _VA_LIST_--see stdio.h!)  */
96*53ee8cc1Swenshuai.xi #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
97*53ee8cc1Swenshuai.xi /* The macro _VA_LIST_DEFINED is used in Windows NT 3.5  */
98*53ee8cc1Swenshuai.xi #ifndef _VA_LIST_DEFINED
99*53ee8cc1Swenshuai.xi /* The macro _VA_LIST is used in SCO Unix 3.2.  */
100*53ee8cc1Swenshuai.xi #ifndef _VA_LIST
101*53ee8cc1Swenshuai.xi /* The macro _VA_LIST_T_H is used in the Bull dpx2  */
102*53ee8cc1Swenshuai.xi #ifndef _VA_LIST_T_H
103*53ee8cc1Swenshuai.xi /* The macro __va_list__ is used by BeOS.  */
104*53ee8cc1Swenshuai.xi #ifndef __va_list__
105*53ee8cc1Swenshuai.xi typedef __gnuc_va_list va_list;
106*53ee8cc1Swenshuai.xi #endif /* not __va_list__ */
107*53ee8cc1Swenshuai.xi #endif /* not _VA_LIST_T_H */
108*53ee8cc1Swenshuai.xi #endif /* not _VA_LIST */
109*53ee8cc1Swenshuai.xi #endif /* not _VA_LIST_DEFINED */
110*53ee8cc1Swenshuai.xi #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
111*53ee8cc1Swenshuai.xi #define _VA_LIST_
112*53ee8cc1Swenshuai.xi #endif
113*53ee8cc1Swenshuai.xi #ifndef _VA_LIST
114*53ee8cc1Swenshuai.xi #define _VA_LIST
115*53ee8cc1Swenshuai.xi #endif
116*53ee8cc1Swenshuai.xi #ifndef _VA_LIST_DEFINED
117*53ee8cc1Swenshuai.xi #define _VA_LIST_DEFINED
118*53ee8cc1Swenshuai.xi #endif
119*53ee8cc1Swenshuai.xi #ifndef _VA_LIST_T_H
120*53ee8cc1Swenshuai.xi #define _VA_LIST_T_H
121*53ee8cc1Swenshuai.xi #endif
122*53ee8cc1Swenshuai.xi #ifndef __va_list__
123*53ee8cc1Swenshuai.xi #define __va_list__
124*53ee8cc1Swenshuai.xi #endif
125*53ee8cc1Swenshuai.xi 
126*53ee8cc1Swenshuai.xi #endif /* not _VA_LIST_, except on certain systems */
127*53ee8cc1Swenshuai.xi 
128*53ee8cc1Swenshuai.xi #endif /* not __svr4__ */
129*53ee8cc1Swenshuai.xi 
130*53ee8cc1Swenshuai.xi #endif /* _STDARG_H */
131*53ee8cc1Swenshuai.xi 
132*53ee8cc1Swenshuai.xi #endif /* not _ANSI_STDARG_H_ */
133*53ee8cc1Swenshuai.xi #endif /* not _STDARG_H */
134