]> gcc.gnu.org Git - gcc.git/commitdiff
*** empty log message ***
authorRichard Stallman <rms@gnu.org>
Fri, 26 Jun 1992 08:44:34 +0000 (08:44 +0000)
committerRichard Stallman <rms@gnu.org>
Fri, 26 Jun 1992 08:44:34 +0000 (08:44 +0000)
From-SVN: r1294

gcc/ginclude/stdarg.h

index 0c00311b0d296c944414e75845600ca7b8d602da..86b426ee593ce442c4766f025de75da5555bdc68 100644 (file)
@@ -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.  */
 #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 */
This page took 0.069443 seconds and 5 git commands to generate.