home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / enter-2004-01.iso / files / maxima-5.9.0.exe / {app} / lib / gcc-lib / mingw32 / 3.2 / include / stdarg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-09  |  4.4 KB  |  141 lines

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