- realloc(NULL, size) is defined as equal to malloc(size) in C99 and
POSIX 2001, we dont care about anything older than that
echo "hacking things up for sunos"
CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
- AC_DEFINE(NEED_MYREALLOC, 1, [Define as 1 if we need myrealloc])
- AC_LIBOBJ(myrealloc)
fi
#
fakefork.c fnmatch.c fnmatch.h \
getcwd.c getmntent.c \
getwd.c glob.c glob.h \
- myrealloc.c putenv.c realpath.c \
+ putenv.c realpath.c \
setenv.c stpcpy.c stpncpy.c
noinst_LTLIBRARIES = libmisc.la
+++ /dev/null
-#include "system.h"
-
-void *myrealloc(void *ptr, size_t size) {
-if (ptr == NULL)
- return malloc(size);
- else
- return realloc(ptr, size);
-}
#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;