aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.h
diff options
context:
space:
mode:
authorgdbadmin <gdbadmin@sourceware.org>2010-09-01 17:29:32 +0000
committergdbadmin <gdbadmin@sourceware.org>2010-09-01 17:29:32 +0000
commita778ab81e80a778f4d9b0cf754aa6dc956bdcfd2 (patch)
treed0a25c93f53e7ff31c5817a99ab6a58f888a8b55 /gdb/gdbserver/server.h
parent8b034a19a784263fcdfc8becdddadb4579c46ada (diff)
downloadgdb-a778ab81e80a778f4d9b0cf754aa6dc956bdcfd2.zip
gdb-a778ab81e80a778f4d9b0cf754aa6dc956bdcfd2.tar.gz
gdb-a778ab81e80a778f4d9b0cf754aa6dc956bdcfd2.tar.bz2
[gdbserver] Move malloc.h include to server.h.
This patch moves all includes of malloc.h, which were introduced purely to get access to alloca's declaration, to server.h, next to the include of alloca.h. There is one exception: gdbreplay.c, which does not include server.h. In this case, the include of alloca.h was simply moved up a bit, next to the include of malloc.h. gdb/gdbserver/ChangeLog: * gdbreplay.c: Move include of alloca.h up, next to include of malloc.h. * server.h: Add include of malloc.h. * mem-break.c: Remove include of malloc.h. * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
Diffstat (limited to 'gdb/gdbserver/server.h')
-rw-r--r--gdb/gdbserver/server.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 286c80a..d5f32e8 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -41,6 +41,11 @@
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
+/* On some systems such as MinGW, alloca is declared in malloc.h
+ (there is no alloca.h). */
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#if !HAVE_DECL_STRERROR
#ifndef strerror