More thorough test for working <stdarg.h>.

This commit is contained in:
Guido van Rossum 1996-08-30 20:58:11 +00:00
parent 6eed906533
commit 3f13e48484
1 changed files with 9 additions and 2 deletions

View File

@ -376,8 +376,15 @@ works=no
AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
AC_TRY_COMPILE([
#include <stdarg.h>
int foo(int x, ...) { return 0; }
], [return foo(10, 11, 12);],
int foo(int x, ...) {
va_list va;
va_start(va, x);
va_arg(va, int);
va_arg(va, char *);
va_arg(va, double);
return 0;
}
], [return foo(10, "", 3.14);],
AC_DEFINE(HAVE_STDARG_PROTOTYPES) works=yes)
AC_MSG_RESULT($works)