use ansi c declarations

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15422 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-06-16 18:59:29 +00:00
parent c9d286d742
commit d01b7f137f
2 changed files with 4 additions and 4 deletions

View File

@@ -12,12 +12,12 @@ AC_CACHE_VAL(ac_cv___function__, [
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <string.h>
static char *foo()
static char *foo(void)
{
return __FUNCTION__;
}
int main()
int main(int argc, char **argc)
{
return strcmp(foo(), "foo") != 0;
}

View File

@@ -6,11 +6,11 @@ AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_var_$1, [
m4_ifval([$2],[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2
void * foo() { return &$1; }]],[[foo()]])],
void * foo(void) { return &$1; }]],[[foo()]])],
[ac_cv_var_$1=yes],[ac_cv_var_$1=no])])
if test "$ac_cv_var_$1" != yes ; then
AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int $1;
int foo() { return $1; }]],[[foo()]])],
int foo(void) { return $1; }]],[[foo()]])],
[ac_cv_var_$1=yes],[ac_cv_var_$1=no])
fi
])