]> Savannah Git Hosting - gnulib.git/commitdiff
Fix warnings for functions introduced in Android API level 18.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:23 +0000 (21:55 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:23 +0000 (21:55 +0100)
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Test for getdelim using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/getline.m4 (gl_FUNC_GETLINE): Test for getline using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
* m4/log2.m4 (gl_FUNC_LOG2): Test for log2 using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/log2f.m4 (gl_FUNC_LOG2F): Test for log2f using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/log2l.m4 (gl_FUNC_LOG2L): Test for log2l using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.

ChangeLog
m4/getdelim.m4
m4/getline.m4
m4/log2.m4
m4/log2f.m4
m4/log2l.m4

index 0704164a25223bdab4562285e117fc5db7bf9977..7d80045e8102845c8937fec681d8b6c362c939d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-01-19  Bruno Haible  <bruno@clisp.org>
+
+       Fix warnings for functions introduced in Android API level 18.
+       * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test for getdelim using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/getline.m4 (gl_FUNC_GETLINE): Test for getline using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
+       * m4/log2.m4 (gl_FUNC_LOG2): Test for log2 using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+       * m4/log2f.m4 (gl_FUNC_LOG2F): Test for log2f using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+       * m4/log2l.m4 (gl_FUNC_LOG2L): Test for log2l using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+
 2023-01-19  Bruno Haible  <bruno@clisp.org>
 
        Fix warnings for functions introduced in Android API level 16 or 17.
index 9aaed202abe52ffb2250327ae15d0dc79492e387..bbd7c03bcba72db8b54cd49584ded800c15a7ba3 100644 (file)
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 16
+# getdelim.m4 serial 17
 
 dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 dnl
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
 
   AC_CHECK_DECLS_ONCE([getdelim])
 
-  AC_CHECK_FUNCS_ONCE([getdelim])
+  gl_CHECK_FUNCS_ANDROID([getdelim], [[#include <stdio.h>]])
   if test $ac_cv_func_getdelim = yes; then
     HAVE_GETDELIM=1
     dnl Found it in some library.  Verify that it works.
index 03569f06b2c9e8156f6241d3ca393b9d3a08164f..f68fa3a1acf8723438ee2f41453bc672752de886 100644 (file)
@@ -1,4 +1,4 @@
-# getline.m4 serial 30
+# getline.m4 serial 31
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
@@ -23,12 +23,9 @@ AC_DEFUN([gl_FUNC_GETLINE],
 
   AC_CHECK_DECLS_ONCE([getline])
 
-  gl_getline_needs_run_time_check=no
-  AC_CHECK_FUNC([getline],
-                [dnl Found it in some library.  Verify that it works.
-                 gl_getline_needs_run_time_check=yes],
-                [am_cv_func_working_getline=no])
-  if test $gl_getline_needs_run_time_check = yes; then
+  gl_CHECK_FUNCS_ANDROID([getline], [[#include <stdio.h>]])
+  if test $ac_cv_func_getline = yes; then
+    dnl Found it in some library.  Verify that it works.
     AC_CACHE_CHECK([for working getline function],
       [am_cv_func_working_getline],
       [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -85,6 +82,8 @@ AC_DEFUN([gl_FUNC_GETLINE],
             ])
          ])
       ])
+  else
+    am_cv_func_working_getline=no
   fi
 
   if test $ac_cv_have_decl_getline = no; then
index acf092fed16f905e47f1fc3feecf6e4c21f0c8f8..4e08f48fe81e9995d2fb2cbcdcfb414ed27016b2 100644 (file)
@@ -1,4 +1,4 @@
-# log2.m4 serial 10
+# log2.m4 serial 11
 dnl Copyright (C) 2010-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,
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_LOG2],
   dnl Test whether log2() exists.
   save_LIBS="$LIBS"
   LIBS="$LIBS $LOG2_LIBM"
-  AC_CHECK_FUNCS([log2])
+  gl_CHECK_FUNCS_ANDROID([log2], [[#include <math.h>]])
   LIBS="$save_LIBS"
   if test $ac_cv_func_log2 = yes; then
     HAVE_LOG2=1
index f9da22e0975d50e97a979814aace8ae2a4ed416a..b85993c2c2b871c14a6bbbeb3a920a27344ae8f9 100644 (file)
@@ -1,4 +1,4 @@
-# log2f.m4 serial 10
+# log2f.m4 serial 11
 dnl Copyright (C) 2010-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,
@@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_LOG2F],
   dnl Test whether log2f() exists.
   save_LIBS="$LIBS"
   LIBS="$LIBS $LOG2F_LIBM"
-  AC_CHECK_FUNCS([log2f])
+  gl_CHECK_FUNCS_ANDROID([log2f], [[#include <math.h>]])
   LIBS="$save_LIBS"
   if test $ac_cv_func_log2f = yes; then
     HAVE_LOG2F=1
index f65c00398e37a1f191219be809cb413ab8a22a91..e4810d5a9499288f81c4228110b16ea15bf4d6b4 100644 (file)
@@ -1,4 +1,4 @@
-# log2l.m4 serial 3
+# log2l.m4 serial 4
 dnl Copyright (C) 2010-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,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_LOG2L],
   dnl defined in the same library as log2().
   save_LIBS="$LIBS"
   LIBS="$LIBS $LOG2_LIBM"
-  AC_CHECK_FUNCS([log2l])
+  gl_CHECK_FUNCS_ANDROID([log2l], [[#include <math.h>]])
   LIBS="$save_LIBS"
   if test $ac_cv_func_log2l = yes; then
     LOG2L_LIBM="$LOG2_LIBM"