From 9c232dda88ade649e92be7a6c9917e0a80ea54c8 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Fri, 21 Nov 2014 22:05:41 +0800 Subject: 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 * 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 * 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. --- gdb/gdbserver/server.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gdb/gdbserver/server.h') diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index cac73e9..02d751a 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -29,15 +29,6 @@ gdb_static_assert (sizeof (CORE_ADDR) >= sizeof (void *)); #include "version.h" -#ifdef HAVE_ALLOCA_H -#include -#endif -/* On some systems such as MinGW, alloca is declared in malloc.h - (there is no alloca.h). */ -#if HAVE_MALLOC_H -#include -#endif - #if !HAVE_DECL_STRERROR #ifndef strerror extern char *strerror (int); /* X3.159-1989 4.11.6.2 */ -- cgit v1.1