aboutsummaryrefslogtreecommitdiff
path: root/gcc/ginclude/stdarg.h
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-10-31 21:40:51 +0000
committerRichard Stallman <rms@gnu.org>1992-10-31 21:40:51 +0000
commitd9832c78fc53a696d9dada0f276de33dc1d82e35 (patch)
tree4e1a2303520fd5bacc13727f05208238425027bd /gcc/ginclude/stdarg.h
parent6be564d070dc48237f2fb43ac966538fb7b34464 (diff)
downloadgcc-d9832c78fc53a696d9dada0f276de33dc1d82e35.zip
gcc-d9832c78fc53a696d9dada0f276de33dc1d82e35.tar.gz
gcc-d9832c78fc53a696d9dada0f276de33dc1d82e35.tar.bz2
[4.3 net 2]: If _VA_LIST_, is undefined then va_list is already declared.
Use _ANSI_STDARG_H_, not _ANSI_STDARG_H. From-SVN: r2670
Diffstat (limited to 'gcc/ginclude/stdarg.h')
-rw-r--r--gcc/ginclude/stdarg.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h
index 9b9b301..d44cf9e 100644
--- a/gcc/ginclude/stdarg.h
+++ b/gcc/ginclude/stdarg.h
@@ -105,20 +105,35 @@ typedef __gnuc_va_list va_list;
#endif /* _VA_LIST_ */
#else /* not __SVR4_2__ */
+/* On 4.3bsd-net2, make sure ansi.h is included, so we have
+ one less case to deal with in the following. */
+#if defined (__BSD_NET2__) || defined (____386BSD____)
+#include <ansi.h>
+#endif
+
+/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which remain
+ defined as long as the corresponding type is *not* defined. */
+#ifdef _ANSI_H_
+#ifndef _VA_LIST_
+#define _VA_LIST
+#endif
+#undef _VA_LIST_
+#endif /* _ANSI_H_ */
+
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
-/* However, 4.3bsd-net2 uses it in a completely different way.
- So if we are in 4.3bsd-net2, pay no attention to _VA_LIST_. */
-#if ! defined (_VA_LIST_) || defined (_ANSI_H_) || defined (__BSD_NET2__) || defined (____386BSD____)
+#ifndef _VA_LIST_
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
-#if !(defined (_ANSI_H_) || defined (__BSD_NET2__) || defined (____386BSD____))
- /* Don't mess with _VA_LIST_ at all, on 4.3bsd-net2. */
#define _VA_LIST_
-#endif /* not net2 */
#define _VA_LIST
typedef __gnuc_va_list va_list;
#endif /* not _VA_LIST */
-#endif /* not _VA_LIST_ (or _ANSI_H_) */
+#endif /* not _VA_LIST_ */
+
+/* On 4.3bsd-net2, leave _VA_LIST_ undef to indicate va_list is defined. */
+#ifdef _ANSI_H_
+#undef _VA_LIST_
+#endif
#endif /* not __SVR4_2__ */