]> Savannah Git Hosting - gnulib.git/commitdiff
log10f: Avoid redefinition error on MSVC.
authorBruno Haible <bruno@clisp.org>
Sat, 17 Dec 2016 19:30:33 +0000 (20:30 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 17 Dec 2016 22:09:11 +0000 (23:09 +0100)
* m4/log10f.m4 (gl_FUNC_LOG10F): Set REPLACE_LOG10F to 1 if the function
may be defined as an inline function.

ChangeLog
m4/log10f.m4

index 963f4539ab3b34696af3f9e00a1ee36337a0ab82..61b04bf431388d4fd701ea1cfffa9d207a660210 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-17  Bruno Haible  <bruno@clisp.org>
+
+       log10f: Avoid redefinition error on MSVC.
+       * m4/log10f.m4 (gl_FUNC_LOG10F): Set REPLACE_LOG10F to 1 if the function
+       may be defined as an inline function.
+
 2016-12-17  Bruno Haible  <bruno@clisp.org>
 
        hypotl: Avoid redefinition error on MSVC.
index 5243cd033ed8ea3ac6c789a44c740ba64c47831a..ed09b17e624f51c7f9585ff7aa14e70d0908b0bb 100644 (file)
@@ -1,4 +1,4 @@
-# log10f.m4 serial 6
+# log10f.m4 serial 7
 dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -84,6 +84,10 @@ int main (int argc, char *argv[])
     ])
   else
     HAVE_LOG10F=0
+    dnl If the function is declared but does not appear to exist, it may be
+    dnl defined as an inline function. In order to avoid a conflict, we have
+    dnl to define rpl_log10f, not log10f.
+    AC_CHECK_DECLS([log10f], [REPLACE_LOG10F=1], , [[#include <math.h>]])
   fi
   if test $HAVE_LOG10F = 0 || test $REPLACE_LOG10F = 1; then
     dnl Find libraries needed to link lib/log10f.c.