From 17726a28cc2a754efda4a953790f1e02f2fcbef3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 Sep 2006 20:43:43 +0000 Subject: [PATCH] (AC_CHECK_DECL): Assume C89 or better, and simply cast the identifier to void. This handles structure values. --- lib/autoconf/general.m4 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)], -- 2.47.3