1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

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>
This commit is contained in:
Lenard Mollenkopf
2025-04-08 14:16:54 +02:00
committed by Adhemerval Zanella
parent 4fa959d13d
commit 5b132ec2b7
47 changed files with 475 additions and 2 deletions

View File

@@ -985,6 +985,12 @@ __extension__ extern long long int llabs (long long int __x)
__THROW __attribute__ ((__const__)) __wur;
#endif
#if __GLIBC_USE (ISOC2Y)
extern unsigned int uabs (int __x) __THROW __attribute__ ((__const__)) __wur;
extern unsigned long int ulabs (long int __x) __THROW __attribute__ ((__const__)) __wur;
__extension__ extern unsigned long long int ullabs (long long int __x)
__THROW __attribute__ ((__const__)) __wur;
#endif
/* Return the `div_t', `ldiv_t' or `lldiv_t' representation
of the value of NUMER over DENOM. */