From e10e807ce9b6f252450404e57093aeaa023150a5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 5 Jan 2010 12:36:37 +0200 Subject: Move include out of system.h to the couple of places that care - only two real users inside rpm - remove mcheck foo from rpminject and rpmsort, we're not interested... --- lib/poptALL.c | 4 ++++ rpmqv.c | 3 +++ system.h | 4 ---- tools/rpminject.c | 4 ---- tools/rpmsort.c | 3 --- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/poptALL.c b/lib/poptALL.c index 50dfd5c17..0a49d4082 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -6,6 +6,10 @@ #include "system.h" const char *__progname; +#if HAVE_MCHECK_H +#include +#endif + #include #include /* rpmEVR, rpmReadConfigFiles etc */ #include diff --git a/rpmqv.c b/rpmqv.c index 3446c30db..f7b48901b 100644 --- a/rpmqv.c +++ b/rpmqv.c @@ -12,6 +12,9 @@ const char *__progname; #endif #include +#if HAVE_MCHECK_H +#include +#endif #include #include /* RPMSIGTAG, rpmReadPackageFile .. */ diff --git a/system.h b/system.h index 67dbaea52..6ca5e1f0f 100644 --- a/system.h +++ b/system.h @@ -143,10 +143,6 @@ typedef char * security_context_t; typedef void * cap_t; #endif -#if HAVE_MCHECK_H -#include -#endif /* HAVE_MCHECK_H */ - #include "rpmio/rpmutil.h" /* compatibility macros to avoid a mass-renaming all over the codebase */ #define xmalloc(_size) rmalloc((_size)) diff --git a/tools/rpminject.c b/tools/rpminject.c index 903709819..6d4316cd5 100644 --- a/tools/rpminject.c +++ b/tools/rpminject.c @@ -455,10 +455,6 @@ main(int argc, char *argv[]) int ec = 0; injmode_t lastmode = INJ_UNKNOWN; -#if HAVE_MCHECK_H && HAVE_MTRACE - mtrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */ -#endif - setprogname(argv[0]); /* Retrofit glibc __progname */ #if defined(ENABLE_NLS) (void)setlocale(LC_ALL, "" ); diff --git a/tools/rpmsort.c b/tools/rpmsort.c index 2a14b91d2..3d93b7604 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -252,9 +252,6 @@ main(int argc, char *argv[]) }; -#if HAVE_MCHECK_H && HAVE_MTRACE - mtrace(); /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */ -#endif setprogname(argv[0]); /* Retrofit glibc __progname */ #if defined(ENABLE_NLS) (void)setlocale(LC_ALL, "" ); -- cgit v1.2.3