aboutsummaryrefslogtreecommitdiff
path: root/stdlib/inttypes.h
diff options
context:
space:
mode:
authorLenard Mollenkopf <glibc@lenardmollenkopf.de>2025-04-08 14:16:54 +0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-04-08 12:51:51 +0000
commit5b132ec2b7712dbc055838b3b538b83ad1196414 (patch)
tree28355a9f14cbf15da68217aba5e3be48169092a2 /stdlib/inttypes.h
parent4fa959d13d21b8f56a43aa0a416100303736c55c (diff)
downloadglibc-5b132ec2b7712dbc055838b3b538b83ad1196414.tar.xz
glibc-5b132ec2b7712dbc055838b3b538b83ad1196414.zip
stdlib: Implement C2Y uabs, ulabs, ullabs and uimaxabs
C2Y adds unsigned versions of the abs functions (see C2Y draft N3467 and proposal N3349). Tested for x86_64. Signed-off-by: Lenard Mollenkopf <glibc@lenardmollenkopf.de>
Diffstat (limited to 'stdlib/inttypes.h')
-rw-r--r--stdlib/inttypes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/stdlib/inttypes.h b/stdlib/inttypes.h
index 95324f0784..9726abf5b1 100644
--- a/stdlib/inttypes.h
+++ b/stdlib/inttypes.h
@@ -350,6 +350,11 @@ typedef struct
/* Compute absolute value of N. */
extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
+
+#if __GLIBC_USE (ISOC2Y)
+extern uintmax_t uimaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
+#endif
+
/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
__THROW __attribute__ ((__const__));