]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(AC_CHECK_DECL): Assume C89 or better,
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Sep 2006 20:43:43 +0000 (20:43 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 26 Sep 2006 20:43:43 +0000 (20:43 +0000)
and simply cast the identifier to void.  This handles structure
values.

lib/autoconf/general.m4

index 2b503c4a015d4151c366677459ccf71ee1511a7a..7dda9ba8cfd82e9018f76ef642bc3c5124ee1621 100644 (file)
@@ -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)],