diff options
author | Bruno Haible <bruno@clisp.org> | 2011-09-11 17:29:11 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-09-11 17:32:25 +0200 |
commit | cf00d49188ce187174233c0a5e7bd018340a8aab (patch) | |
tree | ae93cc9ad18ac78763750925b4c75fc0599409bd /modules | |
parent | 0b88a15dca93414df75ff004811c8e2573d593e3 (diff) | |
download | gnulib-cf00d49188ce187174233c0a5e7bd018340a8aab.tar.gz |
Support for MSVC compiler: Avoid division by a literal 0.
* lib/math.in.h (NAN): Define through a function call also on MSVC.
* m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Divide by 'zero' instead of 0.0.
* m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_DIRECTIVE_A,
gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO): Likewise.
(gl_PRINTF_INFINITE_LONG_DOUBLE): Divide by 'zeroL' instead of 0.0L.
* tests/infinity.h: New file.
* tests/nan.h (NaNf, NaNd, NaNl): Define through a function call also
on MSVC.
* tests/test-ceilf1.c: Include infinity.h.
(main): Use Infinityf.
* tests/test-ceil1.c: Include infinity.h.
(main): Use Infinityd.
* tests/test-ceill.c: Include infinity.h.
(main): Use Infinityl.
* tests/test-dprintf-posix.c: Include infinity.h.
(test_function): Use Infinityd.
* tests/test-floorf1.c: Include infinity.h.
(main): Use Infinityf.
* tests/test-floor1.c: Include infinity.h.
(main): Use Infinityd.
* tests/test-floorl.c: Include infinity.h.
(main): Use Infinityl.
* tests/test-fprintf-posix.c: Include infinity.h.
(test_function): Use Infinityd.
* tests/test-frexp.c: Include infinity.h.
(main): Use Infinityd.
* tests/test-frexpl.c: Include infinity.h.
(main): Use Infinityl.
* tests/test-isfinite.c: Include infinity.h.
(test_isfinitef): Use Infinityf.
(test_isfinited): Use Infinityd.
(test_isfinitel): Use Infinityl.
* tests/test-isinf.c: Include infinity.h.
(test_isinff): Use Infinityf.
(test_isinfd): Use Infinityd.
(test_isinfl): Use Infinityl.
* tests/test-isnan.c: Include infinity.h.
(test_float): Use Infinityf.
(test_double): Use Infinityd.
(test_long_double): Use Infinityl.
* tests/test-isnanf.h: Include infinity.h.
(main): Use Infinityf.
* tests/test-isnand.h: Include infinity.h.
(main): Use Infinityd.
* tests/test-isnanl.h: Include infinity.h.
(main): Use Infinityl.
* tests/test-ldexpl.c: Include infinity.h.
(main): Use Infinityl.
* tests/test-printf-posix.h: Include infinity.h.
(test_function): Use Infinityd.
* tests/test-roundf1.c: Include infinity.h.
(main): Use Infinityf.
* tests/test-round1.c: Include infinity.h.
(main): Use Infinityd.
* tests/test-roundl.c: Include infinity.h.
(main): Use Infinityl.
* tests/test-signbit.c: Include infinity.h.
(test_signbitf): Use Infinityf.
(test_signbitd): Use Infinityd.
(test_signbitl): Use Infinityl.
* tests/test-snprintf-posix.h: Include infinity.h.
(test_function): Use Infinityd, Infinityl.
* tests/test-sprintf-posix.h: Include infinity.h.
(test_function): Use Infinityd, Infinityl.
* tests/test-truncf1.c: Include infinity.h.
(main): Use Infinityf.
* tests/test-trunc1.c: Include infinity.h.
(main): Use Infinityd.
* tests/test-truncl.c: Include infinity.h.
(main): Use Infinityl.
* tests/test-vasnprintf-posix.c: Include infinity.h.
(test_function): Use Infinityd, Infinityl.
* tests/test-vasprintf-posix.c: Include infinity.h.
(test_function): Use Infinityd, Infinityl.
* modules/ceilf-tests (Files): Add tests/infinity.h.
* modules/ceil-tests (Files): Likewise.
* modules/ceill-tests (Files): Likewise.
* modules/dprintf-posix-tests (Files): Likewise.
* modules/floorf-tests (Files): Likewise.
* modules/floor-tests (Files): Likewise.
* modules/floorl-tests (Files): Likewise.
* modules/fprintf-posix-tests (Files): Likewise.
* modules/frexp-tests (Files): Likewise.
* modules/frexp-nolibm-tests (Files): Likewise.
* modules/frexpl-tests (Files): Likewise.
* modules/frexpl-nolibm-tests (Files): Likewise.
* modules/isfinite-tests (Files): Likewise.
* modules/isinf-tests (Files): Likewise.
* modules/isnan-tests (Files): Likewise.
* modules/isnanf-tests (Files): Likewise.
* modules/isnanf-nolibm-tests (Files): Likewise.
* modules/isnand-tests (Files): Likewise.
* modules/isnand-nolibm-tests (Files): Likewise.
* modules/isnanl-tests (Files): Likewise.
* modules/isnanl-nolibm-tests (Files): Likewise.
* modules/ldexpl-tests (Files): Likewise.
* modules/printf-posix-tests (Files): Likewise.
* modules/roundf-tests (Files): Likewise.
* modules/round-tests (Files): Likewise.
* modules/roundl-tests (Files): Likewise.
* modules/signbit-tests (Files): Likewise.
* modules/snprintf-posix-tests (Files): Likewise.
* modules/sprintf-posix-tests (Files): Likewise.
* modules/truncf-tests (Files): Likewise.
* modules/trunc-tests (Files): Likewise.
* modules/truncl-tests (Files): Likewise.
* modules/vasnprintf-posix-tests (Files): Likewise.
* modules/vasprintf-posix-tests (Files): Likewise.
* modules/vdprintf-posix-tests (Files): Likewise.
* modules/vfprintf-posix-tests (Files): Likewise.
* modules/vprintf-posix-tests (Files): Likewise.
* modules/vsnprintf-posix-tests (Files): Likewise.
* modules/vsprintf-posix-tests (Files): Likewise.
* modules/xprintf-posix-tests (Files): Likewise.
Diffstat (limited to 'modules')
40 files changed, 40 insertions, 0 deletions
diff --git a/modules/ceil-tests b/modules/ceil-tests index 2a168b5223..4051d1c256 100644 --- a/modules/ceil-tests +++ b/modules/ceil-tests @@ -2,6 +2,7 @@ Files: tests/test-ceil1.c tests/test-ceil2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/ceilf-tests b/modules/ceilf-tests index 040fd1bbf5..6ead40244e 100644 --- a/modules/ceilf-tests +++ b/modules/ceilf-tests @@ -2,6 +2,7 @@ Files: tests/test-ceilf1.c tests/test-ceilf2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/ceill-tests b/modules/ceill-tests index 09ae4f32d4..d6176c8351 100644 --- a/modules/ceill-tests +++ b/modules/ceill-tests @@ -1,6 +1,7 @@ Files: tests/test-ceill.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/dprintf-posix-tests b/modules/dprintf-posix-tests index 219761f779..0c5a6e8cba 100644 --- a/modules/dprintf-posix-tests +++ b/modules/dprintf-posix-tests @@ -4,6 +4,7 @@ tests/test-dprintf-posix.c tests/test-printf-posix.output tests/test-dprintf-posix2.sh tests/test-dprintf-posix2.c +tests/infinity.h tests/signature.h tests/macros.h diff --git a/modules/floor-tests b/modules/floor-tests index 9d5fbe8bbf..c57c3c9ecc 100644 --- a/modules/floor-tests +++ b/modules/floor-tests @@ -2,6 +2,7 @@ Files: tests/test-floor1.c tests/test-floor2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/floorf-tests b/modules/floorf-tests index 3e9c045ef0..8e70043688 100644 --- a/modules/floorf-tests +++ b/modules/floorf-tests @@ -2,6 +2,7 @@ Files: tests/test-floorf1.c tests/test-floorf2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/floorl-tests b/modules/floorl-tests index 5273fb5a88..68ef0f56a5 100644 --- a/modules/floorl-tests +++ b/modules/floorl-tests @@ -1,6 +1,7 @@ Files: tests/test-floorl.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/fprintf-posix-tests b/modules/fprintf-posix-tests index d2058aeb20..258e3bfb28 100644 --- a/modules/fprintf-posix-tests +++ b/modules/fprintf-posix-tests @@ -7,6 +7,7 @@ tests/test-fprintf-posix2.sh tests/test-fprintf-posix2.c tests/test-fprintf-posix3.sh tests/test-fprintf-posix3.c +tests/infinity.h tests/signature.h tests/macros.h diff --git a/modules/frexp-nolibm-tests b/modules/frexp-nolibm-tests index 82ee57c879..963a52ec4a 100644 --- a/modules/frexp-nolibm-tests +++ b/modules/frexp-nolibm-tests @@ -1,6 +1,7 @@ Files: tests/test-frexp.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/frexp-tests b/modules/frexp-tests index 3f669f9353..55ddaa4db5 100644 --- a/modules/frexp-tests +++ b/modules/frexp-tests @@ -1,6 +1,7 @@ Files: tests/test-frexp.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/frexpl-nolibm-tests b/modules/frexpl-nolibm-tests index 1648d95ab4..ffc6892de0 100644 --- a/modules/frexpl-nolibm-tests +++ b/modules/frexpl-nolibm-tests @@ -1,6 +1,7 @@ Files: tests/test-frexpl.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/frexpl-tests b/modules/frexpl-tests index a944634af2..0987955085 100644 --- a/modules/frexpl-tests +++ b/modules/frexpl-tests @@ -1,6 +1,7 @@ Files: tests/test-frexpl.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/isfinite-tests b/modules/isfinite-tests index d4940690b0..dc0ab8c6a4 100644 --- a/modules/isfinite-tests +++ b/modules/isfinite-tests @@ -1,5 +1,6 @@ Files: tests/test-isfinite.c +tests/infinity.h tests/macros.h Depends-on: diff --git a/modules/isinf-tests b/modules/isinf-tests index f577aa9e8d..2ee42a7ab0 100644 --- a/modules/isinf-tests +++ b/modules/isinf-tests @@ -3,6 +3,7 @@ m4/exponentf.m4 m4/exponentd.m4 m4/exponentl.m4 tests/test-isinf.c +tests/infinity.h tests/macros.h Depends-on: diff --git a/modules/isnan-tests b/modules/isnan-tests index 1bc2b7217a..e21153b7e4 100644 --- a/modules/isnan-tests +++ b/modules/isnan-tests @@ -1,6 +1,7 @@ Files: tests/test-isnan.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/isnand-nolibm-tests b/modules/isnand-nolibm-tests index ee6f880d2f..d2cbc79f02 100644 --- a/modules/isnand-nolibm-tests +++ b/modules/isnand-nolibm-tests @@ -2,6 +2,7 @@ Files: tests/test-isnand-nolibm.c tests/test-isnand.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/isnand-tests b/modules/isnand-tests index a23ba4db67..89d2ae0110 100644 --- a/modules/isnand-tests +++ b/modules/isnand-tests @@ -2,6 +2,7 @@ Files: tests/test-isnand.c tests/test-isnand.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/isnanf-nolibm-tests b/modules/isnanf-nolibm-tests index ff89c1d6cb..88c15d013f 100644 --- a/modules/isnanf-nolibm-tests +++ b/modules/isnanf-nolibm-tests @@ -2,6 +2,7 @@ Files: tests/test-isnanf-nolibm.c tests/test-isnanf.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/isnanf-tests b/modules/isnanf-tests index ba301df11e..86caabe8be 100644 --- a/modules/isnanf-tests +++ b/modules/isnanf-tests @@ -2,6 +2,7 @@ Files: tests/test-isnanf.c tests/test-isnanf.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/isnanl-nolibm-tests b/modules/isnanl-nolibm-tests index 78427b4368..6a2ed4e27f 100644 --- a/modules/isnanl-nolibm-tests +++ b/modules/isnanl-nolibm-tests @@ -2,6 +2,7 @@ Files: tests/test-isnanl-nolibm.c tests/test-isnanl.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/isnanl-tests b/modules/isnanl-tests index 68411fec1d..c39be318e8 100644 --- a/modules/isnanl-tests +++ b/modules/isnanl-tests @@ -2,6 +2,7 @@ Files: tests/test-isnanl.c tests/test-isnanl.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/ldexpl-tests b/modules/ldexpl-tests index 1daeb6fa2a..2fa0434387 100644 --- a/modules/ldexpl-tests +++ b/modules/ldexpl-tests @@ -1,6 +1,7 @@ Files: tests/test-ldexpl.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/printf-posix-tests b/modules/printf-posix-tests index 8e8ec6de6f..8a99cd6cdd 100644 --- a/modules/printf-posix-tests +++ b/modules/printf-posix-tests @@ -5,6 +5,7 @@ tests/test-printf-posix.h tests/test-printf-posix.output tests/test-printf-posix2.sh tests/test-printf-posix2.c +tests/infinity.h tests/signature.h tests/macros.h diff --git a/modules/round-tests b/modules/round-tests index 9e154c8cc1..2c4b37bf6e 100644 --- a/modules/round-tests +++ b/modules/round-tests @@ -2,6 +2,7 @@ Files: tests/test-round1.c tests/test-round2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/roundf-tests b/modules/roundf-tests index 7ee4178f3e..cd8af30202 100644 --- a/modules/roundf-tests +++ b/modules/roundf-tests @@ -3,6 +3,7 @@ tests/test-roundf1.c tests/test-round2.c tests/test-roundf2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/roundl-tests b/modules/roundl-tests index f9bd46727e..7e7aca3b98 100644 --- a/modules/roundl-tests +++ b/modules/roundl-tests @@ -1,6 +1,7 @@ Files: tests/test-roundl.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/signbit-tests b/modules/signbit-tests index b8247652f2..65d5602b90 100644 --- a/modules/signbit-tests +++ b/modules/signbit-tests @@ -1,6 +1,7 @@ Files: tests/test-signbit.c tests/minus-zero.h +tests/infinity.h tests/macros.h m4/exponentf.m4 m4/exponentd.m4 diff --git a/modules/snprintf-posix-tests b/modules/snprintf-posix-tests index 9a5c3ab7cb..e26803bc88 100644 --- a/modules/snprintf-posix-tests +++ b/modules/snprintf-posix-tests @@ -3,6 +3,7 @@ tests/test-snprintf-posix.c tests/test-snprintf-posix.h tests/test-snprintf.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/sprintf-posix-tests b/modules/sprintf-posix-tests index 333c5844be..712859a9c6 100644 --- a/modules/sprintf-posix-tests +++ b/modules/sprintf-posix-tests @@ -2,6 +2,7 @@ Files: tests/test-sprintf-posix.c tests/test-sprintf-posix.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/trunc-tests b/modules/trunc-tests index 6c254e0692..1ec87d7c57 100644 --- a/modules/trunc-tests +++ b/modules/trunc-tests @@ -2,6 +2,7 @@ Files: tests/test-trunc1.c tests/test-trunc2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/truncf-tests b/modules/truncf-tests index 27b93f2a2a..1c847e7bfc 100644 --- a/modules/truncf-tests +++ b/modules/truncf-tests @@ -2,6 +2,7 @@ Files: tests/test-truncf1.c tests/test-truncf2.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/truncl-tests b/modules/truncl-tests index 01bcf73921..f6b7dd3944 100644 --- a/modules/truncl-tests +++ b/modules/truncl-tests @@ -1,6 +1,7 @@ Files: tests/test-truncl.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/vasnprintf-posix-tests b/modules/vasnprintf-posix-tests index 01f0188fd5..eb6acf14e6 100644 --- a/modules/vasnprintf-posix-tests +++ b/modules/vasnprintf-posix-tests @@ -4,6 +4,7 @@ tests/test-vasnprintf-posix2.sh tests/test-vasnprintf-posix2.c tests/test-vasnprintf-posix3.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h m4/locale-fr.m4 diff --git a/modules/vasprintf-posix-tests b/modules/vasprintf-posix-tests index 8702bdcbde..cf74d78874 100644 --- a/modules/vasprintf-posix-tests +++ b/modules/vasprintf-posix-tests @@ -1,6 +1,7 @@ Files: tests/test-vasprintf-posix.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/macros.h diff --git a/modules/vdprintf-posix-tests b/modules/vdprintf-posix-tests index a7dff7acab..032cae90da 100644 --- a/modules/vdprintf-posix-tests +++ b/modules/vdprintf-posix-tests @@ -3,6 +3,7 @@ tests/test-vdprintf-posix.sh tests/test-vdprintf-posix.c tests/test-fprintf-posix.h tests/test-printf-posix.output +tests/infinity.h tests/signature.h tests/macros.h diff --git a/modules/vfprintf-posix-tests b/modules/vfprintf-posix-tests index d4dab2d948..87e8809031 100644 --- a/modules/vfprintf-posix-tests +++ b/modules/vfprintf-posix-tests @@ -3,6 +3,7 @@ tests/test-vfprintf-posix.sh tests/test-vfprintf-posix.c tests/test-fprintf-posix.h tests/test-printf-posix.output +tests/infinity.h tests/signature.h tests/macros.h diff --git a/modules/vprintf-posix-tests b/modules/vprintf-posix-tests index 84f250b35c..1d7e50b319 100644 --- a/modules/vprintf-posix-tests +++ b/modules/vprintf-posix-tests @@ -3,6 +3,7 @@ tests/test-vprintf-posix.sh tests/test-vprintf-posix.c tests/test-printf-posix.h tests/test-printf-posix.output +tests/infinity.h tests/signature.h tests/macros.h diff --git a/modules/vsnprintf-posix-tests b/modules/vsnprintf-posix-tests index 687d28d449..7c43b70c39 100644 --- a/modules/vsnprintf-posix-tests +++ b/modules/vsnprintf-posix-tests @@ -3,6 +3,7 @@ tests/test-vsnprintf-posix.c tests/test-snprintf-posix.h tests/test-vsnprintf.c tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/vsprintf-posix-tests b/modules/vsprintf-posix-tests index 2f04f875a8..9d8c5fd6f6 100644 --- a/modules/vsprintf-posix-tests +++ b/modules/vsprintf-posix-tests @@ -2,6 +2,7 @@ Files: tests/test-vsprintf-posix.c tests/test-sprintf-posix.h tests/minus-zero.h +tests/infinity.h tests/nan.h tests/signature.h tests/macros.h diff --git a/modules/xprintf-posix-tests b/modules/xprintf-posix-tests index 7882b43e1b..a8b2984cd7 100644 --- a/modules/xprintf-posix-tests +++ b/modules/xprintf-posix-tests @@ -5,6 +5,7 @@ tests/test-xprintf-posix.c tests/test-fprintf-posix.h tests/test-printf-posix.h tests/test-printf-posix.output +tests/infinity.h tests/macros.h Depends-on: |