From befdbf38ebf8fe8e1ba8df593aba9382b58ed125 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 19 Jun 2006 09:39:50 +0000 Subject: [PATCH] * alloca_.h (alloca) [defined alloca]: Don't define or declare. --- lib/ChangeLog | 4 ++++ lib/alloca_.h | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 90d4ebd432..e9d05c0eb9 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2006-06-19 Paul Eggert + + * alloca_.h (alloca) [defined alloca]: Don't define or declare. + 2006-06-17 Bruno Haible * stdint_.h [FreeBSD >= 5]: Don't include . diff --git a/lib/alloca_.h b/lib/alloca_.h index 3e3fdf43f8..dd0b3e98f5 100644 --- a/lib/alloca_.h +++ b/lib/alloca_.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 Free Software + Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -34,19 +34,21 @@ request, the program just crashes. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#elif defined _MSC_VER -# include -# define alloca _alloca -#else -# include -# ifdef __cplusplus +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _AIX +# define alloca __alloca +# elif defined _MSC_VER +# include +# define alloca _alloca +# else +# include +# ifdef __cplusplus extern "C" -# endif +# endif void *alloca (size_t); +# endif #endif #endif /* _GNULIB_ALLOCA_H */ -- 2.30.2