-/* stdarg.h for GNU.
+/* Copyright (C) 1989-2017 Free Software Foundation, Inc.
- Note that the type used in va_arg is supposed to match the
- actual type **after default promotions**.
- Thus, va_arg (..., short) is not valid. */
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/*
+ * ISO C Standard: 7.15 Variable arguments <stdarg.h>
+ */
#ifndef _STDARG_H
#ifndef _ANSI_STDARG_H_
if this invocation was from the user program. */
#ifdef _STDARG_H
-#define va_start(v,l) __builtin_stdarg_start(&(v),l)
-#define va_end __builtin_va_end
-#define va_arg __builtin_va_arg
-#define va_copy(d,s) __builtin_va_copy(&(d),(s))
-
+#define va_start(v,l) __builtin_va_start(v,l)
+#define va_end(v) __builtin_va_end(v)
+#define va_arg(v,l) __builtin_va_arg(v,l)
+#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
+ || __cplusplus + 0 >= 201103L
+#define va_copy(d,s) __builtin_va_copy(d,s)
+#endif
+#define __va_copy(d,s) __builtin_va_copy(d,s)
/* Define va_list, if desired, from __gnuc_va_list. */
/* We deliberately do not define va_list when called from
but must not use that name. It should use the name __gnuc_va_list,
which is safe because it is reserved for the implementation. */
-#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
-#undef _VA_LIST
-#endif
-
#ifdef _BSD_VA_LIST
#undef _BSD_VA_LIST
#endif
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
#ifndef _VA_LIST_T_H
+/* The macro __va_list__ is used by BeOS. */
+#ifndef __va_list__
typedef __gnuc_va_list va_list;
+#endif /* not __va_list__ */
#endif /* not _VA_LIST_T_H */
#endif /* not _VA_LIST */
#endif /* not _VA_LIST_DEFINED */
#ifndef _VA_LIST_T_H
#define _VA_LIST_T_H
#endif
+#ifndef __va_list__
+#define __va_list__
+#endif
#endif /* not _VA_LIST_, except on certain systems */