Commit 6fb34954 by Richard Biener Committed by Richard Biener

system.h: Include malloc.h if INCLUDE_MALLOC_H and HAVE_MALLINFO.

2019-11-04  Richard Biener  <rguenther@suse.de>

	* system.h: Include malloc.h if INCLUDE_MALLOC_H and HAVE_MALLINFO.
	* ggc-common.c: Remove inclusion of malloc.h, define INCLUDE_MALLOC_H.

From-SVN: r277779
parent 253f29f1
2019-11-04 Richard Biener <rguenther@suse.de>
* system.h: Include malloc.h if INCLUDE_MALLOC_H and HAVE_MALLINFO.
* ggc-common.c: Remove inclusion of malloc.h, define INCLUDE_MALLOC_H.
2019-11-04 David Edelsohn <dje.gcc@gmail.com> 2019-11-04 David Edelsohn <dje.gcc@gmail.com>
* ggc-common.c: Include system.h before malloc.h. * ggc-common.c: Include system.h before malloc.h.
...@@ -21,10 +21,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -21,10 +21,8 @@ along with GCC; see the file COPYING3. If not see
any particular GC implementation. */ any particular GC implementation. */
#include "config.h" #include "config.h"
#define INCLUDE_MALLOC_H
#include "system.h" #include "system.h"
#ifdef HAVE_MALLINFO
#include <malloc.h>
#endif
#include "coretypes.h" #include "coretypes.h"
#include "timevar.h" #include "timevar.h"
#include "diagnostic-core.h" #include "diagnostic-core.h"
......
...@@ -730,6 +730,12 @@ extern int vsnprintf (char *, size_t, const char *, va_list); ...@@ -730,6 +730,12 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
# include "unique-ptr.h" # include "unique-ptr.h"
#endif #endif
#ifdef INCLUDE_MALLOC_H
#ifdef HAVE_MALLINFO
#include <malloc.h>
#endif
#endif
/* Redefine abort to report an internal error w/o coredump, and /* Redefine abort to report an internal error w/o coredump, and
reporting the location of the error in the source file. */ reporting the location of the error in the source file. */
extern void fancy_abort (const char *, int, const char *) extern void fancy_abort (const char *, int, const char *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment