diff options
author | Bruno Haible <bruno@clisp.org> | 2021-08-29 02:05:05 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-08-29 02:05:05 +0200 |
commit | 798de454144208ea58a080c13c99f38c1166f0bd (patch) | |
tree | 50da6585ce3ec07e3077b5be358af1bee477d28d /lib/fma.c | |
parent | 8bc60373667bbca9a991a9a675635a8049b94e2c (diff) | |
download | gnulib-798de454144208ea58a080c13c99f38c1166f0bd.tar.gz |
fma: Fix compilation error on Linux/sh4.
* lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these
rounding modes are not defined.
Diffstat (limited to 'lib/fma.c')
-rw-r--r-- | lib/fma.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -725,10 +725,14 @@ FUNC (DOUBLE x, DOUBLE y, DOUBLE z) int rounding_mode = fegetround (); if (rounding_mode == FE_TOWARDZERO) round_up = 0; +# if defined FE_DOWNWARD /* not defined on sh4 */ else if (rounding_mode == FE_DOWNWARD) round_up = sign; +# endif +# if defined FE_UPWARD /* not defined on sh4 */ else if (rounding_mode == FE_UPWARD) round_up = !sign; +# endif #else /* Cf. <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/float.h.html> */ int rounding_mode = FLT_ROUNDS; |