From 608008917d26e7b2f6d0e1041ab981c853fe9733 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 30 Jan 2024 13:15:59 -0500 Subject: update standards and safety checks --- src/inttypes/imaxabs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/inttypes/imaxabs.c') diff --git a/src/inttypes/imaxabs.c b/src/inttypes/imaxabs.c index 7f4e22ae..28f82987 100644 --- a/src/inttypes/imaxabs.c +++ b/src/inttypes/imaxabs.c @@ -1,12 +1,13 @@ -#if 0 - -#include #include +#include "_safety.h" +#undef imaxabs /** absolute value **/ intmax_t imaxabs(intmax_t j) { + SIGNAL_SAFE(0); + if (j == INTMAX_MIN) { /* undefined behavior */ return INTMAX_MIN; @@ -24,6 +25,3 @@ UNDEFINED(ABS(ARGUMENT(j)) cannot be represented RETURN_SUCCESS(ABS(ARGUMENT(j)) STDC(199901) */ - - -#endif -- cgit v1.2.1