Use AC_FUNC_ALLOC
The preferred all-inclusive method for finding alloca(). Reported-by: Richard Palo <richard@netbsd.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89762 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
aa40f99014
commit
8f11f2bdcd
|
|
@ -416,7 +416,8 @@ AC_ARG_ENABLE(sna,
|
|||
[SNA="$enableval"],
|
||||
[SNA=auto])
|
||||
|
||||
AC_CHECK_HEADERS([dev/wscons/wsconsio.h alloca.h])
|
||||
AC_CHECK_HEADERS([dev/wscons/wsconsio.h])
|
||||
AC_FUNC_ALLOCA
|
||||
AC_HEADER_MAJOR
|
||||
|
||||
if test "x$SNA" != "xno"; then
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
void *alloca(size_t sz)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -42,6 +42,15 @@
|
|||
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#elif defined __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#elif defined _AIX
|
||||
#define alloca __alloca
|
||||
#elif defined _MSC_VER
|
||||
#include <malloc.h>
|
||||
#define alloca _alloca
|
||||
#else
|
||||
void *alloca(size_t);
|
||||
#endif
|
||||
|
||||
#include "sna.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue