]> Savannah Git Hosting - gnulib.git/commitdiff
reallocarray: Fix compilation error in C++ mode on Android.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Jan 2023 16:29:03 +0000 (17:29 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Jan 2023 16:29:03 +0000 (17:29 +0100)
* m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Use gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS.

ChangeLog
m4/reallocarray.m4

index 219d6c16a6c245a936e05248b3bcf47dbab479fa..12171e2fff9f49a0baf39aa7e8da3429533d22d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-09  Bruno Haible  <bruno@clisp.org>
+
+       reallocarray: Fix compilation error in C++ mode on Android.
+       * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Use gl_CHECK_FUNCS_ANDROID
+       instead of AC_CHECK_FUNCS.
+
 2023-01-09  Bruno Haible  <bruno@clisp.org>
 
        getsubopt: Fix compilation error in C++ mode on Android.
index 1607b7a9ed637d520f42708f77bf707cf5b6829e..4be7cd1be2a3768f03cae8361230d07ebd42b2e1 100644 (file)
@@ -1,4 +1,4 @@
-# reallocarray.m4 serial 3
+# reallocarray.m4 serial 4
 dnl Copyright (C) 2017-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,
@@ -11,7 +11,7 @@ AC_DEFUN([gl_FUNC_REALLOCARRAY],
 
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
-  AC_CHECK_FUNCS([reallocarray])
+  gl_CHECK_FUNCS_ANDROID([reallocarray], [[#include <stdlib.h>]])
   if test "$ac_cv_func_reallocarray" = no; then
     HAVE_REALLOCARRAY=0
   elif test "$gl_cv_malloc_ptrdiff" = no; then