From patchwork Sun Mar 9 21:42:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lenard Mollenkopf X-Patchwork-Id: 107566 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3557B3858C42 for ; Sun, 9 Mar 2025 22:00:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3557B3858C42 Authentication-Results: sourceware.org; dkim=permerror header.d=lenardmollenkopf.de header.i=@lenardmollenkopf.de header.a=rsa-sha256 header.s=dkim header.b=akFCylT3 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from lenardmollenkopf.com (lenardmollenkopf.com [IPv6:2a02:c207:3004:4379::bad:c0de]) by sourceware.org (Postfix) with ESMTPS id 7A1773858D1E for ; Sun, 9 Mar 2025 21:59:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A1773858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=lenardmollenkopf.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lenardmollenkopf.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7A1773858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a02:c207:3004:4379::bad:c0de ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741557565; cv=none; b=iquRmeVdJ4h3I4fanqWPdwU78qoP2dRy0G8Ah7kUPjrwyEGqiPs3QJvLdAkqCCSHELFhOmwcW7RUgOQkTCBsHyets1c+9gxGRHkGdKKS0+5JKePQzlYPhEha6+sjQwgkNswZMVgneHCu4zKpE+yikdygzU5n2qOzHYh4FeoUNn4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1741557565; c=relaxed/simple; bh=vjfTDelqaiR6H27NEDolhfrRIE7LWxy0m7tXKlFEIVQ=; h=From:DKIM-Signature:To:Subject:Date:Message-ID:MIME-Version; b=o0EIS4PPawJ+RtnLH5SqSOH83yA6FBUBBqLLN1YhqlaBYw8hR6aF/8ps2T6XTeOBnomQtHTG2qBLXlxaRn5vjEjnX5O8xy4ujK9MDCD8ZmRgPlKDjNyJZ4hnyrLHJc3nKKuBAYae8aPFPCUSp08vyaK6quGi9RNo1oCmnWXOdQk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A1773858D1E From: Lenard Mollenkopf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lenardmollenkopf.de; s=dkim; t=1741557562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pcdw/VUecD/7HIOBa5c6XSIUpAUTHDIWNx84QabsI0U=; b=akFCylT3FrQNfRddQ4hrvtlnVWUi4t2jS5DENaeTwpY/Regjcm5IYfHmuKh/sdaEjE8yZ1 IWg4SROHNq9lRR6AXPUOznvO6uqAJ/owPNUap6MlCVCNhkjojJkbVaSLiHMXULwM6QwAap OasO9dkI+56G/EwF1ZC+GzLqWxC4m1LRmfnecw/HpEKhBOkgAAfKrq8aDaxLbMhaRlS/9c dihy3rpkZnwEB98+/iIV8IODzwtrKH/s+ntinj8JjKNr4OBCDF7sb6Hcoo4i3oE5lDCUbD gf/+NkT1599yv6EIPIW9mKsal+QQCdrVVUN+Pl/7OWR/Y1UYcJ+YSBq3/zrvuw== Authentication-Results: lenardmollenkopf.com; auth=pass smtp.mailfrom=glibc@lenardmollenkopf.de To: libc-alpha@sourceware.org Cc: josmyers@redhat.com, pinskia@gmail.com, eggert@cs.ucla.edu, Lenard Mollenkopf Subject: [PATCH v3] stdlib: Implement C2Y uabs, ulabs, ullabs and uimaxabs Date: Sun, 9 Mar 2025 22:42:47 +0100 Message-ID: <20250309214246.1603237-2-glibc@lenardmollenkopf.de> In-Reply-To: <20250306192438.66436-2-glibc@lenardmollenkopf.de> References: <20250306192438.66436-2-glibc@lenardmollenkopf.de> MIME-Version: 1.0 X-Spamd-Bar: + X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, PROLO_LEO2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org C2Y adds unsigned versions of the abs functions (see C2Y draft N3467 and proposal N3349). Tested for x86_64. Signed-off-by: Lenard Mollenkopf --- NEWS | 3 + manual/arith.texi | 12 +++- stdlib/Makefile | 10 ++++ stdlib/Versions | 6 ++ stdlib/inttypes.h | 5 ++ stdlib/stdlib.h | 6 ++ stdlib/tst-uabs.c | 45 +++++++++++++++ stdlib/tst-ulabs.c | 52 ++++++++++++++++++ stdlib/tst-ullabs.c | 55 +++++++++++++++++++ stdlib/uabs.c | 27 +++++++++ stdlib/ulabs.c | 27 +++++++++ stdlib/ullabs.c | 27 +++++++++ sysdeps/mach/hurd/i386/libc.abilist | 4 ++ sysdeps/mach/hurd/x86_64/libc.abilist | 3 + sysdeps/unix/sysv/linux/aarch64/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/alpha/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/arc/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/arm/be/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/arm/le/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/csky/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/hppa/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/i386/libc.abilist | 4 ++ .../sysv/linux/loongarch/lp64/libc.abilist | 4 ++ .../sysv/linux/m68k/coldfire/libc.abilist | 4 ++ .../unix/sysv/linux/m68k/m680x0/libc.abilist | 4 ++ .../sysv/linux/microblaze/be/libc.abilist | 4 ++ .../sysv/linux/microblaze/le/libc.abilist | 4 ++ .../sysv/linux/mips/mips32/fpu/libc.abilist | 4 ++ .../sysv/linux/mips/mips32/nofpu/libc.abilist | 4 ++ .../sysv/linux/mips/mips64/n32/libc.abilist | 4 ++ .../sysv/linux/mips/mips64/n64/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/or1k/libc.abilist | 4 ++ .../linux/powerpc/powerpc32/fpu/libc.abilist | 4 ++ .../powerpc/powerpc32/nofpu/libc.abilist | 4 ++ .../linux/powerpc/powerpc64/be/libc.abilist | 4 ++ .../linux/powerpc/powerpc64/le/libc.abilist | 4 ++ .../unix/sysv/linux/riscv/rv32/libc.abilist | 4 ++ .../unix/sysv/linux/riscv/rv64/libc.abilist | 4 ++ .../unix/sysv/linux/s390/s390-32/libc.abilist | 4 ++ .../unix/sysv/linux/s390/s390-64/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/sh/be/libc.abilist | 4 ++ sysdeps/unix/sysv/linux/sh/le/libc.abilist | 4 ++ .../sysv/linux/sparc/sparc32/libc.abilist | 4 ++ .../sysv/linux/sparc/sparc64/libc.abilist | 4 ++ .../unix/sysv/linux/x86_64/64/libc.abilist | 4 ++ .../unix/sysv/linux/x86_64/x32/libc.abilist | 4 ++ sysdeps/wordsize-32/ullabs.c | 22 ++++++++ sysdeps/wordsize-64/ulabs.c | 22 ++++++++ 48 files changed, 452 insertions(+), 2 deletions(-) create mode 100644 stdlib/tst-uabs.c create mode 100644 stdlib/tst-ulabs.c create mode 100644 stdlib/tst-ullabs.c create mode 100644 stdlib/uabs.c create mode 100644 stdlib/ulabs.c create mode 100644 stdlib/ullabs.c create mode 100644 sysdeps/wordsize-32/ullabs.c create mode 100644 sysdeps/wordsize-64/ulabs.c diff --git a/NEWS b/NEWS index 29d3d47b64..1ede65e91a 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ Major new features: - Power and absolute-value functions: rsqrt. +* The ISO C2Y family of unsigned abs functions, i.e. + uabs, ulab, ullabs and uimaxabs, are now supported. + Deprecated and removed features, and other changes affecting compatibility: [Add deprecations, removals and changes affecting compatibility here] diff --git a/manual/arith.texi b/manual/arith.texi index 034d9d2ba5..c8636f8c5a 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -1233,25 +1233,33 @@ whose imaginary part is @var{y}, the absolute value is @w{@code{sqrt @pindex math.h @pindex stdlib.h -Prototypes for @code{abs}, @code{labs} and @code{llabs} are in @file{stdlib.h}; -@code{imaxabs} is declared in @file{inttypes.h}; +Prototypes for @code{abs}, @code{labs}, @code{llabs}, +@code{uabs}, @code{ulabs} @code{ullabs} are in @file{stdlib.h}; +@code{imaxabs} and @code{uimaxabs} are declared in @file{inttypes.h}; the @code{fabs} functions are declared in @file{math.h}; the @code{cabs} functions are declared in @file{complex.h}. @deftypefun int abs (int @var{number}) @deftypefunx {long int} labs (long int @var{number}) @deftypefunx {long long int} llabs (long long int @var{number}) +@deftypefunx unsigned int uabs (int @var{number}) +@deftypefunx {unsigned long int} ulabs (long int @var{number}) +@deftypefunx {unsigned long long int} ullabs (long long int @var{number}) @deftypefunx intmax_t imaxabs (intmax_t @var{number}) +@deftypefunx uintmax_t uimaxabs (intmax_t @var{number}) @standards{ISO, stdlib.h} @standardsx{imaxabs, ISO, inttypes.h} +@standardsx{uimaxabs, ISO, inttypes.h} @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} These functions return the absolute value of @var{number}. Most computers use a two's complement integer representation, in which the absolute value of @code{INT_MIN} (the smallest possible @code{int}) cannot be represented; thus, @w{@code{abs (INT_MIN)}} is not defined. +Using @code{uabs} avoids this. @code{llabs} and @code{imaxdiv} are new to @w{ISO C99}. +@code{uabs}, @code{ulabs}, @code{ullabs} and @code{uimaxabs} are new to @w{ISO C2Y}. See @ref{Integers} for a description of the @code{intmax_t} type. diff --git a/stdlib/Makefile b/stdlib/Makefile index c9c8f702a2..1fb5fbc9b5 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -211,6 +211,9 @@ routines := \ strtoull_l \ swapcontext \ system \ + uabs \ + ulabs \ + ullabs \ wcstombs \ wctomb \ xpg_basename \ @@ -361,6 +364,9 @@ tests := \ tst-swapcontext2 \ tst-thread-quick_exit \ tst-tininess \ + tst-uabs \ + tst-ulabs \ + tst-ullabs \ tst-unsetenv1 \ tst-width \ tst-width-stdint \ @@ -410,6 +416,10 @@ CFLAGS-tst-abs.c += -fno-builtin CFLAGS-tst-labs.c += -fno-builtin CFLAGS-tst-llabs.c += -fno-builtin +CFLAGS-tst-uabs.c += -fno-builtin +CFLAGS-tst-ulabs.c += -fno-builtin +CFLAGS-tst-ullabs.c += -fno-builtin + CFLAGS-tst-stdbit-Wconversion.c += -Wconversion -Werror CFLAGS-tst-stdc_trailing_zeros.c += -fno-builtin CFLAGS-tst-stdc_trailing_ones.c += -fno-builtin diff --git a/stdlib/Versions b/stdlib/Versions index ea2265bbd4..6d024000f8 100644 --- a/stdlib/Versions +++ b/stdlib/Versions @@ -223,6 +223,12 @@ libc { stdc_bit_ceil_ul; stdc_bit_ceil_ull; } + GLIBC_2.42 { + uabs; + uimaxabs; + ulabs; + ullabs; + } GLIBC_PRIVATE { # functions which have an additional interface since they are # are cancelable. 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__)); diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 975f5aeb0b..cd4503c761 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -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. */ diff --git a/stdlib/tst-uabs.c b/stdlib/tst-uabs.c new file mode 100644 index 0000000000..13c9f58dc0 --- /dev/null +++ b/stdlib/tst-uabs.c @@ -0,0 +1,45 @@ +/* Basic tests for uabs. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#include + +#define LARGE_PRIME 49999 + +static int do_test (void) +{ + int i; + + TEST_COMPARE (uabs (INT_MAX), INT_MAX); + TEST_COMPARE (uabs (INT_MIN), (unsigned int)INT_MAX + 1); + TEST_COMPARE (uabs (-1), 1); + TEST_COMPARE (uabs (0), 0); + TEST_COMPARE (uabs (1), 1); + + for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME) + TEST_COMPARE (uabs (i), -i); + + for (i = 0; i < INT_MAX - LARGE_PRIME; i += LARGE_PRIME) + TEST_COMPARE (uabs (i), i); + + return EXIT_SUCCESS; +} + +#include diff --git a/stdlib/tst-ulabs.c b/stdlib/tst-ulabs.c new file mode 100644 index 0000000000..e73f77d01d --- /dev/null +++ b/stdlib/tst-ulabs.c @@ -0,0 +1,52 @@ +/* Basic tests for ulabs. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#include + +#define LARGE_PRIME 49999 + +static int do_test (void) +{ + long int i; + + TEST_COMPARE (ulabs (LONG_MAX), LONG_MAX); + TEST_COMPARE (ulabs (LONG_MIN), (unsigned long int)LONG_MAX + 1); + TEST_COMPARE (ulabs (-1), 1); + TEST_COMPARE (ulabs (0), 0); + TEST_COMPARE (ulabs (1), 1); + + for (i = LONG_MIN + 1; i < LONG_MIN + INT_MAX; i += LARGE_PRIME) + TEST_COMPARE (labs (i), -i); + + for (i = LONG_MAX - INT_MAX; i < LONG_MAX - LARGE_PRIME; + i += LARGE_PRIME) + TEST_COMPARE (labs (i), i); + + for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME) + TEST_COMPARE (labs (i), -i); + + for (i = 0; i <= INT_MAX - LARGE_PRIME; i += LARGE_PRIME) + TEST_COMPARE (labs (i), i); + + return EXIT_SUCCESS; +} + +#include diff --git a/stdlib/tst-ullabs.c b/stdlib/tst-ullabs.c new file mode 100644 index 0000000000..e25b22c048 --- /dev/null +++ b/stdlib/tst-ullabs.c @@ -0,0 +1,55 @@ +/* Basic tests for ullabs. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#include + +#define LARGE_PRIME 49999 + +static int do_test (void) +{ + long long int i; + + TEST_COMPARE (ullabs (LONG_MAX), LONG_MAX); + TEST_COMPARE (ullabs (LONG_MIN), (unsigned long long int)LONG_MAX + 1); + TEST_COMPARE (ullabs (0x00000000ffffffffL), 0x00000000ffffffffL); + TEST_COMPARE (ullabs (0x0000000100000000L), 0x0000000100000000L); + TEST_COMPARE (ullabs (0x80000000ffffffffL), 0x7fffffff00000001L); + TEST_COMPARE (ullabs (0x8000000100000000L), 0x7fffffff00000000L); + TEST_COMPARE (ullabs (-1), 1); + TEST_COMPARE (ullabs (0), 0); + TEST_COMPARE (ullabs (1), 1); + + for (i = LLONG_MIN + 1; i < LLONG_MIN + INT_MAX; i += LARGE_PRIME) + TEST_COMPARE (llabs (i), -i); + + for (i = LLONG_MAX - INT_MAX; i < LLONG_MAX - LARGE_PRIME; i += LARGE_PRIME) + TEST_COMPARE (llabs (i), i); + + for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME) + TEST_COMPARE (llabs (i), -i); + + for (i = 0; i < INT_MAX; i += LARGE_PRIME) + TEST_COMPARE (llabs (i), i); + + return EXIT_SUCCESS; +} + +#include diff --git a/stdlib/uabs.c b/stdlib/uabs.c new file mode 100644 index 0000000000..3426a5e95b --- /dev/null +++ b/stdlib/uabs.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#undef uabs + +/* Return the absolute value of I. */ +unsigned int +uabs (int i) +{ + return i < 0 ? -(unsigned int)i : i; +} diff --git a/stdlib/ulabs.c b/stdlib/ulabs.c new file mode 100644 index 0000000000..4b5ad69662 --- /dev/null +++ b/stdlib/ulabs.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#undef ulabs + +/* Return the absolute value of I. */ +unsigned long int +ulabs (long int i) +{ + return i < 0 ? -(unsigned long int)i : i; +} diff --git a/stdlib/ullabs.c b/stdlib/ullabs.c new file mode 100644 index 0000000000..216cf7e6dd --- /dev/null +++ b/stdlib/ullabs.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#undef ullabs + +/* Return the absolute value of I. */ +unsigned long long int +ullabs (long long int i) +{ + return i < 0 ? -(unsigned long long int)i : i; +} diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 461df01ffb..7f8e546f22 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2491,6 +2491,10 @@ GLIBC_2.39 stdc_trailing_zeros_ui F GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index 6f235d20ba..f036aacd5a 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -2295,6 +2295,9 @@ GLIBC_2.42 pthread_rwlockattr_destroy F GLIBC_2.42 pthread_rwlockattr_getpshared F GLIBC_2.42 pthread_rwlockattr_init F GLIBC_2.42 pthread_rwlockattr_setpshared F +GLIBC_2.42 uabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_keycreate F HURD_CTHREADS_0.3 __cthread_setspecific F diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 38db77e4f7..b9accaa139 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -2750,3 +2750,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 637bfce9fb..ceeb5e27a3 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2857,6 +2857,10 @@ GLIBC_2.39 stdc_trailing_zeros_ui F GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist index 4a305cf730..d04d9965bd 100644 --- a/sysdeps/unix/sysv/linux/arc/libc.abilist +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -2511,3 +2511,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index 1d54f71b14..97966e0ea5 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -2803,6 +2803,10 @@ GLIBC_2.4 xprt_register F GLIBC_2.4 xprt_unregister F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index ff7e8bc40b..76061c8eca 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -2800,6 +2800,10 @@ GLIBC_2.4 xprt_register F GLIBC_2.4 xprt_unregister F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index c3ed65467d..b2f2fe5d33 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2787,3 +2787,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 991475380c..702852d0d4 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2824,6 +2824,10 @@ GLIBC_2.4 unshare F GLIBC_2.41 cacheflush F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 4fedf775d4..b8309355e1 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2918,6 +2918,10 @@ GLIBC_2.39 stdc_trailing_zeros_ui F GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.4 __confstr_chk F GLIBC_2.4 __fgets_chk F GLIBC_2.4 __fgets_unlocked_chk F diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist index 0024282289..285cd519c5 100644 --- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist +++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist @@ -2271,3 +2271,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 142595eb3e..5028b57204 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -2783,6 +2783,10 @@ GLIBC_2.4 xprt_register F GLIBC_2.4 xprt_unregister F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 85e7746c10..7b8a526709 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2950,6 +2950,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 91dc1b8378..3b7f122b91 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2836,3 +2836,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index 3440e90f6f..953b1f23b1 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2833,3 +2833,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 5ee7b8c52f..ba24b56c17 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2911,6 +2911,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index 6cb6328e7c..6564bf7653 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2909,6 +2909,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index ae7474c0f0..c58d84f5bc 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2917,6 +2917,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist index cdf040dec2..d5eff0f93c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist @@ -2819,6 +2819,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist index c356a11b1c..cc96ab1399 100644 --- a/sysdeps/unix/sysv/linux/or1k/libc.abilist +++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist @@ -2261,3 +2261,7 @@ GLIBC_2.40 setcontext F GLIBC_2.40 swapcontext F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 7937f94cf0..20f866220d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -3140,6 +3140,10 @@ GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index d6e35f31d2..b0b06b356d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -3185,6 +3185,10 @@ GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist index 2268d6890d..f671baa292 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist @@ -2894,6 +2894,10 @@ GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist index 7f61b14bc8..e7cb2fb76f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@ -2970,3 +2970,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist index 4187241f50..d93771ac97 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist @@ -2514,3 +2514,7 @@ GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.40 __riscv_hwprobe F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist index 8935beccac..2447259edb 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist @@ -2714,3 +2714,7 @@ GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.40 __riscv_hwprobe F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index e69dc7ccf6..79fa1c247c 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -3138,6 +3138,10 @@ GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index 7d860001d8..67789c8bf8 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -2931,6 +2931,10 @@ GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index fcb8161841..71afc5943f 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2830,6 +2830,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 3fd078d125..8597b710bd 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2827,6 +2827,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 1ce1fe9da7..130ed66c9d 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -3159,6 +3159,10 @@ GLIBC_2.4 wprintf F GLIBC_2.4 wscanf F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist index 07507b86f6..593a24b254 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist @@ -2795,6 +2795,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist index 5acf49dbe8..2be9d774da 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -2746,6 +2746,10 @@ GLIBC_2.4 unlinkat F GLIBC_2.4 unshare F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_find F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist index 02d1bb97dc..babd24b63c 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -2765,3 +2765,7 @@ GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.41 sched_getattr F GLIBC_2.41 sched_setattr F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F diff --git a/sysdeps/wordsize-32/ullabs.c b/sysdeps/wordsize-32/ullabs.c new file mode 100644 index 0000000000..aad0df7d1b --- /dev/null +++ b/sysdeps/wordsize-32/ullabs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#include + +weak_alias (ullabs, uimaxabs) diff --git a/sysdeps/wordsize-64/ulabs.c b/sysdeps/wordsize-64/ulabs.c new file mode 100644 index 0000000000..c27c83c3f1 --- /dev/null +++ b/sysdeps/wordsize-64/ulabs.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#include + +weak_alias (ulabs, uimaxabs)