>From ef0cd33aa5bc626a4a0063062aaae5fd80bf185f Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues
Date: Tue, 1 Jun 2010 21:54:39 +0200 Subject: [PATCH 2/2] Documentation and tests for the AC_CHECK_DECL change. * lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): Squash trailing spaces in as_decl_name. (_AC_CHECK_DECLS): Likewise for the define. * tests/semantics.at (AC_CHECK_DECLS): Extend test. * doc/autoconf.texi (Generic Declarations): Update. * NEWS: Update. Signed-off-by: Ralf Wildenhues --- ChangeLog | 10 ++++++++++ NEWS | 3 +++ doc/autoconf.texi | 14 +++++++++++--- lib/autoconf/general.m4 | 4 ++-- tests/semantics.at | 35 +++++++++++++++++++++++++++++++++-- 5 files changed, 59 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8041556..08bcde8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-06-01 Ralf Wildenhues + + Documentation and tests for the AC_CHECK_DECL change. + * lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): Squash trailing + spaces in as_decl_name. + (_AC_CHECK_DECLS): Likewise for the define. + * tests/semantics.at (AC_CHECK_DECLS): Extend test. + * doc/autoconf.texi (Generic Declarations): Update. + * NEWS: Update. + 2010-06-01 Joern Rennecke (tiny change) Generalize AC_CHECK_DECL for C++: allow optional arguments. diff --git a/NEWS b/NEWS index afd8907..04cf8dd 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ GNU Autoconf NEWS - User visible changes. ** Autoconf should work on EBCDIC hosts. +** AC_CHECK_DECL and AC_CHECK_DECLS accept optional function argument types + for overloaded C++ functions. + * Major changes in Autoconf 2.65 (2009-11-21) [stable] Released by Eric Blake, based on git versions 2.64.*. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 3df0d3f..eab9ab2 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6275,8 +6275,14 @@ Generic Declarations This macro actually tests whether @var{symbol} is defined as a macro or can be used as an r-value, not whether it is really declared, because it -is much safer to avoid -introducing extra declarations when they are not needed. +is much safer to avoid introducing extra declarations when they are not +needed. In order to facilitate use of C++ and overloaded function +declarations, it is possible to specify function argument types in +parentheses for types which can be zero-initialized: + address@hidden +AC_CHECK_DECL([basename(char *)]) address@hidden example This macro caches its result in the @address@hidden variable, with characters not suitable for a variable name mapped to @@ -6289,7 +6295,8 @@ Generic Declarations @acindex{CHECK_DECLS} @cvindex address@hidden @caindex address@hidden -For each of the @var{symbols} (@emph{comma}-separated list), define +For each of the @var{symbols} (@emph{comma}-separated list with optional +function argument types for C++ overloads), define @address@hidden (in all capitals) to @samp{1} if @var{symbol} is declared, otherwise to @samp{0}. If @var{action-if-not-found} is given, it is additional shell code to @@ -6306,6 +6313,7 @@ Generic Declarations AC_CHECK_DECLS([strlen]) AC_CHECK_DECLS([malloc, realloc, calloc, free]) AC_CHECK_DECLS([j0], [], [], [[#include