From 82bd61bdd4c210078a8e25ae894b0f44a297bb72 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Tue, 28 Sep 1999 01:11:08 +0000 Subject: [PATCH] fixinc.irix (stdio.h): Hack stdio.h to avoid problems with va_list. * fixinc/fixinc.irix (stdio.h): Hack stdio.h to avoid problems with va_list. From-SVN: r29683 --- gcc/ChangeLog | 5 +++++ gcc/fixinc/fixinc.irix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1fe76de6a86..7c1d1140c11f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 27 19:06:04 1999 Jeffrey A Law (law@cygnus.com) + + * fixinc/fixinc.irix (stdio.h): Hack stdio.h to avoid problems + with va_list. + Mon Sep 27 19:40:17 CEST 1999 Marc Espie * configure.in (mips*el-*-openbsd*): Don't duplicate default settings. diff --git a/gcc/fixinc/fixinc.irix b/gcc/fixinc/fixinc.irix index d12c78662cb3..24a045afbda7 100755 --- a/gcc/fixinc/fixinc.irix +++ b/gcc/fixinc/fixinc.irix @@ -232,6 +232,43 @@ fi done +# Don't use or define the name va_list in stdio.h. +# This is for ANSI and also to interoperate properly with gcc's varargs.h. +# Arrange for stdio.h to use stdarg.h to define __gnuc_va_list +file=stdio.h +base=`basename $file` +if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file +else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi +fi +if [ \! -z "$file_to_fix" ]; then + echo Fixing $file_to_fix + echo "#define __need___va_list" > /tmp/$base + echo "#include " >> /tmp/$base + + sed -e 's@ va_list @ __gnuc_va_list @' \ + -e 's@ va_list)@ __gnuc_va_list)@' \ + -e 's@ _BSD_VA_LIST_))@ __gnuc_va_list))@' \ + -e 's@ _VA_LIST_));@ __gnuc_va_list));@' \ + -e 's@ va_list@ __va_list__@' \ + -e 's@\*va_list@*__va_list__@' \ + -e 's@ __va_list)@ __gnuc_va_list)@' \ + -e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \ + -e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \ + -e 's@VA_LIST@DUMMY_VA_LIST@' \ + -e 's@_Va_LIST@_VA_LIST@' $file_to_fix >> /tmp/$base + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + rm -f /tmp/$base +fi + if [ x${INSTALL_ASSERT_H} != x ] then cd ${ORIG_DIR} -- 2.43.5