]> Savannah Git Hosting - gnulib.git/commitdiff
fmodl: Avoid redefinition error on MSVC.
authorBruno Haible <bruno@clisp.org>
Sat, 17 Dec 2016 18:47:46 +0000 (19:47 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 17 Dec 2016 22:09:08 +0000 (23:09 +0100)
* m4/fmodl.m4 (gl_FUNC_FMODL): Set REPLACE_FMODL to 1 if the function
may be defined as an inline function.

ChangeLog
m4/fmodl.m4

index 093964a6039c6722306eae2e1ada822c6bd2e1c5..0fdce80032617f65d09ff969cf0c1e2f534a5fa7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-17  Bruno Haible  <bruno@clisp.org>
+
+       fmodl: Avoid redefinition error on MSVC.
+       * m4/fmodl.m4 (gl_FUNC_FMODL): Set REPLACE_FMODL to 1 if the function
+       may be defined as an inline function.
+
 2016-12-17  Bruno Haible  <bruno@clisp.org>
 
        fmodf: Avoid redefinition error on MSVC.
index c772ab6320253db13224e96551678d1abca972d5..05dc6ecd83bef19afd82b4f393e9d344726d71c3 100644 (file)
@@ -1,4 +1,4 @@
-# fmodl.m4 serial 5
+# fmodl.m4 serial 6
 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,
@@ -86,6 +86,10 @@ int main (int argc, char *argv[])
     ])
   else
     HAVE_FMODL=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_fmodl, not fmodl.
+    AC_CHECK_DECLS([fmodl], [REPLACE_FMODL=1], , [[#include <math.h>]])
   fi
   if test $HAVE_FMODL = 0 || test $REPLACE_FMODL = 1; then
     dnl Find libraries needed to link lib/fmodl.c.