From: Bruno Haible Date: Thu, 5 Aug 2010 11:26:40 +0000 (+0200) Subject: AC_FUNC_ALLOCA: modernize X-Git-Tag: v2.68~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08b6974837c2d042a6d86f77e2300e423d952930;p=thirdparty%2Fautoconf.git AC_FUNC_ALLOCA: modernize * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Assume that alloca's return type is 'void *', not 'char *'. Supply C89 prototype. Reported by Thomas Klausner. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 9ea06cbf..3a998af2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-08-05 Bruno Haible + and Eric Blake + + AC_FUNC_ALLOCA: modernize + * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Assume that alloca's + return type is 'void *', not 'char *'. Supply C89 prototype. + Reported by Thomas Klausner. + 2010-08-04 Ralf Wildenhues Fix testsuite failure due to bugs in third-party aclocal macros. diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index d5da2069..576de028 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -357,6 +357,7 @@ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) AN_FUNCTION([alloca], [AC_FUNC_ALLOCA]) AN_HEADER([alloca.h], [AC_FUNC_ALLOCA]) AC_DEFUN([AC_FUNC_ALLOCA], +[AC_REQUIRE([AC_TYPE_SIZE_T])]dnl [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h, @@ -388,7 +389,7 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif