mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
Include alloca.h unconditionally
Since gnulib alloca module was imported, we can include alloca.h in both gdb and gdbserver unconditionally, so this patch adds inclusion of alloca.h in common-defs.h. This patch also removes AC_FUNC_ALLOCA in configure.ac because we don't need to check alloca any more. This patch below is removed in fact. [RFA/commit] include alloca.h if available. https://www.sourceware.org/ml/gdb-patches/2010-08/msg00566.html Since alloca.h is from gnulib now, we don't have to check malloc.h in configure and include malloc.h in code. This patch also remove them too. gdb: 2014-11-21 Yao Qi <yao@codesourcery.com> * common/common-defs.h: Include alloca.h * configure.ac: Don't invoke AC_FUNC_ALLOCA. * configure: Re-generated. * defs.h: Remove code handling alloca. * utils.c (gdb_realpath): Don't check HAVE_ALLOCA is defined or not. gdb/gdbserver: 2014-11-21 Yao Qi <yao@codesourcery.com> * configure.ac: Don't invoke AC_FUNC_ALLOCA. (AC_CHECK_HEADERS): Remove malloc.h. * configure: Re-generated. * config.in: Re-generated. * server.h: Don't include alloca.h and malloc.h. * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined. Don't include malloc.h.
This commit is contained in:
21
gdb/defs.h
21
gdb/defs.h
@ -548,27 +548,6 @@ enum gdb_osabi
|
||||
extern double atof (const char *); /* X3.159-1989 4.10.1.1 */
|
||||
#endif
|
||||
|
||||
/* Various possibilities for alloca. */
|
||||
#ifndef alloca
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else /* Not GNU C */
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifdef _AIX
|
||||
#pragma alloca
|
||||
#else
|
||||
|
||||
/* We need to be careful not to declare this in a way which conflicts with
|
||||
bison. Bison never declares it as char *, but under various circumstances
|
||||
(like __hpux) we need to use void *. */
|
||||
extern void *alloca ();
|
||||
#endif /* Not _AIX */
|
||||
#endif /* Not HAVE_ALLOCA_H */
|
||||
#endif /* Not GNU C */
|
||||
#endif /* alloca not defined */
|
||||
|
||||
/* Dynamic target-system-dependent parameters for GDB. */
|
||||
#include "gdbarch.h"
|
||||
|
||||
|
Reference in New Issue
Block a user