aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-06-26 08:44:34 +0000
committerRichard Stallman <rms@gnu.org>1992-06-26 08:44:34 +0000
commit0a85964eacc531cc61819273947ff9018b57a03c (patch)
tree65bb89fcceb1510263b50e91d15e6fed209bf620
parent59d527639cec7c403ea8790c9b15925c0b38327c (diff)
downloadgcc-0a85964eacc531cc61819273947ff9018b57a03c.zip
gcc-0a85964eacc531cc61819273947ff9018b57a03c.tar.gz
gcc-0a85964eacc531cc61819273947ff9018b57a03c.tar.bz2
*** empty log message ***
From-SVN: r1294
-rw-r--r--gcc/ginclude/stdarg.h52
1 files changed, 36 insertions, 16 deletions
diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h
index 0c00311..86b426e 100644
--- a/gcc/ginclude/stdarg.h
+++ b/gcc/ginclude/stdarg.h
@@ -4,7 +4,10 @@
Thus, va_arg (..., short) is not valid. */
#ifndef _STDARG_H
+#ifndef __need___va_list
#define _STDARG_H
+#endif
+#undef __need___va_list
#ifndef __GNUC__
/* Use the system's macros with the system's compiler. */
@@ -29,23 +32,20 @@
#include "va-i960.h"
#else
-#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
-#undef _VA_LIST
-#endif
+/* Define __gnuc_va_list. */
-/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
-#ifndef _VA_LIST_
-/* The macro _VA_LIST is used in SCO Unix 3.2. */
-#ifndef _VA_LIST
-#define _VA_LIST_
-#define _VA_LIST
-#ifndef __svr4__
-typedef char *va_list;
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST
+#ifdef __svr4__
+typedef char *__gnuc_va_list;
#else
-typedef void *va_list;
+typedef void *__gnuc_va_list;
#endif
-#endif /* _VA_LIST */
-#endif /* _VA_LIST_ */
+#endif
+
+/* Define the standard macros for the user,
+ if this invocation was from the user program. */
+#ifdef __STDARG_H
/* Amount of space required in an argument list for an arg of type TYPE.
TYPE may alternatively be an expression whose type is used. */
@@ -56,12 +56,13 @@ typedef void *va_list;
#define va_start(AP, LASTARG) \
(AP = ((char *) __builtin_next_arg ()))
-void va_end (va_list); /* Defined in libgcc.a */
+void va_end (__gnuc_va_list); /* Defined in libgcc.a */
#define va_end(AP)
#define va_arg(AP, TYPE) \
(AP = ((char *) (AP)) += __va_rounded_size (TYPE), \
*((TYPE *) ((char *) (AP) - __va_rounded_size (TYPE))))
+#endif /* _STDARG_H */
#endif /* not i960 */
#endif /* not sparc */
@@ -69,5 +70,24 @@ void va_end (va_list); /* Defined in libgcc.a */
#endif /* not hp9000s800 */
#endif /* not i860 */
#endif /* not m88k */
-#endif /* __GNUC__ */
+
+#ifdef _STDARG_H
+/* Define va_list, if desired, from __gnuc_va_list. */
+
+#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
+#undef _VA_LIST
+#endif
+
+/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
+#ifndef _VA_LIST_
+/* The macro _VA_LIST is used in SCO Unix 3.2. */
+#ifndef _VA_LIST
+#define _VA_LIST_
+#define _VA_LIST
+typedef __gnuc_va_list va_list;
+#endif /* _VA_LIST */
+#endif /* _VA_LIST_ */
#endif /* _STDARG_H */
+
+#endif /* __GNUC__ */
+#endif /* not _STDARG_H */