From: Paul Eggert Date: Tue, 26 Sep 2006 20:43:43 +0000 (+0000) Subject: (AC_CHECK_DECL): Assume C89 or better, X-Git-Tag: AUTOCONF-2.60b~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17726a28cc2a754efda4a953790f1e02f2fcbef3;p=thirdparty%2Fautoconf.git (AC_CHECK_DECL): Assume C89 or better, and simply cast the identifier to void. This handles structure values. --- diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 2b503c4a0..7dda9ba8c 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2540,14 +2540,13 @@ $2], # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # ------------------------------------------------------- -# Check if SYMBOL (a variable or a function) is declared. +# Check whether SYMBOL (a function, variable, or constant) is declared. AC_DEFUN([AC_CHECK_DECL], [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl AC_CACHE_CHECK([whether $1 is declared], ac_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], [#ifndef $1 - char *p = (char *) $1; - return !p; + (void) $1; #endif ])], [AS_VAR_SET(ac_Symbol, yes)],