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