<varargs.h> in protoize.c
Fred Fish
fnf@ninemoons.com
Sat Sep 6 07:52:00 GMT 1997
Protoize fails to compile on systems where there is no <varargs.h> and
where the build is not done with gcc (which would get gcc's private
varargs.h).
-Fred
===================================================================
Fri Sep 5 23:24:38 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.
Index: config.in
===================================================================
RCS file: /cvsroot/gg/egcs/gcc/config.in,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 config.in
*** config.in 1997/09/04 04:43:43 1.1.1.1
--- config.in 1997/09/06 06:41:56
***************
*** 34,41 ****
--- 34,47 ----
/* 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: configure.in
===================================================================
RCS file: /cvsroot/gg/egcs/gcc/configure.in,v
retrieving revision 1.2
diff -c -r1.2 configure.in
*** configure.in 1997/09/05 14:10:36 1.2
--- configure.in 1997/09/06 06:41:57
***************
*** 134,140 ****
AC_PROG_CC
AC_PROG_MAKE_SET
! AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
GCC_NEED_DECLARATION(malloc)
GCC_NEED_DECLARATION(realloc)
--- 134,140 ----
AC_PROG_CC
AC_PROG_MAKE_SET
! 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: protoize.c
===================================================================
RCS file: /cvsroot/gg/egcs/gcc/protoize.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 protoize.c
*** protoize.c 1997/09/04 04:44:01 1.1.1.1
--- protoize.c 1997/09/06 06:41:57
***************
*** 57,63 ****
--- 57,70 ----
#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>
More information about the Gcc-bugs
mailing list