>From fd9c0606644e59a6f27ddb5a79feabf82493b15b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 17 Dec 2016 20:30:33 +0100 Subject: [PATCH 12/20] 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. --- ChangeLog | 6 ++++++ m4/log10f.m4 | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 963f453..61b04bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2016-12-17 Bruno Haible + 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 + hypotl: Avoid redefinition error on MSVC. * m4/hypotl.m4 (gl_FUNC_HYPOTL): Set REPLACE_HYPOTL to 1 if the function may be defined as an inline function. diff --git a/m4/log10f.m4 b/m4/log10f.m4 index 5243cd0..ed09b17 100644 --- a/m4/log10f.m4 +++ b/m4/log10f.m4 @@ -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 ]]) fi if test $HAVE_LOG10F = 0 || test $REPLACE_LOG10F = 1; then dnl Find libraries needed to link lib/log10f.c. -- 2.6.4