]> Savannah Git Hosting - gnulib.git/commitdiff
malloc-posix, realloc-posix: Fix incorrect expansion of AC_FUNC_MALLOC.
authorBruno Haible <bruno@clisp.org>
Thu, 31 Oct 2024 21:11:22 +0000 (22:11 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 31 Oct 2024 21:11:22 +0000 (22:11 +0100)
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Handle the case of a missing third
argument.
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.

ChangeLog
m4/malloc.m4
m4/realloc.m4

index e791d614285f3b4f508b6f47c646e331b5c3c647..59a709aae8e6e326f939d5fd055fc114818fc197 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-31  Bruno Haible  <bruno@clisp.org>
+
+       malloc-posix, realloc-posix: Fix incorrect expansion of AC_FUNC_MALLOC.
+       * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Handle the case of a missing third
+       argument.
+       * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
+
 2024-10-31  Bruno Haible  <bruno@clisp.org>
 
        malloc-gnu, eealloc: Make code more future-proof.
index d5985fc75fb2940d0ad4594e8bb0518612831308..06a8b7b5ed8dc3e4df28fe688096504623ec1a79 100644 (file)
@@ -1,5 +1,5 @@
 # malloc.m4
-# serial 38
+# serial 39
 dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -39,7 +39,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
           | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
             ac_cv_func_malloc_0_nonnull="guessing yes" ;;
           # Guess as follows if we don't know.
-          *) ac_cv_func_malloc_0_nonnull=$3 ;;
+          *) ac_cv_func_malloc_0_nonnull=m4_if([$3],[],["guessing no"],[$3]) ;;
         esac
        ])
     ])
index a48dc1cfe514a801f1f8b92f325ad7ead9e18dfe..62aca6dd28d687426e2fdc8146f1475e182baeca 100644 (file)
@@ -1,5 +1,5 @@
 # realloc.m4
-# serial 35
+# serial 36
 dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -51,7 +51,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
           | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
             ac_cv_func_realloc_0_nonnull="guessing yes" ;;
           # Guess as follows if we don't know.
-          *) ac_cv_func_realloc_0_nonnull=$3 ;;
+          *) ac_cv_func_realloc_0_nonnull=m4_if([$3],[],["guessing no"],[$3]) ;;
         esac
        ])
     ])