From 1e72fedf95ef7c2761fa2a54f71878f33614ac2b Mon Sep 17 00:00:00 2001 From: hniksic Date: Mon, 27 Jun 2005 11:48:41 -0700 Subject: [PATCH] [svn] Amend alloca declaration. --- src/ChangeLog | 5 +++++ src/config-post.h | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 49539767..bb6b489a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-06-27 Hrvoje Niksic + + * config-post.h (alloca): Amend alloca declaration to take care of + all Win32 compilers, not just MSVC and MinGW. + 2005-06-27 Hrvoje Niksic * utils.c (get_grouping_data): Force separator to "." rather than diff --git a/src/config-post.h b/src/config-post.h index 4c99fb8d..5c93ddda 100644 --- a/src/config-post.h +++ b/src/config-post.h @@ -50,21 +50,18 @@ #endif /* NAMESPACE_TWEAKS */ -/* Alloca-related defines, straight out of the Autoconf manual. These - have to be after the above namespace tweaks, but before actual - declarations and system includes. */ +/* Alloca declaration, based on recommendation in the Autoconf manual. + These have to be after the above namespace tweaks, but before any + non-preprocessor code. */ #if HAVE_ALLOCA_H # include +#elif defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ +# include #elif defined __GNUC__ -# ifndef __MINGW32__ -# define alloca __builtin_alloca -# endif +# define alloca __builtin_alloca #elif defined _AIX # define alloca __alloca -#elif defined _MSC_VER -# include -# define alloca _alloca #else # include # ifdef __cplusplus -- 2.39.2