Protect va_list definition from SCO headers.
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 22 Jun 1997 10:29:26 +0000 (06:29 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 22 Jun 1997 10:29:26 +0000 (06:29 -0400)
From-SVN: r14286

gcc/ginclude/stdarg.h
gcc/ginclude/varargs.h

index adb22fb9ee554aa5ac8fed65deef41e71fc32a49..7d393732b07ff3029eb88e11cd9c26d11f99f30d 100644 (file)
@@ -136,7 +136,7 @@ void va_end (__gnuc_va_list);               /* Defined in libgcc.a */
 #undef _BSD_VA_LIST
 #endif
 
-#if defined(__svr4__) || defined(_SCO_DS)
+#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
 /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
    so we must avoid testing it and setting it here.
    SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
@@ -149,6 +149,9 @@ void va_end (__gnuc_va_list);               /* Defined in libgcc.a */
 #endif
 #endif /* __i860__ */
 typedef __gnuc_va_list va_list;
+#ifdef _SCO_DS
+#define __VA_LIST
+#endif
 #endif /* _VA_LIST_ */
 #else /* not __svr4__ || _SCO_DS */
 
index 3630cc007c26fda4216766558bf0ea05b9abfee0..29587aa17d7c537b6e17f91463d19ca48c359829 100644 (file)
@@ -146,7 +146,7 @@ typedef void *__gnuc_va_list;
 #undef _VA_LIST
 #endif
 
-#if defined(__svr4__) || defined(_SCO_DS)
+#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
 /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
    so we must avoid testing it and setting it here.
    SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
@@ -159,6 +159,9 @@ typedef void *__gnuc_va_list;
 #endif
 #endif /* __i860__ */
 typedef __gnuc_va_list va_list;
+#ifdef _SCO_DS
+#define __VA_LIST
+#endif
 #endif /* _VA_LIST_ */
 
 #else /* not __svr4__  || _SCO_DS */