[gdbserver] Move malloc.h include to server.h.
authorgdbadmin <gdbadmin@sourceware.org>
Wed, 1 Sep 2010 17:29:32 +0000 (17:29 +0000)
committergdbadmin <gdbadmin@sourceware.org>
Wed, 1 Sep 2010 17:29:32 +0000 (17:29 +0000)
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.

gdb/gdbserver/ChangeLog
gdb/gdbserver/gdbreplay.c
gdb/gdbserver/mem-break.c
gdb/gdbserver/server.c
gdb/gdbserver/server.h
gdb/gdbserver/tracepoint.c
gdb/gdbserver/utils.c
gdb/gdbserver/win32-low.c

index 6f0adc9c45451fd2c00d85e0858061f9a463cc8b..71e878d076ddf2b6ff69cd2420a6ad2453492e5a 100644 (file)
@@ -1,3 +1,11 @@
+2010-09-01  Joel Brobecker  <brobecker@adacore.com>
+
+       * 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.
+
 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
 
        * Makefile.in (memmem.o): Build with -Wno-error.
index 4996ffaa566952e3a72646d6e9dbf28fafd95406..1f651113a3b972f03cd76832707a939373bcb322 100644 (file)
 #if HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
 #endif
+#if HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
 #if HAVE_MALLOC_H
 #include <malloc.h>
 #endif
 #if USE_WIN32API
 #include <winsock2.h>
 #endif
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
 
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;
index 687414b8dd77e4c65b1270315be9f899aa756da4..1b084154bb15ae3ab9a30d71dff6261544924764 100644 (file)
@@ -20,9 +20,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "server.h"
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
 
 const unsigned char *breakpoint_data;
 int breakpoint_len;
index c406abe329333e3c2b00c3b5dcf4d225b1308225..528b65855bf7d604493f566bb036e954986f6050 100644 (file)
@@ -28,9 +28,6 @@
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
 
 ptid_t cont_thread;
 ptid_t general_thread;
index 286c80a52b9637b63c807469ff96b783187bb953..d5f32e8cd07b69715d3ab7a3b8332153258d1568 100644 (file)
 #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
index f068ce41960f6dad6132933a6b9864a18c3f5241..138d9203a03180b231f9dab18330dc99cadc9b77 100644 (file)
@@ -22,9 +22,6 @@
 #include <unistd.h>
 #include <sys/time.h>
 #include <stddef.h>
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
 #if HAVE_STDINT_H
 #include <stdint.h>
 #endif
index 7de086c77c174dec09b83d5eb55621255b57c318..aee7e962a8dd2deeb2b4148984fc842b9ddd4eeb 100644 (file)
@@ -24,9 +24,6 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
 
 #ifdef IN_PROCESS_AGENT
 #  define PREFIX "ipa: "
index dd26d730b23244202d4beadea16a806bb4fc275d..5aea8b941759705750241e5cad8c659fc235584c 100644 (file)
@@ -31,7 +31,6 @@
 #include <tlhelp32.h>
 #include <psapi.h>
 #include <sys/param.h>
-#include <malloc.h>
 #include <process.h>
 
 #ifndef USE_WIN32API
This page took 0.036978 seconds and 4 git commands to generate.