]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_FUNC_ALLOCA: modernize
authorBruno Haible <bruno@clisp.org>
Thu, 5 Aug 2010 11:26:40 +0000 (13:26 +0200)
committerEric Blake <eblake@redhat.com>
Thu, 5 Aug 2010 20:53:17 +0000 (14:53 -0600)
* 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 <eblake@redhat.com>
ChangeLog
lib/autoconf/functions.m4

index 9ea06cbfd713fdbf92d49d447714f3aafeebb7a7..3a998af248c3156a27669887e3e9eee644aa327f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-05  Bruno Haible  <bruno@clisp.org>
+       and Eric Blake  <eblake@redhat.com>
+
+       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  <Ralf.Wildenhues@gmx.de>
 
        Fix testsuite failure due to bugs in third-party aclocal macros.
index d5da2069eec65fe2f9e28bfe6e7c03b687f7a1c8..576de0285ae10cfc7a9fbff50181aa98a93c9af5 100644 (file)
@@ -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