aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-11-04 14:05:24 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-11-04 14:05:24 +0000
commit6fb349540ce6464e9222d4c236a2c43a174d058b (patch)
tree3e98900b6ea727f70412a326d7bbd6f069a1160d /gcc/system.h
parent253f29f1adefd9bc9808addd4498e6b9cea7827b (diff)
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
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 56af544b70b..3ef668f5508 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -730,6 +730,12 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
# include "unique-ptr.h"
#endif
+#ifdef INCLUDE_MALLOC_H
+#ifdef HAVE_MALLINFO
+#include <malloc.h>
+#endif
+#endif
+
/* Redefine abort to report an internal error w/o coredump, and
reporting the location of the error in the source file. */
extern void fancy_abort (const char *, int, const char *)