Skip to content

Commit 1d8857b

Browse files
authored
Merge pull request ziglang#22695 from alexrp/glibc-2-41
glibc 2.41
2 parents 5433e04 + a5b8a29 commit 1d8857b

File tree

1,547 files changed

+2954
-2487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,547 files changed

+2954
-2487
lines changed

lib/libc/glibc/LICENSES

+26-38
Original file line numberDiff line numberDiff line change
@@ -165,44 +165,8 @@ The file if_ppp.h is under the following CMU license:
165165
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
166166
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167167

168-
The following license covers the files from Intel's "Highly Optimized
169-
Mathematical Functions for Itanium" collection:
170-
171-
Intel License Agreement
172-
173-
Copyright (c) 2000, Intel Corporation
174-
175-
All rights reserved.
176-
177-
Redistribution and use in source and binary forms, with or without
178-
modification, are permitted provided that the following conditions are
179-
met:
180-
181-
* Redistributions of source code must retain the above copyright
182-
notice, this list of conditions and the following disclaimer.
183-
184-
* Redistributions in binary form must reproduce the above copyright
185-
notice, this list of conditions and the following disclaimer in the
186-
documentation and/or other materials provided with the distribution.
187-
188-
* The name of Intel Corporation may not be used to endorse or promote
189-
products derived from this software without specific prior written
190-
permission.
191-
192-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
193-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
194-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
195-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
196-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
197-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
198-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
199-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
200-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
201-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
202-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
203-
204-
The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright
205-
(C) by Craig Metz and are distributed under the following license:
168+
The files nss/getnameinfo.c and nss/getaddrinfo.c are copyright (C) by
169+
Craig Metz and are distributed under the following license:
206170

207171
/* The Inner Net License, Version 2.00
208172

@@ -410,3 +374,27 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
410374
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
411375
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
412376
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
377+
378+
Various files in sysdeps/ieee754/flt-32, taken from the CORE-MATH project
379+
<https://core-math.gitlabpages.inria.fr/>, are distributed under the
380+
following license:
381+
382+
Copyright (c) 2022-2024 Alexei Sibidanov. Paul Zimmermann.
383+
384+
Permission is hereby granted, free of charge, to any person obtaining a copy
385+
of this software and associated documentation files (the "Software"), to deal
386+
in the Software without restriction, including without limitation the rights
387+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
388+
copies of the Software, and to permit persons to whom the Software is
389+
furnished to do so, subject to the following conditions:
390+
391+
The above copyright notice and this permission notice shall be included in all
392+
copies or substantial portions of the Software.
393+
394+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
395+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
396+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
397+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
398+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
399+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
400+
SOFTWARE.

lib/libc/glibc/abilists

1.07 KB
Binary file not shown.

lib/libc/glibc/bits/byteswap.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Macros and inline functions to swap the order of bytes in integer values.
2-
Copyright (C) 1997-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1997-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/floatn-common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Macros to control TS 18661-3 glibc features where the same
22
definitions are appropriate for all platforms.
3-
Copyright (C) 2017-2024 Free Software Foundation, Inc.
3+
Copyright (C) 2017-2025 Free Software Foundation, Inc.
44
This file is part of the GNU C Library.
55
66
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/libc-header-start.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Handle feature test macros at the start of a header.
2-
Copyright (C) 2016-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2016-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/long-double.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Properties of long double type.
2-
Copyright (C) 2016-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2016-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/select.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
1+
/* Copyright (C) 1997-2025 Free Software Foundation, Inc.
22
This file is part of the GNU C Library.
33
44
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/signum-generic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Signal number constants. Generic template.
2-
Copyright (C) 1991-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1991-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/stat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
1+
/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
22
This file is part of the GNU C Library.
33
44
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/stdint-intn.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Define intN_t types.
2-
Copyright (C) 2017-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2017-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/stdlib-bsearch.h

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Perform binary search - inline version.
2-
Copyright (C) 1991-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1991-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or
@@ -20,22 +20,14 @@ __extern_inline void *
2020
bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
2121
__compar_fn_t __compar)
2222
{
23-
size_t __l, __u, __idx;
2423
const void *__p;
2524
int __comparison;
2625

27-
__l = 0;
28-
__u = __nmemb;
29-
while (__l < __u)
26+
while (__nmemb)
3027
{
31-
__idx = (__l + __u) / 2;
32-
__p = (const void *) (((const char *) __base) + (__idx * __size));
28+
__p = (const void *) (((const char *) __base) + ((__nmemb >> 1) * __size));
3329
__comparison = (*__compar) (__key, __p);
34-
if (__comparison < 0)
35-
__u = __idx;
36-
else if (__comparison > 0)
37-
__l = __idx + 1;
38-
else
30+
if (__comparison == 0)
3931
{
4032
#if __GNUC_PREREQ(4, 6)
4133
# pragma GCC diagnostic push
@@ -46,6 +38,12 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
4638
# pragma GCC diagnostic pop
4739
#endif
4840
}
41+
if (__comparison > 0)
42+
{
43+
__base = ((const char *) __p) + __size;
44+
--__nmemb;
45+
}
46+
__nmemb >>= 1;
4947
}
5048

5149
return NULL;

lib/libc/glibc/bits/time64.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* bits/time64.h -- underlying types for __time64_t. Generic version.
2-
Copyright (C) 2018-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2018-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/timesize.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Bit size of the time_t type at glibc build time, general case.
2-
Copyright (C) 2018-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2018-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/types/struct_sched_param.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Sched parameter structure. Generic version.
2-
Copyright (C) 1996-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1996-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/typesizes.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* bits/typesizes.h -- underlying types for *_t. Generic version.
2-
Copyright (C) 2002-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2002-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/uintn-identity.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Inline functions to return unsigned integer values unchanged.
2-
Copyright (C) 2017-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2017-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/waitflags.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Definitions of flag bits for `waitpid' et al.
2-
Copyright (C) 1992-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1992-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/bits/waitstatus.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Definitions of status bits for `wait' et al.
2-
Copyright (C) 1992-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1992-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/csu/errno.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Definition of `errno' variable. Canonical version.
2-
Copyright (C) 2002-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2002-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/csu/init.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Special startup support.
2-
Copyright (C) 1997-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1997-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/debug/stack_chk_fail_local.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
1+
/* Copyright (C) 2005-2025 Free Software Foundation, Inc.
22
This file is part of the GNU C Library.
33
44
The GNU C Library is free software; you can redistribute it and/or

lib/libc/glibc/elf/elf.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This file defines standard ELF types, structures, and macros.
2-
Copyright (C) 1995-2024 Free Software Foundation, Inc.
2+
Copyright (C) 1995-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or
@@ -797,6 +797,7 @@ typedef struct
797797
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
798798
#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
799799
#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */
800+
#define NT_X86_XSAVE_LAYOUT 0x205 /* XSAVE layout description. */
800801
#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
801802
#define NT_S390_TIMER 0x301 /* s390 timer register */
802803
#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
@@ -835,6 +836,7 @@ typedef struct
835836
#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
836837
#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
837838
#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
839+
#define NT_ARM_POE 0x40f /* ARM POE registers. */
838840
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
839841
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
840842
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
@@ -1389,6 +1391,7 @@ typedef struct
13891391

13901392
#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
13911393
#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1)
1394+
#define GNU_PROPERTY_AARCH64_FEATURE_1_GCS (1U << 2)
13921395

13931396
/* The x86 instruction sets indicated by the corresponding bits are
13941397
used in program. Their support in the hardware is optional. */

lib/libc/glibc/include/errno.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# define errno rtld_errno
2121
extern int rtld_errno attribute_hidden;
2222

23-
# elif IS_IN_LIB && !IS_IN (rtld)
23+
# elif IS_IN_LIB && !IS_IN (rtld) && !defined LIBC_NONSHARED
2424

2525
# undef errno
2626
# if IS_IN (libc)

lib/libc/glibc/include/libc-misc.h

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/* Miscellaneous definitions for both glibc build and test.
2+
Copyright (C) 2024-2025 Free Software Foundation, Inc.
3+
This file is part of the GNU C Library.
4+
5+
The GNU C Library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
The GNU C Library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with the GNU C Library; if not, see
17+
<https://www.gnu.org/licenses/>. */
18+
19+
#ifndef _INCLUDE_MISC_H
20+
#define _INCLUDE_MISC_H
21+
22+
#include <config.h>
23+
24+
/* Add the compiler optimization to inhibit loop transformation to library
25+
calls. This is used to avoid recursive calls in memset and memmove
26+
default implementations in tests. */
27+
#ifdef HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
28+
# define inhibit_loop_to_libcall \
29+
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
30+
#else
31+
# define inhibit_loop_to_libcall
32+
#endif
33+
34+
#ifdef HAVE_TEST_CC_INHIBIT_LOOP_TO_LIBCALL
35+
# define test_cc_inhibit_loop_to_libcall \
36+
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
37+
#else
38+
# define test_cc_inhibit_loop_to_libcall
39+
#endif
40+
41+
/* Used to disable stack protection in sensitive places, like ifunc
42+
resolvers and early static TLS init. */
43+
#ifdef __clang__
44+
# define cc_inhibit_stack_protector \
45+
__attribute__((no_stack_protector))
46+
#else
47+
# define cc_inhibit_stack_protector \
48+
__attribute__ ((__optimize__ ("-fno-stack-protector")))
49+
#endif
50+
51+
#if IS_IN (testsuite) || IS_IN (testsuite_internal)
52+
# ifdef HAVE_TEST_CC_NO_STACK_PROTECTOR
53+
# define test_inhibit_stack_protector cc_inhibit_stack_protector
54+
# define inhibit_stack_protector cc_inhibit_stack_protector
55+
# else
56+
# define test_inhibit_stack_protector
57+
# define inhibit_stack_protector
58+
# endif
59+
#else
60+
# ifdef HAVE_CC_NO_STACK_PROTECTOR
61+
# define inhibit_stack_protector cc_inhibit_stack_protector
62+
# else
63+
# define inhibit_stack_protector
64+
# endif
65+
#endif
66+
67+
#endif

lib/libc/glibc/include/libc-pointer-arith.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Helper macros for pointer arithmetic.
2-
Copyright (C) 2012-2024 Free Software Foundation, Inc.
2+
Copyright (C) 2012-2025 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or

0 commit comments

Comments
 (0)