bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_FUNC_MALLOC


From: Bruno Haible
Subject: Re: AC_FUNC_MALLOC
Date: Thu, 31 Oct 2002 15:24:53 +0100 (CET)

Akim Demaille writes:
> I think you also want to change the realloc one.

Yes, I missed that.


2002-10-31  Bruno Haible  <address@hidden>

        * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF): Change message.
        Change name of cache variable to ac_cv_func_malloc_0_nonnull.
        (AC_FUNC_MALLOC): Change description of HAVE_MALLOC macro.
        (_AC_FUNC_REALLOC_IF): Change message. Change name of cache variable
        to ac_cv_func_realloc_0_nonnull.
        (AC_FUNC_REALLOC): Change description of HAVE_REALLOC macro.

--- lib/autoconf/functions.m4.bak       Mon Oct 28 07:49:59 2002
+++ lib/autoconf/functions.m4   Thu Oct 31 15:21:04 2002
@@ -843,7 +843,7 @@
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [AC_REQUIRE([AC_HEADER_STDC])dnl
 AC_CHECK_HEADERS(stdlib.h)
-AC_CACHE_CHECK([for working malloc], ac_cv_func_malloc_works,
+AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
 [AC_RUN_IFELSE(
 [AC_LANG_PROGRAM(
 [[#if STDC_HEADERS || HAVE_STDLIB_H
@@ -853,10 +853,10 @@
 #endif
 ]],
                  [exit (malloc (0) ? 0 : 1);])],
-               [ac_cv_func_malloc_works=yes],
-               [ac_cv_func_malloc_works=no],
-               [ac_cv_func_malloc_works=no])])
-AS_IF([test $ac_cv_func_malloc_works = yes], [$1], [$2])
+               [ac_cv_func_malloc_0_nonnull=yes],
+               [ac_cv_func_malloc_0_nonnull=no],
+               [ac_cv_func_malloc_0_nonnull=no])])
+AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
 ])# AC_FUNC_MALLOC
 
 
@@ -868,7 +868,7 @@
 AC_DEFUN([AC_FUNC_MALLOC],
 [_AC_FUNC_MALLOC_IF(
   [AC_DEFINE([HAVE_MALLOC], 1,
-             [Define to 1 if your system has a working `malloc' function,
+             [Define to 1 if your system has a GNU libc compatible `malloc' 
function,
               and to 0 otherwise.])],
   [AC_DEFINE([HAVE_MALLOC], 0)
    AC_LIBOBJ(malloc)
@@ -1284,7 +1284,7 @@
 AC_DEFUN([_AC_FUNC_REALLOC_IF],
 [AC_REQUIRE([AC_HEADER_STDC])dnl
 AC_CHECK_HEADERS(stdlib.h)
-AC_CACHE_CHECK([for working realloc], ac_cv_func_realloc_works,
+AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull,
 [AC_RUN_IFELSE(
 [AC_LANG_PROGRAM(
 [[#if STDC_HEADERS || HAVE_STDLIB_H
@@ -1294,10 +1294,10 @@
 #endif
 ]],
                  [exit (realloc (0, 0) ? 0 : 1);])],
-               [ac_cv_func_realloc_works=yes],
-               [ac_cv_func_realloc_works=no],
-               [ac_cv_func_realloc_works=no])])
-AS_IF([test $ac_cv_func_realloc_works = yes], [$1], [$2])
+               [ac_cv_func_realloc_0_nonnull=yes],
+               [ac_cv_func_realloc_0_nonnull=no],
+               [ac_cv_func_realloc_0_nonnull=no])])
+AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
 ])# AC_FUNC_REALLOC
 
 
@@ -1309,7 +1309,7 @@
 AC_DEFUN([AC_FUNC_REALLOC],
 [_AC_FUNC_REALLOC_IF(
   [AC_DEFINE([HAVE_REALLOC], 1,
-             [Define to 1 if your system has a working `realloc' function,
+             [Define to 1 if your system has a GNU libc compatible `realloc' 
function,
               and to 0 otherwise.])],
   [AC_DEFINE([HAVE_REALLOC], 0)
    AC_LIBOBJ([realloc])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]