aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bonnefille <thomas.bonnefille@bootlin.com>2025-02-04 08:48:13 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-02-05 12:31:46 +0000
commit9443ac7e2937bb4f26cf44c73bb8150860c5df45 (patch)
tree29cb85a61a46819d5f78cf5e59cf1f614be4fe9f
parentserver: don't instantiate a client without a monitor (diff)
box-drawings: handle architecture with soft-float
Currently, architecture using soft-floats doesn't support instructions FE_INVALID, FE_DIVBYZERO, FE_OVERFLOW and FE_UNDERFLOW and so building on those architectures results with a build error. As the sqrt math function should set errno to EDOM if an error occurs, fetestexcept shouldn't be mandatory. This commit removes the float environment error handling. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
-rw-r--r--box-drawing.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/box-drawing.c b/box-drawing.c
index 1c613051..421ff54d 100644
--- a/box-drawing.c
+++ b/box-drawing.c
@@ -1462,14 +1462,12 @@ draw_box_drawings_light_arc(struct buf *buf, char32_t wc)
*/
for (double i = y_min*16; i <= y_max*16; i++) {
errno = 0;
- feclearexcept(FE_ALL_EXCEPT);
double y = i / 16.;
double x = circle_hemisphere * sqrt(c_r2 - (y - c_y) * (y - c_y)) + c_x;
/* See math_error(7) */
- if (errno != 0 ||
- fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW))
+ if (errno != 0)
{
continue;
}