[Top][All Lists]
[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 14:33:17 +0100 (CET) |
Paul Eggert writes:
> I installed this patch.
> -If the @code{malloc} function works correctly (@samp{malloc (0)} returns a
> valid
> +If the @code{malloc} function is compatible with the @acronym{GNU} C
> +library @code{malloc} (i.e., @samp{malloc (0)} returns a valid
Thanks. Wouldn't you also want to fix the "checking for working malloc"
message?
2002-10-31 Bruno Haible <address@hidden>
* lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF): Change name of
cache variable to ac_cv_func_malloc_0_nonnull.
(AC_FUNC_MALLOC): Change description of HAVE_MALLOC macro.
--- lib/autoconf/functions.m4.old Mon Oct 28 07:49:59 2002
+++ lib/autoconf/functions.m4 Thu Oct 31 14:30:07 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 glibc 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 glibc compatible `malloc'
function,
and to 0 otherwise.])],
[AC_DEFINE([HAVE_MALLOC], 0)
AC_LIBOBJ(malloc)
- AC_FUNC_MALLOC, Bruno Haible, 2002/10/29
- Re: AC_FUNC_MALLOC, Akim Demaille, 2002/10/29
- Re: AC_FUNC_MALLOC, Bruno Haible, 2002/10/29
- Re: AC_FUNC_MALLOC, Akim Demaille, 2002/10/29
- Re: AC_FUNC_MALLOC, Paul Eggert, 2002/10/29
- Re: AC_FUNC_MALLOC,
Bruno Haible <=
- Re: AC_FUNC_MALLOC, Akim Demaille, 2002/10/31
- Re: AC_FUNC_MALLOC, Bruno Haible, 2002/10/31
- Re: AC_FUNC_MALLOC, Akim Demaille, 2002/10/31