1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

Backport fix for Bug#6170 from trunk.

Fix alloca definition when using gcc on non-gnu systems.
* configure.in: Use the code sequence indicated by "info autoconf"
for alloca (bug#6170).
This commit is contained in:
Dan Nicolaescu 2010-11-13 12:22:52 -05:00 committed by Chong Yidong
parent cdf015b188
commit 4d613e98a7
3 changed files with 32 additions and 18 deletions

View File

@ -1,3 +1,9 @@
2010-11-13 Dan Nicolaescu <dann@ics.uci.edu>
Fix alloca definition when using gcc on non-gnu systems.
* configure.in: Use the code sequence indicated by "info autoconf"
for alloca (bug#6170).
2010-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
* .dir-locals.el (log-edit-mode): Set log-edit-rewrite-fixes.

View File

@ -2927,15 +2927,19 @@ extern char *getenv ();
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifndef __GNUC__
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else /* AIX files deal with #pragma. */
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#ifndef HAVE_SIZE_T
typedef unsigned size_t;
#endif

View File

@ -1178,15 +1178,19 @@ extern char *getenv ();
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifndef __GNUC__
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else /* AIX files deal with #pragma. */
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#ifndef HAVE_SIZE_T
typedef unsigned size_t;
#endif