summaryrefslogtreecommitdiffstats
path: root/gl/m4/malloc.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/malloc.m4')
-rw-r--r--gl/m4/malloc.m413
1 files changed, 7 insertions, 6 deletions
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 972e808..6b76c1e 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
1# malloc.m4 serial 27 1# malloc.m4 serial 28
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -43,8 +43,9 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
43[ 43[
44 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 44 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
45 AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) 45 AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
46 if test $REPLACE_MALLOC = 0; then 46 REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
47 _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1]) 47 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
48 _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
48 fi 49 fi
49]) 50])
50 51
@@ -56,7 +57,7 @@ AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
56[ 57[
57 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 58 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
58 AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) 59 AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
59 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1 60 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
60]) 61])
61 62
62# Test whether malloc, realloc, calloc refuse to create objects 63# Test whether malloc, realloc, calloc refuse to create objects
@@ -109,7 +110,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
109 AC_DEFINE([HAVE_MALLOC_POSIX], [1], 110 AC_DEFINE([HAVE_MALLOC_POSIX], [1],
110 [Define if malloc, realloc, and calloc set errno on allocation failure.]) 111 [Define if malloc, realloc, and calloc set errno on allocation failure.])
111 else 112 else
112 REPLACE_MALLOC=1 113 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
113 fi 114 fi
114]) 115])
115 116