From 162fc36e144707cd21e0063bcbbbb3f202bdc870 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 23 Dec 2009 12:55:45 +0200 Subject: [PATCH] Move malloc portability tweaks out of system.h - only rpmmalloc.c needs, no need to pollute system.h --- rpmio/rpmmalloc.c | 10 ++++++++++ system.h | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/rpmio/rpmmalloc.c b/rpmio/rpmmalloc.c index 5a71834..479fe88 100644 --- a/rpmio/rpmmalloc.c +++ b/rpmio/rpmmalloc.c @@ -3,8 +3,18 @@ */ #include "system.h" + +#if HAVE_MALLOC_H +#include +#endif + #include "debug.h" +#if NEED_MYREALLOC +#define realloc(ptr,size) myrealloc(ptr,size) +extern void *myrealloc(void *, size_t); +#endif + static rpmMemFailFunc failfunc = NULL; static void *failfunc_data = NULL; diff --git a/system.h b/system.h index e9ba13a..43e70c9 100644 --- a/system.h +++ b/system.h @@ -189,10 +189,6 @@ char *realpath(const char *path, char resolved_path []); #include #endif -#if HAVE_MALLOC_H -#include -#endif - #if WITH_SELINUX #include #else @@ -319,11 +315,6 @@ extern const char *__progname; #include #endif -#if NEED_MYREALLOC -#define realloc(ptr,size) myrealloc(ptr,size) -extern void *myrealloc(void *, size_t); -#endif - #if ! HAVE_SETENV extern int setenv(const char *name, const char *value, int replace); extern void unsetenv(const char *name); -- 2.7.4