>From 048631b655b85230dcdf0c95390ce5ff51caf147 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 17 Dec 2016 19:51:29 +0100 Subject: [PATCH 11/20] 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. --- ChangeLog | 6 ++++++ m4/hypotl.m4 | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bc16945..963f453 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 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. + +2016-12-17 Bruno Haible + hypotf: Avoid redefinition error on MSVC. * m4/hypotf.m4 (gl_FUNC_HYPOTF): Set REPLACE_HYPOTF to 1 if the function may be defined as an inline function. diff --git a/m4/hypotl.m4 b/m4/hypotl.m4 index d972acf..e756329 100644 --- a/m4/hypotl.m4 +++ b/m4/hypotl.m4 @@ -1,4 +1,4 @@ -# hypotl.m4 serial 5 +# hypotl.m4 serial 6 dnl Copyright (C) 2012-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, @@ -87,6 +87,10 @@ int main (int argc, char *argv[]) ]) else HAVE_HYPOTL=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_hypotl, not hypotl. + AC_CHECK_DECLS([hypotl], [REPLACE_HYPOTL=1], , [[#include ]]) fi if test $HAVE_HYPOTL = 0 || test $REPLACE_HYPOTL = 1; then dnl Find libraries needed to link lib/hypotl.c. -- 2.6.4