authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-31 22:02:37+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-31 22:02:37+02:00
log1804251dfb5b1a5699371735aac138b3a2d6c3f6
treed2ebd1828dfdc50f8cc22668b4ae4fb927c832c5
parentcdd6e9ee3ad32b68c3231488bc2b6a50e5b3ace4
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

glibc: update headers to 2.42


57 files changed, 699 insertions(+), 466 deletions(-)

lib/libc/include/aarch64-linux-gnu/bits/fcntl.h+4-10
......@@ -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
4034struct flock
4135 {
lib/libc/include/aarch64-linux-gnu/bits/math-vector.h+32
......@@ -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+7-17
......@@ -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+1-7
......@@ -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+1-8
......@@ -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
\ No newline at end of file
lib/libc/include/generic-glibc/arpa/inet.h+5
......@@ -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 */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/fcntl-linux.h+2
......@@ -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
lib/libc/include/generic-glibc/bits/inet-fortified-decl.h created+42
......@@ -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
26extern const char *__inet_ntop_chk (int, const void *, char *, socklen_t, size_t);
27
28extern const char *__REDIRECT_FORTIFY_NTH (__inet_ntop_alias,
29 (int, const void *, char *, socklen_t), inet_ntop);
30extern 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
35extern int __inet_pton_chk (int, const char *, void *, size_t);
36
37extern int __REDIRECT_FORTIFY_NTH (__inet_pton_alias,
38 (int, const char *, void *), inet_pton);
39extern 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. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/inet-fortified.h created+61
......@@ -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. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/ioctl-types.h-11
......@@ -32,17 +32,6 @@ struct winsize
3232 unsigned short int ws_ypixel;
3333 };
3434
35#define NCC 8
36struct 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
lib/libc/include/generic-glibc/bits/ioctls.h+1-84
......@@ -22,87 +22,4 @@
2222/* Use the definitions from the kernel header files. */
2323#include <asm/ioctls.h>
2424
25/* Routing table calls. */
26#define SIOCADDRT 0x890B /* add routing table entry */
27#define SIOCDELRT 0x890C /* delete routing table entry */
28#define SIOCRTMSG 0x890D /* call to routing system */
29
30/* Socket configuration controls. */
31#define SIOCGIFNAME 0x8910 /* get iface name */
32#define SIOCSIFLINK 0x8911 /* set iface channel */
33#define SIOCGIFCONF 0x8912 /* get iface list */
34#define SIOCGIFFLAGS 0x8913 /* get flags */
35#define SIOCSIFFLAGS 0x8914 /* set flags */
36#define SIOCGIFADDR 0x8915 /* get PA address */
37#define SIOCSIFADDR 0x8916 /* set PA address */
38#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */
39#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */
40#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */
41#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */
42#define SIOCGIFNETMASK 0x891b /* get network PA mask */
43#define SIOCSIFNETMASK 0x891c /* set network PA mask */
44#define SIOCGIFMETRIC 0x891d /* get metric */
45#define SIOCSIFMETRIC 0x891e /* set metric */
46#define SIOCGIFMEM 0x891f /* get memory address (BSD) */
47#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */
48#define SIOCGIFMTU 0x8921 /* get MTU size */
49#define SIOCSIFMTU 0x8922 /* set MTU size */
50#define SIOCSIFNAME 0x8923 /* set interface name */
51#define SIOCSIFHWADDR 0x8924 /* set hardware address */
52#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */
53#define SIOCSIFENCAP 0x8926
54#define SIOCGIFHWADDR 0x8927 /* Get hardware address */
55#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */
56#define SIOCSIFSLAVE 0x8930
57#define SIOCADDMULTI 0x8931 /* Multicast address lists */
58#define SIOCDELMULTI 0x8932
59#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */
60#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */
61#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */
62#define SIOCGIFPFLAGS 0x8935
63#define SIOCDIFADDR 0x8936 /* delete PA address */
64#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */
65#define SIOCGIFCOUNT 0x8938 /* get number of devices */
66
67#define SIOCGIFBR 0x8940 /* Bridging support */
68#define SIOCSIFBR 0x8941 /* Set bridging options */
69
70#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */
71#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */
72
73
74/* ARP cache control calls. */
75 /* 0x8950 - 0x8952 * obsolete calls, don't re-use */
76#define SIOCDARP 0x8953 /* delete ARP table entry */
77#define SIOCGARP 0x8954 /* get ARP table entry */
78#define SIOCSARP 0x8955 /* set ARP table entry */
79
80/* RARP cache control calls. */
81#define SIOCDRARP 0x8960 /* delete RARP table entry */
82#define SIOCGRARP 0x8961 /* get RARP table entry */
83#define SIOCSRARP 0x8962 /* set RARP table entry */
84
85/* Driver configuration calls */
86
87#define SIOCGIFMAP 0x8970 /* Get device parameters */
88#define SIOCSIFMAP 0x8971 /* Set device parameters */
89
90/* DLCI configuration calls */
91
92#define SIOCADDDLCI 0x8980 /* Create new DLCI device */
93#define SIOCDELDLCI 0x8981 /* Delete DLCI device */
94
95/* Device private ioctl calls. */
96
97/* These 16 ioctls are available to devices via the do_ioctl() device
98 vector. Each device should include this file and redefine these
99 names as their own. Because these are device dependent it is a good
100 idea _NOT_ to issue them to random objects and hope. */
101
102#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */
103
104/*
105 * These 16 ioctl calls are protocol private
106 */
107
108#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */
\ No newline at end of file
25#include <linux/sockios.h>
\ No newline at end of file
lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h+44
......@@ -373,4 +373,48 @@
373373#define __DECL_SIMD_tanpif32x
374374#define __DECL_SIMD_tanpif64x
375375#define __DECL_SIMD_tanpif128x
376
377#define __DECL_SIMD_acospi
378#define __DECL_SIMD_acospif
379#define __DECL_SIMD_acospil
380#define __DECL_SIMD_acospif16
381#define __DECL_SIMD_acospif32
382#define __DECL_SIMD_acospif64
383#define __DECL_SIMD_acospif128
384#define __DECL_SIMD_acospif32x
385#define __DECL_SIMD_acospif64x
386#define __DECL_SIMD_acospif128x
387
388#define __DECL_SIMD_asinpi
389#define __DECL_SIMD_asinpif
390#define __DECL_SIMD_asinpil
391#define __DECL_SIMD_asinpif16
392#define __DECL_SIMD_asinpif32
393#define __DECL_SIMD_asinpif64
394#define __DECL_SIMD_asinpif128
395#define __DECL_SIMD_asinpif32x
396#define __DECL_SIMD_asinpif64x
397#define __DECL_SIMD_asinpif128x
398
399#define __DECL_SIMD_atanpi
400#define __DECL_SIMD_atanpif
401#define __DECL_SIMD_atanpil
402#define __DECL_SIMD_atanpif16
403#define __DECL_SIMD_atanpif32
404#define __DECL_SIMD_atanpif64
405#define __DECL_SIMD_atanpif128
406#define __DECL_SIMD_atanpif32x
407#define __DECL_SIMD_atanpif64x
408#define __DECL_SIMD_atanpif128x
409
410#define __DECL_SIMD_atan2pi
411#define __DECL_SIMD_atan2pif
412#define __DECL_SIMD_atan2pil
413#define __DECL_SIMD_atan2pif16
414#define __DECL_SIMD_atan2pif32
415#define __DECL_SIMD_atan2pif64
416#define __DECL_SIMD_atan2pif128
417#define __DECL_SIMD_atan2pif32x
418#define __DECL_SIMD_atan2pif64x
419#define __DECL_SIMD_atan2pif128x
376420#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/mathcalls-macros.h+1-1
......@@ -34,7 +34,7 @@
3434#define __MATHCALLX(function,suffix, args, attrib) \
3535 __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
3636#define __MATHDECLX(type, function,suffix, args, attrib) \
37 __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib);
37 __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib)
3838#define __MATHDECL_1_IMPL(type, function, suffix, args) \
3939 extern type __MATH_PRECNAME(function,suffix) args __THROW
4040#define __MATHDECL_1(type, function, suffix, args) \
lib/libc/include/generic-glibc/bits/mathcalls.h+21
......@@ -68,12 +68,16 @@ __MATHCALL_VEC (tan,, (_Mdouble_ __x));
6868#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
6969/* Arc cosine of X, divided by pi. */
7070__MATHCALL (acospi,, (_Mdouble_ __x));
71__MATHCALL_VEC (acospi,, (_Mdouble_ __x));
7172/* Arc sine of X, divided by pi. */
7273__MATHCALL (asinpi,, (_Mdouble_ __x));
74__MATHCALL_VEC (asinpi,, (_Mdouble_ __x));
7375/* Arc tangent of X, divided by pi. */
7476__MATHCALL (atanpi,, (_Mdouble_ __x));
77__MATHCALL_VEC (atanpi,, (_Mdouble_ __x));
7578/* Arc tangent of Y/X, divided by pi. */
7679__MATHCALL (atan2pi,, (_Mdouble_ __y, _Mdouble_ __x));
80__MATHCALL_VEC (atan2pi,, (_Mdouble_ __y, _Mdouble_ __x));
7781
7882/* Cosine of pi * X. */
7983__MATHCALL_VEC (cospi,, (_Mdouble_ __x));
......@@ -185,6 +189,23 @@ __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
185189__MATHCALL_VEC (cbrt,, (_Mdouble_ __x));
186190#endif
187191
192#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
193/* Return 1+X to the Y power. */
194__MATHCALL (compoundn,, (_Mdouble_ __x, long long int __y));
195
196/* Return X to the Y power. */
197__MATHCALL (pown,, (_Mdouble_ __x, long long int __y));
198
199/* Return X to the Y power. */
200__MATHCALL (powr,, (_Mdouble_ __x, _Mdouble_ __y));
201
202/* Return the Yth root of X. */
203__MATHCALL (rootn,, (_Mdouble_ __x, long long int __y));
204
205/* Return the reciprocal of the square root of X. */
206__MATHCALL (rsqrt,, (_Mdouble_ __x));
207#endif
208
188209
189210/* Nearest integer, absolute value, and remainder functions. */
190211
lib/libc/include/generic-glibc/bits/mman-linux.h+2
......@@ -113,6 +113,8 @@
113113 locked pages too. */
114114# define MADV_COLLAPSE 25 /* Synchronous hugepage collapse. */
115115# define MADV_HWPOISON 100 /* Poison a page for testing. */
116# define MADV_GUARD_INSTALL 102 /* Fatal signal on access to range */
117# define MADV_GUARD_REMOVE 103 /* Unguard range */
116118#endif
117119
118120/* The POSIX people had to invent similar names for the same things. */
lib/libc/include/generic-glibc/bits/mman-shared.h+3-4
......@@ -43,10 +43,9 @@
4343# endif
4444
4545/* Access restrictions for pkey_alloc. */
46# ifndef PKEY_DISABLE_ACCESS
47# define PKEY_DISABLE_ACCESS 0x1
48# define PKEY_DISABLE_WRITE 0x2
49# endif
46# define PKEY_UNRESTRICTED 0x0
47# define PKEY_DISABLE_ACCESS 0x1
48# define PKEY_DISABLE_WRITE 0x2
5049
5150__BEGIN_DECLS
5251
lib/libc/include/generic-glibc/bits/sched.h+1-1
......@@ -152,7 +152,7 @@ int sched_setattr (pid_t tid, struct sched_attr *attr, unsigned int flags)
152152 store it in *ATTR. */
153153int sched_getattr (pid_t tid, struct sched_attr *attr, unsigned int size,
154154 unsigned int flags)
155 __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
155 __THROW __nonnull ((2));
156156
157157#endif
158158
lib/libc/include/generic-glibc/bits/string_fortified.h+1-1
......@@ -151,7 +151,7 @@ __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
151151}
152152
153153/*
154 * strlcpy and strlcat introduced in glibc 2.38
154 * zig patch: strlcpy and strlcat introduced in glibc 2.38
155155 * https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
156156 */
157157#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
lib/libc/include/generic-glibc/bits/syscall.h+22-2
......@@ -1,11 +1,11 @@
11/* Generated at libc build time from syscall list. */
2/* The system call list corresponds to kernel 6.12. */
2/* The system call list corresponds to kernel 6.15. */
33
44#ifndef _SYSCALL_H
55# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
66#endif
77
8#define __GLIBC_LINUX_VERSION_CODE 396288
8#define __GLIBC_LINUX_VERSION_CODE 397056
99
1010#ifdef __NR_FAST_atomic_update
1111# define SYS_FAST_atomic_update __NR_FAST_atomic_update
......@@ -703,6 +703,10 @@
703703# define SYS_getxattr __NR_getxattr
704704#endif
705705
706#ifdef __NR_getxattrat
707# define SYS_getxattrat __NR_getxattrat
708#endif
709
706710#ifdef __NR_getxgid
707711# define SYS_getxgid __NR_getxgid
708712#endif
......@@ -875,6 +879,10 @@
875879# define SYS_listxattr __NR_listxattr
876880#endif
877881
882#ifdef __NR_listxattrat
883# define SYS_listxattrat __NR_listxattrat
884#endif
885
878886#ifdef __NR_llistxattr
879887# define SYS_llistxattr __NR_llistxattr
880888#endif
......@@ -1167,6 +1175,10 @@
11671175# define SYS_open_tree __NR_open_tree
11681176#endif
11691177
1178#ifdef __NR_open_tree_attr
1179# define SYS_open_tree_attr __NR_open_tree_attr
1180#endif
1181
11701182#ifdef __NR_openat
11711183# define SYS_openat __NR_openat
11721184#endif
......@@ -1839,6 +1851,10 @@
18391851# define SYS_removexattr __NR_removexattr
18401852#endif
18411853
1854#ifdef __NR_removexattrat
1855# define SYS_removexattrat __NR_removexattrat
1856#endif
1857
18421858#ifdef __NR_rename
18431859# define SYS_rename __NR_rename
18441860#endif
......@@ -2199,6 +2215,10 @@
21992215# define SYS_setxattr __NR_setxattr
22002216#endif
22012217
2218#ifdef __NR_setxattrat
2219# define SYS_setxattrat __NR_setxattrat
2220#endif
2221
22022222#ifdef __NR_sgetmask
22032223# define SYS_sgetmask __NR_sgetmask
22042224#endif
lib/libc/include/generic-glibc/bits/termios-baud.h+52-25
......@@ -1,4 +1,4 @@
1/* termios baud rate selection definitions. Linux/generic version.
1/* termios baud rate selection definitions. Universal version for sane speed_t.
22 Copyright (C) 2019-2025 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
......@@ -20,29 +20,56 @@
2020# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
2121#endif
2222
23#ifdef __USE_MISC
24# define CBAUD 000000010017 /* Baud speed mask (not in POSIX). */
25# define CBAUDEX 000000010000 /* Extra baud speed mask, included in CBAUD.
26 (not in POSIX). */
27# define CIBAUD 002003600000 /* Input baud rate (not used). */
28# define CMSPAR 010000000000 /* Mark or space (stick) parity. */
29# define CRTSCTS 020000000000 /* Flow control. */
23/* POSIX required baud rates */
24#define B0 0U /* Hang up or ispeed == ospeed */
25#define B50 50U
26#define B75 75U
27#define B110 110U
28#define B134 134U /* Really 134.5 baud by POSIX spec */
29#define B150 150U
30#define B200 200U
31#define B300 300U
32#define B600 600U
33#define B1200 1200U
34#define B1800 1800U
35#define B2400 2400U
36#define B4800 4800U
37#define B9600 9600U
38#define B19200 19200U
39#define B38400 38400U
40#ifdef __USE_MISC
41# define EXTA B19200
42# define EXTB B38400
3043#endif
3144
32/* Extra output baud rates (not in POSIX). */
33#define B57600 0010001
34#define B115200 0010002
35#define B230400 0010003
36#define B460800 0010004
37#define B500000 0010005
38#define B576000 0010006
39#define B921600 0010007
40#define B1000000 0010010
41#define B1152000 0010011
42#define B1500000 0010012
43#define B2000000 0010013
44#define B2500000 0010014
45#define B3000000 0010015
46#define B3500000 0010016
47#define B4000000 0010017
48#define __MAX_BAUD B4000000
\ No newline at end of file
45/* Other baud rates, "nonstandard" but known to be used */
46#define B7200 7200U
47#define B14400 14400U
48#define B28800 28800U
49#define B33600 33600U
50#define B57600 57600U
51#define B76800 76800U
52#define B115200 115200U
53#define B153600 153600U
54#define B230400 230400U
55#define B307200 307200U
56#define B460800 460800U
57#define B500000 500000U
58#define B576000 576000U
59#define B614400 614400U
60#define B921600 921600U
61#define B1000000 1000000U
62#define B1152000 1152000U
63#define B1500000 1500000U
64#define B2000000 2000000U
65#define B2500000 2500000U
66#define B3000000 3000000U
67#define B3500000 3500000U
68#define B4000000 4000000U
69#define B5000000 5000000U
70#define B10000000 10000000U
71
72#ifdef __USE_GNU
73#define SPEED_MAX 4294967295U /* maximum valid speed_t value */
74#endif
75#define __MAX_BAUD 4294967295U /* legacy alias for SPEED_MAX */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/termios-c_cflag.h+3-1
......@@ -34,5 +34,7 @@
3434#define CLOCAL 0004000
3535
3636#ifdef __USE_MISC
37# define ADDRB 04000000000
37# define ADDRB 04000000000
38# define CMSPAR 010000000000 /* Mark or space (stick) parity. */
39# define CRTSCTS 020000000000 /* Flow control. */
3840#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/termios-cbaud.h created+47
......@@ -0,0 +1,47 @@
1/* termios baud rate selection definitions. Linux/generic version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> instead."
21#endif
22
23#ifdef __USE_MISC
24# define CBAUD 000000010017 /* Baud speed mask (not in POSIX). */
25# define CBAUDEX 000000010000 /* Extra baud speed mask, included in CBAUD.
26 (not in POSIX). */
27# define CIBAUD 002003600000 /* Input baud rate. */
28# define IBSHIFT 16
29#endif
30
31/* Extra output baud rates (not in POSIX). */
32#define __BOTHER 0010000
33#define __B57600 0010001
34#define __B115200 0010002
35#define __B230400 0010003
36#define __B460800 0010004
37#define __B500000 0010005
38#define __B576000 0010006
39#define __B921600 0010007
40#define __B1000000 0010010
41#define __B1152000 0010011
42#define __B1500000 0010012
43#define __B2000000 0010013
44#define __B2500000 0010014
45#define __B3000000 0010015
46#define __B3500000 0010016
47#define __B4000000 0010017
\ No newline at end of file
lib/libc/include/generic-glibc/bits/termios-struct.h+9-2
......@@ -29,8 +29,15 @@ struct termios
2929 tcflag_t c_lflag; /* local mode flags */
3030 cc_t c_line; /* line discipline */
3131 cc_t c_cc[NCCS]; /* control characters */
32 speed_t c_ispeed; /* input speed */
33 speed_t c_ospeed; /* output speed */
32 /* Input and output baud rates. */
33 __extension__ union {
34 speed_t __ispeed;
35 speed_t c_ispeed;
36 };
3437#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
38 __extension__ union {
39 speed_t __ospeed;
40 speed_t c_ospeed;
41 };
3542#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
3643 };
\ No newline at end of file
lib/libc/include/generic-glibc/bits/termios.h+30-22
......@@ -24,35 +24,41 @@ typedef unsigned char cc_t;
2424typedef unsigned int speed_t;
2525typedef unsigned int tcflag_t;
2626
27#include <bits/termios-struct.h>
27#ifdef _TERMIOS_H
28# include <bits/termios-struct.h>
29#endif
30
2831#include <bits/termios-c_cc.h>
2932#include <bits/termios-c_iflag.h>
3033#include <bits/termios-c_oflag.h>
3134
3235/* c_cflag bit meaning */
33#define B0 0000000 /* hang up */
34#define B50 0000001
35#define B75 0000002
36#define B110 0000003
37#define B134 0000004
38#define B150 0000005
39#define B200 0000006
40#define B300 0000007
41#define B600 0000010
42#define B1200 0000011
43#define B1800 0000012
44#define B2400 0000013
45#define B4800 0000014
46#define B9600 0000015
47#define B19200 0000016
48#define B38400 0000017
36#include <bits/termios-c_cflag.h>
37
4938#ifdef __USE_MISC
50# define EXTA B19200
51# define EXTB B38400
39#define __B0 0000000 /* hang up */
40#define __B50 0000001
41#define __B75 0000002
42#define __B110 0000003
43#define __B134 0000004
44#define __B150 0000005
45#define __B200 0000006
46#define __B300 0000007
47#define __B600 0000010
48#define __B1200 0000011
49#define __B1800 0000012
50#define __B2400 0000013
51#define __B4800 0000014
52#define __B9600 0000015
53#define __B19200 0000016
54#define __B38400 0000017
55#include <bits/termios-cbaud.h>
56
57# define __EXTA __B19200
58# define __EXTB __B38400
59# define BOTHER __BOTHER
5260#endif
53#include <bits/termios-baud.h>
5461
55#include <bits/termios-c_cflag.h>
5662#include <bits/termios-c_lflag.h>
5763
5864#ifdef __USE_MISC
......@@ -73,4 +79,6 @@ typedef unsigned int tcflag_t;
7379
7480#include <bits/termios-tcflow.h>
7581
76#include <bits/termios-misc.h>
\ No newline at end of file
82#include <bits/termios-misc.h>
83
84#include <bits/termios-baud.h>
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_FILE.h+9-1
......@@ -32,6 +32,7 @@
3232#endif
3333
3434#include <bits/types.h>
35#include <bits/wordsize.h>
3536
3637struct _IO_FILE;
3738struct _IO_marker;
......@@ -97,8 +98,15 @@ struct _IO_FILE_complete
9798 void *_freeres_buf;
9899 struct _IO_FILE **_prevchain;
99100 int _mode;
101#if __WORDSIZE == 64
102 int _unused3;
103#endif
104 __uint64_t _total_written;
105#if __WORDSIZE == 32
106 int _unused3;
107#endif
100108 /* Make sure we don't get into trouble again. */
101 char _unused2[15 * sizeof (int) - 5 * sizeof (void *)];
109 char _unused2[12 * sizeof (int) - 5 * sizeof (void *)];
102110};
103111
104112/* These macros are used by bits/stdio.h and internal headers. */
lib/libc/include/generic-glibc/dlfcn.h+8-2
......@@ -217,15 +217,21 @@ struct dl_find_object
217217 int dlfo_eh_count; /* Number of exception handling entries. */
218218 unsigned int __dlfo_eh_count_pad;
219219# endif
220 __extension__ unsigned long long int __dflo_reserved[7];
220 void *dlfo_sframe; /* SFrame stack trace data of the object. */
221#if __WORDSIZE == 32
222 unsigned int __dlfo_sframe_pad;
223#endif
224 __extension__ unsigned long long int __dlfo_reserved[6];
221225};
222226
223227/* If ADDRESS is found in an object, fill in *RESULT and return 0.
224228 Otherwise, return -1. */
225229int _dl_find_object (void *__address, struct dl_find_object *__result) __THROW;
226230
227#endif /* __USE_GNU */
231/* SFrame stack trace data is valid. */
232#define DLFO_FLAG_SFRAME (1ULL << 0)
228233
234#endif /* __USE_GNU */
229235
230236__END_DECLS
231237
lib/libc/include/generic-glibc/elf.h+11-22
......@@ -837,12 +837,15 @@ typedef struct
837837#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
838838#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
839839#define NT_ARM_POE 0x40f /* ARM POE registers. */
840#define NT_ARM_GCS 0x410 /* ARM GCS state. */
840841#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
841842#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
842843#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
843844#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
844845#define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */
845846#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
847#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged
848 address control */
846849#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */
847850#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and
848851 status registers. */
......@@ -2906,19 +2909,6 @@ enum
29062909
29072910#define R_AARCH64_NONE 0 /* No relocation. */
29082911
2909/* ILP32 AArch64 relocs. */
2910#define R_AARCH64_P32_ABS32 1 /* Direct 32 bit. */
2911#define R_AARCH64_P32_COPY 180 /* Copy symbol at runtime. */
2912#define R_AARCH64_P32_GLOB_DAT 181 /* Create GOT entry. */
2913#define R_AARCH64_P32_JUMP_SLOT 182 /* Create PLT entry. */
2914#define R_AARCH64_P32_RELATIVE 183 /* Adjust by program base. */
2915#define R_AARCH64_P32_TLS_DTPMOD 184 /* Module number, 32 bit. */
2916#define R_AARCH64_P32_TLS_DTPREL 185 /* Module-relative offset, 32 bit. */
2917#define R_AARCH64_P32_TLS_TPREL 186 /* TP-relative offset, 32 bit. */
2918#define R_AARCH64_P32_TLSDESC 187 /* TLS Descriptor. */
2919#define R_AARCH64_P32_IRELATIVE 188 /* STT_GNU_IFUNC relocation. */
2920
2921/* LP64 AArch64 relocs. */
29222912#define R_AARCH64_ABS64 257 /* Direct 64 bit. */
29232913#define R_AARCH64_ABS32 258 /* Direct 32 bit. */
29242914#define R_AARCH64_ABS16 259 /* Direct 16-bit. */
......@@ -4091,6 +4081,7 @@ enum
40914081#define R_RISCV_TLS_DTPREL64 9
40924082#define R_RISCV_TLS_TPREL32 10
40934083#define R_RISCV_TLS_TPREL64 11
4084#define R_RISCV_TLSDESC 12
40944085#define R_RISCV_BRANCH 16
40954086#define R_RISCV_JAL 17
40964087#define R_RISCV_CALL 18
......@@ -4116,16 +4107,10 @@ enum
41164107#define R_RISCV_SUB16 38
41174108#define R_RISCV_SUB32 39
41184109#define R_RISCV_SUB64 40
4119#define R_RISCV_GNU_VTINHERIT 41
4120#define R_RISCV_GNU_VTENTRY 42
4110#define R_RISCV_GOT32_PCREL 41
41214111#define R_RISCV_ALIGN 43
41224112#define R_RISCV_RVC_BRANCH 44
41234113#define R_RISCV_RVC_JUMP 45
4124#define R_RISCV_RVC_LUI 46
4125#define R_RISCV_GPREL_I 47
4126#define R_RISCV_GPREL_S 48
4127#define R_RISCV_TPREL_I 49
4128#define R_RISCV_TPREL_S 50
41294114#define R_RISCV_RELAX 51
41304115#define R_RISCV_SUB6 52
41314116#define R_RISCV_SET6 53
......@@ -4137,8 +4122,12 @@ enum
41374122#define R_RISCV_PLT32 59
41384123#define R_RISCV_SET_ULEB128 60
41394124#define R_RISCV_SUB_ULEB128 61
4125#define R_RISCV_TLSDESC_HI20 62
4126#define R_RISCV_TLSDESC_LOAD_LO12 63
4127#define R_RISCV_TLSDESC_ADD_LO12 64
4128#define R_RISCV_TLSDESC_CALL 65
41404129
4141#define R_RISCV_NUM 62
4130#define R_RISCV_NUM 66
41424131
41434132/* RISC-V specific values for the st_other field. */
41444133#define STO_RISCV_VARIANT_CC 0x80 /* Function uses variant calling
......@@ -4147,7 +4136,7 @@ enum
41474136/* RISC-V specific values for the sh_type field. */
41484137#define SHT_RISCV_ATTRIBUTES (SHT_LOPROC + 3)
41494138
4150/* RISC-V specific values for the p_type field. */
4139/* RISC-V specific values for the p_type field (deprecated). */
41514140#define PT_RISCV_ATTRIBUTES (PT_LOPROC + 3)
41524141
41534142/* RISC-V specific values for the d_tag field. */
lib/libc/include/generic-glibc/fcntl.h+6-5
......@@ -168,7 +168,7 @@ typedef __pid_t pid_t;
168168#endif
169169
170170
171/* fcntl was a simple symbol until glibc 2.27 inclusive.
171/* zig patch: fcntl was a simple symbol until glibc 2.27 inclusive.
172172 * glibc 2.28 onwards converted it to a macro when compiled with
173173 * USE_LARGEFILE64. */
174174#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2
......@@ -289,16 +289,17 @@ extern int creat64 (const char *__file, mode_t __mode) __nonnull ((1));
289289# define F_TEST 3 /* Test a region for other processes locks. */
290290
291291# ifndef __USE_FILE_OFFSET64
292extern int lockf (int __fd, int __cmd, off_t __len);
292extern int lockf (int __fd, int __cmd, off_t __len) __wur;
293293# else
294294# ifdef __REDIRECT
295extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
295extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
296 lockf64) __wur;
296297# else
297298# define lockf lockf64
298299# endif
299300# endif
300301# ifdef __USE_LARGEFILE64
301extern int lockf64 (int __fd, int __cmd, off64_t __len);
302extern int lockf64 (int __fd, int __cmd, off64_t __len) __wur;
302303# endif
303304#endif
304305
......@@ -351,4 +352,4 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
351352
352353__END_DECLS
353354
354#endif /* fcntl.h */
\ No newline at end of file
355#endif /* fcntl.h */
lib/libc/include/generic-glibc/features.h+3-3
......@@ -491,7 +491,7 @@
491491 or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
492492 old extension. */
493493#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
494/* support for ISOC99 was added in glibc-2.7 */
494/* zig patch: support for ISOC99 was added in glibc-2.7 */
495495# define __GLIBC_USE_DEPRECATED_SCANF 1
496496#elif (defined __USE_GNU \
497497 && (defined __cplusplus \
......@@ -503,7 +503,7 @@
503503#endif
504504
505505
506/* support for ISO C2X strtol was added in 2.38
506/* zig patch: support for ISO C2X strtol was added in 2.38
507507 * glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
508508 */
509509#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
......@@ -564,4 +564,4 @@
564564#include <gnu/stubs.h>
565565
566566
567#endif /* features.h */
\ No newline at end of file
567#endif /* features.h */
lib/libc/include/generic-glibc/glob.h+2-1
......@@ -195,7 +195,8 @@ extern void globfree64 (glob64_t *__pglob) __THROW;
195195
196196 This function is not part of the interface specified by POSIX.2
197197 but several programs want to use it. */
198extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
198extern int glob_pattern_p (const char *__pattern, int __quote) __THROW
199 __nonnull ((1));
199200#endif
200201
201202__END_DECLS
lib/libc/include/generic-glibc/inttypes.h+5
......@@ -350,6 +350,11 @@ typedef struct
350350/* Compute absolute value of N. */
351351extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
352352
353
354#if __GLIBC_USE (ISOC2Y)
355extern uintmax_t uimaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
356#endif
357
353358/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
354359extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
355360 __THROW __attribute__ ((__const__));
lib/libc/include/generic-glibc/malloc.h+2-2
......@@ -52,7 +52,7 @@ extern void *realloc (void *__ptr, size_t __size)
5252__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
5353
5454/*
55 * reallocarray introduced in glibc 2.26
55 * zig patch: reallocarray introduced in glibc 2.26
5656 * https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
5757 */
5858#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 26) || __GLIBC__ > 2
......@@ -164,4 +164,4 @@ extern void malloc_stats (void) __THROW;
164164extern int malloc_info (int __options, FILE *__fp) __THROW;
165165
166166__END_DECLS
167#endif /* malloc.h */
\ No newline at end of file
167#endif /* malloc.h */
lib/libc/include/generic-glibc/netinet/tcp.h+3
......@@ -212,6 +212,9 @@ enum
212212# define TCPI_OPT_ECN 8 /* ECN was negotiated at TCP session init */
213213# define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
214214# define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
215# define TCPI_OPT_USEC_TS 64 /* usec timestamps */
216# define TCPI_OPT_TFO_CHILD 128 /* child from a Fast Open option on SYN */
217
215218
216219/* Values for tcpi_state. */
217220enum tcp_ca_state
lib/libc/include/generic-glibc/pthread.h+5
......@@ -1317,6 +1317,11 @@ extern int pthread_getcpuclockid (pthread_t __thread_id,
13171317 __THROW __nonnull ((2));
13181318#endif
13191319
1320#ifdef __USE_GNU
1321/* Return the Linux TID for THREAD_ID. Returns -1 on failure. */
1322extern pid_t pthread_gettid_np (pthread_t __thread_id);
1323#endif
1324
13201325
13211326/* Install handlers to be called when a new process is created with FORK.
13221327 The PREPARE handler is called in the parent process just before performing
lib/libc/include/generic-glibc/resolv.h+2-2
......@@ -171,7 +171,7 @@ __END_DECLS
171171#define res_init __res_init
172172#define res_isourserver __res_isourserver
173173
174/* In glibc 2.33 and earlier res_search, res_nsearch, res_query, res_nquery,
174/* zig patch: In glibc 2.33 and earlier res_search, res_nsearch, res_query, res_nquery,
175175 * res_querydomain, res_nquerydomain, dn_skipname, dn_comp, dn_expand were
176176 * #define'd to __res_search, __res_nsearch, etc. glibc 2.34 onwards removes
177177 * the macros and exposes the symbols directly. New glibc exposes compat
......@@ -336,4 +336,4 @@ void res_nclose (res_state) __THROW;
336336
337337__END_DECLS
338338
339#endif /* !_RESOLV_H_ */
\ No newline at end of file
339#endif /* !_RESOLV_H_ */
lib/libc/include/generic-glibc/stdio.h+3-3
......@@ -168,8 +168,11 @@ extern int renameat (int __oldfd, const char *__old, int __newfd,
168168#ifdef __USE_GNU
169169/* Flags for renameat2. */
170170# define RENAME_NOREPLACE (1 << 0)
171# define AT_RENAME_NOREPLACE RENAME_NOREPLACE
171172# define RENAME_EXCHANGE (1 << 1)
173# define AT_RENAME_EXCHANGE RENAME_EXCHANGE
172174# define RENAME_WHITEOUT (1 << 2)
175# define AT_RENAME_WHITEOUT RENAME_WHITEOUT
173176
174177/* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with
175178 additional flags. */
......@@ -604,9 +607,6 @@ extern int fgetc_unlocked (FILE *__stream) __nonnull ((1));
604607/* Write a character to STREAM.
605608
606609 These functions are possible cancellation points and therefore not
607 marked with __THROW.
608
609 These functions is a possible cancellation point and therefore not
610610 marked with __THROW. */
611611extern int fputc (int __c, FILE *__stream) __nonnull ((2));
612612extern int putc (int __c, FILE *__stream) __nonnull ((2));
lib/libc/include/generic-glibc/stdio_ext.h+9-9
......@@ -43,43 +43,43 @@ __BEGIN_DECLS
4343
4444/* Return the size of the buffer of FP in bytes currently in use by
4545 the given stream. */
46extern size_t __fbufsize (FILE *__fp) __THROW;
46extern size_t __fbufsize (FILE *__fp) __THROW __nonnull ((1));
4747
4848
4949/* Return non-zero value iff the stream FP is opened readonly, or if the
5050 last operation on the stream was a read operation. */
51extern int __freading (FILE *__fp) __THROW;
51extern int __freading (FILE *__fp) __THROW __nonnull ((1));
5252
5353/* Return non-zero value iff the stream FP is opened write-only or
5454 append-only, or if the last operation on the stream was a write
5555 operation. */
56extern int __fwriting (FILE *__fp) __THROW;
56extern int __fwriting (FILE *__fp) __THROW __nonnull ((1));
5757
5858
5959/* Return non-zero value iff stream FP is not opened write-only or
6060 append-only. */
61extern int __freadable (FILE *__fp) __THROW;
61extern int __freadable (FILE *__fp) __THROW __nonnull ((1));
6262
6363/* Return non-zero value iff stream FP is not opened read-only. */
64extern int __fwritable (FILE *__fp) __THROW;
64extern int __fwritable (FILE *__fp) __THROW __nonnull ((1));
6565
6666
6767/* Return non-zero value iff the stream FP is line-buffered. */
68extern int __flbf (FILE *__fp) __THROW;
68extern int __flbf (FILE *__fp) __THROW __nonnull ((1));
6969
7070
7171/* Discard all pending buffered I/O on the stream FP. */
72extern void __fpurge (FILE *__fp) __THROW;
72extern void __fpurge (FILE *__fp) __THROW __nonnull ((1));
7373
7474/* Return amount of output in bytes pending on a stream FP. */
75extern size_t __fpending (FILE *__fp) __THROW;
75extern size_t __fpending (FILE *__fp) __THROW __nonnull ((1));
7676
7777/* Flush all line-buffered files. */
7878extern void _flushlbf (void);
7979
8080
8181/* Set locking status of stream FP to TYPE. */
82extern int __fsetlocking (FILE *__fp, int __type) __THROW;
82extern int __fsetlocking (FILE *__fp, int __type) __THROW __nonnull ((1));
8383
8484__END_DECLS
8585
lib/libc/include/generic-glibc/stdlib.h+9-3
......@@ -654,7 +654,7 @@ extern int lcong48_r (unsigned short int __param[7],
654654 __THROW __nonnull ((1, 2));
655655
656656/*
657 * arc4random* symbols introduced in glibc 2.36:
657 * zig patch: arc4random* symbols introduced in glibc 2.36:
658658 * https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=8420a65cd06874ee09518366b8fba746a557212a;hb=6f4e0fcfa2d2b0915816a3a3a1d48b4763a7dee2
659659 */
660660# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2
......@@ -693,7 +693,7 @@ extern void *realloc (void *__ptr, size_t __size)
693693extern void free (void *__ptr) __THROW;
694694
695695/*
696 * reallocarray introduced in glibc 2.26
696 * zig patch: reallocarray introduced in glibc 2.26
697697 * https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
698698 */
699699#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 26) || __GLIBC__ > 2
......@@ -997,6 +997,12 @@ __extension__ extern long long int llabs (long long int __x)
997997 __THROW __attribute__ ((__const__)) __wur;
998998#endif
999999
1000#if __GLIBC_USE (ISOC2Y)
1001extern unsigned int uabs (int __x) __THROW __attribute__ ((__const__)) __wur;
1002extern unsigned long int ulabs (long int __x) __THROW __attribute__ ((__const__)) __wur;
1003__extension__ extern unsigned long long int ullabs (long long int __x)
1004 __THROW __attribute__ ((__const__)) __wur;
1005#endif
10001006
10011007/* Return the `div_t', `ldiv_t' or `lldiv_t' representation
10021008 of the value of NUMER over DENOM. */
......@@ -1178,4 +1184,4 @@ extern int ttyslot (void) __THROW;
11781184
11791185__END_DECLS
11801186
1181#endif /* stdlib.h */
\ No newline at end of file
1187#endif /* stdlib.h */
lib/libc/include/generic-glibc/string.h+2-2
......@@ -502,7 +502,7 @@ extern char *stpncpy (char *__restrict __dest,
502502#endif
503503
504504/*
505 * strlcpy and strlcat introduced in glibc 2.38
505 * zig patch: strlcpy and strlcat introduced in glibc 2.38
506506 * https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
507507 */
508508#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
......@@ -557,4 +557,4 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1));
557557
558558__END_DECLS
559559
560#endif /* string.h */
\ No newline at end of file
560#endif /* string.h */
lib/libc/include/generic-glibc/sys/hwprobe.h+29-11
......@@ -21,6 +21,7 @@
2121#define _SYS_HWPROBE_H 1
2222
2323#include <features.h>
24#include <sched.h>
2425#include <stddef.h>
2526#include <errno.h>
2627#ifdef __has_include
......@@ -63,22 +64,39 @@ struct riscv_hwprobe {
6364
6465__BEGIN_DECLS
6566
66extern int __riscv_hwprobe (struct riscv_hwprobe *__pairs, size_t __pair_count,
67 size_t __cpu_count, unsigned long int *__cpus,
67#if defined __cplusplus || !__GNUC_PREREQ (2, 7)
68# define __RISCV_HWPROBE_CPUS_TYPE cpu_set_t *
69#else
70/* The fourth argument to __riscv_hwprobe should be a null pointer or a
71 pointer to a cpu_set_t (either the fixed-size type or allocated with
72 CPU_ALLOC). However, early versions of this header file used the
73 argument type unsigned long int *. The transparent union allows
74 the argument to be either cpu_set_t * or unsigned long int * for
75 compatibility. The older header file requiring unsigned long int *
76 can be identified by the lack of the __RISCV_HWPROBE_CPUS_TYPE macro.
77 In C++ and with compilers that do not support transparent unions, the
78 argument type must be cpu_set_t *. */
79typedef union {
80 cpu_set_t *__cs;
81 unsigned long int *__ul;
82} __RISCV_HWPROBE_CPUS_TYPE __attribute__ ((__transparent_union__));
83# define __RISCV_HWPROBE_CPUS_TYPE __RISCV_HWPROBE_CPUS_TYPE
84#endif
85
86extern int __riscv_hwprobe (struct riscv_hwprobe *__pairs,
87 size_t __pair_count, size_t __cpusetsize,
88 __RISCV_HWPROBE_CPUS_TYPE __cpus,
6889 unsigned int __flags)
69 __nonnull ((1)) __wur
70 __fortified_attr_access (__read_write__, 1, 2)
71 __fortified_attr_access (__read_only__, 4, 3);
90 __THROW __nonnull ((1)) __attr_access ((__read_write__, 1, 2));
7291
73/* A pointer to the __riscv_hwprobe vDSO function is passed as the second
92/* A pointer to the __riscv_hwprobe function is passed as the second
7493 argument to ifunc selector routines. Include a function pointer type for
7594 convenience in calling the function in those settings. */
76typedef int (*__riscv_hwprobe_t) (struct riscv_hwprobe *__pairs, size_t __pair_count,
77 size_t __cpu_count, unsigned long int *__cpus,
95typedef int (*__riscv_hwprobe_t) (struct riscv_hwprobe *__pairs,
96 size_t __pair_count, size_t __cpusetsize,
97 __RISCV_HWPROBE_CPUS_TYPE __cpus,
7898 unsigned int __flags)
79 __nonnull ((1)) __wur
80 __fortified_attr_access (__read_write__, 1, 2)
81 __fortified_attr_access (__read_only__, 4, 3);
99 __nonnull ((1)) __attr_access ((__read_write__, 1, 2));
82100
83101/* Helper function usable from ifunc selectors that probes a single key. */
84102static __inline int
lib/libc/include/generic-glibc/sys/ifunc.h+59-6
......@@ -19,24 +19,77 @@
1919#ifndef _SYS_IFUNC_H
2020#define _SYS_IFUNC_H
2121
22#include <sys/cdefs.h>
23
2224/* A second argument is passed to the ifunc resolver. */
2325#define _IFUNC_ARG_HWCAP (1ULL << 62)
2426
25/* The prototype of a gnu indirect function resolver on AArch64 is
27/* Maximum number of HWCAP elements that are currently supported. */
28#define _IFUNC_HWCAP_MAX 4
29
30/* The prototype of a GNU indirect function resolver on AArch64 is
31
32 ElfW(Addr) ifunc_resolver (uint64_t, const uint64_t *);
33
34 The following prototype is also compatible:
2635
2736 ElfW(Addr) ifunc_resolver (uint64_t, const __ifunc_arg_t *);
2837
29 the first argument should have the _IFUNC_ARG_HWCAP bit set and
30 the remaining bits should match the AT_HWCAP settings. */
38 The first argument might have the _IFUNC_ARG_HWCAP bit set and
39 the remaining bits should match the AT_HWCAP settings.
40
41 If the _IFUNC_ARG_HWCAP bit is set in the first argument, then
42 the second argument is passed to the resolver function. In
43 this case, the second argument is a const pointer to a buffer
44 that allows to access all available HWCAP elements.
45
46 This buffer has its size in bytes at offset 0. The HWCAP elements
47 are available at offsets 8, 16, 24, 32... respectively for AT_HWCAP,
48 AT_HWCAP2, AT_HWCAP3, AT_HWCAP4... (these offsets are multiples of
49 sizeof (unsigned long)).
50
51 Indirect function resolvers must check availability of HWCAP
52 elements at runtime before accessing them using the size of the
53 buffer. */
3154
32/* Second argument to an ifunc resolver. */
3355struct __ifunc_arg_t
3456{
35 unsigned long _size; /* Size of the struct, so it can grow. */
57 unsigned long _size; /* Size of the struct, so it can grow. */
3658 unsigned long _hwcap;
37 unsigned long _hwcap2;
59 unsigned long _hwcap2; /* End of 1st published struct. */
60 unsigned long _hwcap3;
61 unsigned long _hwcap4; /* End of 2nd published struct. */
3862};
3963
4064typedef struct __ifunc_arg_t __ifunc_arg_t;
4165
66/* Constants for IDs of HWCAP elements to be used with the
67 __ifunc_hwcap function below. */
68enum
69{
70 _IFUNC_ARG_AT_HWCAP = 1,
71 _IFUNC_ARG_AT_HWCAP2 = 2,
72 _IFUNC_ARG_AT_HWCAP3 = 3,
73 _IFUNC_ARG_AT_HWCAP4 = 4,
74};
75
76/* A helper function to obtain HWCAP element by its ID from the
77 parameters ARG0 and ARG1 passed to the ifunc resolver. Note that
78 ID 1 corresponds to AT_HWCAP, ID 2 corresponds to AT_HWCAP2, etc.
79 If there is no element available for the requested ID then 0 is
80 returned. If ID doesn't much any supported AT_HWCAP{,2,...} value,
81 then 0 is also returned. */
82static __inline unsigned long __attribute__ ((unused, always_inline))
83__ifunc_hwcap (unsigned long __id,
84 unsigned long __arg0, const unsigned long *__arg1)
85{
86 if (__glibc_likely (__arg0 & _IFUNC_ARG_HWCAP))
87 {
88 const unsigned long size = __arg1[0];
89 const unsigned long offset = __id * sizeof (unsigned long);
90 return offset < size && __id > 0 ? __arg1[__id] : 0;
91 }
92 return __id == 1 ? __arg0 : 0;
93}
94
4295#endif
\ No newline at end of file
lib/libc/include/generic-glibc/sys/mount.h+1-1
......@@ -121,7 +121,7 @@ enum
121121 MS_ACTIVE = 1 << 30,
122122#define MS_ACTIVE MS_ACTIVE
123123#undef MS_NOUSER
124 MS_NOUSER = 1 << 31
124 MS_NOUSER = 1U << 31
125125#define MS_NOUSER MS_NOUSER
126126};
127127
lib/libc/include/generic-glibc/sys/ttychars.h-4
......@@ -54,8 +54,4 @@ struct ttychars {
5454 char tc_lnextc; /* literal next character */
5555};
5656
57#ifdef __USE_OLD_TTY
58#include <sys/ttydefaults.h> /* to pick up character defaults */
59#endif
60
6157#endif /* sys/ttychars.h */
\ No newline at end of file
lib/libc/include/generic-glibc/termio.h deleted-6
......@@ -1,6 +0,0 @@
1/* Compatible <termio.h> for old `struct termio' ioctl interface.
2 This is obsolete; use the POSIX.1 `struct termios' interface
3 defined in <termios.h> instead. */
4
5#include <termios.h>
6#include <sys/ioctl.h>
\ No newline at end of file
lib/libc/include/generic-glibc/termios.h+20
......@@ -61,6 +61,26 @@ extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __THROW;
6161extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW;
6262#endif
6363
64#ifdef __USE_GNU
65/* Interfaces that are explicitly numeric representations of baud rates */
66typedef speed_t baud_t;
67#define BAUD_MAX SPEED_MAX
68
69/* Return the output baud rate stored in *TERMIOS_P. */
70extern baud_t cfgetobaud (const struct termios *__termios_p) __THROW;
71
72/* Return the input baud rate stored in *TERMIOS_P. */
73extern baud_t cfgetibaud (const struct termios *__termios_p) __THROW;
74
75/* Set the output baud rate stored in *TERMIOS_P to BAUD. */
76extern int cfsetobaud (struct termios *__termios_p, baud_t __baud) __THROW;
77
78/* Set the input baud rate stored in *TERMIOS_P to BAUD. */
79extern int cfsetibaud (struct termios *__termios_p, baud_t __baud) __THROW;
80
81/* Set both the input and output baud rates in *TERMIOS_OP to BAUD. */
82extern int cfsetbaud (struct termios *__termios_p, baud_t __baud) __THROW;
83#endif
6484
6585/* Put the state of FD into *TERMIOS_P. */
6686extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW;
lib/libc/include/generic-glibc/tgmath.h+18
......@@ -923,6 +923,24 @@
923923/* Return the cube root of X. */
924924#define cbrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, cbrt)
925925
926#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
927/* Return 1+X to the Y power. */
928# define compoundn(Val1, Val2) \
929 __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, compoundn)
930
931/* Return X to the Y power. */
932# define pown(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, pown)
933
934/* Return X to the Y power. */
935# define powr(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, powr)
936
937/* Return the Yth root of X. */
938# define rootn(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, rootn)
939
940/* Return 1/sqrt(X). */
941# define rsqrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, rsqrt)
942#endif
943
926944
927945/* Nearest integer, absolute value, and remainder functions. */
928946
lib/libc/include/generic-glibc/unistd.h+1-1
......@@ -1231,4 +1231,4 @@ extern int close_range (unsigned int __fd, unsigned int __max_fd,
12311231
12321232__END_DECLS
12331233
1234#endif /* unistd.h */
1234#endif /* unistd.h */
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/ioctl-types.h-12
......@@ -31,18 +31,6 @@ struct winsize
3131 unsigned short int ws_ypixel;
3232 };
3333
34#define NCC 8
35struct termio
36 {
37 unsigned short int c_iflag; /* input mode flags */
38 unsigned short int c_oflag; /* output mode flags */
39 unsigned short int c_cflag; /* control mode flags */
40 unsigned short int c_lflag; /* local mode flags */
41 char c_line; /* line discipline */
42 /* Yes, this is really NCCS. */
43 unsigned char c_cc[32 /* NCCS */]; /* control characters */
44 };
45
4634/* modem lines */
4735#define TIOCM_LE 0x001 /* line enable */
4836#define TIOCM_DTR 0x002 /* data terminal ready */
lib/libc/include/mips-linux-gnu/bits/termios-struct.h deleted-34
......@@ -1,34 +0,0 @@
1/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
21#endif
22
23#define NCCS 32
24struct termios
25 {
26 tcflag_t c_iflag; /* input mode flags */
27 tcflag_t c_oflag; /* output mode flags */
28 tcflag_t c_cflag; /* control mode flags */
29 tcflag_t c_lflag; /* local mode flags */
30 cc_t c_line; /* line discipline */
31 cc_t c_cc[NCCS]; /* control characters */
32#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
33#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
34 };
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h-11
......@@ -32,17 +32,6 @@ struct winsize
3232 unsigned short int ws_ypixel;
3333 };
3434
35#define NCC 10
36struct 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
lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h deleted-45
......@@ -1,45 +0,0 @@
1/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
21#endif
22
23#ifdef __USE_MISC
24# define CBAUD 0000377
25# define CBAUDEX 0000020
26# define CMSPAR 010000000000 /* mark or space (stick) parity */
27# define CRTSCTS 020000000000 /* flow control */
28#endif
29
30#define B57600 00020
31#define B115200 00021
32#define B230400 00022
33#define B460800 00023
34#define B500000 00024
35#define B576000 00025
36#define B921600 00026
37#define B1000000 00027
38#define B1152000 00030
39#define B1500000 00031
40#define B2000000 00032
41#define B2500000 00033
42#define B3000000 00034
43#define B3500000 00035
44#define B4000000 00036
45#define __MAX_BAUD B4000000
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h+3-1
......@@ -35,5 +35,7 @@
3535#define CLOCAL 00100000
3636
3737#ifdef __USE_MISC
38# define ADDRB 04000000000
38# define ADDRB 04000000000
39# define CMSPAR 010000000000 /* Mark or space (stick) parity. */
40# define CRTSCTS 020000000000 /* Flow control. */
3941#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/termios-cbaud.h created+45
......@@ -0,0 +1,45 @@
1/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> instead."
21#endif
22
23#ifdef __USE_MISC
24# define CBAUD 000000377
25# define CBAUDEX 000000020
26# define CIBAUD 077600000
27# define IBSHIFT 16
28#endif
29
30#define __B57600 00020
31#define __B115200 00021
32#define __B230400 00022
33#define __B460800 00023
34#define __B500000 00024
35#define __B576000 00025
36#define __B921600 00026
37#define __B1000000 00027
38#define __B1152000 00030
39#define __B1500000 00031
40#define __B2000000 00032
41#define __B2500000 00033
42#define __B3000000 00034
43#define __B3500000 00035
44#define __B4000000 00036
45#define __BOTHER 00037
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-baud.h deleted-46
......@@ -1,46 +0,0 @@
1/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
21#endif
22
23#ifdef __USE_MISC
24# define CBAUD 0x0000100f
25# define CBAUDEX 0x00001000
26# define CIBAUD 0x100f0000 /* input baud rate (not used) */
27# define CMSPAR 0x40000000 /* mark or space (stick) parity */
28# define CRTSCTS 0x80000000 /* flow control */
29#endif
30
31#define B57600 0x00001001
32#define B115200 0x00001002
33#define B230400 0x00001003
34#define B460800 0x00001004
35#define B76800 0x00001005
36#define B153600 0x00001006
37#define B307200 0x00001007
38#define B614400 0x00001008
39#define B921600 0x00001009
40#define B500000 0x0000100a
41#define B576000 0x0000100b
42#define B1000000 0x0000100c
43#define B1152000 0x0000100d
44#define B1500000 0x0000100e
45#define B2000000 0x0000100f
46#define __MAX_BAUD B2000000
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-cbaud.h created+45
......@@ -0,0 +1,45 @@
1/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> instead."
21#endif
22
23#ifdef __USE_MISC
24# define CBAUD 0x0000100f
25# define CBAUDEX 0x00001000
26# define CIBAUD 0x100f0000 /* input baud rate */
27# define IBSHIFT 16
28#endif
29
30#define __B57600 0x00001001
31#define __B115200 0x00001002
32#define __B230400 0x00001003
33#define __B460800 0x00001004
34#define __B76800 0x00001005
35#define __B153600 0x00001006
36#define __B307200 0x00001007
37#define __B614400 0x00001008
38#define __B921600 0x00001009
39#define __B500000 0x0000100a
40#define __B576000 0x0000100b
41#define __B1000000 0x0000100c
42#define __B1152000 0x0000100d
43#define __B1500000 0x0000100e
44#define __B2000000 0x0000100f
45#define __BOTHER 0x00001000
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-struct.h deleted-34
......@@ -1,34 +0,0 @@
1/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019-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 _TERMIOS_H
20# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
21#endif
22
23#define NCCS 17
24struct termios
25 {
26 tcflag_t c_iflag; /* input mode flags */
27 tcflag_t c_oflag; /* output mode flags */
28 tcflag_t c_cflag; /* control mode flags */
29 tcflag_t c_lflag; /* local mode flags */
30 cc_t c_line; /* line discipline */
31 cc_t c_cc[NCCS]; /* control characters */
32#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
33#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
34 };
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/floatn.h+7-3
......@@ -25,11 +25,15 @@
2525 floating-point type with the IEEE 754 binary128 format, and this
2626 glibc includes corresponding *f128 interfaces for it. The required
2727 libgcc support was added some time after the basic compiler
28 support, for x86_64 and x86. */
28 support, for x86_64 and x86. Intel SYCL compiler doesn't support
29 _Float128: https://github.com/intel/llvm/issues/16903
30 */
2931#if (defined __x86_64__ \
3032 ? __GNUC_PREREQ (4, 3) \
3133 : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \
32 || __glibc_clang_prereq (3, 4)
34 || (__glibc_clang_prereq (3, 9) \
35 && (!defined __INTEL_LLVM_COMPILER \
36 || !defined SYCL_LANGUAGE_VERSION))
3337# define __HAVE_FLOAT128 1
3438#else
3539# define __HAVE_FLOAT128 0
......@@ -89,7 +93,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
8993/* The type _Float128 exists only since GCC 7.0. */
9094# if !__GNUC_PREREQ (7, 0) \
9195 || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) \
92 || __glibc_clang_prereq (3, 4)
96 || __glibc_clang_prereq (3, 9)
9397typedef __float128 _Float128;
9498# endif
9599