diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-09-28 01:11:08 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-09-27 19:11:08 -0600 |
commit | 82bd61bdd4c210078a8e25ae894b0f44a297bb72 (patch) | |
tree | 450f02caea46f4174c1f83ee578c644eace5953a | |
parent | 8c14177ca8713954c353e8651c11b59e85cd0c61 (diff) | |
download | gcc-82bd61bdd4c210078a8e25ae894b0f44a297bb72.zip gcc-82bd61bdd4c210078a8e25ae894b0f44a297bb72.tar.gz gcc-82bd61bdd4c210078a8e25ae894b0f44a297bb72.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rwxr-xr-x | gcc/fixinc/fixinc.irix | 37 |
2 files changed, 42 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1fe76d..7c1d114 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 <espie@cvs.openbsd.org> * configure.in (mips*el-*-openbsd*): Don't duplicate default settings. diff --git a/gcc/fixinc/fixinc.irix b/gcc/fixinc/fixinc.irix index d12c786..24a045a 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 <stdarg.h>" >> /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} |