From: rguenth Date: Mon, 4 Nov 2019 14:05:24 +0000 (+0000) Subject: 2019-11-04 Richard Biener X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a7c328dd3085a889673cfa225a8dfec6a9b01e7;p=thirdparty%2Fgcc.git 2019-11-04 Richard Biener * system.h: Include malloc.h if INCLUDE_MALLOC_H and HAVE_MALLINFO. * ggc-common.c: Remove inclusion of malloc.h, define INCLUDE_MALLOC_H. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277779 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b99947db227..b53c793d6c20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-04 Richard Biener + + * 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 * ggc-common.c: Include system.h before malloc.h. diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index 0841a0ab6c43..a7edb1591f85 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -21,10 +21,8 @@ along with GCC; see the file COPYING3. If not see any particular GC implementation. */ #include "config.h" +#define INCLUDE_MALLOC_H #include "system.h" -#ifdef HAVE_MALLINFO -#include -#endif #include "coretypes.h" #include "timevar.h" #include "diagnostic-core.h" diff --git a/gcc/system.h b/gcc/system.h index 56af544b70b4..3ef668f55089 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 +#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 *)