diff options
author | Bruno Haible <bruno@clisp.org> | 2020-08-15 17:23:02 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-08-15 17:23:02 +0200 |
commit | e9d1506f6bc19cbde441f9e9f2d7869b7fc49d87 (patch) | |
tree | b565651c29f63cfefb5b024005e379f5330c7ea5 | |
parent | d4c637e577594532fb45781b4cac79c9a50a4c1e (diff) | |
download | gnulib-e9d1506f6bc19cbde441f9e9f2d7869b7fc49d87.tar.gz |
frexpl: Fix configuration test result on MSVC.
* m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant
zero.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | m4/frexpl.m4 | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2020-08-15 Bruno Haible <bruno@clisp.org> + frexpl: Fix configuration test result on MSVC. + * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant + zero. + +2020-08-15 Bruno Haible <bruno@clisp.org> + Support compiling without -loldnames on native Windows. * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros. * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES. diff --git a/m4/frexpl.m4 b/m4/frexpl.m4 index e79fa5cbd9..d5951c4310 100644 --- a/m4/frexpl.m4 +++ b/m4/frexpl.m4 @@ -1,4 +1,4 @@ -# frexpl.m4 serial 21 +# frexpl.m4 serial 22 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -150,6 +150,7 @@ extern "C" #endif long double frexpl (long double, int *); +long double zero = 0.0L; int main() { int result = 0; @@ -207,7 +208,8 @@ int main() } } /* Test on infinite numbers. */ - x = 1.0L / 0.0L; + /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */ + x = 1.0L / zero; { int exp; long double y = frexpl (x, &exp); |