This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: OSR 5.0.2 whoops
- To: Bill Walker <bw at student dot ecok dot edu>
- Subject: Re: OSR 5.0.2 whoops
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 11 Nov 1997 16:01:05 -0800
- Cc: law at cygnus dot com, egcs at cygnus dot com
- References: <5553.879284498@hurl.cygnus.com> <m0xVOFM-0001RhC@student.ecok.edu>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Tue, Nov 11, 1997 at 03:53:20PM -0600, Bill Walker wrote:
> That is when I got the complaint about va_list. Looks like it
> was trying to build the g++ libraries at the time. I had trouble in
> libraries/libio specifically, and in a couple of other places.
See if the following clears things up.
r~
Index: libio/gen-params
===================================================================
RCS file: /cvs/cvsfiles/egcs/libio/gen-params,v
retrieving revision 1.4
diff -u -p -d -r1.4 gen-params
--- gen-params 1997/10/30 06:00:21 1.4
+++ gen-params 1997/11/07 06:47:00
@@ -487,9 +487,18 @@ if ${CXX} -c dummy.C >/dev/null 2>&1 ; t
# Ok: We have something that works.
echo "typedef ${va_list-char* /* default */} ${macro_prefix}va_list;"
else
- # No, it breaks. Indicate that <stdarg.h> must be included.
- echo "#define ${macro_prefix}NEED_STDARG_H
-#define ${macro_prefix}va_list va_list"
+ echo "#define ${macro_prefix}NEED_STDARG_H"
+ # Check and see if we have __gnuc_va_list, as we might set up define
+ # loops if we use va_list.
+ cat >dummy.C <<!EOF!
+#include <stdarg.h>
+long foo(__gnuc_va_list ap) { return va_arg(ap, long); }
+!EOF!
+ if ${CXX} -c dummy.C >/dev/null 2>&1 ; then
+ echo "#define ${macro_prefix}va_list __gnuc_va_list"
+ else
+ echo "#define ${macro_prefix}va_list va_list"
+ fi
fi
cat >dummy.c <<!EOF!