Patches from Fred Fish for systems with sys/varargs.h but not varargs.h.
authorFred Fish <fnf@ninemoons.com>
Fri, 12 Sep 1997 00:39:10 +0000 (00:39 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 12 Sep 1997 00:39:10 +0000 (17:39 -0700)
* protoize.c: Include <varargs.h> only if HAVE_VARARGS_H is
defined.  If not defined, include <sys/varargs.h> 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

gcc/ChangeLog
gcc/config.in
gcc/configure
gcc/configure.in
gcc/protoize.c

index 12fa4a8ee2ae711788efccb1dde79bcae1a7a7ed..4ad04cec69cd7d398cd10fdff448a689ac41d2b3 100644 (file)
@@ -1,5 +1,12 @@
 Thu Sep 11 15:48:32 1997  Fred Fish  <fnf@ninemoons.com>
 
+       * protoize.c: Include <varargs.h> only if HAVE_VARARGS_H is
+       defined.  If not defined, include <sys/varargs.h> 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.
index 3200bbb2ef1d8965047a535a66ef97de9fbe8747..8f7b1f25f498fe07445db25b96731347005b18fd 100644 (file)
 /* Define if you have the <strings.h> header file.  */
 #undef HAVE_STRINGS_H
 
+/* Define if you have the <sys/varargs.h> header file.  */
+#undef HAVE_SYS_VARARGS_H
+
 /* Define if you have the <time.h> header file.  */
 #undef HAVE_TIME_H
 
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
+
+/* Define if you have the <varargs.h> header file.  */
+#undef HAVE_VARARGS_H
index 5270ece10f5f9231c286501dcfebce84a0f3e945..af5e0c8429c4dab50bd3b1e8836e785a76832a94 100755 (executable)
@@ -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
index 75e5dba4eb4e44b2d434f0fbeabac5d2847bd536..f0a4c7f8ad58debc2927832819f1a39a7c965a6d 100644 (file)
@@ -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)
index bd4ac02bf564adda7a619cf82dff370d7ec41602..3b50836774abc2f9748da0ae2e1d1a2bb3a74391 100644 (file)
@@ -57,7 +57,14 @@ Boston, MA 02111-1307, USA.  */
 #define _POSIX_SOURCE
 #endif
 
+#ifdef HAVE_VARARGS_H
 #include <varargs.h>
+#else
+#ifdef HAVE_SYS_VARARGS_H
+#include <sys/varargs.h>
+#endif
+#endif
+
 /* On some systems stdio.h includes stdarg.h;
    we must bring in varargs.h first.  */
 #include <stdio.h>