This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: OSR 5.0.2 whoops


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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]