Skip to content

Commit 1804251

Browse files
committed
glibc: update headers to 2.42
1 parent cdd6e9e commit 1804251

Some content is hidden

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

55 files changed

+649
-416
lines changed

lib/libc/include/aarch64-linux-gnu/bits/fcntl.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,11 @@
2525
#define __O_NOFOLLOW 0100000
2626
#define __O_DIRECT 0200000
2727

28-
#ifdef __ILP32__
29-
# define __O_LARGEFILE 0400000
30-
#else
31-
# define __O_LARGEFILE 0
32-
#endif
28+
#define __O_LARGEFILE 0
3329

34-
#ifdef __LP64__
35-
# define F_GETLK64 5
36-
# define F_SETLK64 6
37-
# define F_SETLKW64 7
38-
#endif
30+
#define F_GETLK64 5
31+
#define F_SETLK64 6
32+
#define F_SETLKW64 7
3933

4034
struct flock
4135
{

lib/libc/include/aarch64-linux-gnu/bits/math-vector.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
3838
# undef __DECL_SIMD_acoshf
3939
# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
40+
# undef __DECL_SIMD_acospi
41+
# define __DECL_SIMD_acospi __DECL_SIMD_aarch64
42+
# undef __DECL_SIMD_acospif
43+
# define __DECL_SIMD_acospif __DECL_SIMD_aarch64
4044
# undef __DECL_SIMD_asin
4145
# define __DECL_SIMD_asin __DECL_SIMD_aarch64
4246
# undef __DECL_SIMD_asinf
@@ -45,6 +49,10 @@
4549
# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
4650
# undef __DECL_SIMD_asinhf
4751
# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
52+
# undef __DECL_SIMD_asinpi
53+
# define __DECL_SIMD_asinpi __DECL_SIMD_aarch64
54+
# undef __DECL_SIMD_asinpif
55+
# define __DECL_SIMD_asinpif __DECL_SIMD_aarch64
4856
# undef __DECL_SIMD_atan
4957
# define __DECL_SIMD_atan __DECL_SIMD_aarch64
5058
# undef __DECL_SIMD_atanf
@@ -53,10 +61,18 @@
5361
# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
5462
# undef __DECL_SIMD_atanhf
5563
# define __DECL_SIMD_atanhf __DECL_SIMD_aarch64
64+
# undef __DECL_SIMD_atanpi
65+
# define __DECL_SIMD_atanpi __DECL_SIMD_aarch64
66+
# undef __DECL_SIMD_atanpif
67+
# define __DECL_SIMD_atanpif __DECL_SIMD_aarch64
5668
# undef __DECL_SIMD_atan2
5769
# define __DECL_SIMD_atan2 __DECL_SIMD_aarch64
5870
# undef __DECL_SIMD_atan2f
5971
# define __DECL_SIMD_atan2f __DECL_SIMD_aarch64
72+
# undef __DECL_SIMD_atan2pi
73+
# define __DECL_SIMD_atan2pi __DECL_SIMD_aarch64
74+
# undef __DECL_SIMD_atan2pif
75+
# define __DECL_SIMD_atan2pif __DECL_SIMD_aarch64
6076
# undef __DECL_SIMD_cbrt
6177
# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
6278
# undef __DECL_SIMD_cbrtf
@@ -176,12 +192,16 @@ typedef __SVBool_t __sv_bool_t;
176192
# define __vpcs __attribute__ ((__aarch64_vector_pcs__))
177193

178194
__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
195+
__vpcs __f32x4_t _ZGVnN4vv_atan2pif (__f32x4_t, __f32x4_t);
179196
__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
180197
__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
198+
__vpcs __f32x4_t _ZGVnN4v_acospif (__f32x4_t);
181199
__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
182200
__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
201+
__vpcs __f32x4_t _ZGVnN4v_asinpif (__f32x4_t);
183202
__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
184203
__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
204+
__vpcs __f32x4_t _ZGVnN4v_atanpif (__f32x4_t);
185205
__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
186206
__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
187207
__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
@@ -207,12 +227,16 @@ __vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
207227
__vpcs __f32x4_t _ZGVnN4v_tanpif (__f32x4_t);
208228

209229
__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
230+
__vpcs __f64x2_t _ZGVnN2vv_atan2pi (__f64x2_t, __f64x2_t);
210231
__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
211232
__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
233+
__vpcs __f64x2_t _ZGVnN2v_acospi (__f64x2_t);
212234
__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
213235
__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
236+
__vpcs __f64x2_t _ZGVnN2v_asinpi (__f64x2_t);
214237
__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
215238
__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
239+
__vpcs __f64x2_t _ZGVnN2v_atanpi (__f64x2_t);
216240
__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
217241
__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
218242
__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
@@ -243,12 +267,16 @@ __vpcs __f64x2_t _ZGVnN2v_tanpi (__f64x2_t);
243267
#ifdef __SVE_VEC_MATH_SUPPORTED
244268

245269
__sv_f32_t _ZGVsMxvv_atan2f (__sv_f32_t, __sv_f32_t, __sv_bool_t);
270+
__sv_f32_t _ZGVsMxvv_atan2pif (__sv_f32_t, __sv_f32_t, __sv_bool_t);
246271
__sv_f32_t _ZGVsMxv_acosf (__sv_f32_t, __sv_bool_t);
247272
__sv_f32_t _ZGVsMxv_acoshf (__sv_f32_t, __sv_bool_t);
273+
__sv_f32_t _ZGVsMxv_acospif (__sv_f32_t, __sv_bool_t);
248274
__sv_f32_t _ZGVsMxv_asinf (__sv_f32_t, __sv_bool_t);
249275
__sv_f32_t _ZGVsMxv_asinhf (__sv_f32_t, __sv_bool_t);
276+
__sv_f32_t _ZGVsMxv_asinpif (__sv_f32_t, __sv_bool_t);
250277
__sv_f32_t _ZGVsMxv_atanf (__sv_f32_t, __sv_bool_t);
251278
__sv_f32_t _ZGVsMxv_atanhf (__sv_f32_t, __sv_bool_t);
279+
__sv_f32_t _ZGVsMxv_atanpif (__sv_f32_t, __sv_bool_t);
252280
__sv_f32_t _ZGVsMxv_cbrtf (__sv_f32_t, __sv_bool_t);
253281
__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
254282
__sv_f32_t _ZGVsMxv_coshf (__sv_f32_t, __sv_bool_t);
@@ -274,12 +302,16 @@ __sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
274302
__sv_f32_t _ZGVsMxv_tanpif (__sv_f32_t, __sv_bool_t);
275303

276304
__sv_f64_t _ZGVsMxvv_atan2 (__sv_f64_t, __sv_f64_t, __sv_bool_t);
305+
__sv_f64_t _ZGVsMxvv_atan2pi (__sv_f64_t, __sv_f64_t, __sv_bool_t);
277306
__sv_f64_t _ZGVsMxv_acos (__sv_f64_t, __sv_bool_t);
278307
__sv_f64_t _ZGVsMxv_acosh (__sv_f64_t, __sv_bool_t);
308+
__sv_f64_t _ZGVsMxv_acospi (__sv_f64_t, __sv_bool_t);
279309
__sv_f64_t _ZGVsMxv_asin (__sv_f64_t, __sv_bool_t);
280310
__sv_f64_t _ZGVsMxv_asinh (__sv_f64_t, __sv_bool_t);
311+
__sv_f64_t _ZGVsMxv_asinpi (__sv_f64_t, __sv_bool_t);
281312
__sv_f64_t _ZGVsMxv_atan (__sv_f64_t, __sv_bool_t);
282313
__sv_f64_t _ZGVsMxv_atanh (__sv_f64_t, __sv_bool_t);
314+
__sv_f64_t _ZGVsMxv_atanpi (__sv_f64_t, __sv_bool_t);
283315
__sv_f64_t _ZGVsMxv_cbrt (__sv_f64_t, __sv_bool_t);
284316
__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
285317
__sv_f64_t _ZGVsMxv_cosh (__sv_f64_t, __sv_bool_t);

lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,13 @@
2121

2222
#include <bits/endian.h>
2323

24-
#ifdef __ILP32__
25-
# define __SIZEOF_PTHREAD_ATTR_T 32
26-
# define __SIZEOF_PTHREAD_MUTEX_T 32
27-
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
28-
# define __SIZEOF_PTHREAD_CONDATTR_T 4
29-
# define __SIZEOF_PTHREAD_RWLOCK_T 48
30-
# define __SIZEOF_PTHREAD_BARRIER_T 20
31-
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
32-
#else
33-
# define __SIZEOF_PTHREAD_ATTR_T 64
34-
# define __SIZEOF_PTHREAD_MUTEX_T 48
35-
# define __SIZEOF_PTHREAD_MUTEXATTR_T 8
36-
# define __SIZEOF_PTHREAD_CONDATTR_T 8
37-
# define __SIZEOF_PTHREAD_RWLOCK_T 56
38-
# define __SIZEOF_PTHREAD_BARRIER_T 32
39-
# define __SIZEOF_PTHREAD_BARRIERATTR_T 8
40-
#endif
24+
#define __SIZEOF_PTHREAD_ATTR_T 64
25+
#define __SIZEOF_PTHREAD_MUTEX_T 48
26+
#define __SIZEOF_PTHREAD_MUTEXATTR_T 8
27+
#define __SIZEOF_PTHREAD_CONDATTR_T 8
28+
#define __SIZEOF_PTHREAD_RWLOCK_T 56
29+
#define __SIZEOF_PTHREAD_BARRIER_T 32
30+
#define __SIZEOF_PTHREAD_BARRIERATTR_T 8
4131
#define __SIZEOF_PTHREAD_COND_T 48
4232
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
4333

lib/libc/include/aarch64-linux-gnu/bits/semaphore.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@
2020
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
2121
#endif
2222

23-
24-
#ifdef __ILP32__
25-
# define __SIZEOF_SEM_T 16
26-
#else
27-
# define __SIZEOF_SEM_T 32
28-
#endif
29-
23+
#define __SIZEOF_SEM_T 32
3024

3125
/* Value returned if `sem_open' failed. */
3226
#define SEM_FAILED ((sem_t *) 0)

lib/libc/include/aarch64-linux-gnu/bits/wordsize.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,5 @@
1717
License along with the GNU C Library; if not, see
1818
<https://www.gnu.org/licenses/>. */
1919

20-
#ifdef __LP64__
21-
# define __WORDSIZE 64
22-
#else
23-
# define __WORDSIZE 32
24-
# define __WORDSIZE32_SIZE_ULONG 1
25-
# define __WORDSIZE32_PTRDIFF_LONG 1
26-
#endif
27-
20+
#define __WORDSIZE 64
2821
#define __WORDSIZE_TIME64_COMPAT32 0

lib/libc/include/generic-glibc/arpa/inet.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
101101
char *__buf) __THROW;
102102
#endif
103103

104+
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
105+
/* Include functions with security checks. */
106+
# include <bits/inet-fortified.h>
107+
#endif
108+
104109
__END_DECLS
105110

106111
#endif /* arpa/inet.h */

lib/libc/include/generic-glibc/bits/fcntl-linux.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ struct file_handle
379379
identity and may not
380380
be usable to
381381
open_by_handle_at. */
382+
# define AT_HANDLE_MNT_ID_UNIQUE 1 /* Return the 64-bit unique mount
383+
ID. */
382384
#endif
383385

384386
__BEGIN_DECLS
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* Declarations of checking macros for inet functions.
2+
Copyright (C) 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 _BITS_INET_FORTIFIED_DEC_H
20+
#define _BITS_INET_FORTIFIED_DEC_H 1
21+
22+
#ifndef _ARPA_INET_H
23+
# error "Never include <bits/inet-fortified-decl.h> directly; use <arpa/inet.h> instead."
24+
#endif
25+
26+
extern const char *__inet_ntop_chk (int, const void *, char *, socklen_t, size_t);
27+
28+
extern const char *__REDIRECT_FORTIFY_NTH (__inet_ntop_alias,
29+
(int, const void *, char *, socklen_t), inet_ntop);
30+
extern const char *__REDIRECT_NTH (__inet_ntop_chk_warn,
31+
(int, const void *, char *, socklen_t, size_t), __inet_ntop_chk)
32+
__warnattr ("inet_ntop called with bigger length than "
33+
"size of destination buffer");
34+
35+
extern int __inet_pton_chk (int, const char *, void *, size_t);
36+
37+
extern int __REDIRECT_FORTIFY_NTH (__inet_pton_alias,
38+
(int, const char *, void *), inet_pton);
39+
extern int __REDIRECT_NTH (__inet_pton_chk_warn,
40+
(int, const char *, void *, size_t), __inet_pton_chk)
41+
__warnattr ("inet_pton called with a destination buffer size too small");
42+
#endif /* bits/inet-fortified-decl.h. */
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/* Checking macros for inet functions.
2+
Copyright (C) 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 _BITS_INET_FORTIFIED_H
20+
#define _BITS_INET_FORTIFIED_H 1
21+
22+
#ifndef _ARPA_INET_H
23+
# error "Never include <bits/inet-fortified.h> directly; use <arpa/inet.h> instead."
24+
#endif
25+
26+
#include <bits/inet-fortified-decl.h>
27+
28+
__fortify_function __attribute_overloadable__ const char *
29+
__NTH (inet_ntop (int __af,
30+
__fortify_clang_overload_arg (const void *, __restrict, __src),
31+
char *__restrict __dst, socklen_t __dst_size))
32+
__fortify_clang_warning_only_if_bos_lt (__dst_size, __dst,
33+
"inet_ntop called with bigger length "
34+
"than size of destination buffer")
35+
{
36+
return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
37+
__glibc_objsize (__dst),
38+
__af, __src, __dst, __dst_size);
39+
};
40+
41+
__fortify_function __attribute_overloadable__ int
42+
__NTH (inet_pton (int __af,
43+
const char *__restrict __src,
44+
__fortify_clang_overload_arg (void *, __restrict, __dst)))
45+
__fortify_clang_warning_only_if_bos0_lt
46+
(4, __dst, "inet_pton called with destination buffer size less than 4")
47+
{
48+
size_t sz = 0;
49+
if (__af == AF_INET)
50+
sz = sizeof (struct in_addr);
51+
else if (__af == AF_INET6)
52+
sz = sizeof (struct in6_addr);
53+
else
54+
return __inet_pton_alias (__af, __src, __dst);
55+
56+
return __glibc_fortify (inet_pton, sz, sizeof (char),
57+
__glibc_objsize (__dst),
58+
__af, __src, __dst);
59+
};
60+
61+
#endif /* bits/inet-fortified.h. */

lib/libc/include/generic-glibc/bits/ioctl-types.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@ struct winsize
3232
unsigned short int ws_ypixel;
3333
};
3434

35-
#define NCC 8
36-
struct termio
37-
{
38-
unsigned short int c_iflag; /* input mode flags */
39-
unsigned short int c_oflag; /* output mode flags */
40-
unsigned short int c_cflag; /* control mode flags */
41-
unsigned short int c_lflag; /* local mode flags */
42-
unsigned char c_line; /* line discipline */
43-
unsigned char c_cc[NCC]; /* control characters */
44-
};
45-
4635
/* modem lines */
4736
#define TIOCM_LE 0x001
4837
#define TIOCM_DTR 0x002

0 commit comments

Comments
 (0)