mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
Don't rely on whether alloc is #defined; that is in the user's name spac.
This commit is contained in:
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
* data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
|
* data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
|
||||||
__BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
|
__BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
|
||||||
(defined alloca || defined _ALLOCA_H)]: Don't include <stdlib.h>;
|
defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
|
||||||
not needed in this case.
|
|
||||||
* tests/torture.at (Exploding the Stack Size with Alloca): Adjust
|
* tests/torture.at (Exploding the Stack Size with Alloca): Adjust
|
||||||
to match yacc.c, to test more hosts.
|
to match yacc.c, to test more hosts.
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
# define alloca _alloca
|
# define alloca _alloca
|
||||||
# else
|
# else
|
||||||
# define YYSTACK_ALLOC alloca
|
# define YYSTACK_ALLOC alloca
|
||||||
# if (! defined (alloca) && ! defined (_ALLOCA_H) && ! defined (_STDLIB_H) \
|
# if (! defined (_ALLOCA_H) && ! defined (_STDLIB_H) \
|
||||||
&& (defined (__STDC__) || defined (__cplusplus)))
|
&& (defined (__STDC__) || defined (__cplusplus)))
|
||||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# ifndef _STDLIB_H
|
# ifndef _STDLIB_H
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ AT_SETUP([Exploding the Stack Size with Alloca])
|
|||||||
|
|
||||||
AT_DATA_STACK_TORTURE([[
|
AT_DATA_STACK_TORTURE([[
|
||||||
#if (defined __GNUC__ || defined __BUILTIN_VA_ARG_INCR \
|
#if (defined __GNUC__ || defined __BUILTIN_VA_ARG_INCR \
|
||||||
|| defined _AIX || defined _MSC_VER || defined alloca || defined _ALLOCA_H)
|
|| defined _AIX || defined _MSC_VER || defined _ALLOCA_H)
|
||||||
# define YYSTACK_USE_ALLOCA 1
|
# define YYSTACK_USE_ALLOCA 1
|
||||||
#endif
|
#endif
|
||||||
]])
|
]])
|
||||||
|
|||||||
Reference in New Issue
Block a user