From 4bf015d5623a4eacc0e1ebd0a5766bc1f9370197 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 14 Jun 2003 06:01:35 +0000 Subject: [PATCH] Use GCC's internal built-in alloca implementation, when available. Submitted by: DES --- sys/sys/cdefs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index ff81fb5a0d2d..0ecd23cd18a2 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -142,6 +142,11 @@ #define __section(x) __attribute__((__section__(x))) #endif #endif +#ifdef __GNUC__ +#define alloca(sz) __builtin_alloca(sz) +#else +#error FreeBSD alloca support needed for this compiler +#endif /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !(__GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3)