From: Fred Fish Date: Fri, 12 Sep 1997 00:39:10 +0000 (+0000) Subject: Patches from Fred Fish for systems with sys/varargs.h but not varargs.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70988851ef04fed01f1e52527e654fff9196714b;p=gcc.git Patches from Fred Fish for systems with sys/varargs.h but not varargs.h. * protoize.c: Include only if HAVE_VARARGS_H is defined. If not defined, include if HAVE_SYS_VARARGS_H is defined. * configure.in: Test for varargs.h and sys/varargs.h. * configure: Regenerate with autoconf. * config.in: Regenerate with autoheader. From-SVN: r15420 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12fa4a8ee2a..4ad04cec69c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ Thu Sep 11 15:48:32 1997 Fred Fish + * protoize.c: Include only if HAVE_VARARGS_H is + defined. If not defined, include if + HAVE_SYS_VARARGS_H is defined. + * configure.in: Test for varargs.h and sys/varargs.h. + * configure: Regenerate with autoconf. + * config.in: Regenerate with autoheader. + * cpplib.c (quote_string): Cast first arg of sprintf call from "unsigned char *" to "char *". (output_line_command): Ditto. diff --git a/gcc/config.in b/gcc/config.in index 3200bbb2ef1..8f7b1f25f49 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -34,8 +34,14 @@ /* Define if you have the header file. */ #undef HAVE_STRINGS_H +/* Define if you have the header file. */ +#undef HAVE_SYS_VARARGS_H + /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H + +/* Define if you have the header file. */ +#undef HAVE_VARARGS_H diff --git a/gcc/configure b/gcc/configure index 5270ece10f5..af5e0c8429c 100755 --- a/gcc/configure +++ b/gcc/configure @@ -1330,7 +1330,7 @@ else fi echo "$ac_t""$CPP" 1>&6 -for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h +for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 diff --git a/gcc/configure.in b/gcc/configure.in index 75e5dba4eb4..f0a4c7f8ad5 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -134,7 +134,7 @@ AC_PROG_INSTALL AC_PROG_CC AC_PROG_MAKE_SET -AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h) +AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h) GCC_NEED_DECLARATION(malloc) GCC_NEED_DECLARATION(realloc) diff --git a/gcc/protoize.c b/gcc/protoize.c index bd4ac02bf56..3b50836774a 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -57,7 +57,14 @@ Boston, MA 02111-1307, USA. */ #define _POSIX_SOURCE #endif +#ifdef HAVE_VARARGS_H #include +#else +#ifdef HAVE_SYS_VARARGS_H +#include +#endif +#endif + /* On some systems stdio.h includes stdarg.h; we must bring in varargs.h first. */ #include