From patchwork Wed Apr 2 22:09:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lenard Mollenkopf X-Patchwork-Id: 109746 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 BFD3E3857C6E for ; Wed, 2 Apr 2025 22:12:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFD3E3857C6E Authentication-Results: sourceware.org; dkim=permerror header.d=lenardmollenkopf.de header.i=@lenardmollenkopf.de header.a=rsa-sha256 header.s=dkim header.b=hwN20jWb X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from lenardmollenkopf.com (lenardmollenkopf.com [164.68.116.62]) by sourceware.org (Postfix) with ESMTPS id 0686E385842D for ; Wed, 2 Apr 2025 22:11:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0686E385842D 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 0686E385842D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=164.68.116.62 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743631881; cv=none; b=cfTUyPiBaYKoNlWnv+x73HKkGikcANtX1C9W4xBmwJ1rikjjD/qgLDRblRK30cGstSryz510iII6R1/gEvqBVwPcuucVFx8J8+4W73Ya3x9hLF4FW5NP9+8i84CQK21ubjL08ngH6PRnSF5rY+0jz4FMzXvN85tYVW8+dPqNfok= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1743631881; c=relaxed/simple; bh=TnwUtM5y28y8zTQEe+VVRf0ZNRdzRcdWreXXCRns4is=; h=From:DKIM-Signature:To:Subject:Date:Message-ID:MIME-Version; b=GENITszdrb68/VQD/eV6zNDaHOXaQn8kIsht1OjleTvnYU24wxFoVRKKMgck8YOWaVRyiqw60YNHYsq7gv07jqGETG4cIevDQLsd0AWWMn5q8ZGqt3aPFpQVFJj/zH8fgiZ3XsZ5wkV86+/1t75DFqk5iJGvV7ofYShHOkiI0oQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0686E385842D From: Lenard Mollenkopf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lenardmollenkopf.de; s=dkim; t=1743631878; 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=GjXzQ4A6viydO7LLD1XGVpStDb0LdsA4RKztm6yBCfg=; b=hwN20jWb6BixLfjvcHFlomxPBz1QXoaSY0bg+gDjWElMlhkS1k71Gzo6auB9/rqofmZScj ndGReXaWAS6I1Oim9fCBm7VVokKrqDf7pov3QKZHSLjDkQefzppWtBlAJSX7uPN2zWSxSv CXz3YSGdPfTuFbuFt1eO3ReCqHz5Gn1kndQNLSFDK2CLfAdkNXePpZ4GKJtlBTolO3vN/S QH+r6FJPrHyaWrUmnEPLSEF67HlQXnaqL6LGfmITGEATPgK2Qlo+Twj2eh4TdcjPJ579Rd Z9ruq6Wz74C4xEA3+kw4nTI8Su6+t+Uqv0bcEnSyXwztw+waFvYFjk6tV7Ucqg== 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, adhemerval.zanella@linaro.org, Lenard Mollenkopf Subject: [PATCH v4] stdlib: Implement C2Y uabs, ulabs, ullabs and uimaxabs Date: Thu, 3 Apr 2025 00:09:58 +0200 Message-ID: <20250402220957.119870-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=-9.7 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 | 12 ++++ stdlib/Versions | 6 ++ stdlib/inttypes.h | 5 ++ stdlib/stdlib.h | 6 ++ stdlib/tst-uabs.c | 45 +++++++++++++++ stdlib/tst-uimaxabs.c | 51 +++++++++++++++++ stdlib/tst-ulabs.c | 52 ++++++++++++++++++ stdlib/tst-ullabs.c | 55 +++++++++++++++++++ stdlib/uabs.c | 28 ++++++++++ stdlib/ulabs.c | 33 +++++++++++ stdlib/ullabs.c | 33 +++++++++++ sysdeps/mach/hurd/i386/libc.abilist | 4 ++ sysdeps/mach/hurd/x86_64/libc.abilist | 4 ++ 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 ++ 47 files changed, 475 insertions(+), 2 deletions(-) create mode 100644 stdlib/tst-uabs.c create mode 100644 stdlib/tst-uimaxabs.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 diff --git a/NEWS b/NEWS index 52cbf1a989..659e76a9cb 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,9 @@ Major new features: * On Linux, the pthread_gettid_np function has been added. +* The ISO C2Y family of unsigned abs functions, i.e. + uabs, ulabs, 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..4b8584d487 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} and @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 513445bcbc..1c80e497f0 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -211,6 +211,9 @@ routines := \ strtoull_l \ swapcontext \ system \ + uabs \ + ulabs \ + ullabs \ wcstombs \ wctomb \ xpg_basename \ @@ -363,6 +366,10 @@ tests := \ tst-swapcontext2 \ tst-thread-quick_exit \ tst-tininess \ + tst-uabs \ + tst-uimaxabs \ + tst-ulabs \ + tst-ullabs \ tst-unsetenv1 \ tst-width \ tst-width-stdint \ @@ -412,6 +419,11 @@ 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-uimaxabs.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-uimaxabs.c b/stdlib/tst-uimaxabs.c new file mode 100644 index 0000000000..4500ec1797 --- /dev/null +++ b/stdlib/tst-uimaxabs.c @@ -0,0 +1,51 @@ +/* Basic tests for uimaxabs. + 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 + +#include + +#define LARGE_PRIME 49999 + +static int do_test (void) +{ + intmax_t i; + + TEST_COMPARE (uimaxabs (INTMAX_MIN), (uintmax_t)INTMAX_MAX + 1); + TEST_COMPARE (uimaxabs (-1), 1); + TEST_COMPARE (uimaxabs (0), 0); + TEST_COMPARE (uimaxabs (1), 1); + + for (i = INTMAX_MIN + 1; i < INTMAX_MIN + INT_MAX; i += LARGE_PRIME) + TEST_COMPARE (uimaxabs (i), -i); + + for (i = INTMAX_MAX - INT_MAX; i < INTMAX_MAX - LARGE_PRIME; i += LARGE_PRIME) + TEST_COMPARE (uimaxabs (i), i); + + for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME) + TEST_COMPARE (uimaxabs (i), -i); + + for (i = 0; i < INT_MAX; i += LARGE_PRIME) + TEST_COMPARE (uimaxabs (i), i); + + return EXIT_SUCCESS; +} + +#include diff --git a/stdlib/tst-ulabs.c b/stdlib/tst-ulabs.c new file mode 100644 index 0000000000..3b5323e051 --- /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 (ulabs (i), -i); + + for (i = LONG_MAX - INT_MAX; i < LONG_MAX - LARGE_PRIME; + i += LARGE_PRIME) + TEST_COMPARE (ulabs (i), i); + + for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME) + TEST_COMPARE (ulabs (i), -i); + + for (i = 0; i <= INT_MAX - LARGE_PRIME; i += LARGE_PRIME) + TEST_COMPARE (ulabs (i), i); + + return EXIT_SUCCESS; +} + +#include diff --git a/stdlib/tst-ullabs.c b/stdlib/tst-ullabs.c new file mode 100644 index 0000000000..ac34ec776e --- /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 (LLONG_MAX), LLONG_MAX); + TEST_COMPARE (ullabs (LLONG_MIN), (unsigned long long int)LLONG_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 (ullabs (i), -i); + + for (i = LLONG_MAX - INT_MAX; i < LLONG_MAX - LARGE_PRIME; i += LARGE_PRIME) + TEST_COMPARE (ullabs (i), i); + + for (i = INT_MIN + 1; i < 0; i += LARGE_PRIME) + TEST_COMPARE (ullabs (i), -i); + + for (i = 0; i < INT_MAX; i += LARGE_PRIME) + TEST_COMPARE (ullabs (i), i); + + return EXIT_SUCCESS; +} + +#include diff --git a/stdlib/uabs.c b/stdlib/uabs.c new file mode 100644 index 0000000000..72aea5fbfb --- /dev/null +++ b/stdlib/uabs.c @@ -0,0 +1,28 @@ +/* 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) +{ + unsigned int j = i; + return i < 0 ? -j : i; +} diff --git a/stdlib/ulabs.c b/stdlib/ulabs.c new file mode 100644 index 0000000000..c2ccfb8c32 --- /dev/null +++ b/stdlib/ulabs.c @@ -0,0 +1,33 @@ +/* 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 + +#undef ulabs + +/* Return the absolute value of I. */ +unsigned long int +ulabs (long int i) +{ + unsigned long int j = i; + return i < 0 ? -j : i; +} + +#if ULONG_MAX != UINT_MAX +weak_alias (ulabs, uimaxabs) +#endif diff --git a/stdlib/ullabs.c b/stdlib/ullabs.c new file mode 100644 index 0000000000..11268c29f4 --- /dev/null +++ b/stdlib/ullabs.c @@ -0,0 +1,33 @@ +/* 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 + +#undef ullabs + +/* Return the absolute value of I. */ +unsigned long long int +ullabs (long long int i) +{ + unsigned long long int j = i; + return i < 0 ? -j : i; +} + +#if ULONG_MAX == UINT_MAX +weak_alias (ullabs, uimaxabs) +#endif diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 0b963dc890..3e183f5c02 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -2614,6 +2614,10 @@ 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 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/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist index b9e9349b9d..688ee26f4b 100644 --- a/sysdeps/mach/hurd/x86_64/libc.abilist +++ b/sysdeps/mach/hurd/x86_64/libc.abilist @@ -2297,6 +2297,10 @@ 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 uimaxabs 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 41f8f39911..aa6bf483dd 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -2753,3 +2753,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 34efc96781..d5df9656a8 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -3100,6 +3100,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist index de7c618d28..c46c08da85 100644 --- a/sysdeps/unix/sysv/linux/arc/libc.abilist +++ b/sysdeps/unix/sysv/linux/arc/libc.abilist @@ -2514,3 +2514,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 96f0314b16..4df150c0f0 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -2806,6 +2806,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 635468fa13..be294783f6 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -2803,6 +2803,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 490694ddce..f123757134 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2790,3 +2790,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 b1905da767..2dc85b9533 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2827,6 +2827,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 424ef34a8b..1e38217ec6 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -3010,6 +3010,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist index 420471eb24..927fc21445 100644 --- a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist +++ b/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist @@ -2274,3 +2274,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 95a68c7cc1..74da49d9da 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -2786,6 +2786,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 442e82b6d2..e5d678111f 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2953,6 +2953,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 20f7712988..4dbd4b6045 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2839,3 +2839,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 f61ed3bf26..c5965bb50c 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2836,3 +2836,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 381120cc16..10715e0777 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2914,6 +2914,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 2f51146084..3d229b9853 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2912,6 +2912,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 e6071be2ae..e4cb45275b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2920,6 +2920,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 f41e209a2b..8a32d2585d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist @@ -2822,6 +2822,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 bbcdb31f09..64dac95b2a 100644 --- a/sysdeps/unix/sysv/linux/or1k/libc.abilist +++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist @@ -2264,3 +2264,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 e0ea22b9c6..cc5e93c77c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -3143,6 +3143,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 16b9a771f1..9814997083 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -3188,6 +3188,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 070f6f5a08..7f46295c11 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist @@ -2897,6 +2897,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 4378d1d922..f24f81bb5f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@ -2973,3 +2973,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 48c6e269a5..9330c7ab76 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist @@ -2517,3 +2517,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 a8b0c6aca7..ea4555d39e 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist @@ -2717,3 +2717,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 6c00b8440b..3e625fa4e9 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -3141,6 +3141,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 f866e5d6f3..46b4a04f65 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -2934,6 +2934,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 4f2db8cb9b..36a94c9210 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2833,6 +2833,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 a73473ee32..f79aba6aab 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2830,6 +2830,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 dc7e27db2a..4a6acc08e0 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -3162,6 +3162,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 2ee97f42fb..931109dab1 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist @@ -2798,6 +2798,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 a7ada1ea53..7ab9073e3a 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -2749,6 +2749,10 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np 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 f41ab77c1e..e11876f6ab 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -2768,3 +2768,7 @@ GLIBC_2.41 sched_setattr F GLIBC_2.42 __inet_ntop_chk F GLIBC_2.42 __inet_pton_chk F GLIBC_2.42 pthread_gettid_np F +GLIBC_2.42 uabs F +GLIBC_2.42 uimaxabs F +GLIBC_2.42 ulabs F +GLIBC_2.42 ullabs F