From 6e8befbaa7930247b650f16b757e113b264b9abe Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Wed, 5 Jun 2002 19:32:20 +0000 Subject: [PATCH] Fixed the declaration of _alloca/alloca. svn path=/trunk/; revision=3003 --- reactos/include/msvcrt/alloc.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/reactos/include/msvcrt/alloc.h b/reactos/include/msvcrt/alloc.h index 355142d5ebe..211427e03a9 100644 --- a/reactos/include/msvcrt/alloc.h +++ b/reactos/include/msvcrt/alloc.h @@ -25,9 +25,9 @@ * DISCLAMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * $Revision: 1.1 $ - * $Author: ekohl $ - * $Date: 2001/07/03 12:55:00 $ + * $Revision: 1.2 $ + * $Author: hbirr $ + * $Date: 2002/06/05 19:32:20 $ * */ @@ -56,9 +56,17 @@ typedef struct _heapinfo } _HEAPINFO; int _heapwalk (_HEAPINFO* pHeapinfo); -void * _alloca(size_t size); - - + +#ifdef __GNUC__ +#ifdef USE_C_ALLOCA +void * C_alloca(size_t size); +#define _alloca(x) C_alloca(x) +#else /* USE_C_ALLOCA */ +#define _alloca(x) __builtin_alloca(x) +#endif /* USE_C_ALLOCA */ +#else /* __GNUC__ */ +void * _alloca(size_t size); +#endif /* __GNUC__ */ #ifndef _NO_OLDNAMES #define heapwalk(x) _heapwalk(x)