]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 18.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 01:25:19 +0000 (02:25 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:18 +0000 (15:56 +0100)
* m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2.
* m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F.
* m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L.
* lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/math.in.h
m4/log2.m4
m4/log2f.m4
m4/log2l.m4

index 39c23bce8013fe6ae3d22cad8b5804fd487b308e..acd6ddfe0f6982cd6a20eb1369a4b5786ededc8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        Resolve conflicts for functions introduced in Android API level 18.
 
+       * m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2.
+       * m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F.
+       * m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L.
+       * lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
        * m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
        * m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
        * lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
index a1cb22936b19f7245ce94c9f1dfe671ff00730d8..70b75e2399ec5ba2e48edd66fee62d290128d3bc 100644 (file)
@@ -1696,7 +1696,9 @@ _GL_FUNCDECL_SYS (log2f, float, (float x));
 #  endif
 _GL_CXXALIAS_SYS (log2f, float, (float x));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (log2f);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef log2f
 # if HAVE_RAW_DECL_LOG2F
index 4e08f48fe81e9995d2fb2cbcdcfb414ed27016b2..809853ed3b8ba43750e0c5bda7357a0204f19fa4 100644 (file)
@@ -1,4 +1,4 @@
-# log2.m4 serial 11
+# log2.m4 serial 12
 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,
@@ -100,6 +100,9 @@ int main (int argc, char *argv[])
   else
     HAVE_LOG2=0
     HAVE_DECL_LOG2=0
+    case "$gl_cv_onwards_func_log2" in
+      future*) REPLACE_LOG2=1 ;;
+    esac
   fi
   if test $HAVE_LOG2 = 0 || test $REPLACE_LOG2 = 1; then
     dnl Find libraries needed to link lib/log2.c.
index b85993c2c2b871c14a6bbbeb3a920a27344ae8f9..3c47f1aa87bcd43168d6a62b0a955b119e80023c 100644 (file)
@@ -1,4 +1,4 @@
-# log2f.m4 serial 11
+# log2f.m4 serial 12
 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,
@@ -101,6 +101,9 @@ int main (int argc, char *argv[])
   else
     HAVE_LOG2F=0
     HAVE_DECL_LOG2F=0
+    case "$gl_cv_onwards_func_log2f" in
+      future*) REPLACE_LOG2F=1 ;;
+    esac
   fi
   if test $HAVE_LOG2F = 0 || test $REPLACE_LOG2F = 1; then
     dnl Find libraries needed to link lib/log2f.c.
index e4810d5a9499288f81c4228110b16ea15bf4d6b4..57639a2af50ac300a09e8d75dcdd019b26a9f14f 100644 (file)
@@ -1,4 +1,4 @@
-# log2l.m4 serial 4
+# log2l.m4 serial 5
 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,
@@ -37,6 +37,9 @@ AC_DEFUN([gl_FUNC_LOG2L],
   else
     HAVE_LOG2L=0
     HAVE_DECL_LOG2L=0
+    case "$gl_cv_onwards_func_log2l" in
+      future*) REPLACE_LOG2L=1 ;;
+    esac
   fi
   if test $HAVE_LOG2L = 0 || test $REPLACE_LOG2L = 1; then
     dnl Find libraries needed to link lib/log2l.c.