Move malloc portability tweaks out of system.h

- only rpmmalloc.c needs, no need to pollute system.h
This commit is contained in:
Panu Matilainen 2009-12-23 12:55:45 +02:00
parent 4a1e75d139
commit 162fc36e14
2 changed files with 10 additions and 9 deletions

View File

@ -3,8 +3,18 @@
*/ */
#include "system.h" #include "system.h"
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "debug.h" #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 rpmMemFailFunc failfunc = NULL;
static void *failfunc_data = NULL; static void *failfunc_data = NULL;

View File

@ -189,10 +189,6 @@ char *realpath(const char *path, char resolved_path []);
#include <err.h> #include <err.h>
#endif #endif
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#if WITH_SELINUX #if WITH_SELINUX
#include <selinux/selinux.h> #include <selinux/selinux.h>
#else #else
@ -319,11 +315,6 @@ extern const char *__progname;
#include <strings.h> #include <strings.h>
#endif #endif
#if NEED_MYREALLOC
#define realloc(ptr,size) myrealloc(ptr,size)
extern void *myrealloc(void *, size_t);
#endif
#if ! HAVE_SETENV #if ! HAVE_SETENV
extern int setenv(const char *name, const char *value, int replace); extern int setenv(const char *name, const char *value, int replace);
extern void unsetenv(const char *name); extern void unsetenv(const char *name);