From cf8a358fdf17330bd49ff8e1e0d0be74fba7e162 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 12 Aug 2002 07:34:43 +0000 Subject: [PATCH] (jm_FUNC_MALLOC): Define HAVE_MALLOC if malloc works. --- m4/malloc.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/m4/malloc.m4 b/m4/malloc.m4 index cb5cff3..f6d43c9 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,4 +1,4 @@ -#serial 6 +#serial 7 dnl From Jim Meyering. dnl Determine whether malloc accepts 0 as its argument. @@ -27,7 +27,12 @@ AC_DEFUN([jm_FUNC_MALLOC], dnl When crosscompiling, assume malloc(0) returns NULL. jm_cv_func_working_malloc=no) ]) - if test $jm_cv_func_working_malloc = no; then + if test $jm_cv_func_working_malloc = yes; then + AC_DEFINE([HAVE_MALLOC], 1, + [Define to 1 if your system has a working `malloc' function, + and to 0 otherwise.]) + else + AC_DEFINE([HAVE_MALLOC], 0) AC_LIBOBJ(malloc) AC_DEFINE(malloc, rpl_malloc, [Define to rpl_malloc if the replacement function should be used.])