Update Gnulib to the latest git version
[deliverable/binutils-gdb.git] / gnulib / import / m4 / realloc.m4
index fc2282544dd9dcef3d9f5e661f032adc50e4fd57..05e7243248198ae8fa2288770b510aaacca21126 100644 (file)
@@ -1,13 +1,11 @@
-# realloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+# realloc.m4 serial 18
+dnl Copyright (C) 2007, 2009-2019 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.
 
-m4_version_prereq([2.70], [] ,[
-
 # This is adapted with modifications from upstream Autoconf here:
-# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_REALLOC_IF],
 [
   AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -32,19 +30,24 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
        [ac_cv_func_realloc_0_nonnull=no],
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
-          *-gnu* | freebsd* | netbsd* | openbsd* \
+          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
           | hpux* | solaris* | cygwin* | mingw*)
-            ac_cv_func_realloc_0_nonnull=yes ;;
-          # If we don't know, assume the worst.
-          *) ac_cv_func_realloc_0_nonnull=no ;;
+            ac_cv_func_realloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
         esac
        ])
     ])
-  AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
+  case "$ac_cv_func_realloc_0_nonnull" in
+    *yes)
+      $1
+      ;;
+    *)
+      $2
+      ;;
+  esac
 ])# AC_FUNC_REALLOC
 
-])
-
 # gl_FUNC_REALLOC_GNU
 # -------------------
 # Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
This page took 0.025127 seconds and 4 git commands to generate.