summaryrefslogtreecommitdiff
path: root/m4/malloc.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/malloc.m4')
-rw-r--r--m4/malloc.m415
1 files changed, 8 insertions, 7 deletions
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index 972e808..bc58017 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,5 +1,5 @@
-# malloc.m4 serial 27
-dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
+# malloc.m4 serial 29
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -25,7 +25,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[case "$host_os" in
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midnightbsd* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
| hpux* | solaris* | cygwin* | mingw* | msys* )
ac_cv_func_malloc_0_nonnull="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
@@ -43,8 +43,9 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC = 0; then
- _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1])
+ REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
+ if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
+ _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
fi
])
@@ -56,7 +57,7 @@ AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
- test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
+ test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
])
# Test whether malloc, realloc, calloc refuse to create objects
@@ -109,7 +110,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
AC_DEFINE([HAVE_MALLOC_POSIX], [1],
[Define if malloc, realloc, and calloc set errno on allocation failure.])
else
- REPLACE_MALLOC=1
+ REPLACE_MALLOC_FOR_MALLOC_POSIX=1
fi
])