authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-08 21:48:54-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-08-08 21:48:54-07:00
log9f46abf598a1bc27aa42a96aa6d94f3112fa210b
tree9395c6008212c54821a94b1a814ff6f3d265ea7e
parent2cfad202045632945b5007e1d42c2f8a326be44a
parent21ff35590c8c66c9054c53b2ccc4f6f2fd738115
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #20993 from alexrp/glibc-2-40

glibc 2.40

353 files changed, 8673 insertions(+), 2406 deletions(-)

lib/libc/glibc/bits/libc-header-start.h+18-18
......@@ -44,23 +44,23 @@
4444
4545/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
4646 macro. Most but not all symbols enabled by that macro in TS
47 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
47 18661-1 are enabled unconditionally in C23. In C23, the symbols in
4848 Annex F still require a new feature test macro
49 __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
49 __STDC_WANT_IEC_60559_EXT__ instead (C23 does not define
5050 __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
51 18661-1 are not included in C2X (and thus should depend on
52 __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
51 18661-1 are not included in C23 (and thus should depend on
52 __STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are
5353 enabled).
5454
5555 __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
56 18661-1 not included in C2X.
56 18661-1 not included in C23.
5757
58 __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
59 18661-1 that are also included in C2X (with no feature test macro
60 required in C2X).
58 __GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS
59 18661-1 that are also included in C23 (with no feature test macro
60 required in C23).
6161
6262 __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
63 that are included in C2X but conditional on
63 that are included in C23 but conditional on
6464 __STDC_WANT_IEC_60559_EXT__. (There are currently no features
6565 conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
6666 18661-1.) */
......@@ -70,11 +70,11 @@
7070#else
7171# define __GLIBC_USE_IEC_60559_BFP_EXT 0
7272#endif
73#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
74#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
75# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
73#undef __GLIBC_USE_IEC_60559_BFP_EXT_C23
74#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23)
75# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1
7676#else
77# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
77# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0
7878#endif
7979#undef __GLIBC_USE_IEC_60559_EXT
8080#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
......@@ -86,18 +86,18 @@
8686/* ISO/IEC TS 18661-4:2015 defines the
8787 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
8888 functions, the symbols from this TS are enabled unconditionally in
89 C2X. */
89 C23. */
9090#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
9191#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
9292# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
9393#else
9494# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
9595#endif
96#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
97#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
98# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
96#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23
97#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23)
98# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1
9999#else
100# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
100# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0
101101#endif
102102
103103/* ISO/IEC TS 18661-3:2015 defines the
lib/libc/glibc/elf/elf.h+32-1
......@@ -831,6 +831,10 @@ typedef struct
831831 control. */
832832#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
833833 enabled keys. */
834#define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers. */
835#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
836#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
837#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
834838#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
835839#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
836840#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
......@@ -1234,6 +1238,10 @@ typedef struct
12341238#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */
12351239#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */
12361240
1241/* More machine-dependent hints about processor capabilities. */
1242#define AT_HWCAP3 29 /* extension of AT_HWCAP. */
1243#define AT_HWCAP4 30 /* extension of AT_HWCAP. */
1244
12371245#define AT_EXECFN 31 /* Filename of executable. */
12381246
12391247/* Pointer to the global system page used for system calls and other
......@@ -1333,9 +1341,13 @@ typedef struct
13331341#define NT_GNU_PROPERTY_TYPE_0 5
13341342
13351343/* Packaging metadata as defined on
1336 https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
1344 https://systemd.io/ELF_PACKAGE_METADATA/ */
13371345#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
13381346
1347/* dlopen metadata as defined on
1348 https://systemd.io/ELF_DLOPEN_METADATA/ */
1349#define NT_FDO_DLOPEN_METADATA 0x407c0c0a
1350
13391351/* Note section name of program property. */
13401352#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
13411353
......@@ -4237,6 +4249,8 @@ enum
42374249#define R_LARCH_TLS_TPREL32 10
42384250#define R_LARCH_TLS_TPREL64 11
42394251#define R_LARCH_IRELATIVE 12
4252#define R_LARCH_TLS_DESC32 13
4253#define R_LARCH_TLS_DESC64 14
42404254
42414255/* Reserved for future relocs that the dynamic linker must understand. */
42424256
......@@ -4331,6 +4345,23 @@ enum
43314345#define R_LARCH_ADD_ULEB128 107
43324346#define R_LARCH_SUB_ULEB128 108
43334347#define R_LARCH_64_PCREL 109
4348#define R_LARCH_CALL36 110
4349#define R_LARCH_TLS_DESC_PC_HI20 111
4350#define R_LARCH_TLS_DESC_PC_LO12 112
4351#define R_LARCH_TLS_DESC64_PC_LO20 113
4352#define R_LARCH_TLS_DESC64_PC_HI12 114
4353#define R_LARCH_TLS_DESC_HI20 115
4354#define R_LARCH_TLS_DESC_LO12 116
4355#define R_LARCH_TLS_DESC64_LO20 117
4356#define R_LARCH_TLS_DESC64_HI12 118
4357#define R_LARCH_TLS_DESC_LD 119
4358#define R_LARCH_TLS_DESC_CALL 120
4359#define R_LARCH_TLS_LE_HI20_R 121
4360#define R_LARCH_TLS_LE_ADD_R 122
4361#define R_LARCH_TLS_LE_LO12_R 123
4362#define R_LARCH_TLS_LD_PCREL20_S2 124
4363#define R_LARCH_TLS_GD_PCREL20_S2 125
4364#define R_LARCH_TLS_DESC_PCREL20_S2 126
43344365
43354366/* ARC specific declarations. */
43364367
lib/libc/glibc/include/libc-symbols.h+17-11
......@@ -679,9 +679,9 @@ for linking")
679679#endif
680680
681681/* Helper / base macros for indirect function symbols. */
682#define __ifunc_resolver(type_name, name, expr, arg, init, classifier) \
682#define __ifunc_resolver(type_name, name, expr, init, classifier, ...) \
683683 classifier inhibit_stack_protector \
684 __typeof (type_name) *name##_ifunc (arg) \
684 __typeof (type_name) *name##_ifunc (__VA_ARGS__) \
685685 { \
686686 init (); \
687687 __typeof (type_name) *res = expr; \
......@@ -689,13 +689,13 @@ for linking")
689689 }
690690
691691#ifdef HAVE_GCC_IFUNC
692# define __ifunc(type_name, name, expr, arg, init) \
692# define __ifunc_args(type_name, name, expr, init, ...) \
693693 extern __typeof (type_name) name __attribute__ \
694694 ((ifunc (#name "_ifunc"))); \
695 __ifunc_resolver (type_name, name, expr, arg, init, static)
695 __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__)
696696
697# define __ifunc_hidden(type_name, name, expr, arg, init) \
698 __ifunc (type_name, name, expr, arg, init)
697# define __ifunc_args_hidden(type_name, name, expr, init, ...) \
698 __ifunc_args (type_name, name, expr, init, __VA_ARGS__)
699699#else
700700/* Gcc does not support __attribute__ ((ifunc (...))). Use the old behaviour
701701 as fallback. But keep in mind that the debug information for the ifunc
......@@ -706,18 +706,24 @@ for linking")
706706 different signatures. (Gcc support is disabled at least on a ppc64le
707707 Ubuntu 14.04 system.) */
708708
709# define __ifunc(type_name, name, expr, arg, init) \
709# define __ifunc_args(type_name, name, expr, init, ...) \
710710 extern __typeof (type_name) name; \
711 __typeof (type_name) *name##_ifunc (arg) __asm__ (#name); \
712 __ifunc_resolver (type_name, name, expr, arg, init,) \
711 __typeof (type_name) *name##_ifunc (__VA_ARGS__) __asm__ (#name); \
712 __ifunc_resolver (type_name, name, expr, init, , __VA_ARGS__) \
713713 __asm__ (".type " #name ", %gnu_indirect_function");
714714
715# define __ifunc_hidden(type_name, name, expr, arg, init) \
715# define __ifunc_args_hidden(type_name, name, expr, init, ...) \
716716 extern __typeof (type_name) __libc_##name; \
717 __ifunc (type_name, __libc_##name, expr, arg, init) \
717 __ifunc (type_name, __libc_##name, expr, __VA_ARGS__, init) \
718718 strong_alias (__libc_##name, name);
719719#endif /* !HAVE_GCC_IFUNC */
720720
721#define __ifunc(type_name, name, expr, arg, init) \
722 __ifunc_args (type_name, name, expr, init, arg)
723
724#define __ifunc_hidden(type_name, name, expr, arg, init) \
725 __ifunc_args_hidden (type_name, name, expr, init, arg)
726
721727/* The following macros are used for indirect function symbols in libc.so.
722728 First of all, you need to have the function prototyped somewhere,
723729 say in foo.h:
lib/libc/glibc/include/stdlib.h+2-2
......@@ -53,8 +53,8 @@ libc_hidden_proto (__isoc23_strtoul_l)
5353libc_hidden_proto (__isoc23_strtoll_l)
5454libc_hidden_proto (__isoc23_strtoull_l)
5555
56#if __GLIBC_USE (C2X_STRTOL)
57/* Redirect internal uses of these functions to the C2X versions; the
56#if __GLIBC_USE (C23_STRTOL)
57/* Redirect internal uses of these functions to the C23 versions; the
5858 redirection in the installed header does not work with
5959 libc_hidden_proto. */
6060# undef strtol
lib/libc/glibc/io/fcntl.h+3-4
......@@ -176,7 +176,7 @@ typedef __pid_t pid_t;
176176
177177 This function is a cancellation point and therefore not marked with
178178 __THROW. */
179#ifndef __USE_TIME_BITS64
179#ifndef __USE_TIME64_REDIRECTS
180180# ifndef __USE_FILE_OFFSET64
181181extern int fcntl (int __fd, int __cmd, ...);
182182# else
......@@ -189,7 +189,7 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
189189# ifdef __USE_LARGEFILE64
190190extern int fcntl64 (int __fd, int __cmd, ...);
191191# endif
192#else /* __USE_TIME_BITS64 */
192#else /* __USE_TIME64_REDIRECTS */
193193# ifdef __REDIRECT
194194extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...),
195195 __fcntl_time64);
......@@ -344,8 +344,7 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
344344
345345
346346/* Define some inlines helping to catch common problems. */
347#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
348 && defined __va_arg_pack_len
347#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
349348# include <bits/fcntl2.h>
350349#endif
351350
lib/libc/glibc/io/sys/stat.h+8-8
......@@ -209,7 +209,7 @@ extern int stat (const char *__restrict __file,
209209 that file descriptor FD is open on and put them in BUF. */
210210extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
211211#else
212# ifdef __USE_TIME_BITS64
212# ifdef __USE_TIME64_REDIRECTS
213213# ifdef __REDIRECT_NTH
214214extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
215215 struct stat *__restrict __buf),
......@@ -236,7 +236,7 @@ extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
236236# endif
237237#endif
238238#ifdef __USE_LARGEFILE64
239# ifndef __USE_TIME_BITS64
239# ifndef __USE_TIME64_REDIRECTS
240240extern int stat64 (const char *__restrict __file,
241241 struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
242242extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
......@@ -265,7 +265,7 @@ extern int fstatat (int __fd, const char *__restrict __file,
265265 struct stat *__restrict __buf, int __flag)
266266 __THROW __nonnull ((2, 3));
267267# else
268# ifdef __USE_TIME_BITS64
268# ifdef __USE_TIME64_REDIRECTS
269269# ifdef __REDIRECT_NTH
270270extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
271271 struct stat *__restrict __buf,
......@@ -287,7 +287,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
287287# endif
288288
289289# ifdef __USE_LARGEFILE64
290# ifndef __USE_TIME_BITS64
290# ifndef __USE_TIME64_REDIRECTS
291291extern int fstatat64 (int __fd, const char *__restrict __file,
292292 struct stat64 *__restrict __buf, int __flag)
293293 __THROW __nonnull ((2, 3));
......@@ -313,7 +313,7 @@ extern int __REDIRECT_NTH (fstatat64, (int __fd,
313313extern int lstat (const char *__restrict __file,
314314 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
315315# else
316# ifdef __USE_TIME_BITS64
316# ifdef __USE_TIME64_REDIRECTS
317317# ifdef __REDIRECT_NTH
318318extern int __REDIRECT_NTH (lstat,
319319 (const char *__restrict __file,
......@@ -334,7 +334,7 @@ extern int __REDIRECT_NTH (lstat,
334334# endif
335335# endif
336336# ifdef __USE_LARGEFILE64
337# ifndef __USE_TIME_BITS64
337# ifndef __USE_TIME64_REDIRECTS
338338extern int lstat64 (const char *__restrict __file,
339339 struct stat64 *__restrict __buf)
340340 __THROW __nonnull ((1, 2));
......@@ -427,7 +427,7 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
427427#endif
428428
429429#ifdef __USE_ATFILE
430# ifndef __USE_TIME_BITS64
430# ifndef __USE_TIME64_REDIRECTS
431431/* Set file access and modification times relative to directory file
432432 descriptor. */
433433extern int utimensat (int __fd, const char *__path,
......@@ -447,7 +447,7 @@ extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path,
447447#endif
448448
449449#ifdef __USE_XOPEN2K8
450# ifndef __USE_TIME_BITS64
450# ifndef __USE_TIME64_REDIRECTS
451451/* Set file access and modification times of the file associated with FD. */
452452extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
453453
lib/libc/glibc/misc/sys/cdefs.h+168-5
......@@ -145,6 +145,14 @@
145145#endif
146146
147147
148/* The overloadable attribute was added on clang 2.6. */
149#if defined __clang_major__ \
150 && (__clang_major__ + (__clang_minor__ >= 6) > 2)
151# define __attribute_overloadable__ __attribute__((__overloadable__))
152#else
153# define __attribute_overloadable__
154#endif
155
148156/* Fortify support. */
149157#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
150158#define __bos0(ptr) __builtin_object_size (ptr, 0)
......@@ -187,27 +195,173 @@
187195 __s, __osz)) \
188196 && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
189197
198/* To correctly instrument the fortify wrapper clang requires the
199 pass_object_size attribute, and the attribute has the restriction that the
200 argument needs to be 'const'. Furthermore, to make it usable with C
201 interfaces, clang provides the overload attribute, which provides a C++
202 like function overload support. The overloaded fortify wrapper with the
203 pass_object_size attribute has precedence over the default symbol.
204
205 Also, clang does not support __va_arg_pack, so variadic functions are
206 expanded to issue va_arg implementations. The error function must not have
207 bodies (address takes are expanded to nonfortified calls), and with
208 __fortify_function compiler might still create a body with the C++
209 mangling name (due to the overload attribute). In this case, the function
210 is defined with __fortify_function_error_function macro instead.
211
212 The argument size check is also done with a clang-only attribute,
213 __attribute__ ((__diagnose_if__ (...))), different than gcc which calls
214 symbol_chk_warn alias with uses __warnattr attribute.
215
216 The pass_object_size was added on clang 4.0, __diagnose_if__ on 5.0,
217 and pass_dynamic_object_size on 9.0. */
218#if defined __clang_major__ && __clang_major__ >= 5
219# define __fortify_use_clang 1
220
221# define __fortify_function_error_function static __attribute__((__unused__))
222
223# define __fortify_clang_pass_object_size_n(n) \
224 __attribute__ ((__pass_object_size__ (n)))
225# define __fortify_clang_pass_object_size0 \
226 __fortify_clang_pass_object_size_n (0)
227# define __fortify_clang_pass_object_size \
228 __fortify_clang_pass_object_size_n (__USE_FORTIFY_LEVEL > 1)
229
230# if __clang_major__ >= 9
231# define __fortify_clang_pass_dynamic_object_size_n(n) \
232 __attribute__ ((__pass_dynamic_object_size__ (n)))
233# define __fortify_clang_pass_dynamic_object_size0 \
234 __fortify_clang_pass_dynamic_object_size_n (0)
235# define __fortify_clang_pass_dynamic_object_size \
236 __fortify_clang_pass_dynamic_object_size_n (1)
237# else
238# define __fortify_clang_pass_dynamic_object_size_n(n)
239# define __fortify_clang_pass_dynamic_object_size0
240# define __fortify_clang_pass_dynamic_object_size
241# endif
242
243# define __fortify_clang_bos_static_lt_impl(bos_val, n, s) \
244 ((bos_val) != -1ULL && (n) > (bos_val) / (s))
245# define __fortify_clang_bos_static_lt2(__n, __e, __s) \
246 __fortify_clang_bos_static_lt_impl (__bos (__e), __n, __s)
247# define __fortify_clang_bos_static_lt(__n, __e) \
248 __fortify_clang_bos_static_lt2 (__n, __e, 1)
249# define __fortify_clang_bos0_static_lt2(__n, __e, __s) \
250 __fortify_clang_bos_static_lt_impl (__bos0 (__e), __n, __s)
251# define __fortify_clang_bos0_static_lt(__n, __e) \
252 __fortify_clang_bos0_static_lt2 (__n, __e, 1)
253
254# define __fortify_clang_bosn_args(bos_fn, n, buf, div, complaint) \
255 (__fortify_clang_bos_static_lt_impl (bos_fn (buf), n, div)), (complaint), \
256 "warning"
257
258# define __fortify_clang_warning(__c, __msg) \
259 __attribute__ ((__diagnose_if__ ((__c), (__msg), "warning")))
260# define __fortify_clang_error(__c, __msg) \
261 __attribute__ ((__diagnose_if__ ((__c), (__msg), "error")))
262# define __fortify_clang_warning_only_if_bos0_lt(n, buf, complaint) \
263 __attribute__ ((__diagnose_if__ \
264 (__fortify_clang_bosn_args (__bos0, n, buf, 1, complaint))))
265# define __fortify_clang_warning_only_if_bos0_lt2(n, buf, div, complaint) \
266 __attribute__ ((__diagnose_if__ \
267 (__fortify_clang_bosn_args (__bos0, n, buf, div, complaint))))
268# define __fortify_clang_warning_only_if_bos_lt(n, buf, complaint) \
269 __attribute__ ((__diagnose_if__ \
270 (__fortify_clang_bosn_args (__bos, n, buf, 1, complaint))))
271# define __fortify_clang_warning_only_if_bos_lt2(n, buf, div, complaint) \
272 __attribute__ ((__diagnose_if__ \
273 (__fortify_clang_bosn_args (__bos, n, buf, div, complaint))))
274
275# define __fortify_clang_prefer_this_overload \
276 __attribute__ ((enable_if (1, "")))
277# define __fortify_clang_unavailable(__msg) \
278 __attribute__ ((unavailable(__msg)))
279
280# if __USE_FORTIFY_LEVEL == 3
281# define __fortify_clang_overload_arg(__type, __attr, __name) \
282 __type __attr const __fortify_clang_pass_dynamic_object_size __name
283# define __fortify_clang_overload_arg0(__type, __attr, __name) \
284 __type __attr const __fortify_clang_pass_dynamic_object_size0 __name
285# else
286# define __fortify_clang_overload_arg(__type, __attr, __name) \
287 __type __attr const __fortify_clang_pass_object_size __name
288# define __fortify_clang_overload_arg0(__type, __attr, __name) \
289 __type __attr const __fortify_clang_pass_object_size0 __name
290# endif
291
292# define __fortify_clang_mul_may_overflow(size, n) \
293 ((size | n) >= (((size_t)1) << (8 * sizeof (size_t) / 2)))
294
295# define __fortify_clang_size_too_small(__bos, __dest, __len) \
296 (__bos (__dest) != (size_t) -1 && __bos (__dest) < __len)
297# define __fortify_clang_warn_if_src_too_large(__dest, __src) \
298 __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize, \
299 __dest, \
300 __builtin_strlen (__src) + 1), \
301 "destination buffer will always be overflown by source")
302# define __fortify_clang_warn_if_dest_too_small(__dest, __len) \
303 __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize, \
304 __dest, \
305 __len), \
306 "function called with bigger length than the destination buffer")
307# define __fortify_clang_warn_if_dest_too_small0(__dest, __len) \
308 __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize0, \
309 __dest, \
310 __len), \
311 "function called with bigger length than the destination buffer")
312#else
313# define __fortify_use_clang 0
314# define __fortify_clang_warning(__c, __msg)
315# define __fortify_clang_warning_only_if_bos0_lt(__n, __buf, __complaint)
316# define __fortify_clang_warning_only_if_bos0_lt2(__n, __buf, __div, complaint)
317# define __fortify_clang_warning_only_if_bos_lt(__n, __buf, __complaint)
318# define __fortify_clang_warning_only_if_bos_lt2(__n, __buf, div, __complaint)
319# define __fortify_clang_overload_arg(__type, __attr, __name) \
320 __type __attr __name
321# define __fortify_clang_overload_arg0(__type, __attr, __name) \
322 __fortify_clang_overload_arg (__type, __attr, __name)
323# define __fortify_clang_warn_if_src_too_large(__dest, __src)
324# define __fortify_clang_warn_if_dest_too_small(__dest, __len)
325# define __fortify_clang_warn_if_dest_too_small0(__dest, __len)
326#endif
327
328
190329/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
191330 declared. */
192331
193#define __glibc_fortify(f, __l, __s, __osz, ...) \
332#if !__fortify_use_clang
333# define __glibc_fortify(f, __l, __s, __osz, ...) \
194334 (__glibc_safe_or_unknown_len (__l, __s, __osz) \
195335 ? __ ## f ## _alias (__VA_ARGS__) \
196336 : (__glibc_unsafe_len (__l, __s, __osz) \
197337 ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
198338 : __ ## f ## _chk (__VA_ARGS__, __osz)))
339#else
340# define __glibc_fortify(f, __l, __s, __osz, ...) \
341 (__osz == (__SIZE_TYPE__) -1) \
342 ? __ ## f ## _alias (__VA_ARGS__) \
343 : __ ## f ## _chk (__VA_ARGS__, __osz)
344#endif
199345
200346/* Fortify function f, where object size argument passed to f is the number of
201347 elements and not total size. */
202348
203#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
349#if !__fortify_use_clang
350# define __glibc_fortify_n(f, __l, __s, __osz, ...) \
204351 (__glibc_safe_or_unknown_len (__l, __s, __osz) \
205352 ? __ ## f ## _alias (__VA_ARGS__) \
206353 : (__glibc_unsafe_len (__l, __s, __osz) \
207354 ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
208355 : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))
356# else
357# define __glibc_fortify_n(f, __l, __s, __osz, ...) \
358 (__osz == (__SIZE_TYPE__) -1) \
359 ? __ ## f ## _alias (__VA_ARGS__) \
360 : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))
209361#endif
210362
363#endif /* __USE_FORTIFY_LEVEL > 0 */
364
211365#if __GNUC_PREREQ (4,3)
212366# define __warnattr(msg) __attribute__((__warning__ (msg)))
213367# define __errordecl(name, msg) \
......@@ -683,10 +837,10 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
683837# define __attr_access(x) __attribute__ ((__access__ x))
684838/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
685839 use the access attribute to get object sizes from function definition
686 arguments, so we can't use them on functions we fortify. Drop the object
687 size hints for such functions. */
840 arguments, so we can't use them on functions we fortify. Drop the access
841 attribute for such functions. */
688842# if __USE_FORTIFY_LEVEL == 3
689# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o)))
843# define __fortified_attr_access(a, o, s)
690844# else
691845# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s))
692846# endif
......@@ -720,4 +874,13 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
720874# define __attribute_returns_twice__ /* Ignore. */
721875#endif
722876
877/* Mark struct types as aliasable. Restricted to compilers that
878 support forward declarations of structs in the presence of the
879 attribute. */
880#if __GNUC_PREREQ (7, 1) || defined __clang__
881# define __attribute_struct_may_alias__ __attribute__ ((__may_alias__))
882#else
883# define __attribute_struct_may_alias__
884#endif
885
723886#endif /* sys/cdefs.h */
lib/libc/glibc/misc/sys/select.h+2-2
......@@ -98,7 +98,7 @@ __BEGIN_DECLS
9898
9999 This function is a cancellation point and therefore not marked with
100100 __THROW. */
101#ifndef __USE_TIME_BITS64
101#ifndef __USE_TIME64_REDIRECTS
102102extern int select (int __nfds, fd_set *__restrict __readfds,
103103 fd_set *__restrict __writefds,
104104 fd_set *__restrict __exceptfds,
......@@ -123,7 +123,7 @@ extern int __REDIRECT (select,
123123
124124 This function is a cancellation point and therefore not marked with
125125 __THROW. */
126# ifndef __USE_TIME_BITS64
126# ifndef __USE_TIME64_REDIRECTS
127127extern int pselect (int __nfds, fd_set *__restrict __readfds,
128128 fd_set *__restrict __writefds,
129129 fd_set *__restrict __exceptfds,
lib/libc/glibc/signal/signal.h+1-1
......@@ -269,7 +269,7 @@ extern int sigwaitinfo (const sigset_t *__restrict __set,
269269
270270 This function is a cancellation point and therefore not marked with
271271 __THROW. */
272# ifndef __USE_TIME_BITS64
272# ifndef __USE_TIME64_REDIRECTS
273273extern int sigtimedwait (const sigset_t *__restrict __set,
274274 siginfo_t *__restrict __info,
275275 const struct timespec *__restrict __timeout)
lib/libc/glibc/stdlib/stdlib.h+3-3
......@@ -210,7 +210,7 @@ extern unsigned long long int strtoull (const char *__restrict __nptr,
210210
211211/* Versions of the above functions that handle '0b' and '0B' prefixes
212212 in base 0 or 2. */
213#if __GLIBC_USE (C2X_STRTOL)
213#if __GLIBC_USE (C23_STRTOL)
214214# ifdef __REDIRECT
215215extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr,
216216 char **__restrict __endptr,
......@@ -274,7 +274,7 @@ extern unsigned long long int __isoc23_strtoull (const char *__restrict __nptr,
274274#endif
275275
276276/* Convert a floating-point number to a string. */
277#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
277#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
278278extern int strfromd (char *__dest, size_t __size, const char *__format,
279279 double __f)
280280 __THROW __nonnull ((3));
......@@ -360,7 +360,7 @@ extern unsigned long long int strtoull_l (const char *__restrict __nptr,
360360
361361/* Versions of the above functions that handle '0b' and '0B' prefixes
362362 in base 0 or 2. */
363# if __GLIBC_USE (C2X_STRTOL)
363# if __GLIBC_USE (C23_STRTOL)
364364# ifdef __REDIRECT
365365extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr,
366366 char **__restrict __endptr,
lib/libc/glibc/sysdeps/htl/pthread.h+11
......@@ -891,6 +891,17 @@ extern int pthread_setschedparam (pthread_t __thr, int __policy,
891891/* Set thread THREAD's scheduling priority. */
892892extern int pthread_setschedprio (pthread_t __thr, int __prio) __THROW;
893893
894#ifdef __USE_GNU
895/* Get thread name visible in the kernel and its interfaces. */
896extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
897 size_t __buflen)
898 __THROW __nonnull ((2)) __attr_access ((__write_only__, 2));
899
900/* Set thread name visible in the kernel and its interfaces. */
901extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
902 __THROW __nonnull ((2)) __attr_access ((__read_only__, 2));
903#endif
904
894905#ifdef __USE_GNU
895906/* Yield the processor to another thread or process.
896907 This function is similar to the POSIX `sched_yield' function but
lib/libc/glibc/sysdeps/nptl/pthread.h+9-9
......@@ -223,7 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);
223223 the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
224224extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
225225
226# ifndef __USE_TIME_BITS64
226# ifndef __USE_TIME64_REDIRECTS
227227/* Make calling thread wait for termination of the thread TH, but only
228228 until TIMEOUT. The exit status of the thread is stored in
229229 *THREAD_RETURN, if THREAD_RETURN is not NULL.
......@@ -796,7 +796,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
796796
797797#ifdef __USE_XOPEN2K
798798/* Wait until lock becomes available, or specified time passes. */
799# ifndef __USE_TIME_BITS64
799# ifndef __USE_TIME64_REDIRECTS
800800extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
801801 const struct timespec *__restrict
802802 __abstime) __THROWNL __nonnull ((1, 2));
......@@ -813,7 +813,7 @@ extern int __REDIRECT_NTHNL (pthread_mutex_timedlock,
813813#endif
814814
815815#ifdef __USE_GNU
816# ifndef __USE_TIME_BITS64
816# ifndef __USE_TIME64_REDIRECTS
817817extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
818818 clockid_t __clockid,
819819 const struct timespec *__restrict
......@@ -982,7 +982,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
982982
983983# ifdef __USE_XOPEN2K
984984/* Try to acquire read lock for RWLOCK or return after specified time. */
985# ifndef __USE_TIME_BITS64
985# ifndef __USE_TIME64_REDIRECTS
986986extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
987987 const struct timespec *__restrict
988988 __abstime) __THROWNL __nonnull ((1, 2));
......@@ -1000,7 +1000,7 @@ extern int __REDIRECT_NTHNL (pthread_rwlock_timedrdlock,
10001000# endif
10011001
10021002# ifdef __USE_GNU
1003# ifndef __USE_TIME_BITS64
1003# ifndef __USE_TIME64_REDIRECTS
10041004extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
10051005 clockid_t __clockid,
10061006 const struct timespec *__restrict
......@@ -1029,7 +1029,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
10291029
10301030# ifdef __USE_XOPEN2K
10311031/* Try to acquire write lock for RWLOCK or return after specified time. */
1032# ifndef __USE_TIME_BITS64
1032# ifndef __USE_TIME64_REDIRECTS
10331033extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
10341034 const struct timespec *__restrict
10351035 __abstime) __THROWNL __nonnull ((1, 2));
......@@ -1047,7 +1047,7 @@ extern int __REDIRECT_NTHNL (pthread_rwlock_timedwrlock,
10471047# endif
10481048
10491049# ifdef __USE_GNU
1050# ifndef __USE_TIME_BITS64
1050# ifndef __USE_TIME64_REDIRECTS
10511051extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
10521052 clockid_t __clockid,
10531053 const struct timespec *__restrict
......@@ -1141,7 +1141,7 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
11411141
11421142 This function is a cancellation point and therefore not marked with
11431143 __THROW. */
1144# ifndef __USE_TIME_BITS64
1144# ifndef __USE_TIME64_REDIRECTS
11451145extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
11461146 pthread_mutex_t *__restrict __mutex,
11471147 const struct timespec *__restrict __abstime)
......@@ -1167,7 +1167,7 @@ extern int __REDIRECT (pthread_cond_timedwait,
11671167
11681168 This function is a cancellation point and therefore not marked with
11691169 __THROW. */
1170# ifndef __USE_TIME_BITS64
1170# ifndef __USE_TIME64_REDIRECTS
11711171extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
11721172 pthread_mutex_t *__restrict __mutex,
11731173 __clockid_t __clock_id,
lib/libc/glibc/sysdeps/unix/sysv/linux/bits/timex.h+1-1
......@@ -25,7 +25,7 @@
2525
2626struct timex
2727{
28# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32)
28# if defined __USE_TIME64_REDIRECTS || (__TIMESIZE == 64 && __WORDSIZE == 32)
2929 unsigned int modes; /* mode selector */
3030 int :32; /* pad */
3131 long long offset; /* time offset (usec) */
lib/libc/glibc/sysdeps/unix/sysv/linux/hppa/sysdep.h+9
......@@ -468,6 +468,15 @@ L(pre_end): ASM_LINE_SEP \
468468#define CLOB_ARGS_1 CLOB_ARGS_2, "%r25"
469469#define CLOB_ARGS_0 CLOB_ARGS_1, "%r26"
470470
471#define VDSO_NAME "LINUX_6.11"
472#define VDSO_HASH 182951793
473
474#ifdef __LP64__
475# define HAVE_CLOCK_GETTIME_VSYSCALL "__vdso_clock_gettime"
476#else
477# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
478#endif /* __LP64__ */
479
471480#endif /* __ASSEMBLER__ */
472481
473482#endif /* _LINUX_HPPA_SYSDEP_H */
lib/libc/glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h+1
......@@ -156,6 +156,7 @@
156156/* List of system calls which are supported as vsyscalls (for RV32 and
157157 RV64). */
158158# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
159# define HAVE_RISCV_HWPROBE "__vdso_riscv_hwprobe"
159160
160161# undef HAVE_INTERNAL_BRK_ADDR_SYMBOL
161162# define HAVE_INTERNAL_BRK_ADDR_SYMBOL 1
lib/libc/glibc/sysdeps/unix/sysv/linux/sys/timex.h+1-1
......@@ -54,7 +54,7 @@ struct ntptimeval
5454
5555__BEGIN_DECLS
5656
57#ifndef __USE_TIME_BITS64
57#ifndef __USE_TIME64_REDIRECTS
5858extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1));
5959extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW __nonnull ((1));
6060
lib/libc/glibc/sysdeps/x86/bits/wordsize.h+2-3
......@@ -8,10 +8,9 @@
88#define __WORDSIZE32_PTRDIFF_LONG 0
99#endif
1010
11#define __WORDSIZE_TIME64_COMPAT32 1
12
1113#ifdef __x86_64__
12# define __WORDSIZE_TIME64_COMPAT32 1
1314/* Both x86-64 and x32 use the 64-bit system call interface. */
1415# define __SYSCALL_WORDSIZE 64
15#else
16# define __WORDSIZE_TIME64_COMPAT32 0
1716#endif
lib/libc/glibc/sysdeps/x86/sysdep.h+109-5
......@@ -21,14 +21,118 @@
2121
2222#include <sysdeps/generic/sysdep.h>
2323
24/* The extended state feature IDs in the state component bitmap. */
25#define X86_XSTATE_X87_ID 0
26#define X86_XSTATE_SSE_ID 1
27#define X86_XSTATE_AVX_ID 2
28#define X86_XSTATE_BNDREGS_ID 3
29#define X86_XSTATE_BNDCFG_ID 4
30#define X86_XSTATE_K_ID 5
31#define X86_XSTATE_ZMM_H_ID 6
32#define X86_XSTATE_ZMM_ID 7
33#define X86_XSTATE_PKRU_ID 9
34#define X86_XSTATE_TILECFG_ID 17
35#define X86_XSTATE_TILEDATA_ID 18
36#define X86_XSTATE_APX_F_ID 19
37
38#ifdef __x86_64__
2439/* Offset for fxsave/xsave area used by _dl_runtime_resolve. Also need
2540 space to preserve RCX, RDX, RSI, RDI, R8, R9 and RAX. It must be
26 aligned to 16 bytes for fxsave and 64 bytes for xsave. */
27#define STATE_SAVE_OFFSET (8 * 7 + 8)
41 aligned to 16 bytes for fxsave and 64 bytes for xsave. It is non-zero
42 because MOV, instead of PUSH, is used to save registers onto stack.
43
44 +==================+<- stack frame start aligned at 8 or 16 bytes
45 | |<- paddings for stack realignment of 64 bytes
46 |------------------|<- xsave buffer end aligned at 64 bytes
47 | |<-
48 | |<-
49 | |<-
50 |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp)
51 | |<- 8-byte padding for 64-byte alignment
52 | |<- R9
53 | |<- R8
54 | |<- RDI
55 | |<- RSI
56 | |<- RDX
57 | |<- RCX
58 | |<- RAX
59 +==================+<- RSP aligned at 64 bytes
60
61 */
62# define STATE_SAVE_OFFSET (8 * 7 + 8)
63
64/* _dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning
65 stack. After realigning stack, it saves RCX, RDX, R8, R9, R10 and
66 R11. Allocate space for RDI, RSI and RBX to avoid clobbering saved
67 RDI, RSI and RBX values on stack by xsave.
68
69 +==================+<- stack frame start aligned at 8 or 16 bytes
70 | |<- RDI saved in the red zone
71 | |<- RSI saved in the red zone
72 | |<- RBX saved in the red zone
73 | |<- paddings for stack realignment of 64 bytes
74 |------------------|<- xsave buffer end aligned at 64 bytes
75 | |<-
76 | |<-
77 | |<-
78 |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp)
79 | |<- 8-byte padding for 64-byte alignment
80 | |<- 8-byte padding for 64-byte alignment
81 | |<- R11
82 | |<- R10
83 | |<- R9
84 | |<- R8
85 | |<- RDX
86 | |<- RCX
87 +==================+<- RSP aligned at 64 bytes
88
89 Define the total register save area size for all integer registers by
90 adding 24 to STATE_SAVE_OFFSET since RDI, RSI and RBX are saved onto
91 stack without adjusting stack pointer first, using the red-zone. */
92# define TLSDESC_CALL_REGISTER_SAVE_AREA (STATE_SAVE_OFFSET + 24)
93
94/* Save SSE, AVX, AVX512, mask, bound and APX registers. Bound and APX
95 registers are mutually exclusive. */
96# define STATE_SAVE_MASK \
97 ((1 << X86_XSTATE_SSE_ID) \
98 | (1 << X86_XSTATE_AVX_ID) \
99 | (1 << X86_XSTATE_BNDREGS_ID) \
100 | (1 << X86_XSTATE_K_ID) \
101 | (1 << X86_XSTATE_ZMM_H_ID) \
102 | (1 << X86_XSTATE_ZMM_ID) \
103 | (1 << X86_XSTATE_APX_F_ID))
104
105/* AMX state mask. */
106# define AMX_STATE_SAVE_MASK \
107 ((1 << X86_XSTATE_TILECFG_ID) | (1 << X86_XSTATE_TILEDATA_ID))
108
109/* States to be included in xsave_state_full_size. */
110# define FULL_STATE_SAVE_MASK \
111 (STATE_SAVE_MASK | AMX_STATE_SAVE_MASK)
112#else
113/* Offset for fxsave/xsave area used by _dl_tlsdesc_dynamic. Since i386
114 uses PUSH to save registers onto stack, use 0 here. */
115# define STATE_SAVE_OFFSET 0
116# define TLSDESC_CALL_REGISTER_SAVE_AREA 0
117
118/* Save SSE, AVX, AXV512, mask and bound registers. */
119# define STATE_SAVE_MASK \
120 ((1 << X86_XSTATE_SSE_ID) \
121 | (1 << X86_XSTATE_AVX_ID) \
122 | (1 << X86_XSTATE_BNDREGS_ID) \
123 | (1 << X86_XSTATE_K_ID) \
124 | (1 << X86_XSTATE_ZMM_H_ID))
125
126/* States to be included in xsave_state_size. */
127# define FULL_STATE_SAVE_MASK STATE_SAVE_MASK
128#endif
28129
29/* Save SSE, AVX, AVX512, mask and bound registers. */
30#define STATE_SAVE_MASK \
31 ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) | (1 << 7))
130/* States which should be saved for TLSDESC_CALL and TLS_DESC_CALL.
131 Compiler assumes that all registers, including AMX and x87 FPU
132 stack registers, are unchanged after CALL, except for EFLAGS and
133 RAX/EAX. */
134#define TLSDESC_CALL_STATE_SAVE_MASK \
135 (FULL_STATE_SAVE_MASK | (1 << X86_XSTATE_X87_ID))
32136
33137/* Constants for bits in __x86_string_control: */
34138
lib/libc/glibc/time/bits/types/struct_timespec.h+2-2
......@@ -10,14 +10,14 @@
1010 has nanoseconds instead of microseconds. */
1111struct timespec
1212{
13#ifdef __USE_TIME_BITS64
13#ifdef __USE_TIME64_REDIRECTS
1414 __time64_t tv_sec; /* Seconds. */
1515#else
1616 __time_t tv_sec; /* Seconds. */
1717#endif
1818#if __WORDSIZE == 64 \
1919 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
20 || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
20 || (__TIMESIZE == 32 && !defined __USE_TIME64_REDIRECTS)
2121 __syscall_slong_t tv_nsec; /* Nanoseconds. */
2222#else
2323# if __BYTE_ORDER == __BIG_ENDIAN
lib/libc/glibc/time/bits/types/struct_timeval.h+1-1
......@@ -7,7 +7,7 @@
77 microsecond but also has a range of years. */
88struct timeval
99{
10#ifdef __USE_TIME_BITS64
10#ifdef __USE_TIME64_REDIRECTS
1111 __time64_t tv_sec; /* Seconds. */
1212 __suseconds64_t tv_usec; /* Microseconds. */
1313#else
lib/libc/glibc/time/bits/types/time_t.h+1-1
......@@ -4,7 +4,7 @@
44#include <bits/types.h>
55
66/* Returned by `time'. */
7#ifdef __USE_TIME_BITS64
7#ifdef __USE_TIME64_REDIRECTS
88typedef __time64_t time_t;
99#else
1010typedef __time_t time_t;
lib/libc/include/aarch64-linux-gnu/bits/fenv.h+1-1
......@@ -73,7 +73,7 @@ fenv_t;
7373# define FE_NOMASK_ENV ((const fenv_t *) -2)
7474#endif
7575
76#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
76#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
7777/* Type representing floating-point control modes. */
7878typedef unsigned int femode_t;
7979
lib/libc/include/aarch64-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/hwcap.h+19-1
......@@ -99,4 +99,22 @@
9999#define HWCAP2_SME_B16B16 (1UL << 41)
100100#define HWCAP2_SME_F16F16 (1UL << 42)
101101#define HWCAP2_MOPS (1UL << 43)
102#define HWCAP2_HBC (1UL << 44)
\ No newline at end of file
102#define HWCAP2_HBC (1UL << 44)
103#define HWCAP2_SVE_B16B16 (1UL << 45)
104#define HWCAP2_LRCPC3 (1UL << 46)
105#define HWCAP2_LSE128 (1UL << 47)
106#define HWCAP2_FPMR (1UL << 48)
107#define HWCAP2_LUT (1UL << 49)
108#define HWCAP2_FAMINMAX (1UL << 50)
109#define HWCAP2_F8CVT (1UL << 51)
110#define HWCAP2_F8FMA (1UL << 52)
111#define HWCAP2_F8DP4 (1UL << 53)
112#define HWCAP2_F8DP2 (1UL << 54)
113#define HWCAP2_F8E4M3 (1UL << 55)
114#define HWCAP2_F8E5M2 (1UL << 56)
115#define HWCAP2_SME_LUTV2 (1UL << 57)
116#define HWCAP2_SME_F8F16 (1UL << 58)
117#define HWCAP2_SME_F8F32 (1UL << 59)
118#define HWCAP2_SME_SF8FMA (1UL << 60)
119#define HWCAP2_SME_SF8DP4 (1UL << 61)
120#define HWCAP2_SME_SF8DP2 (1UL << 62)
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/math-vector.h+88
......@@ -33,22 +33,50 @@
3333# define __DECL_SIMD_acos __DECL_SIMD_aarch64
3434# undef __DECL_SIMD_acosf
3535# define __DECL_SIMD_acosf __DECL_SIMD_aarch64
36# undef __DECL_SIMD_acosh
37# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
38# undef __DECL_SIMD_acoshf
39# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
3640# undef __DECL_SIMD_asin
3741# define __DECL_SIMD_asin __DECL_SIMD_aarch64
3842# undef __DECL_SIMD_asinf
3943# define __DECL_SIMD_asinf __DECL_SIMD_aarch64
44# undef __DECL_SIMD_asinh
45# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
46# undef __DECL_SIMD_asinhf
47# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
4048# undef __DECL_SIMD_atan
4149# define __DECL_SIMD_atan __DECL_SIMD_aarch64
4250# undef __DECL_SIMD_atanf
4351# define __DECL_SIMD_atanf __DECL_SIMD_aarch64
52# undef __DECL_SIMD_atanh
53# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
54# undef __DECL_SIMD_atanhf
55# define __DECL_SIMD_atanhf __DECL_SIMD_aarch64
4456# undef __DECL_SIMD_atan2
4557# define __DECL_SIMD_atan2 __DECL_SIMD_aarch64
4658# undef __DECL_SIMD_atan2f
4759# define __DECL_SIMD_atan2f __DECL_SIMD_aarch64
60# undef __DECL_SIMD_cbrt
61# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
62# undef __DECL_SIMD_cbrtf
63# define __DECL_SIMD_cbrtf __DECL_SIMD_aarch64
4864# undef __DECL_SIMD_cos
4965# define __DECL_SIMD_cos __DECL_SIMD_aarch64
5066# undef __DECL_SIMD_cosf
5167# define __DECL_SIMD_cosf __DECL_SIMD_aarch64
68# undef __DECL_SIMD_cosh
69# define __DECL_SIMD_cosh __DECL_SIMD_aarch64
70# undef __DECL_SIMD_coshf
71# define __DECL_SIMD_coshf __DECL_SIMD_aarch64
72# undef __DECL_SIMD_erf
73# define __DECL_SIMD_erf __DECL_SIMD_aarch64
74# undef __DECL_SIMD_erff
75# define __DECL_SIMD_erff __DECL_SIMD_aarch64
76# undef __DECL_SIMD_erfc
77# define __DECL_SIMD_erfc __DECL_SIMD_aarch64
78# undef __DECL_SIMD_erfcf
79# define __DECL_SIMD_erfcf __DECL_SIMD_aarch64
5280# undef __DECL_SIMD_exp
5381# define __DECL_SIMD_exp __DECL_SIMD_aarch64
5482# undef __DECL_SIMD_expf
......@@ -65,6 +93,10 @@
6593# define __DECL_SIMD_expm1 __DECL_SIMD_aarch64
6694# undef __DECL_SIMD_expm1f
6795# define __DECL_SIMD_expm1f __DECL_SIMD_aarch64
96# undef __DECL_SIMD_hypot
97# define __DECL_SIMD_hypot __DECL_SIMD_aarch64
98# undef __DECL_SIMD_hypotf
99# define __DECL_SIMD_hypotf __DECL_SIMD_aarch64
68100# undef __DECL_SIMD_log
69101# define __DECL_SIMD_log __DECL_SIMD_aarch64
70102# undef __DECL_SIMD_logf
......@@ -81,14 +113,26 @@
81113# define __DECL_SIMD_log2 __DECL_SIMD_aarch64
82114# undef __DECL_SIMD_log2f
83115# define __DECL_SIMD_log2f __DECL_SIMD_aarch64
116# undef __DECL_SIMD_pow
117# define __DECL_SIMD_pow __DECL_SIMD_aarch64
118# undef __DECL_SIMD_powf
119# define __DECL_SIMD_powf __DECL_SIMD_aarch64
84120# undef __DECL_SIMD_sin
85121# define __DECL_SIMD_sin __DECL_SIMD_aarch64
86122# undef __DECL_SIMD_sinf
87123# define __DECL_SIMD_sinf __DECL_SIMD_aarch64
124# undef __DECL_SIMD_sinh
125# define __DECL_SIMD_sinh __DECL_SIMD_aarch64
126# undef __DECL_SIMD_sinhf
127# define __DECL_SIMD_sinhf __DECL_SIMD_aarch64
88128# undef __DECL_SIMD_tan
89129# define __DECL_SIMD_tan __DECL_SIMD_aarch64
90130# undef __DECL_SIMD_tanf
91131# define __DECL_SIMD_tanf __DECL_SIMD_aarch64
132# undef __DECL_SIMD_tanh
133# define __DECL_SIMD_tanh __DECL_SIMD_aarch64
134# undef __DECL_SIMD_tanhf
135# define __DECL_SIMD_tanhf __DECL_SIMD_aarch64
92136#endif
93137
94138#if __GNUC_PREREQ(9, 0)
......@@ -117,35 +161,57 @@ typedef __SVBool_t __sv_bool_t;
117161
118162__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
119163__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
164__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
120165__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
166__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
121167__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
168__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
169__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
122170__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
171__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
172__vpcs __f32x4_t _ZGVnN4v_erff (__f32x4_t);
173__vpcs __f32x4_t _ZGVnN4v_erfcf (__f32x4_t);
123174__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
124175__vpcs __f32x4_t _ZGVnN4v_exp10f (__f32x4_t);
125176__vpcs __f32x4_t _ZGVnN4v_exp2f (__f32x4_t);
126177__vpcs __f32x4_t _ZGVnN4v_expm1f (__f32x4_t);
178__vpcs __f32x4_t _ZGVnN4vv_hypotf (__f32x4_t, __f32x4_t);
127179__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
128180__vpcs __f32x4_t _ZGVnN4v_log10f (__f32x4_t);
129181__vpcs __f32x4_t _ZGVnN4v_log1pf (__f32x4_t);
130182__vpcs __f32x4_t _ZGVnN4v_log2f (__f32x4_t);
183__vpcs __f32x4_t _ZGVnN4vv_powf (__f32x4_t, __f32x4_t);
131184__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
185__vpcs __f32x4_t _ZGVnN4v_sinhf (__f32x4_t);
132186__vpcs __f32x4_t _ZGVnN4v_tanf (__f32x4_t);
187__vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
133188
134189__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
135190__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
191__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
136192__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
193__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
137194__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
195__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
196__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
138197__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
198__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
199__vpcs __f64x2_t _ZGVnN2v_erf (__f64x2_t);
200__vpcs __f64x2_t _ZGVnN2v_erfc (__f64x2_t);
139201__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
140202__vpcs __f64x2_t _ZGVnN2v_exp10 (__f64x2_t);
141203__vpcs __f64x2_t _ZGVnN2v_exp2 (__f64x2_t);
142204__vpcs __f64x2_t _ZGVnN2v_expm1 (__f64x2_t);
205__vpcs __f64x2_t _ZGVnN2vv_hypot (__f64x2_t, __f64x2_t);
143206__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
144207__vpcs __f64x2_t _ZGVnN2v_log10 (__f64x2_t);
145208__vpcs __f64x2_t _ZGVnN2v_log1p (__f64x2_t);
146209__vpcs __f64x2_t _ZGVnN2v_log2 (__f64x2_t);
210__vpcs __f64x2_t _ZGVnN2vv_pow (__f64x2_t, __f64x2_t);
147211__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
212__vpcs __f64x2_t _ZGVnN2v_sinh (__f64x2_t);
148213__vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
214__vpcs __f64x2_t _ZGVnN2v_tanh (__f64x2_t);
149215
150216# undef __ADVSIMD_VEC_MATH_SUPPORTED
151217#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
......@@ -154,35 +220,57 @@ __vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
154220
155221__sv_f32_t _ZGVsMxvv_atan2f (__sv_f32_t, __sv_f32_t, __sv_bool_t);
156222__sv_f32_t _ZGVsMxv_acosf (__sv_f32_t, __sv_bool_t);
223__sv_f32_t _ZGVsMxv_acoshf (__sv_f32_t, __sv_bool_t);
157224__sv_f32_t _ZGVsMxv_asinf (__sv_f32_t, __sv_bool_t);
225__sv_f32_t _ZGVsMxv_asinhf (__sv_f32_t, __sv_bool_t);
158226__sv_f32_t _ZGVsMxv_atanf (__sv_f32_t, __sv_bool_t);
227__sv_f32_t _ZGVsMxv_atanhf (__sv_f32_t, __sv_bool_t);
228__sv_f32_t _ZGVsMxv_cbrtf (__sv_f32_t, __sv_bool_t);
159229__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
230__sv_f32_t _ZGVsMxv_coshf (__sv_f32_t, __sv_bool_t);
231__sv_f32_t _ZGVsMxv_erff (__sv_f32_t, __sv_bool_t);
232__sv_f32_t _ZGVsMxv_erfcf (__sv_f32_t, __sv_bool_t);
160233__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
161234__sv_f32_t _ZGVsMxv_exp10f (__sv_f32_t, __sv_bool_t);
162235__sv_f32_t _ZGVsMxv_exp2f (__sv_f32_t, __sv_bool_t);
163236__sv_f32_t _ZGVsMxv_expm1f (__sv_f32_t, __sv_bool_t);
237__sv_f32_t _ZGVsMxvv_hypotf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
164238__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
165239__sv_f32_t _ZGVsMxv_log10f (__sv_f32_t, __sv_bool_t);
166240__sv_f32_t _ZGVsMxv_log1pf (__sv_f32_t, __sv_bool_t);
167241__sv_f32_t _ZGVsMxv_log2f (__sv_f32_t, __sv_bool_t);
242__sv_f32_t _ZGVsMxvv_powf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
168243__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
244__sv_f32_t _ZGVsMxv_sinhf (__sv_f32_t, __sv_bool_t);
169245__sv_f32_t _ZGVsMxv_tanf (__sv_f32_t, __sv_bool_t);
246__sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
170247
171248__sv_f64_t _ZGVsMxvv_atan2 (__sv_f64_t, __sv_f64_t, __sv_bool_t);
172249__sv_f64_t _ZGVsMxv_acos (__sv_f64_t, __sv_bool_t);
250__sv_f64_t _ZGVsMxv_acosh (__sv_f64_t, __sv_bool_t);
173251__sv_f64_t _ZGVsMxv_asin (__sv_f64_t, __sv_bool_t);
252__sv_f64_t _ZGVsMxv_asinh (__sv_f64_t, __sv_bool_t);
174253__sv_f64_t _ZGVsMxv_atan (__sv_f64_t, __sv_bool_t);
254__sv_f64_t _ZGVsMxv_atanh (__sv_f64_t, __sv_bool_t);
255__sv_f64_t _ZGVsMxv_cbrt (__sv_f64_t, __sv_bool_t);
175256__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
257__sv_f64_t _ZGVsMxv_cosh (__sv_f64_t, __sv_bool_t);
258__sv_f64_t _ZGVsMxv_erf (__sv_f64_t, __sv_bool_t);
259__sv_f64_t _ZGVsMxv_erfc (__sv_f64_t, __sv_bool_t);
176260__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
177261__sv_f64_t _ZGVsMxv_exp10 (__sv_f64_t, __sv_bool_t);
178262__sv_f64_t _ZGVsMxv_exp2 (__sv_f64_t, __sv_bool_t);
179263__sv_f64_t _ZGVsMxv_expm1 (__sv_f64_t, __sv_bool_t);
264__sv_f64_t _ZGVsMxvv_hypot (__sv_f64_t, __sv_f64_t, __sv_bool_t);
180265__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
181266__sv_f64_t _ZGVsMxv_log10 (__sv_f64_t, __sv_bool_t);
182267__sv_f64_t _ZGVsMxv_log1p (__sv_f64_t, __sv_bool_t);
183268__sv_f64_t _ZGVsMxv_log2 (__sv_f64_t, __sv_bool_t);
269__sv_f64_t _ZGVsMxvv_pow (__sv_f64_t, __sv_f64_t, __sv_bool_t);
184270__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
271__sv_f64_t _ZGVsMxv_sinh (__sv_f64_t, __sv_bool_t);
185272__sv_f64_t _ZGVsMxv_tan (__sv_f64_t, __sv_bool_t);
273__sv_f64_t _ZGVsMxv_tanh (__sv_f64_t, __sv_bool_t);
186274
187275# undef __SVE_VEC_MATH_SUPPORTED
188276#endif /* __SVE_VEC_MATH_SUPPORTED */
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h+1-1
......@@ -73,7 +73,7 @@ fenv_t;
7373# define FE_NOMASK_ENV ((const fenv_t *) -2)
7474#endif
7575
76#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
76#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
7777/* Type representing floating-point control modes. */
7878typedef unsigned int femode_t;
7979
lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h+19-1
......@@ -99,4 +99,22 @@
9999#define HWCAP2_SME_B16B16 (1UL << 41)
100100#define HWCAP2_SME_F16F16 (1UL << 42)
101101#define HWCAP2_MOPS (1UL << 43)
102#define HWCAP2_HBC (1UL << 44)
\ No newline at end of file
102#define HWCAP2_HBC (1UL << 44)
103#define HWCAP2_SVE_B16B16 (1UL << 45)
104#define HWCAP2_LRCPC3 (1UL << 46)
105#define HWCAP2_LSE128 (1UL << 47)
106#define HWCAP2_FPMR (1UL << 48)
107#define HWCAP2_LUT (1UL << 49)
108#define HWCAP2_FAMINMAX (1UL << 50)
109#define HWCAP2_F8CVT (1UL << 51)
110#define HWCAP2_F8FMA (1UL << 52)
111#define HWCAP2_F8DP4 (1UL << 53)
112#define HWCAP2_F8DP2 (1UL << 54)
113#define HWCAP2_F8E4M3 (1UL << 55)
114#define HWCAP2_F8E5M2 (1UL << 56)
115#define HWCAP2_SME_LUTV2 (1UL << 57)
116#define HWCAP2_SME_F8F16 (1UL << 58)
117#define HWCAP2_SME_F8F32 (1UL << 59)
118#define HWCAP2_SME_SF8FMA (1UL << 60)
119#define HWCAP2_SME_SF8DP4 (1UL << 61)
120#define HWCAP2_SME_SF8DP2 (1UL << 62)
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/math-vector.h+88
......@@ -33,22 +33,50 @@
3333# define __DECL_SIMD_acos __DECL_SIMD_aarch64
3434# undef __DECL_SIMD_acosf
3535# define __DECL_SIMD_acosf __DECL_SIMD_aarch64
36# undef __DECL_SIMD_acosh
37# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
38# undef __DECL_SIMD_acoshf
39# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
3640# undef __DECL_SIMD_asin
3741# define __DECL_SIMD_asin __DECL_SIMD_aarch64
3842# undef __DECL_SIMD_asinf
3943# define __DECL_SIMD_asinf __DECL_SIMD_aarch64
44# undef __DECL_SIMD_asinh
45# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
46# undef __DECL_SIMD_asinhf
47# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
4048# undef __DECL_SIMD_atan
4149# define __DECL_SIMD_atan __DECL_SIMD_aarch64
4250# undef __DECL_SIMD_atanf
4351# define __DECL_SIMD_atanf __DECL_SIMD_aarch64
52# undef __DECL_SIMD_atanh
53# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
54# undef __DECL_SIMD_atanhf
55# define __DECL_SIMD_atanhf __DECL_SIMD_aarch64
4456# undef __DECL_SIMD_atan2
4557# define __DECL_SIMD_atan2 __DECL_SIMD_aarch64
4658# undef __DECL_SIMD_atan2f
4759# define __DECL_SIMD_atan2f __DECL_SIMD_aarch64
60# undef __DECL_SIMD_cbrt
61# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
62# undef __DECL_SIMD_cbrtf
63# define __DECL_SIMD_cbrtf __DECL_SIMD_aarch64
4864# undef __DECL_SIMD_cos
4965# define __DECL_SIMD_cos __DECL_SIMD_aarch64
5066# undef __DECL_SIMD_cosf
5167# define __DECL_SIMD_cosf __DECL_SIMD_aarch64
68# undef __DECL_SIMD_cosh
69# define __DECL_SIMD_cosh __DECL_SIMD_aarch64
70# undef __DECL_SIMD_coshf
71# define __DECL_SIMD_coshf __DECL_SIMD_aarch64
72# undef __DECL_SIMD_erf
73# define __DECL_SIMD_erf __DECL_SIMD_aarch64
74# undef __DECL_SIMD_erff
75# define __DECL_SIMD_erff __DECL_SIMD_aarch64
76# undef __DECL_SIMD_erfc
77# define __DECL_SIMD_erfc __DECL_SIMD_aarch64
78# undef __DECL_SIMD_erfcf
79# define __DECL_SIMD_erfcf __DECL_SIMD_aarch64
5280# undef __DECL_SIMD_exp
5381# define __DECL_SIMD_exp __DECL_SIMD_aarch64
5482# undef __DECL_SIMD_expf
......@@ -65,6 +93,10 @@
6593# define __DECL_SIMD_expm1 __DECL_SIMD_aarch64
6694# undef __DECL_SIMD_expm1f
6795# define __DECL_SIMD_expm1f __DECL_SIMD_aarch64
96# undef __DECL_SIMD_hypot
97# define __DECL_SIMD_hypot __DECL_SIMD_aarch64
98# undef __DECL_SIMD_hypotf
99# define __DECL_SIMD_hypotf __DECL_SIMD_aarch64
68100# undef __DECL_SIMD_log
69101# define __DECL_SIMD_log __DECL_SIMD_aarch64
70102# undef __DECL_SIMD_logf
......@@ -81,14 +113,26 @@
81113# define __DECL_SIMD_log2 __DECL_SIMD_aarch64
82114# undef __DECL_SIMD_log2f
83115# define __DECL_SIMD_log2f __DECL_SIMD_aarch64
116# undef __DECL_SIMD_pow
117# define __DECL_SIMD_pow __DECL_SIMD_aarch64
118# undef __DECL_SIMD_powf
119# define __DECL_SIMD_powf __DECL_SIMD_aarch64
84120# undef __DECL_SIMD_sin
85121# define __DECL_SIMD_sin __DECL_SIMD_aarch64
86122# undef __DECL_SIMD_sinf
87123# define __DECL_SIMD_sinf __DECL_SIMD_aarch64
124# undef __DECL_SIMD_sinh
125# define __DECL_SIMD_sinh __DECL_SIMD_aarch64
126# undef __DECL_SIMD_sinhf
127# define __DECL_SIMD_sinhf __DECL_SIMD_aarch64
88128# undef __DECL_SIMD_tan
89129# define __DECL_SIMD_tan __DECL_SIMD_aarch64
90130# undef __DECL_SIMD_tanf
91131# define __DECL_SIMD_tanf __DECL_SIMD_aarch64
132# undef __DECL_SIMD_tanh
133# define __DECL_SIMD_tanh __DECL_SIMD_aarch64
134# undef __DECL_SIMD_tanhf
135# define __DECL_SIMD_tanhf __DECL_SIMD_aarch64
92136#endif
93137
94138#if __GNUC_PREREQ(9, 0)
......@@ -117,35 +161,57 @@ typedef __SVBool_t __sv_bool_t;
117161
118162__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
119163__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
164__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
120165__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
166__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
121167__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
168__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
169__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
122170__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
171__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
172__vpcs __f32x4_t _ZGVnN4v_erff (__f32x4_t);
173__vpcs __f32x4_t _ZGVnN4v_erfcf (__f32x4_t);
123174__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
124175__vpcs __f32x4_t _ZGVnN4v_exp10f (__f32x4_t);
125176__vpcs __f32x4_t _ZGVnN4v_exp2f (__f32x4_t);
126177__vpcs __f32x4_t _ZGVnN4v_expm1f (__f32x4_t);
178__vpcs __f32x4_t _ZGVnN4vv_hypotf (__f32x4_t, __f32x4_t);
127179__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
128180__vpcs __f32x4_t _ZGVnN4v_log10f (__f32x4_t);
129181__vpcs __f32x4_t _ZGVnN4v_log1pf (__f32x4_t);
130182__vpcs __f32x4_t _ZGVnN4v_log2f (__f32x4_t);
183__vpcs __f32x4_t _ZGVnN4vv_powf (__f32x4_t, __f32x4_t);
131184__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
185__vpcs __f32x4_t _ZGVnN4v_sinhf (__f32x4_t);
132186__vpcs __f32x4_t _ZGVnN4v_tanf (__f32x4_t);
187__vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
133188
134189__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
135190__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
191__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
136192__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
193__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
137194__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
195__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
196__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
138197__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
198__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
199__vpcs __f64x2_t _ZGVnN2v_erf (__f64x2_t);
200__vpcs __f64x2_t _ZGVnN2v_erfc (__f64x2_t);
139201__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
140202__vpcs __f64x2_t _ZGVnN2v_exp10 (__f64x2_t);
141203__vpcs __f64x2_t _ZGVnN2v_exp2 (__f64x2_t);
142204__vpcs __f64x2_t _ZGVnN2v_expm1 (__f64x2_t);
205__vpcs __f64x2_t _ZGVnN2vv_hypot (__f64x2_t, __f64x2_t);
143206__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
144207__vpcs __f64x2_t _ZGVnN2v_log10 (__f64x2_t);
145208__vpcs __f64x2_t _ZGVnN2v_log1p (__f64x2_t);
146209__vpcs __f64x2_t _ZGVnN2v_log2 (__f64x2_t);
210__vpcs __f64x2_t _ZGVnN2vv_pow (__f64x2_t, __f64x2_t);
147211__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
212__vpcs __f64x2_t _ZGVnN2v_sinh (__f64x2_t);
148213__vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
214__vpcs __f64x2_t _ZGVnN2v_tanh (__f64x2_t);
149215
150216# undef __ADVSIMD_VEC_MATH_SUPPORTED
151217#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
......@@ -154,35 +220,57 @@ __vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
154220
155221__sv_f32_t _ZGVsMxvv_atan2f (__sv_f32_t, __sv_f32_t, __sv_bool_t);
156222__sv_f32_t _ZGVsMxv_acosf (__sv_f32_t, __sv_bool_t);
223__sv_f32_t _ZGVsMxv_acoshf (__sv_f32_t, __sv_bool_t);
157224__sv_f32_t _ZGVsMxv_asinf (__sv_f32_t, __sv_bool_t);
225__sv_f32_t _ZGVsMxv_asinhf (__sv_f32_t, __sv_bool_t);
158226__sv_f32_t _ZGVsMxv_atanf (__sv_f32_t, __sv_bool_t);
227__sv_f32_t _ZGVsMxv_atanhf (__sv_f32_t, __sv_bool_t);
228__sv_f32_t _ZGVsMxv_cbrtf (__sv_f32_t, __sv_bool_t);
159229__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
230__sv_f32_t _ZGVsMxv_coshf (__sv_f32_t, __sv_bool_t);
231__sv_f32_t _ZGVsMxv_erff (__sv_f32_t, __sv_bool_t);
232__sv_f32_t _ZGVsMxv_erfcf (__sv_f32_t, __sv_bool_t);
160233__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
161234__sv_f32_t _ZGVsMxv_exp10f (__sv_f32_t, __sv_bool_t);
162235__sv_f32_t _ZGVsMxv_exp2f (__sv_f32_t, __sv_bool_t);
163236__sv_f32_t _ZGVsMxv_expm1f (__sv_f32_t, __sv_bool_t);
237__sv_f32_t _ZGVsMxvv_hypotf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
164238__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
165239__sv_f32_t _ZGVsMxv_log10f (__sv_f32_t, __sv_bool_t);
166240__sv_f32_t _ZGVsMxv_log1pf (__sv_f32_t, __sv_bool_t);
167241__sv_f32_t _ZGVsMxv_log2f (__sv_f32_t, __sv_bool_t);
242__sv_f32_t _ZGVsMxvv_powf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
168243__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
244__sv_f32_t _ZGVsMxv_sinhf (__sv_f32_t, __sv_bool_t);
169245__sv_f32_t _ZGVsMxv_tanf (__sv_f32_t, __sv_bool_t);
246__sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
170247
171248__sv_f64_t _ZGVsMxvv_atan2 (__sv_f64_t, __sv_f64_t, __sv_bool_t);
172249__sv_f64_t _ZGVsMxv_acos (__sv_f64_t, __sv_bool_t);
250__sv_f64_t _ZGVsMxv_acosh (__sv_f64_t, __sv_bool_t);
173251__sv_f64_t _ZGVsMxv_asin (__sv_f64_t, __sv_bool_t);
252__sv_f64_t _ZGVsMxv_asinh (__sv_f64_t, __sv_bool_t);
174253__sv_f64_t _ZGVsMxv_atan (__sv_f64_t, __sv_bool_t);
254__sv_f64_t _ZGVsMxv_atanh (__sv_f64_t, __sv_bool_t);
255__sv_f64_t _ZGVsMxv_cbrt (__sv_f64_t, __sv_bool_t);
175256__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
257__sv_f64_t _ZGVsMxv_cosh (__sv_f64_t, __sv_bool_t);
258__sv_f64_t _ZGVsMxv_erf (__sv_f64_t, __sv_bool_t);
259__sv_f64_t _ZGVsMxv_erfc (__sv_f64_t, __sv_bool_t);
176260__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
177261__sv_f64_t _ZGVsMxv_exp10 (__sv_f64_t, __sv_bool_t);
178262__sv_f64_t _ZGVsMxv_exp2 (__sv_f64_t, __sv_bool_t);
179263__sv_f64_t _ZGVsMxv_expm1 (__sv_f64_t, __sv_bool_t);
264__sv_f64_t _ZGVsMxvv_hypot (__sv_f64_t, __sv_f64_t, __sv_bool_t);
180265__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
181266__sv_f64_t _ZGVsMxv_log10 (__sv_f64_t, __sv_bool_t);
182267__sv_f64_t _ZGVsMxv_log1p (__sv_f64_t, __sv_bool_t);
183268__sv_f64_t _ZGVsMxv_log2 (__sv_f64_t, __sv_bool_t);
269__sv_f64_t _ZGVsMxvv_pow (__sv_f64_t, __sv_f64_t, __sv_bool_t);
184270__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
271__sv_f64_t _ZGVsMxv_sinh (__sv_f64_t, __sv_bool_t);
185272__sv_f64_t _ZGVsMxv_tan (__sv_f64_t, __sv_bool_t);
273__sv_f64_t _ZGVsMxv_tanh (__sv_f64_t, __sv_bool_t);
186274
187275# undef __SVE_VEC_MATH_SUPPORTED
188276#endif /* __SVE_VEC_MATH_SUPPORTED */
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/endianness.h created+15
......@@ -0,0 +1,15 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endian.h> directly; include <endian.h> instead."
6#endif
7
8/* ARC has selectable endianness. */
9#ifdef __BIG_ENDIAN__
10# define __BYTE_ORDER __BIG_ENDIAN
11#else
12# define __BYTE_ORDER __LITTLE_ENDIAN
13#endif
14
15#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/fcntl.h created+55
......@@ -0,0 +1,55 @@
1/* O_*, F_*, FD_* bit values for the generic Linux ABI.
2 Copyright (C) 2011-2024 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 _FCNTL_H
20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21#endif
22
23#include <bits/wordsize.h>
24
25#if __WORDSIZE == 64
26# define __O_LARGEFILE 0
27#endif
28
29struct flock
30 {
31 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
32 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
33#ifndef __USE_FILE_OFFSET64
34 __off_t l_start; /* Offset where the lock begins. */
35 __off_t l_len; /* Size of the locked area; zero means until EOF. */
36#else
37 __off64_t l_start; /* Offset where the lock begins. */
38 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
39#endif
40 __pid_t l_pid; /* Process holding the lock. */
41 };
42
43#ifdef __USE_LARGEFILE64
44struct flock64
45 {
46 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
47 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
48 __off64_t l_start; /* Offset where the lock begins. */
49 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
50 __pid_t l_pid; /* Process holding the lock. */
51 };
52#endif
53
54/* Include generic Linux declarations. */
55#include <bits/fcntl-linux.h>
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/fenv.h created+78
......@@ -0,0 +1,78 @@
1/* Floating point environment. ARC version.
2 Copyright (C) 2020-2024 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 _FENV_H
20# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
21#endif
22
23enum
24 {
25 FE_INVALID =
26# define FE_INVALID (0x01)
27 FE_INVALID,
28 FE_DIVBYZERO =
29# define FE_DIVBYZERO (0x02)
30 FE_DIVBYZERO,
31 FE_OVERFLOW =
32# define FE_OVERFLOW (0x04)
33 FE_OVERFLOW,
34 FE_UNDERFLOW =
35# define FE_UNDERFLOW (0x08)
36 FE_UNDERFLOW,
37 FE_INEXACT =
38# define FE_INEXACT (0x10)
39 FE_INEXACT
40 };
41
42# define FE_ALL_EXCEPT \
43 (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
44
45enum
46 {
47 FE_TOWARDZERO =
48# define FE_TOWARDZERO (0x0)
49 FE_TOWARDZERO,
50 FE_TONEAREST =
51# define FE_TONEAREST (0x1) /* default */
52 FE_TONEAREST,
53 FE_UPWARD =
54# define FE_UPWARD (0x2)
55 FE_UPWARD,
56 FE_DOWNWARD =
57# define FE_DOWNWARD (0x3)
58 FE_DOWNWARD
59 };
60
61typedef unsigned int fexcept_t;
62
63typedef struct
64{
65 unsigned int __fpcr;
66 unsigned int __fpsr;
67} fenv_t;
68
69/* If the default argument is used we use this value. */
70#define FE_DFL_ENV ((const fenv_t *) -1)
71
72#if __GLIBC_USE (IEC_60559_BFP_EXT)
73/* Type representing floating-point control modes. */
74typedef unsigned int femode_t;
75
76/* Default floating-point control modes. */
77# define FE_DFL_MODE ((const femode_t *) -1L)
78#endif
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/floatn.h created+52
......@@ -0,0 +1,52 @@
1/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2024 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/* Defined to 1 if the current compiler invocation provides a
20 floating-point type with the IEEE 754 binary128 format, and this glibc
21 includes corresponding *f128 interfaces for it. */
22#define __HAVE_FLOAT128 0
23
24/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
25 from the default float, double and long double types in this glibc. */
26#define __HAVE_DISTINCT_FLOAT128 0
27
28/* Defined to 1 if the current compiler invocation provides a
29 floating-point type with the right format for _Float64x, and this
30 glibc includes corresponding *f64x interfaces for it. */
31#define __HAVE_FLOAT64X 0
32
33/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
34 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
35 the format of _Float128, which must be different from that of long
36 double. */
37#define __HAVE_FLOAT64X_LONG_DOUBLE 0
38
39#ifndef __ASSEMBLER__
40
41/* Defined to concatenate the literal suffix to be used with _Float128
42 types, if __HAVE_FLOAT128 is 1.
43 E.g.: #define __f128(x) x##f128. */
44# undef __f128
45
46/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
47 E.g.: #define __CFLOAT128 _Complex _Float128. */
48# undef __CFLOAT128
49
50#endif /* !__ASSEMBLER__. */
51
52#include <bits/floatn-common.h>
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/link.h created+52
......@@ -0,0 +1,52 @@
1/* Machine-specific declarations for dynamic linker interface, ARC version.
2 Copyright (C) 2020-2024 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 _LINK_H
20# error "Never include <bits/link.h> directly; use <link.h> instead."
21#endif
22
23/* Registers for entry into PLT on ARC. */
24typedef struct La_arc_regs
25{
26 uint32_t lr_reg[8]; /* r0 through r7 (upto 8 args). */
27} La_arc_regs;
28
29/* Return values for calls from PLT on ARC. */
30typedef struct La_arc_retval
31{
32 /* For ARCv2, a 64-bit integer return value can use 2 regs. */
33 uint32_t lrv_reg[2];
34} La_arc_retval;
35
36__BEGIN_DECLS
37
38extern ElfW(Addr) la_arc_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
39 uintptr_t *__refcook,
40 uintptr_t *__defcook,
41 La_arc_regs *__regs,
42 unsigned int *__flags,
43 const char *__symname,
44 long int *__framesizep);
45extern unsigned int la_arc_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
46 uintptr_t *__refcook,
47 uintptr_t *__defcook,
48 const La_arc_regs *__inregs,
49 La_arc_retval *__outregs,
50 const char *symname);
51
52__END_DECLS
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/long-double.h created+53
......@@ -0,0 +1,53 @@
1/* Properties of long double type.
2 Copyright (C) 2016-2024 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 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/* This header is included by <sys/cdefs.h>.
20
21 If long double is ABI-compatible with double, it should define
22 __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
23 __NO_LONG_DOUBLE_MATH undefined.
24
25 If this build of the GNU C Library supports both long double
26 ABI-compatible with double and some other long double format not
27 ABI-compatible with double, it should define
28 __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
29 __LONG_DOUBLE_MATH_OPTIONAL undefined.
30
31 If __NO_LONG_DOUBLE_MATH is already defined, this header must not
32 define anything; this is needed to work with the definition of
33 __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */
34
35/* In the default version of this header, long double is
36 ABI-compatible with double. */
37#ifndef __NO_LONG_DOUBLE_MATH
38# define __NO_LONG_DOUBLE_MATH 1
39#endif
40
41/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
42 choice of the underlying ABI of long double. It will always assume
43 a constant value for each translation unit.
44
45 If the value is non-zero, any API which is parameterized by the long
46 double type (i.e the scanf/printf family of functions or the explicitly
47 parameterized math.h functions) will be redirected to a compatible
48 implementation using _Float128 ABI via symbols suffixed with ieee128.
49
50 The mechanism this macro uses to acquire may be a function
51 of architecture, or target specific options used to invoke the
52 compiler. */
53#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/procfs.h created+35
......@@ -0,0 +1,35 @@
1/* Types for registers for sys/procfs.h. ARC version.
2 Copyright (C) 2020-2024 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 _SYS_PROCFS_H
20# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
21#endif
22
23#include <sys/ucontext.h>
24
25/* And the whole bunch of them. We could have used `struct
26 user_regs' directly in the typedef, but tradition says that
27 the register set is an array, which does have some peculiar
28 semantics, so leave it that way. */
29#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
30
31typedef unsigned long int elf_greg_t;
32typedef unsigned long int elf_gregset_t[ELF_NGREG];
33
34/* There's no separate floating point reg file in ARCv2. */
35typedef struct { } elf_fpregset_t;
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/setjmp.h created+26
......@@ -0,0 +1,26 @@
1/* Define the machine-dependent type 'jmp_buf'. ARC version.
2 Copyright (C) 2020-2024 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 _ARC_BITS_SETJMP_H
20#define _ARC_BITS_SETJMP_H 1
21
22/* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer),
23 blink (branch-n-link). */
24typedef long int __jmp_buf[32];
25
26#endif
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/struct_stat.h created+127
......@@ -0,0 +1,127 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2024 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#if !defined _SYS_STAT_H && !defined _FCNTL_H
20# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
21#endif
22
23#ifndef _BITS_STRUCT_STAT_H
24#define _BITS_STRUCT_STAT_H 1
25
26#include <bits/endian.h>
27#include <bits/wordsize.h>
28
29#if defined __USE_FILE_OFFSET64
30# define __field64(type, type64, name) type64 name
31#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
32# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
33# error "ino_t and off_t must both be the same type"
34# endif
35# define __field64(type, type64, name) type name
36#elif __BYTE_ORDER == __LITTLE_ENDIAN
37# define __field64(type, type64, name) \
38 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
39#else
40# define __field64(type, type64, name) \
41 int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
42#endif
43
44struct stat
45 {
46 __dev_t st_dev; /* Device. */
47 __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */
48 __mode_t st_mode; /* File mode. */
49 __nlink_t st_nlink; /* Link count. */
50 __uid_t st_uid; /* User ID of the file's owner. */
51 __gid_t st_gid; /* Group ID of the file's group.*/
52 __dev_t st_rdev; /* Device number, if device. */
53 __dev_t __pad1;
54 __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */
55 __blksize_t st_blksize; /* Optimal block size for I/O. */
56 int __pad2;
57 __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */
58#ifdef __USE_XOPEN2K8
59 /* Nanosecond resolution timestamps are stored in a format
60 equivalent to 'struct timespec'. This is the type used
61 whenever possible but the Unix namespace rules do not allow the
62 identifier 'timespec' to appear in the <sys/stat.h> header.
63 Therefore we have to handle the use of this header in strictly
64 standard-compliant sources special. */
65 struct timespec st_atim; /* Time of last access. */
66 struct timespec st_mtim; /* Time of last modification. */
67 struct timespec st_ctim; /* Time of last status change. */
68# define st_atime st_atim.tv_sec /* Backward compatibility. */
69# define st_mtime st_mtim.tv_sec
70# define st_ctime st_ctim.tv_sec
71#else
72 __time_t st_atime; /* Time of last access. */
73 unsigned long int st_atimensec; /* Nscecs of last access. */
74 __time_t st_mtime; /* Time of last modification. */
75 unsigned long int st_mtimensec; /* Nsecs of last modification. */
76 __time_t st_ctime; /* Time of last status change. */
77 unsigned long int st_ctimensec; /* Nsecs of last status change. */
78#endif
79 int __glibc_reserved[2];
80 };
81
82#undef __field64
83
84#ifdef __USE_LARGEFILE64
85struct stat64
86 {
87 __dev_t st_dev; /* Device. */
88 __ino64_t st_ino; /* File serial number. */
89 __mode_t st_mode; /* File mode. */
90 __nlink_t st_nlink; /* Link count. */
91 __uid_t st_uid; /* User ID of the file's owner. */
92 __gid_t st_gid; /* Group ID of the file's group.*/
93 __dev_t st_rdev; /* Device number, if device. */
94 __dev_t __pad1;
95 __off64_t st_size; /* Size of file, in bytes. */
96 __blksize_t st_blksize; /* Optimal block size for I/O. */
97 int __pad2;
98 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
99#ifdef __USE_XOPEN2K8
100 /* Nanosecond resolution timestamps are stored in a format
101 equivalent to 'struct timespec'. This is the type used
102 whenever possible but the Unix namespace rules do not allow the
103 identifier 'timespec' to appear in the <sys/stat.h> header.
104 Therefore we have to handle the use of this header in strictly
105 standard-compliant sources special. */
106 struct timespec st_atim; /* Time of last access. */
107 struct timespec st_mtim; /* Time of last modification. */
108 struct timespec st_ctim; /* Time of last status change. */
109#else
110 __time_t st_atime; /* Time of last access. */
111 unsigned long int st_atimensec; /* Nscecs of last access. */
112 __time_t st_mtime; /* Time of last modification. */
113 unsigned long int st_mtimensec; /* Nsecs of last modification. */
114 __time_t st_ctime; /* Time of last status change. */
115 unsigned long int st_ctimensec; /* Nsecs of last status change. */
116#endif
117 int __glibc_reserved[2];
118 };
119#endif
120
121/* Tell code we have these members. */
122#define _STATBUF_ST_BLKSIZE
123#define _STATBUF_ST_RDEV
124/* Nanosecond resolution time values are supported. */
125#define _STATBUF_ST_NSEC
126
127#endif /* _BITS_STRUCT_STAT_H */
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2024 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/* Size in bits of the 'time_t' type of the default ABI. */
20#define __TIMESIZE 64
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h created+12
......@@ -0,0 +1,12 @@
1/* Architecture-specific __sigset_t definition. ARC version. */
2#ifndef ____sigset_t_defined
3#define ____sigset_t_defined
4
5/* Linux asm-generic syscall ABI expects sigset_t to hold 64 signals. */
6#define _SIGSET_NWORDS (64 / (8 * sizeof (unsigned long int)))
7typedef struct
8{
9 unsigned long int __val[_SIGSET_NWORDS];
10} __sigset_t;
11
12#endif
\ No newline at end of file
lib/libc/include/arc-linux-gnu/bits/wordsize.h created+21
......@@ -0,0 +1,21 @@
1/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
20#define __WORDSIZE32_SIZE_ULONG 0
21#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/arc-linux-gnu/fpu_control.h created+105
......@@ -0,0 +1,105 @@
1/* FPU control word bits. ARC version.
2 Copyright (C) 2020-2024 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 _FPU_CONTROL_H
20#define _FPU_CONTROL_H
21
22/* ARC FPU control register bits.
23
24 [ 0] -> IVE: Enable invalid operation exception.
25 if 0, soft exception: status register IV flag set.
26 if 1, hardware exception trap (not supported in Linux yet).
27 [ 1] -> DZE: Enable division by zero exception.
28 if 0, soft exception: status register IV flag set.
29 if 1, hardware exception: (not supported in Linux yet).
30 [9:8] -> RM: Rounding Mode:
31 00 - Rounding toward zero.
32 01 - Rounding to nearest (default).
33 10 - Rounding (up) toward plus infinity.
34 11 - Rounding (down)toward minus infinity.
35
36 ARC FPU status register bits.
37
38 [ 0] -> IV: flag invalid operation.
39 [ 1] -> DZ: flag division by zero.
40 [ 2] -> OV: flag Overflow operation.
41 [ 3] -> UV: flag Underflow operation.
42 [ 4] -> IX: flag Inexact operation.
43 [31] -> FWE: Flag Write Enable.
44 If 1, above flags writable explicitly (clearing),
45 else IoW and only writable indirectly via bits [12:7]. */
46
47#include <features.h>
48
49#if !defined(__ARC_FPU_SP__) && !defined(__ARC_FPU_DP__)
50
51# define _FPU_RESERVED 0xffffffff
52# define _FPU_DEFAULT 0x00000000
53typedef unsigned int fpu_control_t;
54# define _FPU_GETCW(cw) (cw) = 0
55# define _FPU_SETCW(cw) (void) (cw)
56# define _FPU_GETS(cw) (cw) = 0
57# define _FPU_SETS(cw) (void) (cw)
58extern fpu_control_t __fpu_control;
59
60#else
61
62#define _FPU_RESERVED 0
63
64/* The fdlibm code requires strict IEEE double precision arithmetic,
65 and no interrupts for exceptions, rounding to nearest.
66 So only RM set to b'01. */
67# define _FPU_DEFAULT 0x00000100
68
69/* Actually default needs to have FWE bit as 1 but that is already
70 ingrained into _FPU_SETS macro below. */
71#define _FPU_FPSR_DEFAULT 0x00000000
72
73#define __FPU_RND_SHIFT 8
74#define __FPU_RND_MASK 0x3
75
76/* Type of the control word. */
77typedef unsigned int fpu_control_t;
78
79/* Macros for accessing the hardware control word. */
80# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw))
81# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw))
82
83/* Macros for accessing the hardware status word.
84 Writing to FPU_STATUS requires a "control" bit FWE to be able to set the
85 exception flags directly (as opposed to side-effects of FP instructions).
86 That is done in the macro here to keeps callers agnostic of this detail.
87 And given FWE is write-only and RAZ, no need to "clear" it in _FPU_GETS
88 macro. */
89# define _FPU_GETS(cw) \
90 __asm__ volatile ("lr %0, [0x301] \r\n" \
91 : "=r" (cw))
92
93# define _FPU_SETS(cw) \
94 do { \
95 unsigned int __fwe = 0x80000000 | (cw); \
96 __asm__ volatile ("sr %0, [0x301] \r\n" \
97 : : "r" (__fwe)); \
98 } while (0)
99
100/* Default control word set at startup. */
101extern fpu_control_t __fpu_control;
102
103#endif
104
105#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h created+27
......@@ -0,0 +1,27 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-arcle.h> directly; include <gnu/lib-names.h> instead."
4#endif
5
6#define LD_LINUX_ARC_SO "ld-linux-arc.so.2"
7#define LD_SO "ld-linux-arc.so.2"
8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"
14#define LIBMVEC_SO "libmvec.so.1"
15#define LIBM_SO "libm.so.6"
16#define LIBNSL_SO "libnsl.so.1"
17#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
18#define LIBNSS_DB_SO "libnss_db.so.2"
19#define LIBNSS_DNS_SO "libnss_dns.so.2"
20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBPTHREAD_SO "libpthread.so.0"
24#define LIBRESOLV_SO "libresolv.so.2"
25#define LIBRT_SO "librt.so.1"
26#define LIBTHREAD_DB_SO "libthread_db.so.1"
27#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/arc-linux-gnu/gnu/lib-names.h created+16
......@@ -0,0 +1,16 @@
1/* This file is automatically generated.
2 It defines macros to allow user program to find the shared
3 library files which come as part of GNU libc. */
4#ifndef __GNU_LIB_NAMES_H
5#define __GNU_LIB_NAMES_H 1
6
7#include <bits/wordsize.h>
8
9#if !defined __BIG_ENDIAN__
10# include <gnu/lib-names-arcle.h>
11#endif
12#if defined __BIG_ENDIAN__
13# include <gnu/lib-names-arcbe.h>
14#endif
15
16#endif /* gnu/lib-names.h */
\ No newline at end of file
lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h created+38
......@@ -0,0 +1,38 @@
1/* This file is automatically generated.
2 It defines a symbol `__stub_FUNCTION' for each function
3 in the C library which is a stub, meaning it will fail
4 every time called, usually setting errno to ENOSYS. */
5
6#ifdef _LIBC
7 #error Applications may not define the macro _LIBC
8#endif
9
10#define __stub___compat_bdflush
11#define __stub___compat_create_module
12#define __stub___compat_get_kernel_syms
13#define __stub___compat_query_module
14#define __stub___compat_uselib
15#define __stub_chflags
16#define __stub_fchflags
17#define __stub_feclearexcept
18#define __stub_fedisableexcept
19#define __stub_feenableexcept
20#define __stub_fegetenv
21#define __stub_fegetexcept
22#define __stub_fegetexceptflag
23#define __stub_fegetmode
24#define __stub_fegetround
25#define __stub_feholdexcept
26#define __stub_feraiseexcept
27#define __stub_fesetenv
28#define __stub_fesetexcept
29#define __stub_fesetexceptflag
30#define __stub_fesetmode
31#define __stub_fesetround
32#define __stub_fetestexcept
33#define __stub_feupdateenv
34#define __stub_gtty
35#define __stub_revoke
36#define __stub_setlogin
37#define __stub_sigreturn
38#define __stub_stty
\ No newline at end of file
lib/libc/include/arc-linux-gnu/gnu/stubs.h created+12
......@@ -0,0 +1,12 @@
1/* This file is automatically generated.
2 This file selects the right generated file of `__stub_FUNCTION' macros
3 based on the architecture being compiled for. */
4
5#include <bits/wordsize.h>
6
7#if !defined __BIG_ENDIAN__
8# include <gnu/stubs-arcle.h>
9#endif
10#if defined __BIG_ENDIAN__
11# include <gnu/stubs-arcbe.h>
12#endif
\ No newline at end of file
lib/libc/include/arc-linux-gnu/sys/cachectl.h created+35
......@@ -0,0 +1,35 @@
1/* cacheflush - flush contents of instruction and/or data cache.
2 Copyright (C) 2020-2024 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 _SYS_CACHECTL_H
20#define _SYS_CACHECTL_H 1
21
22#include <features.h>
23
24/* Get the kernel definition for the op bits. */
25#include <asm/cachectl.h>
26
27__BEGIN_DECLS
28
29#ifdef __USE_MISC
30extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW;
31#endif
32
33__END_DECLS
34
35#endif
\ No newline at end of file
lib/libc/include/arc-linux-gnu/sys/ucontext.h created+57
......@@ -0,0 +1,57 @@
1/* struct ucontext definition, ARC version.
2 Copyright (C) 2020-2024 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/* System V/ARC ABI compliant context switching support. */
20
21#ifndef _SYS_UCONTEXT_H
22#define _SYS_UCONTEXT_H 1
23
24#include <features.h>
25
26#include <bits/types/sigset_t.h>
27#include <bits/types/stack_t.h>
28
29typedef struct
30{
31 unsigned long int __pad;
32 unsigned long int __bta;
33 unsigned long int __lp_start, __lp_end, __lp_count;
34 unsigned long int __status32, __ret, __blink;
35 unsigned long int __fp, __gp;
36 unsigned long int __r12, __r11, __r10, __r9, __r8, __r7;
37 unsigned long int __r6, __r5, __r4, __r3, __r2, __r1, __r0;
38 unsigned long int __sp;
39 unsigned long int __r26;
40 unsigned long int __r25, __r24, __r23, __r22, __r21, __r20;
41 unsigned long int __r19, __r18, __r17, __r16, __r15, __r14, __r13;
42 unsigned long int __efa;
43 unsigned long int __stop_pc;
44 unsigned long int __r30, __r58, __r59;
45} mcontext_t;
46
47/* Userlevel context. */
48typedef struct ucontext_t
49{
50 unsigned long int __uc_flags;
51 struct ucontext_t *uc_link;
52 stack_t uc_stack;
53 mcontext_t uc_mcontext;
54 sigset_t uc_sigmask;
55} ucontext_t;
56
57#endif
\ No newline at end of file
lib/libc/include/arc-linux-gnu/sys/user.h created+32
......@@ -0,0 +1,32 @@
1/* ptrace register data format definitions.
2 Copyright (C) 2020-2024 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 _SYS_USER_H
20#define _SYS_USER_H 1
21
22/* Struct user_regs_struct is exported by kernel header
23 However apps like strace also expect a struct user, so it's better to
24 have a dummy implementation. */
25#include <asm/ptrace.h>
26
27struct user
28{
29 long int dummy;
30};
31
32#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/fenv.h+1-1
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
31#ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333#else
3434 __dev_t st_dev; /* Device. */
......@@ -83,13 +83,13 @@ struct stat
8383# else
8484 __ino64_t st_ino; /* File serial number. */
8585# endif
86#endif /* __USE_TIME_BITS64 */
86#endif /* __USE_TIME64_REDIRECTS */
8787 };
8888
8989#ifdef __USE_LARGEFILE64
9090struct stat64
9191 {
92# ifdef __USE_TIME_BITS64
92# ifdef __USE_TIME64_REDIRECTS
9393# include <bits/struct_stat_time64_helper.h>
9494# else
9595 __dev_t st_dev; /* Device. */
......@@ -125,7 +125,7 @@ struct stat64
125125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
126126# endif
127127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
128# endif /* __USE_TIME64_REDIRECTS */
129129 };
130130#endif
131131
lib/libc/include/arm-linux-gnueabi/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/fenv.h+1-1
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
31#ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333#else
3434 __dev_t st_dev; /* Device. */
......@@ -83,13 +83,13 @@ struct stat
8383# else
8484 __ino64_t st_ino; /* File serial number. */
8585# endif
86#endif /* __USE_TIME_BITS64 */
86#endif /* __USE_TIME64_REDIRECTS */
8787 };
8888
8989#ifdef __USE_LARGEFILE64
9090struct stat64
9191 {
92# ifdef __USE_TIME_BITS64
92# ifdef __USE_TIME64_REDIRECTS
9393# include <bits/struct_stat_time64_helper.h>
9494# else
9595 __dev_t st_dev; /* Device. */
......@@ -125,7 +125,7 @@ struct stat64
125125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
126126# endif
127127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
128# endif /* __USE_TIME64_REDIRECTS */
129129 };
130130#endif
131131
lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/fenv.h+1-1
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
31#ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333#else
3434 __dev_t st_dev; /* Device. */
......@@ -83,13 +83,13 @@ struct stat
8383# else
8484 __ino64_t st_ino; /* File serial number. */
8585# endif
86#endif /* __USE_TIME_BITS64 */
86#endif /* __USE_TIME64_REDIRECTS */
8787 };
8888
8989#ifdef __USE_LARGEFILE64
9090struct stat64
9191 {
92# ifdef __USE_TIME_BITS64
92# ifdef __USE_TIME64_REDIRECTS
9393# include <bits/struct_stat_time64_helper.h>
9494# else
9595 __dev_t st_dev; /* Device. */
......@@ -125,7 +125,7 @@ struct stat64
125125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
126126# endif
127127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
128# endif /* __USE_TIME64_REDIRECTS */
129129 };
130130#endif
131131
lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h+1-1
......@@ -81,7 +81,7 @@ fenv_t;
8181# define FE_NOMASK_ENV ((const fenv_t *) -2)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
31#ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333#else
3434 __dev_t st_dev; /* Device. */
......@@ -83,13 +83,13 @@ struct stat
8383# else
8484 __ino64_t st_ino; /* File serial number. */
8585# endif
86#endif /* __USE_TIME_BITS64 */
86#endif /* __USE_TIME64_REDIRECTS */
8787 };
8888
8989#ifdef __USE_LARGEFILE64
9090struct stat64
9191 {
92# ifdef __USE_TIME_BITS64
92# ifdef __USE_TIME64_REDIRECTS
9393# include <bits/struct_stat_time64_helper.h>
9494# else
9595 __dev_t st_dev; /* Device. */
......@@ -125,7 +125,7 @@ struct stat64
125125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
126126# endif
127127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
128# endif /* __USE_TIME64_REDIRECTS */
129129 };
130130#endif
131131
lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/csky-linux-gnueabi/bits/fenv.h+1-1
......@@ -102,7 +102,7 @@ typedef struct
102102# define FE_NOMASK_ENV ((const fenv_t *) -2)
103103#endif
104104
105#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
106106/* Type representing floating-point control modes. */
107107typedef unsigned int femode_t;
108108
lib/libc/include/csky-linux-gnueabi/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/csky-linux-gnueabi/bits/struct_stat.h+2-2
......@@ -43,7 +43,7 @@
4343
4444struct stat
4545 {
46#ifdef __USE_TIME_BITS64
46#ifdef __USE_TIME64_REDIRECTS
4747# include <bits/struct_stat_time64_helper.h>
4848#else
4949 __dev_t st_dev; /* Device. */
......@@ -88,7 +88,7 @@ struct stat
8888#ifdef __USE_LARGEFILE64
8989struct stat64
9090 {
91# ifdef __USE_TIME_BITS64
91# ifdef __USE_TIME64_REDIRECTS
9292# include <bits/struct_stat_time64_helper.h>
9393# else
9494 __dev_t st_dev; /* Device. */
lib/libc/include/csky-linux-gnueabi/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/csky-linux-gnueabi/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/csky-linux-gnueabihf/bits/fenv.h+1-1
......@@ -102,7 +102,7 @@ typedef struct
102102# define FE_NOMASK_ENV ((const fenv_t *) -2)
103103#endif
104104
105#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
105#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
106106/* Type representing floating-point control modes. */
107107typedef unsigned int femode_t;
108108
lib/libc/include/csky-linux-gnueabihf/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/csky-linux-gnueabihf/bits/struct_stat.h+2-2
......@@ -43,7 +43,7 @@
4343
4444struct stat
4545 {
46#ifdef __USE_TIME_BITS64
46#ifdef __USE_TIME64_REDIRECTS
4747# include <bits/struct_stat_time64_helper.h>
4848#else
4949 __dev_t st_dev; /* Device. */
......@@ -88,7 +88,7 @@ struct stat
8888#ifdef __USE_LARGEFILE64
8989struct stat64
9090 {
91# ifdef __USE_TIME_BITS64
91# ifdef __USE_TIME64_REDIRECTS
9292# include <bits/struct_stat_time64_helper.h>
9393# else
9494 __dev_t st_dev; /* Device. */
lib/libc/include/csky-linux-gnueabihf/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/generic-glibc/aio.h+2-2
......@@ -193,7 +193,7 @@ extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
193193extern int __REDIRECT_NTH (aio_cancel,
194194 (int __fildes, struct aiocb *__aiocbp),
195195 aio_cancel64);
196# ifdef __USE_TIME_BITS64
196# ifdef __USE_TIME64_REDIRECTS
197197extern int __REDIRECT_NTH (aio_suspend,
198198 (const struct aiocb *const __list[], int __nent,
199199 const struct timespec *__restrict __timeout),
......@@ -215,7 +215,7 @@ extern int __REDIRECT_NTH (aio_fsync,
215215# define aio_error aio_error64
216216# define aio_return aio_return64
217217# define aio_cancel aio_cancel64
218# ifdef __USE_TIME_BITS64
218# ifdef __USE_TIME64_REDIRECTS
219219# define aio_suspend __aio_suspend_time64
220220# else
221221# define aio_suspend aio_suspend64
lib/libc/include/generic-glibc/bits/fcntl2.h+87
......@@ -32,6 +32,8 @@ extern int __REDIRECT (__open_2, (const char *__path, int __oflag),
3232extern int __REDIRECT (__open_alias, (const char *__path, int __oflag, ...),
3333 open64) __nonnull ((1));
3434#endif
35
36#ifdef __va_arg_pack_len
3537__errordecl (__open_too_many_args,
3638 "open can be called either with 2 or 3 arguments, not more");
3739__errordecl (__open_missing_mode,
......@@ -58,12 +60,29 @@ open (const char *__path, int __oflag, ...)
5860
5961 return __open_alias (__path, __oflag, __va_arg_pack ());
6062}
63#elif __fortify_use_clang
64__fortify_function __attribute_overloadable__ int
65open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag)
66 __fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
67 "open with O_CREAT or O_TMPFILE in second argument needs 3 arguments")
68{
69 return __open_2 (__path, __oflag);
70}
71
72__fortify_function __attribute_overloadable__ int
73open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag,
74 mode_t __mode)
75{
76 return __open_alias (__path, __oflag, __mode);
77}
78#endif
6179
6280
6381#ifdef __USE_LARGEFILE64
6482extern int __open64_2 (const char *__path, int __oflag) __nonnull ((1));
6583extern int __REDIRECT (__open64_alias, (const char *__path, int __oflag,
6684 ...), open64) __nonnull ((1));
85# ifdef __va_arg_pack_len
6786__errordecl (__open64_too_many_args,
6887 "open64 can be called either with 2 or 3 arguments, not more");
6988__errordecl (__open64_missing_mode,
......@@ -90,6 +109,27 @@ open64 (const char *__path, int __oflag, ...)
90109
91110 return __open64_alias (__path, __oflag, __va_arg_pack ());
92111}
112# elif __fortify_use_clang
113__fortify_function_error_function __attribute_overloadable__ int
114open64 (const char *__path, int __oflag, mode_t __mode, ...)
115 __fortify_clang_unavailable ("open64 can be called either with 2 or 3 arguments, not more");
116
117__fortify_function __attribute_overloadable__ int
118open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag)
119 __fortify_clang_prefer_this_overload
120 __fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
121 "open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments")
122{
123 return __open64_2 (__path, __oflag);
124}
125
126__fortify_function __attribute_overloadable__ int
127open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag,
128 mode_t __mode)
129{
130 return __open64_alias (__path, __oflag, __mode);
131}
132# endif
93133#endif
94134
95135
......@@ -108,6 +148,8 @@ extern int __REDIRECT (__openat_alias, (int __fd, const char *__path,
108148 int __oflag, ...), openat64)
109149 __nonnull ((2));
110150# endif
151
152# ifdef __va_arg_pack_len
111153__errordecl (__openat_too_many_args,
112154 "openat can be called either with 3 or 4 arguments, not more");
113155__errordecl (__openat_missing_mode,
......@@ -134,6 +176,28 @@ openat (int __fd, const char *__path, int __oflag, ...)
134176
135177 return __openat_alias (__fd, __path, __oflag, __va_arg_pack ());
136178}
179# elif __fortify_use_clang
180__fortify_function_error_function __attribute_overloadable__ int
181openat (int __fd, const char *__path, int __oflag, mode_t __mode, ...)
182 __fortify_clang_unavailable ("openat can be called either with 3 or 4 arguments, not more");
183
184__fortify_function __attribute_overloadable__ int
185openat (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
186 int __oflag)
187 __fortify_clang_prefer_this_overload
188 __fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
189 "openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments")
190{
191 return __openat_2 (__fd, __path, __oflag);
192}
193
194__fortify_function __attribute_overloadable__ int
195openat (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
196 int __oflag, mode_t __mode)
197{
198 return __openat_alias (__fd, __path, __oflag, __mode);
199}
200# endif
137201
138202
139203# ifdef __USE_LARGEFILE64
......@@ -147,6 +211,7 @@ __errordecl (__openat64_too_many_args,
147211__errordecl (__openat64_missing_mode,
148212 "openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments");
149213
214# ifdef __va_arg_pack_len
150215__fortify_function int
151216openat64 (int __fd, const char *__path, int __oflag, ...)
152217{
......@@ -168,5 +233,27 @@ openat64 (int __fd, const char *__path, int __oflag, ...)
168233
169234 return __openat64_alias (__fd, __path, __oflag, __va_arg_pack ());
170235}
236# elif __fortify_use_clang
237__fortify_function_error_function __attribute_overloadable__ int
238openat64 (int __fd, const char *__path, int __oflag, mode_t __mode, ...)
239 __fortify_clang_unavailable ("openat64 can be called either with 3 or 4 arguments, not more");
240
241__fortify_function __attribute_overloadable__ int
242openat64 (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
243 int __oflag)
244 __fortify_clang_prefer_this_overload
245 __fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
246 "openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments")
247{
248 return __openat64_2 (__fd, __path, __oflag);
249}
250
251__fortify_function __attribute_overloadable__ int
252openat64 (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
253 int __oflag, mode_t __mode)
254{
255 return __openat64_alias (__fd, __path, __oflag, __mode);
256}
257# endif
171258# endif
172259#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/fenv.h+1-1
......@@ -104,7 +104,7 @@ fenv_t;
104104# define FE_NOMASK_ENV ((const fenv_t *) -2)
105105#endif
106106
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
108108/* Type representing floating-point control modes. */
109109typedef unsigned int femode_t;
110110
lib/libc/include/generic-glibc/bits/floatn.h+1-1
......@@ -1,4 +1,4 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
22 Copyright (C) 2017-2024 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
lib/libc/include/generic-glibc/bits/libc-header-start.h+18-18
......@@ -44,23 +44,23 @@
4444
4545/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
4646 macro. Most but not all symbols enabled by that macro in TS
47 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
47 18661-1 are enabled unconditionally in C23. In C23, the symbols in
4848 Annex F still require a new feature test macro
49 __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
49 __STDC_WANT_IEC_60559_EXT__ instead (C23 does not define
5050 __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
51 18661-1 are not included in C2X (and thus should depend on
52 __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
51 18661-1 are not included in C23 (and thus should depend on
52 __STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are
5353 enabled).
5454
5555 __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
56 18661-1 not included in C2X.
56 18661-1 not included in C23.
5757
58 __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
59 18661-1 that are also included in C2X (with no feature test macro
60 required in C2X).
58 __GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS
59 18661-1 that are also included in C23 (with no feature test macro
60 required in C23).
6161
6262 __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
63 that are included in C2X but conditional on
63 that are included in C23 but conditional on
6464 __STDC_WANT_IEC_60559_EXT__. (There are currently no features
6565 conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
6666 18661-1.) */
......@@ -70,11 +70,11 @@
7070#else
7171# define __GLIBC_USE_IEC_60559_BFP_EXT 0
7272#endif
73#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
74#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
75# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
73#undef __GLIBC_USE_IEC_60559_BFP_EXT_C23
74#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23)
75# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1
7676#else
77# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
77# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0
7878#endif
7979#undef __GLIBC_USE_IEC_60559_EXT
8080#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
......@@ -86,18 +86,18 @@
8686/* ISO/IEC TS 18661-4:2015 defines the
8787 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
8888 functions, the symbols from this TS are enabled unconditionally in
89 C2X. */
89 C23. */
9090#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
9191#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
9292# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
9393#else
9494# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
9595#endif
96#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
97#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
98# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
96#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23
97#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23)
98# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1
9999#else
100# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
100# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0
101101#endif
102102
103103/* ISO/IEC TS 18661-3:2015 defines the
lib/libc/include/generic-glibc/bits/mathcalls.h+22-7
......@@ -109,9 +109,24 @@ __MATHCALL_VEC (log10,, (_Mdouble_ __x));
109109/* Break VALUE into integral and fractional parts. */
110110__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
111111
112#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
112#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
113113/* Compute exponent to base ten. */
114114__MATHCALL_VEC (exp10,, (_Mdouble_ __x));
115
116/* Return exp2(X) - 1. */
117__MATHCALL (exp2m1,, (_Mdouble_ __x));
118
119/* Return exp10(X) - 1. */
120__MATHCALL (exp10m1,, (_Mdouble_ __x));
121
122/* Return log2(1 + X). */
123__MATHCALL (log2p1,, (_Mdouble_ __x));
124
125/* Return log10(1 + X). */
126__MATHCALL (log10p1,, (_Mdouble_ __x));
127
128/* Return log(1 + X). */
129__MATHCALL (logp1,, (_Mdouble_ __x));
115130#endif
116131
117132#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
......@@ -264,7 +279,7 @@ __MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y));
264279__MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y));
265280# endif
266281
267# if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
282# if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
268283/* Return X - epsilon. */
269284__MATHCALL (nextdown,, (_Mdouble_ __x));
270285/* Return X + epsilon. */
......@@ -283,7 +298,7 @@ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
283298__MATHDECL (int,ilogb,, (_Mdouble_ __x));
284299#endif
285300
286#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
301#if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
287302/* Like ilogb, but returning long int. */
288303__MATHDECL (long int, llogb,, (_Mdouble_ __x));
289304#endif
......@@ -328,7 +343,7 @@ __MATHDECL (long long int,llround,, (_Mdouble_ __x));
328343/* Return positive difference between X and Y. */
329344__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
330345
331# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC2X)
346# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC23)
332347/* Return maximum numeric value from X and Y. */
333348__MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
334349
......@@ -340,7 +355,7 @@ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
340355__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
341356#endif /* Use ISO C99. */
342357
343#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
358#if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
344359/* Round X to nearest integer value, rounding halfway cases to even. */
345360__MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__));
346361
......@@ -372,7 +387,7 @@ __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
372387
373388#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
374389 || (__MATH_DECLARING_FLOATN \
375 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X))))
390 && (defined __USE_GNU || !__GLIBC_USE (ISOC23))))
376391/* Return value with maximum magnitude. */
377392__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
378393
......@@ -380,7 +395,7 @@ __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
380395__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
381396#endif
382397
383#if __GLIBC_USE (ISOC2X)
398#if __GLIBC_USE (ISOC23)
384399/* Return maximum value from X and Y. */
385400__MATHCALLX (fmaximum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
386401
lib/libc/include/generic-glibc/bits/mman-linux.h+20-1
......@@ -54,10 +54,29 @@
5454# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
5555#endif
5656#define MAP_ANON MAP_ANONYMOUS
57/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
57
58/* When MAP_HUGETLB is set, bits [26:31] encode the log2 of the huge page size.
59 The following definitions are associated with this huge page size encoding.
60 It is responsibility of the application to know which sizes are supported on
61 the running system. See mmap(2) man page for details. */
62
5863#define MAP_HUGE_SHIFT 26
5964#define MAP_HUGE_MASK 0x3f
6065
66#define MAP_HUGE_16KB (14 << MAP_HUGE_SHIFT)
67#define MAP_HUGE_64KB (16 << MAP_HUGE_SHIFT)
68#define MAP_HUGE_512KB (19 << MAP_HUGE_SHIFT)
69#define MAP_HUGE_1MB (20 << MAP_HUGE_SHIFT)
70#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
71#define MAP_HUGE_8MB (23 << MAP_HUGE_SHIFT)
72#define MAP_HUGE_16MB (24 << MAP_HUGE_SHIFT)
73#define MAP_HUGE_32MB (25 << MAP_HUGE_SHIFT)
74#define MAP_HUGE_256MB (28 << MAP_HUGE_SHIFT)
75#define MAP_HUGE_512MB (29 << MAP_HUGE_SHIFT)
76#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT)
77#define MAP_HUGE_2GB (31 << MAP_HUGE_SHIFT)
78#define MAP_HUGE_16GB (34U << MAP_HUGE_SHIFT)
79
6180/* Flags to `msync'. */
6281#define MS_ASYNC 1 /* Sync memory asynchronously. */
6382#define MS_SYNC 4 /* Synchronous memory sync. */
lib/libc/include/generic-glibc/bits/mqueue2.h+26-1
......@@ -29,6 +29,8 @@ extern mqd_t __mq_open_2 (const char *__name, int __oflag)
2929extern mqd_t __REDIRECT_NTH (__mq_open_alias, (const char *__name,
3030 int __oflag, ...), mq_open)
3131 __nonnull ((1));
32
33#ifdef __va_arg_pack_len
3234__errordecl (__mq_open_wrong_number_of_args,
3335 "mq_open can be called either with 2 or 4 arguments");
3436__errordecl (__mq_open_missing_mode_and_attr,
......@@ -54,4 +56,27 @@ __NTH (mq_open (const char *__name, int __oflag, ...))
5456 return __mq_open_2 (__name, __oflag);
5557
5658 return __mq_open_alias (__name, __oflag, __va_arg_pack ());
57}
\ No newline at end of file
59}
60#elif __fortify_use_clang
61__fortify_function_error_function __attribute_overloadable__ mqd_t
62__NTH (mq_open (__fortify_clang_overload_arg (const char *, , __name),
63 int __oflag, mode_t __mode, ...))
64 __fortify_clang_unavailable ("mq_open can be called either with 2 or 4 arguments");
65
66__fortify_function __attribute_overloadable__ mqd_t
67__NTH (mq_open (__fortify_clang_overload_arg (const char *, ,__name),
68 int __oflag, mode_t __mode, struct mq_attr *__attr))
69{
70 return __mq_open_alias (__name, __oflag, __mode, __attr);
71}
72
73__fortify_function __attribute_overloadable__ mqd_t
74__NTH (mq_open (__fortify_clang_overload_arg (const char *, ,__name),
75 int __oflag))
76 __fortify_clang_prefer_this_overload
77 __fortify_clang_error ((__oflag & O_CREAT),
78 "mq_open with O_CREAT in second argument needs 4 arguments")
79{
80 return __mq_open_alias (__name, __oflag);
81}
82#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/poll2.h+22-9
......@@ -33,8 +33,13 @@ extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
3333 __poll_chk)
3434 __warnattr ("poll called with fds buffer too small file nfds entries");
3535
36__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
37poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
36__fortify_function __fortified_attr_access (__write_only__, 1, 2)
37__attribute_overloadable__ int
38poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
39 int __timeout)
40 __fortify_clang_warning_only_if_bos_lt2 (__nfds, __fds, sizeof (*__fds),
41 "poll called with fds buffer "
42 "too small file nfds entries")
3843{
3944 return __glibc_fortify (poll, __nfds, sizeof (*__fds),
4045 __glibc_objsize (__fds),
......@@ -43,7 +48,7 @@ poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
4348
4449
4550#ifdef __USE_GNU
46# ifdef __USE_TIME_BITS64
51# ifdef __USE_TIME64_REDIRECTS
4752extern int __REDIRECT (__ppoll64_alias, (struct pollfd *__fds, nfds_t __nfds,
4853 const struct timespec *__timeout,
4954 const __sigset_t *__ss), __ppoll64);
......@@ -58,9 +63,13 @@ extern int __REDIRECT (__ppoll64_chk_warn, (struct pollfd *__fds, nfds_t __n,
5863 __ppoll64_chk)
5964 __warnattr ("ppoll called with fds buffer too small file nfds entries");
6065
61__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
62ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
63 const __sigset_t *__ss)
66__fortify_function __fortified_attr_access (__write_only__, 1, 2)
67__attribute_overloadable__ int
68ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
69 const struct timespec *__timeout, const __sigset_t *__ss)
70 __fortify_clang_warning_only_if_bos_lt2 (__nfds, __fds, sizeof (*__fds),
71 "ppoll called with fds buffer "
72 "too small file nfds entries")
6473{
6574 return __glibc_fortify (ppoll64, __nfds, sizeof (*__fds),
6675 __glibc_objsize (__fds),
......@@ -81,9 +90,13 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
8190 __ppoll_chk)
8291 __warnattr ("ppoll called with fds buffer too small file nfds entries");
8392
84__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
85ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
86 const __sigset_t *__ss)
93__fortify_function __fortified_attr_access (__write_only__, 1, 2)
94__attribute_overloadable__ int
95ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
96 const struct timespec *__timeout, const __sigset_t *__ss)
97 __fortify_clang_warning_only_if_bos_lt2 (__nfds, __fds, sizeof (*__fds),
98 "ppoll called with fds buffer "
99 "too small file nfds entries")
87100{
88101 return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
89102 __glibc_objsize (__fds),
lib/libc/include/generic-glibc/bits/rseq.h+2-35
......@@ -1,4 +1,4 @@
1/* Restartable Sequences Linux mips architecture header.
1/* Restartable Sequences architecture header. Stub version.
22 Copyright (C) 2021-2024 Free Software Foundation, Inc.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -26,37 +26,4 @@
2626 architecture. When choosing this value, it needs to be taken into
2727 account that generating invalid instructions may have ill effects on
2828 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/shm.h+22
......@@ -58,6 +58,28 @@ typedef __syscall_ulong_t shmatt_t;
5858# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
5959# define SHM_NORESERVE 010000 /* don't check for reservations */
6060
61/* When SHM_HUGETLB is set, bits [26:31] encode the log2 of the huge page size.
62 The following definitions are associated with this huge page size encoding.
63 It is responsibility of the application to know which sizes are supported on
64 the running system. See shmget(2) man page for details. */
65
66#define SHM_HUGE_SHIFT 26
67#define SHM_HUGE_MASK 0x3f
68
69#define SHM_HUGE_16KB (14 << SHM_HUGE_SHIFT)
70#define SHM_HUGE_64KB (16 << SHM_HUGE_SHIFT)
71#define SHM_HUGE_512KB (19 << SHM_HUGE_SHIFT)
72#define SHM_HUGE_1MB (20 << SHM_HUGE_SHIFT)
73#define SHM_HUGE_2MB (21 << SHM_HUGE_SHIFT)
74#define SHM_HUGE_8MB (23 << SHM_HUGE_SHIFT)
75#define SHM_HUGE_16MB (24 << SHM_HUGE_SHIFT)
76#define SHM_HUGE_32MB (25 << SHM_HUGE_SHIFT)
77#define SHM_HUGE_256MB (28 << SHM_HUGE_SHIFT)
78#define SHM_HUGE_512MB (29 << SHM_HUGE_SHIFT)
79#define SHM_HUGE_1GB (30 << SHM_HUGE_SHIFT)
80#define SHM_HUGE_2GB (31 << SHM_HUGE_SHIFT)
81#define SHM_HUGE_16GB (34U << SHM_HUGE_SHIFT)
82
6183struct shminfo
6284 {
6385 __syscall_ulong_t shmmax;
lib/libc/include/generic-glibc/bits/socket-constants.h+1-1
......@@ -64,7 +64,7 @@
6464# define SO_TIMESTAMPNS_NEW 64
6565# define SO_TIMESTAMPING_NEW 65
6666
67# ifdef __USE_TIME_BITS64
67# ifdef __USE_TIME64_REDIRECTS
6868# define SO_RCVTIMEO SO_RCVTIMEO_NEW
6969# define SO_SNDTIMEO SO_SNDTIMEO_NEW
7070# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/generic-glibc/bits/socket.h+3-2
......@@ -172,6 +172,7 @@ typedef __socklen_t socklen_t;
172172#define SOL_MPTCP 284
173173#define SOL_MCTP 285
174174#define SOL_SMC 286
175#define SOL_VSOCK 287
175176
176177/* Maximum queue length specifiable by listen. */
177178#define SOMAXCONN 4096
......@@ -180,7 +181,7 @@ typedef __socklen_t socklen_t;
180181#include <bits/sockaddr.h>
181182
182183/* Structure describing a generic socket address. */
183struct sockaddr
184struct __attribute_struct_may_alias__ sockaddr
184185 {
185186 __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
186187 char sa_data[14]; /* Address data. */
......@@ -193,7 +194,7 @@ struct sockaddr
193194#define _SS_PADSIZE \
194195 (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype))
195196
196struct sockaddr_storage
197struct __attribute_struct_may_alias__ sockaddr_storage
197198 {
198199 __SOCKADDR_COMMON (ss_); /* Address family, etc. */
199200 char __ss_padding[_SS_PADSIZE];
lib/libc/include/generic-glibc/bits/socket2.h+16-4
......@@ -30,14 +30,20 @@ extern ssize_t __REDIRECT (__recv_chk_warn,
3030 __warnattr ("recv called with bigger length than size of destination "
3131 "buffer");
3232
33__fortify_function ssize_t
34recv (int __fd, void *__buf, size_t __n, int __flags)
33__fortify_function __attribute_overloadable__ ssize_t
34recv (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __n,
35 int __flags)
36 __fortify_clang_warning_only_if_bos0_lt (__n, __buf,
37 "recv called with bigger length than "
38 "size of destination buffer")
3539{
3640 size_t sz = __glibc_objsize0 (__buf);
3741 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
3842 return __recv_alias (__fd, __buf, __n, __flags);
43#if !__fortify_use_clang
3944 if (__glibc_unsafe_len (__n, sizeof (char), sz))
4045 return __recv_chk_warn (__fd, __buf, __n, sz, __flags);
46#endif
4147 return __recv_chk (__fd, __buf, __n, sz, __flags);
4248}
4349
......@@ -57,15 +63,21 @@ extern ssize_t __REDIRECT (__recvfrom_chk_warn,
5763 __warnattr ("recvfrom called with bigger length than size of "
5864 "destination buffer");
5965
60__fortify_function ssize_t
61recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
66__fortify_function __attribute_overloadable__ ssize_t
67recvfrom (int __fd, __fortify_clang_overload_arg0 (void *, __restrict, __buf),
68 size_t __n, int __flags,
6269 __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
70 __fortify_clang_warning_only_if_bos0_lt (__n, __buf,
71 "recvfrom called with bigger length "
72 "than size of destination buffer")
6373{
6474 size_t sz = __glibc_objsize0 (__buf);
6575 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
6676 return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
77#if !__fortify_use_clang
6778 if (__glibc_unsafe_len (__n, sizeof (char), sz))
6879 return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr,
6980 __addr_len);
81#endif
7082 return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len);
7183}
\ No newline at end of file
lib/libc/include/generic-glibc/bits/statx-generic.h+1
......@@ -42,6 +42,7 @@
4242# define STATX_BTIME 0x0800U
4343# define STATX_MNT_ID 0x1000U
4444# define STATX_DIOALIGN 0x2000U
45# define STATX_MNT_ID_UNIQUE 0x4000U
4546# define STATX__RESERVED 0x80000000U
4647
4748# define STATX_ATTR_COMPRESSED 0x0004
lib/libc/include/generic-glibc/bits/stdio-ldbl.h+4-4
......@@ -28,7 +28,7 @@ __LDBL_REDIR_DECL (vprintf)
2828__LDBL_REDIR_DECL (vsprintf)
2929#if !__GLIBC_USE (DEPRECATED_SCANF)
3030# if defined __LDBL_COMPAT
31# if __GLIBC_USE (C2X_STRTOL)
31# if __GLIBC_USE (C23_STRTOL)
3232__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc23_fscanf)
3333__LDBL_REDIR1_DECL (scanf, __nldbl___isoc23_scanf)
3434__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc23_sscanf)
......@@ -38,7 +38,7 @@ __LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
3838__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
3939# endif
4040# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
41# if __GLIBC_USE (C2X_STRTOL)
41# if __GLIBC_USE (C23_STRTOL)
4242__LDBL_REDIR1_DECL (fscanf, __isoc23_fscanfieee128)
4343__LDBL_REDIR1_DECL (scanf, __isoc23_scanfieee128)
4444__LDBL_REDIR1_DECL (sscanf, __isoc23_sscanfieee128)
......@@ -64,7 +64,7 @@ __LDBL_REDIR_DECL (vsnprintf)
6464#ifdef __USE_ISOC99
6565# if !__GLIBC_USE (DEPRECATED_SCANF)
6666# if defined __LDBL_COMPAT
67# if __GLIBC_USE (C2X_STRTOL)
67# if __GLIBC_USE (C23_STRTOL)
6868__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc23_vfscanf)
6969__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc23_vscanf)
7070__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc23_vsscanf)
......@@ -74,7 +74,7 @@ __LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
7474__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
7575# endif
7676# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
77# if __GLIBC_USE (C2X_STRTOL)
77# if __GLIBC_USE (C23_STRTOL)
7878__LDBL_REDIR1_DECL (vfscanf, __isoc23_vfscanfieee128)
7979__LDBL_REDIR1_DECL (vscanf, __isoc23_vscanfieee128)
8080__LDBL_REDIR1_DECL (vsscanf, __isoc23_vsscanfieee128)
lib/libc/include/generic-glibc/bits/stdio2.h+153-20
......@@ -31,15 +31,29 @@ __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
3131 __glibc_objsize (__s), __fmt,
3232 __va_arg_pack ());
3333}
34#elif __fortify_use_clang
35/* clang does not have __va_arg_pack, so defer to va_arg version. */
36__fortify_function_error_function __attribute_overloadable__ int
37__NTH (sprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
38 const char *__restrict __fmt, ...))
39{
40 __gnuc_va_list __fortify_ap;
41 __builtin_va_start (__fortify_ap, __fmt);
42 int __r = __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
43 __glibc_objsize (__s), __fmt,
44 __fortify_ap);
45 __builtin_va_end (__fortify_ap);
46 return __r;
47}
3448#elif !defined __cplusplus
3549# define sprintf(str, ...) \
3650 __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, \
3751 __glibc_objsize (str), __VA_ARGS__)
3852#endif
3953
40__fortify_function int
41__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
42 __gnuc_va_list __ap))
54__fortify_function __attribute_overloadable__ int
55__NTH (vsprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
56 const char *__restrict __fmt, __gnuc_va_list __ap))
4357{
4458 return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
4559 __glibc_objsize (__s), __fmt, __ap);
......@@ -55,15 +69,33 @@ __NTH (snprintf (char *__restrict __s, size_t __n,
5569 __glibc_objsize (__s), __fmt,
5670 __va_arg_pack ());
5771}
72# elif __fortify_use_clang
73/* clang does not have __va_arg_pack, so defer to va_arg version. */
74__fortify_function_error_function __attribute_overloadable__ int
75__NTH (snprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
76 size_t __n, const char *__restrict __fmt, ...))
77{
78 __gnuc_va_list __fortify_ap;
79 __builtin_va_start (__fortify_ap, __fmt);
80 int __r = __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
81 __glibc_objsize (__s), __fmt,
82 __fortify_ap);
83 __builtin_va_end (__fortify_ap);
84 return __r;
85}
5886# elif !defined __cplusplus
5987# define snprintf(str, len, ...) \
6088 __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, \
6189 __glibc_objsize (str), __VA_ARGS__)
6290# endif
6391
64__fortify_function int
65__NTH (vsnprintf (char *__restrict __s, size_t __n,
66 const char *__restrict __fmt, __gnuc_va_list __ap))
92__fortify_function __attribute_overloadable__ int
93__NTH (vsnprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
94 size_t __n, const char *__restrict __fmt,
95 __gnuc_va_list __ap))
96 __fortify_clang_warning (__fortify_clang_bos_static_lt (__n, __s),
97 "call to vsnprintf may overflow the destination "
98 "buffer")
6799{
68100 return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
69101 __glibc_objsize (__s), __fmt, __ap);
......@@ -85,6 +117,30 @@ printf (const char *__restrict __fmt, ...)
85117{
86118 return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
87119}
120# elif __fortify_use_clang
121/* clang does not have __va_arg_pack, so defer to va_arg version. */
122__fortify_function_error_function __attribute_overloadable__ __nonnull ((1)) int
123fprintf (__fortify_clang_overload_arg (FILE *, __restrict, __stream),
124 const char *__restrict __fmt, ...)
125{
126 __gnuc_va_list __fortify_ap;
127 __builtin_va_start (__fortify_ap, __fmt);
128 int __r = __builtin___vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1,
129 __fmt, __fortify_ap);
130 __builtin_va_end (__fortify_ap);
131 return __r;
132}
133
134__fortify_function_error_function __attribute_overloadable__ int
135printf (__fortify_clang_overload_arg (const char *, __restrict, __fmt), ...)
136{
137 __gnuc_va_list __fortify_ap;
138 __builtin_va_start (__fortify_ap, __fmt);
139 int __r = __builtin___vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt,
140 __fortify_ap);
141 __builtin_va_end (__fortify_ap);
142 return __r;
143}
88144# elif !defined __cplusplus
89145# define printf(...) \
90146 __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
......@@ -92,8 +148,9 @@ printf (const char *__restrict __fmt, ...)
92148 __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
93149# endif
94150
95__fortify_function int
96vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
151__fortify_function __attribute_overloadable__ int
152vprintf (__fortify_clang_overload_arg (const char *, __restrict, __fmt),
153 __gnuc_va_list __ap)
97154{
98155#ifdef __USE_EXTERN_INLINES
99156 return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
......@@ -117,6 +174,18 @@ dprintf (int __fd, const char *__restrict __fmt, ...)
117174 return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
118175 __va_arg_pack ());
119176}
177# elif __fortify_use_clang
178__fortify_function_error_function __attribute_overloadable__ int
179dprintf (int __fd, __fortify_clang_overload_arg (const char *, __restrict,
180 __fmt), ...)
181{
182 __gnuc_va_list __fortify_ap;
183 __builtin_va_start (__fortify_ap, __fmt);
184 int __r = __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
185 __fortify_ap);
186 __builtin_va_end (__fortify_ap);
187 return __r;
188}
120189# elif !defined __cplusplus
121190# define dprintf(fd, ...) \
122191 __dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
......@@ -153,6 +222,43 @@ __NTH (obstack_printf (struct obstack *__restrict __obstack,
153222 return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
154223 __va_arg_pack ());
155224}
225# elif __fortify_use_clang
226__fortify_function_error_function __attribute_overloadable__ int
227__NTH (asprintf (__fortify_clang_overload_arg (char **, __restrict, __ptr),
228 const char *__restrict __fmt, ...))
229{
230 __gnuc_va_list __fortify_ap;
231 __builtin_va_start (__fortify_ap, __fmt);
232 int __r = __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
233 __fortify_ap);
234 __builtin_va_end (__fortify_ap);
235 return __r;
236}
237
238__fortify_function_error_function __attribute_overloadable__ int
239__NTH (__asprintf (__fortify_clang_overload_arg (char **, __restrict, __ptr),
240 const char *__restrict __fmt, ...))
241{
242 __gnuc_va_list __fortify_ap;
243 __builtin_va_start (__fortify_ap, __fmt);
244 int __r = __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
245 __fortify_ap);
246 __builtin_va_end (__fortify_ap);
247 return __r;
248}
249
250__fortify_function_error_function __attribute_overloadable__ int
251__NTH (obstack_printf (__fortify_clang_overload_arg (struct obstack *,
252 __restrict, __obstack),
253 const char *__restrict __fmt, ...))
254{
255 __gnuc_va_list __fortify_ap;
256 __builtin_va_start (__fortify_ap, __fmt);
257 int __r = __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1,
258 __fmt, __fortify_ap);
259 __builtin_va_end (__fortify_ap);
260 return __r;
261}
156262# elif !defined __cplusplus
157263# define asprintf(ptr, ...) \
158264 __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
......@@ -182,8 +288,11 @@ __NTH (obstack_vprintf (struct obstack *__restrict __obstack,
182288#endif
183289
184290#if __GLIBC_USE (DEPRECATED_GETS)
185__fortify_function __wur char *
186gets (char *__str)
291__fortify_function __wur __attribute_overloadable__ char *
292gets (__fortify_clang_overload_arg (char *, , __str))
293 __fortify_clang_warning (__glibc_objsize (__str) == (size_t) -1,
294 "please use fgets or getline instead, gets "
295 "can not specify buffer size")
187296{
188297 if (__glibc_objsize (__str) != (size_t) -1)
189298 return __gets_chk (__str, __glibc_objsize (__str));
......@@ -192,48 +301,70 @@ gets (char *__str)
192301#endif
193302
194303__fortify_function __wur __fortified_attr_access (__write_only__, 1, 2)
195__nonnull ((3)) char *
196fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
304__nonnull ((3)) __attribute_overloadable__ char *
305fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
306 FILE *__restrict __stream)
307 __fortify_clang_warning (__fortify_clang_bos_static_lt (__n, __s) && __n > 0,
308 "fgets called with bigger size than length of "
309 "destination buffer")
197310{
198311 size_t sz = __glibc_objsize (__s);
199312 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
200313 return __fgets_alias (__s, __n, __stream);
314#if !__fortify_use_clang
201315 if (__glibc_unsafe_len (__n, sizeof (char), sz))
202316 return __fgets_chk_warn (__s, sz, __n, __stream);
317#endif
203318 return __fgets_chk (__s, sz, __n, __stream);
204319}
205320
206__fortify_function __wur __nonnull ((4)) size_t
207fread (void *__restrict __ptr, size_t __size, size_t __n,
208 FILE *__restrict __stream)
321__fortify_function __wur __nonnull ((4)) __attribute_overloadable__ size_t
322fread (__fortify_clang_overload_arg (void *, __restrict, __ptr),
323 size_t __size, size_t __n, FILE *__restrict __stream)
324 __fortify_clang_warning (__fortify_clang_bos0_static_lt (__size * __n, __ptr)
325 && !__fortify_clang_mul_may_overflow (__size, __n),
326 "fread called with bigger size * n than length "
327 "of destination buffer")
209328{
210329 size_t sz = __glibc_objsize0 (__ptr);
211330 if (__glibc_safe_or_unknown_len (__n, __size, sz))
212331 return __fread_alias (__ptr, __size, __n, __stream);
332#if !__fortify_use_clang
213333 if (__glibc_unsafe_len (__n, __size, sz))
214334 return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
335#endif
215336 return __fread_chk (__ptr, sz, __size, __n, __stream);
216337}
217338
218339#ifdef __USE_GNU
219340__fortify_function __wur __fortified_attr_access (__write_only__, 1, 2)
220__nonnull ((3)) char *
221fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
341__nonnull ((3)) __attribute_overloadable__ char *
342fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
343 int __n, FILE *__restrict __stream)
344 __fortify_clang_warning (__fortify_clang_bos_static_lt (__n, __s) && __n > 0,
345 "fgets called with bigger size than length of "
346 "destination buffer")
222347{
223348 size_t sz = __glibc_objsize (__s);
224349 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
225350 return __fgets_unlocked_alias (__s, __n, __stream);
351#if !__fortify_use_clang
226352 if (__glibc_unsafe_len (__n, sizeof (char), sz))
227353 return __fgets_unlocked_chk_warn (__s, sz, __n, __stream);
354#endif
228355 return __fgets_unlocked_chk (__s, sz, __n, __stream);
229356}
230357#endif
231358
232359#ifdef __USE_MISC
233360# undef fread_unlocked
234__fortify_function __wur __nonnull ((4)) size_t
235fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
236 FILE *__restrict __stream)
361__fortify_function __wur __nonnull ((4)) __attribute_overloadable__ size_t
362fread_unlocked (__fortify_clang_overload_arg0 (void *, __restrict, __ptr),
363 size_t __size, size_t __n, FILE *__restrict __stream)
364 __fortify_clang_warning (__fortify_clang_bos0_static_lt (__size * __n, __ptr)
365 && !__fortify_clang_mul_may_overflow (__size, __n),
366 "fread_unlocked called with bigger size * n than "
367 "length of destination buffer")
237368{
238369 size_t sz = __glibc_objsize0 (__ptr);
239370 if (__glibc_safe_or_unknown_len (__n, __size, sz))
......@@ -261,8 +392,10 @@ fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
261392# endif
262393 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
263394 }
395# if !__fortify_use_clang
264396 if (__glibc_unsafe_len (__n, __size, sz))
265397 return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
398# endif
266399 return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
267400
268401}
lib/libc/include/generic-glibc/bits/stdlib-ldbl.h+1-1
......@@ -36,7 +36,7 @@ __LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
3636# endif
3737#endif
3838
39#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
39#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
4040# ifdef __LDBL_COMPAT
4141__LDBL_REDIR1_DECL (strfroml, strfromd)
4242# else
lib/libc/include/generic-glibc/bits/stdlib.h+28-11
......@@ -33,15 +33,22 @@ extern char *__REDIRECT_NTH (__realpath_chk_warn,
3333 __warnattr ("second argument of realpath must be either NULL or at "
3434 "least PATH_MAX bytes long buffer");
3535
36__fortify_function __wur char *
37__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
36__fortify_function __attribute_overloadable__ __wur char *
37__NTH (realpath (const char *__restrict __name,
38 __fortify_clang_overload_arg (char *, __restrict, __resolved)))
39#if defined _LIBC_LIMITS_H_ && defined PATH_MAX
40 __fortify_clang_warning_only_if_bos_lt (PATH_MAX, __resolved,
41 "second argument of realpath must be "
42 "either NULL or at least PATH_MAX "
43 "bytes long buffer")
44#endif
3845{
3946 size_t sz = __glibc_objsize (__resolved);
4047
4148 if (sz == (size_t) -1)
4249 return __realpath_alias (__name, __resolved);
4350
44#if defined _LIBC_LIMITS_H_ && defined PATH_MAX
51#if !__fortify_use_clang && defined _LIBC_LIMITS_H_ && defined PATH_MAX
4552 if (__glibc_unsafe_len (PATH_MAX, sizeof (char), sz))
4653 return __realpath_chk_warn (__name, __resolved, sz);
4754#endif
......@@ -61,8 +68,13 @@ extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
6168 __nonnull ((2)) __warnattr ("ptsname_r called with buflen bigger than "
6269 "size of buf");
6370
64__fortify_function int
65__NTH (ptsname_r (int __fd, char *__buf, size_t __buflen))
71__fortify_function __attribute_overloadable__ int
72__NTH (ptsname_r (int __fd,
73 __fortify_clang_overload_arg (char *, ,__buf),
74 size_t __buflen))
75 __fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
76 "ptsname_r called with buflen "
77 "bigger than size of buf")
6678{
6779 return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
6880 __glibc_objsize (__buf),
......@@ -75,8 +87,8 @@ extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
7587extern int __REDIRECT_NTH (__wctomb_alias, (char *__s, wchar_t __wchar),
7688 wctomb) __wur;
7789
78__fortify_function __wur int
79__NTH (wctomb (char *__s, wchar_t __wchar))
90__fortify_function __attribute_overloadable__ __wur int
91__NTH (wctomb (__fortify_clang_overload_arg (char *, ,__s), wchar_t __wchar))
8092{
8193 /* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
8294 But this would only disturb the namespace. So we define our own
......@@ -113,9 +125,13 @@ extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn,
113125 __warnattr ("mbstowcs called with dst buffer smaller than len "
114126 "* sizeof (wchar_t)");
115127
116__fortify_function size_t
117__NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,
128__fortify_function __attribute_overloadable__ size_t
129__NTH (mbstowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst),
130 const char *__restrict __src,
118131 size_t __len))
132 __fortify_clang_warning_only_if_bos0_lt2 (__len, __dst, sizeof (wchar_t),
133 "mbstowcs called with dst buffer "
134 "smaller than len * sizeof (wchar_t)")
119135{
120136 if (__builtin_constant_p (__dst == NULL) && __dst == NULL)
121137 return __mbstowcs_nulldst (__dst, __src, __len);
......@@ -139,8 +155,9 @@ extern size_t __REDIRECT_NTH (__wcstombs_chk_warn,
139155 size_t __len, size_t __dstlen), __wcstombs_chk)
140156 __warnattr ("wcstombs called with dst buffer smaller than len");
141157
142__fortify_function size_t
143__NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src,
158__fortify_function __attribute_overloadable__ size_t
159__NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
160 const wchar_t *__restrict __src,
144161 size_t __len))
145162{
146163 return __glibc_fortify (wcstombs, __len, sizeof (char),
lib/libc/include/generic-glibc/bits/string_fortified.h+34-22
......@@ -73,24 +73,29 @@ __NTH (explicit_bzero (void *__dest, size_t __len))
7373}
7474#endif
7575
76__fortify_function char *
77__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
76__fortify_function __attribute_overloadable__ char *
77__NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
78 const char *__restrict __src))
79 __fortify_clang_warn_if_src_too_large (__dest, __src)
7880{
7981 return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
8082}
8183
8284#ifdef __USE_XOPEN2K8
83__fortify_function char *
84__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
85__fortify_function __attribute_overloadable__ char *
86__NTH (stpcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
87 const char *__restrict __src))
88 __fortify_clang_warn_if_src_too_large (__dest, __src)
8589{
8690 return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
8791}
8892#endif
8993
9094
91__fortify_function char *
92__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
93 size_t __len))
95__fortify_function __attribute_overloadable__ char *
96__NTH (strncpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
97 const char *__restrict __src, size_t __len))
98 __fortify_clang_warn_if_dest_too_small (__dest, __len)
9499{
95100 return __builtin___strncpy_chk (__dest, __src, __len,
96101 __glibc_objsize (__dest));
......@@ -98,8 +103,10 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
98103
99104#ifdef __USE_XOPEN2K8
100105# if __GNUC_PREREQ (4, 7) || __glibc_clang_prereq (2, 6)
101__fortify_function char *
102__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
106__fortify_function __attribute_overloadable__ char *
107__NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest),
108 const char *__src, size_t __n))
109 __fortify_clang_warn_if_dest_too_small (__dest, __n)
103110{
104111 return __builtin___stpncpy_chk (__dest, __src, __n,
105112 __glibc_objsize (__dest));
......@@ -112,8 +119,9 @@ extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
112119extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
113120 size_t __n), stpncpy);
114121
115__fortify_function char *
116__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
122__fortify_function __attribute_overloadable__ char *
123__NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest),
124 const char *__src, size_t __n))
117125{
118126 if (__bos (__dest) != (size_t) -1
119127 && (!__builtin_constant_p (__n) || __n > __bos (__dest)))
......@@ -124,16 +132,19 @@ __NTH (stpncpy (char *__dest, const char *__src, size_t __n))
124132#endif
125133
126134
127__fortify_function char *
128__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
135__fortify_function __attribute_overloadable__ char *
136__NTH (strcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
137 const char *__restrict __src))
138 __fortify_clang_warn_if_src_too_large (__dest, __src)
129139{
130140 return __builtin___strcat_chk (__dest, __src, __glibc_objsize (__dest));
131141}
132142
133143
134__fortify_function char *
135__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
136 size_t __len))
144__fortify_function __attribute_overloadable__ char *
145__NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
146 const char *__restrict __src, size_t __len))
147 __fortify_clang_warn_if_src_too_large (__dest, __src)
137148{
138149 return __builtin___strncat_chk (__dest, __src, __len,
139150 __glibc_objsize (__dest));
......@@ -146,9 +157,10 @@ extern size_t __REDIRECT_NTH (__strlcpy_alias,
146157 (char *__dest, const char *__src, size_t __n),
147158 strlcpy);
148159
149__fortify_function size_t
150__NTH (strlcpy (char *__restrict __dest, const char *__restrict __src,
151 size_t __n))
160__fortify_function __attribute_overloadable__ size_t
161__NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
162 const char *__restrict __src, size_t __n))
163 __fortify_clang_warn_if_dest_too_small (__dest, __n)
152164{
153165 if (__glibc_objsize (__dest) != (size_t) -1
154166 && (!__builtin_constant_p (__n > __glibc_objsize (__dest))
......@@ -163,9 +175,9 @@ extern size_t __REDIRECT_NTH (__strlcat_alias,
163175 (char *__dest, const char *__src, size_t __n),
164176 strlcat);
165177
166__fortify_function size_t
167__NTH (strlcat (char *__restrict __dest, const char *__restrict __src,
168 size_t __n))
178__fortify_function __attribute_overloadable__ size_t
179__NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
180 const char *__restrict __src, size_t __n))
169181{
170182 if (__glibc_objsize (__dest) != (size_t) -1
171183 && (!__builtin_constant_p (__n > __glibc_objsize (__dest))
lib/libc/include/generic-glibc/bits/struct_stat.h+7-7
......@@ -29,7 +29,7 @@
2929/* Structure describing file characteristics. */
3030struct stat
3131 {
32# ifdef __USE_TIME_BITS64
32# ifdef __USE_TIME64_REDIRECTS
3333# include <bits/struct_stat_time64_helper.h>
3434# else
3535 unsigned long int st_dev;
......@@ -82,13 +82,13 @@ struct stat
8282 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
8383# endif
8484 long int st_pad5[14];
85# endif /* __USE_TIME_BITS64 */
85# endif /* __USE_TIME64_REDIRECTS */
8686 };
8787
8888# ifdef __USE_LARGEFILE64
8989struct stat64
9090 {
91# ifdef __USE_TIME_BITS64
91# ifdef __USE_TIME64_REDIRECTS
9292# include <bits/struct_stat_time64_helper.h>
9393# else
9494 unsigned long int st_dev;
......@@ -123,7 +123,7 @@ struct stat64
123123 long int st_pad3;
124124 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
125125 long int st_pad4[14];
126# endif /* __USE_TIME_BITS64 */
126# endif /* __USE_TIME64_REDIRECTS */
127127 };
128128# endif /* __USE_LARGEFILE64 */
129129
......@@ -131,7 +131,7 @@ struct stat64
131131
132132struct stat
133133 {
134# ifdef __USE_TIME_BITS64
134# ifdef __USE_TIME64_REDIRECTS
135135# include <bits/struct_stat_time64_helper.h>
136136# else
137137 __dev_t st_dev;
......@@ -189,7 +189,7 @@ struct stat
189189#ifdef __USE_LARGEFILE64
190190struct stat64
191191 {
192# ifdef __USE_TIME_BITS64
192# ifdef __USE_TIME64_REDIRECTS
193193# include <bits/struct_stat_time64_helper.h>
194194# else
195195 __dev_t st_dev;
......@@ -224,7 +224,7 @@ struct stat64
224224 unsigned int st_pad3;
225225 __blkcnt64_t st_blocks;
226226 int st_pad4[14];
227# endif /* __USE_TIME_BITS64 */
227# endif /* __USE_TIME64_REDIRECTS */
228228};
229229#endif
230230
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.7. */
2/* The system call list corresponds to kernel 6.9. */
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 395008
8#define __GLIBC_LINUX_VERSION_CODE 395520
99
1010#ifdef __NR_FAST_atomic_update
1111# define SYS_FAST_atomic_update __NR_FAST_atomic_update
......@@ -867,6 +867,10 @@
867867# define SYS_listen __NR_listen
868868#endif
869869
870#ifdef __NR_listmount
871# define SYS_listmount __NR_listmount
872#endif
873
870874#ifdef __NR_listxattr
871875# define SYS_listxattr __NR_listxattr
872876#endif
......@@ -899,6 +903,18 @@
899903# define SYS_lsetxattr __NR_lsetxattr
900904#endif
901905
906#ifdef __NR_lsm_get_self_attr
907# define SYS_lsm_get_self_attr __NR_lsm_get_self_attr
908#endif
909
910#ifdef __NR_lsm_list_modules
911# define SYS_lsm_list_modules __NR_lsm_list_modules
912#endif
913
914#ifdef __NR_lsm_set_self_attr
915# define SYS_lsm_set_self_attr __NR_lsm_set_self_attr
916#endif
917
902918#ifdef __NR_lstat
903919# define SYS_lstat __NR_lstat
904920#endif
......@@ -2283,6 +2299,10 @@
22832299# define SYS_statfs64 __NR_statfs64
22842300#endif
22852301
2302#ifdef __NR_statmount
2303# define SYS_statmount __NR_statmount
2304#endif
2305
22862306#ifdef __NR_statx
22872307# define SYS_statx __NR_statx
22882308#endif
lib/libc/include/generic-glibc/bits/syslog.h+12-2
......@@ -36,6 +36,15 @@ syslog (int __pri, const char *__fmt, ...)
3636{
3737 __syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
3838}
39#elif __fortify_use_clang && defined __USE_MISC
40__fortify_function_error_function __attribute_overloadable__ void
41syslog (int __pri, __fortify_clang_overload_arg (const char *, , __fmt), ...)
42{
43 __gnuc_va_list __fortify_ap;
44 __builtin_va_start (__fortify_ap, __fmt);
45 __vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __fortify_ap);
46 __builtin_va_end (__fortify_ap);
47}
3948#elif !defined __cplusplus
4049# define syslog(pri, ...) \
4150 __syslog_chk (pri, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
......@@ -43,8 +52,9 @@ syslog (int __pri, const char *__fmt, ...)
4352
4453
4554#ifdef __USE_MISC
46__fortify_function void
47vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
55__fortify_function __attribute_overloadable__ void
56vsyslog (int __pri, __fortify_clang_overload_arg (const char *, ,__fmt),
57 __gnuc_va_list __ap)
4858{
4959 __vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
5060}
lib/libc/include/generic-glibc/bits/time.h+1-1
......@@ -77,7 +77,7 @@ __BEGIN_DECLS
7777/* Tune a POSIX clock. */
7878extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2));
7979
80#ifdef __USE_TIME_BITS64
80#ifdef __USE_TIME64_REDIRECTS
8181# if defined(__REDIRECT_NTH)
8282extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id,
8383 struct timex *__utx),
lib/libc/include/generic-glibc/bits/timex.h+1-1
......@@ -25,7 +25,7 @@
2525
2626struct timex
2727{
28# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32)
28# if defined __USE_TIME64_REDIRECTS || (__TIMESIZE == 64 && __WORDSIZE == 32)
2929 unsigned int modes; /* mode selector */
3030 int :32; /* pad */
3131 long long offset; /* time offset (usec) */
lib/libc/include/generic-glibc/bits/types/struct_FILE.h+2-2
......@@ -92,10 +92,10 @@ struct _IO_FILE_complete
9292 struct _IO_wide_data *_wide_data;
9393 struct _IO_FILE *_freeres_list;
9494 void *_freeres_buf;
95 size_t __pad5;
95 struct _IO_FILE **_prevchain;
9696 int _mode;
9797 /* Make sure we don't get into trouble again. */
98 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
98 char _unused2[15 * sizeof (int) - 5 * sizeof (void *)];
9999};
100100
101101/* These macros are used by bits/stdio.h and internal headers. */
lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/generic-glibc/bits/types/struct_timespec.h+2-2
......@@ -10,14 +10,14 @@
1010 has nanoseconds instead of microseconds. */
1111struct timespec
1212{
13#ifdef __USE_TIME_BITS64
13#ifdef __USE_TIME64_REDIRECTS
1414 __time64_t tv_sec; /* Seconds. */
1515#else
1616 __time_t tv_sec; /* Seconds. */
1717#endif
1818#if __WORDSIZE == 64 \
1919 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
20 || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
20 || (__TIMESIZE == 32 && !defined __USE_TIME64_REDIRECTS)
2121 __syscall_slong_t tv_nsec; /* Nanoseconds. */
2222#else
2323# if __BYTE_ORDER == __BIG_ENDIAN
lib/libc/include/generic-glibc/bits/types/struct_timeval.h+1-1
......@@ -7,7 +7,7 @@
77 microsecond but also has a range of years. */
88struct timeval
99{
10#ifdef __USE_TIME_BITS64
10#ifdef __USE_TIME64_REDIRECTS
1111 __time64_t tv_sec; /* Seconds. */
1212 __suseconds64_t tv_usec; /* Microseconds. */
1313#else
lib/libc/include/generic-glibc/bits/types/time_t.h+1-1
......@@ -4,7 +4,7 @@
44#include <bits/types.h>
55
66/* Returned by `time'. */
7#ifdef __USE_TIME_BITS64
7#ifdef __USE_TIME64_REDIRECTS
88typedef __time64_t time_t;
99#else
1010typedef __time_t time_t;
lib/libc/include/generic-glibc/bits/typesizes.h+29-17
......@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 Free Software Foundation, Inc.
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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
......@@ -13,7 +13,7 @@
1313 Lesser General Public License for more details.
1414
1515 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
16 License along with the GNU C Library. If not, see
1717 <https://www.gnu.org/licenses/>. */
1818
1919#ifndef _BITS_TYPES_H
......@@ -25,44 +25,57 @@
2525
2626/* See <bits/types.h> for the meaning of these macros. This file exists so
2727 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
2849
2950#define __DEV_T_TYPE __UQUAD_TYPE
3051#define __UID_T_TYPE __U32_TYPE
3152#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
3353#define __INO64_T_TYPE __UQUAD_TYPE
3454#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
3756#define __OFF64_T_TYPE __SQUAD_TYPE
3857#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
4058#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
4259#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
4460#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
4661#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
4762#define __FSWORD_T_TYPE __SWORD_TYPE
4863#define __ID_T_TYPE __U32_TYPE
4964#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
5165#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
5366#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
5467#define __DADDR_T_TYPE __S32_TYPE
5568#define __KEY_T_TYPE __S32_TYPE
5669#define __CLOCKID_T_TYPE __S32_TYPE
5770#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
71#define __BLKSIZE_T_TYPE __S32_TYPE
5972#define __FSID_T_TYPE struct { int __val[2]; }
6073#define __SSIZE_T_TYPE __SWORD_TYPE
6174#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
6275#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
6376#define __CPU_MASK_TYPE __ULONGWORD_TYPE
6477
65#ifdef __LP64__
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
6679/* Tell the libc code that off_t and off64_t are actually the same type
6780 for all ABI purposes, even if possibly expressed as different base types
6881 for C type-checking purposes. */
......@@ -71,20 +84,19 @@
7184/* Same for ino_t and ino64_t. */
7285# define __INO_T_MATCHES_INO64_T 1
7386
74/* And for rlim_t and rlim64_t. */
87/* And for __rlim_t and __rlim64_t. */
7588# define __RLIM_T_MATCHES_RLIM64_T 1
7689
7790/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
7891# define __STATFS_MATCHES_STATFS64 1
7992
8093/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
8295#else
8396# define __RLIM_T_MATCHES_RLIM64_T 0
8497
8598# define __STATFS_MATCHES_STATFS64 0
8699
87/* And for getitimer, setitimer and rusage */
88100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89101#endif
90102
lib/libc/include/generic-glibc/bits/uio-ext.h+1
......@@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
4747#define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */
4848#define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */
4949#define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */
50#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */
5051
5152__END_DECLS
5253
lib/libc/include/generic-glibc/bits/unistd.h+82-28
......@@ -22,8 +22,12 @@
2222
2323# include <bits/unistd-decl.h>
2424
25__fortify_function __wur ssize_t
26read (int __fd, void *__buf, size_t __nbytes)
25__fortify_function __attribute_overloadable__ __wur ssize_t
26read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
27 __fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
28 "read called with bigger length than "
29 "size of the destination buffer")
30
2731{
2832 return __glibc_fortify (read, __nbytes, sizeof (char),
2933 __glibc_objsize0 (__buf),
......@@ -32,16 +36,24 @@ read (int __fd, void *__buf, size_t __nbytes)
3236
3337#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
3438# ifndef __USE_FILE_OFFSET64
35__fortify_function __wur ssize_t
36pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
39__fortify_function __attribute_overloadable__ __wur ssize_t
40pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
41 size_t __nbytes, __off_t __offset)
42 __fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
43 "pread called with bigger length than "
44 "size of the destination buffer")
3745{
3846 return __glibc_fortify (pread, __nbytes, sizeof (char),
3947 __glibc_objsize0 (__buf),
4048 __fd, __buf, __nbytes, __offset);
4149}
4250# else
43__fortify_function __wur ssize_t
44pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
51__fortify_function __attribute_overloadable__ __wur ssize_t
52pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
53 size_t __nbytes, __off64_t __offset)
54 __fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
55 "pread called with bigger length than "
56 "size of the destination buffer")
4557{
4658 return __glibc_fortify (pread64, __nbytes, sizeof (char),
4759 __glibc_objsize0 (__buf),
......@@ -50,8 +62,12 @@ pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
5062# endif
5163
5264# ifdef __USE_LARGEFILE64
53__fortify_function __wur ssize_t
54pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
65__fortify_function __attribute_overloadable__ __wur ssize_t
66pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
67 size_t __nbytes, __off64_t __offset)
68 __fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
69 "pread64 called with bigger length than "
70 "size of the destination buffer")
5571{
5672 return __glibc_fortify (pread64, __nbytes, sizeof (char),
5773 __glibc_objsize0 (__buf),
......@@ -61,9 +77,14 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
6177#endif
6278
6379#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
64__fortify_function __nonnull ((1, 2)) __wur ssize_t
65__NTH (readlink (const char *__restrict __path, char *__restrict __buf,
80__fortify_function __attribute_overloadable__ __nonnull ((1, 2)) __wur ssize_t
81__NTH (readlink (const char *__restrict __path,
82 __fortify_clang_overload_arg0 (char *, __restrict, __buf),
6683 size_t __len))
84 __fortify_clang_warning_only_if_bos_lt (__len, __buf,
85 "readlink called with bigger length "
86 "than size of destination buffer")
87
6788{
6889 return __glibc_fortify (readlink, __len, sizeof (char),
6990 __glibc_objsize (__buf),
......@@ -72,9 +93,13 @@ __NTH (readlink (const char *__restrict __path, char *__restrict __buf,
7293#endif
7394
7495#ifdef __USE_ATFILE
75__fortify_function __nonnull ((2, 3)) __wur ssize_t
96__fortify_function __attribute_overloadable__ __nonnull ((2, 3)) __wur ssize_t
7697__NTH (readlinkat (int __fd, const char *__restrict __path,
77 char *__restrict __buf, size_t __len))
98 __fortify_clang_overload_arg0 (char *, __restrict, __buf),
99 size_t __len))
100 __fortify_clang_warning_only_if_bos_lt (__len, __buf,
101 "readlinkat called with bigger length "
102 "than size of destination buffer")
78103{
79104 return __glibc_fortify (readlinkat, __len, sizeof (char),
80105 __glibc_objsize (__buf),
......@@ -82,8 +107,11 @@ __NTH (readlinkat (int __fd, const char *__restrict __path,
82107}
83108#endif
84109
85__fortify_function __wur char *
86__NTH (getcwd (char *__buf, size_t __size))
110__fortify_function __attribute_overloadable__ __wur char *
111__NTH (getcwd (__fortify_clang_overload_arg (char *, , __buf), size_t __size))
112 __fortify_clang_warning_only_if_bos_lt (__size, __buf,
113 "getcwd called with bigger length "
114 "than size of destination buffer")
87115{
88116 return __glibc_fortify (getcwd, __size, sizeof (char),
89117 __glibc_objsize (__buf),
......@@ -91,8 +119,9 @@ __NTH (getcwd (char *__buf, size_t __size))
91119}
92120
93121#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
94__fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char *
95__NTH (getwd (char *__buf))
122__fortify_function __attribute_overloadable__ __nonnull ((1))
123__attribute_deprecated__ __wur char *
124__NTH (getwd (__fortify_clang_overload_arg (char *,, __buf)))
96125{
97126 if (__glibc_objsize (__buf) != (size_t) -1)
98127 return __getwd_chk (__buf, __glibc_objsize (__buf));
......@@ -100,8 +129,12 @@ __NTH (getwd (char *__buf))
100129}
101130#endif
102131
103__fortify_function size_t
104__NTH (confstr (int __name, char *__buf, size_t __len))
132__fortify_function __attribute_overloadable__ size_t
133__NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
134 size_t __len))
135 __fortify_clang_warning_only_if_bos_lt (__len, __buf,
136 "confstr called with bigger length than "
137 "size of destination buffer")
105138{
106139 return __glibc_fortify (confstr, __len, sizeof (char),
107140 __glibc_objsize (__buf),
......@@ -109,8 +142,13 @@ __NTH (confstr (int __name, char *__buf, size_t __len))
109142}
110143
111144
112__fortify_function int
113__NTH (getgroups (int __size, __gid_t __list[]))
145__fortify_function __attribute_overloadable__ int
146__NTH (getgroups (int __size,
147 __fortify_clang_overload_arg (__gid_t *, , __list)))
148 __fortify_clang_warning_only_if_bos_lt (__size * sizeof (__gid_t), __list,
149 "getgroups called with bigger group "
150 "count than what can fit into "
151 "destination buffer")
114152{
115153 return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
116154 __glibc_objsize (__list),
......@@ -118,8 +156,13 @@ __NTH (getgroups (int __size, __gid_t __list[]))
118156}
119157
120158
121__fortify_function int
122__NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
159__fortify_function __attribute_overloadable__ int
160__NTH (ttyname_r (int __fd,
161 __fortify_clang_overload_arg (char *, ,__buf),
162 size_t __buflen))
163 __fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
164 "ttyname_r called with bigger buflen "
165 "than size of destination buffer")
123166{
124167 return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
125168 __glibc_objsize (__buf),
......@@ -128,8 +171,11 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
128171
129172
130173#ifdef __USE_POSIX199506
131__fortify_function int
132getlogin_r (char *__buf, size_t __buflen)
174__fortify_function __attribute_overloadable__ int
175getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
176 __fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
177 "getlogin_r called with bigger buflen "
178 "than size of destination buffer")
133179{
134180 return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
135181 __glibc_objsize (__buf),
......@@ -139,8 +185,12 @@ getlogin_r (char *__buf, size_t __buflen)
139185
140186
141187#if defined __USE_MISC || defined __USE_UNIX98
142__fortify_function int
143__NTH (gethostname (char *__buf, size_t __buflen))
188__fortify_function __attribute_overloadable__ int
189__NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
190 size_t __buflen))
191 __fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
192 "gethostname called with bigger buflen "
193 "than size of destination buffer")
144194{
145195 return __glibc_fortify (gethostname, __buflen, sizeof (char),
146196 __glibc_objsize (__buf),
......@@ -150,8 +200,12 @@ __NTH (gethostname (char *__buf, size_t __buflen))
150200
151201
152202#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98)
153__fortify_function int
154__NTH (getdomainname (char *__buf, size_t __buflen))
203__fortify_function __attribute_overloadable__ int
204__NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
205 size_t __buflen))
206 __fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
207 "getdomainname called with bigger "
208 "buflen than size of destination buffer")
155209{
156210 return __glibc_fortify (getdomainname, __buflen, sizeof (char),
157211 __glibc_objsize (__buf),
lib/libc/include/generic-glibc/bits/utmp.h+2-2
......@@ -36,7 +36,7 @@
3636struct lastlog
3737 {
3838#if __WORDSIZE_TIME64_COMPAT32
39 int32_t ll_time;
39 __uint32_t ll_time;
4040#else
4141 __time_t ll_time;
4242#endif
......@@ -76,7 +76,7 @@ struct utmp
7676 int32_t ut_session; /* Session ID, used for windowing. */
7777 struct
7878 {
79 int32_t tv_sec; /* Seconds. */
79 __uint32_t tv_sec; /* Seconds. */
8080 int32_t tv_usec; /* Microseconds. */
8181 } ut_tv; /* Time entry was made. */
8282#else
lib/libc/include/generic-glibc/bits/utmpx.h+1-1
......@@ -74,7 +74,7 @@ struct utmpx
7474 __int32_t ut_session; /* Session ID, used for windowing. */
7575 struct
7676 {
77 __int32_t tv_sec; /* Seconds. */
77 __uint32_t tv_sec; /* Seconds. */
7878 __int32_t tv_usec; /* Microseconds. */
7979 } ut_tv; /* Time entry was made. */
8080#else
lib/libc/include/generic-glibc/bits/wchar-ldbl.h+4-4
......@@ -29,7 +29,7 @@ __LDBL_REDIR_DECL (vwprintf);
2929__LDBL_REDIR_DECL (vswprintf);
3030# if !__GLIBC_USE (DEPRECATED_SCANF)
3131# if defined __LDBL_COMPAT
32# if __GLIBC_USE (C2X_STRTOL)
32# if __GLIBC_USE (C23_STRTOL)
3333__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc23_fwscanf)
3434__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc23_wscanf)
3535__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc23_swscanf)
......@@ -39,7 +39,7 @@ __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
3939__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
4040# endif
4141# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
42# if __GLIBC_USE (C2X_STRTOL)
42# if __GLIBC_USE (C23_STRTOL)
4343__LDBL_REDIR1_DECL (fwscanf, __isoc23_fwscanfieee128)
4444__LDBL_REDIR1_DECL (wscanf, __isoc23_wscanfieee128)
4545__LDBL_REDIR1_DECL (swscanf, __isoc23_swscanfieee128)
......@@ -66,7 +66,7 @@ __LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
6666# endif
6767# if !__GLIBC_USE (DEPRECATED_SCANF)
6868# if defined __LDBL_COMPAT
69# if __GLIBC_USE (C2X_STRTOL)
69# if __GLIBC_USE (C23_STRTOL)
7070__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc23_vfwscanf)
7171__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc23_vwscanf)
7272__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc23_vswscanf)
......@@ -76,7 +76,7 @@ __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
7676__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
7777# endif
7878# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
79# if __GLIBC_USE (C2X_STRTOL)
79# if __GLIBC_USE (C23_STRTOL)
8080__LDBL_REDIR1_DECL (vfwscanf, __isoc23_vfwscanfieee128)
8181__LDBL_REDIR1_DECL (vwscanf, __isoc23_vwscanfieee128)
8282__LDBL_REDIR1_DECL (vswscanf, __isoc23_vswscanfieee128)
lib/libc/include/generic-glibc/bits/wchar2.h+119-48
......@@ -20,17 +20,24 @@
2020# error "Never include <bits/wchar2.h> directly; use <wchar.h> instead."
2121#endif
2222
23__fortify_function wchar_t *
24__NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
25 size_t __n))
23__fortify_function __attribute_overloadable__ wchar_t *
24__NTH (wmemcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __s1),
25 const wchar_t *__restrict __s2, size_t __n))
26 __fortify_clang_warning_only_if_bos0_lt2 (__n, __s1, sizeof (wchar_t),
27 "wmemcpy called with length bigger "
28 "than size of destination buffer")
2629{
2730 return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
2831 __glibc_objsize0 (__s1),
2932 __s1, __s2, __n);
3033}
3134
32__fortify_function wchar_t *
33__NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
35__fortify_function __attribute_overloadable__ wchar_t *
36__NTH (wmemmove (__fortify_clang_overload_arg (wchar_t *, ,__s1),
37 const wchar_t *__s2, size_t __n))
38 __fortify_clang_warning_only_if_bos0_lt2 (__n, __s1, sizeof (wchar_t),
39 "wmemmove called with length bigger "
40 "than size of destination buffer")
3441{
3542 return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
3643 __glibc_objsize0 (__s1),
......@@ -38,9 +45,12 @@ __NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
3845}
3946
4047#ifdef __USE_GNU
41__fortify_function wchar_t *
42__NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
43 size_t __n))
48__fortify_function __attribute_overloadable__ wchar_t *
49__NTH (wmempcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __s1),
50 const wchar_t *__restrict __s2, size_t __n))
51 __fortify_clang_warning_only_if_bos0_lt2 (__n, __s1, sizeof (wchar_t),
52 "wmempcpy called with length bigger "
53 "than size of destination buffer")
4454{
4555 return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
4656 __glibc_objsize0 (__s1),
......@@ -48,16 +58,21 @@ __NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
4858}
4959#endif
5060
51__fortify_function wchar_t *
52__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
61__fortify_function __attribute_overloadable__ wchar_t *
62__NTH (wmemset (__fortify_clang_overload_arg (wchar_t *, ,__s), wchar_t __c,
63 size_t __n))
64 __fortify_clang_warning_only_if_bos0_lt2 (__n, __s, sizeof (wchar_t),
65 "wmemset called with length bigger "
66 "than size of destination buffer")
5367{
5468 return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
5569 __glibc_objsize0 (__s),
5670 __s, __c, __n);
5771}
5872
59__fortify_function wchar_t *
60__NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
73__fortify_function __attribute_overloadable__ wchar_t *
74__NTH (wcscpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
75 const wchar_t *__restrict __src))
6176{
6277 size_t sz = __glibc_objsize (__dest);
6378 if (sz != (size_t) -1)
......@@ -65,8 +80,9 @@ __NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
6580 return __wcscpy_alias (__dest, __src);
6681}
6782
68__fortify_function wchar_t *
69__NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
83__fortify_function __attribute_overloadable__ wchar_t *
84__NTH (wcpcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
85 const wchar_t *__restrict __src))
7086{
7187 size_t sz = __glibc_objsize (__dest);
7288 if (sz != (size_t) -1)
......@@ -74,26 +90,33 @@ __NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
7490 return __wcpcpy_alias (__dest, __src);
7591}
7692
77__fortify_function wchar_t *
78__NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
79 size_t __n))
93__fortify_function __attribute_overloadable__ wchar_t *
94__NTH (wcsncpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
95 const wchar_t *__restrict __src, size_t __n))
96 __fortify_clang_warning_only_if_bos0_lt2 (__n, __dest, sizeof (wchar_t),
97 "wcsncpy called with length bigger "
98 "than size of destination buffer")
8099{
81100 return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
82101 __glibc_objsize (__dest),
83102 __dest, __src, __n);
84103}
85104
86__fortify_function wchar_t *
87__NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
88 size_t __n))
105__fortify_function __attribute_overloadable__ wchar_t *
106__NTH (wcpncpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
107 const wchar_t *__restrict __src, size_t __n))
108 __fortify_clang_warning_only_if_bos0_lt2 (__n, __dest, sizeof (wchar_t),
109 "wcpncpy called with length bigger "
110 "than size of destination buffer")
89111{
90112 return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
91113 __glibc_objsize (__dest),
92114 __dest, __src, __n);
93115}
94116
95__fortify_function wchar_t *
96__NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
117__fortify_function __attribute_overloadable__ wchar_t *
118__NTH (wcscat (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
119 const wchar_t *__restrict __src))
97120{
98121 size_t sz = __glibc_objsize (__dest);
99122 if (sz != (size_t) -1)
......@@ -101,9 +124,9 @@ __NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
101124 return __wcscat_alias (__dest, __src);
102125}
103126
104__fortify_function wchar_t *
105__NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
106 size_t __n))
127__fortify_function __attribute_overloadable__ wchar_t *
128__NTH (wcsncat (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
129 const wchar_t *__restrict __src, size_t __n))
107130{
108131 size_t sz = __glibc_objsize (__dest);
109132 if (sz != (size_t) -1)
......@@ -112,9 +135,12 @@ __NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
112135}
113136
114137#ifdef __USE_MISC
115__fortify_function size_t
116__NTH (wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
117 size_t __n))
138__fortify_function __attribute_overloadable__ size_t
139__NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
140 const wchar_t *__restrict __src, size_t __n))
141 __fortify_clang_warning_only_if_bos0_lt2 (__n, __dest, sizeof (wchar_t),
142 "wcslcpy called with length bigger "
143 "than size of destination buffer")
118144{
119145 if (__glibc_objsize (__dest) != (size_t) -1
120146 && (!__builtin_constant_p (__n
......@@ -125,9 +151,9 @@ __NTH (wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
125151 return __wcslcpy_alias (__dest, __src, __n);
126152}
127153
128__fortify_function size_t
129__NTH (wcslcat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
130 size_t __n))
154__fortify_function __attribute_overloadable__ size_t
155__NTH (wcslcat (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
156 const wchar_t *__restrict __src, size_t __n))
131157{
132158 if (__glibc_objsize (__dest) != (size_t) -1
133159 && (!__builtin_constant_p (__n > __glibc_objsize (__dest)
......@@ -150,6 +176,23 @@ __NTH (swprintf (wchar_t *__restrict __s, size_t __n,
150176 sz / sizeof (wchar_t), __fmt, __va_arg_pack ());
151177 return __swprintf_alias (__s, __n, __fmt, __va_arg_pack ());
152178}
179#elif __fortify_use_clang
180__fortify_function_error_function __attribute_overloadable__ int
181__NTH (swprintf (__fortify_clang_overload_arg (wchar_t *, __restrict, __s),
182 size_t __n, const wchar_t *__restrict __fmt, ...))
183{
184 __gnuc_va_list __fortify_ap;
185 __builtin_va_start (__fortify_ap, __fmt);
186 int __r;
187 if (__glibc_objsize (__s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
188 __r = __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
189 __glibc_objsize (__s) / sizeof (wchar_t),
190 __fmt, __fortify_ap);
191 else
192 __r = __vswprintf_alias (__s, __n, __fmt, __fortify_ap);
193 __builtin_va_end (__fortify_ap);
194 return __r;
195}
153196#elif !defined __cplusplus
154197/* XXX We might want to have support in gcc for swprintf. */
155198# define swprintf(s, n, ...) \
......@@ -207,34 +250,46 @@ vfwprintf (__FILE *__restrict __stream,
207250}
208251
209252#endif
210__fortify_function __wur wchar_t *
211fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
253__fortify_function __attribute_overloadable__ __wur wchar_t *
254fgetws (__fortify_clang_overload_arg (wchar_t *, __restrict, __s), int __n,
255 __FILE *__restrict __stream)
256 __fortify_clang_warning_only_if_bos_lt2 (__n, __s, sizeof (wchar_t),
257 "fgetws called with length bigger "
258 "than size of destination buffer")
212259{
213260 size_t sz = __glibc_objsize (__s);
214261 if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz))
215262 return __fgetws_alias (__s, __n, __stream);
263#if !__fortify_use_clang
216264 if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz))
217265 return __fgetws_chk_warn (__s, sz / sizeof (wchar_t), __n, __stream);
266#endif
218267 return __fgetws_chk (__s, sz / sizeof (wchar_t), __n, __stream);
219268}
220269
221270#ifdef __USE_GNU
222__fortify_function __wur wchar_t *
223fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
271__fortify_function __attribute_overloadable__ __wur wchar_t *
272fgetws_unlocked (__fortify_clang_overload_arg (wchar_t *, __restrict, __s),
273 int __n, __FILE *__restrict __stream)
274 __fortify_clang_warning_only_if_bos_lt2 (__n, __s, sizeof (wchar_t),
275 "fgetws_unlocked called with length bigger "
276 "than size of destination buffer")
224277{
225278 size_t sz = __glibc_objsize (__s);
226279 if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz))
227280 return __fgetws_unlocked_alias (__s, __n, __stream);
281# if !__fortify_use_clang
228282 if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz))
229283 return __fgetws_unlocked_chk_warn (__s, sz / sizeof (wchar_t), __n,
230284 __stream);
285# endif
231286 return __fgetws_unlocked_chk (__s, sz / sizeof (wchar_t), __n, __stream);
232287}
233288#endif
234289
235__fortify_function __wur size_t
236__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
237 mbstate_t *__restrict __ps))
290__fortify_function __attribute_overloadable__ __wur size_t
291__NTH (wcrtomb (__fortify_clang_overload_arg (char *, __restrict, __s),
292 wchar_t __wchar, mbstate_t *__restrict __ps))
238293{
239294 /* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
240295 But this would only disturb the namespace. So we define our own
......@@ -249,18 +304,26 @@ __NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
249304 return __wcrtomb_alias (__s, __wchar, __ps);
250305}
251306
252__fortify_function size_t
253__NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
307__fortify_function __attribute_overloadable__ size_t
308__NTH (mbsrtowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst),
309 const char **__restrict __src,
254310 size_t __len, mbstate_t *__restrict __ps))
311 __fortify_clang_warning_only_if_bos_lt2 (__len, __dst, sizeof (wchar_t),
312 "mbsrtowcs called with dst buffer "
313 "smaller than len * sizeof (wchar_t)")
255314{
256315 return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
257316 __glibc_objsize (__dst),
258317 __dst, __src, __len, __ps);
259318}
260319
261__fortify_function size_t
262__NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
320__fortify_function __attribute_overloadable__ size_t
321__NTH (wcsrtombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
322 const wchar_t **__restrict __src,
263323 size_t __len, mbstate_t *__restrict __ps))
324 __fortify_clang_warning_only_if_bos_lt (__len, __dst,
325 "wcsrtombs called with dst buffer "
326 "smaller than len")
264327{
265328 return __glibc_fortify (wcsrtombs, __len, sizeof (char),
266329 __glibc_objsize (__dst),
......@@ -269,18 +332,26 @@ __NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
269332
270333
271334#ifdef __USE_XOPEN2K8
272__fortify_function size_t
273__NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
274 size_t __nmc, size_t __len, mbstate_t *__restrict __ps))
335__fortify_function __attribute_overloadable__ size_t
336__NTH (mbsnrtowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst),
337 const char **__restrict __src, size_t __nmc, size_t __len,
338 mbstate_t *__restrict __ps))
339 __fortify_clang_warning_only_if_bos_lt (sizeof (wchar_t) * __len, __dst,
340 "mbsnrtowcs called with dst buffer "
341 "smaller than len * sizeof (wchar_t)")
275342{
276343 return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
277344 __glibc_objsize (__dst),
278345 __dst, __src, __nmc, __len, __ps);
279346}
280347
281__fortify_function size_t
282__NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
283 size_t __nwc, size_t __len, mbstate_t *__restrict __ps))
348__fortify_function __attribute_overloadable__ size_t
349__NTH (wcsnrtombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
350 const wchar_t **__restrict __src, size_t __nwc,
351 size_t __len, mbstate_t *__restrict __ps))
352 __fortify_clang_warning_only_if_bos_lt (__len, __dst,
353 "wcsnrtombs called with dst buffer "
354 "smaller than len")
284355{
285356 return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
286357 __glibc_objsize (__dst),
lib/libc/include/generic-glibc/bits/wordsize.h+1-5
......@@ -19,11 +19,7 @@
1919
2020#define __WORDSIZE _MIPS_SZPTR
2121
22#if _MIPS_SIM == _ABI64
23# define __WORDSIZE_TIME64_COMPAT32 1
24#else
25# define __WORDSIZE_TIME64_COMPAT32 0
26#endif
22#define __WORDSIZE_TIME64_COMPAT32 1
2723
2824#if __WORDSIZE == 32
2925#define __WORDSIZE32_SIZE_ULONG 0
lib/libc/include/generic-glibc/elf.h+32-1
......@@ -831,6 +831,10 @@ typedef struct
831831 control. */
832832#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
833833 enabled keys. */
834#define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers. */
835#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
836#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
837#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
834838#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
835839#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
836840#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
......@@ -1234,6 +1238,10 @@ typedef struct
12341238#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */
12351239#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */
12361240
1241/* More machine-dependent hints about processor capabilities. */
1242#define AT_HWCAP3 29 /* extension of AT_HWCAP. */
1243#define AT_HWCAP4 30 /* extension of AT_HWCAP. */
1244
12371245#define AT_EXECFN 31 /* Filename of executable. */
12381246
12391247/* Pointer to the global system page used for system calls and other
......@@ -1333,9 +1341,13 @@ typedef struct
13331341#define NT_GNU_PROPERTY_TYPE_0 5
13341342
13351343/* Packaging metadata as defined on
1336 https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
1344 https://systemd.io/ELF_PACKAGE_METADATA/ */
13371345#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
13381346
1347/* dlopen metadata as defined on
1348 https://systemd.io/ELF_DLOPEN_METADATA/ */
1349#define NT_FDO_DLOPEN_METADATA 0x407c0c0a
1350
13391351/* Note section name of program property. */
13401352#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
13411353
......@@ -4237,6 +4249,8 @@ enum
42374249#define R_LARCH_TLS_TPREL32 10
42384250#define R_LARCH_TLS_TPREL64 11
42394251#define R_LARCH_IRELATIVE 12
4252#define R_LARCH_TLS_DESC32 13
4253#define R_LARCH_TLS_DESC64 14
42404254
42414255/* Reserved for future relocs that the dynamic linker must understand. */
42424256
......@@ -4331,6 +4345,23 @@ enum
43314345#define R_LARCH_ADD_ULEB128 107
43324346#define R_LARCH_SUB_ULEB128 108
43334347#define R_LARCH_64_PCREL 109
4348#define R_LARCH_CALL36 110
4349#define R_LARCH_TLS_DESC_PC_HI20 111
4350#define R_LARCH_TLS_DESC_PC_LO12 112
4351#define R_LARCH_TLS_DESC64_PC_LO20 113
4352#define R_LARCH_TLS_DESC64_PC_HI12 114
4353#define R_LARCH_TLS_DESC_HI20 115
4354#define R_LARCH_TLS_DESC_LO12 116
4355#define R_LARCH_TLS_DESC64_LO20 117
4356#define R_LARCH_TLS_DESC64_HI12 118
4357#define R_LARCH_TLS_DESC_LD 119
4358#define R_LARCH_TLS_DESC_CALL 120
4359#define R_LARCH_TLS_LE_HI20_R 121
4360#define R_LARCH_TLS_LE_ADD_R 122
4361#define R_LARCH_TLS_LE_LO12_R 123
4362#define R_LARCH_TLS_LD_PCREL20_S2 124
4363#define R_LARCH_TLS_GD_PCREL20_S2 125
4364#define R_LARCH_TLS_DESC_PCREL20_S2 126
43344365
43354366/* ARC specific declarations. */
43364367
lib/libc/include/generic-glibc/fcntl.h+3-4
......@@ -177,7 +177,7 @@ typedef __pid_t pid_t;
177177
178178 This function is a cancellation point and therefore not marked with
179179 __THROW. */
180#ifndef __USE_TIME_BITS64
180#ifndef __USE_TIME64_REDIRECTS
181181# ifndef __USE_FILE_OFFSET64
182182extern int fcntl (int __fd, int __cmd, ...);
183183# else
......@@ -190,7 +190,7 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
190190# ifdef __USE_LARGEFILE64
191191extern int fcntl64 (int __fd, int __cmd, ...);
192192# endif
193#else /* __USE_TIME_BITS64 */
193#else /* __USE_TIME64_REDIRECTS */
194194# ifdef __REDIRECT
195195extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...),
196196 __fcntl_time64);
......@@ -345,8 +345,7 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
345345
346346
347347/* Define some inlines helping to catch common problems. */
348#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
349 && defined __va_arg_pack_len
348#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
350349# include <bits/fcntl2.h>
351350#endif
352351
lib/libc/include/generic-glibc/features-time64.h+7-2
......@@ -24,9 +24,8 @@
2424# if _TIME_BITS == 64
2525# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
2626# error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
27# elif __TIMESIZE == 32
28# define __USE_TIME_BITS64 1
2927# endif
28# define __USE_TIME_BITS64 1
3029# elif _TIME_BITS == 32
3130# if __TIMESIZE > 32
3231# error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
......@@ -34,4 +33,10 @@
3433# else
3534# error Invalid _TIME_BITS value (can only be 32 or 64-bit)
3635# endif
36#elif __TIMESIZE == 64
37# define __USE_TIME_BITS64 1
38#endif
39
40#if defined __USE_TIME_BITS64 && __TIMESIZE == 32
41# define __USE_TIME64_REDIRECTS 1
3742#endif
\ No newline at end of file
lib/libc/include/generic-glibc/features.h+28-20
......@@ -24,7 +24,8 @@
2424 __STRICT_ANSI__ ISO Standard C.
2525 _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
2626 _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
27 _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
27 _ISOC23_SOURCE Extensions to ISO C99 from ISO C23.
28 _ISOC2X_SOURCE Old name for _ISOC23_SOURCE.
2829 __STDC_WANT_LIB_EXT2__
2930 Extensions to ISO C99 from TR 27431-2:2010.
3031 __STDC_WANT_IEC_60559_BFP_EXT__
......@@ -34,7 +35,7 @@
3435 __STDC_WANT_IEC_60559_TYPES_EXT__
3536 Extensions to ISO C11 from TS 18661-3:2015.
3637 __STDC_WANT_IEC_60559_EXT__
37 ISO C2X interfaces defined only in Annex F.
38 ISO C23 interfaces defined only in Annex F.
3839
3940 _POSIX_SOURCE IEEE Std 1003.1.
4041 _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
......@@ -148,10 +149,10 @@
148149#undef __USE_GNU
149150#undef __USE_FORTIFY_LEVEL
150151#undef __KERNEL_STRICT_NAMES
151#undef __GLIBC_USE_ISOC2X
152#undef __GLIBC_USE_ISOC23
152153#undef __GLIBC_USE_DEPRECATED_GETS
153154#undef __GLIBC_USE_DEPRECATED_SCANF
154#undef __GLIBC_USE_C2X_STRTOL
155#undef __GLIBC_USE_C23_STRTOL
155156
156157/* Suppress kernel-name space pollution unless user expressedly asks
157158 for it. */
......@@ -206,6 +207,13 @@
206207# define _DEFAULT_SOURCE 1
207208#endif
208209
210/* Remap the old name _ISOC2X_SOURCE to _ISOC23_SOURCE. */
211#ifdef _ISOC2X_SOURCE
212# undef _ISOC2X_SOURCE
213# undef _ISOC23_SOURCE
214# define _ISOC23_SOURCE 1
215#endif
216
209217/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
210218#ifdef _GNU_SOURCE
211219# undef _ISOC95_SOURCE
......@@ -214,8 +222,8 @@
214222# define _ISOC99_SOURCE 1
215223# undef _ISOC11_SOURCE
216224# define _ISOC11_SOURCE 1
217# undef _ISOC2X_SOURCE
218# define _ISOC2X_SOURCE 1
225# undef _ISOC23_SOURCE
226# define _ISOC23_SOURCE 1
219227# undef _POSIX_SOURCE
220228# define _POSIX_SOURCE 1
221229# undef _POSIX_C_SOURCE
......@@ -244,37 +252,37 @@
244252#if (defined _DEFAULT_SOURCE \
245253 || (!defined __STRICT_ANSI__ \
246254 && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
247 && !defined _ISOC2X_SOURCE \
255 && !defined _ISOC23_SOURCE \
248256 && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
249257 && !defined _XOPEN_SOURCE))
250258# undef _DEFAULT_SOURCE
251259# define _DEFAULT_SOURCE 1
252260#endif
253261
254/* This is to enable the ISO C2X extension. */
255#if (defined _ISOC2X_SOURCE \
262/* This is to enable the ISO C23 extension. */
263#if (defined _ISOC23_SOURCE \
256264 || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
257# define __GLIBC_USE_ISOC2X 1
265# define __GLIBC_USE_ISOC23 1
258266#else
259# define __GLIBC_USE_ISOC2X 0
267# define __GLIBC_USE_ISOC23 0
260268#endif
261269
262270/* This is to enable the ISO C11 extension. */
263#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
271#if (defined _ISOC11_SOURCE || defined _ISOC23_SOURCE \
264272 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
265273# define __USE_ISOC11 1
266274#endif
267275
268276/* This is to enable the ISO C99 extension. */
269277#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
270 || defined _ISOC2X_SOURCE \
278 || defined _ISOC23_SOURCE \
271279 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
272280# define __USE_ISOC99 1
273281#endif
274282
275283/* This is to enable the ISO C90 Amendment 1:1995 extension. */
276284#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
277 || defined _ISOC2X_SOURCE \
285 || defined _ISOC23_SOURCE \
278286 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
279287# define __USE_ISOC95 1
280288#endif
......@@ -486,18 +494,18 @@
486494 * glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
487495 */
488496#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
489/* ISO C2X added support for a 0b or 0B prefix on binary constants as
497/* ISO C23 added support for a 0b or 0B prefix on binary constants as
490498 inputs to strtol-family functions (base 0 or 2). This macro is
491499 used to condition redirection in headers to allow that redirection
492500 to be disabled when building those functions, despite _GNU_SOURCE
493501 being defined. */
494#if __GLIBC_USE (ISOC2X)
495# define __GLIBC_USE_C2X_STRTOL 1
502#if __GLIBC_USE (ISOC23)
503# define __GLIBC_USE_C23_STRTOL 1
496504#else
497# define __GLIBC_USE_C2X_STRTOL 0
505# define __GLIBC_USE_C23_STRTOL 0
498506#endif
499507#else /* glibc 2.37 or lower */
500# define __GLIBC_USE_C2X_STRTOL 0
508# define __GLIBC_USE_C23_STRTOL 0
501509#endif
502510
503511/* Get definitions of __STDC_* predefined macros, if the compiler has
......@@ -543,4 +551,4 @@
543551#include <gnu/stubs.h>
544552
545553
546#endif /* features.h */
554#endif /* features.h */
\ No newline at end of file
lib/libc/include/generic-glibc/fenv.h+4-4
......@@ -77,7 +77,7 @@ extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW;
7777/* Raise the supported exceptions represented by EXCEPTS. */
7878extern int feraiseexcept (int __excepts) __THROW;
7979
80#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
80#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8181/* Set the supported exception flags represented by EXCEPTS, without
8282 causing enabled traps to be taken. */
8383extern int fesetexcept (int __excepts) __THROW;
......@@ -91,7 +91,7 @@ extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
9191 currently set. */
9292extern int fetestexcept (int __excepts) __THROW;
9393
94#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
94#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
9595/* Determine which of subset of the exceptions specified by EXCEPTS
9696 are set in *FLAGP. */
9797extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
......@@ -130,7 +130,7 @@ extern int feupdateenv (const fenv_t *__envp) __THROW;
130130
131131/* Control modes. */
132132
133#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
133#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
134134/* Store the current floating-point control modes in the object
135135 pointed to by MODEP. */
136136extern int fegetmode (femode_t *__modep) __THROW;
......@@ -143,7 +143,7 @@ extern int fesetmode (const femode_t *__modep) __THROW;
143143
144144/* NaN support. */
145145
146#if (__GLIBC_USE (IEC_60559_BFP_EXT_C2X) \
146#if (__GLIBC_USE (IEC_60559_BFP_EXT_C23) \
147147 && defined FE_INVALID \
148148 && defined __SUPPORT_SNAN__)
149149# define FE_SNANS_ALWAYS_SIGNAL 1
lib/libc/include/generic-glibc/fts.h+3-3
......@@ -187,7 +187,7 @@ FTSENT *fts_read (FTS *);
187187int fts_set (FTS *, FTSENT *, int) __THROW;
188188#else
189189# ifdef __REDIRECT
190# ifndef __USE_TIME_BITS64
190# ifndef __USE_TIME64_REDIRECTS
191191FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
192192int __REDIRECT (fts_close, (FTS *), fts64_close);
193193FTS *__REDIRECT (fts_open, (char * const *, int,
......@@ -206,7 +206,7 @@ int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
206206 __fts64_set_time64);
207207# endif
208208# else
209# ifndef __USE_TIME_BITS64
209# ifndef __USE_TIME64_REDIRECTS
210210# define fts_children fts64_children
211211# define fts_close fts64_close
212212# define fts_open fts64_open
......@@ -217,7 +217,7 @@ int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
217217# endif
218218#endif
219219#ifdef __USE_LARGEFILE64
220# ifndef __USE_TIME_BITS64
220# ifndef __USE_TIME64_REDIRECTS
221221FTSENT64 *fts64_children (FTS64 *, int);
222222int fts64_close (FTS64 *);
223223FTS64 *fts64_open (char * const *, int,
lib/libc/include/generic-glibc/ftw.h+6-6
......@@ -137,7 +137,7 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
137137 __nonnull ((1, 2));
138138#else
139139# ifdef __REDIRECT
140# ifndef __USE_TIME_BITS64
140# ifndef __USE_TIME64_REDIRECTS
141141extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
142142 int __descriptors), ftw64) __nonnull ((1, 2));
143143# else
......@@ -146,7 +146,7 @@ extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
146146 __nonnull ((1, 2));
147147# endif
148148# else
149# ifndef __USE_TIME_BITS64
149# ifndef __USE_TIME64_REDIRECTS
150150# define ftw ftw64
151151# else
152152# define ftw __ftw64_time64
......@@ -154,7 +154,7 @@ extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
154154# endif
155155#endif
156156#ifdef __USE_LARGEFILE64
157# ifndef __USE_TIME_BITS64
157# ifndef __USE_TIME64_REDIRECTS
158158extern int ftw64 (const char *__dir, __ftw64_func_t __func,
159159 int __descriptors) __nonnull ((1, 2));
160160# else
......@@ -180,7 +180,7 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
180180 int __flag) __nonnull ((1, 2));
181181# else
182182# ifdef __REDIRECT
183# ifndef __USE_TIME_BITS64
183# ifndef __USE_TIME64_REDIRECTS
184184extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
185185 int __descriptors, int __flag), nftw64)
186186 __nonnull ((1, 2));
......@@ -190,7 +190,7 @@ extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
190190 __nonnull ((1, 2));
191191# endif
192192# else
193# ifndef __USE_TIME_BITS64
193# ifndef __USE_TIME64_REDIRECTS
194194# define nftw nftw64
195195# else
196196# define nftw __nftw64_time64
......@@ -198,7 +198,7 @@ extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
198198# endif
199199# endif
200200# ifdef __USE_LARGEFILE64
201# ifndef __USE_TIME_BITS64
201# ifndef __USE_TIME64_REDIRECTS
202202extern int nftw64 (const char *__dir, __nftw64_func_t __func,
203203 int __descriptors, int __flag) __nonnull ((1, 2));
204204# else
lib/libc/include/generic-glibc/glob.h+2-2
......@@ -150,7 +150,7 @@ extern int glob (const char *__restrict __pattern, int __flags,
150150/* Free storage allocated in PGLOB by a previous `glob' call. */
151151extern void globfree (glob_t *__pglob) __THROW;
152152#else
153# ifdef __USE_TIME_BITS64
153# ifdef __USE_TIME64_REDIRECTS
154154extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
155155 int __flags,
156156 int (*__errfunc) (const char *, int),
......@@ -170,7 +170,7 @@ extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
170170#endif
171171
172172#ifdef __USE_LARGEFILE64
173# ifdef __USE_TIME_BITS64
173# ifdef __USE_TIME64_REDIRECTS
174174extern int __REDIRECT_NTHNL (glob64, (const char *__restrict __pattern,
175175 int __flags,
176176 int (*__errfunc) (const char *, int),
lib/libc/include/generic-glibc/gnu/lib-names-32.h+2-1
......@@ -3,7 +3,8 @@
33# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
44#endif
55
6#define LD_SO "ld.so.1"
6#define LD_LINUX_SO "ld-linux.so.2"
7#define LD_SO "ld-linux.so.2"
78#define LIBANL_SO "libanl.so.1"
89#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
910#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
lib/libc/include/generic-glibc/inttypes.h+3-3
......@@ -165,7 +165,7 @@ typedef wchar_t __gwchar_t;
165165# define PRIXPTR __PRIPTR_PREFIX "X"
166166
167167/* Binary notation. */
168# if __GLIBC_USE (ISOC2X)
168# if __GLIBC_USE (ISOC23)
169169# define PRIb8 "b"
170170# define PRIb16 "b"
171171# define PRIb32 "b"
......@@ -303,7 +303,7 @@ typedef wchar_t __gwchar_t;
303303
304304
305305/* Binary notation. */
306# if __GLIBC_USE (ISOC2X)
306# if __GLIBC_USE (ISOC23)
307307# define SCNb8 "hhb"
308308# define SCNb16 "hb"
309309# define SCNb32 "b"
......@@ -374,7 +374,7 @@ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
374374
375375/* Versions of the above functions that handle '0b' and '0B' prefixes
376376 in base 0 or 2. */
377#if __GLIBC_USE (C2X_STRTOL)
377#if __GLIBC_USE (C23_STRTOL)
378378# ifdef __REDIRECT
379379extern intmax_t __REDIRECT_NTH (strtoimax, (const char *__restrict __nptr,
380380 char **__restrict __endptr,
lib/libc/include/generic-glibc/limits.h+3-3
......@@ -142,7 +142,7 @@
142142/* The integer width macros are not defined by GCC's <limits.h> before
143143 GCC 7, or if _GNU_SOURCE rather than
144144 __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */
145#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
145#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
146146# ifndef CHAR_WIDTH
147147# define CHAR_WIDTH 8
148148# endif
......@@ -179,9 +179,9 @@
179179#endif /* Use IEC_60559_BFP_EXT. */
180180
181181/* The macros for _Bool are not defined by GCC's <limits.h> before GCC
182 11, or if _GNU_SOURCE is defined rather than enabling C2x support
182 11, or if _GNU_SOURCE is defined rather than enabling C23 support
183183 with -std. */
184#if __GLIBC_USE (ISOC2X)
184#if __GLIBC_USE (ISOC23)
185185# ifndef BOOL_MAX
186186# define BOOL_MAX 1
187187# endif
lib/libc/include/generic-glibc/math.h+12-12
......@@ -114,37 +114,37 @@ __BEGIN_DECLS
114114#endif
115115#if (__HAVE_FLOAT16 \
116116 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
117 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
117 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
118118# define SNANF16 (__builtin_nansf16 (""))
119119#endif
120120#if (__HAVE_FLOAT32 \
121121 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
122 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
122 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
123123# define SNANF32 (__builtin_nansf32 (""))
124124#endif
125125#if (__HAVE_FLOAT64 \
126126 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
127 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
127 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
128128# define SNANF64 (__builtin_nansf64 (""))
129129#endif
130130#if (__HAVE_FLOAT128 \
131131 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
132 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
132 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
133133# define SNANF128 (__builtin_nansf128 (""))
134134#endif
135135#if (__HAVE_FLOAT32X \
136136 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
137 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
137 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
138138# define SNANF32X (__builtin_nansf32x (""))
139139#endif
140140#if (__HAVE_FLOAT64X \
141141 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
142 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
142 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
143143# define SNANF64X (__builtin_nansf64x (""))
144144#endif
145145#if (__HAVE_FLOAT128X \
146146 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
147 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
147 && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
148148# define SNANF128X (__builtin_nansf128x (""))
149149#endif
150150
......@@ -214,7 +214,7 @@ typedef _Float128x double_t;
214214# define FP_ILOGBNAN 2147483647
215215# endif
216216#endif
217#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
217#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
218218# if __WORDSIZE == 32
219219# define __FP_LONG_MAX 0x7fffffffL
220220# else
......@@ -246,7 +246,7 @@ typedef _Float128x double_t;
246246
247247#include <bits/fp-fast.h>
248248
249#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
249#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
250250/* Rounding direction macros for fromfp functions. */
251251enum
252252 {
......@@ -558,7 +558,7 @@ extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
558558#define __MATHCALL_NARROW(func, redir, nargs) \
559559 __MATHCALL_NARROW_NORMAL (func, nargs)
560560
561#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
561#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
562562
563563# define _Mret_ float
564564# define _Marg_ double
......@@ -1051,7 +1051,7 @@ enum
10511051
10521052#endif /* Use ISO C99. */
10531053
1054#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
1054#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
10551055# include <bits/iscanonical.h>
10561056
10571057/* Return nonzero value if X is a signaling NaN. */
......@@ -1332,7 +1332,7 @@ iszero (__T __val)
13321332# endif
13331333#endif
13341334
1335#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
1335#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
13361336/* An expression whose type has the widest of the evaluation formats
13371337 of X and Y (which are of floating-point types). */
13381338# if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64
lib/libc/include/generic-glibc/mqueue.h+2-3
......@@ -71,7 +71,7 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
7171 unsigned int __msg_prio) __nonnull ((2));
7272
7373#ifdef __USE_XOPEN2K
74# ifndef __USE_TIME_BITS64
74# ifndef __USE_TIME64_REDIRECTS
7575/* Receive the oldest from highest priority messages in message queue
7676 MQDES, stop waiting if ABS_TIMEOUT expires. */
7777extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr,
......@@ -110,8 +110,7 @@ extern int __REDIRECT (mq_timedsend, (mqd_t __mqdes,
110110#endif
111111
112112/* Define some inlines helping to catch common problems. */
113#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
114 && defined __va_arg_pack_len
113#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
115114# include <bits/mqueue2.h>
116115#endif
117116
lib/libc/include/generic-glibc/net/if_packet.h+1-1
......@@ -26,7 +26,7 @@
2626 From Linux 2.1 the AF_PACKET interface is preferred and you should
2727 consider using it in place of this one. */
2828
29struct sockaddr_pkt
29struct __attribute_struct_may_alias__ sockaddr_pkt
3030 {
3131 __SOCKADDR_COMMON (spkt_);
3232 unsigned char spkt_device[14];
lib/libc/include/generic-glibc/netash/ash.h+1-1
......@@ -22,7 +22,7 @@
2222#include <features.h>
2323#include <bits/sockaddr.h>
2424
25struct sockaddr_ash
25struct __attribute_struct_may_alias__ sockaddr_ash
2626 {
2727 __SOCKADDR_COMMON (sash_); /* Common data: address family etc. */
2828 int sash_ifindex; /* Interface to use. */
lib/libc/include/generic-glibc/netdb.h+1-1
......@@ -701,7 +701,7 @@ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
701701extern int gai_suspend (const struct gaicb *const __list[], int __ent,
702702 const struct timespec *__timeout);
703703
704# ifdef __USE_TIME_BITS64
704# ifdef __USE_TIME64_REDIRECTS
705705# if defined(__REDIRECT)
706706extern int __REDIRECT (gai_suspend, (const struct gaicb *const __list[],
707707 int __ent,
lib/libc/include/generic-glibc/neteconet/ec.h+1-1
......@@ -28,7 +28,7 @@ struct ec_addr
2828 unsigned char net; /* Network number. */
2929 };
3030
31struct sockaddr_ec
31struct __attribute_struct_may_alias__ sockaddr_ec
3232 {
3333 __SOCKADDR_COMMON (sec_);
3434 unsigned char port; /* Port number. */
lib/libc/include/generic-glibc/netinet/in.h+5-3
......@@ -244,7 +244,7 @@ extern const struct in6_addr in6addr_loopback; /* ::1 */
244244
245245
246246/* Structure describing an Internet socket address. */
247struct sockaddr_in
247struct __attribute_struct_may_alias__ sockaddr_in
248248 {
249249 __SOCKADDR_COMMON (sin_);
250250 in_port_t sin_port; /* Port number. */
......@@ -257,9 +257,11 @@ struct sockaddr_in
257257 - sizeof (struct in_addr)];
258258 };
259259
260#if !__USE_KERNEL_IPV6_DEFS
260#if __USE_KERNEL_IPV6_DEFS
261struct __attribute_struct_may_alias__ sockaddr_in6;
262#else
261263/* Ditto, for IPv6. */
262struct sockaddr_in6
264struct __attribute_struct_may_alias__ sockaddr_in6
263265 {
264266 __SOCKADDR_COMMON (sin6_);
265267 in_port_t sin6_port; /* Transport layer port # */
lib/libc/include/generic-glibc/netiucv/iucv.h+1-1
......@@ -23,7 +23,7 @@
2323
2424__BEGIN_DECLS
2525
26struct sockaddr_iucv
26struct __attribute_struct_may_alias__ sockaddr_iucv
2727 {
2828 __SOCKADDR_COMMON (siucv_);
2929 unsigned short siucv_port; /* Reserved */
lib/libc/include/generic-glibc/pthread.h+9-9
......@@ -223,7 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);
223223 the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
224224extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
225225
226# ifndef __USE_TIME_BITS64
226# ifndef __USE_TIME64_REDIRECTS
227227/* Make calling thread wait for termination of the thread TH, but only
228228 until TIMEOUT. The exit status of the thread is stored in
229229 *THREAD_RETURN, if THREAD_RETURN is not NULL.
......@@ -796,7 +796,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
796796
797797#ifdef __USE_XOPEN2K
798798/* Wait until lock becomes available, or specified time passes. */
799# ifndef __USE_TIME_BITS64
799# ifndef __USE_TIME64_REDIRECTS
800800extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
801801 const struct timespec *__restrict
802802 __abstime) __THROWNL __nonnull ((1, 2));
......@@ -813,7 +813,7 @@ extern int __REDIRECT_NTHNL (pthread_mutex_timedlock,
813813#endif
814814
815815#ifdef __USE_GNU
816# ifndef __USE_TIME_BITS64
816# ifndef __USE_TIME64_REDIRECTS
817817extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
818818 clockid_t __clockid,
819819 const struct timespec *__restrict
......@@ -982,7 +982,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
982982
983983# ifdef __USE_XOPEN2K
984984/* Try to acquire read lock for RWLOCK or return after specified time. */
985# ifndef __USE_TIME_BITS64
985# ifndef __USE_TIME64_REDIRECTS
986986extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
987987 const struct timespec *__restrict
988988 __abstime) __THROWNL __nonnull ((1, 2));
......@@ -1000,7 +1000,7 @@ extern int __REDIRECT_NTHNL (pthread_rwlock_timedrdlock,
10001000# endif
10011001
10021002# ifdef __USE_GNU
1003# ifndef __USE_TIME_BITS64
1003# ifndef __USE_TIME64_REDIRECTS
10041004extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
10051005 clockid_t __clockid,
10061006 const struct timespec *__restrict
......@@ -1029,7 +1029,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
10291029
10301030# ifdef __USE_XOPEN2K
10311031/* Try to acquire write lock for RWLOCK or return after specified time. */
1032# ifndef __USE_TIME_BITS64
1032# ifndef __USE_TIME64_REDIRECTS
10331033extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
10341034 const struct timespec *__restrict
10351035 __abstime) __THROWNL __nonnull ((1, 2));
......@@ -1047,7 +1047,7 @@ extern int __REDIRECT_NTHNL (pthread_rwlock_timedwrlock,
10471047# endif
10481048
10491049# ifdef __USE_GNU
1050# ifndef __USE_TIME_BITS64
1050# ifndef __USE_TIME64_REDIRECTS
10511051extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
10521052 clockid_t __clockid,
10531053 const struct timespec *__restrict
......@@ -1141,7 +1141,7 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
11411141
11421142 This function is a cancellation point and therefore not marked with
11431143 __THROW. */
1144# ifndef __USE_TIME_BITS64
1144# ifndef __USE_TIME64_REDIRECTS
11451145extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
11461146 pthread_mutex_t *__restrict __mutex,
11471147 const struct timespec *__restrict __abstime)
......@@ -1167,7 +1167,7 @@ extern int __REDIRECT (pthread_cond_timedwait,
11671167
11681168 This function is a cancellation point and therefore not marked with
11691169 __THROW. */
1170# ifndef __USE_TIME_BITS64
1170# ifndef __USE_TIME64_REDIRECTS
11711171extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
11721172 pthread_mutex_t *__restrict __mutex,
11731173 __clockid_t __clock_id,
lib/libc/include/generic-glibc/resolv.h+1-1
......@@ -335,4 +335,4 @@ void res_nclose (res_state) __THROW;
335335
336336__END_DECLS
337337
338#endif /* !_RESOLV_H_ */
338#endif /* !_RESOLV_H_ */
\ No newline at end of file
lib/libc/include/generic-glibc/sched.h+1-1
......@@ -74,7 +74,7 @@ extern int sched_get_priority_max (int __algorithm) __THROW;
7474extern int sched_get_priority_min (int __algorithm) __THROW;
7575
7676/* Get the SCHED_RR interval for the named process. */
77#ifndef __USE_TIME_BITS64
77#ifndef __USE_TIME64_REDIRECTS
7878extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
7979#else
8080# ifdef __REDIRECT_NTH
lib/libc/include/generic-glibc/semaphore.h+2-2
......@@ -59,7 +59,7 @@ extern int sem_wait (sem_t *__sem) __nonnull ((1));
5959
6060 This function is a cancellation point and therefore not marked with
6161 __THROW. */
62# ifndef __USE_TIME_BITS64
62# ifndef __USE_TIME64_REDIRECTS
6363extern int sem_timedwait (sem_t *__restrict __sem,
6464 const struct timespec *__restrict __abstime)
6565 __nonnull ((1, 2));
......@@ -77,7 +77,7 @@ extern int __REDIRECT (sem_timedwait,
7777#endif
7878
7979#ifdef __USE_GNU
80# ifndef __USE_TIME_BITS64
80# ifndef __USE_TIME64_REDIRECTS
8181extern int sem_clockwait (sem_t *__restrict __sem,
8282 clockid_t clock,
8383 const struct timespec *__restrict __abstime)
lib/libc/include/generic-glibc/signal.h+1-1
......@@ -269,7 +269,7 @@ extern int sigwaitinfo (const sigset_t *__restrict __set,
269269
270270 This function is a cancellation point and therefore not marked with
271271 __THROW. */
272# ifndef __USE_TIME_BITS64
272# ifndef __USE_TIME64_REDIRECTS
273273extern int sigtimedwait (const sigset_t *__restrict __set,
274274 siginfo_t *__restrict __info,
275275 const struct timespec *__restrict __timeout)
lib/libc/include/generic-glibc/stdbit.h+70-14
......@@ -64,9 +64,13 @@ extern unsigned int stdc_leading_zeros_ul (unsigned long int __x)
6464__extension__
6565extern unsigned int stdc_leading_zeros_ull (unsigned long long int __x)
6666 __THROW __attribute_const__;
67#define stdc_leading_zeros(x) \
67#if __glibc_has_builtin (__builtin_stdc_leading_zeros)
68# define stdc_leading_zeros(x) (__builtin_stdc_leading_zeros (x))
69#else
70# define stdc_leading_zeros(x) \
6871 (stdc_leading_zeros_ull (x) \
6972 - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x))))
73#endif
7074
7175#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
7276static __always_inline unsigned int
......@@ -116,9 +120,13 @@ extern unsigned int stdc_leading_ones_ul (unsigned long int __x)
116120__extension__
117121extern unsigned int stdc_leading_ones_ull (unsigned long long int __x)
118122 __THROW __attribute_const__;
119#define stdc_leading_ones(x) \
123#if __glibc_has_builtin (__builtin_stdc_leading_ones)
124# define stdc_leading_ones(x) (__builtin_stdc_leading_ones (x))
125#else
126# define stdc_leading_ones(x) \
120127 (stdc_leading_ones_ull ((unsigned long long int) (x) \
121128 << 8 * (sizeof (0ULL) - sizeof (x))))
129#endif
122130
123131#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
124132static __always_inline unsigned int
......@@ -168,11 +176,15 @@ extern unsigned int stdc_trailing_zeros_ul (unsigned long int __x)
168176__extension__
169177extern unsigned int stdc_trailing_zeros_ull (unsigned long long int __x)
170178 __THROW __attribute_const__;
171#define stdc_trailing_zeros(x) \
179#if __glibc_has_builtin (__builtin_stdc_trailing_zeros)
180# define stdc_trailing_zeros(x) (__builtin_stdc_trailing_zeros (x))
181#else
182# define stdc_trailing_zeros(x) \
172183 (sizeof (x) == 8 ? stdc_trailing_zeros_ull (x) \
173184 : sizeof (x) == 4 ? stdc_trailing_zeros_ui (x) \
174185 : sizeof (x) == 2 ? stdc_trailing_zeros_us (__pacify_uint16 (x)) \
175186 : stdc_trailing_zeros_uc (__pacify_uint8 (x)))
187#endif
176188
177189#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
178190static __always_inline unsigned int
......@@ -222,7 +234,11 @@ extern unsigned int stdc_trailing_ones_ul (unsigned long int __x)
222234__extension__
223235extern unsigned int stdc_trailing_ones_ull (unsigned long long int __x)
224236 __THROW __attribute_const__;
225#define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x))
237#if __glibc_has_builtin (__builtin_stdc_trailing_ones)
238# define stdc_trailing_ones(x) (__builtin_stdc_trailing_ones (x))
239#else
240# define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x))
241#endif
226242
227243#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
228244static __always_inline unsigned int
......@@ -272,11 +288,15 @@ extern unsigned int stdc_first_leading_zero_ul (unsigned long int __x)
272288__extension__
273289extern unsigned int stdc_first_leading_zero_ull (unsigned long long int __x)
274290 __THROW __attribute_const__;
275#define stdc_first_leading_zero(x) \
291#if __glibc_has_builtin (__builtin_stdc_first_leading_zero)
292# define stdc_first_leading_zero(x) (__builtin_stdc_first_leading_zero (x))
293#else
294# define stdc_first_leading_zero(x) \
276295 (sizeof (x) == 8 ? stdc_first_leading_zero_ull (x) \
277296 : sizeof (x) == 4 ? stdc_first_leading_zero_ui (x) \
278297 : sizeof (x) == 2 ? stdc_first_leading_zero_us (__pacify_uint16 (x)) \
279298 : stdc_first_leading_zero_uc (__pacify_uint8 (x)))
299#endif
280300
281301#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
282302static __always_inline unsigned int
......@@ -326,11 +346,15 @@ extern unsigned int stdc_first_leading_one_ul (unsigned long int __x)
326346__extension__
327347extern unsigned int stdc_first_leading_one_ull (unsigned long long int __x)
328348 __THROW __attribute_const__;
329#define stdc_first_leading_one(x) \
349#if __glibc_has_builtin (__builtin_stdc_first_leading_one)
350# define stdc_first_leading_one(x) (__builtin_stdc_first_leading_one (x))
351#else
352# define stdc_first_leading_one(x) \
330353 (sizeof (x) == 8 ? stdc_first_leading_one_ull (x) \
331354 : sizeof (x) == 4 ? stdc_first_leading_one_ui (x) \
332355 : sizeof (x) == 2 ? stdc_first_leading_one_us (__pacify_uint16 (x)) \
333356 : stdc_first_leading_one_uc (__pacify_uint8 (x)))
357#endif
334358
335359#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
336360static __always_inline unsigned int
......@@ -380,11 +404,15 @@ extern unsigned int stdc_first_trailing_zero_ul (unsigned long int __x)
380404__extension__
381405extern unsigned int stdc_first_trailing_zero_ull (unsigned long long int __x)
382406 __THROW __attribute_const__;
383#define stdc_first_trailing_zero(x) \
407#if __glibc_has_builtin (__builtin_stdc_first_trailing_zero)
408# define stdc_first_trailing_zero(x) (__builtin_stdc_first_trailing_zero (x))
409#else
410# define stdc_first_trailing_zero(x) \
384411 (sizeof (x) == 8 ? stdc_first_trailing_zero_ull (x) \
385412 : sizeof (x) == 4 ? stdc_first_trailing_zero_ui (x) \
386413 : sizeof (x) == 2 ? stdc_first_trailing_zero_us (__pacify_uint16 (x)) \
387414 : stdc_first_trailing_zero_uc (__pacify_uint8 (x)))
415#endif
388416
389417#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
390418static __always_inline unsigned int
......@@ -434,11 +462,15 @@ extern unsigned int stdc_first_trailing_one_ul (unsigned long int __x)
434462__extension__
435463extern unsigned int stdc_first_trailing_one_ull (unsigned long long int __x)
436464 __THROW __attribute_const__;
437#define stdc_first_trailing_one(x) \
465#if __glibc_has_builtin (__builtin_stdc_first_trailing_one)
466# define stdc_first_trailing_one(x) (__builtin_stdc_first_trailing_one (x))
467#else
468# define stdc_first_trailing_one(x) \
438469 (sizeof (x) == 8 ? stdc_first_trailing_one_ull (x) \
439470 : sizeof (x) == 4 ? stdc_first_trailing_one_ui (x) \
440471 : sizeof (x) == 2 ? stdc_first_trailing_one_us (__pacify_uint16 (x)) \
441472 : stdc_first_trailing_one_uc (__pacify_uint8 (x)))
473#endif
442474
443475#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll)
444476static __always_inline unsigned int
......@@ -488,9 +520,13 @@ extern unsigned int stdc_count_zeros_ul (unsigned long int __x)
488520__extension__
489521extern unsigned int stdc_count_zeros_ull (unsigned long long int __x)
490522 __THROW __attribute_const__;
491#define stdc_count_zeros(x) \
523#if __glibc_has_builtin (__builtin_stdc_count_zeros)
524# define stdc_count_zeros(x) (__builtin_stdc_count_zeros (x))
525#else
526# define stdc_count_zeros(x) \
492527 (stdc_count_zeros_ull (x) \
493528 - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x))))
529#endif
494530
495531#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll)
496532static __always_inline unsigned int
......@@ -540,7 +576,11 @@ extern unsigned int stdc_count_ones_ul (unsigned long int __x)
540576__extension__
541577extern unsigned int stdc_count_ones_ull (unsigned long long int __x)
542578 __THROW __attribute_const__;
543#define stdc_count_ones(x) (stdc_count_ones_ull (x))
579#if __glibc_has_builtin (__builtin_stdc_count_ones)
580# define stdc_count_ones(x) (__builtin_stdc_count_ones (x))
581#else
582# define stdc_count_ones(x) (stdc_count_ones_ull (x))
583#endif
544584
545585#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll)
546586static __always_inline unsigned int
......@@ -590,10 +630,14 @@ extern bool stdc_has_single_bit_ul (unsigned long int __x)
590630__extension__
591631extern bool stdc_has_single_bit_ull (unsigned long long int __x)
592632 __THROW __attribute_const__;
593#define stdc_has_single_bit(x) \
633#if __glibc_has_builtin (__builtin_stdc_has_single_bit)
634# define stdc_has_single_bit(x) (__builtin_stdc_has_single_bit (x))
635#else
636# define stdc_has_single_bit(x) \
594637 ((bool) (sizeof (x) <= sizeof (unsigned int) \
595638 ? stdc_has_single_bit_ui (x) \
596639 : stdc_has_single_bit_ull (x)))
640#endif
597641
598642static __always_inline bool
599643__hsb64_inline (uint64_t __x)
......@@ -641,7 +685,11 @@ extern unsigned int stdc_bit_width_ul (unsigned long int __x)
641685__extension__
642686extern unsigned int stdc_bit_width_ull (unsigned long long int __x)
643687 __THROW __attribute_const__;
644#define stdc_bit_width(x) (stdc_bit_width_ull (x))
688#if __glibc_has_builtin (__builtin_stdc_bit_width)
689# define stdc_bit_width(x) (__builtin_stdc_bit_width (x))
690#else
691# define stdc_bit_width(x) (stdc_bit_width_ull (x))
692#endif
645693
646694#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
647695static __always_inline unsigned int
......@@ -691,7 +739,11 @@ extern unsigned long int stdc_bit_floor_ul (unsigned long int __x)
691739__extension__
692740extern unsigned long long int stdc_bit_floor_ull (unsigned long long int __x)
693741 __THROW __attribute_const__;
694#define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x))
742#if __glibc_has_builtin (__builtin_stdc_bit_floor)
743# define stdc_bit_floor(x) (__builtin_stdc_bit_floor (x))
744#else
745# define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x))
746#endif
695747
696748#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
697749static __always_inline uint64_t
......@@ -743,7 +795,11 @@ extern unsigned long int stdc_bit_ceil_ul (unsigned long int __x)
743795__extension__
744796extern unsigned long long int stdc_bit_ceil_ull (unsigned long long int __x)
745797 __THROW __attribute_const__;
746#define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x))
798#if __glibc_has_builtin (__builtin_stdc_bit_ceil)
799# define stdc_bit_ceil(x) (__builtin_stdc_bit_ceil (x))
800#else
801# define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x))
802#endif
747803
748804#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll)
749805static __always_inline uint64_t
lib/libc/include/generic-glibc/stdint.h+1-1
......@@ -262,7 +262,7 @@ typedef __uintmax_t uintmax_t;
262262# define UINTMAX_C(c) c ## ULL
263263# endif
264264
265#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
265#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
266266
267267# define INT8_WIDTH 8
268268# define UINT8_WIDTH 8
lib/libc/include/generic-glibc/stdio.h+5-15
......@@ -139,7 +139,7 @@ typedef __fpos64_t fpos64_t;
139139#define FOPEN_MAX 16
140140
141141
142#if __GLIBC_USE (ISOC2X)
142#if __GLIBC_USE (ISOC23)
143143/* Maximum length of printf output for a NaN. */
144144# define _PRINTF_NAN_LEN_MAX 4
145145#endif
......@@ -437,7 +437,7 @@ extern int sscanf (const char *__restrict __s,
437437#include <bits/floatn.h>
438438#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
439439 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
440# if __GLIBC_USE (C2X_STRTOL)
440# if __GLIBC_USE (C23_STRTOL)
441441# ifdef __REDIRECT
442442extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
443443 const char *__restrict __format, ...),
......@@ -505,7 +505,7 @@ extern int vsscanf (const char *__restrict __s,
505505
506506/* Same redirection as above for the v*scanf family. */
507507# if !__GLIBC_USE (DEPRECATED_SCANF)
508# if __GLIBC_USE (C2X_STRTOL)
508# if __GLIBC_USE (C23_STRTOL)
509509# if defined __REDIRECT && !defined __LDBL_COMPAT \
510510 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
511511extern int __REDIRECT (vfscanf,
......@@ -685,12 +685,7 @@ extern char *fgets_unlocked (char *__restrict __s, int __n,
685685 (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
686686 NULL), pointing to *N characters of space. It is realloc'd as
687687 necessary. Returns the number of characters read (not including the
688 null terminator), or -1 on error or EOF.
689
690 These functions are not part of POSIX and therefore no official
691 cancellation point. But due to similarity with an POSIX interface
692 or due to the implementation they are cancellation points and
693 therefore not marked with __THROW. */
688 null terminator), or -1 on error or EOF. */
694689extern __ssize_t __getdelim (char **__restrict __lineptr,
695690 size_t *__restrict __n, int __delimiter,
696691 FILE *__restrict __stream) __wur __nonnull ((4));
......@@ -698,12 +693,7 @@ extern __ssize_t getdelim (char **__restrict __lineptr,
698693 size_t *__restrict __n, int __delimiter,
699694 FILE *__restrict __stream) __wur __nonnull ((4));
700695
701/* Like `getdelim', but reads up to a newline.
702
703 This function is not part of POSIX and therefore no official
704 cancellation point. But due to similarity with an POSIX interface
705 or due to the implementation it is a cancellation point and
706 therefore not marked with __THROW. */
696/* Like `getdelim', but reads up to a newline. */
707697extern __ssize_t getline (char **__restrict __lineptr,
708698 size_t *__restrict __n,
709699 FILE *__restrict __stream) __wur __nonnull ((3));
lib/libc/include/generic-glibc/stdlib.h+3-3
......@@ -210,7 +210,7 @@ extern unsigned long long int strtoull (const char *__restrict __nptr,
210210
211211/* Versions of the above functions that handle '0b' and '0B' prefixes
212212 in base 0 or 2. */
213#if __GLIBC_USE (C2X_STRTOL)
213#if __GLIBC_USE (C23_STRTOL)
214214# ifdef __REDIRECT
215215extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr,
216216 char **__restrict __endptr,
......@@ -274,7 +274,7 @@ extern unsigned long long int __isoc23_strtoull (const char *__restrict __nptr,
274274#endif
275275
276276/* Convert a floating-point number to a string. */
277#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
277#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
278278extern int strfromd (char *__dest, size_t __size, const char *__format,
279279 double __f)
280280 __THROW __nonnull ((3));
......@@ -360,7 +360,7 @@ extern unsigned long long int strtoull_l (const char *__restrict __nptr,
360360
361361/* Versions of the above functions that handle '0b' and '0B' prefixes
362362 in base 0 or 2. */
363# if __GLIBC_USE (C2X_STRTOL)
363# if __GLIBC_USE (C23_STRTOL)
364364# ifdef __REDIRECT
365365extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr,
366366 char **__restrict __endptr,
lib/libc/include/generic-glibc/string.h+3-3
......@@ -50,7 +50,7 @@ extern void *memmove (void *__dest, const void *__src, size_t __n)
5050/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
5151 Return the position in DEST one byte past where C was copied,
5252 or NULL if C was not found in the first N bytes of SRC. */
53#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
53#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC23)
5454extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
5555 int __c, size_t __n)
5656 __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4));
......@@ -182,7 +182,7 @@ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
182182#endif
183183
184184#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \
185 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X))
185 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23))
186186/* Duplicate S, returning an identical malloc'd string. */
187187extern char *strdup (const char *__s)
188188 __THROW __attribute_malloc__ __nonnull ((1));
......@@ -191,7 +191,7 @@ extern char *strdup (const char *__s)
191191/* Return a malloc'd copy of at most N bytes of STRING. The
192192 resultant string is terminated even if no null terminator
193193 appears before STRING[N]. */
194#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)
194#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23)
195195extern char *strndup (const char *__string, size_t __n)
196196 __THROW __attribute_malloc__ __nonnull ((1));
197197#endif
lib/libc/include/generic-glibc/sys/cdefs.h+168-5
......@@ -145,6 +145,14 @@
145145#endif
146146
147147
148/* The overloadable attribute was added on clang 2.6. */
149#if defined __clang_major__ \
150 && (__clang_major__ + (__clang_minor__ >= 6) > 2)
151# define __attribute_overloadable__ __attribute__((__overloadable__))
152#else
153# define __attribute_overloadable__
154#endif
155
148156/* Fortify support. */
149157#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
150158#define __bos0(ptr) __builtin_object_size (ptr, 0)
......@@ -187,27 +195,173 @@
187195 __s, __osz)) \
188196 && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
189197
198/* To correctly instrument the fortify wrapper clang requires the
199 pass_object_size attribute, and the attribute has the restriction that the
200 argument needs to be 'const'. Furthermore, to make it usable with C
201 interfaces, clang provides the overload attribute, which provides a C++
202 like function overload support. The overloaded fortify wrapper with the
203 pass_object_size attribute has precedence over the default symbol.
204
205 Also, clang does not support __va_arg_pack, so variadic functions are
206 expanded to issue va_arg implementations. The error function must not have
207 bodies (address takes are expanded to nonfortified calls), and with
208 __fortify_function compiler might still create a body with the C++
209 mangling name (due to the overload attribute). In this case, the function
210 is defined with __fortify_function_error_function macro instead.
211
212 The argument size check is also done with a clang-only attribute,
213 __attribute__ ((__diagnose_if__ (...))), different than gcc which calls
214 symbol_chk_warn alias with uses __warnattr attribute.
215
216 The pass_object_size was added on clang 4.0, __diagnose_if__ on 5.0,
217 and pass_dynamic_object_size on 9.0. */
218#if defined __clang_major__ && __clang_major__ >= 5
219# define __fortify_use_clang 1
220
221# define __fortify_function_error_function static __attribute__((__unused__))
222
223# define __fortify_clang_pass_object_size_n(n) \
224 __attribute__ ((__pass_object_size__ (n)))
225# define __fortify_clang_pass_object_size0 \
226 __fortify_clang_pass_object_size_n (0)
227# define __fortify_clang_pass_object_size \
228 __fortify_clang_pass_object_size_n (__USE_FORTIFY_LEVEL > 1)
229
230# if __clang_major__ >= 9
231# define __fortify_clang_pass_dynamic_object_size_n(n) \
232 __attribute__ ((__pass_dynamic_object_size__ (n)))
233# define __fortify_clang_pass_dynamic_object_size0 \
234 __fortify_clang_pass_dynamic_object_size_n (0)
235# define __fortify_clang_pass_dynamic_object_size \
236 __fortify_clang_pass_dynamic_object_size_n (1)
237# else
238# define __fortify_clang_pass_dynamic_object_size_n(n)
239# define __fortify_clang_pass_dynamic_object_size0
240# define __fortify_clang_pass_dynamic_object_size
241# endif
242
243# define __fortify_clang_bos_static_lt_impl(bos_val, n, s) \
244 ((bos_val) != -1ULL && (n) > (bos_val) / (s))
245# define __fortify_clang_bos_static_lt2(__n, __e, __s) \
246 __fortify_clang_bos_static_lt_impl (__bos (__e), __n, __s)
247# define __fortify_clang_bos_static_lt(__n, __e) \
248 __fortify_clang_bos_static_lt2 (__n, __e, 1)
249# define __fortify_clang_bos0_static_lt2(__n, __e, __s) \
250 __fortify_clang_bos_static_lt_impl (__bos0 (__e), __n, __s)
251# define __fortify_clang_bos0_static_lt(__n, __e) \
252 __fortify_clang_bos0_static_lt2 (__n, __e, 1)
253
254# define __fortify_clang_bosn_args(bos_fn, n, buf, div, complaint) \
255 (__fortify_clang_bos_static_lt_impl (bos_fn (buf), n, div)), (complaint), \
256 "warning"
257
258# define __fortify_clang_warning(__c, __msg) \
259 __attribute__ ((__diagnose_if__ ((__c), (__msg), "warning")))
260# define __fortify_clang_error(__c, __msg) \
261 __attribute__ ((__diagnose_if__ ((__c), (__msg), "error")))
262# define __fortify_clang_warning_only_if_bos0_lt(n, buf, complaint) \
263 __attribute__ ((__diagnose_if__ \
264 (__fortify_clang_bosn_args (__bos0, n, buf, 1, complaint))))
265# define __fortify_clang_warning_only_if_bos0_lt2(n, buf, div, complaint) \
266 __attribute__ ((__diagnose_if__ \
267 (__fortify_clang_bosn_args (__bos0, n, buf, div, complaint))))
268# define __fortify_clang_warning_only_if_bos_lt(n, buf, complaint) \
269 __attribute__ ((__diagnose_if__ \
270 (__fortify_clang_bosn_args (__bos, n, buf, 1, complaint))))
271# define __fortify_clang_warning_only_if_bos_lt2(n, buf, div, complaint) \
272 __attribute__ ((__diagnose_if__ \
273 (__fortify_clang_bosn_args (__bos, n, buf, div, complaint))))
274
275# define __fortify_clang_prefer_this_overload \
276 __attribute__ ((enable_if (1, "")))
277# define __fortify_clang_unavailable(__msg) \
278 __attribute__ ((unavailable(__msg)))
279
280# if __USE_FORTIFY_LEVEL == 3
281# define __fortify_clang_overload_arg(__type, __attr, __name) \
282 __type __attr const __fortify_clang_pass_dynamic_object_size __name
283# define __fortify_clang_overload_arg0(__type, __attr, __name) \
284 __type __attr const __fortify_clang_pass_dynamic_object_size0 __name
285# else
286# define __fortify_clang_overload_arg(__type, __attr, __name) \
287 __type __attr const __fortify_clang_pass_object_size __name
288# define __fortify_clang_overload_arg0(__type, __attr, __name) \
289 __type __attr const __fortify_clang_pass_object_size0 __name
290# endif
291
292# define __fortify_clang_mul_may_overflow(size, n) \
293 ((size | n) >= (((size_t)1) << (8 * sizeof (size_t) / 2)))
294
295# define __fortify_clang_size_too_small(__bos, __dest, __len) \
296 (__bos (__dest) != (size_t) -1 && __bos (__dest) < __len)
297# define __fortify_clang_warn_if_src_too_large(__dest, __src) \
298 __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize, \
299 __dest, \
300 __builtin_strlen (__src) + 1), \
301 "destination buffer will always be overflown by source")
302# define __fortify_clang_warn_if_dest_too_small(__dest, __len) \
303 __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize, \
304 __dest, \
305 __len), \
306 "function called with bigger length than the destination buffer")
307# define __fortify_clang_warn_if_dest_too_small0(__dest, __len) \
308 __fortify_clang_warning (__fortify_clang_size_too_small (__glibc_objsize0, \
309 __dest, \
310 __len), \
311 "function called with bigger length than the destination buffer")
312#else
313# define __fortify_use_clang 0
314# define __fortify_clang_warning(__c, __msg)
315# define __fortify_clang_warning_only_if_bos0_lt(__n, __buf, __complaint)
316# define __fortify_clang_warning_only_if_bos0_lt2(__n, __buf, __div, complaint)
317# define __fortify_clang_warning_only_if_bos_lt(__n, __buf, __complaint)
318# define __fortify_clang_warning_only_if_bos_lt2(__n, __buf, div, __complaint)
319# define __fortify_clang_overload_arg(__type, __attr, __name) \
320 __type __attr __name
321# define __fortify_clang_overload_arg0(__type, __attr, __name) \
322 __fortify_clang_overload_arg (__type, __attr, __name)
323# define __fortify_clang_warn_if_src_too_large(__dest, __src)
324# define __fortify_clang_warn_if_dest_too_small(__dest, __len)
325# define __fortify_clang_warn_if_dest_too_small0(__dest, __len)
326#endif
327
328
190329/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
191330 declared. */
192331
193#define __glibc_fortify(f, __l, __s, __osz, ...) \
332#if !__fortify_use_clang
333# define __glibc_fortify(f, __l, __s, __osz, ...) \
194334 (__glibc_safe_or_unknown_len (__l, __s, __osz) \
195335 ? __ ## f ## _alias (__VA_ARGS__) \
196336 : (__glibc_unsafe_len (__l, __s, __osz) \
197337 ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
198338 : __ ## f ## _chk (__VA_ARGS__, __osz)))
339#else
340# define __glibc_fortify(f, __l, __s, __osz, ...) \
341 (__osz == (__SIZE_TYPE__) -1) \
342 ? __ ## f ## _alias (__VA_ARGS__) \
343 : __ ## f ## _chk (__VA_ARGS__, __osz)
344#endif
199345
200346/* Fortify function f, where object size argument passed to f is the number of
201347 elements and not total size. */
202348
203#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
349#if !__fortify_use_clang
350# define __glibc_fortify_n(f, __l, __s, __osz, ...) \
204351 (__glibc_safe_or_unknown_len (__l, __s, __osz) \
205352 ? __ ## f ## _alias (__VA_ARGS__) \
206353 : (__glibc_unsafe_len (__l, __s, __osz) \
207354 ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
208355 : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))
356# else
357# define __glibc_fortify_n(f, __l, __s, __osz, ...) \
358 (__osz == (__SIZE_TYPE__) -1) \
359 ? __ ## f ## _alias (__VA_ARGS__) \
360 : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))
209361#endif
210362
363#endif /* __USE_FORTIFY_LEVEL > 0 */
364
211365#if __GNUC_PREREQ (4,3)
212366# define __warnattr(msg) __attribute__((__warning__ (msg)))
213367# define __errordecl(name, msg) \
......@@ -683,10 +837,10 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
683837# define __attr_access(x) __attribute__ ((__access__ x))
684838/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
685839 use the access attribute to get object sizes from function definition
686 arguments, so we can't use them on functions we fortify. Drop the object
687 size hints for such functions. */
840 arguments, so we can't use them on functions we fortify. Drop the access
841 attribute for such functions. */
688842# if __USE_FORTIFY_LEVEL == 3
689# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o)))
843# define __fortified_attr_access(a, o, s)
690844# else
691845# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s))
692846# endif
......@@ -720,4 +874,13 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
720874# define __attribute_returns_twice__ /* Ignore. */
721875#endif
722876
877/* Mark struct types as aliasable. Restricted to compilers that
878 support forward declarations of structs in the presence of the
879 attribute. */
880#if __GNUC_PREREQ (7, 1) || defined __clang__
881# define __attribute_struct_may_alias__ __attribute__ ((__may_alias__))
882#else
883# define __attribute_struct_may_alias__
884#endif
885
723886#endif /* sys/cdefs.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/epoll.h+15-1
......@@ -19,6 +19,7 @@
1919#define _SYS_EPOLL_H 1
2020
2121#include <stdint.h>
22#include <sys/ioctl.h>
2223#include <sys/types.h>
2324
2425#include <bits/types/sigset_t.h>
......@@ -87,6 +88,19 @@ struct epoll_event
8788 epoll_data_t data; /* User data variable */
8889} __EPOLL_PACKED;
8990
91struct epoll_params
92{
93 uint32_t busy_poll_usecs;
94 uint16_t busy_poll_budget;
95 uint8_t prefer_busy_poll;
96
97 /* pad the struct to a multiple of 64bits */
98 uint8_t __pad;
99};
100
101#define EPOLL_IOC_TYPE 0x8A
102#define EPIOCSPARAMS _IOW(EPOLL_IOC_TYPE, 0x01, struct epoll_params)
103#define EPIOCGPARAMS _IOR(EPOLL_IOC_TYPE, 0x02, struct epoll_params)
90104
91105__BEGIN_DECLS
92106
......@@ -140,7 +154,7 @@ extern int epoll_pwait (int __epfd, struct epoll_event *__events,
140154
141155 This function is a cancellation point and therefore not marked with
142156 __THROW. */
143#ifndef __USE_TIME_BITS64
157#ifndef __USE_TIME64_REDIRECTS
144158extern int epoll_pwait2 (int __epfd, struct epoll_event *__events,
145159 int __maxevents, const struct timespec *__timeout,
146160 const __sigset_t *__ss)
lib/libc/include/generic-glibc/sys/hwprobe.h created+113
......@@ -0,0 +1,113 @@
1/* RISC-V architecture probe interface
2 Copyright (C) 2024 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _SYS_HWPROBE_H
21#define _SYS_HWPROBE_H 1
22
23#include <features.h>
24#include <stddef.h>
25#include <errno.h>
26#ifdef __has_include
27# if __has_include (<asm/hwprobe.h>)
28# include <asm/hwprobe.h>
29# endif
30#endif
31
32/* Define a (probably stale) version of the interface if the Linux headers
33 aren't present. */
34#ifndef RISCV_HWPROBE_KEY_MVENDORID
35struct riscv_hwprobe {
36 signed long long int key;
37 unsigned long long int value;
38};
39
40#define RISCV_HWPROBE_KEY_MVENDORID 0
41#define RISCV_HWPROBE_KEY_MARCHID 1
42#define RISCV_HWPROBE_KEY_MIMPID 2
43#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 3
44#define RISCV_HWPROBE_BASE_BEHAVIOR_IMA (1 << 0)
45#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
46#define RISCV_HWPROBE_IMA_FD (1 << 0)
47#define RISCV_HWPROBE_IMA_C (1 << 1)
48#define RISCV_HWPROBE_IMA_V (1 << 2)
49#define RISCV_HWPROBE_EXT_ZBA (1 << 3)
50#define RISCV_HWPROBE_EXT_ZBB (1 << 4)
51#define RISCV_HWPROBE_EXT_ZBS (1 << 5)
52#define RISCV_HWPROBE_EXT_ZICBOZ (1 << 6)
53#define RISCV_HWPROBE_KEY_CPUPERF_0 5
54#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
55#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
56#define RISCV_HWPROBE_MISALIGNED_SLOW (2 << 0)
57#define RISCV_HWPROBE_MISALIGNED_FAST (3 << 0)
58#define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0)
59#define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0)
60#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6
61
62#endif /* RISCV_HWPROBE_KEY_MVENDORID */
63
64__BEGIN_DECLS
65
66extern int __riscv_hwprobe (struct riscv_hwprobe *__pairs, size_t __pair_count,
67 size_t __cpu_count, unsigned long int *__cpus,
68 unsigned int __flags)
69 __nonnull ((1)) __wur
70 __fortified_attr_access (__read_write__, 1, 2)
71 __fortified_attr_access (__read_only__, 4, 3);
72
73/* A pointer to the __riscv_hwprobe vDSO function is passed as the second
74 argument to ifunc selector routines. Include a function pointer type for
75 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,
78 unsigned int __flags)
79 __nonnull ((1)) __wur
80 __fortified_attr_access (__read_write__, 1, 2)
81 __fortified_attr_access (__read_only__, 4, 3);
82
83/* Helper function usable from ifunc selectors that probes a single key. */
84static __inline int
85__riscv_hwprobe_one(__riscv_hwprobe_t hwprobe_func,
86 long long int key,
87 unsigned long long int *value)
88{
89 struct riscv_hwprobe pair;
90 int rc;
91
92 /* Earlier versions of glibc pass NULL as the second ifunc parameter. Other C
93 libraries on non-Linux systems may pass +1 as this function pointer to
94 indicate no support. Users copying this function to exotic worlds
95 (non-Linux non-glibc) may want to do additional validity checks here. */
96 if (hwprobe_func == NULL)
97 return ENOSYS;
98
99 pair.key = key;
100 rc = hwprobe_func (&pair, 1, 0, NULL, 0);
101 if (rc != 0)
102 return rc;
103
104 if (pair.key < 0)
105 return ENOENT;
106
107 *value = pair.value;
108 return 0;
109}
110
111__END_DECLS
112
113#endif /* sys/hwprobe.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/ioctl.h+1-1
......@@ -38,7 +38,7 @@ __BEGIN_DECLS
3838/* Perform the I/O control operation specified by REQUEST on FD.
3939 One argument may follow; its presence and type depend on REQUEST.
4040 Return value depends on REQUEST. Usually -1 indicates error. */
41#ifndef __USE_TIME_BITS64
41#ifndef __USE_TIME64_REDIRECTS
4242extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
4343#else
4444# ifdef __REDIRECT
lib/libc/include/generic-glibc/sys/msg.h+1-1
......@@ -58,7 +58,7 @@ struct msgbuf
5858__BEGIN_DECLS
5959
6060/* Message queue control operation. */
61#ifndef __USE_TIME_BITS64
61#ifndef __USE_TIME64_REDIRECTS
6262extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
6363#else
6464# ifdef __REDIRECT_NTH
lib/libc/include/generic-glibc/sys/pidfd.h+7-8
......@@ -22,12 +22,14 @@
2222#include <bits/types/siginfo_t.h>
2323
2424#define PIDFD_NONBLOCK O_NONBLOCK
25#define PIDFD_THREAD O_EXCL
2526
26/* Returns a file descriptor that refers to the process PID. The
27 close-on-exec is set on the file descriptor.
27#define PIDFD_SIGNAL_THREAD (1UL << 0)
28#define PIDFD_SIGNAL_THREAD_GROUP (1UL << 1)
29#define PIDFD_SIGNAL_PROCESS_GROUP (1UL << 2)
2830
29 The FLAGS argument is reserved for future use, it must be specified
30 as 0. */
31/* Returns a file descriptor that refers to the process PID. The
32 close-on-exec is set on the file descriptor. */
3133extern int pidfd_open (__pid_t __pid, unsigned int __flags) __THROW;
3234
3335/* Duplicates an existing file descriptor TARGETFD in the process referred
......@@ -39,10 +41,7 @@ extern int pidfd_getfd (int __pidfd, int __targetfd,
3941 unsigned int __flags) __THROW;
4042
4143/* Sends the signal SIG to the target process referred by the PIDFD. If
42 INFO points to a siginfo_t buffer, it will be populated.
43
44 The FLAGS argument is reserved for future use, it must be specified
45 as 0. */
44 INFO points to a siginfo_t buffer, it will be populated. */
4645extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info,
4746 unsigned int __flags) __THROW;
4847
lib/libc/include/generic-glibc/sys/poll.h+1-1
......@@ -66,7 +66,7 @@ extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
6666 const __sigset_t *__ss)
6767 __fortified_attr_access (__write_only__, 1, 2);
6868
69# ifdef __USE_TIME_BITS64
69# ifdef __USE_TIME64_REDIRECTS
7070# ifdef __REDIRECT
7171extern int __REDIRECT (ppoll, (struct pollfd *__fds, nfds_t __nfds,
7272 const struct timespec *__timeout,
lib/libc/include/generic-glibc/sys/prctl.h+1-1
......@@ -38,7 +38,7 @@
3838__BEGIN_DECLS
3939
4040/* Control process execution. */
41#ifndef __USE_TIME_BITS64
41#ifndef __USE_TIME64_REDIRECTS
4242extern int prctl (int __option, ...) __THROW;
4343#else
4444# ifdef __REDIRECT
lib/libc/include/generic-glibc/sys/resource.h+1-1
......@@ -88,7 +88,7 @@ extern int setrlimit64 (__rlimit_resource_t __resource,
8888 and put it in *USAGE. Returns 0 for success, -1 for failure. */
8989extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
9090
91#ifdef __USE_TIME_BITS64
91#ifdef __USE_TIME64_REDIRECTS
9292# if defined(__REDIRECT_NTH)
9393extern int __REDIRECT_NTH (getrusage, (__rusage_who_t __who,
9494 struct rusage *__usage),
lib/libc/include/generic-glibc/sys/select.h+2-2
......@@ -98,7 +98,7 @@ __BEGIN_DECLS
9898
9999 This function is a cancellation point and therefore not marked with
100100 __THROW. */
101#ifndef __USE_TIME_BITS64
101#ifndef __USE_TIME64_REDIRECTS
102102extern int select (int __nfds, fd_set *__restrict __readfds,
103103 fd_set *__restrict __writefds,
104104 fd_set *__restrict __exceptfds,
......@@ -123,7 +123,7 @@ extern int __REDIRECT (select,
123123
124124 This function is a cancellation point and therefore not marked with
125125 __THROW. */
126# ifndef __USE_TIME_BITS64
126# ifndef __USE_TIME64_REDIRECTS
127127extern int pselect (int __nfds, fd_set *__restrict __readfds,
128128 fd_set *__restrict __writefds,
129129 fd_set *__restrict __exceptfds,
lib/libc/include/generic-glibc/sys/sem.h+2-2
......@@ -48,7 +48,7 @@ struct sembuf
4848__BEGIN_DECLS
4949
5050/* Semaphore control operation. */
51#ifndef __USE_TIME_BITS64
51#ifndef __USE_TIME64_REDIRECTS
5252extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW;
5353#else
5454# ifdef __REDIRECT_NTH
......@@ -68,7 +68,7 @@ extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW;
6868
6969#ifdef __USE_GNU
7070/* Operate on semaphore with timeout. */
71# ifndef __USE_TIME_BITS64
71# ifndef __USE_TIME64_REDIRECTS
7272extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
7373 const struct timespec *__timeout) __THROW;
7474# else
lib/libc/include/generic-glibc/sys/shm.h+1-1
......@@ -46,7 +46,7 @@ __BEGIN_DECLS
4646 facility. The definition is found in XPG4.2. */
4747
4848/* Shared memory control operation. */
49#ifndef __USE_TIME_BITS64
49#ifndef __USE_TIME64_REDIRECTS
5050extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
5151#else
5252# ifdef __REDIRECT_NTH
lib/libc/include/generic-glibc/sys/socket.h+7-7
......@@ -170,7 +170,7 @@ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
170170
171171 This function is a cancellation point and therefore not marked with
172172 __THROW. */
173#ifndef __USE_TIME_BITS64
173#ifndef __USE_TIME64_REDIRECTS
174174extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
175175 int __flags);
176176#else
......@@ -191,7 +191,7 @@ extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
191191
192192 This function is a cancellation point and therefore not marked with
193193 __THROW. */
194# ifndef __USE_TIME_BITS64
194# ifndef __USE_TIME64_REDIRECTS
195195extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
196196 unsigned int __vlen, int __flags);
197197# else
......@@ -204,7 +204,7 @@ extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
204204 unsigned int __vlen, int __flags);
205205# define sendmmsg __sendmmsg64
206206# endif
207# endif /* __USE_TIME_BITS64 */
207# endif /* __USE_TIME64_REDIRECTS */
208208#endif /* __USE_GNU */
209209
210210/* Receive a message as described by MESSAGE from socket FD.
......@@ -212,7 +212,7 @@ extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
212212
213213 This function is a cancellation point and therefore not marked with
214214 __THROW. */
215#ifndef __USE_TIME_BITS64
215#ifndef __USE_TIME64_REDIRECTS
216216extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
217217#else
218218# ifdef __REDIRECT
......@@ -231,7 +231,7 @@ extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, int __flags);
231231
232232 This function is a cancellation point and therefore not marked with
233233 __THROW. */
234# ifndef __USE_TIME_BITS64
234# ifndef __USE_TIME64_REDIRECTS
235235extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
236236 unsigned int __vlen, int __flags,
237237 struct timespec *__tmo);
......@@ -251,7 +251,7 @@ extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages,
251251/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
252252 into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
253253 actual length. Returns 0 on success, -1 for errors. */
254#ifndef __USE_TIME_BITS64
254#ifndef __USE_TIME64_REDIRECTS
255255extern int getsockopt (int __fd, int __level, int __optname,
256256 void *__restrict __optval,
257257 socklen_t *__restrict __optlen) __THROW;
......@@ -273,7 +273,7 @@ extern int __getsockopt64 (int __fd, int __level, int __optname,
273273/* Set socket FD's option OPTNAME at protocol level LEVEL
274274 to *OPTVAL (which is OPTLEN bytes long).
275275 Returns 0 on success, -1 for errors. */
276#ifndef __USE_TIME_BITS64
276#ifndef __USE_TIME64_REDIRECTS
277277extern int setsockopt (int __fd, int __level, int __optname,
278278 const void *__optval, socklen_t __optlen) __THROW;
279279#else
lib/libc/include/generic-glibc/sys/stat.h+8-8
......@@ -209,7 +209,7 @@ extern int stat (const char *__restrict __file,
209209 that file descriptor FD is open on and put them in BUF. */
210210extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
211211#else
212# ifdef __USE_TIME_BITS64
212# ifdef __USE_TIME64_REDIRECTS
213213# ifdef __REDIRECT_NTH
214214extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
215215 struct stat *__restrict __buf),
......@@ -236,7 +236,7 @@ extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
236236# endif
237237#endif
238238#ifdef __USE_LARGEFILE64
239# ifndef __USE_TIME_BITS64
239# ifndef __USE_TIME64_REDIRECTS
240240extern int stat64 (const char *__restrict __file,
241241 struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
242242extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
......@@ -265,7 +265,7 @@ extern int fstatat (int __fd, const char *__restrict __file,
265265 struct stat *__restrict __buf, int __flag)
266266 __THROW __nonnull ((2, 3));
267267# else
268# ifdef __USE_TIME_BITS64
268# ifdef __USE_TIME64_REDIRECTS
269269# ifdef __REDIRECT_NTH
270270extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
271271 struct stat *__restrict __buf,
......@@ -287,7 +287,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
287287# endif
288288
289289# ifdef __USE_LARGEFILE64
290# ifndef __USE_TIME_BITS64
290# ifndef __USE_TIME64_REDIRECTS
291291extern int fstatat64 (int __fd, const char *__restrict __file,
292292 struct stat64 *__restrict __buf, int __flag)
293293 __THROW __nonnull ((2, 3));
......@@ -313,7 +313,7 @@ extern int __REDIRECT_NTH (fstatat64, (int __fd,
313313extern int lstat (const char *__restrict __file,
314314 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
315315# else
316# ifdef __USE_TIME_BITS64
316# ifdef __USE_TIME64_REDIRECTS
317317# ifdef __REDIRECT_NTH
318318extern int __REDIRECT_NTH (lstat,
319319 (const char *__restrict __file,
......@@ -334,7 +334,7 @@ extern int __REDIRECT_NTH (lstat,
334334# endif
335335# endif
336336# ifdef __USE_LARGEFILE64
337# ifndef __USE_TIME_BITS64
337# ifndef __USE_TIME64_REDIRECTS
338338extern int lstat64 (const char *__restrict __file,
339339 struct stat64 *__restrict __buf)
340340 __THROW __nonnull ((1, 2));
......@@ -427,7 +427,7 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
427427#endif
428428
429429#ifdef __USE_ATFILE
430# ifndef __USE_TIME_BITS64
430# ifndef __USE_TIME64_REDIRECTS
431431/* Set file access and modification times relative to directory file
432432 descriptor. */
433433extern int utimensat (int __fd, const char *__path,
......@@ -447,7 +447,7 @@ extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path,
447447#endif
448448
449449#ifdef __USE_XOPEN2K8
450# ifndef __USE_TIME_BITS64
450# ifndef __USE_TIME64_REDIRECTS
451451/* Set file access and modification times of the file associated with FD. */
452452extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
453453
lib/libc/include/generic-glibc/sys/time.h+5-5
......@@ -63,7 +63,7 @@ struct timezone
6363 use localtime etc. instead.
6464 This function itself is semi-obsolete;
6565 most callers should use time or clock_gettime instead. */
66#ifndef __USE_TIME_BITS64
66#ifndef __USE_TIME64_REDIRECTS
6767extern int gettimeofday (struct timeval *__restrict __tv,
6868 void *__restrict __tz) __THROW __nonnull ((1));
6969#else
......@@ -77,7 +77,7 @@ extern int __REDIRECT_NTH (gettimeofday, (struct timeval *__restrict __tv,
7777#endif
7878
7979#ifdef __USE_MISC
80# ifndef __USE_TIME_BITS64
80# ifndef __USE_TIME64_REDIRECTS
8181/* Set the current time of day and timezone information.
8282 This call is restricted to the super-user.
8383 Setting the timezone in this way is obsolete, but we don't yet
......@@ -143,7 +143,7 @@ typedef enum __itimer_which __itimer_which_t;
143143typedef int __itimer_which_t;
144144#endif
145145
146#ifndef __USE_TIME_BITS64
146#ifndef __USE_TIME64_REDIRECTS
147147/* Set *VALUE to the current setting of timer WHICH.
148148 Return 0 on success, -1 on errors. */
149149extern int getitimer (__itimer_which_t __which,
......@@ -184,7 +184,7 @@ extern int __REDIRECT_NTH (utimes, (const char *__file,
184184#endif
185185
186186#ifdef __USE_MISC
187# ifndef __USE_TIME_BITS64
187# ifndef __USE_TIME64_REDIRECTS
188188/* Same as `utimes', but does not follow symbolic links. */
189189extern int lutimes (const char *__file, const struct timeval __tvp[2])
190190 __THROW __nonnull ((1));
......@@ -207,7 +207,7 @@ extern int __REDIRECT_NTH (futimes, (int __fd, const struct timeval __tvp[2]),
207207#endif
208208
209209#ifdef __USE_GNU
210# ifndef __USE_TIME_BITS64
210# ifndef __USE_TIME64_REDIRECTS
211211/* Change the access time of FILE relative to FD to TVP[0] and the
212212 modification time of FILE to TVP[1]. If TVP is a null pointer, use
213213 the current time instead. Returns 0 on success, -1 on errors. */
lib/libc/include/generic-glibc/sys/timerfd.h+2-2
......@@ -47,7 +47,7 @@ extern int timerfd_settime (int __ufd, int __flags,
4747 const struct itimerspec *__utmr,
4848 struct itimerspec *__otmr) __THROW;
4949
50#ifdef __USE_TIME_BITS64
50#ifdef __USE_TIME64_REDIRECTS
5151# if defined(__REDIRECT_NTH)
5252extern int __REDIRECT_NTH (timerfd_settime,
5353 (int __ufd, int __flags,
......@@ -62,7 +62,7 @@ extern int __REDIRECT_NTH (timerfd_settime,
6262/* Return the next expiration time of UFD. */
6363extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
6464
65#ifdef __USE_TIME_BITS64
65#ifdef __USE_TIME64_REDIRECTS
6666# if defined(__REDIRECT_NTH)
6767extern int __REDIRECT_NTH (timerfd_gettime, (int __ufd,
6868 struct itimerspec *__otmr),
lib/libc/include/generic-glibc/sys/timex.h+1-1
......@@ -54,7 +54,7 @@ struct ntptimeval
5454
5555__BEGIN_DECLS
5656
57#ifndef __USE_TIME_BITS64
57#ifndef __USE_TIME64_REDIRECTS
5858extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1));
5959extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW __nonnull ((1));
6060
lib/libc/include/generic-glibc/sys/un.h+1-1
......@@ -26,7 +26,7 @@
2626__BEGIN_DECLS
2727
2828/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */
29struct sockaddr_un
29struct __attribute_struct_may_alias__ sockaddr_un
3030 {
3131 __SOCKADDR_COMMON (sun_);
3232 char sun_path[108]; /* Path name. */
lib/libc/include/generic-glibc/sys/wait.h+2-2
......@@ -139,7 +139,7 @@ struct rusage;
139139 nil, store information about the child's resource usage there. If the
140140 WUNTRACED bit is set in OPTIONS, return status for stopped children;
141141 otherwise don't. */
142# ifndef __USE_TIME_BITS64
142# ifndef __USE_TIME64_REDIRECTS
143143extern __pid_t wait3 (int *__stat_loc, int __options,
144144 struct rusage * __usage) __THROWNL;
145145# else
......@@ -154,7 +154,7 @@ extern __pid_t __REDIRECT_NTHNL (wait3, (int *__stat_loc, int __options,
154154#endif
155155
156156#ifdef __USE_MISC
157# ifndef __USE_TIME_BITS64
157# ifndef __USE_TIME64_REDIRECTS
158158/* PID is like waitpid. Other args are like wait3. */
159159extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
160160 struct rusage *__usage) __THROWNL;
lib/libc/include/generic-glibc/tgmath.h+38-23
......@@ -42,12 +42,12 @@
4242 versions before GCC 13 have __builtin_tgmath semantics that, when
4343 integer arguments are passed to narrowing macros returning
4444 _Float32x, or non-narrowing macros with at least two generic
45 arguments, do not always correspond to the C2X semantics, so more
45 arguments, do not always correspond to the C23 semantics, so more
4646 complicated macro definitions are also used in some cases for
4747 versions from GCC 8 to GCC 12. */
4848
4949#define __HAVE_BUILTIN_TGMATH __GNUC_PREREQ (8, 0)
50#define __HAVE_BUILTIN_TGMATH_C2X __GNUC_PREREQ (13, 0)
50#define __HAVE_BUILTIN_TGMATH_C23 __GNUC_PREREQ (13, 0)
5151
5252#if __GNUC_PREREQ (2, 7)
5353
......@@ -171,7 +171,7 @@
171171 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y))
172172# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
173173 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y), (Z))
174# if __HAVE_FLOAT128 && __HAVE_BUILTIN_TGMATH_C2X
174# if __HAVE_FLOAT128 && __HAVE_BUILTIN_TGMATH_C23
175175# define __TGMATH_1_NARROW_F32X(F, X) \
176176 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X))
177177# define __TGMATH_2_NARROW_F32X(F, X, Y) \
......@@ -182,7 +182,7 @@
182182
183183# endif
184184
185# if !__HAVE_BUILTIN_TGMATH_C2X
185# if !__HAVE_BUILTIN_TGMATH_C23
186186# ifdef __NO_LONG_DOUBLE_MATH
187187# define __tgml(fct) fct
188188# else
......@@ -261,20 +261,20 @@
261261 __complex_integer_type (__typeof__ (+(expr))))
262262
263263/* The tgmath real type of EXPR1 combined with EXPR2, without handling
264 the C2X rule of interpreting integer arguments as _Float32x if any
264 the C23 rule of interpreting integer arguments as _Float32x if any
265265 argument is _FloatNx. */
266266# define __tgmath_real_type2_base(expr1, expr2) \
267267 __typeof ((__tgmath_real_type (expr1)) 0 + (__tgmath_real_type (expr2)) 0)
268268
269269/* The tgmath complex type of EXPR1 combined with EXPR2, without
270 handling the C2X rule of interpreting integer arguments as
270 handling the C23 rule of interpreting integer arguments as
271271 _Float32x if any argument is _FloatNx. */
272272# define __tgmath_complex_type2_base(expr1, expr2) \
273273 __typeof ((__tgmath_complex_type (expr1)) 0 \
274274 + (__tgmath_complex_type (expr2)) 0)
275275
276276/* The tgmath real type of EXPR1 combined with EXPR2 and EXPR3,
277 without handling the C2X rule of interpreting integer arguments as
277 without handling the C23 rule of interpreting integer arguments as
278278 _Float32x if any argument is _FloatNx. */
279279# define __tgmath_real_type3_base(expr1, expr2, expr3) \
280280 __typeof ((__tgmath_real_type (expr1)) 0 \
......@@ -361,7 +361,7 @@
361361# define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) /* Nothing. */
362362# endif
363363
364# endif /* !__HAVE_BUILTIN_TGMATH_C2X. */
364# endif /* !__HAVE_BUILTIN_TGMATH_C23. */
365365
366366/* We have two kinds of generic macros: to support functions which are
367367 only defined on real valued parameters and those which are defined
......@@ -374,13 +374,13 @@
374374 __TGMATH_2 (Fct, (Val1), (Val2))
375375# define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \
376376 __TGMATH_2STD (Fct, (Val1), (Val2))
377# if __HAVE_BUILTIN_TGMATH_C2X
377# if __HAVE_BUILTIN_TGMATH_C23
378378# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
379379 __TGMATH_2 (Fct, (Val1), (Val2))
380380# endif
381381# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
382382 __TGMATH_2STD (Fct, (Val1), (Val2))
383# if __HAVE_BUILTIN_TGMATH_C2X
383# if __HAVE_BUILTIN_TGMATH_C23
384384# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
385385 __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
386386# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
......@@ -395,7 +395,7 @@
395395 __TGMATH_1C (Fct, Cfct, (Val))
396396# define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct) \
397397 __TGMATH_1 (Cfct, (Val))
398# if __HAVE_BUILTIN_TGMATH_C2X
398# if __HAVE_BUILTIN_TGMATH_C23
399399# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
400400 __TGMATH_2C (Fct, Cfct, (Val1), (Val2))
401401# endif
......@@ -441,7 +441,7 @@
441441 : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
442442# endif
443443
444# if !__HAVE_BUILTIN_TGMATH_C2X
444# if !__HAVE_BUILTIN_TGMATH_C23
445445# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
446446 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
447447 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
......@@ -479,7 +479,7 @@
479479 Fct##f (Val1, Val2)))
480480# endif
481481
482# if !__HAVE_BUILTIN_TGMATH_C2X
482# if !__HAVE_BUILTIN_TGMATH_C23
483483# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
484484 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
485485 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
......@@ -597,7 +597,7 @@
597597 __TGMATH_UNARY_REAL_IMAG_RET_REAL ((Val), Cfct, Cfct)
598598# endif
599599
600# if !__HAVE_BUILTIN_TGMATH_C2X
600# if !__HAVE_BUILTIN_TGMATH_C23
601601/* XXX This definition has to be changed as soon as the compiler understands
602602 the imaginary keyword. */
603603# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
......@@ -664,7 +664,7 @@
664664 distinguished using sizeof (or at all if the types are typedefs
665665 rather than different types, in which case we err on the side of
666666 using the wider type if unsure). */
667# if !__HAVE_BUILTIN_TGMATH_C2X
667# if !__HAVE_BUILTIN_TGMATH_C23
668668# if __HAVE_FLOATN_NOT_TYPEDEF
669669# define __TGMATH_NARROW_F32X_USE_F64X(X) \
670670 !__builtin_types_compatible_p (__typeof (+(X)), _Float64)
......@@ -714,7 +714,7 @@
714714 F ## f64x (X, Y, Z) \
715715 : F ## f128 (X, Y, Z)))
716716# endif
717# if !__HAVE_BUILTIN_TGMATH_C2X
717# if !__HAVE_BUILTIN_TGMATH_C23
718718# define __TGMATH_1_NARROW_F32X(F, X) \
719719 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
720720 || __TGMATH_NARROW_F32X_USE_F64X (X) \
......@@ -761,7 +761,7 @@
761761# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
762762 (F ## f128 (X, Y, Z))
763763# endif
764# if !__HAVE_BUILTIN_TGMATH_C2X
764# if !__HAVE_BUILTIN_TGMATH_C23
765765# define __TGMATH_1_NARROW_F32X(F, X) \
766766 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float32x) \
767767 || __TGMATH_NARROW_F32X_USE_F64X (X) \
......@@ -871,9 +871,24 @@
871871/* Compute base-2 logarithm of X. */
872872#define log2(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2)
873873
874#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
874#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
875875/* Compute exponent to base ten. */
876876#define exp10(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp10)
877
878/* Return exp2(X) - 1. */
879#define exp2m1(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp2m1)
880
881/* Return exp10(X) - 1. */
882#define exp10m1(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp10m1)
883
884/* Return log2(1 + X). */
885#define log2p1(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2p1)
886
887/* Return log10(1 + X). */
888#define log10p1(Val) __TGMATH_UNARY_REAL_ONLY (Val, log10p1)
889
890/* Return log(1 + X). */
891#define logp1(Val) __TGMATH_UNARY_REAL_ONLY (Val, logp1)
877892#endif
878893
879894
......@@ -949,7 +964,7 @@
949964 prevailing rounding mode. */
950965#define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val, rint)
951966
952#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
967#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
953968/* Return X - epsilon. */
954969# define nextdown(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextdown)
955970/* Return X + epsilon. */
......@@ -983,7 +998,7 @@
983998/* Return positive difference between X and Y. */
984999#define fdim(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fdim)
9851000
986#if __GLIBC_USE (ISOC2X) && !defined __USE_GNU
1001#if __GLIBC_USE (ISOC23) && !defined __USE_GNU
9871002/* Return maximum numeric value from X and Y. */
9881003# define fmax(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, fmax)
9891004
......@@ -1002,7 +1017,7 @@
10021017#define fma(Val1, Val2, Val3) \
10031018 __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma)
10041019
1005#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
1020#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
10061021/* Round X to nearest integer value, rounding halfway cases to even. */
10071022# define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven)
10081023
......@@ -1030,7 +1045,7 @@
10301045# define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag)
10311046#endif
10321047
1033#if __GLIBC_USE (ISOC2X)
1048#if __GLIBC_USE (ISOC23)
10341049/* Return maximum value from X and Y. */
10351050# define fmaximum(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaximum)
10361051
......@@ -1086,7 +1101,7 @@
10861101
10871102/* Narrowing functions. */
10881103
1089#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
1104#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
10901105
10911106/* Add. */
10921107# define fadd(Val1, Val2) __TGMATH_2_NARROW_F (fadd, Val1, Val2)
lib/libc/include/generic-glibc/threads.h+3-3
......@@ -90,7 +90,7 @@ extern thrd_t thrd_current (void);
9090 __TIME_POINT. The current thread may resume if receives a signal. In
9191 that case, if __REMAINING is not NULL, the remaining time is stored in
9292 the object pointed by it. */
93#ifndef __USE_TIME_BITS64
93#ifndef __USE_TIME64_REDIRECTS
9494extern int thrd_sleep (const struct timespec *__time_point,
9595 struct timespec *__remaining);
9696#else
......@@ -143,7 +143,7 @@ extern int mtx_lock (mtx_t *__mutex);
143143/* Block the current thread until the mutex pointed by __MUTEX is unlocked
144144 or time pointed by __TIME_POINT is reached. In case the mutex is unlock,
145145 the current thread will not be blocked. */
146#ifndef __USE_TIME_BITS64
146#ifndef __USE_TIME64_REDIRECTS
147147extern int mtx_timedlock (mtx_t *__restrict __mutex,
148148 const struct timespec *__restrict __time_point);
149149#else
......@@ -194,7 +194,7 @@ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex);
194194/* Block current thread on the condition variable until condition variable
195195 pointed by __COND is signaled or time pointed by __TIME_POINT is
196196 reached. */
197#ifndef __USE_TIME_BITS64
197#ifndef __USE_TIME64_REDIRECTS
198198extern int cnd_timedwait (cnd_t *__restrict __cond,
199199 mtx_t *__restrict __mutex,
200200 const struct timespec *__restrict __time_point);
lib/libc/include/generic-glibc/time.h+18-19
......@@ -71,13 +71,12 @@ __BEGIN_DECLS
7171 The result / CLOCKS_PER_SEC is program time in seconds. */
7272extern clock_t clock (void) __THROW;
7373
74#ifndef __USE_TIME_BITS64
74#ifndef __USE_TIME64_REDIRECTS
7575/* Return the current time and put it in *TIMER if TIMER is not NULL. */
7676extern time_t time (time_t *__timer) __THROW;
7777
7878/* Return the difference between TIME1 and TIME0. */
79extern double difftime (time_t __time1, time_t __time0)
80 __THROW __attribute__ ((__const__));
79extern double difftime (time_t __time1, time_t __time0);
8180
8281/* Return the `time_t' representation of TP and normalize TP. */
8382extern time_t mktime (struct tm *__tp) __THROW;
......@@ -85,7 +84,7 @@ extern time_t mktime (struct tm *__tp) __THROW;
8584# ifdef __REDIRECT_NTH
8685extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64);
8786extern double __REDIRECT_NTH (difftime, (time_t __time1, time_t __time0),
88 __difftime64) __attribute__ ((__const__));
87 __difftime64);
8988extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
9089# else
9190# define time __time64
......@@ -127,7 +126,7 @@ extern char *strptime_l (const char *__restrict __s,
127126#endif
128127
129128
130#ifndef __USE_TIME_BITS64
129#ifndef __USE_TIME64_REDIRECTS
131130/* Return the `struct tm' representation of *TIMER
132131 in Universal Coordinated Time (aka Greenwich Mean Time). */
133132extern struct tm *gmtime (const time_t *__timer) __THROW;
......@@ -148,8 +147,8 @@ extern struct tm *__REDIRECT_NTH (localtime, (const time_t *__timer),
148147#endif
149148
150149
151#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
152# ifndef __USE_TIME_BITS64
150#if defined __USE_POSIX || __GLIBC_USE (ISOC23)
151# ifndef __USE_TIME64_REDIRECTS
153152/* Return the `struct tm' representation of *TIMER in UTC,
154153 using *TP to store the result. */
155154extern struct tm *gmtime_r (const time_t *__restrict __timer,
......@@ -173,14 +172,14 @@ extern struct tm*__REDIRECT_NTH (localtime_r, (const time_t *__restrict __t,
173172# define localtime_r __localtime_r
174173# endif
175174# endif
176#endif /* POSIX || C2X */
175#endif /* POSIX || C23 */
177176
178177/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
179178 that is the representation of TP in this format. */
180179extern char *asctime (const struct tm *__tp) __THROW;
181180
182181/* Equivalent to `asctime (localtime (timer))'. */
183#ifndef __USE_TIME_BITS64
182#ifndef __USE_TIME64_REDIRECTS
184183extern char *ctime (const time_t *__timer) __THROW;
185184#else
186185# ifdef __REDIRECT_NTH
......@@ -199,7 +198,7 @@ extern char *asctime_r (const struct tm *__restrict __tp,
199198 char *__restrict __buf) __THROW;
200199
201200/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
202#ifndef __USE_TIME_BITS64
201#ifndef __USE_TIME64_REDIRECTS
203202extern char *ctime_r (const time_t *__restrict __timer,
204203 char *__restrict __buf) __THROW;
205204#else
......@@ -241,8 +240,8 @@ extern long int timezone;
241240 ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
242241
243242
244#if defined __USE_MISC || __GLIBC_USE (ISOC2X)
245# ifndef __USE_TIME_BITS64
243#if defined __USE_MISC || __GLIBC_USE (ISOC23)
244# ifndef __USE_TIME64_REDIRECTS
246245/* Like `mktime', but for TP represents Universal Time, not local time. */
247246extern time_t timegm (struct tm *__tp) __THROW;
248247# else
......@@ -259,7 +258,7 @@ extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64);
259258/* Miscellaneous functions many Unices inherited from the public domain
260259 localtime package. These are included only for compatibility. */
261260
262#ifndef __USE_TIME_BITS64
261#ifndef __USE_TIME64_REDIRECTS
263262/* Another name for `mktime'. */
264263extern time_t timelocal (struct tm *__tp) __THROW;
265264#else
......@@ -274,7 +273,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
274273
275274
276275#ifdef __USE_POSIX199309
277# ifndef __USE_TIME_BITS64
276# ifndef __USE_TIME64_REDIRECTS
278277/* Pause execution for a number of nanoseconds.
279278
280279 This function is a cancellation point and therefore not marked with
......@@ -320,7 +319,7 @@ extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct
320319
321320 This function is a cancellation point and therefore not marked with
322321 __THROW. */
323# ifndef __USE_TIME_BITS64
322# ifndef __USE_TIME64_REDIRECTS
324323extern int clock_nanosleep (clockid_t __clock_id, int __flags,
325324 const struct timespec *__req,
326325 struct timespec *__rem);
......@@ -349,7 +348,7 @@ extern int timer_create (clockid_t __clock_id,
349348extern int timer_delete (timer_t __timerid) __THROW;
350349
351350/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
352# ifndef __USE_TIME_BITS64
351# ifndef __USE_TIME64_REDIRECTS
353352extern int timer_settime (timer_t __timerid, int __flags,
354353 const struct itimerspec *__restrict __value,
355354 struct itimerspec *__restrict __ovalue) __THROW;
......@@ -379,7 +378,7 @@ extern int timer_getoverrun (timer_t __timerid) __THROW;
379378
380379
381380#ifdef __USE_ISOC11
382# ifndef __USE_TIME_BITS64
381# ifndef __USE_TIME64_REDIRECTS
383382/* Set TS to calendar time based in time base BASE. */
384383extern int timespec_get (struct timespec *__ts, int __base)
385384 __THROW __nonnull ((1));
......@@ -394,8 +393,8 @@ extern int __REDIRECT_NTH (timespec_get, (struct timespec *__ts, int __base),
394393#endif
395394
396395
397#if __GLIBC_USE (ISOC2X)
398# ifndef __USE_TIME_BITS64
396#if __GLIBC_USE (ISOC23)
397# ifndef __USE_TIME64_REDIRECTS
399398/* Set TS to resolution of time base BASE. */
400399extern int timespec_getres (struct timespec *__ts, int __base)
401400 __THROW;
lib/libc/include/generic-glibc/uchar.h+4-4
......@@ -31,9 +31,9 @@
3131#include <bits/types.h>
3232#include <bits/types/mbstate_t.h>
3333
34/* Declare the C2x char8_t typedef in C2x modes, but only if the C++
34/* Declare the C23 char8_t typedef in C23 modes, but only if the C++
3535 __cpp_char8_t feature test macro is not defined. */
36#if __GLIBC_USE (ISOC2X) && !defined __cpp_char8_t
36#if __GLIBC_USE (ISOC23) && !defined __cpp_char8_t
3737#if __GNUC_PREREQ (10, 0) && defined __cplusplus
3838/* Suppress the diagnostic regarding char8_t being a keyword in C++20. */
3939# pragma GCC diagnostic push
......@@ -55,9 +55,9 @@ typedef __uint_least32_t char32_t;
5555
5656__BEGIN_DECLS
5757
58/* Declare the C2x mbrtoc8() and c8rtomb() functions in C2x modes or if
58/* Declare the C23 mbrtoc8() and c8rtomb() functions in C23 modes or if
5959 the C++ __cpp_char8_t feature test macro is defined. */
60#if __GLIBC_USE (ISOC2X) || defined __cpp_char8_t
60#if __GLIBC_USE (ISOC23) || defined __cpp_char8_t
6161/* Write char8_t representation of multibyte character pointed
6262 to by S to PC8. */
6363extern size_t mbrtoc8 (char8_t *__restrict __pc8,
lib/libc/include/generic-glibc/utime.h+2-2
......@@ -35,7 +35,7 @@ __BEGIN_DECLS
3535/* Structure describing file times. */
3636struct utimbuf
3737 {
38#ifdef __USE_TIME_BITS64
38#ifdef __USE_TIME64_REDIRECTS
3939 __time64_t actime; /* Access time. */
4040 __time64_t modtime; /* Modification time. */
4141#else
......@@ -46,7 +46,7 @@ struct utimbuf
4646
4747/* Set the access and modification times of FILE to those given in
4848 *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
49#ifndef __USE_TIME_BITS64
49#ifndef __USE_TIME64_REDIRECTS
5050extern int utime (const char *__file,
5151 const struct utimbuf *__file_times)
5252 __THROW __nonnull ((1));
lib/libc/include/generic-glibc/wchar.h+6-6
......@@ -410,7 +410,7 @@ extern long double wcstold (const wchar_t *__restrict __nptr,
410410 wchar_t **__restrict __endptr) __THROW;
411411#endif /* C99 */
412412
413#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X)
413#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC23)
414414/* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */
415415
416416# if __HAVE_FLOAT16
......@@ -447,7 +447,7 @@ extern _Float64x wcstof64x (const wchar_t *__restrict __nptr,
447447extern _Float128x wcstof128x (const wchar_t *__restrict __nptr,
448448 wchar_t **__restrict __endptr) __THROW;
449449# endif
450#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) */
450#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC23) */
451451
452452
453453/* Convert initial portion of wide string NPTR to `long int'
......@@ -495,7 +495,7 @@ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
495495
496496/* Versions of the above functions that handle '0b' and '0B' prefixes
497497 in base 0 or 2. */
498#if __GLIBC_USE (C2X_STRTOL)
498#if __GLIBC_USE (C23_STRTOL)
499499# ifdef __REDIRECT
500500extern long int __REDIRECT_NTH (wcstol, (const wchar_t *__restrict __nptr,
501501 wchar_t **__restrict __endptr,
......@@ -579,7 +579,7 @@ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
579579
580580/* Versions of the above functions that handle '0b' and '0B' prefixes
581581 in base 0 or 2. */
582# if __GLIBC_USE (C2X_STRTOL)
582# if __GLIBC_USE (C23_STRTOL)
583583# ifdef __REDIRECT
584584extern long int __REDIRECT_NTH (wcstol_l, (const wchar_t *__restrict __nptr,
585585 wchar_t **__restrict __endptr,
......@@ -790,7 +790,7 @@ extern int swscanf (const wchar_t *__restrict __s,
790790 bits/wchar-ldbl.h. */
791791# if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
792792 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
793# if __GLIBC_USE (C2X_STRTOL)
793# if __GLIBC_USE (C23_STRTOL)
794794# ifdef __REDIRECT
795795extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
796796 const wchar_t *__restrict __format, ...),
......@@ -870,7 +870,7 @@ extern int vswscanf (const wchar_t *__restrict __s,
870870 && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
871871 && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \
872872 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
873# if __GLIBC_USE (C2X_STRTOL)
873# if __GLIBC_USE (C23_STRTOL)
874874# ifdef __REDIRECT
875875extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
876876 const wchar_t *__restrict __format,
lib/libc/include/loongarch64-linux-gnu/bits/fenv.h+1-1
......@@ -81,7 +81,7 @@ typedef struct
8181#define FE_NOMASK_ENV ((const fenv_t *) -257)
8282#endif
8383
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
84#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8585/* Type representing floating-point control modes. */
8686typedef unsigned int femode_t;
8787
lib/libc/include/loongarch64-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/loongarch64-linux-gnu/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/loongarch64-linux-gnu/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/loongarch64-linux-gnu/fpu_control.h+2-2
......@@ -91,8 +91,8 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
9191/* Macros for accessing the hardware control word. */
9292extern fpu_control_t __loongarch_fpu_getcw (void) __THROW;
9393extern void __loongarch_fpu_setcw (fpu_control_t) __THROW;
94#define _FPU_GETCW(cw) __asm__ volatile ("movfcsr2gr %0,$r0" : "=r"(cw))
95#define _FPU_SETCW(cw) __asm__ volatile ("movgr2fcsr $r0,%0" : : "r"(cw))
94#define _FPU_GETCW(cw) __asm__ volatile ("movfcsr2gr %0,$fcsr0" : "=r"(cw))
95#define _FPU_SETCW(cw) __asm__ volatile ("movgr2fcsr $fcsr0,%0" : : "r"(cw))
9696
9797/* Default control word set at startup. */
9898extern fpu_control_t __fpu_control;
lib/libc/include/m68k-linux-gnu/bits/fenv.h+1-1
......@@ -122,7 +122,7 @@ fenv_t;
122122# define FE_NOMASK_ENV ((const fenv_t *) -2)
123123#endif
124124
125#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
125#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
126126/* Type representing floating-point control modes. */
127127typedef unsigned int femode_t;
128128
lib/libc/include/m68k-linux-gnu/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/m68k-linux-gnu/bits/struct_stat.h+4-4
......@@ -25,7 +25,7 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
28#ifdef __USE_TIME64_REDIRECTS
2929# include <bits/struct_stat_time64_helper.h>
3030#else
3131 __dev_t st_dev; /* Device. */
......@@ -80,13 +80,13 @@ struct stat
8080# else
8181 __ino64_t st_ino; /* File serial number. */
8282# endif
83#endif /* __USE_TIME_BITS64 */
83#endif /* __USE_TIME64_REDIRECTS */
8484 };
8585
8686#ifdef __USE_LARGEFILE64
8787struct stat64
8888 {
89# ifdef __USE_TIME_BITS64
89# ifdef __USE_TIME64_REDIRECTS
9090# include <bits/struct_stat_time64_helper.h>
9191# else
9292 __dev_t st_dev; /* Device. */
......@@ -122,7 +122,7 @@ struct stat64
122122 unsigned long int st_ctimensec; /* Nsecs of last status change. */
123123# endif
124124 __ino64_t st_ino; /* File serial number. */
125# endif /* __USE_TIME_BITS64 */
125# endif /* __USE_TIME64_REDIRECTS */
126126 };
127127#endif
128128
lib/libc/include/m68k-linux-gnu/bits/wordsize.h+1-1
......@@ -16,6 +16,6 @@
1616 <https://www.gnu.org/licenses/>. */
1717
1818#define __WORDSIZE 32
19#define __WORDSIZE_TIME64_COMPAT32 0
19#define __WORDSIZE_TIME64_COMPAT32 1
2020#define __WORDSIZE32_SIZE_ULONG 0
2121#define __WORDSIZE32_PTRDIFF_LONG 0
\ No newline at end of file
lib/libc/include/mips-linux-gnueabi/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mips-linux-gnueabi/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mips-linux-gnueabi/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mips-linux-gnueabi/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mips-linux-gnueabi/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mips-linux-gnueabi/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mips-linux-gnueabihf/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mips-linux-gnueabihf/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mips-linux-gnueabihf/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mips-linux-gnueabihf/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mips-linux-gnueabihf/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mips64-linux-gnuabi64/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mips64-linux-gnuabin32/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mips64el-linux-gnuabi64/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mips64el-linux-gnuabin32/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabi/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabi/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mipsel-linux-gnueabi/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabihf/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabihf/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases.
30
31 RSEQ_SIG uses the break instruction. The instruction pattern is:
32
33 On MIPS:
34 0350000d break 0x350
35
36 On nanoMIPS:
37 00100350 break 0x350
38
39 On microMIPS:
40 0000d407 break 0x350
41
42 For nanoMIPS32 and microMIPS, the instruction stream is encoded as
43 16-bit halfwords, so the signature halfwords need to be swapped
44 accordingly for little-endian. */
45
46#if defined (__nanomips__)
47# ifdef __MIPSEL__
48# define RSEQ_SIG 0x03500010
49# else
50# define RSEQ_SIG 0x00100350
51# endif
52#elif defined (__mips_micromips)
53# ifdef __MIPSEL__
54# define RSEQ_SIG 0xd4070000
55# else
56# define RSEQ_SIG 0x0000d407
57# endif
58#elif defined (__mips__)
59# define RSEQ_SIG 0x0350000d
60#else
61/* Unknown MIPS architecture. */
62#endif
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/mipsel-linux-gnueabihf/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#ifdef __LP64__
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for rlim_t and rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabi/bits/fenv.h+1-1
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc-linux-gnueabi/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/powerpc-linux-gnueabi/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828#if __WORDSIZE == 32
2929struct stat
3030 {
31# ifdef __USE_TIME_BITS64
31# ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333# else
3434 __dev_t st_dev; /* Device. */
......@@ -79,13 +79,13 @@ struct stat
7979# endif
8080 unsigned long int __glibc_reserved4;
8181 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
82# endif /* __USE_TIME64_REDIRECTS */
8383 };
8484
8585# ifdef __USE_LARGEFILE64
8686struct stat64
8787 {
88# ifdef __USE_TIME_BITS64
88# ifdef __USE_TIME64_REDIRECTS
8989# include <bits/struct_stat_time64_helper.h>
9090# else
9191 __dev_t st_dev; /* Device. */
......@@ -122,7 +122,7 @@ struct stat64
122122# endif
123123 unsigned long int __glibc_reserved4;
124124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
125# endif /* __USE_TIME64_REDIRECTS */
126126 };
127127# endif /* __USE_LARGEFILE64 */
128128
lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/powerpc-linux-gnueabi/bits/wordsize.h+2-3
......@@ -2,10 +2,9 @@
22
33#if defined __powerpc64__
44# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
65#else
76# define __WORDSIZE 32
8# define __WORDSIZE_TIME64_COMPAT32 0
97# define __WORDSIZE32_SIZE_ULONG 0
108# define __WORDSIZE32_PTRDIFF_LONG 0
11#endif
\ No newline at end of file
9#endif
10#define __WORDSIZE_TIME64_COMPAT32 1
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names-32.h created+26
......@@ -0,0 +1,26 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
4#endif
5
6#define LD_SO "ld.so.1"
7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
10#define LIBC_SO "libc.so.6"
11#define LIBDL_SO "libdl.so.2"
12#define LIBGCC_S_SO "libgcc_s.so.1"
13#define LIBMVEC_SO "libmvec.so.1"
14#define LIBM_SO "libm.so.6"
15#define LIBNSL_SO "libnsl.so.1"
16#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
17#define LIBNSS_DB_SO "libnss_db.so.2"
18#define LIBNSS_DNS_SO "libnss_dns.so.2"
19#define LIBNSS_FILES_SO "libnss_files.so.2"
20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
22#define LIBPTHREAD_SO "libpthread.so.0"
23#define LIBRESOLV_SO "libresolv.so.2"
24#define LIBRT_SO "librt.so.1"
25#define LIBTHREAD_DB_SO "libthread_db.so.1"
26#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabihf/bits/fenv.h+1-1
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc-linux-gnueabihf/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/powerpc-linux-gnueabihf/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828#if __WORDSIZE == 32
2929struct stat
3030 {
31# ifdef __USE_TIME_BITS64
31# ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333# else
3434 __dev_t st_dev; /* Device. */
......@@ -79,13 +79,13 @@ struct stat
7979# endif
8080 unsigned long int __glibc_reserved4;
8181 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
82# endif /* __USE_TIME64_REDIRECTS */
8383 };
8484
8585# ifdef __USE_LARGEFILE64
8686struct stat64
8787 {
88# ifdef __USE_TIME_BITS64
88# ifdef __USE_TIME64_REDIRECTS
8989# include <bits/struct_stat_time64_helper.h>
9090# else
9191 __dev_t st_dev; /* Device. */
......@@ -122,7 +122,7 @@ struct stat64
122122# endif
123123 unsigned long int __glibc_reserved4;
124124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
125# endif /* __USE_TIME64_REDIRECTS */
126126 };
127127# endif /* __USE_LARGEFILE64 */
128128
lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/powerpc-linux-gnueabihf/bits/wordsize.h+2-3
......@@ -2,10 +2,9 @@
22
33#if defined __powerpc64__
44# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
65#else
76# define __WORDSIZE 32
8# define __WORDSIZE_TIME64_COMPAT32 0
97# define __WORDSIZE32_SIZE_ULONG 0
108# define __WORDSIZE32_PTRDIFF_LONG 0
11#endif
\ No newline at end of file
9#endif
10#define __WORDSIZE_TIME64_COMPAT32 1
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names-32.h created+26
......@@ -0,0 +1,26 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
4#endif
5
6#define LD_SO "ld.so.1"
7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
10#define LIBC_SO "libc.so.6"
11#define LIBDL_SO "libdl.so.2"
12#define LIBGCC_S_SO "libgcc_s.so.1"
13#define LIBMVEC_SO "libmvec.so.1"
14#define LIBM_SO "libm.so.6"
15#define LIBNSL_SO "libnsl.so.1"
16#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
17#define LIBNSS_DB_SO "libnss_db.so.2"
18#define LIBNSS_DNS_SO "libnss_dns.so.2"
19#define LIBNSS_FILES_SO "libnss_files.so.2"
20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
22#define LIBPTHREAD_SO "libpthread.so.0"
23#define LIBRESOLV_SO "libresolv.so.2"
24#define LIBRT_SO "librt.so.1"
25#define LIBTHREAD_DB_SO "libthread_db.so.1"
26#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/fenv.h+1-1
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828#if __WORDSIZE == 32
2929struct stat
3030 {
31# ifdef __USE_TIME_BITS64
31# ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333# else
3434 __dev_t st_dev; /* Device. */
......@@ -79,13 +79,13 @@ struct stat
7979# endif
8080 unsigned long int __glibc_reserved4;
8181 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
82# endif /* __USE_TIME64_REDIRECTS */
8383 };
8484
8585# ifdef __USE_LARGEFILE64
8686struct stat64
8787 {
88# ifdef __USE_TIME_BITS64
88# ifdef __USE_TIME64_REDIRECTS
8989# include <bits/struct_stat_time64_helper.h>
9090# else
9191 __dev_t st_dev; /* Device. */
......@@ -122,7 +122,7 @@ struct stat64
122122# endif
123123 unsigned long int __glibc_reserved4;
124124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
125# endif /* __USE_TIME64_REDIRECTS */
126126 };
127127# endif /* __USE_LARGEFILE64 */
128128
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/powerpc64-linux-gnu/bits/wordsize.h+2-3
......@@ -2,10 +2,9 @@
22
33#if defined __powerpc64__
44# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
65#else
76# define __WORDSIZE 32
8# define __WORDSIZE_TIME64_COMPAT32 0
97# define __WORDSIZE32_SIZE_ULONG 0
108# define __WORDSIZE32_PTRDIFF_LONG 0
11#endif
\ No newline at end of file
9#endif
10#define __WORDSIZE_TIME64_COMPAT32 1
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/fenv.h+1-1
......@@ -170,7 +170,7 @@ extern const fenv_t __fe_nonieee_env;
170170
171171#endif
172172
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
173#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
174174/* Type representing floating-point control modes. */
175175typedef double femode_t;
176176
lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 64
5555# define SO_TIMESTAMPING_NEW 65
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828#if __WORDSIZE == 32
2929struct stat
3030 {
31# ifdef __USE_TIME_BITS64
31# ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333# else
3434 __dev_t st_dev; /* Device. */
......@@ -79,13 +79,13 @@ struct stat
7979# endif
8080 unsigned long int __glibc_reserved4;
8181 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
82# endif /* __USE_TIME64_REDIRECTS */
8383 };
8484
8585# ifdef __USE_LARGEFILE64
8686struct stat64
8787 {
88# ifdef __USE_TIME_BITS64
88# ifdef __USE_TIME64_REDIRECTS
8989# include <bits/struct_stat_time64_helper.h>
9090# else
9191 __dev_t st_dev; /* Device. */
......@@ -122,7 +122,7 @@ struct stat64
122122# endif
123123 unsigned long int __glibc_reserved4;
124124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
125# endif /* __USE_TIME64_REDIRECTS */
126126 };
127127# endif /* __USE_LARGEFILE64 */
128128
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/powerpc64le-linux-gnu/bits/wordsize.h+2-3
......@@ -2,10 +2,9 @@
22
33#if defined __powerpc64__
44# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
65#else
76# define __WORDSIZE 32
8# define __WORDSIZE_TIME64_COMPAT32 0
97# define __WORDSIZE32_SIZE_ULONG 0
108# define __WORDSIZE32_PTRDIFF_LONG 0
11#endif
\ No newline at end of file
9#endif
10#define __WORDSIZE_TIME64_COMPAT32 1
\ No newline at end of file
lib/libc/include/riscv32-linux-gnu/bits/fenv.h+1-1
......@@ -65,7 +65,7 @@ typedef unsigned int fenv_t;
6565/* If the default argument is used we use this value. */
6666#define FE_DFL_ENV ((__const fenv_t *) -1)
6767
68#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
68#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
6969/* Type representing floating-point control modes. */
7070typedef unsigned int femode_t;
7171
lib/libc/include/riscv32-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/riscv32-linux-gnu/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/riscv32-linux-gnu/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/riscv32-linux-gnu/gnu/lib-names-ilp32d.h+1-1
......@@ -24,4 +24,4 @@
2424#define LIBRESOLV_SO "libresolv.so.2"
2525#define LIBRT_SO "librt.so.1"
2626#define LIBTHREAD_DB_SO "libthread_db.so.1"
27#define LIBUTIL_SO "libutil.so.1"
27#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/riscv32-linux-gnu/gnu/stubs-ilp32d.h+1-1
......@@ -21,4 +21,4 @@
2121#define __stub_revoke
2222#define __stub_setlogin
2323#define __stub_sigreturn
24#define __stub_stty
24#define __stub_stty
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/fenv.h+1-1
......@@ -65,7 +65,7 @@ typedef unsigned int fenv_t;
6565/* If the default argument is used we use this value. */
6666#define FE_DFL_ENV ((__const fenv_t *) -1)
6767
68#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
68#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
6969/* Type representing floating-point control modes. */
7070typedef unsigned int femode_t;
7171
lib/libc/include/riscv64-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/typesizes.h deleted-107
......@@ -1,107 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28#if __TIMESIZE == 64 && __WORDSIZE == 32
29/* These are the "new" y2038 types defined for architectures added after
30 the 5.1 kernel. */
31# define __INO_T_TYPE __UQUAD_TYPE
32# define __OFF_T_TYPE __SQUAD_TYPE
33# define __RLIM_T_TYPE __UQUAD_TYPE
34# define __BLKCNT_T_TYPE __SQUAD_TYPE
35# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
36# define __FSFILCNT_T_TYPE __UQUAD_TYPE
37# define __TIME_T_TYPE __SQUAD_TYPE
38# define __SUSECONDS_T_TYPE __SQUAD_TYPE
39#else
40# define __INO_T_TYPE __ULONGWORD_TYPE
41# define __OFF_T_TYPE __SLONGWORD_TYPE
42# define __RLIM_T_TYPE __ULONGWORD_TYPE
43# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
44# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46# define __TIME_T_TYPE __SLONGWORD_TYPE
47# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
48#endif
49
50#define __DEV_T_TYPE __UQUAD_TYPE
51#define __UID_T_TYPE __U32_TYPE
52#define __GID_T_TYPE __U32_TYPE
53#define __INO64_T_TYPE __UQUAD_TYPE
54#define __MODE_T_TYPE __U32_TYPE
55#define __NLINK_T_TYPE __U32_TYPE
56#define __OFF64_T_TYPE __SQUAD_TYPE
57#define __PID_T_TYPE __S32_TYPE
58#define __RLIM64_T_TYPE __UQUAD_TYPE
59#define __BLKCNT64_T_TYPE __SQUAD_TYPE
60#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
62#define __FSWORD_T_TYPE __SWORD_TYPE
63#define __ID_T_TYPE __U32_TYPE
64#define __CLOCK_T_TYPE __SLONGWORD_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE
70#define __TIMER_T_TYPE void *
71#define __BLKSIZE_T_TYPE __S32_TYPE
72#define __FSID_T_TYPE struct { int __val[2]; }
73#define __SSIZE_T_TYPE __SWORD_TYPE
74#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
75#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
76#define __CPU_MASK_TYPE __ULONGWORD_TYPE
77
78#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
79/* Tell the libc code that off_t and off64_t are actually the same type
80 for all ABI purposes, even if possibly expressed as different base types
81 for C type-checking purposes. */
82# define __OFF_T_MATCHES_OFF64_T 1
83
84/* Same for ino_t and ino64_t. */
85# define __INO_T_MATCHES_INO64_T 1
86
87/* And for __rlim_t and __rlim64_t. */
88# define __RLIM_T_MATCHES_RLIM64_T 1
89
90/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
91# define __STATFS_MATCHES_STATFS64 1
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
95#else
96# define __RLIM_T_MATCHES_RLIM64_T 0
97
98# define __STATFS_MATCHES_STATFS64 0
99
100# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
101#endif
102
103/* Number of descriptors that can fit in an `fd_set'. */
104#define __FD_SETSIZE 1024
105
106
107#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64d.h+1-1
......@@ -24,4 +24,4 @@
2424#define LIBRESOLV_SO "libresolv.so.2"
2525#define LIBRT_SO "librt.so.1"
2626#define LIBTHREAD_DB_SO "libthread_db.so.1"
27#define LIBUTIL_SO "libutil.so.1"
27#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64d.h+1-1
......@@ -21,4 +21,4 @@
2121#define __stub_revoke
2222#define __stub_setlogin
2323#define __stub_sigreturn
24#define __stub_stty
24#define __stub_stty
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/fenv.h+1-1
......@@ -90,7 +90,7 @@ typedef struct
9090# define FE_NOMASK_ENV ((const fenv_t *) -2)
9191#endif
9292
93#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
93#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
9494/* Type representing floating-point control modes. */
9595typedef unsigned int femode_t;
9696
lib/libc/include/s390x-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/struct_stat.h+2-2
......@@ -65,7 +65,7 @@ struct stat
6565#else
6666struct stat
6767 {
68# ifdef __USE_TIME_BITS64
68# ifdef __USE_TIME64_REDIRECTS
6969# include <bits/struct_stat_time64_helper.h>
7070# else
7171 __dev_t st_dev; /* Device. */
......@@ -166,7 +166,7 @@ struct stat64
166166# else
167167struct stat64
168168 {
169# ifdef __USE_TIME_BITS64
169# ifdef __USE_TIME64_REDIRECTS
170170# include <bits/struct_stat_time64_helper.h>
171171# else
172172 __dev_t st_dev; /* Device. */
lib/libc/include/sparc-linux-gnu/a.out.h created+174
......@@ -0,0 +1,174 @@
1#ifndef __A_OUT_GNU_H__
2#define __A_OUT_GNU_H__
3
4#include <bits/a.out.h>
5
6#define __GNU_EXEC_MACROS__
7
8struct exec
9{
10 unsigned char a_dynamic:1; /* A __DYNAMIC is in this image. */
11 unsigned char a_toolversion:7;
12 unsigned char a_machtype;
13 unsigned short a_info;
14 unsigned int a_text; /* Length of text, in bytes. */
15 unsigned int a_data; /* Length of data, in bytes. */
16 unsigned int a_bss; /* Length of bss, in bytes. */
17 unsigned int a_syms; /* Length of symbol table, in bytes. */
18 unsigned int a_entry; /* Where program begins. */
19 unsigned int a_trsize;
20 unsigned int a_drsize;
21};
22
23enum machine_type
24{
25 M_OLDSUN2 = 0,
26 M_68010 = 1,
27 M_68020 = 2,
28 M_SPARC = 3,
29 M_386 = 100,
30 M_MIPS1 = 151,
31 M_MIPS2 = 152
32};
33
34#define N_MAGIC(exec) ((exec).a_info & 0xffff)
35#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
36#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
37#define N_SET_INFO(exec, magic, type, flags) \
38 ((exec).a_info = ((magic) & 0xffff) \
39 | (((int)(type) & 0xff) << 16) \
40 | (((flags) & 0xff) << 24))
41#define N_SET_MAGIC(exec, magic) \
42 ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff))
43#define N_SET_MACHTYPE(exec, machtype) \
44 ((exec).a_info = \
45 ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
46#define N_SET_FLAGS(exec, flags) \
47 ((exec).a_info = \
48 ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
49
50/* Code indicating object file or impure executable. */
51#define OMAGIC 0407
52/* Code indicating pure executable. */
53#define NMAGIC 0410
54/* Code indicating demand-paged executable. */
55#define ZMAGIC 0413
56/* This indicates a demand-paged executable with the header in the text.
57 The first page is unmapped to help trap NULL pointer references. */
58#define QMAGIC 0314
59/* Code indicating core file. */
60#define CMAGIC 0421
61
62#define N_TRSIZE(a) ((a).a_trsize)
63#define N_DRSIZE(a) ((a).a_drsize)
64#define N_SYMSIZE(a) ((a).a_syms)
65#define N_BADMAG(x) \
66 (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
67 && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
68#define _N_HDROFF(x) (1024 - sizeof (struct exec))
69#define N_TXTOFF(x) \
70 (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
71#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
72#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
73#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
74#define N_SYMOFF(x) \
75 (N_TXTOFF(x) + (x).a_text + (x).a_data + (x).a_trsize + (x).a_drsize)
76#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
77
78#define SPARC_PGSIZE 0x2000
79
80/* Address of text segment in memory after it is loaded. */
81#define N_TXTADDR(x) \
82 (unsigned long)(((N_MAGIC(x) == ZMAGIC) && ((x).a_entry < SPARC_PGSIZE)) \
83 ? 0 : SPARC_PGSIZE)
84
85/* Address of data segment in memory after it is loaded. */
86#define SEGMENT_SIZE SPARC_PGSIZE
87
88#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1))
89#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
90
91#define N_DATADDR(x) \
92 (N_MAGIC(x)==OMAGIC \
93 ? (N_TXTADDR(x) + (x).a_text) \
94 : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
95#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
96
97#if !defined (N_NLIST_DECLARED)
98struct nlist
99{
100 union
101 {
102 char *n_name;
103 struct nlist *n_next;
104 long n_strx;
105 } n_un;
106 unsigned char n_type;
107 char n_other;
108 short n_desc;
109 unsigned long n_value;
110};
111#endif /* no N_NLIST_DECLARED. */
112
113#define N_UNDF 0
114#define N_ABS 2
115#define N_TEXT 4
116#define N_DATA 6
117#define N_BSS 8
118#define N_FN 15
119#define N_EXT 1
120#define N_TYPE 036
121#define N_STAB 0340
122#define N_INDR 0xa
123#define N_SETA 0x14 /* Absolute set element symbol. */
124#define N_SETT 0x16 /* Text set element symbol. */
125#define N_SETD 0x18 /* Data set element symbol. */
126#define N_SETB 0x1A /* Bss set element symbol. */
127#define N_SETV 0x1C /* Pointer to set vector in data area. */
128
129#if !defined (N_RELOCATION_INFO_DECLARED)
130enum reloc_type
131{
132 RELOC_8,
133 RELOC_16,
134 RELOC_32,
135 RELOC_DISP8,
136 RELOC_DISP16,
137 RELOC_DISP32,
138 RELOC_WDISP30,
139 RELOC_WDISP22,
140 RELOC_HI22,
141 RELOC_22,
142 RELOC_13,
143 RELOC_LO10,
144 RELOC_SFA_BASE,
145 RELOC_SFA_OFF13,
146 RELOC_BASE10,
147 RELOC_BASE13,
148 RELOC_BASE22,
149 RELOC_PC10,
150 RELOC_PC22,
151 RELOC_JMP_TBL,
152 RELOC_SEGOFF16,
153 RELOC_GLOB_DAT,
154 RELOC_JMP_SLOT,
155 RELOC_RELATIVE
156};
157
158/* This structure describes a single relocation to be performed.
159 The text-relocation section of the file is a vector of these structures,
160 all of which apply to the text section.
161 Likewise, the data-relocation section applies to the data section. */
162
163struct relocation_info
164{
165 unsigned int r_address;
166 unsigned int r_index:24;
167 unsigned int r_extern:1;
168 int r_pad:2;
169 enum reloc_type r_type:5;
170 int r_addend;
171};
172#endif /* no N_RELOCATION_INFO_DECLARED. */
173
174#endif /* __A_OUT_GNU_H__ */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/a.out.h created+13
......@@ -0,0 +1,13 @@
1#ifndef __A_OUT_GNU_H__
2# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
3#endif
4
5#include <bits/wordsize.h>
6
7#if __WORDSIZE == 64
8
9/* Signal to users of this header that this architecture really doesn't
10 support a.out binary format. */
11#define __NO_A_OUT_SUPPORT 1
12
13#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/endianness.h created+16
......@@ -0,0 +1,16 @@
1#ifndef _BITS_ENDIANNESS_H
2#define _BITS_ENDIANNESS_H 1
3
4#ifndef _BITS_ENDIAN_H
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif
7
8/* Sparc is big-endian, but v9 supports endian conversion on loads/stores
9 and GCC supports such a mode. Be prepared. */
10#ifdef __LITTLE_ENDIAN__
11# define __BYTE_ORDER __LITTLE_ENDIAN
12#else
13# define __BYTE_ORDER __BIG_ENDIAN
14#endif
15
16#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/environments.h created+96
......@@ -0,0 +1,96 @@
1/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _UNISTD_H
19# error "Never include this file directly. Use <unistd.h> instead"
20#endif
21
22#include <bits/wordsize.h>
23
24/* This header should define the following symbols under the described
25 situations. A value `1' means that the model is always supported,
26 `-1' means it is never supported. Undefined means it cannot be
27 statically decided.
28
29 _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
30 _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
31
32 _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
33 _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
34
35 The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
36 _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
37 _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
38 used in previous versions of the Unix standard and are available
39 only for compatibility.
40*/
41
42#if __WORDSIZE == 64
43
44/* Environments with 32-bit wide pointers are optionally provided.
45 Therefore following macros aren't defined:
46 # undef _POSIX_V7_ILP32_OFF32
47 # undef _POSIX_V7_ILP32_OFFBIG
48 # undef _POSIX_V6_ILP32_OFF32
49 # undef _POSIX_V6_ILP32_OFFBIG
50 # undef _XBS5_ILP32_OFF32
51 # undef _XBS5_ILP32_OFFBIG
52 and users need to check at runtime. */
53
54/* We also have no use (for now) for an environment with bigger pointers
55 and offsets. */
56# define _POSIX_V7_LPBIG_OFFBIG -1
57# define _POSIX_V6_LPBIG_OFFBIG -1
58# define _XBS5_LPBIG_OFFBIG -1
59
60/* By default we have 64-bit wide `long int', pointers and `off_t'. */
61# define _POSIX_V7_LP64_OFF64 1
62# define _POSIX_V6_LP64_OFF64 1
63# define _XBS5_LP64_OFF64 1
64
65#else /* __WORDSIZE == 32 */
66
67/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
68 and all platforms support LFS. */
69# define _POSIX_V7_ILP32_OFF32 1
70# define _POSIX_V7_ILP32_OFFBIG 1
71# define _POSIX_V6_ILP32_OFF32 1
72# define _POSIX_V6_ILP32_OFFBIG 1
73# define _XBS5_ILP32_OFF32 1
74# define _XBS5_ILP32_OFFBIG 1
75
76/* We optionally provide an environment with the above size but an 64-bit
77 side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
78
79/* Environments with 64-bit wide pointers can be provided,
80 so these macros aren't defined:
81 # undef _POSIX_V7_LP64_OFF64
82 # undef _POSIX_V7_LPBIG_OFFBIG
83 # undef _POSIX_V6_LP64_OFF64
84 # undef _POSIX_V6_LPBIG_OFFBIG
85 # undef _XBS5_LP64_OFF64
86 # undef _XBS5_LPBIG_OFFBIG
87 and sysconf tests for it at runtime. */
88
89#endif /* __WORDSIZE == 32 */
90
91#define __ILP32_OFF32_CFLAGS "-m32"
92#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
93#define __ILP32_OFF32_LDFLAGS "-m32"
94#define __ILP32_OFFBIG_LDFLAGS "-m32"
95#define __LP64_OFF64_CFLAGS "-m64"
96#define __LP64_OFF64_LDFLAGS "-m64"
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/epoll.h created+27
......@@ -0,0 +1,27 @@
1/* Copyright (C) 2002-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_EPOLL_H
19# error "Never use <bits/epoll.h> directly; include <sys/epoll.h> instead."
20#endif
21
22/* Flags to be passed to epoll_create1. */
23enum
24 {
25 EPOLL_CLOEXEC = 0x400000
26#define EPOLL_CLOEXEC EPOLL_CLOEXEC
27 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/errno.h created+53
......@@ -0,0 +1,53 @@
1/* Error constants. Linux/Sparc specific version.
2 Copyright (C) 1996-2024 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_ERRNO_H
20#define _BITS_ERRNO_H 1
21
22#if !defined _ERRNO_H
23# error "Never include <bits/errno.h> directly; use <errno.h> instead."
24#endif
25
26# include <linux/errno.h>
27
28/* Older Linux headers do not define these constants. */
29# ifndef ENOTSUP
30# define ENOTSUP EOPNOTSUPP
31# endif
32
33# ifndef ECANCELED
34# define ECANCELED 127
35# endif
36
37# ifndef EOWNERDEAD
38# define EOWNERDEAD 132
39# endif
40
41# ifndef ENOTRECOVERABLE
42# define ENOTRECOVERABLE 133
43# endif
44
45# ifndef ERFKILL
46# define ERFKILL 134
47# endif
48
49# ifndef EHWPOISON
50# define EHWPOISON 135
51# endif
52
53#endif /* bits/errno.h. */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/eventfd.h created+31
......@@ -0,0 +1,31 @@
1/* Copyright (C) 2007-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_EVENTFD_H
19# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
20#endif
21
22/* Flags for eventfd. */
23enum
24 {
25 EFD_SEMAPHORE = 0x000001,
26#define EFD_SEMAPHORE EFD_SEMAPHORE
27 EFD_CLOEXEC = 0x400000,
28#define EFD_CLOEXEC EFD_CLOEXEC
29 EFD_NONBLOCK = 0x004000
30#define EFD_NONBLOCK EFD_NONBLOCK
31 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/fcntl.h created+101
......@@ -0,0 +1,101 @@
1/* O_*, F_*, FD_* bit values for Linux/SPARC.
2 Copyright (C) 1995-2024 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 _FCNTL_H
20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21#endif
22
23#include <bits/wordsize.h>
24
25#define O_APPEND 0x0008
26#define O_ASYNC 0x0040
27#define O_CREAT 0x0200 /* not fcntl */
28#define O_TRUNC 0x0400 /* not fcntl */
29#define O_EXCL 0x0800 /* not fcntl */
30#define O_SYNC 0x802000
31#define O_NONBLOCK 0x4000
32#define O_NDELAY (0x0004 | O_NONBLOCK)
33#define O_NOCTTY 0x8000 /* not fcntl */
34
35#define __O_DIRECTORY 0x10000 /* must be a directory */
36#define __O_NOFOLLOW 0x20000 /* don't follow links */
37#define __O_CLOEXEC 0x400000 /* Set close_on_exit. */
38
39#define __O_DIRECT 0x100000 /* direct disk access hint */
40#define __O_NOATIME 0x200000 /* Do not set atime. */
41#define __O_PATH 0x1000000 /* Resolve pathname but do not open file. */
42#define __O_TMPFILE 0x2010000 /* Atomically create nameless file. */
43
44#if __WORDSIZE == 64
45# define __O_LARGEFILE 0
46#else
47# define __O_LARGEFILE 0x40000
48#endif
49
50#define __O_DSYNC 0x2000 /* Synchronize data. */
51
52
53#define __F_GETOWN 5 /* Get owner (process receiving SIGIO). */
54#define __F_SETOWN 6 /* Set owner (process receiving SIGIO). */
55
56#ifndef __USE_FILE_OFFSET64
57# define F_GETLK 7 /* Get record locking info. */
58# define F_SETLK 8 /* Set record locking info (non-blocking). */
59# define F_SETLKW 9 /* Set record locking info (blocking). */
60#endif
61
62#if __WORDSIZE == 64
63# define F_GETLK64 7 /* Get record locking info. */
64# define F_SETLK64 8 /* Set record locking info (non-blocking). */
65# define F_SETLKW64 9 /* Set record locking info (blocking). */
66#endif
67
68/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
69#define F_RDLCK 1 /* Read lock. */
70#define F_WRLCK 2 /* Write lock. */
71#define F_UNLCK 3 /* Remove lock. */
72
73struct flock
74 {
75 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
76 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
77#ifndef __USE_FILE_OFFSET64
78 __off_t l_start; /* Offset where the lock begins. */
79 __off_t l_len; /* Size of the locked area; zero means until EOF. */
80#else
81 __off64_t l_start; /* Offset where the lock begins. */
82 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
83#endif
84 __pid_t l_pid; /* Process holding the lock. */
85 short int __glibc_reserved;
86 };
87
88#ifdef __USE_LARGEFILE64
89struct flock64
90 {
91 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
92 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
93 __off64_t l_start; /* Offset where the lock begins. */
94 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
95 __pid_t l_pid; /* Process holding the lock. */
96 short int __glibc_reserved;
97 };
98#endif
99
100/* Include generic Linux declarations. */
101#include <bits/fcntl-linux.h>
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/fenv.h created+92
......@@ -0,0 +1,92 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _FENV_H
19# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
20#endif
21
22#include <bits/wordsize.h>
23
24
25/* Define bits representing the exception. We use the bit positions
26 of the appropriate accrued exception bits from the FSR. */
27enum
28 {
29 FE_INVALID =
30#define FE_INVALID (1 << 9)
31 FE_INVALID,
32 FE_OVERFLOW =
33#define FE_OVERFLOW (1 << 8)
34 FE_OVERFLOW,
35 FE_UNDERFLOW =
36#define FE_UNDERFLOW (1 << 7)
37 FE_UNDERFLOW,
38 FE_DIVBYZERO =
39#define FE_DIVBYZERO (1 << 6)
40 FE_DIVBYZERO,
41 FE_INEXACT =
42#define FE_INEXACT (1 << 5)
43 FE_INEXACT
44 };
45
46#define FE_ALL_EXCEPT \
47 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
48
49/* The Sparc FPU supports all of the four defined rounding modes. We
50 use again the bit positions in the FPU control word as the values
51 for the appropriate macros. */
52enum
53 {
54 FE_TONEAREST =
55#define FE_TONEAREST (0 << 30)
56 FE_TONEAREST,
57 FE_TOWARDZERO =
58#define FE_TOWARDZERO (1 << 30)
59 FE_TOWARDZERO,
60 FE_UPWARD =
61#define FE_UPWARD (-0x7fffffff - 1) /* (2 << 30) */
62 FE_UPWARD,
63 FE_DOWNWARD =
64#define FE_DOWNWARD (-0x40000000) /* (3 << 30) */
65 FE_DOWNWARD
66 };
67
68#define __FE_ROUND_MASK (3U << 30)
69
70
71/* Type representing exception flags. */
72typedef unsigned long int fexcept_t;
73
74
75/* Type representing floating-point environment. */
76typedef unsigned long int fenv_t;
77
78/* If the default argument is used we use this value. */
79#define FE_DFL_ENV ((const fenv_t *) -1)
80
81#ifdef __USE_GNU
82/* Floating-point environment where none of the exception is masked. */
83# define FE_NOMASK_ENV ((const fenv_t *) -2)
84#endif
85
86#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
87/* Type representing floating-point control modes. */
88typedef unsigned long int femode_t;
89
90/* Default floating-point control modes. */
91# define FE_DFL_MODE ((const femode_t *) -1L)
92#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/hwcap.h created+51
......@@ -0,0 +1,51 @@
1/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2011-2024 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#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
20# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
21#endif
22
23#define HWCAP_SPARC_FLUSH 0x00000001
24#define HWCAP_SPARC_STBAR 0x00000002
25#define HWCAP_SPARC_SWAP 0x00000004
26#define HWCAP_SPARC_MULDIV 0x00000008
27#define HWCAP_SPARC_V9 0x00000010
28#define HWCAP_SPARC_ULTRA3 0x00000020
29#define HWCAP_SPARC_BLKINIT 0x00000040
30#define HWCAP_SPARC_N2 0x00000080
31#define HWCAP_SPARC_MUL32 0x00000100
32#define HWCAP_SPARC_DIV32 0x00000200
33#define HWCAP_SPARC_FSMULD 0x00000400
34#define HWCAP_SPARC_V8PLUS 0x00000800
35#define HWCAP_SPARC_POPC 0x00001000
36#define HWCAP_SPARC_VIS 0x00002000
37#define HWCAP_SPARC_VIS2 0x00004000
38#define HWCAP_SPARC_ASI_BLK_INIT 0x00008000
39#define HWCAP_SPARC_FMAF 0x00010000
40#define HWCAP_SPARC_VIS3 0x00020000
41#define HWCAP_SPARC_HPC 0x00040000
42#define HWCAP_SPARC_RANDOM 0x00080000
43#define HWCAP_SPARC_TRANS 0x00100000
44#define HWCAP_SPARC_FJFMAU 0x00200000
45#define HWCAP_SPARC_IMA 0x00400000
46#define HWCAP_SPARC_ASI_CACHE_SPARING \
47 0x00800000
48#define HWCAP_SPARC_PAUSE 0x01000000
49#define HWCAP_SPARC_CBCOND 0x02000000
50#define HWCAP_SPARC_CRYPTO 0x04000000
51#define HWCAP_SPARC_ADP 0x08000000
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/inotify.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_INOTIFY_H
19# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
20#endif
21
22/* Flags for the parameter of inotify_init1. */
23enum
24 {
25 IN_CLOEXEC = 0x400000,
26#define IN_CLOEXEC IN_CLOEXEC
27 IN_NONBLOCK = 0x004000
28#define IN_NONBLOCK IN_NONBLOCK
29 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/ioctls.h created+36
......@@ -0,0 +1,36 @@
1/* Copyright (C) 1996-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_IOCTL_H
19# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
20#endif
21
22/* Use the definitions from the kernel header files. */
23#include <asm/ioctls.h>
24
25/* Oh well, this is necessary since the kernel data structure is
26 different from the user-level version. */
27#undef TCGETS
28#undef TCSETS
29#undef TCSETSW
30#undef TCSETSF
31#define TCGETS _IOR ('T', 8, char[36])
32#define TCSETS _IOW ('T', 9, char[36])
33#define TCSETSW _IOW ('T', 10, char[36])
34#define TCSETSF _IOW ('T', 11, char[36])
35
36#include <linux/sockios.h>
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/sparc version.
2 Copyright (C) 1995-2024 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 _SYS_IPC_H
20# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
21#endif
22
23/* Data structure used to pass permission information to IPC operations. */
24struct ipc_perm
25 {
26 __key_t __key; /* Key. */
27 __uid_t uid; /* Owner's user ID. */
28 __gid_t gid; /* Owner's group ID. */
29 __uid_t cuid; /* Creator's user ID. */
30 __gid_t cgid; /* Creator's group ID. */
31 __mode_t mode; /* Read/write permission. */
32 unsigned short int __pad1;
33 unsigned short int __seq; /* Sequence number. */
34 __extension__ unsigned long long int __glibc_reserved1;
35 __extension__ unsigned long long int __glibc_reserved2;
36 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/link.h created+99
......@@ -0,0 +1,99 @@
1/* Machine-specific audit interfaces for dynamic linker. SPARC version.
2 Copyright (C) 2005-2024 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 _LINK_H
20# error "Never include <bits/link.h> directly; use <link.h> instead."
21#endif
22
23#if __WORDSIZE == 32
24
25typedef struct La_sparc32_regs
26{
27 uint32_t lr_lreg[8]; /* %l0 through %l7 */
28 uint32_t lr_reg[6]; /* %o0 through %o5 */
29 uint32_t lr_sp; /* %o6 */
30 uint32_t lr_ra; /* %o7 */
31 uint32_t lr_struct; /* Pass-by-reference struct pointer */
32} La_sparc32_regs;
33
34typedef struct La_sparc32_retval
35{
36 uint32_t lrv_reg[2]; /* %o0 and %o1 */
37 double lrv_fpreg[2]; /* %f0 and %f2 */
38} La_sparc32_retval;
39
40#else
41
42typedef struct La_sparc64_regs
43{
44 uint64_t lr_lreg[8]; /* %l0 through %l7 */
45 uint64_t lr_reg[6]; /* %o0 through %o5 */
46 uint64_t lr_sp; /* %o6 */
47 uint64_t lr_ra; /* %o7 */
48 double lr_fpreg[16]; /* %f0 through %f30 */
49} La_sparc64_regs;
50
51typedef struct La_sparc64_retval
52{
53 uint64_t lrv_reg[4]; /* %o0 through %o3 */
54 double lrv_fprev[4]; /* %f0 through %f8 */
55} La_sparc64_retval;
56
57#endif
58
59__BEGIN_DECLS
60
61#if __WORDSIZE == 32
62
63extern Elf32_Addr la_sparc32_gnu_pltenter (Elf32_Sym *__sym,
64 unsigned int __ndx,
65 uintptr_t *__refcook,
66 uintptr_t *__defcook,
67 La_sparc32_regs *__regs,
68 unsigned int *__flags,
69 const char *__symname,
70 long int *__framesizep);
71extern unsigned int la_sparc32_gnu_pltexit (Elf32_Sym *__sym,
72 unsigned int __ndx,
73 uintptr_t *__refcook,
74 uintptr_t *__defcook,
75 const La_sparc32_regs *__inregs,
76 La_sparc32_retval *__outregs,
77 const char *__symname);
78
79#else
80
81extern Elf64_Addr la_sparc64_gnu_pltenter (Elf64_Sym *__sym,
82 unsigned int __ndx,
83 uintptr_t *__refcook,
84 uintptr_t *__defcook,
85 La_sparc64_regs *__regs,
86 unsigned int *__flags,
87 const char *__symname,
88 long int *__framesizep);
89extern unsigned int la_sparc64_gnu_pltexit (Elf64_Sym *__sym,
90 unsigned int __ndx,
91 uintptr_t *__refcook,
92 uintptr_t *__defcook,
93 const La_sparc64_regs *__inregs,
94 La_sparc64_retval *__outregs,
95 const char *__symname);
96
97#endif
98
99__END_DECLS
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/long-double.h created+27
......@@ -0,0 +1,27 @@
1/* Properties of long double type. SPARC version.
2 Copyright (C) 2016-2024 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 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#include <bits/wordsize.h>
20
21#if !defined __NO_LONG_DOUBLE_MATH && __WORDSIZE == 32
22# define __LONG_DOUBLE_MATH_OPTIONAL 1
23# ifndef __LONG_DOUBLE_128__
24# define __NO_LONG_DOUBLE_MATH 1
25# endif
26#endif
27#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/mman.h created+53
......@@ -0,0 +1,53 @@
1/* Definitions for POSIX memory map interface. Linux/SPARC version.
2 Copyright (C) 1997-2024 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 _SYS_MMAN_H
20# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
21#endif
22
23/* The following definitions basically come from the kernel headers.
24 But the kernel header is not namespace clean. */
25
26
27/* These are Linux-specific. */
28#define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */
29#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
31#define MAP_LOCKED 0x0100 /* Lock the mapping. */
32#define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
33#define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */
34#define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */
35#define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
36#define MAP_STACK 0x20000 /* Allocation is for a stack. */
37#define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
38#define MAP_SYNC 0x80000 /* Perform synchronous page
39 faults for the mapping. */
40#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
41 underlying mapping. */
42
43/* Flags for `mlockall'. */
44#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
45#define MCL_FUTURE 0x4000 /* Lock all additions to address
46 space. */
47#define MCL_ONFAULT 0x8000 /* Lock all pages that are
48 faulted in. */
49/* Include generic Linux declarations. */
50#include <bits/mman-linux.h>
51
52/* Other flags. */
53#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/poll.h created+49
......@@ -0,0 +1,49 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_POLL_H
19# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
20#endif
21
22/* Event types that can be polled for. These bits may be set in `events'
23 to indicate the interesting event types; they will appear in `revents'
24 to indicate the status of the file descriptor. */
25#define POLLIN 0x001 /* There is data to read. */
26#define POLLPRI 0x002 /* There is urgent data to read. */
27#define POLLOUT 0x004 /* Writing now will not block. */
28
29#if defined __USE_XOPEN || defined __USE_XOPEN2K8
30/* These values are defined in XPG4.2. */
31# define POLLRDNORM 0x040 /* Normal data may be read. */
32# define POLLRDBAND 0x080 /* Priority data may be read. */
33# define POLLWRNORM POLLOUT /* Writing now will not block. */
34# define POLLWRBAND 0x100 /* Priority data may be written. */
35#endif
36
37#ifdef __USE_GNU
38/* These are extensions for Linux. */
39# define POLLMSG 0x200
40# define POLLREMOVE 0x400
41# define POLLRDHUP 0x800
42#endif
43
44/* Event types always implicitly polled for. These bits need not be set in
45 `events', but they will appear in `revents' to indicate the status of
46 the file descriptor. */
47#define POLLERR 0x008 /* Error condition. */
48#define POLLHUP 0x010 /* Hung up. */
49#define POLLNVAL 0x020 /* Invalid polling request. */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/procfs-extra.h created+88
......@@ -0,0 +1,88 @@
1/* Extra sys/procfs.h definitions. SPARC version.
2 Copyright (C) 1996-2024 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 _SYS_PROCFS_H
20# error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead."
21#endif
22
23#if __WORDSIZE == 64
24
25/* Provide 32-bit variants so that BFD can read 32-bit
26 core files. */
27#define ELF_NGREG32 38
28typedef struct
29 {
30 union
31 {
32 unsigned int pr_regs[32];
33 double pr_dregs[16];
34 } pr_fr;
35 unsigned int __glibc_reserved;
36 unsigned int pr_fsr;
37 unsigned char pr_qcnt;
38 unsigned char pr_q_entrysize;
39 unsigned char pr_en;
40 unsigned int pr_q[64];
41 } elf_fpregset_t32;
42
43typedef unsigned int elf_greg_t32;
44typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG32];
45
46struct elf_prstatus32
47 {
48 struct elf_siginfo pr_info; /* Info associated with signal. */
49 short int pr_cursig; /* Current signal. */
50 unsigned int pr_sigpend; /* Set of pending signals. */
51 unsigned int pr_sighold; /* Set of held signals. */
52 __pid_t pr_pid;
53 __pid_t pr_ppid;
54 __pid_t pr_pgrp;
55 __pid_t pr_sid;
56 struct
57 {
58 int tv_sec, tv_usec;
59 } pr_utime, /* User time. */
60 pr_stime, /* System time. */
61 pr_cutime, /* Cumulative user time. */
62 pr_cstime; /* Cumulative system time. */
63 elf_gregset_t32 pr_reg; /* GP registers. */
64 int pr_fpvalid; /* True if math copro being used. */
65 };
66
67struct elf_prpsinfo32
68 {
69 char pr_state; /* Numeric process state. */
70 char pr_sname; /* Char for pr_state. */
71 char pr_zomb; /* Zombie. */
72 char pr_nice; /* Nice val. */
73 unsigned int pr_flag; /* Flags. */
74 unsigned short int pr_uid;
75 unsigned short int pr_gid;
76 int pr_pid, pr_ppid, pr_pgrp, pr_sid;
77 /* Lots missing */
78 char pr_fname[16]; /* Filename of executable. */
79 char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
80 };
81
82typedef elf_gregset_t32 prgregset32_t;
83typedef elf_fpregset_t32 prfpregset32_t;
84
85typedef struct elf_prstatus32 prstatus32_t;
86typedef struct elf_prpsinfo32 prpsinfo32_t;
87
88#endif /* sparc64 */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/procfs-id.h created+30
......@@ -0,0 +1,30 @@
1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version.
2 Copyright (C) 2018-2024 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <https://www.gnu.org/licenses/>. */
19
20#ifndef _SYS_PROCFS_H
21# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
22#endif
23
24#if __WORDSIZE == 64
25typedef unsigned int __pr_uid_t;
26typedef unsigned int __pr_gid_t;
27#else
28typedef unsigned short int __pr_uid_t;
29typedef unsigned short int __pr_gid_t;
30#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/procfs.h created+61
......@@ -0,0 +1,61 @@
1/* Types for registers for sys/procfs.h. SPARC version.
2 Copyright (C) 1996-2024 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 _SYS_PROCFS_H
20# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
21#endif
22
23#include <signal.h>
24#include <sys/ucontext.h>
25#include <bits/wordsize.h>
26
27#if __WORDSIZE == 64
28
29#define ELF_NGREG 36
30
31typedef struct
32 {
33 unsigned long pr_regs[32];
34 unsigned long pr_fsr;
35 unsigned long pr_gsr;
36 unsigned long pr_fprs;
37 } elf_fpregset_t;
38
39#else /* sparc32 */
40
41#define ELF_NGREG 38
42
43typedef struct
44 {
45 union
46 {
47 unsigned long pr_regs[32];
48 double pr_dregs[16];
49 } pr_fr;
50 unsigned long __glibc_reserved;
51 unsigned long pr_fsr;
52 unsigned char pr_qcnt;
53 unsigned char pr_q_entrysize;
54 unsigned char pr_en;
55 unsigned int pr_q[64];
56 } elf_fpregset_t;
57
58#endif /* sparc32 */
59
60typedef unsigned long elf_greg_t;
61typedef elf_greg_t elf_gregset_t[ELF_NGREG];
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h created+20
......@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
2 Copyright (C) 2021-2024 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 Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 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 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* Minimum size for a thread. We are free to choose a reasonable value. */
20#define PTHREAD_STACK_MIN 24576
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/resource.h created+238
......@@ -0,0 +1,238 @@
1/* Bit values & structures for resource limits. Linux/SPARC version.
2 Copyright (C) 1994-2024 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 _SYS_RESOURCE_H
20# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
21#endif
22
23#include <bits/types.h>
24
25/* Transmute defines to enumerations. The macro re-definitions are
26 necessary because some programs want to test for operating system
27 features with #ifdef RUSAGE_SELF. In ISO C the reflexive
28 definition is a no-op. */
29
30/* Kinds of resource limit. */
31enum __rlimit_resource
32{
33 /* Per-process CPU limit, in seconds. */
34 RLIMIT_CPU = 0,
35#define RLIMIT_CPU RLIMIT_CPU
36
37 /* Largest file that can be created, in bytes. */
38 RLIMIT_FSIZE = 1,
39#define RLIMIT_FSIZE RLIMIT_FSIZE
40
41 /* Maximum size of data segment, in bytes. */
42 RLIMIT_DATA = 2,
43#define RLIMIT_DATA RLIMIT_DATA
44
45 /* Maximum size of stack segment, in bytes. */
46 RLIMIT_STACK = 3,
47#define RLIMIT_STACK RLIMIT_STACK
48
49 /* Largest core file that can be created, in bytes. */
50 RLIMIT_CORE = 4,
51#define RLIMIT_CORE RLIMIT_CORE
52
53 /* Largest resident set size, in bytes.
54 This affects swapping; processes that are exceeding their
55 resident set size will be more likely to have physical memory
56 taken from them. */
57 __RLIMIT_RSS = 5,
58#define RLIMIT_RSS __RLIMIT_RSS
59
60 /* Number of open files. */
61 RLIMIT_NOFILE = 6,
62 __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
63#define RLIMIT_NOFILE RLIMIT_NOFILE
64#define RLIMIT_OFILE __RLIMIT_OFILE
65
66 /* Address space limit (?) */
67 RLIMIT_AS = 9,
68#define RLIMIT_AS RLIMIT_AS
69
70 /* Number of processes. */
71 __RLIMIT_NPROC = 7,
72#define RLIMIT_NPROC __RLIMIT_NPROC
73
74 /* Locked-in-memory address space. */
75 __RLIMIT_MEMLOCK = 8,
76#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
77
78 /* Maximum number of file locks. */
79 __RLIMIT_LOCKS = 10,
80#define RLIMIT_LOCKS __RLIMIT_LOCKS
81
82 /* Maximum number of pending signals. */
83 __RLIMIT_SIGPENDING = 11,
84#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
85
86 /* Maximum bytes in POSIX message queues. */
87 __RLIMIT_MSGQUEUE = 12,
88#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
89
90 /* Maximum nice priority allowed to raise to.
91 Nice levels 19 .. -20 correspond to 0 .. 39
92 values of this resource limit. */
93 __RLIMIT_NICE = 13,
94#define RLIMIT_NICE __RLIMIT_NICE
95
96 /* Maximum realtime priority allowed for non-priviledged
97 processes. */
98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100
101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,
105#define RLIMIT_RTTIME __RLIMIT_RTTIME
106
107 __RLIMIT_NLIMITS = 16,
108 __RLIM_NLIMITS = __RLIMIT_NLIMITS
109#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
110#define RLIM_NLIMITS __RLIM_NLIMITS
111};
112
113/* Value to indicate that there is no limit. */
114#if __WORDSIZE == 64
115
116#ifndef __USE_FILE_OFFSET64
117# define RLIM_INFINITY ((unsigned long int)(~0UL))
118#else
119# define RLIM_INFINITY 0xffffffffffffffffuLL
120#endif
121
122#ifdef __USE_LARGEFILE64
123# define RLIM64_INFINITY 0xffffffffffffffffuLL
124#endif
125
126#else
127
128#ifndef __USE_FILE_OFFSET64
129# define RLIM_INFINITY ((long int)(~0UL >> 1))
130#else
131# define RLIM_INFINITY 0xffffffffffffffffLL
132#endif
133
134#ifdef __USE_LARGEFILE64
135# define RLIM64_INFINITY 0xffffffffffffffffLL
136#endif
137
138#endif
139
140/* We can represent all limits. */
141#define RLIM_SAVED_MAX RLIM_INFINITY
142#define RLIM_SAVED_CUR RLIM_INFINITY
143
144
145/* Type for resource quantity measurement. */
146#ifndef __USE_FILE_OFFSET64
147typedef __rlim_t rlim_t;
148#else
149typedef __rlim64_t rlim_t;
150#endif
151#ifdef __USE_LARGEFILE64
152typedef __rlim64_t rlim64_t;
153#endif
154
155struct rlimit
156 {
157 /* The current (soft) limit. */
158 rlim_t rlim_cur;
159 /* The hard limit. */
160 rlim_t rlim_max;
161 };
162
163#ifdef __USE_LARGEFILE64
164struct rlimit64
165 {
166 /* The current (soft) limit. */
167 rlim64_t rlim_cur;
168 /* The hard limit. */
169 rlim64_t rlim_max;
170 };
171#endif
172
173/* Whose usage statistics do you want? */
174enum __rusage_who
175{
176 /* The calling process. */
177 RUSAGE_SELF = 0,
178#define RUSAGE_SELF RUSAGE_SELF
179
180 /* All of its terminated child processes. */
181 RUSAGE_CHILDREN = -1
182#define RUSAGE_CHILDREN RUSAGE_CHILDREN
183
184#ifdef __USE_GNU
185 ,
186 /* The calling thread. */
187 RUSAGE_THREAD = 1
188# define RUSAGE_THREAD RUSAGE_THREAD
189 /* Name for the same functionality on Solaris. */
190# define RUSAGE_LWP RUSAGE_THREAD
191#endif
192};
193
194#include <bits/types/struct_timeval.h>
195#include <bits/types/struct_rusage.h>
196
197/* Priority limits. */
198#define PRIO_MIN -20 /* Minimum priority a process can have. */
199#define PRIO_MAX 20 /* Maximum priority a process can have. */
200
201/* The type of the WHICH argument to `getpriority' and `setpriority',
202 indicating what flavor of entity the WHO argument specifies. */
203enum __priority_which
204{
205 PRIO_PROCESS = 0, /* WHO is a process ID. */
206#define PRIO_PROCESS PRIO_PROCESS
207 PRIO_PGRP = 1, /* WHO is a process group ID. */
208#define PRIO_PGRP PRIO_PGRP
209 PRIO_USER = 2 /* WHO is a user ID. */
210#define PRIO_USER PRIO_USER
211};
212
213__BEGIN_DECLS
214
215#ifdef __USE_GNU
216/* Modify and return resource limits of a process atomically. */
217# ifndef __USE_FILE_OFFSET64
218extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
219 const struct rlimit *__new_limit,
220 struct rlimit *__old_limit) __THROW;
221# else
222# ifdef __REDIRECT_NTH
223extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
224 enum __rlimit_resource __resource,
225 const struct rlimit *__new_limit,
226 struct rlimit *__old_limit), prlimit64);
227# else
228# define prlimit prlimit64
229# endif
230# endif
231# ifdef __USE_LARGEFILE64
232extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
233 const struct rlimit64 *__new_limit,
234 struct rlimit64 *__old_limit) __THROW;
235# endif
236#endif
237
238__END_DECLS
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/setjmp.h created+67
......@@ -0,0 +1,67 @@
1/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_SETJMP_H
19#define _BITS_SETJMP_H 1
20
21#if !defined _SETJMP_H && !defined _PTHREAD_H
22# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
23#endif
24
25#include <bits/wordsize.h>
26
27#if __WORDSIZE == 64
28
29#ifndef _ASM
30typedef struct __sparc64_jmp_buf
31 {
32 struct __sparc64_jmp_buf *__uc_link;
33 unsigned long __uc_flags;
34 unsigned long __uc_sigmask;
35 struct __sparc64_jmp_buf_mcontext
36 {
37 unsigned long __mc_gregs[19];
38 unsigned long __mc_fp;
39 unsigned long __mc_i7;
40 struct __sparc64_jmp_buf_fpu
41 {
42 union
43 {
44 unsigned int __sregs[32];
45 unsigned long __dregs[32];
46 long double __qregs[16];
47 } __mcfpu_fpregs;
48 unsigned long __mcfpu_fprs;
49 unsigned long __mcfpu_gsr;
50 void *__mcfpu_fq;
51 unsigned char __mcfpu_qcnt;
52 unsigned char __mcfpu_qentsz;
53 unsigned char __mcfpu_enab;
54 } __mc_fpregs;
55 } __uc_mcontext;
56 } __jmp_buf[1];
57#endif
58
59#else
60
61#ifndef _ASM
62typedef int __jmp_buf[3];
63#endif
64
65#endif
66
67#endif /* bits/setjmp.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/shmlba.h created+29
......@@ -0,0 +1,29 @@
1/* Define SHMLBA. SPARC version.
2 Copyright (C) 2018-2024 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 _SYS_SHM_H
20# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
21#endif
22
23__BEGIN_DECLS
24
25/* Segment low boundary address multiple. */
26#define SHMLBA (__getshmlba ())
27extern int __getshmlba (void) __attribute__ ((__const__));
28
29__END_DECLS
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/sigaction.h created+89
......@@ -0,0 +1,89 @@
1/* The proper definitions for Linux/SPARC sigaction.
2 Copyright (C) 1996-2024 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_SIGACTION_H
20#define _BITS_SIGACTION_H 1
21
22#ifndef _SIGNAL_H
23# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/wordsize.h>
27
28/* Structure describing the action to be taken when a signal arrives. */
29struct sigaction
30 {
31 /* Signal handler. */
32#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
33 union
34 {
35 /* Used if SA_SIGINFO is not set. */
36 __sighandler_t sa_handler;
37 /* Used if SA_SIGINFO is set. */
38 void (*sa_sigaction) (int, siginfo_t *, void *);
39 }
40 __sigaction_handler;
41# define sa_handler __sigaction_handler.sa_handler
42# define sa_sigaction __sigaction_handler.sa_sigaction
43#else
44 __sighandler_t sa_handler;
45#endif
46
47 /* Additional set of signals to be blocked. */
48 __sigset_t sa_mask;
49
50 /* Special flags. */
51#if __WORDSIZE == 64
52 int __glibc_reserved0;
53#endif
54 int sa_flags;
55
56 /* Not used by Linux/Sparc yet. */
57 void (*sa_restorer) (void);
58 };
59
60
61/* Bits in `sa_flags'. */
62#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */
63#define SA_NOCLDWAIT 0x00000100 /* Don't create zombie on child death. */
64#define SA_SIGINFO 0x00000200 /* Invoke signal-catching function with
65 three arguments instead of one. */
66#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
67# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
68#endif
69#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
70# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
71# define SA_NODEFER 0x00000020 /* Don't automatically block the signal when
72 its handler is being executed. */
73# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler. */
74#endif
75#ifdef __USE_MISC
76# define SA_INTERRUPT 0x00000010 /* Historical no-op. */
77
78/* Some aliases for the SA_ constants. */
79# define SA_NOMASK SA_NODEFER
80# define SA_ONESHOT SA_RESETHAND
81# define SA_STACK SA_ONSTACK
82#endif
83
84/* Values for the HOW argument to `sigprocmask'. */
85#define SIG_BLOCK 1 /* Block signals. */
86#define SIG_UNBLOCK 2 /* Unblock signals. */
87#define SIG_SETMASK 4 /* Set the set of blocked signals. */
88
89#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/sigcontext.h created+82
......@@ -0,0 +1,82 @@
1/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _BITS_SIGCONTEXT_H
19#define _BITS_SIGCONTEXT_H 1
20
21#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
22# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
23#endif
24
25#include <bits/wordsize.h>
26
27#if __WORDSIZE == 32
28
29/* It is quite hard to choose what to put here, because
30 Linux/sparc32 had at least 3 totally incompatible
31 signal stack layouts.
32 This one is for the "new" style signals, which are
33 now delivered unless SA_SIGINFO is requested. */
34
35struct sigcontext
36 {
37 struct
38 {
39 unsigned int psr;
40 unsigned int pc;
41 unsigned int npc;
42 unsigned int y;
43 unsigned int u_regs[16]; /* globals and ins */
44 } si_regs;
45 int si_mask;
46 };
47
48#else /* sparc64 */
49
50typedef struct
51 {
52 unsigned int si_float_regs [64];
53 unsigned long si_fsr;
54 unsigned long si_gsr;
55 unsigned long si_fprs;
56 } __siginfo_fpu_t;
57
58struct sigcontext
59 {
60 char sigc_info[128];
61 struct
62 {
63 unsigned long u_regs[16]; /* globals and ins */
64 unsigned long tstate;
65 unsigned long tpc;
66 unsigned long tnpc;
67 unsigned int y;
68 unsigned int fprs;
69 } sigc_regs;
70 __siginfo_fpu_t * sigc_fpu_save;
71 struct
72 {
73 void * ss_sp;
74 int ss_flags;
75 unsigned long ss_size;
76 } sigc_stack;
77 unsigned long sigc_mask;
78};
79
80#endif /* sparc64 */
81
82#endif /* bits/sigcontext.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/siginfo-arch.h created+17
......@@ -0,0 +1,17 @@
1/* Architecture-specific adjustments to siginfo_t. SPARC version. */
2#ifndef _BITS_SIGINFO_ARCH_H
3#define _BITS_SIGINFO_ARCH_H 1
4
5/* The kernel uses int instead of long int (as in POSIX). In 32-bit
6 mode, we can still use long int, but in 64-bit mode, we need to
7 deviate from POSIX. */
8#if __WORDSIZE == 64
9# define __SI_BAND_TYPE int
10#endif
11
12#define __SI_SIGFAULT_ADDL \
13 int _si_trapno;
14
15#define si_trapno _sifields._sigfault._si_trapno
16
17#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/siginfo-consts-arch.h created+12
......@@ -0,0 +1,12 @@
1/* Architecture-specific additional siginfo constants. SPARC version. */
2#ifndef _BITS_SIGINFO_CONSTS_ARCH_H
3#define _BITS_SIGINFO_CONSTS_ARCH_H 1
4
5/* `si_code' values for SIGEMT signal. */
6enum
7{
8 EMT_TAGOVF = 1 /* Tag overflow. */
9#define EMT_TAGOVF EMT_TAGOVF
10};
11
12#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/signalfd.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2007-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_SIGNALFD_H
19# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
20#endif
21
22/* Flags for signalfd. */
23enum
24 {
25 SFD_CLOEXEC = 0x400000,
26#define SFD_CLOEXEC SFD_CLOEXEC
27 SFD_NONBLOCK = 0x004000
28#define SFD_NONBLOCK SFD_NONBLOCK
29 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/signum-arch.h created+66
......@@ -0,0 +1,66 @@
1/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2024 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_SIGNUM_ARCH_H
20#define _BITS_SIGNUM_ARCH_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum-arch.h> directly; use <signal.h> instead."
24#endif
25
26/* Adjustments and additions to the signal number constants for
27 Linux/SPARC systems. Signal values on this platform were chosen
28 for SunOS binary compatibility. */
29
30#define SIGEMT 7 /* Emulator trap. */
31#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */
32#define SIGPWR SIGLOST /* Power failure imminent (SysV). */
33
34/* Historical signals specified by POSIX. */
35#define SIGBUS 10 /* Bus error. */
36#define SIGSYS 12 /* Bad system call. */
37
38/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
39#define SIGURG 16 /* Urgent data is available at a socket. */
40#define SIGSTOP 17 /* Stop, unblockable. */
41#define SIGTSTP 18 /* Keyboard stop. */
42#define SIGCONT 19 /* Continue. */
43#define SIGCHLD 20 /* Child terminated or stopped. */
44#define SIGTTIN 21 /* Background read from control terminal. */
45#define SIGTTOU 22 /* Background write to control terminal. */
46#define SIGPOLL 23 /* Pollable event occurred (System V). */
47#define SIGXCPU 24 /* CPU time limit exceeded. */
48#define SIGVTALRM 26 /* Virtual timer expired. */
49#define SIGPROF 27 /* Profiling timer expired. */
50#define SIGXFSZ 25 /* File size limit exceeded. */
51#define SIGUSR1 30 /* User-defined signal 1. */
52#define SIGUSR2 31 /* User-defined signal 2. */
53
54/* Nonstandard signals found in all modern POSIX systems
55 (including both BSD and Linux). */
56#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
57
58/* Archaic names for compatibility. */
59#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
60#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
61#define SIGCLD SIGCHLD /* Old System V name */
62
63#define __SIGRTMIN 32
64#define __SIGRTMAX 64
65
66#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/sigstack.h created+32
......@@ -0,0 +1,32 @@
1/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2024 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_SIGSTACK_H
20#define _BITS_SIGSTACK_H 1
21
22#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
23# error "Never include this file directly. Use <signal.h> instead"
24#endif
25
26/* Minimum stack size for a signal handler. */
27#define MINSIGSTKSZ 4096
28
29/* System default stack size. */
30#define SIGSTKSZ 16384
31
32#endif /* bits/sigstack.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h created+70
......@@ -0,0 +1,70 @@
1/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 2019-2024 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 _SYS_SOCKET_H
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif
22
23#define SOL_SOCKET 65535
24#define SO_ACCEPTCONN 32768
25#define SO_BROADCAST 32
26#define SO_DONTROUTE 16
27#define SO_ERROR 4103
28#define SO_KEEPALIVE 8
29#define SO_LINGER 128
30#define SO_OOBINLINE 256
31#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 2048
33#define SO_REUSEADDR 4
34#define SO_SNDBUF 4097
35#define SO_SNDLOWAT 4096
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 8192
40# define SO_SNDTIMEO 16384
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 33
43# define SO_TIMESTAMPING 35
44#else
45# define SO_RCVTIMEO_OLD 8192
46# define SO_SNDTIMEO_OLD 16384
47# define SO_RCVTIMEO_NEW 68
48# define SO_SNDTIMEO_NEW 69
49
50# define SO_TIMESTAMP_OLD 0x001d
51# define SO_TIMESTAMPNS_OLD 0x0021
52# define SO_TIMESTAMPING_OLD 0x0023
53# define SO_TIMESTAMP_NEW 0x0046
54# define SO_TIMESTAMPNS_NEW 0x0042
55# define SO_TIMESTAMPING_NEW 0x0043
56
57# ifdef __USE_TIME64_REDIRECTS
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/socket_type.h created+55
......@@ -0,0 +1,55 @@
1/* Define enum __socket_type for Linux/SPARC.
2 Copyright (C) 1991-2024 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 _SYS_SOCKET_H
20# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
21#endif
22
23/* Types of sockets. */
24enum __socket_type
25{
26 SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
27 byte streams. */
28#define SOCK_STREAM SOCK_STREAM
29 SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
30 of fixed maximum length. */
31#define SOCK_DGRAM SOCK_DGRAM
32 SOCK_RAW = 3, /* Raw protocol interface. */
33#define SOCK_RAW SOCK_RAW
34 SOCK_RDM = 4, /* Reliably-delivered messages. */
35#define SOCK_RDM SOCK_RDM
36 SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
37 datagrams of fixed maximum length. */
38#define SOCK_SEQPACKET SOCK_SEQPACKET
39 SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
40#define SOCK_DCCP SOCK_DCCP
41 SOCK_PACKET = 10, /* Linux specific way of getting packets
42 at the dev level. For writing rarp and
43 other similar things on the user level. */
44#define SOCK_PACKET SOCK_PACKET
45
46 /* Flags to be ORed into the type parameter of socket and socketpair and
47 used for the flags parameter of paccept. */
48
49 SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the
50 new descriptor(s). */
51#define SOCK_CLOEXEC SOCK_CLOEXEC
52 SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as
53 non-blocking. */
54#define SOCK_NONBLOCK SOCK_NONBLOCK
55};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/struct_rwlock.h created+58
......@@ -0,0 +1,58 @@
1/* SPARC internal rwlock struct definitions.
2 Copyright (C) 2019-2024 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20#ifndef _RWLOCK_INTERNAL_H
21#define _RWLOCK_INTERNAL_H
22
23struct __pthread_rwlock_arch_t
24{
25 unsigned int __readers;
26 unsigned int __writers;
27 unsigned int __wrphase_futex;
28 unsigned int __writers_futex;
29 unsigned int __pad3;
30 unsigned int __pad4;
31#if __WORDSIZE == 64
32 int __cur_writer;
33 int __shared;
34 unsigned long int __pad1;
35 unsigned long int __pad2;
36 /* FLAGS must stay at this position in the structure to maintain
37 binary compatibility. */
38 unsigned int __flags;
39#else
40 unsigned char __pad1;
41 unsigned char __pad2;
42 unsigned char __shared;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned char __flags;
46 int __cur_writer;
47#endif
48};
49
50#if __WORDSIZE == 64
51# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
52 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
53#else
54# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
55 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
56#endif
57
58#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/struct_stat.h created+139
......@@ -0,0 +1,139 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2024 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#if !defined _SYS_STAT_H && !defined _FCNTL_H
20# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
21#endif
22
23#ifndef _BITS_STRUCT_STAT_H
24#define _BITS_STRUCT_STAT_H 1
25
26#include <bits/endian.h>
27#include <bits/wordsize.h>
28
29struct stat
30 {
31#ifdef __USE_TIME64_REDIRECTS
32# include <bits/struct_stat_time64_helper.h>
33#else
34 __dev_t st_dev; /* Device. */
35# if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
36 unsigned short int __pad1;
37 __ino_t st_ino; /* File serial number. */
38# else
39 __ino64_t st_ino; /* File serial number. */
40# endif
41 __mode_t st_mode; /* File mode. */
42 __nlink_t st_nlink; /* Link count. */
43 __uid_t st_uid; /* User ID of the file's owner. */
44 __gid_t st_gid; /* Group ID of the file's group.*/
45 __dev_t st_rdev; /* Device number, if device. */
46 unsigned short int __pad2;
47# ifndef __USE_FILE_OFFSET64
48 __off_t st_size; /* Size of file, in bytes. */
49# else
50 __off64_t st_size; /* Size of file, in bytes. */
51# endif
52 __blksize_t st_blksize; /* Optimal block size for I/O. */
53
54# ifndef __USE_FILE_OFFSET64
55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
56# else
57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
58# endif
59# ifdef __USE_XOPEN2K8
60 /* Nanosecond resolution timestamps are stored in a format
61 equivalent to 'struct timespec'. This is the type used
62 whenever possible but the Unix namespace rules do not allow the
63 identifier 'timespec' to appear in the <sys/stat.h> header.
64 Therefore we have to handle the use of this header in strictly
65 standard-compliant sources special. */
66 struct timespec st_atim; /* Time of last access. */
67 struct timespec st_mtim; /* Time of last modification. */
68 struct timespec st_ctim; /* Time of last status change. */
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
73 __time_t st_atime; /* Time of last access. */
74 unsigned long int st_atimensec; /* Nscecs of last access. */
75 __time_t st_mtime; /* Time of last modification. */
76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
77 __time_t st_ctime; /* Time of last status change. */
78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
79# endif
80 unsigned long int __glibc_reserved4;
81 unsigned long int __glibc_reserved5;
82#endif /* __USE_TIME64_REDIRECTS */
83 };
84
85#ifdef __USE_LARGEFILE64
86struct stat64
87 {
88# ifdef __USE_TIME64_REDIRECTS
89# include <bits/struct_stat_time64_helper.h>
90# else
91 __dev_t st_dev; /* Device. */
92# if __WORDSIZE == 64
93 unsigned short int __pad1;
94# endif
95 __ino64_t st_ino; /* File serial number. */
96 __mode_t st_mode; /* File mode. */
97 __nlink_t st_nlink; /* Link count. */
98 __uid_t st_uid; /* User ID of the file's owner. */
99 __gid_t st_gid; /* Group ID of the file's group.*/
100 __dev_t st_rdev; /* Device number, if device. */
101 unsigned short int __pad2;
102 __off64_t st_size; /* Size of file, in bytes. */
103 __blksize_t st_blksize; /* Optimal block size for I/O. */
104
105 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
106# ifdef __USE_XOPEN2K8
107 /* Nanosecond resolution timestamps are stored in a format
108 equivalent to 'struct timespec'. This is the type used
109 whenever possible but the Unix namespace rules do not allow the
110 identifier 'timespec' to appear in the <sys/stat.h> header.
111 Therefore we have to handle the use of this header in strictly
112 standard-compliant sources special. */
113 struct timespec st_atim; /* Time of last access. */
114 struct timespec st_mtim; /* Time of last modification. */
115 struct timespec st_ctim; /* Time of last status change. */
116# define st_atime st_atim.tv_sec /* Backward compatibility. */
117# define st_mtime st_mtim.tv_sec
118# define st_ctime st_ctim.tv_sec
119# else
120 __time_t st_atime; /* Time of last access. */
121 unsigned long int st_atimensec; /* Nscecs of last access. */
122 __time_t st_mtime; /* Time of last modification. */
123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
124 __time_t st_ctime; /* Time of last status change. */
125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
126# endif
127 unsigned long int __glibc_reserved4;
128 unsigned long int __glibc_reserved5;
129# endif /* __USE_TIME64_REDIRECTS */
130 };
131#endif
132
133/* Tell code we have these members. */
134#define _STATBUF_ST_BLKSIZE
135#define _STATBUF_ST_RDEV
136/* Nanosecond resolution time values are supported. */
137#define _STATBUF_ST_NSEC
138
139#endif /* _BITS_STRUCT_STAT_H */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-baud.h created+46
......@@ -0,0 +1,46 @@
1/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019-2024 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-c_cc.h created+43
......@@ -0,0 +1,43 @@
1/* termios c_cc symbolic constant definitions. Linux/sparc version.
2 Copyright (C) 2019-2024 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-c_cc.h> directly; use <termios.h> instead."
21#endif
22
23/* c_cc characters */
24#define VINTR 0
25#define VQUIT 1
26#define VERASE 2
27#define VKILL 3
28#define VEOF 4
29#define VEOL 5
30#define VEOL2 6
31#define VSWTC 7
32#define VSTART 8
33#define VSTOP 9
34#define VSUSP 10
35#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */
36#define VREPRINT 12
37#define VDISCARD 13
38#define VWERASE 14
39#define VLNEXT 15
40
41/* User apps assume vmin/vtime is shared with eof/eol */
42#define VMIN VEOF
43#define VTIME VEOL
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h created+64
......@@ -0,0 +1,64 @@
1/* termios output mode definitions. Linux/sparc version.
2 Copyright (C) 2019-2024 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-c_oflag.h> directly; use <termios.h> instead."
21#endif
22
23/* c_oflag bits */
24#define OPOST 0x00000001
25#define OLCUC 0x00000002
26#define ONLCR 0x00000004
27#define OCRNL 0x00000008
28#define ONOCR 0x00000010
29#define ONLRET 0x00000020
30#define OFILL 0x00000040
31#define OFDEL 0x00000080
32#if defined __USE_MISC || defined __USE_XOPEN
33# define NLDLY 0x00000100
34# define NL0 0x00000000
35# define NL1 0x00000100
36# define CRDLY 0x00000600
37# define CR0 0x00000000
38# define CR1 0x00000200
39# define CR2 0x00000400
40# define CR3 0x00000600
41# define TABDLY 0x00001800
42# define TAB0 0x00000000
43# define TAB1 0x00000800
44# define TAB2 0x00001000
45# define TAB3 0x00001800
46# define BSDLY 0x00002000
47# define BS0 0x00000000
48# define BS1 0x00002000
49#define FFDLY 0x00008000
50#define FF0 0x00000000
51#define FF1 0x00008000
52#endif
53#define VTDLY 0x00004000
54#define VT0 0x00000000
55#define VT1 0x00004000
56
57# if defined __USE_GNU
58#define PAGEOUT 0x00010000 /* SUNOS specific */
59#define WRAP 0x00020000 /* SUNOS specific */
60# endif
61
62#ifdef __USE_MISC
63# define XTABS 0x00001800
64#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-struct.h created+34
......@@ -0,0 +1,34 @@
1/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019-2024 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/sparc-linux-gnu/bits/timerfd.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2008-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_TIMERFD_H
19# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
20#endif
21
22/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
23enum
24 {
25 TFD_CLOEXEC = 0x400000,
26#define TFD_CLOEXEC TFD_CLOEXEC
27 TFD_NONBLOCK = 0x004000
28#define TFD_NONBLOCK TFD_NONBLOCK
29 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/timesize.h created+22
......@@ -0,0 +1,22 @@
1/* Bit size of the time_t type at glibc build time, Linux/sparc.
2 Copyright (C) 2021-2024 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#include <bits/wordsize.h>
20
21/* Size in bits of the 'time_t' type of the default ABI. */
22#define __TIMESIZE __WORDSIZE
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h created+53
......@@ -0,0 +1,53 @@
1/* Linux/SPARC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2024 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 _SYS_MSG_H
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/types/time_t.h>
24
25/* Structure of record for one message inside the kernel.
26 The type `struct msg' is opaque. */
27struct msqid_ds
28{
29#ifdef __USE_TIME64_REDIRECTS
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
32 struct ipc_perm msg_perm; /* structure describing operation permission */
33# if __TIMESIZE == 32
34 unsigned long int __msg_stime_high;
35 __time_t msg_stime; /* time of last msgsnd command */
36 unsigned long int __msg_rtime_high;
37 __time_t msg_rtime; /* time of last msgsnd command */
38 unsigned long int __msg_ctime_high;
39 __time_t msg_ctime; /* time of last change */
40# else
41 __time_t msg_stime; /* time of last msgsnd command */
42 __time_t msg_rtime; /* time of last msgsnd command */
43 __time_t msg_ctime; /* time of last change */
44# endif
45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
46 msgqnum_t msg_qnum; /* number of messages currently on queue */
47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
48 __pid_t msg_lspid; /* pid of last msgsnd() */
49 __pid_t msg_lrpid; /* pid of last msgrcv() */
50 __syscall_ulong_t __glibc_reserved4;
51 __syscall_ulong_t __glibc_reserved5;
52#endif
53};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h created+43
......@@ -0,0 +1,43 @@
1/* Sparc implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2024 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 _SYS_SEM_H
20# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
21#endif
22
23/* Data structure describing a set of semaphores. */
24struct semid_ds
25{
26#ifdef __USE_TIME64_REDIRECTS
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
29 struct ipc_perm sem_perm; /* operation permission struct */
30# if __TIMESIZE == 32
31 __syscall_ulong_t __sem_otime_high;
32 __time_t sem_otime; /* last semop() time */
33 __syscall_ulong_t __sem_ctime_high;
34 __time_t sem_ctime; /* last time changed by semctl() */
35# else
36 __time_t sem_otime; /* last semop() time */
37 __time_t sem_ctime; /* last time changed by semctl() */
38# endif
39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
40 __syscall_ulong_t __glibc_reserved3;
41 __syscall_ulong_t __glibc_reserved4;
42#endif
43};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h created+49
......@@ -0,0 +1,49 @@
1/* Linux/SPARC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2024 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 _SYS_SHM_H
20# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
21#endif
22
23/* Data structure describing a shared memory segment. */
24struct shmid_ds
25 {
26#ifdef __USE_TIME64_REDIRECTS
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
29 struct ipc_perm shm_perm; /* operation permission struct */
30# if __TIMESIZE == 32
31 unsigned long int __shm_atime_high;
32 __time_t shm_atime; /* time of last shmat() */
33 unsigned long int __shm_dtime_high;
34 __time_t shm_dtime; /* time of last shmdt() */
35 unsigned long int __shm_ctime_high;
36 __time_t shm_ctime; /* time of last change by shmctl() */
37# else
38 __time_t shm_atime; /* time of last shmat() */
39 __time_t shm_dtime; /* time of last shmdt() */
40 __time_t shm_ctime; /* time of last change by shmctl() */
41# endif
42 size_t shm_segsz; /* size of segment in bytes */
43 __pid_t shm_cpid; /* pid of creator */
44 __pid_t shm_lpid; /* pid of last shmop */
45 shmatt_t shm_nattch; /* number of current attaches */
46 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;
48#endif
49 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2024 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_TYPES_H
20# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
21#endif
22
23#ifndef _BITS_TYPESIZES_H
24#define _BITS_TYPESIZES_H 1
25
26/* See <bits/types.h> for the meaning of these macros. This file exists so
27 that <bits/types.h> need not vary across different GNU platforms. */
28
29#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __U32_TYPE
36#define __OFF_T_TYPE __SLONGWORD_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE
48#define __ID_T_TYPE __U32_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __S32_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE
57#define __TIMER_T_TYPE void *
58#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
59#define __FSID_T_TYPE struct { int __val[2]; }
60#define __SSIZE_T_TYPE __SWORD_TYPE
61#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE
64
65#if defined __arch64__ || defined __sparcv9
66/* Tell the libc code that off_t and off64_t are actually the same type
67 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */
69# define __OFF_T_MATCHES_OFF64_T 1
70
71/* Same for ino_t and ino64_t. */
72# define __INO_T_MATCHES_INO64_T 1
73
74/* And for __rlim_t and __rlim64_t. */
75# define __RLIM_T_MATCHES_RLIM64_T 1
76
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
82#else
83# define __RLIM_T_MATCHES_RLIM64_T 0
84
85# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
89#endif
90
91/* Number of descriptors that can fit in an `fd_set'. */
92#define __FD_SETSIZE 1024
93
94
95#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/wordsize.h created+10
......@@ -0,0 +1,10 @@
1/* Determine the wordsize from the preprocessor defines. */
2
3#if defined __arch64__ || defined __sparcv9
4# define __WORDSIZE 64
5#else
6# define __WORDSIZE 32
7# define __WORDSIZE32_SIZE_ULONG 0
8# define __WORDSIZE32_PTRDIFF_LONG 0
9#endif
10#define __WORDSIZE_TIME64_COMPAT32 1
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/fpu_control.h created+76
......@@ -0,0 +1,76 @@
1/* FPU control word bits. SPARC version.
2 Copyright (C) 1997-2024 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 _FPU_CONTROL_H
20#define _FPU_CONTROL_H 1
21
22
23#include <features.h>
24#include <bits/wordsize.h>
25
26/* masking of interrupts */
27#define _FPU_MASK_IM 0x08000000
28#define _FPU_MASK_OM 0x04000000
29#define _FPU_MASK_UM 0x02000000
30#define _FPU_MASK_ZM 0x01000000
31#define _FPU_MASK_PM 0x00800000
32
33/* precision control */
34#define _FPU_EXTENDED 0x00000000 /* RECOMMENDED */
35#define _FPU_DOUBLE 0x20000000
36#define _FPU_80BIT 0x30000000
37#define _FPU_SINGLE 0x10000000 /* DO NOT USE */
38
39/* rounding control / Sparc */
40#define _FPU_RC_DOWN 0xc0000000
41#define _FPU_RC_UP 0x80000000
42#define _FPU_RC_ZERO 0x40000000
43#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
44
45#define _FPU_RESERVED 0x303e0000 /* Reserved bits in cw */
46
47
48/* Now two recommended cw */
49
50/* Linux and IEEE default:
51 - extended precision
52 - rounding to nearest
53 - no exceptions */
54#define _FPU_DEFAULT 0x0
55#define _FPU_IEEE 0x0
56
57/* Type of the control word. */
58typedef unsigned long int fpu_control_t;
59
60#if __WORDSIZE == 64
61# define _FPU_GETCW(cw) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (*&cw))
62# define _FPU_SETCW(cw) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (*&cw))
63#else
64# ifdef __leon__
65 /* Prevent stfsr from being placed directly after other fp instruction. */
66# define _FPU_GETCW(cw) __asm__ __volatile__ ("nop; st %%fsr,%0" : "=m" (*&cw))
67# else
68# define _FPU_GETCW(cw) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (*&cw))
69# endif
70# define _FPU_SETCW(cw) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (*&cw))
71#endif
72
73/* Default control word set at startup. */
74extern fpu_control_t __fpu_control;
75
76#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/lib-names.h created+16
......@@ -0,0 +1,16 @@
1/* This file is automatically generated.
2 It defines macros to allow user program to find the shared
3 library files which come as part of GNU libc. */
4#ifndef __GNU_LIB_NAMES_H
5#define __GNU_LIB_NAMES_H 1
6
7#include <bits/wordsize.h>
8
9#if __WORDSIZE == 32
10# include <gnu/lib-names-32.h>
11#endif
12#if __WORDSIZE == 64
13# include <gnu/lib-names-64.h>
14#endif
15
16#endif /* gnu/lib-names.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/stubs.h created+12
......@@ -0,0 +1,12 @@
1/* This file is automatically generated.
2 This file selects the right generated file of `__stub_FUNCTION' macros
3 based on the architecture being compiled for. */
4
5#include <bits/wordsize.h>
6
7#if __WORDSIZE == 32
8# include <gnu/stubs-32.h>
9#endif
10#if __WORDSIZE == 64
11# include <gnu/stubs-64.h>
12#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/ieee754.h created+170
......@@ -0,0 +1,170 @@
1/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _IEEE754_H
19#define _IEEE754_H 1
20
21#include <features.h>
22
23#include <bits/endian.h>
24
25__BEGIN_DECLS
26
27union ieee754_float
28 {
29 float f;
30
31 /* This is the IEEE 754 single-precision format. */
32 struct
33 {
34#if __BYTE_ORDER == __BIG_ENDIAN
35 unsigned int negative:1;
36 unsigned int exponent:8;
37 unsigned int mantissa:23;
38#endif /* Big endian. */
39#if __BYTE_ORDER == __LITTLE_ENDIAN
40 unsigned int mantissa:23;
41 unsigned int exponent:8;
42 unsigned int negative:1;
43#endif /* Little endian. */
44 } ieee;
45
46 /* This format makes it easier to see if a NaN is a signalling NaN. */
47 struct
48 {
49#if __BYTE_ORDER == __BIG_ENDIAN
50 unsigned int negative:1;
51 unsigned int exponent:8;
52 unsigned int quiet_nan:1;
53 unsigned int mantissa:22;
54#endif /* Big endian. */
55#if __BYTE_ORDER == __LITTLE_ENDIAN
56 unsigned int mantissa:22;
57 unsigned int quiet_nan:1;
58 unsigned int exponent:8;
59 unsigned int negative:1;
60#endif /* Little endian. */
61 } ieee_nan;
62 };
63
64#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
65
66
67union ieee754_double
68 {
69 double d;
70
71 /* This is the IEEE 754 double-precision format. */
72 struct
73 {
74#if __BYTE_ORDER == __BIG_ENDIAN
75 unsigned int negative:1;
76 unsigned int exponent:11;
77 /* Together these comprise the mantissa. */
78 unsigned int mantissa0:20;
79 unsigned int mantissa1:32;
80#endif /* Big endian. */
81#if __BYTE_ORDER == __LITTLE_ENDIAN
82 /* Together these comprise the mantissa. */
83 unsigned int mantissa1:32;
84 unsigned int mantissa0:20;
85 unsigned int exponent:11;
86 unsigned int negative:1;
87#endif /* Little endian. */
88 } ieee;
89
90 /* This format makes it easier to see if a NaN is a signalling NaN. */
91 struct
92 {
93#if __BYTE_ORDER == __BIG_ENDIAN
94 unsigned int negative:1;
95 unsigned int exponent:11;
96 unsigned int quiet_nan:1;
97 /* Together these comprise the mantissa. */
98 unsigned int mantissa0:19;
99 unsigned int mantissa1:32;
100#else
101 /* Together these comprise the mantissa. */
102 unsigned int mantissa1:32;
103 unsigned int mantissa0:19;
104 unsigned int quiet_nan:1;
105 unsigned int exponent:11;
106 unsigned int negative:1;
107#endif
108 } ieee_nan;
109 };
110
111#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
112
113
114union ieee854_long_double
115 {
116 long double d;
117
118 /* This is the IEEE 854 quad-precision format. */
119 struct
120 {
121#if __BYTE_ORDER == __BIG_ENDIAN
122 unsigned int negative:1;
123 unsigned int exponent:15;
124 /* Together these comprise the mantissa. */
125 unsigned int mantissa0:16;
126 unsigned int mantissa1:32;
127 unsigned int mantissa2:32;
128 unsigned int mantissa3:32;
129#endif /* Big endian. */
130#if __BYTE_ORDER == __LITTLE_ENDIAN
131 /* Together these comprise the mantissa. */
132 unsigned int mantissa3:32;
133 unsigned int mantissa2:32;
134 unsigned int mantissa1:32;
135 unsigned int mantissa0:16;
136 unsigned int exponent:15;
137 unsigned int negative:1;
138#endif /* Little endian. */
139 } ieee;
140
141 /* This format makes it easier to see if a NaN is a signalling NaN. */
142 struct
143 {
144#if __BYTE_ORDER == __BIG_ENDIAN
145 unsigned int negative:1;
146 unsigned int exponent:15;
147 unsigned int quiet_nan:1;
148 /* Together these comprise the mantissa. */
149 unsigned int mantissa0:15;
150 unsigned int mantissa1:32;
151 unsigned int mantissa2:32;
152 unsigned int mantissa3:32;
153#else
154 /* Together these comprise the mantissa. */
155 unsigned int mantissa3:32;
156 unsigned int mantissa2:32;
157 unsigned int mantissa1:32;
158 unsigned int mantissa0:15;
159 unsigned int quiet_nan:1;
160 unsigned int exponent:15;
161 unsigned int negative:1;
162#endif
163 } ieee_nan;
164 };
165
166#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
167
168__END_DECLS
169
170#endif /* ieee754.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/sys/ptrace.h created+247
......@@ -0,0 +1,247 @@
1/* `ptrace' debugger support interface. Linux/SPARC version.
2 Copyright (C) 1996-2024 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 _SYS_PTRACE_H
20#define _SYS_PTRACE_H 1
21
22#include <features.h>
23#include <bits/types.h>
24#include <bits/wordsize.h>
25
26/* Linux/SPARC kernels up to 2.3.18 do not care much
27 about what namespace pollution, so use a kludge now. */
28#undef PTRACE_GETREGS
29#undef PTRACE_SETREGS
30#undef PTRACE_GETFPREGS
31#undef PTRACE_SETFPREGS
32#undef PTRACE_READDATA
33#undef PTRACE_WRITEDATA
34#undef PTRACE_READTEXT
35#undef PTRACE_WRITETEXT
36#undef PTRACE_SUNDETACH
37
38__BEGIN_DECLS
39
40/* Type of the REQUEST argument to `ptrace.' */
41enum __ptrace_request
42{
43 /* Indicate that the process making this request should be traced.
44 All signals received by this process can be intercepted by its
45 parent, and its parent can use the other `ptrace' requests. */
46 PTRACE_TRACEME = 0,
47#define PT_TRACE_ME PTRACE_TRACEME
48
49 /* Return the word in the process's text space at address ADDR. */
50 PTRACE_PEEKTEXT = 1,
51#define PT_READ_I PTRACE_PEEKTEXT
52
53 /* Return the word in the process's data space at address ADDR. */
54 PTRACE_PEEKDATA = 2,
55#define PT_READ_D PTRACE_PEEKDATA
56
57 /* Return the word in the process's user area at offset ADDR. */
58 PTRACE_PEEKUSER = 3,
59#define PT_READ_U PTRACE_PEEKUSER
60
61 /* Write the word DATA into the process's text space at address ADDR. */
62 PTRACE_POKETEXT = 4,
63#define PT_WRITE_I PTRACE_POKETEXT
64
65 /* Write the word DATA into the process's data space at address ADDR. */
66 PTRACE_POKEDATA = 5,
67#define PT_WRITE_D PTRACE_POKEDATA
68
69 /* Write the word DATA into the process's user area at offset ADDR. */
70 PTRACE_POKEUSER = 6,
71#define PT_WRITE_U PTRACE_POKEUSER
72
73 /* Continue the process. */
74 PTRACE_CONT = 7,
75#define PT_CONTINUE PTRACE_CONT
76
77 /* Kill the process. */
78 PTRACE_KILL = 8,
79#define PT_KILL PTRACE_KILL
80
81 /* Single step the process. */
82 PTRACE_SINGLESTEP = 9,
83#define PT_STEP PTRACE_SINGLESTEP
84
85 /* Detach from a process attached to with PTRACE_ATTACH. */
86 PTRACE_DETACH = 11,
87#define PT_DETACH PTRACE_DETACH
88
89 /* This define is needed for older programs which were
90 trying to work around sparc-linux ptrace nastiness. */
91#define PTRACE_SUNDETACH PTRACE_DETACH
92
93#if __WORDSIZE == 32
94
95 /* Get all general purpose registers used by a processes.
96 This is not supported on all machines. */
97 PTRACE_GETREGS = 12,
98#define PT_GETREGS PTRACE_GETREGS
99
100 /* Set all general purpose registers used by a processes.
101 This is not supported on all machines. */
102 PTRACE_SETREGS = 13,
103#define PT_SETREGS PTRACE_SETREGS
104
105 /* Get all floating point registers used by a processes.
106 This is not supported on all machines. */
107 PTRACE_GETFPREGS = 14,
108#define PT_GETFPREGS PTRACE_GETFPREGS
109
110 /* Set all floating point registers used by a processes.
111 This is not supported on all machines. */
112 PTRACE_SETFPREGS = 15,
113#define PT_SETFPREGS PTRACE_SETFPREGS
114
115#endif
116
117 /* Attach to a process that is already running. */
118 PTRACE_ATTACH = 16,
119#define PT_ATTACH PTRACE_ATTACH
120
121 /* Write several bytes at a time. */
122 PTRACE_WRITEDATA = 17,
123#define PTRACE_WRITEDATA PTRACE_WRITEDATA
124
125 /* Read several bytes at a time. */
126 PTRACE_READTEXT = 18,
127#define PTRACE_READTEXT PTRACE_READTEXT
128#define PTRACE_READDATA PTRACE_READTEXT
129
130 /* Write several bytes at a time. */
131 PTRACE_WRITETEXT = 19,
132#define PTRACE_WRITETEXT PTRACE_WRITETEXT
133
134#if __WORDSIZE == 64
135
136 /* Get all general purpose registers used by a processes.
137 This is not supported on all machines. */
138 PTRACE_GETREGS = 22,
139#define PT_GETREGS PTRACE_GETREGS
140
141 /* Set all general purpose registers used by a processes.
142 This is not supported on all machines. */
143 PTRACE_SETREGS = 23,
144#define PT_SETREGS PTRACE_SETREGS
145
146#endif
147
148 /* Continue and stop at the next entry to or return from syscall. */
149 PTRACE_SYSCALL = 24,
150#define PTRACE_SYSCALL PTRACE_SYSCALL
151
152#if __WORDSIZE == 64
153
154 /* Get all floating point registers used by a processes.
155 This is not supported on all machines. */
156 PTRACE_GETFPREGS = 25,
157#define PT_GETFPREGS PTRACE_GETFPREGS
158
159 /* Set all floating point registers used by a processes.
160 This is not supported on all machines. */
161 PTRACE_SETFPREGS = 26,
162#define PT_SETFPREGS PTRACE_SETFPREGS
163
164#endif
165
166 /* Set ptrace filter options. */
167 PTRACE_SETOPTIONS = 0x4200,
168#define PT_SETOPTIONS PTRACE_SETOPTIONS
169
170 /* Get last ptrace message. */
171 PTRACE_GETEVENTMSG = 0x4201,
172#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
173
174 /* Get siginfo for process. */
175 PTRACE_GETSIGINFO = 0x4202,
176#define PT_GETSIGINFO PTRACE_GETSIGINFO
177
178 /* Set new siginfo for process. */
179 PTRACE_SETSIGINFO = 0x4203,
180#define PT_SETSIGINFO PTRACE_SETSIGINFO
181
182 /* Get register content. */
183 PTRACE_GETREGSET = 0x4204,
184#define PTRACE_GETREGSET PTRACE_GETREGSET
185
186 /* Set register content. */
187 PTRACE_SETREGSET = 0x4205,
188#define PTRACE_SETREGSET PTRACE_SETREGSET
189
190 /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
191 signal or group stop state. */
192 PTRACE_SEIZE = 0x4206,
193#define PTRACE_SEIZE PTRACE_SEIZE
194
195 /* Trap seized tracee. */
196 PTRACE_INTERRUPT = 0x4207,
197#define PTRACE_INTERRUPT PTRACE_INTERRUPT
198
199 /* Wait for next group event. */
200 PTRACE_LISTEN = 0x4208,
201#define PTRACE_LISTEN PTRACE_LISTEN
202
203 /* Retrieve siginfo_t structures without removing signals from a queue. */
204 PTRACE_PEEKSIGINFO = 0x4209,
205#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
206
207 /* Get the mask of blocked signals. */
208 PTRACE_GETSIGMASK = 0x420a,
209#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
210
211 /* Change the mask of blocked signals. */
212 PTRACE_SETSIGMASK = 0x420b,
213#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
214
215 /* Get seccomp BPF filters. */
216 PTRACE_SECCOMP_GET_FILTER = 0x420c,
217#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
218
219 /* Get seccomp BPF filter metadata. */
220 PTRACE_SECCOMP_GET_METADATA = 0x420d,
221#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
222
223 /* Get information about system call. */
224 PTRACE_GET_SYSCALL_INFO = 0x420e,
225#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
226
227 /* Get rseq configuration information. */
228 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f,
229#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
230
231 /* Set configuration for syscall user dispatch. */
232 PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210,
233#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \
234 PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG
235
236 /* Get configuration for syscall user dispatch. */
237 PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211
238#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \
239 PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG
240};
241
242
243#include <bits/ptrace-shared.h>
244
245__END_DECLS
246
247#endif /* _SYS_PTRACE_H */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/sys/ucontext.h created+304
......@@ -0,0 +1,304 @@
1/* Copyright (C) 1998-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_UCONTEXT_H
19#define _SYS_UCONTEXT_H 1
20
21#include <features.h>
22
23#include <bits/types/sigset_t.h>
24#include <bits/types/stack_t.h>
25
26#include <bits/wordsize.h>
27
28
29#ifdef __USE_MISC
30# define __ctx(fld) fld
31#else
32# define __ctx(fld) __ ## fld
33#endif
34
35#if __WORDSIZE == 64
36
37#define __MC_NGREG 19
38#ifdef __USE_MISC
39# define MC_TSTATE 0
40# define MC_PC 1
41# define MC_NPC 2
42# define MC_Y 3
43# define MC_G1 4
44# define MC_G2 5
45# define MC_G3 6
46# define MC_G4 7
47# define MC_G5 8
48# define MC_G6 9
49# define MC_G7 10
50# define MC_O0 11
51# define MC_O1 12
52# define MC_O2 13
53# define MC_O3 14
54# define MC_O4 15
55# define MC_O5 16
56# define MC_O6 17
57# define MC_O7 18
58# define MC_NGREG __MC_NGREG
59#endif
60
61typedef unsigned long mc_greg_t;
62typedef mc_greg_t mc_gregset_t[__MC_NGREG];
63
64#ifdef __USE_MISC
65# define MC_MAXFPQ 16
66#endif
67struct __mc_fq {
68 unsigned long *__ctx(mcfq_addr);
69 unsigned int __ctx(mcfq_insn);
70};
71
72typedef struct {
73 union {
74 unsigned int __ctx(sregs)[32];
75 unsigned long __ctx(dregs)[32];
76 long double __ctx(qregs)[16];
77 } __ctx(mcfpu_fregs);
78 unsigned long __ctx(mcfpu_fsr);
79 unsigned long __ctx(mcfpu_fprs);
80 unsigned long __ctx(mcfpu_gsr);
81 struct __mc_fq *__ctx(mcfpu_fq);
82 unsigned char __ctx(mcfpu_qcnt);
83 unsigned char __ctx(mcfpu_qentsz);
84 unsigned char __ctx(mcfpu_enab);
85} mc_fpu_t;
86
87typedef struct {
88 mc_gregset_t __ctx(mc_gregs);
89 mc_greg_t __ctx(mc_fp);
90 mc_greg_t __ctx(mc_i7);
91 mc_fpu_t __ctx(mc_fpregs);
92} mcontext_t;
93
94typedef struct ucontext_t {
95 struct ucontext_t *uc_link;
96 unsigned long __ctx(uc_flags);
97 unsigned long __uc_sigmask;
98 mcontext_t uc_mcontext;
99 stack_t uc_stack;
100 sigset_t uc_sigmask;
101} ucontext_t;
102
103#endif /* __WORDISIZE == 64 */
104
105/*
106 * Location of the users' stored registers relative to R0.
107 * Usage is as an index into a gregset_t array or as u.u_ar0[XX].
108 */
109#ifdef __USE_MISC
110# define REG_PSR (0)
111# define REG_PC (1)
112# define REG_nPC (2)
113# define REG_Y (3)
114# define REG_G1 (4)
115# define REG_G2 (5)
116# define REG_G3 (6)
117# define REG_G4 (7)
118# define REG_G5 (8)
119# define REG_G6 (9)
120# define REG_G7 (10)
121# define REG_O0 (11)
122# define REG_O1 (12)
123# define REG_O2 (13)
124# define REG_O3 (14)
125# define REG_O4 (15)
126# define REG_O5 (16)
127# define REG_O6 (17)
128# define REG_O7 (18)
129#endif
130
131/*
132 * A gregset_t is defined as an array type for compatibility with the reference
133 * source. This is important due to differences in the way the C language
134 * treats arrays and structures as parameters.
135 *
136 * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)),
137 * but that the ABI defines it absolutely to be 21 (resp. 19).
138 */
139
140#if __WORDSIZE == 64
141
142# define __NGREG 21
143# ifdef __USE_MISC
144# define REG_ASI (19)
145# define REG_FPRS (20)
146
147# define NGREG __NGREG
148# endif
149typedef long greg_t;
150
151#else /* __WORDSIZE == 32 */
152
153# define __NGREG 19
154# ifdef __USE_MISC
155# define NGREG __NGREG
156# endif
157typedef int greg_t;
158
159#endif /* __WORDSIZE == 32 */
160
161typedef greg_t gregset_t[__NGREG];
162
163/*
164 * The following structures define how a register window can appear on the
165 * stack. This structure is available (when required) through the `gwins'
166 * field of an mcontext (nested within ucontext). SPARC_MAXWINDOW is the
167 * maximum number of outstanding registers window defined in the SPARC
168 * architecture (*not* implementation).
169 */
170# define __SPARC_MAXREGWINDOW 31 /* max windows in SPARC arch. */
171#ifdef __USE_MISC
172# define SPARC_MAXREGWINDOW __SPARC_MAXREGWINDOW
173#endif
174struct __rwindow
175 {
176 greg_t __ctx(rw_local)[8]; /* locals */
177 greg_t __ctx(rw_in)[8]; /* ins */
178 };
179
180#ifdef __USE_MISC
181# define rw_fp __ctx(rw_in)[6] /* frame pointer */
182# define rw_rtn __ctx(rw_in)[7] /* return address */
183#endif
184
185typedef struct
186 {
187 int __ctx(wbcnt);
188 int *__ctx(spbuf)[__SPARC_MAXREGWINDOW];
189 struct __rwindow __ctx(wbuf)[__SPARC_MAXREGWINDOW];
190 } gwindows_t;
191
192/*
193 * Floating point definitions.
194 */
195
196#ifdef __USE_MISC
197# define MAXFPQ 16 /* max # of fpu queue entries currently supported */
198#endif
199
200/*
201 * struct fq defines the minimal format of a floating point instruction queue
202 * entry. The size of entries in the floating point queue are implementation
203 * dependent. The union FQu is guaranteed to be the first field in any ABI
204 * conformant system implementation. Any additional fields provided by an
205 * implementation should not be used applications designed to be ABI conformant. */
206
207struct __fpq
208 {
209 unsigned long *__ctx(fpq_addr); /* address */
210 unsigned long __ctx(fpq_instr); /* instruction */
211 };
212
213struct __fq
214 {
215 union /* FPU inst/addr queue */
216 {
217 double __ctx(whole);
218 struct __fpq __ctx(fpq);
219 } __ctx(FQu);
220 };
221
222#ifdef __USE_MISC
223# define FPU_REGS_TYPE unsigned
224# define FPU_DREGS_TYPE unsigned long long
225# define V7_FPU_FSR_TYPE unsigned
226# define V9_FPU_FSR_TYPE unsigned long long
227# define V9_FPU_FPRS_TYPE unsigned
228#endif
229
230#if __WORDSIZE == 64
231
232typedef struct
233 {
234 union { /* FPU floating point regs */
235 unsigned __ctx(fpu_regs)[32]; /* 32 singles */
236 double __ctx(fpu_dregs)[32]; /* 32 doubles */
237 long double __ctx(fpu_qregs)[16]; /* 16 quads */
238 } __ctx(fpu_fr);
239 struct __fq *__ctx(fpu_q); /* ptr to array of FQ entries */
240 unsigned long __ctx(fpu_fsr); /* FPU status register */
241 unsigned char __ctx(fpu_qcnt); /* # of entries in saved FQ */
242 unsigned char __ctx(fpu_q_entrysize); /* # of bytes per FQ entry */
243 unsigned char __ctx(fpu_en); /* flag signifying fpu in use */
244 } fpregset_t;
245
246#else /* __WORDSIZE == 32 */
247
248typedef struct
249 {
250 union { /* FPU floating point regs */
251 __extension__ unsigned long long __ctx(fpu_regs)[32]; /* 32 singles */
252 double __ctx(fpu_dregs)[16]; /* 16 doubles */
253 } __ctx(fpu_fr);
254 struct __fq *__ctx(fpu_q); /* ptr to array of FQ entries */
255 unsigned __ctx(fpu_fsr); /* FPU status register */
256 unsigned char __ctx(fpu_qcnt); /* # of entries in saved FQ */
257 unsigned char __ctx(fpu_q_entrysize); /* # of bytes per FQ entry */
258 unsigned char __ctx(fpu_en); /* flag signifying fpu in use */
259 } fpregset_t;
260
261/*
262 * The following structure is for associating extra register state with
263 * the ucontext structure and is kept within the uc_mcontext filler area.
264 *
265 * If (xrs_id == XRS_ID) then the xrs_ptr field is a valid pointer to
266 * extra register state. The exact format of the extra register state
267 * pointed to by xrs_ptr is platform-dependent.
268 *
269 * Note: a platform may or may not manage extra register state.
270 */
271typedef struct
272 {
273 unsigned int __ctx(xrs_id); /* indicates xrs_ptr validity */
274 void * __ctx(xrs_ptr); /* ptr to extra reg state */
275 } xrs_t;
276
277#ifdef __USE_MISC
278# define XRS_ID 0x78727300 /* the string "xrs" */
279#endif
280
281typedef struct
282 {
283 gregset_t __ctx(gregs); /* general register set */
284 gwindows_t *__ctx(gwins); /* POSSIBLE pointer to register
285 windows */
286 fpregset_t __ctx(fpregs); /* floating point register set */
287 xrs_t __ctx(xrs); /* POSSIBLE extra register state
288 association */
289 long __glibc_reserved1[19];
290 } mcontext_t;
291
292
293/* Userlevel context. */
294typedef struct ucontext_t
295 {
296 unsigned long __ctx(uc_flags);
297 struct ucontext_t *uc_link;
298 sigset_t uc_sigmask;
299 stack_t uc_stack;
300 mcontext_t uc_mcontext;
301 } ucontext_t;
302
303#endif /* __WORDSIZE == 32 */
304#endif /* sys/ucontext.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/sys/user.h created+86
......@@ -0,0 +1,86 @@
1/* Copyright (C) 2003-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_USER_H
19#define _SYS_USER_H 1
20
21#include <stddef.h>
22
23struct sunos_regs
24{
25 unsigned int psr, pc, npc, y;
26 unsigned int regs[15];
27};
28
29struct sunos_fpqueue
30{
31 unsigned int *addr;
32 unsigned int inst;
33};
34
35struct sunos_fp
36{
37 union
38 {
39 unsigned int regs[32];
40 double reg_dbls[16];
41 } fregs;
42 unsigned int fsr;
43 unsigned int flags;
44 unsigned int extra;
45 unsigned int fpq_count;
46 struct sunos_fpqueue fpq[16];
47};
48
49struct sunos_fpu
50{
51 struct sunos_fp fpstatus;
52};
53
54/* The SunOS core file header layout. */
55struct user {
56 unsigned int magic;
57 unsigned int len;
58 struct sunos_regs regs;
59 struct
60 {
61 unsigned char a_dynamic :1;
62 unsigned char a_toolversion :7;
63 unsigned char a_machtype;
64 unsigned short a_info;
65 unsigned int a_text;
66 unsigned int a_data;
67 unsigned int a_bss;
68 unsigned int a_syms;
69 unsigned int a_entry;
70 unsigned int a_trsize;
71 unsigned int a_drsize;
72 } uexec;
73 int signal;
74 size_t u_tsize;
75 size_t u_dsize;
76 size_t u_ssize;
77 char u_comm[17];
78 struct sunos_fpu fpu;
79 unsigned int sigcode;
80};
81
82#define NBPG 0x2000
83#define UPAGES 1
84#define SUNOS_CORE_MAGIC 0x080456
85
86#endif
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/bits/fenv.h+1-1
......@@ -83,7 +83,7 @@ typedef unsigned long int fenv_t;
8383# define FE_NOMASK_ENV ((const fenv_t *) -2)
8484#endif
8585
86#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
86#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
8787/* Type representing floating-point control modes. */
8888typedef unsigned long int femode_t;
8989
lib/libc/include/sparc64-linux-gnu/bits/floatn.h deleted-97
......@@ -1,97 +0,0 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2024 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_FLOATN_H
20#define _BITS_FLOATN_H
21
22#include <features.h>
23#include <bits/long-double.h>
24
25/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */
28#ifndef __NO_LONG_DOUBLE_MATH
29# define __HAVE_FLOAT128 1
30#else
31/* glibc does not support _Float128 for platforms where long double is
32 normally binary128 when building with long double as binary64.
33 GCC's default for supported scalar modes does not support it either
34 in that case. */
35# define __HAVE_FLOAT128 0
36#endif
37
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
39 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 0
41
42/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT128
46
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long
50 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
52
53#ifndef __ASSEMBLER__
54
55/* Defined to concatenate the literal suffix to be used with _Float128
56 types, if __HAVE_FLOAT128 is 1. */
57# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
59/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l
61# else
62# define __f128(x) x##f128
63# endif
64# endif
65
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
69# define __CFLOAT128 _Complex long double
70# else
71# define __CFLOAT128 _Complex _Float128
72# endif
73# endif
74
75/* The remaining of this file provides support for older compilers. */
76# if __HAVE_FLOAT128
77
78/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
80typedef long double _Float128;
81# endif
82
83/* Various built-in functions do not exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())
86# define __builtin_inff128() (__builtin_infl ())
87# define __builtin_nanf128(x) (__builtin_nanl (x))
88# define __builtin_nansf128(x) (__builtin_nansl (x))
89# endif
90
91# endif
92
93#endif /* !__ASSEMBLER__. */
94
95#include <bits/floatn-common.h>
96
97#endif /* _BITS_FLOATN_H */
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/bits/rseq.h deleted-29
......@@ -1,29 +0,0 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2024 Free Software Foundation, Inc.
3
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _SYS_RSEQ_H
19# error "Never use <bits/rseq.h> directly; include <sys/rseq.h> instead."
20#endif
21
22/* RSEQ_SIG is a signature required before each abort handler code.
23
24 It is a 32-bit value that maps to actual architecture code compiled
25 into applications and libraries. It needs to be defined for each
26 architecture. When choosing this value, it needs to be taken into
27 account that generating invalid instructions may have ill effects on
28 tools like objdump, and may also have impact on the CPU speculative
29 execution efficiency in some cases. */
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/bits/socket-constants.h+1-1
......@@ -54,7 +54,7 @@
5454# define SO_TIMESTAMPNS_NEW 0x0042
5555# define SO_TIMESTAMPING_NEW 0x0043
5656
57# ifdef __USE_TIME_BITS64
57# ifdef __USE_TIME64_REDIRECTS
5858# define SO_RCVTIMEO SO_RCVTIMEO_NEW
5959# define SO_SNDTIMEO SO_SNDTIMEO_NEW
6060# define SO_TIMESTAMP SO_TIMESTAMP_NEW
lib/libc/include/sparc64-linux-gnu/bits/struct_stat.h+4-4
......@@ -28,7 +28,7 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
31#ifdef __USE_TIME64_REDIRECTS
3232# include <bits/struct_stat_time64_helper.h>
3333#else
3434 __dev_t st_dev; /* Device. */
......@@ -79,13 +79,13 @@ struct stat
7979# endif
8080 unsigned long int __glibc_reserved4;
8181 unsigned long int __glibc_reserved5;
82#endif /* __USE_TIME_BITS64 */
82#endif /* __USE_TIME64_REDIRECTS */
8383 };
8484
8585#ifdef __USE_LARGEFILE64
8686struct stat64
8787 {
88# ifdef __USE_TIME_BITS64
88# ifdef __USE_TIME64_REDIRECTS
8989# include <bits/struct_stat_time64_helper.h>
9090# else
9191 __dev_t st_dev; /* Device. */
......@@ -126,7 +126,7 @@ struct stat64
126126# endif
127127 unsigned long int __glibc_reserved4;
128128 unsigned long int __glibc_reserved5;
129# endif /* __USE_TIME_BITS64 */
129# endif /* __USE_TIME64_REDIRECTS */
130130 };
131131#endif
132132
lib/libc/include/sparc64-linux-gnu/bits/types/struct_msqid_ds.h+1-1
......@@ -26,7 +26,7 @@
2626 The type `struct msg' is opaque. */
2727struct msqid_ds
2828{
29#ifdef __USE_TIME_BITS64
29#ifdef __USE_TIME64_REDIRECTS
3030# include <bits/types/struct_msqid64_ds_helper.h>
3131#else
3232 struct ipc_perm msg_perm; /* structure describing operation permission */
lib/libc/include/sparc64-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/sparc64-linux-gnu/bits/types/struct_shmid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_shmid64_ds_helper.h>
2828#else
2929 struct ipc_perm shm_perm; /* operation permission struct */
lib/libc/include/sparc64-linux-gnu/bits/wordsize.h+2-3
......@@ -2,10 +2,9 @@
22
33#if defined __arch64__ || defined __sparcv9
44# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
65#else
76# define __WORDSIZE 32
87# define __WORDSIZE32_SIZE_ULONG 0
98# define __WORDSIZE32_PTRDIFF_LONG 0
10# define __WORDSIZE_TIME64_COMPAT32 0
11#endif
\ No newline at end of file
9#endif
10#define __WORDSIZE_TIME64_COMPAT32 1
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/fpu_control.h+1-1
......@@ -42,7 +42,7 @@
4242#define _FPU_RC_ZERO 0x40000000
4343#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
4444
45#define _FPU_RESERVED 0x30300000 /* Reserved bits in cw */
45#define _FPU_RESERVED 0x303e0000 /* Reserved bits in cw */
4646
4747
4848/* Now two recommended cw */
lib/libc/include/x86-linux-gnu/bits/fenv.h+1-1
......@@ -101,7 +101,7 @@ fenv_t;
101101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102102#endif
103103
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
105105/* Type representing floating-point control modes. */
106106typedef struct
107107 {
lib/libc/include/x86-linux-gnu/bits/struct_stat.h+4-4
......@@ -25,7 +25,7 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
28#ifdef __USE_TIME64_REDIRECTS
2929# include <bits/struct_stat_time64_helper.h>
3030#else
3131 __dev_t st_dev; /* Device. */
......@@ -95,14 +95,14 @@ struct stat
9595 __ino64_t st_ino; /* File serial number. */
9696# endif
9797# endif
98#endif /* __USE_TIME_BITS64 */
98#endif /* __USE_TIME64_REDIRECTS */
9999 };
100100
101101#ifdef __USE_LARGEFILE64
102102/* Note stat64 has the same shape as stat for x86-64. */
103103struct stat64
104104 {
105# ifdef __USE_TIME_BITS64
105# ifdef __USE_TIME64_REDIRECTS
106106# include <bits/struct_stat_time64_helper.h>
107107# else
108108 __dev_t st_dev; /* Device. */
......@@ -152,7 +152,7 @@ struct stat64
152152# else
153153 __ino64_t st_ino; /* File serial number. */
154154# endif
155# endif /* __USE_TIME_BITS64 */
155# endif /* __USE_TIME64_REDIRECTS */
156156 };
157157#endif
158158
lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/x86-linux-gnu/bits/wordsize.h+2-3
......@@ -8,10 +8,9 @@
88#define __WORDSIZE32_PTRDIFF_LONG 0
99#endif
1010
11#define __WORDSIZE_TIME64_COMPAT32 1
12
1113#ifdef __x86_64__
12# define __WORDSIZE_TIME64_COMPAT32 1
1314/* Both x86-64 and x32 use the 64-bit system call interface. */
1415# define __SYSCALL_WORDSIZE 64
15#else
16# define __WORDSIZE_TIME64_COMPAT32 0
1716#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/gnu/lib-names-32.h deleted-27
......@@ -1,27 +0,0 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
4#endif
5
6#define LD_LINUX_SO "ld-linux.so.2"
7#define LD_SO "ld-linux.so.2"
8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"
14#define LIBMVEC_SO "libmvec.so.1"
15#define LIBM_SO "libm.so.6"
16#define LIBNSL_SO "libnsl.so.1"
17#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
18#define LIBNSS_DB_SO "libnss_db.so.2"
19#define LIBNSS_DNS_SO "libnss_dns.so.2"
20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBPTHREAD_SO "libpthread.so.0"
24#define LIBRESOLV_SO "libresolv.so.2"
25#define LIBRT_SO "librt.so.1"
26#define LIBTHREAD_DB_SO "libthread_db.so.1"
27#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/fenv.h+1-1
......@@ -101,7 +101,7 @@ fenv_t;
101101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102102#endif
103103
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
105105/* Type representing floating-point control modes. */
106106typedef struct
107107 {
lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h+4-4
......@@ -25,7 +25,7 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
28#ifdef __USE_TIME64_REDIRECTS
2929# include <bits/struct_stat_time64_helper.h>
3030#else
3131 __dev_t st_dev; /* Device. */
......@@ -95,14 +95,14 @@ struct stat
9595 __ino64_t st_ino; /* File serial number. */
9696# endif
9797# endif
98#endif /* __USE_TIME_BITS64 */
98#endif /* __USE_TIME64_REDIRECTS */
9999 };
100100
101101#ifdef __USE_LARGEFILE64
102102/* Note stat64 has the same shape as stat for x86-64. */
103103struct stat64
104104 {
105# ifdef __USE_TIME_BITS64
105# ifdef __USE_TIME64_REDIRECTS
106106# include <bits/struct_stat_time64_helper.h>
107107# else
108108 __dev_t st_dev; /* Device. */
......@@ -152,7 +152,7 @@ struct stat64
152152# else
153153 __ino64_t st_ino; /* File serial number. */
154154# endif
155# endif /* __USE_TIME_BITS64 */
155# endif /* __USE_TIME64_REDIRECTS */
156156 };
157157#endif
158158
lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/x86_64-linux-gnu/bits/wordsize.h+2-3
......@@ -8,10 +8,9 @@
88#define __WORDSIZE32_PTRDIFF_LONG 0
99#endif
1010
11#define __WORDSIZE_TIME64_COMPAT32 1
12
1113#ifdef __x86_64__
12# define __WORDSIZE_TIME64_COMPAT32 1
1314/* Both x86-64 and x32 use the 64-bit system call interface. */
1415# define __SYSCALL_WORDSIZE 64
15#else
16# define __WORDSIZE_TIME64_COMPAT32 0
1716#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/fenv.h+1-1
......@@ -101,7 +101,7 @@ fenv_t;
101101# define FE_NOMASK_ENV ((const fenv_t *) -2)
102102#endif
103103
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
104#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
105105/* Type representing floating-point control modes. */
106106typedef struct
107107 {
lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h+4-4
......@@ -25,7 +25,7 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
28#ifdef __USE_TIME64_REDIRECTS
2929# include <bits/struct_stat_time64_helper.h>
3030#else
3131 __dev_t st_dev; /* Device. */
......@@ -95,14 +95,14 @@ struct stat
9595 __ino64_t st_ino; /* File serial number. */
9696# endif
9797# endif
98#endif /* __USE_TIME_BITS64 */
98#endif /* __USE_TIME64_REDIRECTS */
9999 };
100100
101101#ifdef __USE_LARGEFILE64
102102/* Note stat64 has the same shape as stat for x86-64. */
103103struct stat64
104104 {
105# ifdef __USE_TIME_BITS64
105# ifdef __USE_TIME64_REDIRECTS
106106# include <bits/struct_stat_time64_helper.h>
107107# else
108108 __dev_t st_dev; /* Device. */
......@@ -152,7 +152,7 @@ struct stat64
152152# else
153153 __ino64_t st_ino; /* File serial number. */
154154# endif
155# endif /* __USE_TIME_BITS64 */
155# endif /* __USE_TIME64_REDIRECTS */
156156 };
157157#endif
158158
lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h+1-1
......@@ -23,7 +23,7 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
26#ifdef __USE_TIME64_REDIRECTS
2727# include <bits/types/struct_semid64_ds_helper.h>
2828#else
2929 struct ipc_perm sem_perm; /* operation permission struct */
lib/libc/include/x86_64-linux-gnux32/bits/wordsize.h+2-3
......@@ -8,10 +8,9 @@
88#define __WORDSIZE32_PTRDIFF_LONG 0
99#endif
1010
11#define __WORDSIZE_TIME64_COMPAT32 1
12
1113#ifdef __x86_64__
12# define __WORDSIZE_TIME64_COMPAT32 1
1314/* Both x86-64 and x32 use the 64-bit system call interface. */
1415# define __SYSCALL_WORDSIZE 64
15#else
16# define __WORDSIZE_TIME64_COMPAT32 0
1716#endif
\ No newline at end of file