authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-12 21:10:09-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-13 17:44:27-07:00
log8d3892b7558c36691b9940af9db7ca51e0acaa3c
tree50709d7fc76580476619cec5f108ae1ea0f56380
parent0813539c28b52613427c7a00a0714b2363154f5b

update glibc headers to 2.38


1355 files changed, 12039 insertions(+), 10562 deletions(-)

lib/libc/include/aarch64-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -55,7 +55,7 @@
5555/* Defined to concatenate the literal suffix to be used with _Float128
5656 types, if __HAVE_FLOAT128 is 1. */
5757# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
5959/* The literal suffix f128 exists only since GCC 7.0. */
6060# define __f128(x) x##l
6161# else
......@@ -65,7 +65,7 @@
6565
6666/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
6767# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6969# define __CFLOAT128 _Complex long double
7070# else
7171# define __CFLOAT128 _Complex _Float128
......@@ -76,7 +76,7 @@
7676# if __HAVE_FLOAT128
7777
7878/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8080typedef long double _Float128;
8181# endif
8282
lib/libc/include/aarch64-linux-gnu/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. AArch64 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-linux-gnu/bits/hwcap.h+26-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. AArch64 Linux version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 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
......@@ -73,4 +73,28 @@
7373#define HWCAP2_DGH (1 << 15)
7474#define HWCAP2_RNG (1 << 16)
7575#define HWCAP2_BTI (1 << 17)
76#define HWCAP2_MTE (1 << 18)
\ No newline at end of file
76#define HWCAP2_MTE (1 << 18)
77#define HWCAP2_ECV (1 << 19)
78#define HWCAP2_AFP (1 << 20)
79#define HWCAP2_RPRES (1 << 21)
80#define HWCAP2_MTE3 (1 << 22)
81#define HWCAP2_SME (1 << 23)
82#define HWCAP2_SME_I16I64 (1 << 24)
83#define HWCAP2_SME_F64F64 (1 << 25)
84#define HWCAP2_SME_I8I32 (1 << 26)
85#define HWCAP2_SME_F16F32 (1 << 27)
86#define HWCAP2_SME_B16F32 (1 << 28)
87#define HWCAP2_SME_F32F32 (1 << 29)
88#define HWCAP2_SME_FA64 (1 << 30)
89#define HWCAP2_WFXT (1UL << 31)
90#define HWCAP2_EBF16 (1UL << 32)
91#define HWCAP2_SVE_EBF16 (1UL << 33)
92#define HWCAP2_CSSC (1UL << 34)
93#define HWCAP2_RPRFM (1UL << 35)
94#define HWCAP2_SVE2P1 (1UL << 36)
95#define HWCAP2_SME2 (1UL << 37)
96#define HWCAP2_SME2P1 (1UL << 38)
97#define HWCAP2_SME_I16I32 (1UL << 39)
98#define HWCAP2_SME_BI32I32 (1UL << 40)
99#define HWCAP2_SME_B16B16 (1UL << 41)
100#define HWCAP2_SME_F16F16 (1UL << 42)
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/link.h+18-10
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -20,23 +20,31 @@
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
2121#endif
2222
23typedef union
24{
25 float s;
26 double d;
27 long double q;
28} La_aarch64_vector;
29
2330/* Registers for entry into PLT on AArch64. */
2431typedef struct La_aarch64_regs
2532{
26 uint64_t lr_xreg[8];
27 uint64_t lr_dreg[8];
28 uint64_t lr_sp;
29 uint64_t lr_lr;
33 uint64_t lr_xreg[9];
34 La_aarch64_vector lr_vreg[8];
35 uint64_t lr_sp;
36 uint64_t lr_lr;
37 void *lr_vpcs;
3038} La_aarch64_regs;
3139
3240/* Return values for calls from PLT on AArch64. */
3341typedef struct La_aarch64_retval
3442{
35 /* Up to two integer registers can be used for a return value. */
36 uint64_t lrv_xreg[2];
37 /* Up to four D registers can be used for a return value. */
38 uint64_t lrv_dreg[4];
39
43 /* Up to eight integer registers can be used for a return value. */
44 uint64_t lrv_xreg[8];
45 /* Up to eight V registers can be used for a return value. */
46 La_aarch64_vector lrv_vreg[8];
47 void *lrv_vpcs;
4048} La_aarch64_retval;
4149__BEGIN_DECLS
4250
lib/libc/include/aarch64-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-128 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-linux-gnu/bits/math-vector.h created+78
......@@ -0,0 +1,78 @@
1/* Platform-specific SIMD declarations of math functions.
2
3 Copyright (C) 2023 Free Software Foundation, Inc.
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 _MATH_H
21# error "Never include <bits/math-vector.h> directly;\
22 include <math.h> instead."
23#endif
24
25/* Get default empty definitions for simd declarations. */
26#include <bits/libm-simd-decl-stubs.h>
27
28#if __GNUC_PREREQ(9, 0)
29# define __ADVSIMD_VEC_MATH_SUPPORTED
30typedef __Float32x4_t __f32x4_t;
31typedef __Float64x2_t __f64x2_t;
32#elif __glibc_clang_prereq(8, 0)
33# define __ADVSIMD_VEC_MATH_SUPPORTED
34typedef __attribute__ ((__neon_vector_type__ (4))) float __f32x4_t;
35typedef __attribute__ ((__neon_vector_type__ (2))) double __f64x2_t;
36#endif
37
38#if __GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0)
39# define __SVE_VEC_MATH_SUPPORTED
40typedef __SVFloat32_t __sv_f32_t;
41typedef __SVFloat64_t __sv_f64_t;
42typedef __SVBool_t __sv_bool_t;
43#endif
44
45/* If vector types and vector PCS are unsupported in the working
46 compiler, no choice but to omit vector math declarations. */
47
48#ifdef __ADVSIMD_VEC_MATH_SUPPORTED
49
50# define __vpcs __attribute__ ((__aarch64_vector_pcs__))
51
52__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
53__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
54__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
55__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
56
57__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
58__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
59__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
60__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
61
62# undef __ADVSIMD_VEC_MATH_SUPPORTED
63#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
64
65#ifdef __SVE_VEC_MATH_SUPPORTED
66
67__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
68__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
69__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
70__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
71
72__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
73__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
74__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
75__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
76
77# undef __SVE_VEC_MATH_SUPPORTED
78#endif /* __SVE_VEC_MATH_SUPPORTED */
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/mman.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/AArch64 version.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. AArch64 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64-linux-gnu/bits/rseq.h created+43
......@@ -0,0 +1,43 @@
1/* Restartable Sequences Linux aarch64 architecture header.
2 Copyright (C) 2021-2023 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 aarch64 -mbig-endian generates mixed endianness code vs data:
32 little-endian code and big-endian data. Ensure the RSEQ_SIG signature
33 matches code endianness. */
34
35#define RSEQ_SIG_CODE 0xd428bc00 /* BRK #0x45E0. */
36
37#ifdef __AARCH64EB__
38# define RSEQ_SIG_DATA 0x00bc28d4 /* BRK #0x45E0. */
39#else
40# define RSEQ_SIG_DATA RSEQ_SIG_CODE
41#endif
42
43#define RSEQ_SIG RSEQ_SIG_DATA
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64-linux-gnu/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64-linux-gnu/bits/sigstack.h+1-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 2015-2021 Free Software Foundation, Inc.
2 Copyright (C) 2015-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* AArch64 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-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-2023 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/aarch64-linux-gnu/bits/typesizes.h+1-2
......@@ -1,7 +1,6 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/aarch64-linux-gnu/bits/wordsize.h+1-1
......@@ -1,6 +1,6 @@
11/* Determine the wordsize from the preprocessor defines.
22
3 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 Copyright (C) 2016-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-linux-gnu/fpu_control.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -46,7 +46,7 @@
4646 contents. These two masks indicate which bits in each of FPCR and
4747 FPSR should not be changed. */
4848
49#define _FPU_RESERVED 0xfe0fe0ff
49#define _FPU_RESERVED 0xfe0fe0f8
5050#define _FPU_FPSR_RESERVED 0x0fffffe0
5151
5252#define _FPU_DEFAULT 0x00000000
lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/aarch64-linux-gnu/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64-linux-gnu/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64-linux-gnu/sys/ptrace.h+7-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/AArch64 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -58,6 +58,7 @@ __BEGIN_DECLS
5858#undef PTRACE_SECCOMP_GET_FILTER
5959#undef PTRACE_SECCOMP_GET_METADATA
6060#undef PTRACE_GET_SYSCALL_INFO
61#undef PTRACE_GET_RSEQ_CONFIGURATION
6162
6263/* Type of the REQUEST argument to `ptrace.' */
6364enum __ptrace_request
......@@ -190,8 +191,12 @@ enum __ptrace_request
190191#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191192
192193 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194 PTRACE_GET_SYSCALL_INFO = 0x420e,
194195#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
196
197 /* Get rseq configuration information. */
198 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
199#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
195200};
196201
197202
lib/libc/include/aarch64-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2009-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2009-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64_be-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -55,7 +55,7 @@
5555/* Defined to concatenate the literal suffix to be used with _Float128
5656 types, if __HAVE_FLOAT128 is 1. */
5757# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
5959/* The literal suffix f128 exists only since GCC 7.0. */
6060# define __f128(x) x##l
6161# else
......@@ -65,7 +65,7 @@
6565
6666/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
6767# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6969# define __CFLOAT128 _Complex long double
7070# else
7171# define __CFLOAT128 _Complex _Float128
......@@ -76,7 +76,7 @@
7676# if __HAVE_FLOAT128
7777
7878/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8080typedef long double _Float128;
8181# endif
8282
lib/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. AArch64 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h+26-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. AArch64 Linux version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 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
......@@ -73,4 +73,28 @@
7373#define HWCAP2_DGH (1 << 15)
7474#define HWCAP2_RNG (1 << 16)
7575#define HWCAP2_BTI (1 << 17)
76#define HWCAP2_MTE (1 << 18)
\ No newline at end of file
76#define HWCAP2_MTE (1 << 18)
77#define HWCAP2_ECV (1 << 19)
78#define HWCAP2_AFP (1 << 20)
79#define HWCAP2_RPRES (1 << 21)
80#define HWCAP2_MTE3 (1 << 22)
81#define HWCAP2_SME (1 << 23)
82#define HWCAP2_SME_I16I64 (1 << 24)
83#define HWCAP2_SME_F64F64 (1 << 25)
84#define HWCAP2_SME_I8I32 (1 << 26)
85#define HWCAP2_SME_F16F32 (1 << 27)
86#define HWCAP2_SME_B16F32 (1 << 28)
87#define HWCAP2_SME_F32F32 (1 << 29)
88#define HWCAP2_SME_FA64 (1 << 30)
89#define HWCAP2_WFXT (1UL << 31)
90#define HWCAP2_EBF16 (1UL << 32)
91#define HWCAP2_SVE_EBF16 (1UL << 33)
92#define HWCAP2_CSSC (1UL << 34)
93#define HWCAP2_RPRFM (1UL << 35)
94#define HWCAP2_SVE2P1 (1UL << 36)
95#define HWCAP2_SME2 (1UL << 37)
96#define HWCAP2_SME2P1 (1UL << 38)
97#define HWCAP2_SME_I16I32 (1UL << 39)
98#define HWCAP2_SME_BI32I32 (1UL << 40)
99#define HWCAP2_SME_B16B16 (1UL << 41)
100#define HWCAP2_SME_F16F16 (1UL << 42)
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/link.h+18-10
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -20,23 +20,31 @@
2020# error "Never include <bits/link.h> directly; use <link.h> instead."
2121#endif
2222
23typedef union
24{
25 float s;
26 double d;
27 long double q;
28} La_aarch64_vector;
29
2330/* Registers for entry into PLT on AArch64. */
2431typedef struct La_aarch64_regs
2532{
26 uint64_t lr_xreg[8];
27 uint64_t lr_dreg[8];
28 uint64_t lr_sp;
29 uint64_t lr_lr;
33 uint64_t lr_xreg[9];
34 La_aarch64_vector lr_vreg[8];
35 uint64_t lr_sp;
36 uint64_t lr_lr;
37 void *lr_vpcs;
3038} La_aarch64_regs;
3139
3240/* Return values for calls from PLT on AArch64. */
3341typedef struct La_aarch64_retval
3442{
35 /* Up to two integer registers can be used for a return value. */
36 uint64_t lrv_xreg[2];
37 /* Up to four D registers can be used for a return value. */
38 uint64_t lrv_dreg[4];
39
43 /* Up to eight integer registers can be used for a return value. */
44 uint64_t lrv_xreg[8];
45 /* Up to eight V registers can be used for a return value. */
46 La_aarch64_vector lrv_vreg[8];
47 void *lrv_vpcs;
4048} La_aarch64_retval;
4149__BEGIN_DECLS
4250
lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-128 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-linux-gnu/bits/math-vector.h created+78
......@@ -0,0 +1,78 @@
1/* Platform-specific SIMD declarations of math functions.
2
3 Copyright (C) 2023 Free Software Foundation, Inc.
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 _MATH_H
21# error "Never include <bits/math-vector.h> directly;\
22 include <math.h> instead."
23#endif
24
25/* Get default empty definitions for simd declarations. */
26#include <bits/libm-simd-decl-stubs.h>
27
28#if __GNUC_PREREQ(9, 0)
29# define __ADVSIMD_VEC_MATH_SUPPORTED
30typedef __Float32x4_t __f32x4_t;
31typedef __Float64x2_t __f64x2_t;
32#elif __glibc_clang_prereq(8, 0)
33# define __ADVSIMD_VEC_MATH_SUPPORTED
34typedef __attribute__ ((__neon_vector_type__ (4))) float __f32x4_t;
35typedef __attribute__ ((__neon_vector_type__ (2))) double __f64x2_t;
36#endif
37
38#if __GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0)
39# define __SVE_VEC_MATH_SUPPORTED
40typedef __SVFloat32_t __sv_f32_t;
41typedef __SVFloat64_t __sv_f64_t;
42typedef __SVBool_t __sv_bool_t;
43#endif
44
45/* If vector types and vector PCS are unsupported in the working
46 compiler, no choice but to omit vector math declarations. */
47
48#ifdef __ADVSIMD_VEC_MATH_SUPPORTED
49
50# define __vpcs __attribute__ ((__aarch64_vector_pcs__))
51
52__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
53__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
54__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
55__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
56
57__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
58__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
59__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
60__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
61
62# undef __ADVSIMD_VEC_MATH_SUPPORTED
63#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
64
65#ifdef __SVE_VEC_MATH_SUPPORTED
66
67__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
68__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
69__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
70__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
71
72__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
73__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
74__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
75__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
76
77# undef __SVE_VEC_MATH_SUPPORTED
78#endif /* __SVE_VEC_MATH_SUPPORTED */
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/mman.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/AArch64 version.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. AArch64 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/bits/rseq.h created+43
......@@ -0,0 +1,43 @@
1/* Restartable Sequences Linux aarch64 architecture header.
2 Copyright (C) 2021-2023 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 aarch64 -mbig-endian generates mixed endianness code vs data:
32 little-endian code and big-endian data. Ensure the RSEQ_SIG signature
33 matches code endianness. */
34
35#define RSEQ_SIG_CODE 0xd428bc00 /* BRK #0x45E0. */
36
37#ifdef __AARCH64EB__
38# define RSEQ_SIG_DATA 0x00bc28d4 /* BRK #0x45E0. */
39#else
40# define RSEQ_SIG_DATA RSEQ_SIG_CODE
41#endif
42
43#define RSEQ_SIG RSEQ_SIG_DATA
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/bits/sigstack.h+1-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 2015-2021 Free Software Foundation, Inc.
2 Copyright (C) 2015-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* AArch64 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/aarch64_be-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-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-2023 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/aarch64_be-linux-gnu/bits/typesizes.h+1-2
......@@ -1,7 +1,6 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/aarch64_be-linux-gnu/bits/wordsize.h+1-1
......@@ -1,6 +1,6 @@
11/* Determine the wordsize from the preprocessor defines.
22
3 Copyright (C) 2016-2021 Free Software Foundation, Inc.
3 Copyright (C) 2016-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-linux-gnu/fpu_control.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
......@@ -46,7 +46,7 @@
4646 contents. These two masks indicate which bits in each of FPCR and
4747 FPSR should not be changed. */
4848
49#define _FPU_RESERVED 0xfe0fe0ff
49#define _FPU_RESERVED 0xfe0fe0f8
5050#define _FPU_FPSR_RESERVED 0x0fffffe0
5151
5252#define _FPU_DEFAULT 0x00000000
lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/aarch64_be-linux-gnu/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/aarch64_be-linux-gnu/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h+7-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/AArch64 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -58,6 +58,7 @@ __BEGIN_DECLS
5858#undef PTRACE_SECCOMP_GET_FILTER
5959#undef PTRACE_SECCOMP_GET_METADATA
6060#undef PTRACE_GET_SYSCALL_INFO
61#undef PTRACE_GET_RSEQ_CONFIGURATION
6162
6263/* Type of the REQUEST argument to `ptrace.' */
6364enum __ptrace_request
......@@ -190,8 +191,12 @@ enum __ptrace_request
190191#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191192
192193 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
194 PTRACE_GET_SYSCALL_INFO = 0x420e,
194195#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
196
197 /* Get rseq configuration information. */
198 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
199#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
195200};
196201
197202
lib/libc/include/aarch64_be-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/aarch64_be-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2009-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2009-2023 Free Software Foundation, Inc.
22
33 This file is part of the GNU C Library.
44
lib/libc/include/arm-linux-gnueabi/bits/dl_find_object.h created+25
......@@ -0,0 +1,25 @@
1/* arm definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#define DLFO_STRUCT_HAS_EH_DBASE 0
24#define DLFO_STRUCT_HAS_EH_COUNT 1
25#define DLFO_EH_SEGMENT_TYPE PT_ARM_EXIDX
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/hwcap.h+8-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 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
......@@ -42,4 +42,10 @@
4242#define HWCAP_ARM_IDIVT 262144
4343#define HWCAP_ARM_VFPD32 524288
4444#define HWCAP_ARM_LPAE 1048576
45#define HWCAP_ARM_EVTSTRM 2097152
\ No newline at end of file
45#define HWCAP_ARM_EVTSTRM 2097152
46#define HWCAP_FPHP 4194304
47#define HWCAP_ASIMDHP 8388608
48#define HWCAP_ASIMDDP 16777216
49#define HWCAP_ASIMDFHM 33554432
50#define HWCAP_ASIMDBF16 67108864
51#define HWCAP_I8MM 134217728
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/link.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/arm-linux-gnueabi/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/rseq.h created+83
......@@ -0,0 +1,83 @@
1/* Restartable Sequences Linux arm architecture header.
2 Copyright (C) 2021-2023 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/*
23 RSEQ_SIG is a signature required before each abort handler code.
24
25 It is a 32-bit value that maps to actual architecture code compiled
26 into applications and libraries. It needs to be defined for each
27 architecture. When choosing this value, it needs to be taken into
28 account that generating invalid instructions may have ill effects on
29 tools like objdump, and may also have impact on the CPU speculative
30 execution efficiency in some cases.
31
32 - ARM little endian
33
34 RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand
35 value 0x5de3. This traps if user-space reaches this instruction by mistake,
36 and the uncommon operand ensures the kernel does not move the instruction
37 pointer to attacker-controlled code on rseq abort.
38
39 The instruction pattern in the A32 instruction set is:
40
41 e7f5def3 udf #24035 ; 0x5de3
42
43 This translates to the following instruction pattern in the T16 instruction
44 set:
45
46 little endian:
47 def3 udf #243 ; 0xf3
48 e7f5 b.n <7f5>
49
50 - ARMv6+ big endian (BE8):
51
52 ARMv6+ -mbig-endian generates mixed endianness code vs data: little-endian
53 code and big-endian data. The data value of the signature needs to have its
54 byte order reversed to generate the trap instruction:
55
56 Data: 0xf3def5e7
57
58 Translates to this A32 instruction pattern:
59
60 e7f5def3 udf #24035 ; 0x5de3
61
62 Translates to this T16 instruction pattern:
63
64 def3 udf #243 ; 0xf3
65 e7f5 b.n <7f5>
66
67 - Prior to ARMv6 big endian (BE32):
68
69 Prior to ARMv6, -mbig-endian generates big-endian code and data
70 (which match), so the endianness of the data representation of the
71 signature should not be reversed. However, the choice between BE32
72 and BE8 is done by the linker, so we cannot know whether code and
73 data endianness will be mixed before the linker is invoked. So rather
74 than try to play tricks with the linker, the rseq signature is simply
75 data (not a trap instruction) prior to ARMv6 on big endian. This is
76 why the signature is expressed as data (.word) rather than as
77 instruction (.inst) in assembler. */
78
79#ifdef __ARMEB__
80# define RSEQ_SIG 0xf3def5e7 /* udf #24035 ; 0x5de3 (ARMv6+) */
81#else
82# define RSEQ_SIG 0xe7f5def3 /* udf #24035 ; 0x5de3 */
83#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h+2-2
......@@ -1,5 +1,5 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Definition for struct stat. Linux/arm version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/ARM.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/typesizes.h created+74
......@@ -0,0 +1,74 @@
1/* bits/typesizes.h -- underlying types for *_t. ARM version.
2 Copyright (C) 2002-2023 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#define __RLIM_T_MATCHES_RLIM64_T 0
66#define __STATFS_MATCHES_STATFS64 0
67/* And for getitimer, setitimer and rusage */
68#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
69
70/* Number of descriptors that can fit in an `fd_set'. */
71#define __FD_SETSIZE 1024
72
73
74#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -200,8 +200,12 @@ enum __ptrace_request
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201201
202202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
203 PTRACE_GET_SYSCALL_INFO = 0x420e,
204204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
205
206 /* Get rseq configuration information. */
207 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
208#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
205209};
206210
207211
lib/libc/include/arm-linux-gnueabi/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabi/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/dl_find_object.h created+25
......@@ -0,0 +1,25 @@
1/* arm definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#define DLFO_STRUCT_HAS_EH_DBASE 0
24#define DLFO_STRUCT_HAS_EH_COUNT 1
25#define DLFO_EH_SEGMENT_TYPE PT_ARM_EXIDX
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/hwcap.h+8-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 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
......@@ -42,4 +42,10 @@
4242#define HWCAP_ARM_IDIVT 262144
4343#define HWCAP_ARM_VFPD32 524288
4444#define HWCAP_ARM_LPAE 1048576
45#define HWCAP_ARM_EVTSTRM 2097152
\ No newline at end of file
45#define HWCAP_ARM_EVTSTRM 2097152
46#define HWCAP_FPHP 4194304
47#define HWCAP_ASIMDHP 8388608
48#define HWCAP_ASIMDDP 16777216
49#define HWCAP_ASIMDFHM 33554432
50#define HWCAP_ASIMDBF16 67108864
51#define HWCAP_I8MM 134217728
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/link.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/arm-linux-gnueabihf/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/rseq.h created+83
......@@ -0,0 +1,83 @@
1/* Restartable Sequences Linux arm architecture header.
2 Copyright (C) 2021-2023 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/*
23 RSEQ_SIG is a signature required before each abort handler code.
24
25 It is a 32-bit value that maps to actual architecture code compiled
26 into applications and libraries. It needs to be defined for each
27 architecture. When choosing this value, it needs to be taken into
28 account that generating invalid instructions may have ill effects on
29 tools like objdump, and may also have impact on the CPU speculative
30 execution efficiency in some cases.
31
32 - ARM little endian
33
34 RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand
35 value 0x5de3. This traps if user-space reaches this instruction by mistake,
36 and the uncommon operand ensures the kernel does not move the instruction
37 pointer to attacker-controlled code on rseq abort.
38
39 The instruction pattern in the A32 instruction set is:
40
41 e7f5def3 udf #24035 ; 0x5de3
42
43 This translates to the following instruction pattern in the T16 instruction
44 set:
45
46 little endian:
47 def3 udf #243 ; 0xf3
48 e7f5 b.n <7f5>
49
50 - ARMv6+ big endian (BE8):
51
52 ARMv6+ -mbig-endian generates mixed endianness code vs data: little-endian
53 code and big-endian data. The data value of the signature needs to have its
54 byte order reversed to generate the trap instruction:
55
56 Data: 0xf3def5e7
57
58 Translates to this A32 instruction pattern:
59
60 e7f5def3 udf #24035 ; 0x5de3
61
62 Translates to this T16 instruction pattern:
63
64 def3 udf #243 ; 0xf3
65 e7f5 b.n <7f5>
66
67 - Prior to ARMv6 big endian (BE32):
68
69 Prior to ARMv6, -mbig-endian generates big-endian code and data
70 (which match), so the endianness of the data representation of the
71 signature should not be reversed. However, the choice between BE32
72 and BE8 is done by the linker, so we cannot know whether code and
73 data endianness will be mixed before the linker is invoked. So rather
74 than try to play tricks with the linker, the rseq signature is simply
75 data (not a trap instruction) prior to ARMv6 on big endian. This is
76 why the signature is expressed as data (.word) rather than as
77 instruction (.inst) in assembler. */
78
79#ifdef __ARMEB__
80# define RSEQ_SIG 0xf3def5e7 /* udf #24035 ; 0x5de3 (ARMv6+) */
81#else
82# define RSEQ_SIG 0xe7f5def3 /* udf #24035 ; 0x5de3 */
83#endif
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h+2-2
......@@ -1,5 +1,5 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Definition for struct stat. Linux/arm version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/ARM.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/typesizes.h created+74
......@@ -0,0 +1,74 @@
1/* bits/typesizes.h -- underlying types for *_t. ARM version.
2 Copyright (C) 2002-2023 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#define __RLIM_T_MATCHES_RLIM64_T 0
66#define __STATFS_MATCHES_STATFS64 0
67/* And for getitimer, setitimer and rusage */
68#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
69
70/* Number of descriptors that can fit in an `fd_set'. */
71#define __FD_SETSIZE 1024
72
73
74#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -200,8 +200,12 @@ enum __ptrace_request
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201201
202202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
203 PTRACE_GET_SYSCALL_INFO = 0x420e,
204204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
205
206 /* Get rseq configuration information. */
207 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
208#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
205209};
206210
207211
lib/libc/include/arm-linux-gnueabihf/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/arm-linux-gnueabihf/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/dl_find_object.h created+25
......@@ -0,0 +1,25 @@
1/* arm definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#define DLFO_STRUCT_HAS_EH_DBASE 0
24#define DLFO_STRUCT_HAS_EH_COUNT 1
25#define DLFO_EH_SEGMENT_TYPE PT_ARM_EXIDX
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/hwcap.h+8-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 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
......@@ -42,4 +42,10 @@
4242#define HWCAP_ARM_IDIVT 262144
4343#define HWCAP_ARM_VFPD32 524288
4444#define HWCAP_ARM_LPAE 1048576
45#define HWCAP_ARM_EVTSTRM 2097152
\ No newline at end of file
45#define HWCAP_ARM_EVTSTRM 2097152
46#define HWCAP_FPHP 4194304
47#define HWCAP_ASIMDHP 8388608
48#define HWCAP_ASIMDDP 16777216
49#define HWCAP_ASIMDFHM 33554432
50#define HWCAP_ASIMDBF16 67108864
51#define HWCAP_I8MM 134217728
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/link.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/armeb-linux-gnueabi/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/rseq.h created+83
......@@ -0,0 +1,83 @@
1/* Restartable Sequences Linux arm architecture header.
2 Copyright (C) 2021-2023 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/*
23 RSEQ_SIG is a signature required before each abort handler code.
24
25 It is a 32-bit value that maps to actual architecture code compiled
26 into applications and libraries. It needs to be defined for each
27 architecture. When choosing this value, it needs to be taken into
28 account that generating invalid instructions may have ill effects on
29 tools like objdump, and may also have impact on the CPU speculative
30 execution efficiency in some cases.
31
32 - ARM little endian
33
34 RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand
35 value 0x5de3. This traps if user-space reaches this instruction by mistake,
36 and the uncommon operand ensures the kernel does not move the instruction
37 pointer to attacker-controlled code on rseq abort.
38
39 The instruction pattern in the A32 instruction set is:
40
41 e7f5def3 udf #24035 ; 0x5de3
42
43 This translates to the following instruction pattern in the T16 instruction
44 set:
45
46 little endian:
47 def3 udf #243 ; 0xf3
48 e7f5 b.n <7f5>
49
50 - ARMv6+ big endian (BE8):
51
52 ARMv6+ -mbig-endian generates mixed endianness code vs data: little-endian
53 code and big-endian data. The data value of the signature needs to have its
54 byte order reversed to generate the trap instruction:
55
56 Data: 0xf3def5e7
57
58 Translates to this A32 instruction pattern:
59
60 e7f5def3 udf #24035 ; 0x5de3
61
62 Translates to this T16 instruction pattern:
63
64 def3 udf #243 ; 0xf3
65 e7f5 b.n <7f5>
66
67 - Prior to ARMv6 big endian (BE32):
68
69 Prior to ARMv6, -mbig-endian generates big-endian code and data
70 (which match), so the endianness of the data representation of the
71 signature should not be reversed. However, the choice between BE32
72 and BE8 is done by the linker, so we cannot know whether code and
73 data endianness will be mixed before the linker is invoked. So rather
74 than try to play tricks with the linker, the rseq signature is simply
75 data (not a trap instruction) prior to ARMv6 on big endian. This is
76 why the signature is expressed as data (.word) rather than as
77 instruction (.inst) in assembler. */
78
79#ifdef __ARMEB__
80# define RSEQ_SIG 0xf3def5e7 /* udf #24035 ; 0x5de3 (ARMv6+) */
81#else
82# define RSEQ_SIG 0xe7f5def3 /* udf #24035 ; 0x5de3 */
83#endif
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h+2-2
......@@ -1,5 +1,5 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Definition for struct stat. Linux/arm version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/ARM.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/typesizes.h created+74
......@@ -0,0 +1,74 @@
1/* bits/typesizes.h -- underlying types for *_t. ARM version.
2 Copyright (C) 2002-2023 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#define __RLIM_T_MATCHES_RLIM64_T 0
66#define __STATFS_MATCHES_STATFS64 0
67/* And for getitimer, setitimer and rusage */
68#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
69
70/* Number of descriptors that can fit in an `fd_set'. */
71#define __FD_SETSIZE 1024
72
73
74#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -200,8 +200,12 @@ enum __ptrace_request
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201201
202202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
203 PTRACE_GET_SYSCALL_INFO = 0x420e,
204204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
205
206 /* Get rseq configuration information. */
207 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
208#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
205209};
206210
207211
lib/libc/include/armeb-linux-gnueabi/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabi/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/dl_find_object.h created+25
......@@ -0,0 +1,25 @@
1/* arm definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#define DLFO_STRUCT_HAS_EH_DBASE 0
24#define DLFO_STRUCT_HAS_EH_COUNT 1
25#define DLFO_EH_SEGMENT_TYPE PT_ARM_EXIDX
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/hwcap.h+8-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP. ARM Linux version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 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
......@@ -42,4 +42,10 @@
4242#define HWCAP_ARM_IDIVT 262144
4343#define HWCAP_ARM_VFPD32 524288
4444#define HWCAP_ARM_LPAE 1048576
45#define HWCAP_ARM_EVTSTRM 2097152
\ No newline at end of file
45#define HWCAP_ARM_EVTSTRM 2097152
46#define HWCAP_FPHP 4194304
47#define HWCAP_ASIMDHP 8388608
48#define HWCAP_ASIMDDP 16777216
49#define HWCAP_ASIMDFHM 33554432
50#define HWCAP_ASIMDBF16 67108864
51#define HWCAP_I8MM 134217728
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/link.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/armeb-linux-gnueabihf/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. Arm version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/rseq.h created+83
......@@ -0,0 +1,83 @@
1/* Restartable Sequences Linux arm architecture header.
2 Copyright (C) 2021-2023 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/*
23 RSEQ_SIG is a signature required before each abort handler code.
24
25 It is a 32-bit value that maps to actual architecture code compiled
26 into applications and libraries. It needs to be defined for each
27 architecture. When choosing this value, it needs to be taken into
28 account that generating invalid instructions may have ill effects on
29 tools like objdump, and may also have impact on the CPU speculative
30 execution efficiency in some cases.
31
32 - ARM little endian
33
34 RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand
35 value 0x5de3. This traps if user-space reaches this instruction by mistake,
36 and the uncommon operand ensures the kernel does not move the instruction
37 pointer to attacker-controlled code on rseq abort.
38
39 The instruction pattern in the A32 instruction set is:
40
41 e7f5def3 udf #24035 ; 0x5de3
42
43 This translates to the following instruction pattern in the T16 instruction
44 set:
45
46 little endian:
47 def3 udf #243 ; 0xf3
48 e7f5 b.n <7f5>
49
50 - ARMv6+ big endian (BE8):
51
52 ARMv6+ -mbig-endian generates mixed endianness code vs data: little-endian
53 code and big-endian data. The data value of the signature needs to have its
54 byte order reversed to generate the trap instruction:
55
56 Data: 0xf3def5e7
57
58 Translates to this A32 instruction pattern:
59
60 e7f5def3 udf #24035 ; 0x5de3
61
62 Translates to this T16 instruction pattern:
63
64 def3 udf #243 ; 0xf3
65 e7f5 b.n <7f5>
66
67 - Prior to ARMv6 big endian (BE32):
68
69 Prior to ARMv6, -mbig-endian generates big-endian code and data
70 (which match), so the endianness of the data representation of the
71 signature should not be reversed. However, the choice between BE32
72 and BE8 is done by the linker, so we cannot know whether code and
73 data endianness will be mixed before the linker is invoked. So rather
74 than try to play tricks with the linker, the rseq signature is simply
75 data (not a trap instruction) prior to ARMv6 on big endian. This is
76 why the signature is expressed as data (.word) rather than as
77 instruction (.inst) in assembler. */
78
79#ifdef __ARMEB__
80# define RSEQ_SIG 0xf3def5e7 /* udf #24035 ; 0x5de3 (ARMv6+) */
81#else
82# define RSEQ_SIG 0xe7f5def3 /* udf #24035 ; 0x5de3 */
83#endif
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. ARM version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h+2-2
......@@ -1,5 +1,5 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Definition for struct stat. Linux/arm version.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/ARM.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/typesizes.h created+74
......@@ -0,0 +1,74 @@
1/* bits/typesizes.h -- underlying types for *_t. ARM version.
2 Copyright (C) 2002-2023 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#define __RLIM_T_MATCHES_RLIM64_T 0
66#define __STATFS_MATCHES_STATFS64 0
67/* And for getitimer, setitimer and rusage */
68#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
69
70/* Number of descriptors that can fit in an `fd_set'. */
71#define __FD_SETSIZE 1024
72
73
74#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. ARM VFP version.
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/ARM version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -200,8 +200,12 @@ enum __ptrace_request
200200#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
201201
202202 /* Get information about system call. */
203 PTRACE_GET_SYSCALL_INFO = 0x420e
203 PTRACE_GET_SYSCALL_INFO = 0x420e,
204204#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
205
206 /* Get rseq configuration information. */
207 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
208#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
205209};
206210
207211
lib/libc/include/armeb-linux-gnueabihf/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/armeb-linux-gnueabihf/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/fcntl.h+1-2
......@@ -1,7 +1,6 @@
11/* O_*, F_*, FD_* bit values for the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/csky-linux-gnueabi/bits/fenv.h+1-1
......@@ -1,5 +1,5 @@
11/* Floating point environment. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/rseq.h created+29
......@@ -0,0 +1,29 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2023 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/setjmp.h+1-1
......@@ -1,5 +1,5 @@
11/* Define the machine-dependent type `jmp_buf'. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/bits/struct_stat.h+19-11
......@@ -1,5 +1,5 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Definition for struct stat. Linux/csky version.
2 Copyright (C) 2020-2023 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
......@@ -43,6 +43,9 @@
4343
4444struct stat
4545 {
46#ifdef __USE_TIME_BITS64
47# include <bits/struct_stat_time64_helper.h>
48#else
4649 __dev_t st_dev; /* Device. */
4750 __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */
4851 __mode_t st_mode; /* File mode. */
......@@ -55,7 +58,7 @@ struct stat
5558 __blksize_t st_blksize; /* Optimal block size for I/O. */
5659 int __pad2;
5760 __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */
58#ifdef __USE_XOPEN2K8
61# ifdef __USE_XOPEN2K8
5962 /* Nanosecond resolution timestamps are stored in a format
6063 equivalent to 'struct timespec'. This is the type used
6164 whenever possible but the Unix namespace rules do not allow the
......@@ -65,18 +68,19 @@ struct stat
6568 struct timespec st_atim; /* Time of last access. */
6669 struct timespec st_mtim; /* Time of last modification. */
6770 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
71# define st_atime st_atim.tv_sec /* Backward compatibility. */
72# define st_mtime st_mtim.tv_sec
73# define st_ctime st_ctim.tv_sec
74# else
7275 __time_t st_atime; /* Time of last access. */
7376 unsigned long int st_atimensec; /* Nscecs of last access. */
7477 __time_t st_mtime; /* Time of last modification. */
7578 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7679 __time_t st_ctime; /* Time of last status change. */
7780 unsigned long int st_ctimensec; /* Nsecs of last status change. */
78#endif
81# endif
7982 int __glibc_reserved[2];
83#endif
8084 };
8185
8286#undef __field64
......@@ -84,6 +88,9 @@ struct stat
8488#ifdef __USE_LARGEFILE64
8589struct stat64
8690 {
91# ifdef __USE_TIME_BITS64
92# include <bits/struct_stat_time64_helper.h>
93# else
8794 __dev_t st_dev; /* Device. */
8895 __ino64_t st_ino; /* File serial number. */
8996 __mode_t st_mode; /* File mode. */
......@@ -96,7 +103,7 @@ struct stat64
96103 __blksize_t st_blksize; /* Optimal block size for I/O. */
97104 int __pad2;
98105 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
99#ifdef __USE_XOPEN2K8
106# ifdef __USE_XOPEN2K8
100107 /* Nanosecond resolution timestamps are stored in a format
101108 equivalent to 'struct timespec'. This is the type used
102109 whenever possible but the Unix namespace rules do not allow the
......@@ -106,15 +113,16 @@ struct stat64
106113 struct timespec st_atim; /* Time of last access. */
107114 struct timespec st_mtim; /* Time of last modification. */
108115 struct timespec st_ctim; /* Time of last status change. */
109#else
116# else
110117 __time_t st_atime; /* Time of last access. */
111118 unsigned long int st_atimensec; /* Nscecs of last access. */
112119 __time_t st_mtime; /* Time of last modification. */
113120 unsigned long int st_mtimensec; /* Nsecs of last modification. */
114121 __time_t st_ctime; /* Time of last status change. */
115122 unsigned long int st_ctimensec; /* Nsecs of last status change. */
116#endif
123# endif
117124 int __glibc_reserved[2];
125# endif
118126 };
119127#endif
120128
lib/libc/include/csky-linux-gnueabi/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/csky.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/csky-linux-gnueabi/bits/typesizes.h+1-2
......@@ -1,7 +1,6 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/csky-linux-gnueabi/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word bits. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h-2
......@@ -22,8 +22,6 @@
2222#define LIBNSS_FILES_SO "libnss_files.so.2"
2323#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2424#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2725#define LIBPTHREAD_SO "libpthread.so.0"
2826#define LIBRESOLV_SO "libresolv.so.2"
2927#define LIBRT_SO "librt.so.1"
lib/libc/include/csky-linux-gnueabi/sys/cachectl.h+1-1
......@@ -1,5 +1,5 @@
11/* C-SKY cache flushing interface.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/sys/ucontext.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ucontext definition, C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabi/sys/user.h+1-1
......@@ -1,6 +1,6 @@
11/* This file is not used by C-SKY GDB. ptrace can use pt_regs definition
22 from linux kernel directly.
3 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3 Copyright (C) 2018-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/fcntl.h+1-2
......@@ -1,7 +1,6 @@
11/* O_*, F_*, FD_* bit values for the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/csky-linux-gnueabihf/bits/fenv.h+1-1
......@@ -1,5 +1,5 @@
11/* Floating point environment. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/rseq.h created+29
......@@ -0,0 +1,29 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2023 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/setjmp.h+1-1
......@@ -1,5 +1,5 @@
11/* Define the machine-dependent type `jmp_buf'. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/bits/struct_stat.h+19-11
......@@ -1,5 +1,5 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Definition for struct stat. Linux/csky version.
2 Copyright (C) 2020-2023 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
......@@ -43,6 +43,9 @@
4343
4444struct stat
4545 {
46#ifdef __USE_TIME_BITS64
47# include <bits/struct_stat_time64_helper.h>
48#else
4649 __dev_t st_dev; /* Device. */
4750 __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */
4851 __mode_t st_mode; /* File mode. */
......@@ -55,7 +58,7 @@ struct stat
5558 __blksize_t st_blksize; /* Optimal block size for I/O. */
5659 int __pad2;
5760 __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */
58#ifdef __USE_XOPEN2K8
61# ifdef __USE_XOPEN2K8
5962 /* Nanosecond resolution timestamps are stored in a format
6063 equivalent to 'struct timespec'. This is the type used
6164 whenever possible but the Unix namespace rules do not allow the
......@@ -65,18 +68,19 @@ struct stat
6568 struct timespec st_atim; /* Time of last access. */
6669 struct timespec st_mtim; /* Time of last modification. */
6770 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
71# define st_atime st_atim.tv_sec /* Backward compatibility. */
72# define st_mtime st_mtim.tv_sec
73# define st_ctime st_ctim.tv_sec
74# else
7275 __time_t st_atime; /* Time of last access. */
7376 unsigned long int st_atimensec; /* Nscecs of last access. */
7477 __time_t st_mtime; /* Time of last modification. */
7578 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7679 __time_t st_ctime; /* Time of last status change. */
7780 unsigned long int st_ctimensec; /* Nsecs of last status change. */
78#endif
81# endif
7982 int __glibc_reserved[2];
83#endif
8084 };
8185
8286#undef __field64
......@@ -84,6 +88,9 @@ struct stat
8488#ifdef __USE_LARGEFILE64
8589struct stat64
8690 {
91# ifdef __USE_TIME_BITS64
92# include <bits/struct_stat_time64_helper.h>
93# else
8794 __dev_t st_dev; /* Device. */
8895 __ino64_t st_ino; /* File serial number. */
8996 __mode_t st_mode; /* File mode. */
......@@ -96,7 +103,7 @@ struct stat64
96103 __blksize_t st_blksize; /* Optimal block size for I/O. */
97104 int __pad2;
98105 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
99#ifdef __USE_XOPEN2K8
106# ifdef __USE_XOPEN2K8
100107 /* Nanosecond resolution timestamps are stored in a format
101108 equivalent to 'struct timespec'. This is the type used
102109 whenever possible but the Unix namespace rules do not allow the
......@@ -106,15 +113,16 @@ struct stat64
106113 struct timespec st_atim; /* Time of last access. */
107114 struct timespec st_mtim; /* Time of last modification. */
108115 struct timespec st_ctim; /* Time of last status change. */
109#else
116# else
110117 __time_t st_atime; /* Time of last access. */
111118 unsigned long int st_atimensec; /* Nscecs of last access. */
112119 __time_t st_mtime; /* Time of last modification. */
113120 unsigned long int st_mtimensec; /* Nsecs of last modification. */
114121 __time_t st_ctime; /* Time of last status change. */
115122 unsigned long int st_ctimensec; /* Nsecs of last status change. */
116#endif
123# endif
117124 int __glibc_reserved[2];
125# endif
118126 };
119127#endif
120128
lib/libc/include/csky-linux-gnueabihf/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/csky.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/csky-linux-gnueabihf/bits/typesizes.h+1-2
......@@ -1,7 +1,6 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word bits. C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h-2
......@@ -22,8 +22,6 @@
2222#define LIBNSS_FILES_SO "libnss_files.so.2"
2323#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2424#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2725#define LIBPTHREAD_SO "libpthread.so.0"
2826#define LIBRESOLV_SO "libresolv.so.2"
2927#define LIBRT_SO "librt.so.1"
lib/libc/include/csky-linux-gnueabihf/sys/cachectl.h+1-1
......@@ -1,5 +1,5 @@
11/* C-SKY cache flushing interface.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/sys/ucontext.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ucontext definition, C-SKY version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/csky-linux-gnueabihf/sys/user.h+1-1
......@@ -1,6 +1,6 @@
11/* This file is not used by C-SKY GDB. ptrace can use pt_regs definition
22 from linux kernel directly.
3 Copyright (C) 2018-2021 Free Software Foundation, Inc.
3 Copyright (C) 2018-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/aio.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -168,7 +168,7 @@ extern int aio_suspend (const struct aiocb *const __list[], int __nent,
168168 const struct timespec *__restrict __timeout)
169169 __nonnull ((1));
170170
171/* Force all operations associated with file desriptor described by
171/* Force all operations associated with file descriptor described by
172172 `aio_fildes' member of AIOCBP. */
173173extern int aio_fsync (int __operation, struct aiocb *__aiocbp)
174174 __THROW __nonnull ((2));
lib/libc/include/generic-glibc/aliases.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/alloca.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/ar.h+1-1
......@@ -1,5 +1,5 @@
11/* Header describing `ar' archive file format.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/argp.h+1-1
......@@ -1,5 +1,5 @@
11/* Hierarchical argument parsing, layered over getopt.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Written by Miles Bader <miles@gnu.ai.mit.edu>.
55
lib/libc/include/generic-glibc/argz.h+1-1
......@@ -1,5 +1,5 @@
11/* Routines for dealing with '\0' separated arg vectors.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/arpa/inet.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -78,7 +78,7 @@ extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW
7878 __attribute_deprecated_msg__ ("Use inet_ntop instead");
7979
8080/* Convert network number for interface type AF in buffer starting at
81 CP to presentation format. The result will specifiy BITS bits of
81 CP to presentation format. The result will specify BITS bits of
8282 the number. */
8383extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
8484 char *__buf, size_t __len) __THROW;
lib/libc/include/generic-glibc/arpa/nameser_compat.h+2-2
......@@ -44,7 +44,7 @@ typedef struct {
4444 /* fields in third byte */
4545 unsigned qr: 1; /*%< response flag */
4646 unsigned opcode: 4; /*%< purpose of message */
47 unsigned aa: 1; /*%< authoritive answer */
47 unsigned aa: 1; /*%< authoritative answer */
4848 unsigned tc: 1; /*%< truncated message */
4949 unsigned rd: 1; /*%< recursion desired */
5050 /* fields in fourth byte */
......@@ -58,7 +58,7 @@ typedef struct {
5858 /* fields in third byte */
5959 unsigned rd :1; /*%< recursion desired */
6060 unsigned tc :1; /*%< truncated message */
61 unsigned aa :1; /*%< authoritive answer */
61 unsigned aa :1; /*%< authoritative answer */
6262 unsigned opcode :4; /*%< purpose of message */
6363 unsigned qr :1; /*%< response flag */
6464 /* fields in fourth byte */
lib/libc/include/generic-glibc/assert.h+18-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -86,10 +86,21 @@ __END_DECLS
8686 parentheses around EXPR. Otherwise, those added parentheses would
8787 suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
8888# if defined __cplusplus
89# if defined __has_builtin
90# if __has_builtin (__builtin_FILE)
91# define __ASSERT_FILE __builtin_FILE ()
92# define __ASSERT_LINE __builtin_LINE ()
93# endif
94# endif
95# if !defined __ASSERT_FILE
96# define __ASSERT_FILE __FILE__
97# define __ASSERT_LINE __LINE__
98# endif
8999# define assert(expr) \
90100 (static_cast <bool> (expr) \
91101 ? void (0) \
92 : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
102 : __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \
103 __ASSERT_FUNCTION))
93104# elif !defined __GNUC__ || defined __STRICT_ANSI__
94105# define assert(expr) \
95106 ((expr) \
......@@ -135,7 +146,11 @@ __END_DECLS
135146#endif /* NDEBUG. */
136147
137148
138#if defined __USE_ISOC11 && !defined __cplusplus
149#if (defined __USE_ISOC11 \
150 && (!defined __STDC_VERSION__ \
151 || __STDC_VERSION__ <= 201710L \
152 || !__GNUC_PREREQ (13, 0)) \
153 && !defined __cplusplus)
139154# undef static_assert
140155# define static_assert _Static_assert
141156#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/argp-ldbl.h+1-1
......@@ -1,5 +1,5 @@
11/* Redirections for argp functions for -mlong-double-64.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/atomic_wide_counter.h created+35
......@@ -0,0 +1,35 @@
1/* Monotonically increasing wide counters (at least 62 bits).
2 Copyright (C) 2016-2023 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_ATOMIC_WIDE_COUNTER_H
20#define _BITS_ATOMIC_WIDE_COUNTER_H
21
22/* Counter that is monotonically increasing (by less than 2**31 per
23 increment), with a single writer, and an arbitrary number of
24 readers. */
25typedef union
26{
27 __extension__ unsigned long long int __value64;
28 struct
29 {
30 unsigned int __low;
31 unsigned int __high;
32 } __value32;
33} __atomic_wide_counter;
34
35#endif /* _BITS_ATOMIC_WIDE_COUNTER_H */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/byteswap.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros and inline functions to swap the order of bytes in integer values.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/cmathcalls.h+1-1
......@@ -1,6 +1,6 @@
11/* Prototype declarations for complex math functions;
22 helper file for <complex.h>.
3 Copyright (C) 1997-2021 Free Software Foundation, Inc.
3 Copyright (C) 1997-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/confname.h+1-1
......@@ -1,5 +1,5 @@
11/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/cpu-set.h+1-1
......@@ -1,6 +1,6 @@
11/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
22 scheduling interface.
3 Copyright (C) 1996-2021 Free Software Foundation, Inc.
3 Copyright (C) 1996-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/dirent.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/dirent_ext.h+1-1
......@@ -1,5 +1,5 @@
11/* System-specific extensions of <dirent.h>. Linux version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/dl_find_object.h created+32
......@@ -0,0 +1,32 @@
1/* System dependent definitions for finding objects by address.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23/* This implementation does not have a dlfo_eh_dbase member in struct
24 dl_find_object. */
25#define DLFO_STRUCT_HAS_EH_DBASE 0
26
27/* This implementation does not have a dlfo_eh_count member in struct
28 dl_find_object. */
29#define DLFO_STRUCT_HAS_EH_COUNT 0
30
31/* The ELF segment which contains the exception handling data. */
32#define DLFO_EH_SEGMENT_TYPE PT_GNU_EH_FRAME
\ No newline at end of file
lib/libc/include/generic-glibc/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/endian.h+1-1
......@@ -1,5 +1,5 @@
11/* Endian macros for string.h functions
2 Copyright (C) 1992-2021 Free Software Foundation, Inc.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/epoll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/err-ldbl.h+1-1
......@@ -1,5 +1,5 @@
11/* Redirections for err.h functions for -mlong-double-64.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/error-ldbl.h+46-1
......@@ -1,5 +1,5 @@
11/* Redirections for error.h functions for -mlong-double-64.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -20,5 +20,50 @@
2020# error "Never include <bits/error-ldbl.h> directly; use <error.h> instead."
2121#endif
2222
23#if defined __extern_always_inline && defined __va_arg_pack
24extern void __REDIRECT_LDBL (__error_alias, (int __status, int __errnum,
25 const char *__format, ...), error)
26 __attribute__ ((__format__ (__printf__, 3, 4)));
27extern void __REDIRECT_LDBL (__error_noreturn, (int __status, int __errnum,
28 const char *__format, ...), error)
29 __attribute__ ((__noreturn__, __format__ (__printf__, 3, 4)));
30
31
32/* If we know the function will never return make sure the compiler
33 realizes that, too. */
34__extern_always_inline void
35error (int __status, int __errnum, const char *__format, ...)
36{
37 if (__builtin_constant_p (__status) && __status != 0)
38 __error_noreturn (__status, __errnum, __format, __va_arg_pack ());
39 else
40 __error_alias (__status, __errnum, __format, __va_arg_pack ());
41}
42
43
44extern void __REDIRECT_LDBL (__error_at_line_alias, (int __status, int __errnum,
45 const char *__fname, unsigned int __line,
46 const char *__format, ...), error_at_line)
47 __attribute__ ((__format__ (__printf__, 5, 6)));
48extern void __REDIRECT_LDBL (__error_at_line_noreturn, (int __status, int __errnum,
49 const char *__fname, unsigned int __line,
50 const char *__format, ...), error_at_line)
51 __attribute__ ((__noreturn__, __format__ (__printf__, 5, 6)));
52
53
54/* If we know the function will never return make sure the compiler
55 realizes that, too. */
56__extern_always_inline void
57error_at_line (int __status, int __errnum, const char *__fname,
58 unsigned int __line, const char *__format, ...)
59{
60 if (__builtin_constant_p (__status) && __status != 0)
61 __error_at_line_noreturn (__status, __errnum, __fname, __line, __format,
62 __va_arg_pack ());
63 else
64 __error_at_line_alias (__status, __errnum, __fname, __line,
65 __format, __va_arg_pack ());
66}
67#endif
2368__LDBL_REDIR_DECL (error)
2469__LDBL_REDIR_DECL (error_at_line)
\ No newline at end of file
lib/libc/include/generic-glibc/bits/error.h+1-1
......@@ -1,5 +1,5 @@
11/* Specializations for error functions.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc.
2 Copyright (C) 2007-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/fcntl-linux.h+2-2
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -101,7 +101,7 @@
101101#endif
102102
103103#ifndef F_GETLK
104# ifndef __USE_FILE_OFFSET64
104# if !defined __USE_FILE_OFFSET64 && __TIMESIZE != 64
105105# define F_GETLK 5 /* Get record locking info. */
106106# define F_SETLK 6 /* Set record locking info (non-blocking). */
107107# define F_SETLKW 7 /* Set record locking info (blocking). */
lib/libc/include/generic-glibc/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/fcntl2.h+1-1
......@@ -1,5 +1,5 @@
11/* Checking macros for fcntl functions.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc.
2 Copyright (C) 2007-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/floatn-common.h+21-21
......@@ -1,6 +1,6 @@
11/* Macros to control TS 18661-3 glibc features where the same
22 definitions are appropriate for all platforms.
3 Copyright (C) 2017-2021 Free Software Foundation, Inc.
3 Copyright (C) 2017-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -78,7 +78,7 @@
7878 or _FloatNx types, if __HAVE_<type> is 1. The corresponding
7979 literal suffixes exist since GCC 7, for C only. */
8080# if __HAVE_FLOAT16
81# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
81# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8282/* No corresponding suffix available for this type. */
8383# define __f16(x) ((_Float16) x##f)
8484# else
......@@ -87,7 +87,7 @@
8787# endif
8888
8989# if __HAVE_FLOAT32
90# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
90# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
9191# define __f32(x) x##f
9292# else
9393# define __f32(x) x##f32
......@@ -95,7 +95,7 @@
9595# endif
9696
9797# if __HAVE_FLOAT64
98# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
98# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
9999# ifdef __NO_LONG_DOUBLE_MATH
100100# define __f64(x) x##l
101101# else
......@@ -107,7 +107,7 @@
107107# endif
108108
109109# if __HAVE_FLOAT32X
110# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
110# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
111111# define __f32x(x) x
112112# else
113113# define __f32x(x) x##f32x
......@@ -115,7 +115,7 @@
115115# endif
116116
117117# if __HAVE_FLOAT64X
118# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
118# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
119119# if __HAVE_FLOAT64X_LONG_DOUBLE
120120# define __f64x(x) x##l
121121# else
......@@ -127,7 +127,7 @@
127127# endif
128128
129129# if __HAVE_FLOAT128X
130# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
130# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
131131# error "_Float128X supported but no constant suffix"
132132# else
133133# define __f128x(x) x##f128x
......@@ -136,7 +136,7 @@
136136
137137/* Defined to a complex type if __HAVE_<type> is 1. */
138138# if __HAVE_FLOAT16
139# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
139# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
140140typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
141141# define __CFLOAT16 __cfloat16
142142# else
......@@ -145,7 +145,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
145145# endif
146146
147147# if __HAVE_FLOAT32
148# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
148# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
149149# define __CFLOAT32 _Complex float
150150# else
151151# define __CFLOAT32 _Complex _Float32
......@@ -153,7 +153,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
153153# endif
154154
155155# if __HAVE_FLOAT64
156# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
156# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
157157# ifdef __NO_LONG_DOUBLE_MATH
158158# define __CFLOAT64 _Complex long double
159159# else
......@@ -165,7 +165,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
165165# endif
166166
167167# if __HAVE_FLOAT32X
168# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
168# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
169169# define __CFLOAT32X _Complex double
170170# else
171171# define __CFLOAT32X _Complex _Float32x
......@@ -173,7 +173,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
173173# endif
174174
175175# if __HAVE_FLOAT64X
176# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
176# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
177177# if __HAVE_FLOAT64X_LONG_DOUBLE
178178# define __CFLOAT64X _Complex long double
179179# else
......@@ -185,7 +185,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
185185# endif
186186
187187# if __HAVE_FLOAT128X
188# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
188# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
189189# error "_Float128X supported but no complex type"
190190# else
191191# define __CFLOAT128X _Complex _Float128x
......@@ -195,7 +195,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
195195/* The remaining of this file provides support for older compilers. */
196196# if __HAVE_FLOAT16
197197
198# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
198# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
199199typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
200200# endif
201201
......@@ -210,7 +210,7 @@ typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
210210
211211# if __HAVE_FLOAT32
212212
213# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
213# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
214214typedef float _Float32;
215215# endif
216216
......@@ -234,7 +234,7 @@ typedef float _Float32;
234234
235235# ifdef __NO_LONG_DOUBLE_MATH
236236
237# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
237# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
238238typedef long double _Float64;
239239# endif
240240
......@@ -247,7 +247,7 @@ typedef long double _Float64;
247247
248248# else
249249
250# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
250# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
251251typedef double _Float64;
252252# endif
253253
......@@ -264,7 +264,7 @@ typedef double _Float64;
264264
265265# if __HAVE_FLOAT32X
266266
267# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
267# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
268268typedef double _Float32x;
269269# endif
270270
......@@ -281,7 +281,7 @@ typedef double _Float32x;
281281
282282# if __HAVE_FLOAT64X_LONG_DOUBLE
283283
284# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
284# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
285285typedef long double _Float64x;
286286# endif
287287
......@@ -294,7 +294,7 @@ typedef long double _Float64x;
294294
295295# else
296296
297# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
297# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
298298typedef _Float128 _Float64x;
299299# endif
300300
......@@ -311,7 +311,7 @@ typedef _Float128 _Float64x;
311311
312312# if __HAVE_FLOAT128X
313313
314# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
314# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
315315# error "_Float128x supported but no type"
316316# endif
317317
lib/libc/include/generic-glibc/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on MIPS platforms.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -55,7 +55,7 @@
5555/* Defined to concatenate the literal suffix to be used with _Float128
5656 types, if __HAVE_FLOAT128 is 1. */
5757# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
5959/* The literal suffix f128 exists only since GCC 7.0. */
6060# define __f128(x) x##l
6161# else
......@@ -65,7 +65,7 @@
6565
6666/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
6767# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6969# define __CFLOAT128 _Complex long double
7070# else
7171# define __CFLOAT128 _Complex _Float128
......@@ -76,7 +76,7 @@
7676# if __HAVE_FLOAT128
7777
7878/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8080typedef long double _Float128;
8181# endif
8282
lib/libc/include/generic-glibc/bits/flt-eval-method.h+4-6
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 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
......@@ -26,14 +26,12 @@
2626 -1. */
2727
2828/* In the default version of this header, follow __FLT_EVAL_METHOD__.
29 -1 is mapped to 2 (considering evaluation as long double to be a
30 conservatively safe assumption), and if __FLT_EVAL_METHOD__ is not
31 defined then assume there is no excess precision and use the value
32 0. */
29 If __FLT_EVAL_METHOD__ is not defined or set to -1, assume there is no
30 excess precision and use the value 0 (this is correct for most targets). */
3331
3432#ifdef __FLT_EVAL_METHOD__
3533# if __FLT_EVAL_METHOD__ == -1
36# define __GLIBC_FLT_EVAL_METHOD 2
34# define __GLIBC_FLT_EVAL_METHOD 0
3735# else
3836# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
3937# endif
lib/libc/include/generic-glibc/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/fp-logb.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/getopt_core.h+1-1
......@@ -1,5 +1,5 @@
11/* Declarations for getopt (basic, portable features only).
2 Copyright (C) 1989-2021 Free Software Foundation, Inc.
2 Copyright (C) 1989-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library and is also part of gnulib.
44 Patches to this file should be submitted to both projects.
55
lib/libc/include/generic-glibc/bits/getopt_ext.h+1-1
......@@ -1,5 +1,5 @@
11/* Declarations for getopt (GNU extensions).
2 Copyright (C) 1989-2021 Free Software Foundation, Inc.
2 Copyright (C) 1989-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library and is also part of gnulib.
44 Patches to this file should be submitted to both projects.
55
lib/libc/include/generic-glibc/bits/getopt_posix.h+1-1
......@@ -1,5 +1,5 @@
11/* Declarations for getopt (POSIX compatibility shim).
2 Copyright (C) 1989-2021 Free Software Foundation, Inc.
2 Copyright (C) 1989-2023 Free Software Foundation, Inc.
33 Unlike the bulk of the getopt implementation, this file is NOT part
44 of gnulib.
55
lib/libc/include/generic-glibc/bits/hwcap.h+1-1
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/in.h+2-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -128,6 +128,7 @@
128128#define IP_MSFILTER 41
129129#define IP_MULTICAST_ALL 49
130130#define IP_UNICAST_IF 50
131#define IP_LOCAL_PORT_RANGE 51
131132
132133/* To select the IP level. */
133134#define SOL_IP 0
......@@ -146,14 +147,6 @@ struct ip_opts
146147 char ip_opts[40]; /* Actually variable in size. */
147148 };
148149
149/* Like `struct ip_mreq' but including interface specification by index. */
150struct ip_mreqn
151 {
152 struct in_addr imr_multiaddr; /* IP multicast address of group */
153 struct in_addr imr_address; /* local IP address of interface */
154 int imr_ifindex; /* Interface index */
155 };
156
157150/* Structure used for IP_PKTINFO. */
158151struct in_pktinfo
159152 {
lib/libc/include/generic-glibc/bits/indirect-return.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. Generic version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ioctls.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ipc-perm.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ipc_perm definition.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ipc.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/libc-header-start.h+1-1
......@@ -1,5 +1,5 @@
11/* Handle feature test macros at the start of a header.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h+232-1
......@@ -1,5 +1,5 @@
11/* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 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
......@@ -98,4 +98,235 @@
9898#define __DECL_SIMD_powf32x
9999#define __DECL_SIMD_powf64x
100100#define __DECL_SIMD_powf128x
101
102#define __DECL_SIMD_acos
103#define __DECL_SIMD_acosf
104#define __DECL_SIMD_acosl
105#define __DECL_SIMD_acosf16
106#define __DECL_SIMD_acosf32
107#define __DECL_SIMD_acosf64
108#define __DECL_SIMD_acosf128
109#define __DECL_SIMD_acosf32x
110#define __DECL_SIMD_acosf64x
111#define __DECL_SIMD_acosf128x
112
113#define __DECL_SIMD_atan
114#define __DECL_SIMD_atanf
115#define __DECL_SIMD_atanl
116#define __DECL_SIMD_atanf16
117#define __DECL_SIMD_atanf32
118#define __DECL_SIMD_atanf64
119#define __DECL_SIMD_atanf128
120#define __DECL_SIMD_atanf32x
121#define __DECL_SIMD_atanf64x
122#define __DECL_SIMD_atanf128x
123
124#define __DECL_SIMD_asin
125#define __DECL_SIMD_asinf
126#define __DECL_SIMD_asinl
127#define __DECL_SIMD_asinf16
128#define __DECL_SIMD_asinf32
129#define __DECL_SIMD_asinf64
130#define __DECL_SIMD_asinf128
131#define __DECL_SIMD_asinf32x
132#define __DECL_SIMD_asinf64x
133#define __DECL_SIMD_asinf128x
134
135#define __DECL_SIMD_hypot
136#define __DECL_SIMD_hypotf
137#define __DECL_SIMD_hypotl
138#define __DECL_SIMD_hypotf16
139#define __DECL_SIMD_hypotf32
140#define __DECL_SIMD_hypotf64
141#define __DECL_SIMD_hypotf128
142#define __DECL_SIMD_hypotf32x
143#define __DECL_SIMD_hypotf64x
144#define __DECL_SIMD_hypotf128x
145
146#define __DECL_SIMD_exp2
147#define __DECL_SIMD_exp2f
148#define __DECL_SIMD_exp2l
149#define __DECL_SIMD_exp2f16
150#define __DECL_SIMD_exp2f32
151#define __DECL_SIMD_exp2f64
152#define __DECL_SIMD_exp2f128
153#define __DECL_SIMD_exp2f32x
154#define __DECL_SIMD_exp2f64x
155#define __DECL_SIMD_exp2f128x
156
157#define __DECL_SIMD_exp10
158#define __DECL_SIMD_exp10f
159#define __DECL_SIMD_exp10l
160#define __DECL_SIMD_exp10f16
161#define __DECL_SIMD_exp10f32
162#define __DECL_SIMD_exp10f64
163#define __DECL_SIMD_exp10f128
164#define __DECL_SIMD_exp10f32x
165#define __DECL_SIMD_exp10f64x
166#define __DECL_SIMD_exp10f128x
167
168#define __DECL_SIMD_cosh
169#define __DECL_SIMD_coshf
170#define __DECL_SIMD_coshl
171#define __DECL_SIMD_coshf16
172#define __DECL_SIMD_coshf32
173#define __DECL_SIMD_coshf64
174#define __DECL_SIMD_coshf128
175#define __DECL_SIMD_coshf32x
176#define __DECL_SIMD_coshf64x
177#define __DECL_SIMD_coshf128x
178
179#define __DECL_SIMD_expm1
180#define __DECL_SIMD_expm1f
181#define __DECL_SIMD_expm1l
182#define __DECL_SIMD_expm1f16
183#define __DECL_SIMD_expm1f32
184#define __DECL_SIMD_expm1f64
185#define __DECL_SIMD_expm1f128
186#define __DECL_SIMD_expm1f32x
187#define __DECL_SIMD_expm1f64x
188#define __DECL_SIMD_expm1f128x
189
190#define __DECL_SIMD_sinh
191#define __DECL_SIMD_sinhf
192#define __DECL_SIMD_sinhl
193#define __DECL_SIMD_sinhf16
194#define __DECL_SIMD_sinhf32
195#define __DECL_SIMD_sinhf64
196#define __DECL_SIMD_sinhf128
197#define __DECL_SIMD_sinhf32x
198#define __DECL_SIMD_sinhf64x
199#define __DECL_SIMD_sinhf128x
200
201#define __DECL_SIMD_cbrt
202#define __DECL_SIMD_cbrtf
203#define __DECL_SIMD_cbrtl
204#define __DECL_SIMD_cbrtf16
205#define __DECL_SIMD_cbrtf32
206#define __DECL_SIMD_cbrtf64
207#define __DECL_SIMD_cbrtf128
208#define __DECL_SIMD_cbrtf32x
209#define __DECL_SIMD_cbrtf64x
210#define __DECL_SIMD_cbrtf128x
211
212#define __DECL_SIMD_atan2
213#define __DECL_SIMD_atan2f
214#define __DECL_SIMD_atan2l
215#define __DECL_SIMD_atan2f16
216#define __DECL_SIMD_atan2f32
217#define __DECL_SIMD_atan2f64
218#define __DECL_SIMD_atan2f128
219#define __DECL_SIMD_atan2f32x
220#define __DECL_SIMD_atan2f64x
221#define __DECL_SIMD_atan2f128x
222
223#define __DECL_SIMD_log10
224#define __DECL_SIMD_log10f
225#define __DECL_SIMD_log10l
226#define __DECL_SIMD_log10f16
227#define __DECL_SIMD_log10f32
228#define __DECL_SIMD_log10f64
229#define __DECL_SIMD_log10f128
230#define __DECL_SIMD_log10f32x
231#define __DECL_SIMD_log10f64x
232#define __DECL_SIMD_log10f128x
233
234#define __DECL_SIMD_log2
235#define __DECL_SIMD_log2f
236#define __DECL_SIMD_log2l
237#define __DECL_SIMD_log2f16
238#define __DECL_SIMD_log2f32
239#define __DECL_SIMD_log2f64
240#define __DECL_SIMD_log2f128
241#define __DECL_SIMD_log2f32x
242#define __DECL_SIMD_log2f64x
243#define __DECL_SIMD_log2f128x
244
245#define __DECL_SIMD_log1p
246#define __DECL_SIMD_log1pf
247#define __DECL_SIMD_log1pl
248#define __DECL_SIMD_log1pf16
249#define __DECL_SIMD_log1pf32
250#define __DECL_SIMD_log1pf64
251#define __DECL_SIMD_log1pf128
252#define __DECL_SIMD_log1pf32x
253#define __DECL_SIMD_log1pf64x
254#define __DECL_SIMD_log1pf128x
255
256#define __DECL_SIMD_atanh
257#define __DECL_SIMD_atanhf
258#define __DECL_SIMD_atanhl
259#define __DECL_SIMD_atanhf16
260#define __DECL_SIMD_atanhf32
261#define __DECL_SIMD_atanhf64
262#define __DECL_SIMD_atanhf128
263#define __DECL_SIMD_atanhf32x
264#define __DECL_SIMD_atanhf64x
265#define __DECL_SIMD_atanhf128x
266
267#define __DECL_SIMD_acosh
268#define __DECL_SIMD_acoshf
269#define __DECL_SIMD_acoshl
270#define __DECL_SIMD_acoshf16
271#define __DECL_SIMD_acoshf32
272#define __DECL_SIMD_acoshf64
273#define __DECL_SIMD_acoshf128
274#define __DECL_SIMD_acoshf32x
275#define __DECL_SIMD_acoshf64x
276#define __DECL_SIMD_acoshf128x
277
278#define __DECL_SIMD_erf
279#define __DECL_SIMD_erff
280#define __DECL_SIMD_erfl
281#define __DECL_SIMD_erff16
282#define __DECL_SIMD_erff32
283#define __DECL_SIMD_erff64
284#define __DECL_SIMD_erff128
285#define __DECL_SIMD_erff32x
286#define __DECL_SIMD_erff64x
287#define __DECL_SIMD_erff128x
288
289#define __DECL_SIMD_tanh
290#define __DECL_SIMD_tanhf
291#define __DECL_SIMD_tanhl
292#define __DECL_SIMD_tanhf16
293#define __DECL_SIMD_tanhf32
294#define __DECL_SIMD_tanhf64
295#define __DECL_SIMD_tanhf128
296#define __DECL_SIMD_tanhf32x
297#define __DECL_SIMD_tanhf64x
298#define __DECL_SIMD_tanhf128x
299
300#define __DECL_SIMD_asinh
301#define __DECL_SIMD_asinhf
302#define __DECL_SIMD_asinhl
303#define __DECL_SIMD_asinhf16
304#define __DECL_SIMD_asinhf32
305#define __DECL_SIMD_asinhf64
306#define __DECL_SIMD_asinhf128
307#define __DECL_SIMD_asinhf32x
308#define __DECL_SIMD_asinhf64x
309#define __DECL_SIMD_asinhf128x
310
311#define __DECL_SIMD_erfc
312#define __DECL_SIMD_erfcf
313#define __DECL_SIMD_erfcl
314#define __DECL_SIMD_erfcf16
315#define __DECL_SIMD_erfcf32
316#define __DECL_SIMD_erfcf64
317#define __DECL_SIMD_erfcf128
318#define __DECL_SIMD_erfcf32x
319#define __DECL_SIMD_erfcf64x
320#define __DECL_SIMD_erfcf128x
321
322#define __DECL_SIMD_tan
323#define __DECL_SIMD_tanf
324#define __DECL_SIMD_tanl
325#define __DECL_SIMD_tanf16
326#define __DECL_SIMD_tanf32
327#define __DECL_SIMD_tanf64
328#define __DECL_SIMD_tanf128
329#define __DECL_SIMD_tanf32x
330#define __DECL_SIMD_tanf64x
331#define __DECL_SIMD_tanf128x
101332#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/link.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -46,7 +46,7 @@ typedef struct La_mips_32_retval
4646typedef struct La_mips_64_regs
4747{
4848 uint64_t lr_reg[8]; /* $a0 through $a7 */
49 double lr_fpreg[8]; /* $f12 throgh $f19 */
49 double lr_fpreg[8]; /* $f12 through $f19 */
5050 uint64_t lr_ra;
5151 uint64_t lr_sp;
5252} La_mips_64_regs;
lib/libc/include/generic-glibc/bits/link_lavcurrent.h created+25
......@@ -0,0 +1,25 @@
1/* Data structure for communication from the run-time dynamic linker for
2 loaded ELF shared objects. LAV_CURRENT definition.
3 Copyright (C) 2021-2023 Free Software Foundation, Inc.
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 _LINK_H
21# error "Never include <bits/link_lavcurrent.h> directly; use <link.h> instead."
22#endif
23
24/* Version numbers for la_version handshake interface. */
25#define LAV_CURRENT 2
\ No newline at end of file
lib/libc/include/generic-glibc/bits/local_lim.h+2-2
......@@ -1,5 +1,5 @@
11/* Minimum guaranteed maximum values for system limits. Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 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
......@@ -73,7 +73,7 @@
7373/* We have no predefined limit on the number of threads. */
7474#undef PTHREAD_THREADS_MAX
7575
76/* Maximum amount by which a process can descrease its asynchronous I/O
76/* Maximum amount by which a process can decrease its asynchronous I/O
7777 priority level. */
7878#define AIO_PRIO_DELTA_MAX 20
7979
lib/libc/include/generic-glibc/bits/locale.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of locale category symbol values.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. MIPS version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/math-vector.h+1-1
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h+1-1
......@@ -1,5 +1,5 @@
11/* Prototype declarations for math classification macros helpers.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/mathcalls-narrow.h+7-1
......@@ -1,5 +1,5 @@
11/* Declare functions returning a narrower type.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 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
......@@ -26,8 +26,14 @@ __MATHCALL_NARROW (__MATHCALL_NAME (add), __MATHCALL_REDIR_NAME (add), 2);
2626/* Divide. */
2727__MATHCALL_NARROW (__MATHCALL_NAME (div), __MATHCALL_REDIR_NAME (div), 2);
2828
29/* Fused multiply-add. */
30__MATHCALL_NARROW (__MATHCALL_NAME (fma), __MATHCALL_REDIR_NAME2 (fma), 3);
31
2932/* Multiply. */
3033__MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2);
3134
35/* Square root. */
36__MATHCALL_NARROW (__MATHCALL_NAME (sqrt), __MATHCALL_REDIR_NAME2 (sqrt), 1);
37
3238/* Subtract. */
3339__MATHCALL_NARROW (__MATHCALL_NAME (sub), __MATHCALL_REDIR_NAME (sub), 2);
\ No newline at end of file
lib/libc/include/generic-glibc/bits/mathcalls.h+51-23
......@@ -1,5 +1,5 @@
11/* Prototype declarations for math functions; helper file for <math.h>.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 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
......@@ -50,29 +50,29 @@
5050/* Trigonometric functions. */
5151
5252/* Arc cosine of X. */
53__MATHCALL (acos,, (_Mdouble_ __x));
53__MATHCALL_VEC (acos,, (_Mdouble_ __x));
5454/* Arc sine of X. */
55__MATHCALL (asin,, (_Mdouble_ __x));
55__MATHCALL_VEC (asin,, (_Mdouble_ __x));
5656/* Arc tangent of X. */
57__MATHCALL (atan,, (_Mdouble_ __x));
57__MATHCALL_VEC (atan,, (_Mdouble_ __x));
5858/* Arc tangent of Y/X. */
59__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
59__MATHCALL_VEC (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
6060
6161/* Cosine of X. */
6262__MATHCALL_VEC (cos,, (_Mdouble_ __x));
6363/* Sine of X. */
6464__MATHCALL_VEC (sin,, (_Mdouble_ __x));
6565/* Tangent of X. */
66__MATHCALL (tan,, (_Mdouble_ __x));
66__MATHCALL_VEC (tan,, (_Mdouble_ __x));
6767
6868/* Hyperbolic functions. */
6969
7070/* Hyperbolic cosine of X. */
71__MATHCALL (cosh,, (_Mdouble_ __x));
71__MATHCALL_VEC (cosh,, (_Mdouble_ __x));
7272/* Hyperbolic sine of X. */
73__MATHCALL (sinh,, (_Mdouble_ __x));
73__MATHCALL_VEC (sinh,, (_Mdouble_ __x));
7474/* Hyperbolic tangent of X. */
75__MATHCALL (tanh,, (_Mdouble_ __x));
75__MATHCALL_VEC (tanh,, (_Mdouble_ __x));
7676
7777#ifdef __USE_GNU
7878/* Cosine and sine of X. */
......@@ -82,11 +82,11 @@ __MATHDECL_VEC (void,sincos,,
8282
8383#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
8484/* Hyperbolic arc cosine of X. */
85__MATHCALL (acosh,, (_Mdouble_ __x));
85__MATHCALL_VEC (acosh,, (_Mdouble_ __x));
8686/* Hyperbolic arc sine of X. */
87__MATHCALL (asinh,, (_Mdouble_ __x));
87__MATHCALL_VEC (asinh,, (_Mdouble_ __x));
8888/* Hyperbolic arc tangent of X. */
89__MATHCALL (atanh,, (_Mdouble_ __x));
89__MATHCALL_VEC (atanh,, (_Mdouble_ __x));
9090#endif
9191
9292/* Exponential and logarithmic functions. */
......@@ -104,22 +104,22 @@ __MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent));
104104__MATHCALL_VEC (log,, (_Mdouble_ __x));
105105
106106/* Base-ten logarithm of X. */
107__MATHCALL (log10,, (_Mdouble_ __x));
107__MATHCALL_VEC (log10,, (_Mdouble_ __x));
108108
109109/* Break VALUE into integral and fractional parts. */
110110__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
111111
112112#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
113113/* Compute exponent to base ten. */
114__MATHCALL (exp10,, (_Mdouble_ __x));
114__MATHCALL_VEC (exp10,, (_Mdouble_ __x));
115115#endif
116116
117117#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
118118/* Return exp(X) - 1. */
119__MATHCALL (expm1,, (_Mdouble_ __x));
119__MATHCALL_VEC (expm1,, (_Mdouble_ __x));
120120
121121/* Return log(1 + X). */
122__MATHCALL (log1p,, (_Mdouble_ __x));
122__MATHCALL_VEC (log1p,, (_Mdouble_ __x));
123123
124124/* Return the base 2 signed integral exponent of X. */
125125__MATHCALL (logb,, (_Mdouble_ __x));
......@@ -127,10 +127,10 @@ __MATHCALL (logb,, (_Mdouble_ __x));
127127
128128#ifdef __USE_ISOC99
129129/* Compute base-2 exponential of X. */
130__MATHCALL (exp2,, (_Mdouble_ __x));
130__MATHCALL_VEC (exp2,, (_Mdouble_ __x));
131131
132132/* Compute base-2 logarithm of X. */
133__MATHCALL (log2,, (_Mdouble_ __x));
133__MATHCALL_VEC (log2,, (_Mdouble_ __x));
134134#endif
135135
136136
......@@ -144,12 +144,12 @@ __MATHCALL (sqrt,, (_Mdouble_ __x));
144144
145145#if defined __USE_XOPEN || defined __USE_ISOC99
146146/* Return `sqrt(X*X + Y*Y)'. */
147__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
147__MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
148148#endif
149149
150150#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
151151/* Return the cube root of X. */
152__MATHCALL (cbrt,, (_Mdouble_ __x));
152__MATHCALL_VEC (cbrt,, (_Mdouble_ __x));
153153#endif
154154
155155
......@@ -228,8 +228,8 @@ __MATHCALL (yn,, (int, _Mdouble_));
228228
229229#if defined __USE_XOPEN || defined __USE_ISOC99
230230/* Error and gamma functions. */
231__MATHCALL (erf,, (_Mdouble_));
232__MATHCALL (erfc,, (_Mdouble_));
231__MATHCALL_VEC (erf,, (_Mdouble_));
232__MATHCALL_VEC (erfc,, (_Mdouble_));
233233__MATHCALL (lgamma,, (_Mdouble_));
234234#endif
235235
......@@ -271,7 +271,7 @@ __MATHCALL (nextdown,, (_Mdouble_ __x));
271271__MATHCALL (nextup,, (_Mdouble_ __x));
272272# endif
273273
274/* Return the remainder of integer divison X / Y with infinite precision. */
274/* Return the remainder of integer division X / Y with infinite precision. */
275275__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
276276
277277# ifdef __USE_ISOC99
......@@ -328,11 +328,13 @@ __MATHDECL (long long int,llround,, (_Mdouble_ __x));
328328/* Return positive difference between X and Y. */
329329__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
330330
331# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC2X)
331332/* Return maximum numeric value from X and Y. */
332333__MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
333334
334335/* Return minimum numeric value from X and Y. */
335336__MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
337# endif
336338
337339/* Multiply-add function computed as a ternary operation. */
338340__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
......@@ -378,6 +380,32 @@ __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
378380__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
379381#endif
380382
383#if __GLIBC_USE (ISOC2X)
384/* Return maximum value from X and Y. */
385__MATHCALLX (fmaximum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
386
387/* Return minimum value from X and Y. */
388__MATHCALLX (fminimum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
389
390/* Return maximum numeric value from X and Y. */
391__MATHCALLX (fmaximum_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
392
393/* Return minimum numeric value from X and Y. */
394__MATHCALLX (fminimum_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
395
396/* Return value with maximum magnitude. */
397__MATHCALLX (fmaximum_mag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
398
399/* Return value with minimum magnitude. */
400__MATHCALLX (fminimum_mag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
401
402/* Return numeric value with maximum magnitude. */
403__MATHCALLX (fmaximum_mag_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
404
405/* Return numeric value with minimum magnitude. */
406__MATHCALLX (fminimum_mag_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
407#endif
408
381409#if __GLIBC_USE (IEC_60559_EXT) || __MATH_DECLARING_FLOATN
382410/* Total order operation. */
383411__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,
lib/libc/include/generic-glibc/bits/mathdef.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/mman-linux.h+20-17
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux generic version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -41,26 +41,22 @@
4141/* Sharing types (must choose one and only one of these). */
4242#define MAP_SHARED 0x01 /* Share changes. */
4343#define MAP_PRIVATE 0x02 /* Changes are private. */
44#ifdef __USE_MISC
45# define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate
44#define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate
4645 extension flags. */
47# define MAP_TYPE 0x0f /* Mask for type of mapping. */
48#endif
46#define MAP_TYPE 0x0f /* Mask for type of mapping. */
4947
5048/* Other flags. */
5149#define MAP_FIXED 0x10 /* Interpret addr exactly. */
52#ifdef __USE_MISC
53# define MAP_FILE 0
54# ifdef __MAP_ANONYMOUS
55# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */
56# else
57# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
58# endif
59# define MAP_ANON MAP_ANONYMOUS
60/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
61# define MAP_HUGE_SHIFT 26
62# define MAP_HUGE_MASK 0x3f
50#define MAP_FILE 0
51#ifdef __MAP_ANONYMOUS
52# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */
53#else
54# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
6355#endif
56#define MAP_ANON MAP_ANONYMOUS
57/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
58#define MAP_HUGE_SHIFT 26
59#define MAP_HUGE_MASK 0x3f
6460
6561/* Flags to `msync'. */
6662#define MS_ASYNC 1 /* Sync memory asynchronously. */
......@@ -82,13 +78,20 @@
8278# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
8379# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
8480# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
85# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
81# define MADV_DONTDUMP 16 /* Explicitly exclude from the core dump,
8682 overrides the coredump filter bits. */
8783# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
8884# define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */
8985# define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */
9086# define MADV_COLD 20 /* Deactivate these pages. */
9187# define MADV_PAGEOUT 21 /* Reclaim these pages. */
88# define MADV_POPULATE_READ 22 /* Populate (prefault) page tables
89 readable. */
90# define MADV_POPULATE_WRITE 23 /* Populate (prefault) page tables
91 writable. */
92# define MADV_DONTNEED_LOCKED 24 /* Like MADV_DONTNEED, but drop
93 locked pages too. */
94# define MADV_COLLAPSE 25 /* Synchronous hugepage collapse. */
9295# define MADV_HWPOISON 100 /* Poison a page for testing. */
9396#endif
9497
lib/libc/include/generic-glibc/bits/mman-map-flags-generic.h+13-15
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/generic version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -25,18 +25,16 @@
2525 includes asm-generic/mman.h without any changes to the values of
2626 the MAP_* flags defined in that header. */
2727
28#ifdef __USE_MISC
29# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
30# define MAP_DENYWRITE 0x00800 /* ETXTBSY. */
31# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
32# define MAP_LOCKED 0x02000 /* Lock the mapping. */
33# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
34# define MAP_POPULATE 0x08000 /* 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
28#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
29#define MAP_DENYWRITE 0x00800 /* ETXTBSY. */
30#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
31#define MAP_LOCKED 0x02000 /* Lock the mapping. */
32#define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
33#define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
34#define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
35#define MAP_STACK 0x20000 /* Allocation is for a stack. */
36#define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
37#define MAP_SYNC 0x80000 /* Perform synchronous page
3938 faults for the mapping. */
40# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
41 underlying mapping. */
42#endif
\ No newline at end of file
39#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
40 underlying mapping. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/mman-shared.h+5-1
......@@ -1,5 +1,5 @@
11/* Memory-mapping-related declarations/definitions, not architecture-specific.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -32,6 +32,10 @@
3232# define MFD_ALLOW_SEALING 2U
3333# define MFD_HUGETLB 4U
3434# endif
35# ifndef MFD_NOEXEC_SEAL
36# define MFD_NOEXEC_SEAL 8U
37# define MFD_EXEC 0x10U
38# endif
3539
3640/* Flags for mlock2. */
3741# ifndef MLOCK_ONFAULT
lib/libc/include/generic-glibc/bits/mman.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/generic version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/mman_ext.h created+32
......@@ -0,0 +1,32 @@
1/* System-specific extensions of <sys/mman.h>, Linux version.
2 Copyright (C) 2022-2023 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 include <bits/mman_ext.h> directly; use <sys/mman.h> instead."
21#endif
22
23#ifdef __USE_GNU
24struct iovec;
25extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov,
26 size_t __count, int __advice,
27 unsigned __flags)
28 __THROW;
29
30extern int process_mrelease (int pidfd, unsigned int flags) __THROW;
31
32#endif /* __USE_GNU */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/monetary-ldbl.h+1-1
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for monetary functions.
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/mqueue.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/mqueue2.h+1-1
......@@ -1,5 +1,5 @@
11/* Checking macros for mq functions.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc.
2 Copyright (C) 2007-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/msq.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/netdb.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/param.h+1-1
......@@ -1,5 +1,5 @@
11/* Old-style Unix parameters and limits. Linux version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/platform/x86.h+25-7
......@@ -1,6 +1,6 @@
11/* Constants and data structures for x86 CPU features.
22 This file is part of the GNU C Library.
3 Copyright (C) 2008-2020 Free Software Foundation, Inc.
3 Copyright (C) 2008-2023 Free Software Foundation, Inc.
44
55 The GNU C Library is free software; you can redistribute it and/or
66 modify it under the terms of the GNU Lesser General Public
......@@ -181,13 +181,13 @@ enum
181181 x86_cpu_AVX512_BITALG = x86_cpu_index_7_ecx + 12,
182182 x86_cpu_INDEX_7_ECX_13 = x86_cpu_index_7_ecx + 13,
183183 x86_cpu_AVX512_VPOPCNTDQ = x86_cpu_index_7_ecx + 14,
184 x86_cpu_INDEX_7_ECX_1 = x86_cpu_index_7_ecx + 15,
185 x86_cpu_INDEX_7_ECX_16 = x86_cpu_index_7_ecx + 16,
184 x86_cpu_INDEX_7_ECX_15 = x86_cpu_index_7_ecx + 15,
185 x86_cpu_LA57 = x86_cpu_index_7_ecx + 16,
186186/* Note: Bits 17-21: The value of MAWAU used by the BNDLDX and BNDSTX
187187 instructions in 64-bit mode. */
188188 x86_cpu_RDPID = x86_cpu_index_7_ecx + 22,
189189 x86_cpu_KL = x86_cpu_index_7_ecx + 23,
190 x86_cpu_INDEX_7_ECX_24 = x86_cpu_index_7_ecx + 24,
190 x86_cpu_BUS_LOCK_DETECT = x86_cpu_index_7_ecx + 24,
191191 x86_cpu_CLDEMOTE = x86_cpu_index_7_ecx + 25,
192192 x86_cpu_INDEX_7_ECX_26 = x86_cpu_index_7_ecx + 26,
193193 x86_cpu_MOVDIRI = x86_cpu_index_7_ecx + 27,
......@@ -201,7 +201,7 @@ enum
201201 + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
202202
203203 x86_cpu_INDEX_7_EDX_0 = x86_cpu_index_7_edx,
204 x86_cpu_INDEX_7_EDX_1 = x86_cpu_index_7_edx + 1,
204 x86_cpu_SGX_KEYS = x86_cpu_index_7_edx + 1,
205205 x86_cpu_AVX512_4VNNIW = x86_cpu_index_7_edx + 2,
206206 x86_cpu_AVX512_4FMAPS = x86_cpu_index_7_edx + 3,
207207 x86_cpu_FSRM = x86_cpu_index_7_edx + 4,
......@@ -213,13 +213,13 @@ enum
213213 x86_cpu_MD_CLEAR = x86_cpu_index_7_edx + 10,
214214 x86_cpu_RTM_ALWAYS_ABORT = x86_cpu_index_7_edx + 11,
215215 x86_cpu_INDEX_7_EDX_12 = x86_cpu_index_7_edx + 12,
216 x86_cpu_INDEX_7_EDX_13 = x86_cpu_index_7_edx + 13,
216 x86_cpu_RTM_FORCE_ABORT = x86_cpu_index_7_edx + 13,
217217 x86_cpu_SERIALIZE = x86_cpu_index_7_edx + 14,
218218 x86_cpu_HYBRID = x86_cpu_index_7_edx + 15,
219219 x86_cpu_TSXLDTRK = x86_cpu_index_7_edx + 16,
220220 x86_cpu_INDEX_7_EDX_17 = x86_cpu_index_7_edx + 17,
221221 x86_cpu_PCONFIG = x86_cpu_index_7_edx + 18,
222 x86_cpu_INDEX_7_EDX_19 = x86_cpu_index_7_edx + 19,
222 x86_cpu_LBR = x86_cpu_index_7_edx + 19,
223223 x86_cpu_IBT = x86_cpu_index_7_edx + 20,
224224 x86_cpu_INDEX_7_EDX_21 = x86_cpu_index_7_edx + 21,
225225 x86_cpu_AMX_BF16 = x86_cpu_index_7_edx + 22,
......@@ -288,13 +288,31 @@ enum
288288 = (CPUID_INDEX_7_ECX_1 * 8 * 4 * sizeof (unsigned int)
289289 + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
290290
291 x86_cpu_RAO_INT = x86_cpu_index_7_ecx_1_eax + 3,
291292 x86_cpu_AVX_VNNI = x86_cpu_index_7_ecx_1_eax + 4,
292293 x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5,
294 x86_cpu_LASS = x86_cpu_index_7_ecx_1_eax + 6,
295 x86_cpu_CMPCCXADD = x86_cpu_index_7_ecx_1_eax + 7,
296 x86_cpu_ArchPerfmonExt = x86_cpu_index_7_ecx_1_eax + 8,
293297 x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10,
294298 x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11,
295299 x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12,
300 x86_cpu_WRMSRNS = x86_cpu_index_7_ecx_1_eax + 19,
301 x86_cpu_AMX_FP16 = x86_cpu_index_7_ecx_1_eax + 21,
296302 x86_cpu_HRESET = x86_cpu_index_7_ecx_1_eax + 22,
303 x86_cpu_AVX_IFMA = x86_cpu_index_7_ecx_1_eax + 23,
297304 x86_cpu_LAM = x86_cpu_index_7_ecx_1_eax + 26,
305 x86_cpu_MSRLIST = x86_cpu_index_7_ecx_1_eax + 27,
306
307 x86_cpu_index_7_ecx_1_edx
308 = (CPUID_INDEX_7_ECX_1 * 8 * 4 * sizeof (unsigned int)
309 + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
310
311 x86_cpu_AVX_VNNI_INT8 = x86_cpu_index_7_ecx_1_edx + 4,
312 x86_cpu_AVX_NE_CONVERT = x86_cpu_index_7_ecx_1_edx + 5,
313 x86_cpu_AMX_COMPLEX = x86_cpu_index_7_ecx_1_edx + 8,
314 x86_cpu_PREFETCHI = x86_cpu_index_7_ecx_1_edx + 14,
315 x86_cpu_APX_F = x86_cpu_index_7_ecx_1_edx + 21,
298316
299317 x86_cpu_index_19_ebx
300318 = (CPUID_INDEX_19 * 8 * 4 * sizeof (unsigned int)
lib/libc/include/generic-glibc/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/poll2.h+34-24
......@@ -1,5 +1,5 @@
11/* Checking macros for poll functions.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 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
......@@ -33,23 +33,40 @@ 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 __attr_access ((__write_only__, 1, 2)) int
36__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
3737poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
3838{
39 if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)
40 {
41 if (! __builtin_constant_p (__nfds))
42 return __poll_chk (__fds, __nfds, __timeout, __glibc_objsize (__fds));
43 else if (__glibc_objsize (__fds) / sizeof (*__fds) < __nfds)
44 return __poll_chk_warn (__fds, __nfds, __timeout,
45 __glibc_objsize (__fds));
46 }
47
48 return __poll_alias (__fds, __nfds, __timeout);
39 return __glibc_fortify (poll, __nfds, sizeof (*__fds),
40 __glibc_objsize (__fds),
41 __fds, __nfds, __timeout);
4942}
5043
5144
5245#ifdef __USE_GNU
46# ifdef __USE_TIME_BITS64
47extern int __REDIRECT (__ppoll64_alias, (struct pollfd *__fds, nfds_t __nfds,
48 const struct timespec *__timeout,
49 const __sigset_t *__ss), __ppoll64);
50extern int __ppoll64_chk (struct pollfd *__fds, nfds_t __nfds,
51 const struct timespec *__timeout,
52 const __sigset_t *__ss, __SIZE_TYPE__ __fdslen)
53 __attr_access ((__write_only__, 1, 2));
54extern int __REDIRECT (__ppoll64_chk_warn, (struct pollfd *__fds, nfds_t __n,
55 const struct timespec *__timeout,
56 const __sigset_t *__ss,
57 __SIZE_TYPE__ __fdslen),
58 __ppoll64_chk)
59 __warnattr ("ppoll called with fds buffer too small file nfds entries");
60
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)
64{
65 return __glibc_fortify (ppoll64, __nfds, sizeof (*__fds),
66 __glibc_objsize (__fds),
67 __fds, __nfds, __timeout, __ss);
68}
69# else
5370extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
5471 const struct timespec *__timeout,
5572 const __sigset_t *__ss), ppoll);
......@@ -64,22 +81,15 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
6481 __ppoll_chk)
6582 __warnattr ("ppoll called with fds buffer too small file nfds entries");
6683
67__fortify_function __attr_access ((__write_only__, 1, 2)) int
84__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
6885ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
6986 const __sigset_t *__ss)
7087{
71 if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)
72 {
73 if (! __builtin_constant_p (__nfds))
74 return __ppoll_chk (__fds, __nfds, __timeout, __ss,
75 __glibc_objsize (__fds));
76 else if (__glibc_objsize (__fds) / sizeof (*__fds) < __nfds)
77 return __ppoll_chk_warn (__fds, __nfds, __timeout, __ss,
78 __glibc_objsize (__fds));
79 }
80
81 return __ppoll_alias (__fds, __nfds, __timeout, __ss);
88 return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
89 __glibc_objsize (__fds),
90 __fds, __nfds, __timeout, __ss);
8291}
92# endif
8393#endif
8494
8595__END_DECLS
\ No newline at end of file
lib/libc/include/generic-glibc/bits/posix1_lim.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -134,7 +134,7 @@
134134/* Maximum number of characters in a tty name. */
135135#define _POSIX_TTY_NAME_MAX 9
136136
137/* Maximum length of a timezone name (element of `tzname'). */
137/* Maximum length of a time zone abbreviation (element of 'tzname'). */
138138#ifdef __USE_XOPEN2K
139139# define _POSIX_TZNAME_MAX 6
140140#else
lib/libc/include/generic-glibc/bits/posix2_lim.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/posix_opt.h+3-3
......@@ -1,5 +1,5 @@
11/* Define POSIX options for Linux.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 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
......@@ -84,7 +84,7 @@
8484/* We support user-defined stacks. */
8585#define _POSIX_THREAD_ATTR_STACKADDR 200809L
8686
87/* We support priority inheritence. */
87/* We support priority inheritance. */
8888#define _POSIX_THREAD_PRIO_INHERIT 200809L
8989
9090/* We support priority protection, though only for non-robust
......@@ -92,7 +92,7 @@
9292#define _POSIX_THREAD_PRIO_PROTECT 200809L
9393
9494#ifdef __USE_XOPEN2K8
95/* We support priority inheritence for robust mutexes. */
95/* We support priority inheritance for robust mutexes. */
9696# define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
9797
9898/* We do not support priority protection for robust mutexes. */
lib/libc/include/generic-glibc/bits/ppc.h+1-1
......@@ -1,5 +1,5 @@
11/* Facilities specific to the PowerPC architecture on Linux
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/printf-ldbl.h+1-1
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for <printf.h> functions.
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/procfs-extra.h+1-1
......@@ -1,5 +1,5 @@
11/* Extra sys/procfs.h definitions. Generic Linux version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/generic-glibc/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Generic Linux version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/generic-glibc/bits/procfs-prregset.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of prgregset_t and prfpregset_t. Generic Linux version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/generic-glibc/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. MIPS version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN, possibly dynamic.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. Generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/generic-glibc/bits/pthreadtypes.h+1-1
......@@ -1,5 +1,5 @@
11/* Declaration of common pthread types for all architectures.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ptrace-shared.h+11-1
......@@ -1,6 +1,6 @@
11/* `ptrace' debugger support interface. Linux version,
22 not architecture-specific.
3 Copyright (C) 1996-2021 Free Software Foundation, Inc.
3 Copyright (C) 1996-2023 Free Software Foundation, Inc.
44
55 This file is part of the GNU C Library.
66
......@@ -120,6 +120,16 @@ struct __ptrace_syscall_info
120120 };
121121};
122122
123/* Results of PTRACE_GET_RSEQ_CONFIGURATION. */
124struct __ptrace_rseq_configuration
125{
126 __uint64_t rseq_abi_pointer;
127 __uint32_t rseq_abi_size;
128 __uint32_t signature;
129 __uint32_t flags;
130 __uint32_t pad;
131};
132
123133/* Perform process tracing functions. REQUEST is one of the values
124134 above, and determines the action to be taken.
125135 For all requests except PTRACE_TRACEME, PID specifies the process to be
lib/libc/include/generic-glibc/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/rseq.h created+62
......@@ -0,0 +1,62 @@
1/* Restartable Sequences Linux mips architecture header.
2 Copyright (C) 2021-2023 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/generic-glibc/bits/sched.h+5-1
......@@ -1,6 +1,6 @@
11/* Definitions of constants and data structure for POSIX 1003.1b-1993
22 scheduling interface.
3 Copyright (C) 1996-2021 Free Software Foundation, Inc.
3 Copyright (C) 1996-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -71,6 +71,10 @@
7171# define CLONE_NEWPID 0x20000000 /* New pid namespace. */
7272# define CLONE_NEWNET 0x40000000 /* New network namespace. */
7373# define CLONE_IO 0x80000000 /* Clone I/O context. */
74
75/* cloning flags intersect with CSIGNAL so can be used only with unshare and
76 clone3 syscalls. */
77#define CLONE_NEWTIME 0x00000080 /* New time namespace */
7478#endif
7579
7680#include <bits/types/struct_sched_param.h>
lib/libc/include/generic-glibc/bits/select-decl.h created+31
......@@ -0,0 +1,31 @@
1/* Checking routines for select functions. Declaration only.
2 Copyright (C) 2023 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_SELECT_DECL_H
20#define _BITS_SELECT_DECL_H 1
21
22#ifndef _SYS_SELECT_H
23# error "Never include <bits/select-decl.h> directly; use <sys/select.h> instead."
24#endif
25
26/* Helper functions to issue warnings and errors when needed. */
27extern long int __fdelt_chk (long int __d);
28extern long int __fdelt_warn (long int __d)
29 __warnattr ("bit outside of fd_set selected");
30
31#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/select.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/select2.h+3-5
......@@ -1,5 +1,5 @@
11/* Checking macros for select functions.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -20,10 +20,8 @@
2020# error "Never include <bits/select2.h> directly; use <sys/select.h> instead."
2121#endif
2222
23/* Helper functions to issue warnings and errors when needed. */
24extern long int __fdelt_chk (long int __d);
25extern long int __fdelt_warn (long int __d)
26 __warnattr ("bit outside of fd_set selected");
23#include <bits/select-decl.h>
24
2725#undef __FD_ELT
2826#define __FD_ELT(d) \
2927 __extension__ \
lib/libc/include/generic-glibc/bits/sem.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/semaphore.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/setjmp.h+1-1
......@@ -1,5 +1,5 @@
11/* Define the machine-dependent type `jmp_buf'. MIPS version.
2 Copyright (C) 1992-2021 Free Software Foundation, Inc.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/setjmp2.h+1-1
......@@ -1,5 +1,5 @@
11/* Checking macros for setjmp functions.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc.
2 Copyright (C) 2009-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/shm.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. Generic version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sigevent-consts.h+1-1
......@@ -1,5 +1,5 @@
11/* sigevent constants. Linux version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/siginfo-consts.h+2-2
......@@ -1,5 +1,5 @@
11/* siginfo constants. Linux version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -143,7 +143,7 @@ enum
143143{
144144 BUS_ADRALN = 1, /* Invalid address alignment. */
145145# define BUS_ADRALN BUS_ADRALN
146 BUS_ADRERR, /* Non-existant physical address. */
146 BUS_ADRERR, /* Non-existent physical address. */
147147# define BUS_ADRERR BUS_ADRERR
148148 BUS_OBJERR, /* Object specific hardware error. */
149149# define BUS_OBJERR BUS_OBJERR
lib/libc/include/generic-glibc/bits/signal_ext.h+1-1
......@@ -1,5 +1,5 @@
11/* System-specific extensions of <signal.h>, Linux version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/signum-generic.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number constants. Generic template.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sigstack.h+1-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sigstksz.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version.
2 Copyright (C) 2020 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sigthread.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal handling function for threaded programs.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/sockaddr.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of struct sockaddr_* common members and sizes, generic version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/socket.h+40-9
......@@ -1,5 +1,5 @@
11/* System-specific socket constants and types. Linux version.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 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
......@@ -86,7 +86,8 @@ typedef __socklen_t socklen_t;
8686#define PF_QIPCRTR 42 /* Qualcomm IPC Router. */
8787#define PF_SMC 43 /* SMC sockets. */
8888#define PF_XDP 44 /* XDP sockets. */
89#define PF_MAX 45 /* For now.. */
89#define PF_MCTP 45 /* Management component transport protocol. */
90#define PF_MAX 46 /* For now.. */
9091
9192/* Address families. */
9293#define AF_UNSPEC PF_UNSPEC
......@@ -137,6 +138,7 @@ typedef __socklen_t socklen_t;
137138#define AF_QIPCRTR PF_QIPCRTR
138139#define AF_SMC PF_SMC
139140#define AF_XDP PF_XDP
141#define AF_MCTP PF_MCTP
140142#define AF_MAX PF_MAX
141143
142144/* Socket level values. Others are defined in the appropriate headers.
......@@ -167,6 +169,9 @@ typedef __socklen_t socklen_t;
167169#define SOL_KCM 281
168170#define SOL_TLS 282
169171#define SOL_XDP 283
172#define SOL_MPTCP 284
173#define SOL_MCTP 285
174#define SOL_SMC 286
170175
171176/* Maximum queue length specifiable by listen. */
172177#define SOMAXCONN 4096
......@@ -302,6 +307,12 @@ struct cmsghdr
302307 + CMSG_ALIGN (sizeof (struct cmsghdr)))
303308#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
304309
310/* Given a length, return the additional padding necessary such that
311 len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
312#define __CMSG_PADDING(len) ((sizeof (size_t) \
313 - ((len) & (sizeof (size_t) - 1))) \
314 & (sizeof (size_t) - 1))
315
305316extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
306317 struct cmsghdr *__cmsg) __THROW;
307318#ifdef __USE_EXTERN_INLINES
......@@ -311,18 +322,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
311322_EXTERN_INLINE struct cmsghdr *
312323__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
313324{
325 /* We may safely assume that __cmsg lies between __mhdr->msg_control and
326 __mhdr->msg_controllen because the user is required to obtain the first
327 cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
328 via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
329 trust the value of __cmsg->cmsg_len and therefore do not use it in any
330 pointer arithmetic until we check its value. */
331
332 unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
333 unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
334
335 size_t __size_needed = sizeof (struct cmsghdr)
336 + __CMSG_PADDING (__cmsg->cmsg_len);
337
338 /* The current header is malformed, too small to be a full header. */
314339 if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
315 /* The kernel header does this so there may be a reason. */
316340 return (struct cmsghdr *) 0;
317341
342 /* There isn't enough space between __cmsg and the end of the buffer to
343 hold the current cmsg *and* the next one. */
344 if (((size_t)
345 (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
346 < __size_needed)
347 || ((size_t)
348 (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
349 - __size_needed)
350 < __cmsg->cmsg_len))
351
352 return (struct cmsghdr *) 0;
353
354 /* Now, we trust cmsg_len and can use it to find the next header. */
318355 __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
319356 + CMSG_ALIGN (__cmsg->cmsg_len));
320 if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
321 + __mhdr->msg_controllen)
322 || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
323 > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
324 /* No more entries. */
325 return (struct cmsghdr *) 0;
326357 return __cmsg;
327358}
328359#endif /* Use `extern inline'. */
lib/libc/include/generic-glibc/bits/socket2.h+14-22
......@@ -1,5 +1,5 @@
11/* Checking macros for socket functions.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 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
......@@ -33,17 +33,12 @@ extern ssize_t __REDIRECT (__recv_chk_warn,
3333__fortify_function ssize_t
3434recv (int __fd, void *__buf, size_t __n, int __flags)
3535{
36 if (__glibc_objsize0 (__buf) != (size_t) -1)
37 {
38 if (!__builtin_constant_p (__n))
39 return __recv_chk (__fd, __buf, __n, __glibc_objsize0 (__buf),
40 __flags);
41
42 if (__n > __glibc_objsize0 (__buf))
43 return __recv_chk_warn (__fd, __buf, __n, __glibc_objsize0 (__buf),
44 __flags);
45 }
46 return __recv_alias (__fd, __buf, __n, __flags);
36 size_t sz = __glibc_objsize0 (__buf);
37 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
38 return __recv_alias (__fd, __buf, __n, __flags);
39 if (__glibc_unsafe_len (__n, sizeof (char), sz))
40 return __recv_chk_warn (__fd, __buf, __n, sz, __flags);
41 return __recv_chk (__fd, __buf, __n, sz, __flags);
4742}
4843
4944extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n,
......@@ -66,14 +61,11 @@ __fortify_function ssize_t
6661recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
6762 __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
6863{
69 if (__glibc_objsize0 (__buf) != (size_t) -1)
70 {
71 if (!__builtin_constant_p (__n))
72 return __recvfrom_chk (__fd, __buf, __n, __glibc_objsize0 (__buf),
73 __flags, __addr, __addr_len);
74 if (__n > __glibc_objsize0 (__buf))
75 return __recvfrom_chk_warn (__fd, __buf, __n, __glibc_objsize0 (__buf),
76 __flags, __addr, __addr_len);
77 }
78 return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
64 size_t sz = __glibc_objsize0 (__buf);
65 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
66 return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
67 if (__glibc_unsafe_len (__n, sizeof (char), sz))
68 return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr,
69 __addr_len);
70 return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len);
7971}
\ No newline at end of file
lib/libc/include/generic-glibc/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for generic Linux.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/ss_flags.h+1-1
......@@ -1,5 +1,5 @@
11/* ss_flags values for stack_t. Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stab.def+1-1
......@@ -1,5 +1,5 @@
11/* Table of DBX symbol codes for the GNU system.
2 Copyright (C) 1988, 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1988, 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stat.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/statvfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/statx-generic.h+2-1
......@@ -1,5 +1,5 @@
11/* Generic statx-related definitions and declarations.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 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
......@@ -41,6 +41,7 @@
4141# define STATX_ALL 0x0fffU
4242# define STATX_BTIME 0x0800U
4343# define STATX_MNT_ID 0x1000U
44# define STATX_DIOALIGN 0x2000U
4445# define STATX__RESERVED 0x80000000U
4546
4647# define STATX_ATTR_COMPRESSED 0x0004
lib/libc/include/generic-glibc/bits/statx.h+1-1
......@@ -1,5 +1,5 @@
11/* statx-related definitions and declarations. Linux version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stdint-intn.h+1-1
......@@ -1,5 +1,5 @@
11/* Define intN_t types.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stdint-uintn.h+1-1
......@@ -1,5 +1,5 @@
11/* Define uintN_t types.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stdio-ldbl.h+25-1
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for stdio functions.
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 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
......@@ -28,13 +28,25 @@ __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)
32__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc23_fscanf)
33__LDBL_REDIR1_DECL (scanf, __nldbl___isoc23_scanf)
34__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc23_sscanf)
35# else
3136__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf)
3237__LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
3338__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
39# endif
3440# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
41# if __GLIBC_USE (C2X_STRTOL)
42__LDBL_REDIR1_DECL (fscanf, __isoc23_fscanfieee128)
43__LDBL_REDIR1_DECL (scanf, __isoc23_scanfieee128)
44__LDBL_REDIR1_DECL (sscanf, __isoc23_sscanfieee128)
45# else
3546__LDBL_REDIR1_DECL (fscanf, __isoc99_fscanfieee128)
3647__LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128)
3748__LDBL_REDIR1_DECL (sscanf, __isoc99_sscanfieee128)
49# endif
3850# else
3951# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
4052# endif
......@@ -52,13 +64,25 @@ __LDBL_REDIR_DECL (vsnprintf)
5264#ifdef __USE_ISOC99
5365# if !__GLIBC_USE (DEPRECATED_SCANF)
5466# if defined __LDBL_COMPAT
67# if __GLIBC_USE (C2X_STRTOL)
68__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc23_vfscanf)
69__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc23_vscanf)
70__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc23_vsscanf)
71# else
5572__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)
5673__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
5774__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
75# endif
5876# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
77# if __GLIBC_USE (C2X_STRTOL)
78__LDBL_REDIR1_DECL (vfscanf, __isoc23_vfscanfieee128)
79__LDBL_REDIR1_DECL (vscanf, __isoc23_vscanfieee128)
80__LDBL_REDIR1_DECL (vsscanf, __isoc23_vsscanfieee128)
81# else
5982__LDBL_REDIR1_DECL (vfscanf, __isoc99_vfscanfieee128)
6083__LDBL_REDIR1_DECL (vscanf, __isoc99_vscanfieee128)
6184__LDBL_REDIR1_DECL (vsscanf, __isoc99_vsscanfieee128)
85# endif
6286# else
6387# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
6488# endif
lib/libc/include/generic-glibc/bits/stdio.h+1-1
......@@ -1,5 +1,5 @@
11/* Optimizing macros and inline functions for stdio functions.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stdio2-decl.h created+160
......@@ -0,0 +1,160 @@
1/* Checking macros for stdio functions. Declarations only.
2 Copyright (C) 2004-2023 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_STDIO2_DEC_H
20#define _BITS_STDIO2_DEC_H 1
21
22#ifndef _STDIO_H
23# error "Never include <bits/stdio2-decl.h> directly; use <stdio.h> instead."
24#endif
25
26extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
27 const char *__restrict __format, ...) __THROW
28 __attr_access ((__write_only__, 1, 3));
29extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
30 const char *__restrict __format,
31 __gnuc_va_list __ap) __THROW
32 __attr_access ((__write_only__, 1, 3));
33
34#if defined __USE_ISOC99 || defined __USE_UNIX98
35
36extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
37 size_t __slen, const char *__restrict __format,
38 ...) __THROW
39 __attr_access ((__write_only__, 1, 2));
40extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
41 size_t __slen, const char *__restrict __format,
42 __gnuc_va_list __ap) __THROW
43 __attr_access ((__write_only__, 1, 2));
44
45#endif
46
47#if __USE_FORTIFY_LEVEL > 1
48
49extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
50 const char *__restrict __format, ...);
51extern int __printf_chk (int __flag, const char *__restrict __format, ...);
52extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
53 const char *__restrict __format, __gnuc_va_list __ap);
54extern int __vprintf_chk (int __flag, const char *__restrict __format,
55 __gnuc_va_list __ap);
56
57# ifdef __USE_XOPEN2K8
58extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
59 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
60extern int __vdprintf_chk (int __fd, int __flag,
61 const char *__restrict __fmt, __gnuc_va_list __arg)
62 __attribute__ ((__format__ (__printf__, 3, 0)));
63# endif
64
65# ifdef __USE_GNU
66
67extern int __asprintf_chk (char **__restrict __ptr, int __flag,
68 const char *__restrict __fmt, ...)
69 __THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
70extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
71 const char *__restrict __fmt, __gnuc_va_list __arg)
72 __THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
73extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
74 int __flag, const char *__restrict __format,
75 ...)
76 __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
77extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
78 int __flag,
79 const char *__restrict __format,
80 __gnuc_va_list __args)
81 __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
82
83# endif
84#endif
85
86#if __GLIBC_USE (DEPRECATED_GETS)
87extern char *__REDIRECT (__gets_warn, (char *__str), gets)
88 __wur __warnattr ("please use fgets or getline instead, gets can't "
89 "specify buffer size");
90
91extern char *__gets_chk (char *__str, size_t) __wur;
92#endif
93
94extern char *__REDIRECT (__fgets_alias,
95 (char *__restrict __s, int __n,
96 FILE *__restrict __stream), fgets)
97 __wur __attr_access ((__write_only__, 1, 2));
98extern char *__REDIRECT (__fgets_chk_warn,
99 (char *__restrict __s, size_t __size, int __n,
100 FILE *__restrict __stream), __fgets_chk)
101 __wur __warnattr ("fgets called with bigger size than length "
102 "of destination buffer");
103
104extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
105 FILE *__restrict __stream)
106 __wur __attr_access ((__write_only__, 1, 3));
107
108extern size_t __REDIRECT (__fread_alias,
109 (void *__restrict __ptr, size_t __size,
110 size_t __n, FILE *__restrict __stream),
111 fread) __wur;
112extern size_t __REDIRECT (__fread_chk_warn,
113 (void *__restrict __ptr, size_t __ptrlen,
114 size_t __size, size_t __n,
115 FILE *__restrict __stream),
116 __fread_chk)
117 __wur __warnattr ("fread called with bigger size * nmemb than length "
118 "of destination buffer");
119
120extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
121 size_t __size, size_t __n,
122 FILE *__restrict __stream) __wur;
123
124#ifdef __USE_GNU
125extern char *__REDIRECT_FORTIFY (__fgets_unlocked_alias,
126 (char *__restrict __s, int __n,
127 FILE *__restrict __stream), fgets_unlocked)
128 __wur __attr_access ((__write_only__, 1, 2));
129extern char *__REDIRECT (__fgets_unlocked_chk_warn,
130 (char *__restrict __s, size_t __size, int __n,
131 FILE *__restrict __stream), __fgets_unlocked_chk)
132 __wur __warnattr ("fgets_unlocked called with bigger size than length "
133 "of destination buffer");
134
135
136extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
137 int __n, FILE *__restrict __stream)
138 __wur __attr_access ((__write_only__, 1, 3));
139#endif
140
141#ifdef __USE_MISC
142# undef fread_unlocked
143extern size_t __REDIRECT (__fread_unlocked_alias,
144 (void *__restrict __ptr, size_t __size,
145 size_t __n, FILE *__restrict __stream),
146 fread_unlocked) __wur;
147extern size_t __REDIRECT (__fread_unlocked_chk_warn,
148 (void *__restrict __ptr, size_t __ptrlen,
149 size_t __size, size_t __n,
150 FILE *__restrict __stream),
151 __fread_unlocked_chk)
152 __wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
153 "length of destination buffer");
154
155extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
156 size_t __size, size_t __n,
157 FILE *__restrict __stream) __wur;
158#endif
159
160#endif /* bits/stdio2-decl.h. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/stdio2.h+46-176
......@@ -1,5 +1,5 @@
11/* Checking macros for stdio functions.
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 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
......@@ -23,14 +23,6 @@
2323# error "Never include <bits/stdio2.h> directly; use <stdio.h> instead."
2424#endif
2525
26extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
27 const char *__restrict __format, ...) __THROW
28 __attr_access ((__write_only__, 1, 3));
29extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
30 const char *__restrict __format,
31 __gnuc_va_list __ap) __THROW
32 __attr_access ((__write_only__, 1, 3));
33
3426#ifdef __va_arg_pack
3527__fortify_function int
3628__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
......@@ -54,15 +46,6 @@ __NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
5446}
5547
5648#if defined __USE_ISOC99 || defined __USE_UNIX98
57
58extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
59 size_t __slen, const char *__restrict __format,
60 ...) __THROW
61 __attr_access ((__write_only__, 1, 2));
62extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
63 size_t __slen, const char *__restrict __format,
64 __gnuc_va_list __ap) __THROW;
65
6649# ifdef __va_arg_pack
6750__fortify_function int
6851__NTH (snprintf (char *__restrict __s, size_t __n,
......@@ -89,15 +72,6 @@ __NTH (vsnprintf (char *__restrict __s, size_t __n,
8972#endif
9073
9174#if __USE_FORTIFY_LEVEL > 1
92
93extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
94 const char *__restrict __format, ...);
95extern int __printf_chk (int __flag, const char *__restrict __format, ...);
96extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
97 const char *__restrict __format, __gnuc_va_list __ap);
98extern int __vprintf_chk (int __flag, const char *__restrict __format,
99 __gnuc_va_list __ap);
100
10175# ifdef __va_arg_pack
10276__fortify_function int
10377fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
......@@ -136,12 +110,6 @@ vfprintf (FILE *__restrict __stream,
136110}
137111
138112# ifdef __USE_XOPEN2K8
139extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
140 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
141extern int __vdprintf_chk (int __fd, int __flag,
142 const char *__restrict __fmt, __gnuc_va_list __arg)
143 __attribute__ ((__format__ (__printf__, 3, 0)));
144
145113# ifdef __va_arg_pack
146114__fortify_function int
147115dprintf (int __fd, const char *__restrict __fmt, ...)
......@@ -162,23 +130,6 @@ vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
162130# endif
163131
164132# ifdef __USE_GNU
165
166extern int __asprintf_chk (char **__restrict __ptr, int __flag,
167 const char *__restrict __fmt, ...)
168 __THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
169extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
170 const char *__restrict __fmt, __gnuc_va_list __arg)
171 __THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
172extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
173 int __flag, const char *__restrict __format,
174 ...)
175 __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
176extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
177 int __flag,
178 const char *__restrict __format,
179 __gnuc_va_list __args)
180 __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
181
182133# ifdef __va_arg_pack
183134__fortify_function int
184135__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
......@@ -231,11 +182,6 @@ __NTH (obstack_vprintf (struct obstack *__restrict __obstack,
231182#endif
232183
233184#if __GLIBC_USE (DEPRECATED_GETS)
234extern char *__gets_chk (char *__str, size_t) __wur;
235extern char *__REDIRECT (__gets_warn, (char *__str), gets)
236 __wur __warnattr ("please use fgets or getline instead, gets can't "
237 "specify buffer size");
238
239185__fortify_function __wur char *
240186gets (char *__str)
241187{
......@@ -245,154 +191,78 @@ gets (char *__str)
245191}
246192#endif
247193
248extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
249 FILE *__restrict __stream)
250 __wur __attr_access ((__write_only__, 1, 3));
251extern char *__REDIRECT (__fgets_alias,
252 (char *__restrict __s, int __n,
253 FILE *__restrict __stream), fgets)
254 __wur __attr_access ((__write_only__, 1, 2));
255extern char *__REDIRECT (__fgets_chk_warn,
256 (char *__restrict __s, size_t __size, int __n,
257 FILE *__restrict __stream), __fgets_chk)
258 __wur __warnattr ("fgets called with bigger size than length "
259 "of destination buffer");
260
261__fortify_function __wur __attr_access ((__write_only__, 1, 2)) char *
194__fortify_function __wur __fortified_attr_access (__write_only__, 1, 2) char *
262195fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
263196{
264 if (__glibc_objsize (__s) != (size_t) -1)
265 {
266 if (!__builtin_constant_p (__n) || __n <= 0)
267 return __fgets_chk (__s, __glibc_objsize (__s), __n, __stream);
268
269 if ((size_t) __n > __glibc_objsize (__s))
270 return __fgets_chk_warn (__s, __glibc_objsize (__s), __n, __stream);
271 }
272 return __fgets_alias (__s, __n, __stream);
197 size_t sz = __glibc_objsize (__s);
198 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
199 return __fgets_alias (__s, __n, __stream);
200 if (__glibc_unsafe_len (__n, sizeof (char), sz))
201 return __fgets_chk_warn (__s, sz, __n, __stream);
202 return __fgets_chk (__s, sz, __n, __stream);
273203}
274204
275extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
276 size_t __size, size_t __n,
277 FILE *__restrict __stream) __wur;
278extern size_t __REDIRECT (__fread_alias,
279 (void *__restrict __ptr, size_t __size,
280 size_t __n, FILE *__restrict __stream),
281 fread) __wur;
282extern size_t __REDIRECT (__fread_chk_warn,
283 (void *__restrict __ptr, size_t __ptrlen,
284 size_t __size, size_t __n,
285 FILE *__restrict __stream),
286 __fread_chk)
287 __wur __warnattr ("fread called with bigger size * nmemb than length "
288 "of destination buffer");
289
290205__fortify_function __wur size_t
291206fread (void *__restrict __ptr, size_t __size, size_t __n,
292207 FILE *__restrict __stream)
293208{
294 if (__glibc_objsize0 (__ptr) != (size_t) -1)
295 {
296 if (!__builtin_constant_p (__size)
297 || !__builtin_constant_p (__n)
298 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
299 return __fread_chk (__ptr, __glibc_objsize0 (__ptr), __size, __n,
300 __stream);
301
302 if (__size * __n > __glibc_objsize0 (__ptr))
303 return __fread_chk_warn (__ptr, __glibc_objsize0 (__ptr), __size, __n,
304 __stream);
305 }
306 return __fread_alias (__ptr, __size, __n, __stream);
209 size_t sz = __glibc_objsize0 (__ptr);
210 if (__glibc_safe_or_unknown_len (__n, __size, sz))
211 return __fread_alias (__ptr, __size, __n, __stream);
212 if (__glibc_unsafe_len (__n, __size, sz))
213 return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
214 return __fread_chk (__ptr, sz, __size, __n, __stream);
307215}
308216
309217#ifdef __USE_GNU
310extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
311 int __n, FILE *__restrict __stream)
312 __wur __attr_access ((__write_only__, 1, 3));
313extern char *__REDIRECT (__fgets_unlocked_alias,
314 (char *__restrict __s, int __n,
315 FILE *__restrict __stream), fgets_unlocked)
316 __wur __attr_access ((__write_only__, 1, 2));
317extern char *__REDIRECT (__fgets_unlocked_chk_warn,
318 (char *__restrict __s, size_t __size, int __n,
319 FILE *__restrict __stream), __fgets_unlocked_chk)
320 __wur __warnattr ("fgets_unlocked called with bigger size than length "
321 "of destination buffer");
322
323__fortify_function __wur __attr_access ((__write_only__, 1, 2)) char *
218__fortify_function __wur __fortified_attr_access (__write_only__, 1, 2) char *
324219fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
325220{
326 if (__glibc_objsize (__s) != (size_t) -1)
327 {
328 if (!__builtin_constant_p (__n) || __n <= 0)
329 return __fgets_unlocked_chk (__s, __glibc_objsize (__s), __n,
330 __stream);
331
332 if ((size_t) __n > __glibc_objsize (__s))
333 return __fgets_unlocked_chk_warn (__s, __glibc_objsize (__s), __n,
334 __stream);
335 }
336 return __fgets_unlocked_alias (__s, __n, __stream);
221 size_t sz = __glibc_objsize (__s);
222 if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
223 return __fgets_unlocked_alias (__s, __n, __stream);
224 if (__glibc_unsafe_len (__n, sizeof (char), sz))
225 return __fgets_unlocked_chk_warn (__s, sz, __n, __stream);
226 return __fgets_unlocked_chk (__s, sz, __n, __stream);
337227}
338228#endif
339229
340230#ifdef __USE_MISC
341231# undef fread_unlocked
342extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
343 size_t __size, size_t __n,
344 FILE *__restrict __stream) __wur;
345extern size_t __REDIRECT (__fread_unlocked_alias,
346 (void *__restrict __ptr, size_t __size,
347 size_t __n, FILE *__restrict __stream),
348 fread_unlocked) __wur;
349extern size_t __REDIRECT (__fread_unlocked_chk_warn,
350 (void *__restrict __ptr, size_t __ptrlen,
351 size_t __size, size_t __n,
352 FILE *__restrict __stream),
353 __fread_unlocked_chk)
354 __wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
355 "length of destination buffer");
356
357232__fortify_function __wur size_t
358233fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
359234 FILE *__restrict __stream)
360235{
361 if (__glibc_objsize0 (__ptr) != (size_t) -1)
236 size_t sz = __glibc_objsize0 (__ptr);
237 if (__glibc_safe_or_unknown_len (__n, __size, sz))
362238 {
363 if (!__builtin_constant_p (__size)
364 || !__builtin_constant_p (__n)
365 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
366 return __fread_unlocked_chk (__ptr, __glibc_objsize0 (__ptr), __size,
367 __n, __stream);
368
369 if (__size * __n > __glibc_objsize0 (__ptr))
370 return __fread_unlocked_chk_warn (__ptr, __glibc_objsize0 (__ptr),
371 __size, __n, __stream);
372 }
373
374239# ifdef __USE_EXTERN_INLINES
375 if (__builtin_constant_p (__size)
376 && __builtin_constant_p (__n)
377 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
378 && __size * __n <= 8)
379 {
380 size_t __cnt = __size * __n;
381 char *__cptr = (char *) __ptr;
382 if (__cnt == 0)
383 return 0;
384
385 for (; __cnt > 0; --__cnt)
240 if (__builtin_constant_p (__size)
241 && __builtin_constant_p (__n)
242 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
243 && __size * __n <= 8)
386244 {
387 int __c = getc_unlocked (__stream);
388 if (__c == EOF)
389 break;
390 *__cptr++ = __c;
245 size_t __cnt = __size * __n;
246 char *__cptr = (char *) __ptr;
247 if (__cnt == 0)
248 return 0;
249
250 for (; __cnt > 0; --__cnt)
251 {
252 int __c = getc_unlocked (__stream);
253 if (__c == EOF)
254 break;
255 *__cptr++ = __c;
256 }
257 return (__cptr - (char *) __ptr) / __size;
391258 }
392 return (__cptr - (char *) __ptr) / __size;
393 }
394259# endif
395 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
260 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
261 }
262 if (__glibc_unsafe_len (__n, __size, sz))
263 return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
264 return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
265
396266}
397267#endif
398268
lib/libc/include/generic-glibc/bits/stdio_lim.h+2-13
......@@ -1,4 +1,5 @@
1/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
1/* System specific stdio.h definitions. Linux version.
2 Copyright (C) 2023 Free Software Foundation, Inc.
23 This file is part of the GNU C Library.
34
45 The GNU C Library is free software; you can redistribute it and/or
......@@ -22,18 +23,6 @@
2223# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
2324#endif
2425
25#define L_tmpnam 20
26#define TMP_MAX 238328
2726#define FILENAME_MAX 4096
2827
29#ifdef __USE_POSIX
30# define L_ctermid 9
31# if !defined __USE_XOPEN2K || defined __USE_GNU
32# define L_cuserid 9
33# endif
34#endif
35
36#undef FOPEN_MAX
37#define FOPEN_MAX 16
38
3928#endif /* bits/stdio_lim.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/stdlib-bsearch.h+12-3
......@@ -1,5 +1,5 @@
11/* Perform binary search - inline version.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 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
......@@ -29,14 +29,23 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
2929 while (__l < __u)
3030 {
3131 __idx = (__l + __u) / 2;
32 __p = (void *) (((const char *) __base) + (__idx * __size));
32 __p = (const void *) (((const char *) __base) + (__idx * __size));
3333 __comparison = (*__compar) (__key, __p);
3434 if (__comparison < 0)
3535 __u = __idx;
3636 else if (__comparison > 0)
3737 __l = __idx + 1;
3838 else
39 return (void *) __p;
39 {
40#if __GNUC_PREREQ(4, 6)
41# pragma GCC diagnostic push
42# pragma GCC diagnostic ignored "-Wcast-qual"
43#endif
44 return (void *) __p;
45#if __GNUC_PREREQ(4, 6)
46# pragma GCC diagnostic pop
47#endif
48 }
4049 }
4150
4251 return NULL;
lib/libc/include/generic-glibc/bits/stdlib-float.h+1-1
......@@ -1,5 +1,5 @@
11/* Floating-point inline functions for stdlib.h.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stdlib-ldbl.h+1-1
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/stdlib.h+25-42
......@@ -1,5 +1,5 @@
11/* Checking macros for stdlib functions.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 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
......@@ -36,17 +36,16 @@ extern char *__REDIRECT_NTH (__realpath_chk_warn,
3636__fortify_function __wur char *
3737__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
3838{
39 if (__glibc_objsize (__resolved) != (size_t) -1)
40 {
39 size_t sz = __glibc_objsize (__resolved);
40
41 if (sz == (size_t) -1)
42 return __realpath_alias (__name, __resolved);
43
4144#if defined _LIBC_LIMITS_H_ && defined PATH_MAX
42 if (__glibc_objsize (__resolved) < PATH_MAX)
43 return __realpath_chk_warn (__name, __resolved,
44 __glibc_objsize (__resolved));
45 if (__glibc_unsafe_len (PATH_MAX, sizeof (char), sz))
46 return __realpath_chk_warn (__name, __resolved, sz);
4547#endif
46 return __realpath_chk (__name, __resolved, __glibc_objsize (__resolved));
47 }
48
49 return __realpath_alias (__name, __resolved);
48 return __realpath_chk (__name, __resolved, sz);
5049}
5150
5251
......@@ -65,16 +64,9 @@ extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
6564__fortify_function int
6665__NTH (ptsname_r (int __fd, char *__buf, size_t __buflen))
6766{
68 if (__glibc_objsize (__buf) != (size_t) -1)
69 {
70 if (!__builtin_constant_p (__buflen))
71 return __ptsname_r_chk (__fd, __buf, __buflen,
72 __glibc_objsize (__buf));
73 if (__buflen > __glibc_objsize (__buf))
74 return __ptsname_r_chk_warn (__fd, __buf, __buflen,
75 __glibc_objsize (__buf));
76 }
77 return __ptsname_r_alias (__fd, __buf, __buflen);
67 return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
68 __glibc_objsize (__buf),
69 __fd, __buf, __buflen);
7870}
7971
8072
......@@ -104,6 +96,11 @@ extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
10496 const char *__restrict __src,
10597 size_t __len, size_t __dstlen) __THROW
10698 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
99extern size_t __REDIRECT_NTH (__mbstowcs_nulldst,
100 (wchar_t *__restrict __dst,
101 const char *__restrict __src,
102 size_t __len), mbstowcs)
103 __attr_access ((__read_only__, 2));
107104extern size_t __REDIRECT_NTH (__mbstowcs_alias,
108105 (wchar_t *__restrict __dst,
109106 const char *__restrict __src,
......@@ -120,21 +117,13 @@ __fortify_function size_t
120117__NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,
121118 size_t __len))
122119{
123 if (__glibc_objsize (__dst) != (size_t) -1)
124 {
125 if (!__builtin_constant_p (__len))
126 return __mbstowcs_chk (__dst, __src, __len,
127 __glibc_objsize (__dst) / sizeof (wchar_t));
128
129 if (__len > __glibc_objsize (__dst) / sizeof (wchar_t))
130 return __mbstowcs_chk_warn (__dst, __src, __len,
131 (__glibc_objsize (__dst)
132 / sizeof (wchar_t)));
133 }
134 return __mbstowcs_alias (__dst, __src, __len);
120 if (__builtin_constant_p (__dst == NULL) && __dst == NULL)
121 return __mbstowcs_nulldst (__dst, __src, __len);
122 else
123 return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t),
124 __glibc_objsize (__dst), __dst, __src, __len);
135125}
136126
137
138127extern size_t __wcstombs_chk (char *__restrict __dst,
139128 const wchar_t *__restrict __src,
140129 size_t __len, size_t __dstlen) __THROW
......@@ -154,13 +143,7 @@ __fortify_function size_t
154143__NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src,
155144 size_t __len))
156145{
157 if (__glibc_objsize (__dst) != (size_t) -1)
158 {
159 if (!__builtin_constant_p (__len))
160 return __wcstombs_chk (__dst, __src, __len, __glibc_objsize (__dst));
161 if (__len > __glibc_objsize (__dst))
162 return __wcstombs_chk_warn (__dst, __src, __len,
163 __glibc_objsize (__dst));
164 }
165 return __wcstombs_alias (__dst, __src, __len);
146 return __glibc_fortify (wcstombs, __len, sizeof (char),
147 __glibc_objsize (__dst),
148 __dst, __src, __len);
166149}
\ No newline at end of file
lib/libc/include/generic-glibc/bits/string_fortified.h+45-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -64,7 +64,7 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
6464# include <bits/strings_fortified.h>
6565
6666void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
67 __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
67 __THROW __nonnull ((1)) __fortified_attr_access (__write_only__, 1, 2);
6868
6969__fortify_function void
7070__NTH (explicit_bzero (void *__dest, size_t __len))
......@@ -79,7 +79,7 @@ __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
7979 return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
8080}
8181
82#ifdef __USE_GNU
82#ifdef __USE_XOPEN2K8
8383__fortify_function char *
8484__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
8585{
......@@ -96,17 +96,19 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
9696 __glibc_objsize (__dest));
9797}
9898
99#if __GNUC_PREREQ (4, 7) || __glibc_clang_prereq (2, 6)
99#ifdef __USE_XOPEN2K8
100# if __GNUC_PREREQ (4, 7) || __glibc_clang_prereq (2, 6)
100101__fortify_function char *
101102__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
102103{
103104 return __builtin___stpncpy_chk (__dest, __src, __n,
104105 __glibc_objsize (__dest));
105106}
106#else
107# else
107108extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
108109 size_t __destlen) __THROW
109 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
110 __fortified_attr_access (__write_only__, 1, 3)
111 __attr_access ((__read_only__, 2));
110112extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
111113 size_t __n), stpncpy);
112114
......@@ -118,6 +120,7 @@ __NTH (stpncpy (char *__dest, const char *__src, size_t __n))
118120 return __stpncpy_chk (__dest, __src, __n, __bos (__dest));
119121 return __stpncpy_alias (__dest, __src, __n);
120122}
123# endif
121124#endif
122125
123126
......@@ -136,4 +139,40 @@ __NTH (strncat (char *__restrict __dest, const char *__restrict __src,
136139 __glibc_objsize (__dest));
137140}
138141
142#ifdef __USE_MISC
143extern size_t __strlcpy_chk (char *__dest, const char *__src, size_t __n,
144 size_t __destlen) __THROW;
145extern size_t __REDIRECT_NTH (__strlcpy_alias,
146 (char *__dest, const char *__src, size_t __n),
147 strlcpy);
148
149__fortify_function size_t
150__NTH (strlcpy (char *__restrict __dest, const char *__restrict __src,
151 size_t __n))
152{
153 if (__glibc_objsize (__dest) != (size_t) -1
154 && (!__builtin_constant_p (__n > __glibc_objsize (__dest))
155 || __n > __glibc_objsize (__dest)))
156 return __strlcpy_chk (__dest, __src, __n, __glibc_objsize (__dest));
157 return __strlcpy_alias (__dest, __src, __n);
158}
159
160extern size_t __strlcat_chk (char *__dest, const char *__src, size_t __n,
161 size_t __destlen) __THROW;
162extern size_t __REDIRECT_NTH (__strlcat_alias,
163 (char *__dest, const char *__src, size_t __n),
164 strlcat);
165
166__fortify_function size_t
167__NTH (strlcat (char *__restrict __dest, const char *__restrict __src,
168 size_t __n))
169{
170 if (__glibc_objsize (__dest) != (size_t) -1
171 && (!__builtin_constant_p (__n > __glibc_objsize (__dest))
172 || __n > __glibc_objsize (__dest)))
173 return __strlcat_chk (__dest, __src, __n, __glibc_objsize (__dest));
174 return __strlcat_alias (__dest, __src, __n);
175}
176#endif /* __USE_MISC */
177
139178#endif /* bits/string_fortified.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/strings_fortified.h+1-1
......@@ -1,5 +1,5 @@
11/* Fortify macros for strings.h functions.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* Default mutex implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/struct_stat.h+24-16
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 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
......@@ -131,27 +131,30 @@ struct stat64
131131
132132struct stat
133133 {
134# ifdef __USE_TIME_BITS64
135# include <bits/struct_stat_time64_helper.h>
136# else
134137 __dev_t st_dev;
135138 int st_pad1[3]; /* Reserved for st_dev expansion */
136# ifndef __USE_FILE_OFFSET64
139# ifndef __USE_FILE_OFFSET64
137140 __ino_t st_ino;
138# else
141# else
139142 __ino64_t st_ino;
140# endif
143# endif
141144 __mode_t st_mode;
142145 __nlink_t st_nlink;
143146 __uid_t st_uid;
144147 __gid_t st_gid;
145148 __dev_t st_rdev;
146# if !defined __USE_FILE_OFFSET64
149# if !defined __USE_FILE_OFFSET64
147150 unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
148151 __off_t st_size;
149152 int st_pad3;
150# else
153# else
151154 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
152155 __off64_t st_size;
153# endif
154# ifdef __USE_XOPEN2K8
156# endif
157# ifdef __USE_XOPEN2K8
155158 /* Nanosecond resolution timestamps are stored in a format
156159 equivalent to 'struct timespec'. This is the type used
157160 whenever possible but the Unix namespace rules do not allow the
......@@ -161,30 +164,34 @@ struct stat
161164 struct timespec st_atim; /* Time of last access. */
162165 struct timespec st_mtim; /* Time of last modification. */
163166 struct timespec st_ctim; /* Time of last status change. */
164# define st_atime st_atim.tv_sec /* Backward compatibility. */
165# define st_mtime st_mtim.tv_sec
166# define st_ctime st_ctim.tv_sec
167# else
167# define st_atime st_atim.tv_sec /* Backward compatibility. */
168# define st_mtime st_mtim.tv_sec
169# define st_ctime st_ctim.tv_sec
170# else
168171 __time_t st_atime; /* Time of last access. */
169172 unsigned long int st_atimensec; /* Nscecs of last access. */
170173 __time_t st_mtime; /* Time of last modification. */
171174 unsigned long int st_mtimensec; /* Nsecs of last modification. */
172175 __time_t st_ctime; /* Time of last status change. */
173176 unsigned long int st_ctimensec; /* Nsecs of last status change. */
174# endif
177# endif
175178 __blksize_t st_blksize;
176179 unsigned int st_pad4;
177# ifndef __USE_FILE_OFFSET64
180# ifndef __USE_FILE_OFFSET64
178181 __blkcnt_t st_blocks;
179# else
182# else
180183 __blkcnt64_t st_blocks;
181# endif
184# endif
182185 int st_pad5[14];
186# endif
183187 };
184188
185189#ifdef __USE_LARGEFILE64
186190struct stat64
187191 {
192# ifdef __USE_TIME_BITS64
193# include <bits/struct_stat_time64_helper.h>
194# else
188195 __dev_t st_dev;
189196 unsigned int st_pad1[3]; /* Reserved for st_dev expansion */
190197 __ino64_t st_ino;
......@@ -217,6 +224,7 @@ struct stat64
217224 unsigned int st_pad3;
218225 __blkcnt64_t st_blocks;
219226 int st_pad4[14];
227# endif /* __USE_TIME_BITS64 */
220228};
221229#endif
222230
lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for helper to define struct stat with 64-bit time.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/syscall.h+30-2
......@@ -1,11 +1,11 @@
11/* Generated at libc build time from syscall list. */
2/* The system call list corresponds to kernel 5.13. */
2/* The system call list corresponds to kernel 6.4. */
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 331008
8#define __GLIBC_LINUX_VERSION_CODE 394240
99
1010#ifdef __NR_FAST_atomic_update
1111# define SYS_FAST_atomic_update __NR_FAST_atomic_update
......@@ -495,6 +495,10 @@
495495# define SYS_futex_time64 __NR_futex_time64
496496#endif
497497
498#ifdef __NR_futex_waitv
499# define SYS_futex_waitv __NR_futex_waitv
500#endif
501
498502#ifdef __NR_futimesat
499503# define SYS_futimesat __NR_futimesat
500504#endif
......@@ -899,6 +903,10 @@
899903# define SYS_memfd_create __NR_memfd_create
900904#endif
901905
906#ifdef __NR_memfd_secret
907# define SYS_memfd_secret __NR_memfd_secret
908#endif
909
902910#ifdef __NR_memory_ordering
903911# define SYS_memory_ordering __NR_memory_ordering
904912#endif
......@@ -1123,6 +1131,10 @@
11231131# define SYS_openat2 __NR_openat2
11241132#endif
11251133
1134#ifdef __NR_or1k_atomic
1135# define SYS_or1k_atomic __NR_or1k_atomic
1136#endif
1137
11261138#ifdef __NR_osf_adjtime
11271139# define SYS_osf_adjtime __NR_osf_adjtime
11281140#endif
......@@ -1667,6 +1679,10 @@
16671679# define SYS_process_madvise __NR_process_madvise
16681680#endif
16691681
1682#ifdef __NR_process_mrelease
1683# define SYS_process_mrelease __NR_process_mrelease
1684#endif
1685
16701686#ifdef __NR_process_vm_readv
16711687# define SYS_process_vm_readv __NR_process_vm_readv
16721688#endif
......@@ -1719,6 +1735,10 @@
17191735# define SYS_quotactl __NR_quotactl
17201736#endif
17211737
1738#ifdef __NR_quotactl_fd
1739# define SYS_quotactl_fd __NR_quotactl_fd
1740#endif
1741
17221742#ifdef __NR_read
17231743# define SYS_read __NR_read
17241744#endif
......@@ -1799,6 +1819,10 @@
17991819# define SYS_riscv_flush_icache __NR_riscv_flush_icache
18001820#endif
18011821
1822#ifdef __NR_riscv_hwprobe
1823# define SYS_riscv_hwprobe __NR_riscv_hwprobe
1824#endif
1825
18021826#ifdef __NR_rmdir
18031827# define SYS_rmdir __NR_rmdir
18041828#endif
......@@ -1987,6 +2011,10 @@
19872011# define SYS_set_mempolicy __NR_set_mempolicy
19882012#endif
19892013
2014#ifdef __NR_set_mempolicy_home_node
2015# define SYS_set_mempolicy_home_node __NR_set_mempolicy_home_node
2016#endif
2017
19902018#ifdef __NR_set_robust_list
19912019# define SYS_set_robust_list __NR_set_robust_list
19922020#endif
lib/libc/include/generic-glibc/bits/syslog-decl.h created+35
......@@ -0,0 +1,35 @@
1/* Checking routines for syslog functions. Declaration only.
2 Copyright (C) 2023 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_SYSLOG_DECL_H
20#define _BITS_SYSLOG_DECL_H 1
21
22#ifndef _SYS_SYSLOG_H
23# error "Never include <bits/syslog-decl.h> directly; use <sys/syslog.h> instead."
24#endif
25
26extern void __syslog_chk (int __pri, int __flag, const char *__fmt, ...)
27 __attribute__ ((__format__ (__printf__, 3, 4)));
28
29#ifdef __USE_MISC
30extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt,
31 __gnuc_va_list __ap)
32 __attribute__ ((__format__ (__printf__, 3, 0)));
33#endif
34
35#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/syslog-ldbl.h+1-1
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for syslog functions.
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/syslog-path.h+1-1
......@@ -1,5 +1,5 @@
11/* <bits/syslog-path.h> -- _PATH_LOG definition
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/syslog.h+9-7
......@@ -1,5 +1,5 @@
11/* Checking macros for syslog functions.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -20,9 +20,15 @@
2020# error "Never include <bits/syslog.h> directly; use <sys/syslog.h> instead."
2121#endif
2222
23#include <bits/syslog-decl.h>
2324
24extern void __syslog_chk (int __pri, int __flag, const char *__fmt, ...)
25 __attribute__ ((__format__ (__printf__, 3, 4)));
25#include <bits/floatn.h>
26#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
27# include <bits/syslog-ldbl.h>
28#endif
29
30/* The following functions must be used only after applying all asm
31 redirections, e.g. long double asm redirections. */
2632
2733#ifdef __va_arg_pack
2834__fortify_function void
......@@ -37,10 +43,6 @@ syslog (int __pri, const char *__fmt, ...)
3743
3844
3945#ifdef __USE_MISC
40extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt,
41 __gnuc_va_list __ap)
42 __attribute__ ((__format__ (__printf__, 3, 0)));
43
4446__fortify_function void
4547vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
4648{
lib/libc/include/generic-glibc/bits/sysmacros.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions of macros to access `dev_t' values.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-baud.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-c_cflag.h+6-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 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
......@@ -31,4 +31,8 @@
3131#define PARENB 0000400
3232#define PARODD 0001000
3333#define HUPCL 0002000
34#define CLOCAL 0004000
\ No newline at end of file
34#define CLOCAL 0004000
35
36#ifdef __USE_MISC
37# define ADDRB 04000000000
38#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/termios-c_iflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-c_oflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-misc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios-tcflow.h+2-2
......@@ -1,5 +1,5 @@
1/* termios tcflag symbolic contants definitions. Linux/generic version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
1/* termios tcflag symbolic constant definitions. Linux/generic version.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/termios.h+1-1
......@@ -1,5 +1,5 @@
11/* termios type and macro definitions. Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/thread-shared-types.h+5-19
......@@ -1,5 +1,5 @@
11/* Common threading primitives definitions for both POSIX and C11.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -43,6 +43,8 @@
4343
4444#include <bits/pthreadtypes-arch.h>
4545
46#include <bits/atomic_wide_counter.h>
47
4648
4749/* Common definition of pthread_mutex_t. */
4850
......@@ -91,24 +93,8 @@ typedef struct __pthread_internal_slist
9193
9294struct __pthread_cond_s
9395{
94 __extension__ union
95 {
96 __extension__ unsigned long long int __wseq;
97 struct
98 {
99 unsigned int __low;
100 unsigned int __high;
101 } __wseq32;
102 };
103 __extension__ union
104 {
105 __extension__ unsigned long long int __g1_start;
106 struct
107 {
108 unsigned int __low;
109 unsigned int __high;
110 } __g1_start32;
111 };
96 __atomic_wide_counter __wseq;
97 __atomic_wide_counter __g1_start;
11298 unsigned int __g_refs[2] __LOCK_ALIGNMENT;
11399 unsigned int __g_size[2];
114100 unsigned int __g1_orig_size;
lib/libc/include/generic-glibc/bits/time.h+3-3
......@@ -1,5 +1,5 @@
11/* System-dependent timing definitions. Linux version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 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
......@@ -75,13 +75,13 @@ extern long int __sysconf (int);
7575__BEGIN_DECLS
7676
7777/* Tune a POSIX clock. */
78extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
78extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2));
7979
8080#ifdef __USE_TIME_BITS64
8181# if defined(__REDIRECT_NTH)
8282extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id,
8383 struct timex *__utx),
84 __clock_adjtime64);
84 __clock_adjtime64) __nonnull((2));
8585# else
8686# define clock_adjtime __clock_adjtime64
8787# endif
lib/libc/include/generic-glibc/bits/time64.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/time64.h -- underlying types for __time64_t. Generic version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/timesize.h+2-2
......@@ -1,5 +1,5 @@
1/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
1/* Bit size of the time_t type at glibc build time, Linux/MIPS.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/timex.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -25,7 +25,7 @@
2525
2626struct timex
2727{
28# ifdef __USE_TIME_BITS64
28# if defined __USE_TIME_BITS64 || (__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.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/types.h -- definitions of __*_t types underlying *_t types.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/__locale_t.h+1-2
......@@ -1,7 +1,6 @@
11/* Definition of struct __locale_struct and __locale_t.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/bits/types/__sigval_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __sigval_t.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/error_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define error_t.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/idtype_t.h created+14
......@@ -0,0 +1,14 @@
1#ifndef __idtype_t_defined
2#define __idtype_t_defined
3
4/* The following values are used by the `waitid' function. */
5typedef enum
6{
7 P_ALL, /* Wait for any child. */
8 P_PID, /* Wait for specified process. */
9 P_PGID, /* Wait for members of process group. */
10 P_PIDFD, /* Wait for the child referred by the PID file
11 descriptor. */
12} idtype_t;
13
14#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/locale_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of locale_t.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/res_state.h+1-1
......@@ -11,7 +11,7 @@
1111#define MAXRESOLVSORT 10 /* number of net to sort on */
1212
1313struct __res_state {
14 int retrans; /* retransmition time interval */
14 int retrans; /* retransmission time interval */
1515 int retry; /* number of times to retransmit */
1616 unsigned long options; /* option flags - see below. */
1717 int nscount; /* number of name servers */
lib/libc/include/generic-glibc/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_FILE.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct___jmp_buf_tag.h+1-1
......@@ -1,5 +1,5 @@
11/* Define struct __jmp_buf_tag.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_iovec.h+1-1
......@@ -1,5 +1,5 @@
11/* Define struct iovec.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic implementation of the SysV message struct msqid64_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h+1-1
......@@ -1,5 +1,5 @@
11/* Common definitions for struct msqid_ds with 64-bit time.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_rusage.h+1-1
......@@ -1,5 +1,5 @@
11/* Define struct rusage.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_sched_param.h+1-1
......@@ -1,5 +1,5 @@
11/* Sched parameter structure. Generic version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic implementation of the semaphore struct semid64_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h+1-1
......@@ -1,5 +1,5 @@
11/* Common definitions for struct semid_ds with 64-bit time.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h+1-1
......@@ -1,5 +1,5 @@
11/* Common definitions for struct semid_ds with 64-bit time.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Generic implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_sigstack.h+1-1
......@@ -1,5 +1,5 @@
11/* Define struct sigstack.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_statx.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of the generic version of struct statx.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/types/struct_statx_timestamp.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of the generic version of struct statx_timestamp.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/typesizes.h+2-2
......@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Generic version.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* bits/typesizes.h -- underlying types for *_t. MIPS version.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/uintn-identity.h+1-1
......@@ -1,5 +1,5 @@
11/* Inline functions to return unsigned integer values unchanged.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/uio-ext.h+1-1
......@@ -1,5 +1,5 @@
11/* Operating system-specific extensions to sys/uio.h - Linux version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/uio_lim.h+1-1
......@@ -1,5 +1,5 @@
11/* Implementation limits related to sys/uio.h - Linux version.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/unistd-decl.h created+198
......@@ -0,0 +1,198 @@
1/* Checking routines for unistd functions. Declaration only.
2 Copyright (C) 2023 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_UNISTD_DECL_H
20#define _BITS_UNISTD_DECL_H 1
21
22#ifndef _UNISTD_H
23# error "Never include <bits/unistd-decl.h> directly; use <unistd.h> instead."
24#endif
25
26extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
27 size_t __buflen)
28 __wur __attr_access ((__write_only__, 2, 3));
29extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void *__buf,
30 size_t __nbytes), read)
31 __wur __attr_access ((__write_only__, 2, 3));
32extern ssize_t __REDIRECT (__read_chk_warn,
33 (int __fd, void *__buf, size_t __nbytes,
34 size_t __buflen), __read_chk)
35 __wur __warnattr ("read called with bigger length than size of "
36 "the destination buffer");
37
38#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
39extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
40 __off_t __offset, size_t __bufsize)
41 __wur __attr_access ((__write_only__, 2, 3));
42extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
43 __off64_t __offset, size_t __bufsize)
44 __wur __attr_access ((__write_only__, 2, 3));
45extern ssize_t __REDIRECT (__pread_alias,
46 (int __fd, void *__buf, size_t __nbytes,
47 __off_t __offset), pread)
48 __wur __attr_access ((__write_only__, 2, 3));
49extern ssize_t __REDIRECT (__pread64_alias,
50 (int __fd, void *__buf, size_t __nbytes,
51 __off64_t __offset), pread64)
52 __wur __attr_access ((__write_only__, 2, 3));
53extern ssize_t __REDIRECT (__pread_chk_warn,
54 (int __fd, void *__buf, size_t __nbytes,
55 __off_t __offset, size_t __bufsize), __pread_chk)
56 __wur __warnattr ("pread called with bigger length than size of "
57 "the destination buffer");
58extern ssize_t __REDIRECT (__pread64_chk_warn,
59 (int __fd, void *__buf, size_t __nbytes,
60 __off64_t __offset, size_t __bufsize),
61 __pread64_chk)
62 __wur __warnattr ("pread64 called with bigger length than size of "
63 "the destination buffer");
64#endif
65
66#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
67extern ssize_t __readlink_chk (const char *__restrict __path,
68 char *__restrict __buf, size_t __len,
69 size_t __buflen)
70 __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
71extern ssize_t __REDIRECT_NTH (__readlink_alias,
72 (const char *__restrict __path,
73 char *__restrict __buf, size_t __len), readlink)
74 __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
75extern ssize_t __REDIRECT_NTH (__readlink_chk_warn,
76 (const char *__restrict __path,
77 char *__restrict __buf, size_t __len,
78 size_t __buflen), __readlink_chk)
79 __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length "
80 "than size of destination buffer");
81#endif
82
83#ifdef __USE_ATFILE
84extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
85 char *__restrict __buf, size_t __len,
86 size_t __buflen)
87 __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
88extern ssize_t __REDIRECT_NTH (__readlinkat_alias,
89 (int __fd, const char *__restrict __path,
90 char *__restrict __buf, size_t __len),
91 readlinkat)
92 __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
93extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn,
94 (int __fd, const char *__restrict __path,
95 char *__restrict __buf, size_t __len,
96 size_t __buflen), __readlinkat_chk)
97 __nonnull ((2, 3)) __wur __warnattr ("readlinkat called with bigger "
98 "length than size of destination "
99 "buffer");
100#endif
101
102extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
103 __THROW __wur;
104extern char *__REDIRECT_NTH (__getcwd_alias,
105 (char *__buf, size_t __size), getcwd) __wur;
106extern char *__REDIRECT_NTH (__getcwd_chk_warn,
107 (char *__buf, size_t __size, size_t __buflen),
108 __getcwd_chk)
109 __wur __warnattr ("getcwd caller with bigger length than size of "
110 "destination buffer");
111
112#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
113extern char *__getwd_chk (char *__buf, size_t buflen)
114 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
115extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd)
116 __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd "
117 "doesn't specify buffer size");
118#endif
119
120extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
121 size_t __buflen) __THROW
122 __attr_access ((__write_only__, 2, 3));
123extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf,
124 size_t __len), confstr)
125 __attr_access ((__write_only__, 2, 3));
126extern size_t __REDIRECT_NTH (__confstr_chk_warn,
127 (int __name, char *__buf, size_t __len,
128 size_t __buflen), __confstr_chk)
129 __warnattr ("confstr called with bigger length than size of destination "
130 "buffer");
131
132
133extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
134 __THROW __wur __attr_access ((__write_only__, 2, 1));
135extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]),
136 getgroups) __wur __attr_access ((__write_only__, 2, 1));
137extern int __REDIRECT_NTH (__getgroups_chk_warn,
138 (int __size, __gid_t __list[], size_t __listlen),
139 __getgroups_chk)
140 __wur __warnattr ("getgroups called with bigger group count than what "
141 "can fit into destination buffer");
142
143
144extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
145 size_t __nreal) __THROW __nonnull ((2))
146 __attr_access ((__write_only__, 2, 3));
147extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf,
148 size_t __buflen), ttyname_r)
149 __nonnull ((2));
150extern int __REDIRECT_NTH (__ttyname_r_chk_warn,
151 (int __fd, char *__buf, size_t __buflen,
152 size_t __nreal), __ttyname_r_chk)
153 __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than "
154 "size of destination buffer");
155
156
157#ifdef __USE_POSIX199506
158extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
159 __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
160extern int __REDIRECT_FORTIFY (__getlogin_r_alias, (char *__buf, size_t __buflen),
161 getlogin_r) __nonnull ((1));
162extern int __REDIRECT (__getlogin_r_chk_warn,
163 (char *__buf, size_t __buflen, size_t __nreal),
164 __getlogin_r_chk)
165 __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than "
166 "size of destination buffer");
167#endif
168
169
170#if defined __USE_MISC || defined __USE_UNIX98
171extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
172 __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
173extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen),
174 gethostname)
175 __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
176extern int __REDIRECT_NTH (__gethostname_chk_warn,
177 (char *__buf, size_t __buflen, size_t __nreal),
178 __gethostname_chk)
179 __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than "
180 "size of destination buffer");
181#endif
182
183
184#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98)
185extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
186 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
187extern int __REDIRECT_FORTIFY_NTH (__getdomainname_alias, (char *__buf,
188 size_t __buflen),
189 getdomainname) __nonnull ((1))
190 __wur __attr_access ((__write_only__, 1, 2));
191extern int __REDIRECT_NTH (__getdomainname_chk_warn,
192 (char *__buf, size_t __buflen, size_t __nreal),
193 __getdomainname_chk)
194 __nonnull ((1)) __wur __warnattr ("getdomainname called with bigger "
195 "buflen than size of destination "
196 "buffer");
197#endif
198#endif /* bits/unistd-decl.h. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/unistd.h+42-291
......@@ -1,5 +1,5 @@
11/* Checking macros for unistd functions.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -20,92 +20,32 @@
2020# error "Never include <bits/unistd.h> directly; use <unistd.h> instead."
2121#endif
2222
23extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
24 size_t __buflen)
25 __wur __attr_access ((__write_only__, 2, 3));
26extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,
27 size_t __nbytes), read)
28 __wur __attr_access ((__write_only__, 2, 3));
29extern ssize_t __REDIRECT (__read_chk_warn,
30 (int __fd, void *__buf, size_t __nbytes,
31 size_t __buflen), __read_chk)
32 __wur __warnattr ("read called with bigger length than size of "
33 "the destination buffer");
23# include <bits/unistd-decl.h>
3424
3525__fortify_function __wur ssize_t
3626read (int __fd, void *__buf, size_t __nbytes)
3727{
38 if (__glibc_objsize0 (__buf) != (size_t) -1)
39 {
40 if (!__builtin_constant_p (__nbytes))
41 return __read_chk (__fd, __buf, __nbytes, __glibc_objsize0 (__buf));
42
43 if (__nbytes > __glibc_objsize0 (__buf))
44 return __read_chk_warn (__fd, __buf, __nbytes,
45 __glibc_objsize0 (__buf));
46 }
47 return __read_alias (__fd, __buf, __nbytes);
28 return __glibc_fortify (read, __nbytes, sizeof (char),
29 __glibc_objsize0 (__buf),
30 __fd, __buf, __nbytes);
4831}
4932
50#ifdef __USE_UNIX98
51extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
52 __off_t __offset, size_t __bufsize)
53 __wur __attr_access ((__write_only__, 2, 3));
54extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
55 __off64_t __offset, size_t __bufsize)
56 __wur __attr_access ((__write_only__, 2, 3));
57extern ssize_t __REDIRECT (__pread_alias,
58 (int __fd, void *__buf, size_t __nbytes,
59 __off_t __offset), pread)
60 __wur __attr_access ((__write_only__, 2, 3));
61extern ssize_t __REDIRECT (__pread64_alias,
62 (int __fd, void *__buf, size_t __nbytes,
63 __off64_t __offset), pread64)
64 __wur __attr_access ((__write_only__, 2, 3));
65extern ssize_t __REDIRECT (__pread_chk_warn,
66 (int __fd, void *__buf, size_t __nbytes,
67 __off_t __offset, size_t __bufsize), __pread_chk)
68 __wur __warnattr ("pread called with bigger length than size of "
69 "the destination buffer");
70extern ssize_t __REDIRECT (__pread64_chk_warn,
71 (int __fd, void *__buf, size_t __nbytes,
72 __off64_t __offset, size_t __bufsize),
73 __pread64_chk)
74 __wur __warnattr ("pread64 called with bigger length than size of "
75 "the destination buffer");
76
33#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
7734# ifndef __USE_FILE_OFFSET64
7835__fortify_function __wur ssize_t
7936pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
8037{
81 if (__glibc_objsize0 (__buf) != (size_t) -1)
82 {
83 if (!__builtin_constant_p (__nbytes))
84 return __pread_chk (__fd, __buf, __nbytes, __offset,
85 __glibc_objsize0 (__buf));
86
87 if ( __nbytes > __glibc_objsize0 (__buf))
88 return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
89 __glibc_objsize0 (__buf));
90 }
91 return __pread_alias (__fd, __buf, __nbytes, __offset);
38 return __glibc_fortify (pread, __nbytes, sizeof (char),
39 __glibc_objsize0 (__buf),
40 __fd, __buf, __nbytes, __offset);
9241}
9342# else
9443__fortify_function __wur ssize_t
9544pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
9645{
97 if (__glibc_objsize0 (__buf) != (size_t) -1)
98 {
99 if (!__builtin_constant_p (__nbytes))
100 return __pread64_chk (__fd, __buf, __nbytes, __offset,
101 __glibc_objsize0 (__buf));
102
103 if ( __nbytes > __glibc_objsize0 (__buf))
104 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
105 __glibc_objsize0 (__buf));
106 }
107
108 return __pread64_alias (__fd, __buf, __nbytes, __offset);
46 return __glibc_fortify (pread64, __nbytes, sizeof (char),
47 __glibc_objsize0 (__buf),
48 __fd, __buf, __nbytes, __offset);
10949}
11050# endif
11151
......@@ -113,123 +53,44 @@ pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
11353__fortify_function __wur ssize_t
11454pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
11555{
116 if (__glibc_objsize0 (__buf) != (size_t) -1)
117 {
118 if (!__builtin_constant_p (__nbytes))
119 return __pread64_chk (__fd, __buf, __nbytes, __offset,
120 __glibc_objsize0 (__buf));
121
122 if ( __nbytes > __glibc_objsize0 (__buf))
123 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
124 __glibc_objsize0 (__buf));
125 }
126
127 return __pread64_alias (__fd, __buf, __nbytes, __offset);
56 return __glibc_fortify (pread64, __nbytes, sizeof (char),
57 __glibc_objsize0 (__buf),
58 __fd, __buf, __nbytes, __offset);
12859}
12960# endif
13061#endif
13162
13263#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
133extern ssize_t __readlink_chk (const char *__restrict __path,
134 char *__restrict __buf, size_t __len,
135 size_t __buflen)
136 __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
137extern ssize_t __REDIRECT_NTH (__readlink_alias,
138 (const char *__restrict __path,
139 char *__restrict __buf, size_t __len), readlink)
140 __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
141extern ssize_t __REDIRECT_NTH (__readlink_chk_warn,
142 (const char *__restrict __path,
143 char *__restrict __buf, size_t __len,
144 size_t __buflen), __readlink_chk)
145 __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length "
146 "than size of destination buffer");
147
14864__fortify_function __nonnull ((1, 2)) __wur ssize_t
14965__NTH (readlink (const char *__restrict __path, char *__restrict __buf,
15066 size_t __len))
15167{
152 if (__glibc_objsize (__buf) != (size_t) -1)
153 {
154 if (!__builtin_constant_p (__len))
155 return __readlink_chk (__path, __buf, __len, __glibc_objsize (__buf));
156
157 if ( __len > __glibc_objsize (__buf))
158 return __readlink_chk_warn (__path, __buf, __len,
159 __glibc_objsize (__buf));
160 }
161 return __readlink_alias (__path, __buf, __len);
68 return __glibc_fortify (readlink, __len, sizeof (char),
69 __glibc_objsize (__buf),
70 __path, __buf, __len);
16271}
16372#endif
16473
16574#ifdef __USE_ATFILE
166extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
167 char *__restrict __buf, size_t __len,
168 size_t __buflen)
169 __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
170extern ssize_t __REDIRECT_NTH (__readlinkat_alias,
171 (int __fd, const char *__restrict __path,
172 char *__restrict __buf, size_t __len),
173 readlinkat)
174 __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
175extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn,
176 (int __fd, const char *__restrict __path,
177 char *__restrict __buf, size_t __len,
178 size_t __buflen), __readlinkat_chk)
179 __nonnull ((2, 3)) __wur __warnattr ("readlinkat called with bigger "
180 "length than size of destination "
181 "buffer");
182
18375__fortify_function __nonnull ((2, 3)) __wur ssize_t
18476__NTH (readlinkat (int __fd, const char *__restrict __path,
18577 char *__restrict __buf, size_t __len))
18678{
187 if (__glibc_objsize (__buf) != (size_t) -1)
188 {
189 if (!__builtin_constant_p (__len))
190 return __readlinkat_chk (__fd, __path, __buf, __len,
191 __glibc_objsize (__buf));
192
193 if (__len > __glibc_objsize (__buf))
194 return __readlinkat_chk_warn (__fd, __path, __buf, __len,
195 __glibc_objsize (__buf));
196 }
197 return __readlinkat_alias (__fd, __path, __buf, __len);
79 return __glibc_fortify (readlinkat, __len, sizeof (char),
80 __glibc_objsize (__buf),
81 __fd, __path, __buf, __len);
19882}
19983#endif
20084
201extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
202 __THROW __wur __attr_access ((__write_only__, 1, 2));
203extern char *__REDIRECT_NTH (__getcwd_alias,
204 (char *__buf, size_t __size), getcwd)
205 __wur __attr_access ((__write_only__, 1, 2));
206extern char *__REDIRECT_NTH (__getcwd_chk_warn,
207 (char *__buf, size_t __size, size_t __buflen),
208 __getcwd_chk)
209 __wur __warnattr ("getcwd caller with bigger length than size of "
210 "destination buffer");
211
21285__fortify_function __wur char *
21386__NTH (getcwd (char *__buf, size_t __size))
21487{
215 if (__glibc_objsize (__buf) != (size_t) -1)
216 {
217 if (!__builtin_constant_p (__size))
218 return __getcwd_chk (__buf, __size, __glibc_objsize (__buf));
219
220 if (__size > __glibc_objsize (__buf))
221 return __getcwd_chk_warn (__buf, __size, __glibc_objsize (__buf));
222 }
223 return __getcwd_alias (__buf, __size);
88 return __glibc_fortify (getcwd, __size, sizeof (char),
89 __glibc_objsize (__buf),
90 __buf, __size);
22491}
22592
22693#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
227extern char *__getwd_chk (char *__buf, size_t buflen)
228 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
229extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd)
230 __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd "
231 "doesn't specify buffer size");
232
23394__fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char *
23495__NTH (getwd (char *__buf))
23596{
......@@ -239,171 +100,61 @@ __NTH (getwd (char *__buf))
239100}
240101#endif
241102
242extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
243 size_t __buflen) __THROW
244 __attr_access ((__write_only__, 2, 3));
245extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf,
246 size_t __len), confstr)
247 __attr_access ((__write_only__, 2, 3));
248extern size_t __REDIRECT_NTH (__confstr_chk_warn,
249 (int __name, char *__buf, size_t __len,
250 size_t __buflen), __confstr_chk)
251 __warnattr ("confstr called with bigger length than size of destination "
252 "buffer");
253
254103__fortify_function size_t
255104__NTH (confstr (int __name, char *__buf, size_t __len))
256105{
257 if (__glibc_objsize (__buf) != (size_t) -1)
258 {
259 if (!__builtin_constant_p (__len))
260 return __confstr_chk (__name, __buf, __len, __glibc_objsize (__buf));
261
262 if (__glibc_objsize (__buf) < __len)
263 return __confstr_chk_warn (__name, __buf, __len,
264 __glibc_objsize (__buf));
265 }
266 return __confstr_alias (__name, __buf, __len);
106 return __glibc_fortify (confstr, __len, sizeof (char),
107 __glibc_objsize (__buf),
108 __name, __buf, __len);
267109}
268110
269111
270extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
271 __THROW __wur __attr_access ((__write_only__, 2, 1));
272extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]),
273 getgroups) __wur __attr_access ((__write_only__, 2, 1));
274extern int __REDIRECT_NTH (__getgroups_chk_warn,
275 (int __size, __gid_t __list[], size_t __listlen),
276 __getgroups_chk)
277 __wur __warnattr ("getgroups called with bigger group count than what "
278 "can fit into destination buffer");
279
280112__fortify_function int
281113__NTH (getgroups (int __size, __gid_t __list[]))
282114{
283 if (__glibc_objsize (__list) != (size_t) -1)
284 {
285 if (!__builtin_constant_p (__size) || __size < 0)
286 return __getgroups_chk (__size, __list, __glibc_objsize (__list));
287
288 if (__size * sizeof (__gid_t) > __glibc_objsize (__list))
289 return __getgroups_chk_warn (__size, __list, __glibc_objsize (__list));
290 }
291 return __getgroups_alias (__size, __list);
115 return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
116 __glibc_objsize (__list),
117 __size, __list);
292118}
293119
294120
295extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
296 size_t __nreal) __THROW __nonnull ((2))
297 __attr_access ((__write_only__, 2, 3));
298extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf,
299 size_t __buflen), ttyname_r)
300 __nonnull ((2));
301extern int __REDIRECT_NTH (__ttyname_r_chk_warn,
302 (int __fd, char *__buf, size_t __buflen,
303 size_t __nreal), __ttyname_r_chk)
304 __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than "
305 "size of destination buffer");
306
307121__fortify_function int
308122__NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
309123{
310 if (__glibc_objsize (__buf) != (size_t) -1)
311 {
312 if (!__builtin_constant_p (__buflen))
313 return __ttyname_r_chk (__fd, __buf, __buflen,
314 __glibc_objsize (__buf));
315
316 if (__buflen > __glibc_objsize (__buf))
317 return __ttyname_r_chk_warn (__fd, __buf, __buflen,
318 __glibc_objsize (__buf));
319 }
320 return __ttyname_r_alias (__fd, __buf, __buflen);
124 return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
125 __glibc_objsize (__buf),
126 __fd, __buf, __buflen);
321127}
322128
323129
324130#ifdef __USE_POSIX199506
325extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
326 __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
327extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen),
328 getlogin_r) __nonnull ((1));
329extern int __REDIRECT (__getlogin_r_chk_warn,
330 (char *__buf, size_t __buflen, size_t __nreal),
331 __getlogin_r_chk)
332 __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than "
333 "size of destination buffer");
334
335131__fortify_function int
336132getlogin_r (char *__buf, size_t __buflen)
337133{
338 if (__glibc_objsize (__buf) != (size_t) -1)
339 {
340 if (!__builtin_constant_p (__buflen))
341 return __getlogin_r_chk (__buf, __buflen, __glibc_objsize (__buf));
342
343 if (__buflen > __glibc_objsize (__buf))
344 return __getlogin_r_chk_warn (__buf, __buflen,
345 __glibc_objsize (__buf));
346 }
347 return __getlogin_r_alias (__buf, __buflen);
134 return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
135 __glibc_objsize (__buf),
136 __buf, __buflen);
348137}
349138#endif
350139
351140
352141#if defined __USE_MISC || defined __USE_UNIX98
353extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
354 __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
355extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen),
356 gethostname)
357 __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
358extern int __REDIRECT_NTH (__gethostname_chk_warn,
359 (char *__buf, size_t __buflen, size_t __nreal),
360 __gethostname_chk)
361 __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than "
362 "size of destination buffer");
363
364142__fortify_function int
365143__NTH (gethostname (char *__buf, size_t __buflen))
366144{
367 if (__glibc_objsize (__buf) != (size_t) -1)
368 {
369 if (!__builtin_constant_p (__buflen))
370 return __gethostname_chk (__buf, __buflen, __glibc_objsize (__buf));
371
372 if (__buflen > __glibc_objsize (__buf))
373 return __gethostname_chk_warn (__buf, __buflen,
374 __glibc_objsize (__buf));
375 }
376 return __gethostname_alias (__buf, __buflen);
145 return __glibc_fortify (gethostname, __buflen, sizeof (char),
146 __glibc_objsize (__buf),
147 __buf, __buflen);
377148}
378149#endif
379150
380151
381152#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98)
382extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
383 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
384extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf,
385 size_t __buflen),
386 getdomainname) __nonnull ((1))
387 __wur __attr_access ((__write_only__, 1, 2));
388extern int __REDIRECT_NTH (__getdomainname_chk_warn,
389 (char *__buf, size_t __buflen, size_t __nreal),
390 __getdomainname_chk)
391 __nonnull ((1)) __wur __warnattr ("getdomainname called with bigger "
392 "buflen than size of destination "
393 "buffer");
394
395153__fortify_function int
396154__NTH (getdomainname (char *__buf, size_t __buflen))
397155{
398 if (__glibc_objsize (__buf) != (size_t) -1)
399 {
400 if (!__builtin_constant_p (__buflen))
401 return __getdomainname_chk (__buf, __buflen, __glibc_objsize (__buf));
402
403 if (__buflen > __glibc_objsize (__buf))
404 return __getdomainname_chk_warn (__buf, __buflen,
405 __glibc_objsize (__buf));
406 }
407 return __getdomainname_alias (__buf, __buflen);
156 return __glibc_fortify (getdomainname, __buflen, sizeof (char),
157 __glibc_objsize (__buf),
158 __buf, __buflen);
408159}
409160#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/unistd_ext.h+1-10
......@@ -1,5 +1,5 @@
11/* System-specific extensions of <unistd.h>, Linux version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 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
......@@ -47,13 +47,4 @@ extern __pid_t gettid (void) __THROW;
4747# define CLOSE_RANGE_CLOEXEC (1U << 2)
4848#endif
4949
50/* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS
51 are define by the CLOSE_RANGE prefix. This function behaves like close
52 on the range, but in a fail-safe where it will either fail and not close
53 any file descriptor or close all of them. Gaps where the file descriptor
54 is invalid are ignored. Returns 0 on successor or -1 for failure (and
55 sets errno accordingly). */
56extern int close_range (unsigned int __fd, unsigned int __max_fd,
57 int __flags) __THROW;
58
5950#endif /* __USE_GNU */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/utmp.h+1-1
......@@ -1,5 +1,5 @@
11/* The `struct utmp' type, describing entries in the utmp file.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/utmpx.h+1-1
......@@ -1,5 +1,5 @@
11/* Structures and definitions for the user accounting database. GNU version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/utsname.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/waitflags.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions of flag bits for `waitpid' et al.
2 Copyright (C) 1992-2021 Free Software Foundation, Inc.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/waitstatus.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions of status bits for `wait' et al.
2 Copyright (C) 1992-2021 Free Software Foundation, Inc.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/wchar-ldbl.h+25-1
......@@ -1,5 +1,5 @@
11/* -mlong-double-64 compatibility mode for <wchar.h> functions.
2 Copyright (C) 2006-2021 Free Software Foundation, Inc.
2 Copyright (C) 2006-2023 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
......@@ -29,13 +29,25 @@ __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)
33__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc23_fwscanf)
34__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc23_wscanf)
35__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc23_swscanf)
36# else
3237__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf)
3338__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
3439__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
40# endif
3541# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
42# if __GLIBC_USE (C2X_STRTOL)
43__LDBL_REDIR1_DECL (fwscanf, __isoc23_fwscanfieee128)
44__LDBL_REDIR1_DECL (wscanf, __isoc23_wscanfieee128)
45__LDBL_REDIR1_DECL (swscanf, __isoc23_swscanfieee128)
46# else
3647__LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128)
3748__LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128)
3849__LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128)
50# endif
3951# else
4052# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
4153# endif
......@@ -54,13 +66,25 @@ __LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
5466# endif
5567# if !__GLIBC_USE (DEPRECATED_SCANF)
5668# if defined __LDBL_COMPAT
69# if __GLIBC_USE (C2X_STRTOL)
70__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc23_vfwscanf)
71__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc23_vwscanf)
72__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc23_vswscanf)
73# else
5774__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)
5875__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
5976__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
77# endif
6078# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
79# if __GLIBC_USE (C2X_STRTOL)
80__LDBL_REDIR1_DECL (vfwscanf, __isoc23_vfwscanfieee128)
81__LDBL_REDIR1_DECL (vwscanf, __isoc23_vwscanfieee128)
82__LDBL_REDIR1_DECL (vswscanf, __isoc23_vswscanfieee128)
83# else
6184__LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128)
6285__LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128)
6386__LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128)
87# endif
6488# else
6589# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
6690# endif
lib/libc/include/generic-glibc/bits/wchar.h+1-1
......@@ -1,5 +1,5 @@
11/* wchar_t type related definitions.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/wchar2-decl.h created+296
......@@ -0,0 +1,296 @@
1/* Checking macros for wchar functions. Declarations only.
2 Copyright (C) 2004-2023 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_WCHAR2_DECL_H
20#define _BITS_WCHAR2_DECL_H 1
21
22#ifndef _WCHAR_H
23# error "Never include <bits/wchar2-decl.h> directly; use <wchar.h> instead."
24#endif
25
26
27extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1,
28 const wchar_t *__restrict __s2, size_t __n,
29 size_t __ns1) __THROW;
30extern wchar_t *__REDIRECT_NTH (__wmemcpy_alias,
31 (wchar_t *__restrict __s1,
32 const wchar_t *__restrict __s2, size_t __n),
33 wmemcpy);
34extern wchar_t *__REDIRECT_NTH (__wmemcpy_chk_warn,
35 (wchar_t *__restrict __s1,
36 const wchar_t *__restrict __s2, size_t __n,
37 size_t __ns1), __wmemcpy_chk)
38 __warnattr ("wmemcpy called with length bigger than size of destination "
39 "buffer");
40
41extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2,
42 size_t __n, size_t __ns1) __THROW;
43extern wchar_t *__REDIRECT_NTH (__wmemmove_alias, (wchar_t *__s1,
44 const wchar_t *__s2,
45 size_t __n), wmemmove);
46extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
47 (wchar_t *__s1, const wchar_t *__s2,
48 size_t __n, size_t __ns1), __wmemmove_chk)
49 __warnattr ("wmemmove called with length bigger than size of destination "
50 "buffer");
51
52
53#ifdef __USE_GNU
54
55extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1,
56 const wchar_t *__restrict __s2, size_t __n,
57 size_t __ns1) __THROW;
58extern wchar_t *__REDIRECT_NTH (__wmempcpy_alias,
59 (wchar_t *__restrict __s1,
60 const wchar_t *__restrict __s2,
61 size_t __n), wmempcpy);
62extern wchar_t *__REDIRECT_NTH (__wmempcpy_chk_warn,
63 (wchar_t *__restrict __s1,
64 const wchar_t *__restrict __s2, size_t __n,
65 size_t __ns1), __wmempcpy_chk)
66 __warnattr ("wmempcpy called with length bigger than size of destination "
67 "buffer");
68
69#endif
70
71
72extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
73 size_t __ns) __THROW;
74extern wchar_t *__REDIRECT_FORTIFY_NTH (__wmemset_alias, (wchar_t *__s, wchar_t __c,
75 size_t __n), wmemset);
76extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn,
77 (wchar_t *__s, wchar_t __c, size_t __n,
78 size_t __ns), __wmemset_chk)
79 __warnattr ("wmemset called with length bigger than size of destination "
80 "buffer");
81
82extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest,
83 const wchar_t *__restrict __src,
84 size_t __n) __THROW;
85extern wchar_t *__REDIRECT_NTH (__wcscpy_alias,
86 (wchar_t *__restrict __dest,
87 const wchar_t *__restrict __src), wcscpy);
88
89extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
90 const wchar_t *__restrict __src,
91 size_t __destlen) __THROW;
92extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
93 (wchar_t *__restrict __dest,
94 const wchar_t *__restrict __src), wcpcpy);
95
96extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest,
97 const wchar_t *__restrict __src, size_t __n,
98 size_t __destlen) __THROW;
99extern wchar_t *__REDIRECT_NTH (__wcsncpy_alias,
100 (wchar_t *__restrict __dest,
101 const wchar_t *__restrict __src,
102 size_t __n), wcsncpy);
103extern wchar_t *__REDIRECT_NTH (__wcsncpy_chk_warn,
104 (wchar_t *__restrict __dest,
105 const wchar_t *__restrict __src,
106 size_t __n, size_t __destlen), __wcsncpy_chk)
107 __warnattr ("wcsncpy called with length bigger than size of destination "
108 "buffer");
109
110extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest,
111 const wchar_t *__restrict __src, size_t __n,
112 size_t __destlen) __THROW;
113
114extern wchar_t *__REDIRECT_NTH (__wcpncpy_alias,
115 (wchar_t *__restrict __dest,
116 const wchar_t *__restrict __src,
117 size_t __n), wcpncpy);
118extern wchar_t *__REDIRECT_NTH (__wcpncpy_chk_warn,
119 (wchar_t *__restrict __dest,
120 const wchar_t *__restrict __src,
121 size_t __n, size_t __destlen), __wcpncpy_chk)
122 __warnattr ("wcpncpy called with length bigger than size of destination "
123 "buffer");
124
125extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest,
126 const wchar_t *__restrict __src,
127 size_t __destlen) __THROW;
128extern wchar_t *__REDIRECT_NTH (__wcscat_alias,
129 (wchar_t *__restrict __dest,
130 const wchar_t *__restrict __src), wcscat);
131
132extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest,
133 const wchar_t *__restrict __src,
134 size_t __n, size_t __destlen) __THROW;
135extern wchar_t *__REDIRECT_NTH (__wcsncat_alias,
136 (wchar_t *__restrict __dest,
137 const wchar_t *__restrict __src,
138 size_t __n), wcsncat);
139
140extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
141 int __flag, size_t __s_len,
142 const wchar_t *__restrict __format, ...)
143 __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
144extern int __REDIRECT_NTH_LDBL (__swprintf_alias,
145 (wchar_t *__restrict __s, size_t __n,
146 const wchar_t *__restrict __fmt, ...),
147 swprintf);
148
149extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
150 int __flag, size_t __s_len,
151 const wchar_t *__restrict __format,
152 __gnuc_va_list __arg)
153 __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
154extern int __REDIRECT_NTH_LDBL (__vswprintf_alias,
155 (wchar_t *__restrict __s, size_t __n,
156 const wchar_t *__restrict __fmt,
157 __gnuc_va_list __ap), vswprintf);
158
159
160#if __USE_FORTIFY_LEVEL > 1
161
162extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
163 const wchar_t *__restrict __format, ...);
164extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format,
165 ...);
166extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag,
167 const wchar_t *__restrict __format,
168 __gnuc_va_list __ap);
169extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format,
170 __gnuc_va_list __ap);
171
172#endif
173
174extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n,
175 __FILE *__restrict __stream) __wur;
176extern wchar_t *__REDIRECT (__fgetws_alias,
177 (wchar_t *__restrict __s, int __n,
178 __FILE *__restrict __stream), fgetws) __wur;
179extern wchar_t *__REDIRECT (__fgetws_chk_warn,
180 (wchar_t *__restrict __s, size_t __size, int __n,
181 __FILE *__restrict __stream), __fgetws_chk)
182 __wur __warnattr ("fgetws called with bigger size than length "
183 "of destination buffer");
184
185#ifdef __USE_GNU
186
187extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size,
188 int __n, __FILE *__restrict __stream)
189 __wur;
190extern wchar_t *__REDIRECT (__fgetws_unlocked_alias,
191 (wchar_t *__restrict __s, int __n,
192 __FILE *__restrict __stream), fgetws_unlocked)
193 __wur;
194extern wchar_t *__REDIRECT (__fgetws_unlocked_chk_warn,
195 (wchar_t *__restrict __s, size_t __size, int __n,
196 __FILE *__restrict __stream),
197 __fgetws_unlocked_chk)
198 __wur __warnattr ("fgetws_unlocked called with bigger size than length "
199 "of destination buffer");
200
201#endif
202
203extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
204 mbstate_t *__restrict __p,
205 size_t __buflen) __THROW __wur;
206extern size_t __REDIRECT_FORTIFY_NTH (__wcrtomb_alias,
207 (char *__restrict __s, wchar_t __wchar,
208 mbstate_t *__restrict __ps), wcrtomb) __wur;
209
210extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst,
211 const char **__restrict __src,
212 size_t __len, mbstate_t *__restrict __ps,
213 size_t __dstlen) __THROW;
214extern size_t __REDIRECT_NTH (__mbsrtowcs_alias,
215 (wchar_t *__restrict __dst,
216 const char **__restrict __src,
217 size_t __len, mbstate_t *__restrict __ps),
218 mbsrtowcs);
219extern size_t __REDIRECT_NTH (__mbsrtowcs_chk_warn,
220 (wchar_t *__restrict __dst,
221 const char **__restrict __src,
222 size_t __len, mbstate_t *__restrict __ps,
223 size_t __dstlen), __mbsrtowcs_chk)
224 __warnattr ("mbsrtowcs called with dst buffer smaller than len "
225 "* sizeof (wchar_t)");
226
227extern size_t __wcsrtombs_chk (char *__restrict __dst,
228 const wchar_t **__restrict __src,
229 size_t __len, mbstate_t *__restrict __ps,
230 size_t __dstlen) __THROW;
231extern size_t __REDIRECT_NTH (__wcsrtombs_alias,
232 (char *__restrict __dst,
233 const wchar_t **__restrict __src,
234 size_t __len, mbstate_t *__restrict __ps),
235 wcsrtombs);
236extern size_t __REDIRECT_NTH (__wcsrtombs_chk_warn,
237 (char *__restrict __dst,
238 const wchar_t **__restrict __src,
239 size_t __len, mbstate_t *__restrict __ps,
240 size_t __dstlen), __wcsrtombs_chk)
241 __warnattr ("wcsrtombs called with dst buffer smaller than len");
242
243#ifdef __USE_XOPEN2K8
244
245extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst,
246 const char **__restrict __src, size_t __nmc,
247 size_t __len, mbstate_t *__restrict __ps,
248 size_t __dstlen) __THROW;
249extern size_t __REDIRECT_NTH (__mbsnrtowcs_alias,
250 (wchar_t *__restrict __dst,
251 const char **__restrict __src, size_t __nmc,
252 size_t __len, mbstate_t *__restrict __ps),
253 mbsnrtowcs);
254extern size_t __REDIRECT_NTH (__mbsnrtowcs_chk_warn,
255 (wchar_t *__restrict __dst,
256 const char **__restrict __src, size_t __nmc,
257 size_t __len, mbstate_t *__restrict __ps,
258 size_t __dstlen), __mbsnrtowcs_chk)
259 __warnattr ("mbsnrtowcs called with dst buffer smaller than len "
260 "* sizeof (wchar_t)");
261
262extern size_t __wcsnrtombs_chk (char *__restrict __dst,
263 const wchar_t **__restrict __src,
264 size_t __nwc, size_t __len,
265 mbstate_t *__restrict __ps, size_t __dstlen)
266 __THROW;
267extern size_t __REDIRECT_NTH (__wcsnrtombs_alias,
268 (char *__restrict __dst,
269 const wchar_t **__restrict __src,
270 size_t __nwc, size_t __len,
271 mbstate_t *__restrict __ps), wcsnrtombs);
272extern size_t __REDIRECT_NTH (__wcsnrtombs_chk_warn,
273 (char *__restrict __dst,
274 const wchar_t **__restrict __src,
275 size_t __nwc, size_t __len,
276 mbstate_t *__restrict __ps,
277 size_t __dstlen), __wcsnrtombs_chk)
278 __warnattr ("wcsnrtombs called with dst buffer smaller than len");
279
280#endif
281
282#ifdef __USE_MISC
283extern size_t __wcslcpy_chk (wchar_t *__dest, const wchar_t *__src, size_t __n,
284 size_t __destlen) __THROW;
285extern size_t __REDIRECT_NTH (__wcslcpy_alias,
286 (wchar_t *__dest, const wchar_t *__src,
287 size_t __n), wcslcpy);
288
289extern size_t __wcslcat_chk (wchar_t *__dest, const wchar_t *__src, size_t __n,
290 size_t __destlen) __THROW;
291extern size_t __REDIRECT_NTH (__wcslcat_alias,
292 (wchar_t *__dest, const wchar_t *__src,
293 size_t __n), wcslcat);
294#endif /* __USE_MISC */
295
296#endif /* bits/wchar2-decl.h. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/wchar2.h+89-411
......@@ -1,5 +1,5 @@
11/* Checking macros for wchar functions.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
......@@ -20,283 +20,134 @@
2020# error "Never include <bits/wchar2.h> directly; use <wchar.h> instead."
2121#endif
2222
23
24extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1,
25 const wchar_t *__restrict __s2, size_t __n,
26 size_t __ns1) __THROW;
27extern wchar_t *__REDIRECT_NTH (__wmemcpy_alias,
28 (wchar_t *__restrict __s1,
29 const wchar_t *__restrict __s2, size_t __n),
30 wmemcpy);
31extern wchar_t *__REDIRECT_NTH (__wmemcpy_chk_warn,
32 (wchar_t *__restrict __s1,
33 const wchar_t *__restrict __s2, size_t __n,
34 size_t __ns1), __wmemcpy_chk)
35 __warnattr ("wmemcpy called with length bigger than size of destination "
36 "buffer");
37
3823__fortify_function wchar_t *
3924__NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
4025 size_t __n))
4126{
42 if (__glibc_objsize0 (__s1) != (size_t) -1)
43 {
44 if (!__builtin_constant_p (__n))
45 return __wmemcpy_chk (__s1, __s2, __n,
46 __glibc_objsize0 (__s1) / sizeof (wchar_t));
47
48 if (__n > __glibc_objsize0 (__s1) / sizeof (wchar_t))
49 return __wmemcpy_chk_warn (__s1, __s2, __n,
50 __glibc_objsize0 (__s1) / sizeof (wchar_t));
51 }
52 return __wmemcpy_alias (__s1, __s2, __n);
27 return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
28 __glibc_objsize0 (__s1),
29 __s1, __s2, __n);
5330}
5431
55
56extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2,
57 size_t __n, size_t __ns1) __THROW;
58extern wchar_t *__REDIRECT_NTH (__wmemmove_alias, (wchar_t *__s1,
59 const wchar_t *__s2,
60 size_t __n), wmemmove);
61extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn,
62 (wchar_t *__s1, const wchar_t *__s2,
63 size_t __n, size_t __ns1), __wmemmove_chk)
64 __warnattr ("wmemmove called with length bigger than size of destination "
65 "buffer");
66
6732__fortify_function wchar_t *
6833__NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
6934{
70 if (__glibc_objsize0 (__s1) != (size_t) -1)
71 {
72 if (!__builtin_constant_p (__n))
73 return __wmemmove_chk (__s1, __s2, __n,
74 __glibc_objsize0 (__s1) / sizeof (wchar_t));
75
76 if (__n > __glibc_objsize0 (__s1) / sizeof (wchar_t))
77 return __wmemmove_chk_warn (__s1, __s2, __n,
78 (__glibc_objsize0 (__s1)
79 / sizeof (wchar_t)));
80 }
81 return __wmemmove_alias (__s1, __s2, __n);
35 return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
36 __glibc_objsize0 (__s1),
37 __s1, __s2, __n);
8238}
8339
84
8540#ifdef __USE_GNU
86extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1,
87 const wchar_t *__restrict __s2, size_t __n,
88 size_t __ns1) __THROW;
89extern wchar_t *__REDIRECT_NTH (__wmempcpy_alias,
90 (wchar_t *__restrict __s1,
91 const wchar_t *__restrict __s2,
92 size_t __n), wmempcpy);
93extern wchar_t *__REDIRECT_NTH (__wmempcpy_chk_warn,
94 (wchar_t *__restrict __s1,
95 const wchar_t *__restrict __s2, size_t __n,
96 size_t __ns1), __wmempcpy_chk)
97 __warnattr ("wmempcpy called with length bigger than size of destination "
98 "buffer");
99
10041__fortify_function wchar_t *
10142__NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
10243 size_t __n))
10344{
104 if (__glibc_objsize0 (__s1) != (size_t) -1)
105 {
106 if (!__builtin_constant_p (__n))
107 return __wmempcpy_chk (__s1, __s2, __n,
108 __glibc_objsize0 (__s1) / sizeof (wchar_t));
109
110 if (__n > __glibc_objsize0 (__s1) / sizeof (wchar_t))
111 return __wmempcpy_chk_warn (__s1, __s2, __n,
112 (__glibc_objsize0 (__s1)
113 / sizeof (wchar_t)));
114 }
115 return __wmempcpy_alias (__s1, __s2, __n);
45 return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
46 __glibc_objsize0 (__s1),
47 __s1, __s2, __n);
11648}
11749#endif
11850
119
120extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
121 size_t __ns) __THROW;
122extern wchar_t *__REDIRECT_NTH (__wmemset_alias, (wchar_t *__s, wchar_t __c,
123 size_t __n), wmemset);
124extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn,
125 (wchar_t *__s, wchar_t __c, size_t __n,
126 size_t __ns), __wmemset_chk)
127 __warnattr ("wmemset called with length bigger than size of destination "
128 "buffer");
129
13051__fortify_function wchar_t *
13152__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
13253{
133 if (__glibc_objsize0 (__s) != (size_t) -1)
134 {
135 if (!__builtin_constant_p (__n))
136 return __wmemset_chk (__s, __c, __n,
137 __glibc_objsize0 (__s) / sizeof (wchar_t));
138
139 if (__n > __glibc_objsize0 (__s) / sizeof (wchar_t))
140 return __wmemset_chk_warn (__s, __c, __n,
141 __glibc_objsize0 (__s) / sizeof (wchar_t));
142 }
143 return __wmemset_alias (__s, __c, __n);
54 return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
55 __glibc_objsize0 (__s),
56 __s, __c, __n);
14457}
14558
146
147extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest,
148 const wchar_t *__restrict __src,
149 size_t __n) __THROW;
150extern wchar_t *__REDIRECT_NTH (__wcscpy_alias,
151 (wchar_t *__restrict __dest,
152 const wchar_t *__restrict __src), wcscpy);
153
15459__fortify_function wchar_t *
15560__NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
15661{
157 if (__glibc_objsize (__dest) != (size_t) -1)
158 return __wcscpy_chk (__dest, __src,
159 __glibc_objsize (__dest) / sizeof (wchar_t));
62 size_t sz = __glibc_objsize (__dest);
63 if (sz != (size_t) -1)
64 return __wcscpy_chk (__dest, __src, sz / sizeof (wchar_t));
16065 return __wcscpy_alias (__dest, __src);
16166}
16267
163
164extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
165 const wchar_t *__restrict __src,
166 size_t __destlen) __THROW;
167extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
168 (wchar_t *__restrict __dest,
169 const wchar_t *__restrict __src), wcpcpy);
170
17168__fortify_function wchar_t *
17269__NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
17370{
174 if (__glibc_objsize (__dest) != (size_t) -1)
175 return __wcpcpy_chk (__dest, __src,
176 __glibc_objsize (__dest) / sizeof (wchar_t));
71 size_t sz = __glibc_objsize (__dest);
72 if (sz != (size_t) -1)
73 return __wcpcpy_chk (__dest, __src, sz / sizeof (wchar_t));
17774 return __wcpcpy_alias (__dest, __src);
17875}
17976
180
181extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest,
182 const wchar_t *__restrict __src, size_t __n,
183 size_t __destlen) __THROW;
184extern wchar_t *__REDIRECT_NTH (__wcsncpy_alias,
185 (wchar_t *__restrict __dest,
186 const wchar_t *__restrict __src,
187 size_t __n), wcsncpy);
188extern wchar_t *__REDIRECT_NTH (__wcsncpy_chk_warn,
189 (wchar_t *__restrict __dest,
190 const wchar_t *__restrict __src,
191 size_t __n, size_t __destlen), __wcsncpy_chk)
192 __warnattr ("wcsncpy called with length bigger than size of destination "
193 "buffer");
194
19577__fortify_function wchar_t *
19678__NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
19779 size_t __n))
19880{
199 if (__glibc_objsize (__dest) != (size_t) -1)
200 {
201 if (!__builtin_constant_p (__n))
202 return __wcsncpy_chk (__dest, __src, __n,
203 __glibc_objsize (__dest) / sizeof (wchar_t));
204 if (__n > __glibc_objsize (__dest) / sizeof (wchar_t))
205 return __wcsncpy_chk_warn (__dest, __src, __n,
206 (__glibc_objsize (__dest)
207 / sizeof (wchar_t)));
208 }
209 return __wcsncpy_alias (__dest, __src, __n);
81 return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
82 __glibc_objsize (__dest),
83 __dest, __src, __n);
21084}
21185
212
213extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest,
214 const wchar_t *__restrict __src, size_t __n,
215 size_t __destlen) __THROW;
216extern wchar_t *__REDIRECT_NTH (__wcpncpy_alias,
217 (wchar_t *__restrict __dest,
218 const wchar_t *__restrict __src,
219 size_t __n), wcpncpy);
220extern wchar_t *__REDIRECT_NTH (__wcpncpy_chk_warn,
221 (wchar_t *__restrict __dest,
222 const wchar_t *__restrict __src,
223 size_t __n, size_t __destlen), __wcpncpy_chk)
224 __warnattr ("wcpncpy called with length bigger than size of destination "
225 "buffer");
226
22786__fortify_function wchar_t *
22887__NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
22988 size_t __n))
23089{
231 if (__glibc_objsize (__dest) != (size_t) -1)
232 {
233 if (!__builtin_constant_p (__n))
234 return __wcpncpy_chk (__dest, __src, __n,
235 __glibc_objsize (__dest) / sizeof (wchar_t));
236 if (__n > __glibc_objsize (__dest) / sizeof (wchar_t))
237 return __wcpncpy_chk_warn (__dest, __src, __n,
238 (__glibc_objsize (__dest)
239 / sizeof (wchar_t)));
240 }
241 return __wcpncpy_alias (__dest, __src, __n);
90 return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
91 __glibc_objsize (__dest),
92 __dest, __src, __n);
24293}
24394
244
245extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest,
246 const wchar_t *__restrict __src,
247 size_t __destlen) __THROW;
248extern wchar_t *__REDIRECT_NTH (__wcscat_alias,
249 (wchar_t *__restrict __dest,
250 const wchar_t *__restrict __src), wcscat);
251
25295__fortify_function wchar_t *
25396__NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
25497{
255 if (__glibc_objsize (__dest) != (size_t) -1)
256 return __wcscat_chk (__dest, __src,
257 __glibc_objsize (__dest) / sizeof (wchar_t));
98 size_t sz = __glibc_objsize (__dest);
99 if (sz != (size_t) -1)
100 return __wcscat_chk (__dest, __src, sz / sizeof (wchar_t));
258101 return __wcscat_alias (__dest, __src);
259102}
260103
261
262extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest,
263 const wchar_t *__restrict __src,
264 size_t __n, size_t __destlen) __THROW;
265extern wchar_t *__REDIRECT_NTH (__wcsncat_alias,
266 (wchar_t *__restrict __dest,
267 const wchar_t *__restrict __src,
268 size_t __n), wcsncat);
269
270104__fortify_function wchar_t *
271105__NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
272106 size_t __n))
273107{
274 if (__glibc_objsize (__dest) != (size_t) -1)
275 return __wcsncat_chk (__dest, __src, __n,
276 __glibc_objsize (__dest) / sizeof (wchar_t));
108 size_t sz = __glibc_objsize (__dest);
109 if (sz != (size_t) -1)
110 return __wcsncat_chk (__dest, __src, __n, sz / sizeof (wchar_t));
277111 return __wcsncat_alias (__dest, __src, __n);
278112}
279113
114#ifdef __USE_MISC
115__fortify_function size_t
116__NTH (wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
117 size_t __n))
118{
119 if (__glibc_objsize (__dest) != (size_t) -1
120 && (!__builtin_constant_p (__n
121 > __glibc_objsize (__dest) / sizeof (wchar_t))
122 || __n > __glibc_objsize (__dest) / sizeof (wchar_t)))
123 return __wcslcpy_chk (__dest, __src, __n,
124 __glibc_objsize (__dest) / sizeof (wchar_t));
125 return __wcslcpy_alias (__dest, __src, __n);
126}
280127
281extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
282 int __flag, size_t __s_len,
283 const wchar_t *__restrict __format, ...)
284 __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
285
286extern int __REDIRECT_NTH_LDBL (__swprintf_alias,
287 (wchar_t *__restrict __s, size_t __n,
288 const wchar_t *__restrict __fmt, ...),
289 swprintf);
128__fortify_function size_t
129__NTH (wcslcat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
130 size_t __n))
131{
132 if (__glibc_objsize (__dest) != (size_t) -1
133 && (!__builtin_constant_p (__n > __glibc_objsize (__dest)
134 / sizeof (wchar_t))
135 || __n > __glibc_objsize (__dest) / sizeof (wchar_t)))
136 return __wcslcat_chk (__dest, __src, __n,
137 __glibc_objsize (__dest) / sizeof (wchar_t));
138 return __wcslcat_alias (__dest, __src, __n);
139}
140#endif /* __USE_MISC */
290141
291142#ifdef __va_arg_pack
292143__fortify_function int
293144__NTH (swprintf (wchar_t *__restrict __s, size_t __n,
294145 const wchar_t *__restrict __fmt, ...))
295146{
296 if (__glibc_objsize (__s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
147 size_t sz = __glibc_objsize (__s);
148 if (sz != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
297149 return __swprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
298 __glibc_objsize (__s) / sizeof (wchar_t),
299 __fmt, __va_arg_pack ());
150 sz / sizeof (wchar_t), __fmt, __va_arg_pack ());
300151 return __swprintf_alias (__s, __n, __fmt, __va_arg_pack ());
301152}
302153#elif !defined __cplusplus
......@@ -308,41 +159,20 @@ __NTH (swprintf (wchar_t *__restrict __s, size_t __n,
308159 : swprintf (s, n, __VA_ARGS__))
309160#endif
310161
311extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
312 int __flag, size_t __s_len,
313 const wchar_t *__restrict __format,
314 __gnuc_va_list __arg)
315 __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
316
317extern int __REDIRECT_NTH_LDBL (__vswprintf_alias,
318 (wchar_t *__restrict __s, size_t __n,
319 const wchar_t *__restrict __fmt,
320 __gnuc_va_list __ap), vswprintf);
321
322162__fortify_function int
323163__NTH (vswprintf (wchar_t *__restrict __s, size_t __n,
324164 const wchar_t *__restrict __fmt, __gnuc_va_list __ap))
325165{
326 if (__glibc_objsize (__s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
166 size_t sz = __glibc_objsize (__s);
167 if (sz != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
327168 return __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
328 __glibc_objsize (__s) / sizeof (wchar_t), __fmt,
329 __ap);
169 sz / sizeof (wchar_t), __fmt, __ap);
330170 return __vswprintf_alias (__s, __n, __fmt, __ap);
331171}
332172
333173
334174#if __USE_FORTIFY_LEVEL > 1
335175
336extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
337 const wchar_t *__restrict __format, ...);
338extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format,
339 ...);
340extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag,
341 const wchar_t *__restrict __format,
342 __gnuc_va_list __ap);
343extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format,
344 __gnuc_va_list __ap);
345
346176# ifdef __va_arg_pack
347177__fortify_function int
348178wprintf (const wchar_t *__restrict __fmt, ...)
......@@ -377,78 +207,31 @@ vfwprintf (__FILE *__restrict __stream,
377207}
378208
379209#endif
380
381extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n,
382 __FILE *__restrict __stream) __wur;
383extern wchar_t *__REDIRECT (__fgetws_alias,
384 (wchar_t *__restrict __s, int __n,
385 __FILE *__restrict __stream), fgetws) __wur;
386extern wchar_t *__REDIRECT (__fgetws_chk_warn,
387 (wchar_t *__restrict __s, size_t __size, int __n,
388 __FILE *__restrict __stream), __fgetws_chk)
389 __wur __warnattr ("fgetws called with bigger size than length "
390 "of destination buffer");
391
392210__fortify_function __wur wchar_t *
393211fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
394212{
395 if (__glibc_objsize (__s) != (size_t) -1)
396 {
397 if (!__builtin_constant_p (__n) || __n <= 0)
398 return __fgetws_chk (__s, __glibc_objsize (__s) / sizeof (wchar_t),
399 __n, __stream);
400
401 if ((size_t) __n > __glibc_objsize (__s) / sizeof (wchar_t))
402 return __fgetws_chk_warn (__s,
403 __glibc_objsize (__s) / sizeof (wchar_t),
404 __n, __stream);
405 }
406 return __fgetws_alias (__s, __n, __stream);
213 size_t sz = __glibc_objsize (__s);
214 if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz))
215 return __fgetws_alias (__s, __n, __stream);
216 if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz))
217 return __fgetws_chk_warn (__s, sz / sizeof (wchar_t), __n, __stream);
218 return __fgetws_chk (__s, sz / sizeof (wchar_t), __n, __stream);
407219}
408220
409221#ifdef __USE_GNU
410extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size,
411 int __n, __FILE *__restrict __stream)
412 __wur;
413extern wchar_t *__REDIRECT (__fgetws_unlocked_alias,
414 (wchar_t *__restrict __s, int __n,
415 __FILE *__restrict __stream), fgetws_unlocked)
416 __wur;
417extern wchar_t *__REDIRECT (__fgetws_unlocked_chk_warn,
418 (wchar_t *__restrict __s, size_t __size, int __n,
419 __FILE *__restrict __stream),
420 __fgetws_unlocked_chk)
421 __wur __warnattr ("fgetws_unlocked called with bigger size than length "
422 "of destination buffer");
423
424222__fortify_function __wur wchar_t *
425223fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
426224{
427 if (__glibc_objsize (__s) != (size_t) -1)
428 {
429 if (!__builtin_constant_p (__n) || __n <= 0)
430 return __fgetws_unlocked_chk (__s,
431 __glibc_objsize (__s) / sizeof (wchar_t),
432 __n, __stream);
433
434 if ((size_t) __n > __glibc_objsize (__s) / sizeof (wchar_t))
435 return __fgetws_unlocked_chk_warn (__s,
436 (__glibc_objsize (__s)
437 / sizeof (wchar_t)),
438 __n, __stream);
439 }
440 return __fgetws_unlocked_alias (__s, __n, __stream);
225 size_t sz = __glibc_objsize (__s);
226 if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz))
227 return __fgetws_unlocked_alias (__s, __n, __stream);
228 if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz))
229 return __fgetws_unlocked_chk_warn (__s, sz / sizeof (wchar_t), __n,
230 __stream);
231 return __fgetws_unlocked_chk (__s, sz / sizeof (wchar_t), __n, __stream);
441232}
442233#endif
443234
444
445extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
446 mbstate_t *__restrict __p,
447 size_t __buflen) __THROW __wur;
448extern size_t __REDIRECT_NTH (__wcrtomb_alias,
449 (char *__restrict __s, wchar_t __wchar,
450 mbstate_t *__restrict __ps), wcrtomb) __wur;
451
452235__fortify_function __wur size_t
453236__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
454237 mbstate_t *__restrict __ps))
......@@ -466,146 +249,41 @@ __NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
466249 return __wcrtomb_alias (__s, __wchar, __ps);
467250}
468251
469
470extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst,
471 const char **__restrict __src,
472 size_t __len, mbstate_t *__restrict __ps,
473 size_t __dstlen) __THROW;
474extern size_t __REDIRECT_NTH (__mbsrtowcs_alias,
475 (wchar_t *__restrict __dst,
476 const char **__restrict __src,
477 size_t __len, mbstate_t *__restrict __ps),
478 mbsrtowcs);
479extern size_t __REDIRECT_NTH (__mbsrtowcs_chk_warn,
480 (wchar_t *__restrict __dst,
481 const char **__restrict __src,
482 size_t __len, mbstate_t *__restrict __ps,
483 size_t __dstlen), __mbsrtowcs_chk)
484 __warnattr ("mbsrtowcs called with dst buffer smaller than len "
485 "* sizeof (wchar_t)");
486
487252__fortify_function size_t
488253__NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
489254 size_t __len, mbstate_t *__restrict __ps))
490255{
491 if (__glibc_objsize (__dst) != (size_t) -1)
492 {
493 if (!__builtin_constant_p (__len))
494 return __mbsrtowcs_chk (__dst, __src, __len, __ps,
495 __glibc_objsize (__dst) / sizeof (wchar_t));
496
497 if (__len > __glibc_objsize (__dst) / sizeof (wchar_t))
498 return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps,
499 (__glibc_objsize (__dst)
500 / sizeof (wchar_t)));
501 }
502 return __mbsrtowcs_alias (__dst, __src, __len, __ps);
256 return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
257 __glibc_objsize (__dst),
258 __dst, __src, __len, __ps);
503259}
504260
505
506extern size_t __wcsrtombs_chk (char *__restrict __dst,
507 const wchar_t **__restrict __src,
508 size_t __len, mbstate_t *__restrict __ps,
509 size_t __dstlen) __THROW;
510extern size_t __REDIRECT_NTH (__wcsrtombs_alias,
511 (char *__restrict __dst,
512 const wchar_t **__restrict __src,
513 size_t __len, mbstate_t *__restrict __ps),
514 wcsrtombs);
515extern size_t __REDIRECT_NTH (__wcsrtombs_chk_warn,
516 (char *__restrict __dst,
517 const wchar_t **__restrict __src,
518 size_t __len, mbstate_t *__restrict __ps,
519 size_t __dstlen), __wcsrtombs_chk)
520 __warnattr ("wcsrtombs called with dst buffer smaller than len");
521
522261__fortify_function size_t
523262__NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
524263 size_t __len, mbstate_t *__restrict __ps))
525264{
526 if (__glibc_objsize (__dst) != (size_t) -1)
527 {
528 if (!__builtin_constant_p (__len))
529 return __wcsrtombs_chk (__dst, __src, __len, __ps,
530 __glibc_objsize (__dst));
531
532 if (__len > __glibc_objsize (__dst))
533 return __wcsrtombs_chk_warn (__dst, __src, __len, __ps,
534 __glibc_objsize (__dst));
535 }
536 return __wcsrtombs_alias (__dst, __src, __len, __ps);
265 return __glibc_fortify (wcsrtombs, __len, sizeof (char),
266 __glibc_objsize (__dst),
267 __dst, __src, __len, __ps);
537268}
538269
539270
540#ifdef __USE_GNU
541extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst,
542 const char **__restrict __src, size_t __nmc,
543 size_t __len, mbstate_t *__restrict __ps,
544 size_t __dstlen) __THROW;
545extern size_t __REDIRECT_NTH (__mbsnrtowcs_alias,
546 (wchar_t *__restrict __dst,
547 const char **__restrict __src, size_t __nmc,
548 size_t __len, mbstate_t *__restrict __ps),
549 mbsnrtowcs);
550extern size_t __REDIRECT_NTH (__mbsnrtowcs_chk_warn,
551 (wchar_t *__restrict __dst,
552 const char **__restrict __src, size_t __nmc,
553 size_t __len, mbstate_t *__restrict __ps,
554 size_t __dstlen), __mbsnrtowcs_chk)
555 __warnattr ("mbsnrtowcs called with dst buffer smaller than len "
556 "* sizeof (wchar_t)");
557
271#ifdef __USE_XOPEN2K8
558272__fortify_function size_t
559273__NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
560274 size_t __nmc, size_t __len, mbstate_t *__restrict __ps))
561275{
562 if (__glibc_objsize (__dst) != (size_t) -1)
563 {
564 if (!__builtin_constant_p (__len))
565 return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps,
566 __glibc_objsize (__dst) / sizeof (wchar_t));
567
568 if (__len > __glibc_objsize (__dst) / sizeof (wchar_t))
569 return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps,
570 (__glibc_objsize (__dst)
571 / sizeof (wchar_t)));
572 }
573 return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps);
276 return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
277 __glibc_objsize (__dst),
278 __dst, __src, __nmc, __len, __ps);
574279}
575280
576
577extern size_t __wcsnrtombs_chk (char *__restrict __dst,
578 const wchar_t **__restrict __src,
579 size_t __nwc, size_t __len,
580 mbstate_t *__restrict __ps, size_t __dstlen)
581 __THROW;
582extern size_t __REDIRECT_NTH (__wcsnrtombs_alias,
583 (char *__restrict __dst,
584 const wchar_t **__restrict __src,
585 size_t __nwc, size_t __len,
586 mbstate_t *__restrict __ps), wcsnrtombs);
587extern size_t __REDIRECT_NTH (__wcsnrtombs_chk_warn,
588 (char *__restrict __dst,
589 const wchar_t **__restrict __src,
590 size_t __nwc, size_t __len,
591 mbstate_t *__restrict __ps,
592 size_t __dstlen), __wcsnrtombs_chk)
593 __warnattr ("wcsnrtombs called with dst buffer smaller than len");
594
595281__fortify_function size_t
596282__NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
597283 size_t __nwc, size_t __len, mbstate_t *__restrict __ps))
598284{
599 if (__glibc_objsize (__dst) != (size_t) -1)
600 {
601 if (!__builtin_constant_p (__len))
602 return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps,
603 __glibc_objsize (__dst));
604
605 if (__len > __glibc_objsize (__dst))
606 return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps,
607 __glibc_objsize (__dst));
608 }
609 return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps);
285 return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
286 __glibc_objsize (__dst),
287 __dst, __src, __nwc, __len, __ps);
610288}
611289#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/wctype-wchar.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/bits/xopen_lim.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/byteswap.h+1-1
......@@ -1,5 +1,5 @@
11/* Swap byte order for 16, 32 and 64 bit values
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/complex.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/cpio.h+1-1
......@@ -1,6 +1,6 @@
11/* Extended cpio format from POSIX.1.
22 This file is part of the GNU C Library.
3 Copyright (C) 1992-2021 Free Software Foundation, Inc.
3 Copyright (C) 1992-2023 Free Software Foundation, Inc.
44 NOTE: The canonical source of this file is maintained with the GNU cpio.
55
66 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/crypt.h deleted-70
......@@ -1,70 +0,0 @@
1/*
2 * UFC-crypt: ultra fast crypt(3) implementation
3 *
4 * Copyright (C) 1991-2021 Free Software Foundation, Inc.
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 * @(#)crypt.h 1.5 12/20/96
21 *
22 */
23
24#ifndef _CRYPT_H
25#define _CRYPT_H 1
26
27#include <features.h>
28
29__BEGIN_DECLS
30
31/* One-way hash PHRASE, returning a string suitable for storage in the
32 user database. SALT selects the one-way function to use, and
33 ensures that no two users' hashes are the same, even if they use
34 the same passphrase. The return value points to static storage
35 which will be overwritten by the next call to crypt. */
36extern char *crypt (const char *__phrase, const char *__salt)
37 __THROW __nonnull ((1, 2));
38
39#ifdef __USE_GNU
40
41/* This structure provides scratch and output buffers for 'crypt_r'.
42 Its contents should not be accessed directly. */
43struct crypt_data
44 {
45 char keysched[16 * 8];
46 char sb0[32768];
47 char sb1[32768];
48 char sb2[32768];
49 char sb3[32768];
50 /* end-of-aligment-critical-data */
51 char crypt_3_buf[14];
52 char current_salt[2];
53 long int current_saltbits;
54 int direction, initialized;
55 };
56
57/* Thread-safe version of 'crypt'.
58 DATA must point to a 'struct crypt_data' allocated by the caller.
59 Before the first call to 'crypt_r' with a new 'struct crypt_data',
60 that object must be initialized to all zeroes. The pointer
61 returned, if not NULL, will point within DATA. (It will still be
62 overwritten by the next call to 'crypt_r' with the same DATA.) */
63extern char *crypt_r (const char *__phrase, const char *__salt,
64 struct crypt_data * __restrict __data)
65 __THROW __nonnull ((1, 2, 3));
66#endif
67
68__END_DECLS
69
70#endif /* crypt.h */
\ No newline at end of file
lib/libc/include/generic-glibc/ctype.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/dirent.h+12-10
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -126,28 +126,30 @@ enum
126126 The actual structure is opaque to users. */
127127typedef struct __dirstream DIR;
128128
129/* Close the directory stream DIRP.
130 Return 0 if successful, -1 if not.
131
132 This function is a possible cancellation point and therefore not
133 marked with __THROW. */
134extern int closedir (DIR *__dirp) __nonnull ((1));
135
129136/* Open a directory stream on NAME.
130137 Return a DIR stream on the directory, or NULL if it could not be opened.
131138
132139 This function is a possible cancellation point and therefore not
133140 marked with __THROW. */
134extern DIR *opendir (const char *__name) __nonnull ((1));
141extern DIR *opendir (const char *__name) __nonnull ((1))
142 __attribute_malloc__ __attr_dealloc (closedir, 1);
135143
136144#ifdef __USE_XOPEN2K8
137145/* Same as opendir, but open the stream on the file descriptor FD.
138146
139147 This function is a possible cancellation point and therefore not
140148 marked with __THROW. */
141extern DIR *fdopendir (int __fd);
149extern DIR *fdopendir (int __fd)
150 __attribute_malloc__ __attr_dealloc (closedir, 1);
142151#endif
143152
144/* Close the directory stream DIRP.
145 Return 0 if successful, -1 if not.
146
147 This function is a possible cancellation point and therefore not
148 marked with __THROW. */
149extern int closedir (DIR *__dirp) __nonnull ((1));
150
151153/* Read a directory entry from DIRP. Return a pointer to a `struct
152154 dirent' describing the entry, or NULL for EOF or error. The
153155 storage returned may be overwritten by a later readdir call on the
lib/libc/include/generic-glibc/dlfcn.h+43-13
......@@ -1,5 +1,5 @@
11/* User functions for run-time dynamic loading.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -28,17 +28,7 @@
2828
2929
3030#ifdef __USE_GNU
31/* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT
32 the run-time address of the symbol called NAME in the next shared
33 object is returned. The "next" relation is defined by the order
34 the shared objects were loaded. */
35# define RTLD_NEXT ((void *) -1l)
36
37/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT
38 the run-time address of the symbol called NAME in the global scope
39 is returned. */
40# define RTLD_DEFAULT ((void *) 0)
41
31#include <bits/dl_find_object.h>
4232
4333/* Type for namespace indices. */
4434typedef long int Lmid_t;
......@@ -48,6 +38,16 @@ typedef long int Lmid_t;
4838# define LM_ID_NEWLM -1 /* For dlmopen: request new namespace. */
4939#endif
5040
41/* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT
42 the run-time address of the symbol called NAME in the next shared
43 object is returned. The "next" relation is defined by the order
44 the shared objects were loaded. */
45#define RTLD_NEXT ((void *) -1l)
46
47/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT
48 the run-time address of the symbol called NAME in the global scope
49 is returned. */
50#define RTLD_DEFAULT ((void *) 0)
5151
5252__BEGIN_DECLS
5353
......@@ -162,7 +162,12 @@ enum
162162 segment, or if the calling thread has not allocated a block for it. */
163163 RTLD_DI_TLS_DATA = 10,
164164
165 RTLD_DI_MAX = 10
165 /* Treat ARG as const ElfW(Phdr) **, and store the address of the
166 program header array at that location. The dlinfo call returns
167 the number of program headers in the array. */
168 RTLD_DI_PHDR = 11,
169
170 RTLD_DI_MAX = 11
166171 };
167172
168173
......@@ -194,6 +199,31 @@ typedef struct
194199 Dl_serpath dls_serpath[1]; /* Actually longer, dls_cnt elements. */
195200# endif
196201} Dl_serinfo;
202
203struct dl_find_object
204{
205 __extension__ unsigned long long int dlfo_flags;
206 void *dlfo_map_start; /* Beginning of mapping containing address. */
207 void *dlfo_map_end; /* End of mapping. */
208 struct link_map *dlfo_link_map;
209 void *dlfo_eh_frame; /* Exception handling data of the object. */
210# if DLFO_STRUCT_HAS_EH_DBASE
211 void *dlfo_eh_dbase; /* Base address for DW_EH_PE_datarel. */
212# if __WORDSIZE == 32
213 unsigned int __dlfo_eh_dbase_pad;
214# endif
215# endif
216# if DLFO_STRUCT_HAS_EH_COUNT
217 int dlfo_eh_count; /* Number of exception handling entries. */
218 unsigned int __dlfo_eh_count_pad;
219# endif
220 __extension__ unsigned long long int __dflo_reserved[7];
221};
222
223/* If ADDRESS is found in an object, fill in *RESULT and return 0.
224 Otherwise, return -1. */
225int _dl_find_object (void *__address, struct dl_find_object *__result) __THROW;
226
197227#endif /* __USE_GNU */
198228
199229
lib/libc/include/generic-glibc/elf.h+248-19
......@@ -1,5 +1,5 @@
11/* This file defines standard ELF types, structures, and macros.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -210,7 +210,7 @@ typedef struct
210210#define EM_68HC12 53 /* Motorola M68HC12 */
211211#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator */
212212#define EM_PCP 55 /* Siemens PCP */
213#define EM_NCPU 56 /* Sony nCPU embeeded RISC */
213#define EM_NCPU 56 /* Sony nCPU embedded RISC */
214214#define EM_NDR1 57 /* Denso NDR1 microprocessor */
215215#define EM_STARCORE 58 /* Motorola Start*Core processor */
216216#define EM_ME16 59 /* Toyota ME16 processor */
......@@ -358,8 +358,9 @@ typedef struct
358358
359359#define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
360360#define EM_CSKY 252 /* C-SKY */
361#define EM_LOONGARCH 258 /* LoongArch */
361362
362#define EM_NUM 253
363#define EM_NUM 259
363364
364365/* Old spellings/synonyms. */
365366
......@@ -443,7 +444,8 @@ typedef struct
443444#define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */
444445#define SHT_GROUP 17 /* Section group */
445446#define SHT_SYMTAB_SHNDX 18 /* Extended section indices */
446#define SHT_NUM 19 /* Number of defined types. */
447#define SHT_RELR 19 /* RELR relative relocations */
448#define SHT_NUM 20 /* Number of defined types. */
447449#define SHT_LOOS 0x60000000 /* Start OS-specific. */
448450#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */
449451#define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */
......@@ -504,6 +506,7 @@ typedef struct
504506
505507/* Legal values for ch_type (compression algorithm). */
506508#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */
509#define ELFCOMPRESS_ZSTD 2 /* Zstandard algorithm. */
507510#define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */
508511#define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */
509512#define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */
......@@ -556,7 +559,7 @@ typedef struct
556559
557560/* Possible bitmasks for si_flags. */
558561#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */
559#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */
562#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-through symbol for translator */
560563#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */
561564#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy
562565 loaded */
......@@ -662,6 +665,11 @@ typedef struct
662665 Elf64_Sxword r_addend; /* Addend */
663666} Elf64_Rela;
664667
668/* RELR relocation table entry */
669
670typedef Elf32_Word Elf32_Relr;
671typedef Elf64_Xword Elf64_Relr;
672
665673/* How to extract and insert information held in the r_info field. */
666674
667675#define ELF32_R_SYM(val) ((val) >> 8)
......@@ -720,6 +728,7 @@ typedef struct
720728#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
721729#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
722730#define PT_GNU_PROPERTY 0x6474e553 /* GNU property */
731#define PT_GNU_SFRAME 0x6474e554 /* SFrame segment. */
723732#define PT_LOSUNW 0x6ffffffa
724733#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
725734#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
......@@ -801,6 +810,7 @@ typedef struct
801810#define NT_S390_GS_BC 0x30c /* s390 guarded storage
802811 broadcast control block. */
803812#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */
813#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data. */
804814#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
805815#define NT_ARM_TLS 0x401 /* ARM TLS register */
806816#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
......@@ -822,6 +832,15 @@ typedef struct
822832#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
823833#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
824834#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
835#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */
836#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and
837 status registers. */
838#define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD
839 Extension registers. */
840#define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced
841 SIMD Extension registers. */
842#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary
843 Translation registers. */
825844
826845/* Legal values for the note segment descriptor types for object files. */
827846
......@@ -887,7 +906,10 @@ typedef struct
887906#define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/
888907#define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */
889908#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */
890#define DT_NUM 35 /* Number used */
909#define DT_RELRSZ 35 /* Total size of RELR relative relocations */
910#define DT_RELR 36 /* Address of RELR relative relocations */
911#define DT_RELRENT 37 /* Size of one RELR relative relocaction */
912#define DT_NUM 38 /* Number used */
891913#define DT_LOOS 0x6000000d /* Start of OS-specific */
892914#define DT_HIOS 0x6ffff000 /* End of OS-specific */
893915#define DT_LOPROC 0x70000000 /* Start of processor-specific */
......@@ -1044,7 +1066,8 @@ typedef struct
10441066
10451067/* Legal values for vd_flags (version information flags). */
10461068#define VER_FLG_BASE 0x1 /* Version definition of file itself */
1047#define VER_FLG_WEAK 0x2 /* Weak version identifier */
1069#define VER_FLG_WEAK 0x2 /* Weak version identifier. Also
1070 used by vna_flags below. */
10481071
10491072/* Versym symbol index values. */
10501073#define VER_NDX_LOCAL 0 /* Symbol is local. */
......@@ -1122,10 +1145,6 @@ typedef struct
11221145} Elf64_Vernaux;
11231146
11241147
1125/* Legal values for vna_flags. */
1126#define VER_FLG_WEAK 0x2 /* Weak version identifier */
1127
1128
11291148/* Auxiliary vector. */
11301149
11311150/* This vector is normally only used by the program interpreter. The
......@@ -1205,6 +1224,9 @@ typedef struct
12051224#define AT_HWCAP2 26 /* More machine-dependent hints about
12061225 processor capabilities. */
12071226
1227#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */
1228#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */
1229
12081230#define AT_EXECFN 31 /* Filename of executable. */
12091231
12101232/* Pointer to the global system page used for system calls and other
......@@ -1231,8 +1253,7 @@ typedef struct
12311253#define AT_L3_CACHESIZE 46
12321254#define AT_L3_CACHEGEOMETRY 47
12331255
1234#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery
1235 (AArch64). */
1256#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery */
12361257
12371258/* Note section contents. Each entry in the note section begins with
12381259 a header of a fixed form. */
......@@ -1259,6 +1280,8 @@ typedef struct
12591280/* Note entries for GNU systems have this name. */
12601281#define ELF_NOTE_GNU "GNU"
12611282
1283/* Note entries for freedesktop.org have this name. */
1284#define ELF_NOTE_FDO "FDO"
12621285
12631286/* Defined types of notes for Solaris. */
12641287
......@@ -1302,6 +1325,10 @@ typedef struct
13021325/* Program property. */
13031326#define NT_GNU_PROPERTY_TYPE_0 5
13041327
1328/* Packaging metadata as defined on
1329 https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
1330#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
1331
13051332/* Note section name of program property. */
13061333#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
13071334
......@@ -1312,6 +1339,23 @@ typedef struct
13121339/* No copy relocation on protected data symbol. */
13131340#define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
13141341
1342/* A 4-byte unsigned integer property: A bit is set if it is set in all
1343 relocatable inputs. */
1344#define GNU_PROPERTY_UINT32_AND_LO 0xb0000000
1345#define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff
1346
1347/* A 4-byte unsigned integer property: A bit is set if it is set in any
1348 relocatable inputs. */
1349#define GNU_PROPERTY_UINT32_OR_LO 0xb0008000
1350#define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff
1351
1352/* The needed properties by the object file. */
1353#define GNU_PROPERTY_1_NEEDED GNU_PROPERTY_UINT32_OR_LO
1354
1355/* Set if the object file requires canonical function pointers and
1356 cannot be used with copy relocation. */
1357#define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS (1U << 0)
1358
13151359/* Processor-specific semantics, lo */
13161360#define GNU_PROPERTY_LOPROC 0xc0000000
13171361/* Processor-specific semantics, hi */
......@@ -2871,6 +2915,9 @@ enum
28712915#define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */
28722916#define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */
28732917
2918/* MTE memory tag segment type. */
2919#define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 2)
2920
28742921/* AArch64 specific values for the Dyn d_tag field. */
28752922#define DT_AARCH64_BTI_PLT (DT_LOPROC + 1)
28762923#define DT_AARCH64_PAC_PLT (DT_LOPROC + 3)
......@@ -3896,6 +3943,8 @@ enum
38963943#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002
38973944#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004
38983945#define EF_RISCV_FLOAT_ABI_QUAD 0x0006
3946#define EF_RISCV_RVE 0x0008
3947#define EF_RISCV_TSO 0x0010
38993948
39003949/* RISC-V relocations. */
39013950#define R_RISCV_NONE 0
......@@ -3953,8 +4002,24 @@ enum
39534002#define R_RISCV_SET32 56
39544003#define R_RISCV_32_PCREL 57
39554004#define R_RISCV_IRELATIVE 58
4005#define R_RISCV_PLT32 59
4006#define R_RISCV_SET_ULEB128 60
4007#define R_RISCV_SUB_ULEB128 61
39564008
3957#define R_RISCV_NUM 59
4009#define R_RISCV_NUM 62
4010
4011/* RISC-V specific values for the st_other field. */
4012#define STO_RISCV_VARIANT_CC 0x80 /* Function uses variant calling
4013 convention */
4014
4015/* RISC-V specific values for the sh_type field. */
4016#define SHT_RISCV_ATTRIBUTES (SHT_LOPROC + 3)
4017
4018/* RISC-V specific values for the p_type field. */
4019#define PT_RISCV_ATTRIBUTES (PT_LOPROC + 3)
4020
4021/* RISC-V specific values for the d_tag field. */
4022#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1)
39584023
39594024/* BPF specific declarations. */
39604025
......@@ -4034,13 +4099,130 @@ enum
40344099#define R_NDS32_TLS_TPOFF 102
40354100#define R_NDS32_TLS_DESC 119
40364101
4102/* LoongArch ELF Flags */
4103#define EF_LARCH_ABI_MODIFIER_MASK 0x07
4104#define EF_LARCH_ABI_SOFT_FLOAT 0x01
4105#define EF_LARCH_ABI_SINGLE_FLOAT 0x02
4106#define EF_LARCH_ABI_DOUBLE_FLOAT 0x03
4107#define EF_LARCH_OBJABI_V1 0x40
4108
4109/* LoongArch specific dynamic relocations */
4110#define R_LARCH_NONE 0
4111#define R_LARCH_32 1
4112#define R_LARCH_64 2
4113#define R_LARCH_RELATIVE 3
4114#define R_LARCH_COPY 4
4115#define R_LARCH_JUMP_SLOT 5
4116#define R_LARCH_TLS_DTPMOD32 6
4117#define R_LARCH_TLS_DTPMOD64 7
4118#define R_LARCH_TLS_DTPREL32 8
4119#define R_LARCH_TLS_DTPREL64 9
4120#define R_LARCH_TLS_TPREL32 10
4121#define R_LARCH_TLS_TPREL64 11
4122#define R_LARCH_IRELATIVE 12
4123
4124/* Reserved for future relocs that the dynamic linker must understand. */
4125
4126/* used by the static linker for relocating .text. */
4127#define R_LARCH_MARK_LA 20
4128#define R_LARCH_MARK_PCREL 21
4129#define R_LARCH_SOP_PUSH_PCREL 22
4130#define R_LARCH_SOP_PUSH_ABSOLUTE 23
4131#define R_LARCH_SOP_PUSH_DUP 24
4132#define R_LARCH_SOP_PUSH_GPREL 25
4133#define R_LARCH_SOP_PUSH_TLS_TPREL 26
4134#define R_LARCH_SOP_PUSH_TLS_GOT 27
4135#define R_LARCH_SOP_PUSH_TLS_GD 28
4136#define R_LARCH_SOP_PUSH_PLT_PCREL 29
4137#define R_LARCH_SOP_ASSERT 30
4138#define R_LARCH_SOP_NOT 31
4139#define R_LARCH_SOP_SUB 32
4140#define R_LARCH_SOP_SL 33
4141#define R_LARCH_SOP_SR 34
4142#define R_LARCH_SOP_ADD 35
4143#define R_LARCH_SOP_AND 36
4144#define R_LARCH_SOP_IF_ELSE 37
4145#define R_LARCH_SOP_POP_32_S_10_5 38
4146#define R_LARCH_SOP_POP_32_U_10_12 39
4147#define R_LARCH_SOP_POP_32_S_10_12 40
4148#define R_LARCH_SOP_POP_32_S_10_16 41
4149#define R_LARCH_SOP_POP_32_S_10_16_S2 42
4150#define R_LARCH_SOP_POP_32_S_5_20 43
4151#define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44
4152#define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45
4153#define R_LARCH_SOP_POP_32_U 46
4154
4155/* used by the static linker for relocating non .text. */
4156#define R_LARCH_ADD8 47
4157#define R_LARCH_ADD16 48
4158#define R_LARCH_ADD24 49
4159#define R_LARCH_ADD32 50
4160#define R_LARCH_ADD64 51
4161#define R_LARCH_SUB8 52
4162#define R_LARCH_SUB16 53
4163#define R_LARCH_SUB24 54
4164#define R_LARCH_SUB32 55
4165#define R_LARCH_SUB64 56
4166#define R_LARCH_GNU_VTINHERIT 57
4167#define R_LARCH_GNU_VTENTRY 58
4168
4169/* reserved 59-63 */
4170
4171#define R_LARCH_B16 64
4172#define R_LARCH_B21 65
4173#define R_LARCH_B26 66
4174#define R_LARCH_ABS_HI20 67
4175#define R_LARCH_ABS_LO12 68
4176#define R_LARCH_ABS64_LO20 69
4177#define R_LARCH_ABS64_HI12 70
4178#define R_LARCH_PCALA_HI20 71
4179#define R_LARCH_PCALA_LO12 72
4180#define R_LARCH_PCALA64_LO20 73
4181#define R_LARCH_PCALA64_HI12 74
4182#define R_LARCH_GOT_PC_HI20 75
4183#define R_LARCH_GOT_PC_LO12 76
4184#define R_LARCH_GOT64_PC_LO20 77
4185#define R_LARCH_GOT64_PC_HI12 78
4186#define R_LARCH_GOT_HI20 79
4187#define R_LARCH_GOT_LO12 80
4188#define R_LARCH_GOT64_LO20 81
4189#define R_LARCH_GOT64_HI12 82
4190#define R_LARCH_TLS_LE_HI20 83
4191#define R_LARCH_TLS_LE_LO12 84
4192#define R_LARCH_TLS_LE64_LO20 85
4193#define R_LARCH_TLS_LE64_HI12 86
4194#define R_LARCH_TLS_IE_PC_HI20 87
4195#define R_LARCH_TLS_IE_PC_LO12 88
4196#define R_LARCH_TLS_IE64_PC_LO20 89
4197#define R_LARCH_TLS_IE64_PC_HI12 90
4198#define R_LARCH_TLS_IE_HI20 91
4199#define R_LARCH_TLS_IE_LO12 92
4200#define R_LARCH_TLS_IE64_LO20 93
4201#define R_LARCH_TLS_IE64_HI12 94
4202#define R_LARCH_TLS_LD_PC_HI20 95
4203#define R_LARCH_TLS_LD_HI20 96
4204#define R_LARCH_TLS_GD_PC_HI20 97
4205#define R_LARCH_TLS_GD_HI20 98
4206#define R_LARCH_32_PCREL 99
4207#define R_LARCH_RELAX 100
4208
4209/* ARC specific declarations. */
4210
4211/* Processor specific flags for the Ehdr e_flags field. */
4212#define EF_ARC_MACH_MSK 0x000000ff
4213#define EF_ARC_OSABI_MSK 0x00000f00
4214#define EF_ARC_ALL_MSK (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK)
4215
4216/* Processor specific values for the Shdr sh_type field. */
4217#define SHT_ARC_ATTRIBUTES (SHT_LOPROC + 1) /* ARC attributes section. */
4218
40374219/* ARCompact/ARCv2 specific relocs. */
40384220#define R_ARC_NONE 0x0
40394221#define R_ARC_8 0x1
40404222#define R_ARC_16 0x2
40414223#define R_ARC_24 0x3
40424224#define R_ARC_32 0x4
4043#define R_ARC_B26 0x5
4225
40444226#define R_ARC_B22_PCREL 0x6
40454227#define R_ARC_H30 0x7
40464228#define R_ARC_N8 0x8
......@@ -4080,16 +4262,23 @@ enum
40804262#define R_ARC_SECTOFF_ME_2 0x2A
40814263#define R_ARC_SECTOFF_1 0x2B
40824264#define R_ARC_SECTOFF_2 0x2C
4265#define R_ARC_SDA_12 0x2D
4266#define R_ARC_SDA16_ST2 0x30
4267#define R_ARC_32_PCREL 0x31
40834268#define R_ARC_PC32 0x32
40844269#define R_ARC_GOTPC32 0x33
40854270#define R_ARC_PLT32 0x34
40864271#define R_ARC_COPY 0x35
40874272#define R_ARC_GLOB_DAT 0x36
4088#define R_ARC_JUMP_SLOT 0x37
4273#define R_ARC_JMP_SLOT 0x37
40894274#define R_ARC_RELATIVE 0x38
40904275#define R_ARC_GOTOFF 0x39
40914276#define R_ARC_GOTPC 0x3A
40924277#define R_ARC_GOT32 0x3B
4278#define R_ARC_S21W_PCREL_PLT 0x3C
4279#define R_ARC_S25H_PCREL_PLT 0x3D
4280
4281#define R_ARC_JLI_SECTOFF 0x3F
40934282
40944283#define R_ARC_TLS_DTPMOD 0x42
40954284#define R_ARC_TLS_DTPOFF 0x43
......@@ -4098,8 +4287,48 @@ enum
40984287#define R_ARC_TLS_GD_LD 0x46
40994288#define R_ARC_TLS_GD_CALL 0x47
41004289#define R_ARC_TLS_IE_GOT 0x48
4101#define R_ARC_TLS_DTPOFF_S9 0x4a
4102#define R_ARC_TLS_LE_S9 0x4a
4103#define R_ARC_TLS_LE_32 0x4b
4290#define R_ARC_TLS_DTPOFF_S9 0x49
4291#define R_ARC_TLS_LE_S9 0x4A
4292#define R_ARC_TLS_LE_32 0x4B
4293#define R_ARC_S25W_PCREL_PLT 0x4C
4294#define R_ARC_S21H_PCREL_PLT 0x4D
4295#define R_ARC_NPS_CMEM16 0x4E
4296
4297/* OpenRISC 1000 specific relocs. */
4298#define R_OR1K_NONE 0
4299#define R_OR1K_32 1
4300#define R_OR1K_16 2
4301#define R_OR1K_8 3
4302#define R_OR1K_LO_16_IN_INSN 4
4303#define R_OR1K_HI_16_IN_INSN 5
4304#define R_OR1K_INSN_REL_26 6
4305#define R_OR1K_GNU_VTENTRY 7
4306#define R_OR1K_GNU_VTINHERIT 8
4307#define R_OR1K_32_PCREL 9
4308#define R_OR1K_16_PCREL 10
4309#define R_OR1K_8_PCREL 11
4310#define R_OR1K_GOTPC_HI16 12
4311#define R_OR1K_GOTPC_LO16 13
4312#define R_OR1K_GOT16 14
4313#define R_OR1K_PLT26 15
4314#define R_OR1K_GOTOFF_HI16 16
4315#define R_OR1K_GOTOFF_LO16 17
4316#define R_OR1K_COPY 18
4317#define R_OR1K_GLOB_DAT 19
4318#define R_OR1K_JMP_SLOT 20
4319#define R_OR1K_RELATIVE 21
4320#define R_OR1K_TLS_GD_HI16 22
4321#define R_OR1K_TLS_GD_LO16 23
4322#define R_OR1K_TLS_LDM_HI16 24
4323#define R_OR1K_TLS_LDM_LO16 25
4324#define R_OR1K_TLS_LDO_HI16 26
4325#define R_OR1K_TLS_LDO_LO16 27
4326#define R_OR1K_TLS_IE_HI16 28
4327#define R_OR1K_TLS_IE_LO16 29
4328#define R_OR1K_TLS_LE_HI16 30
4329#define R_OR1K_TLS_LE_LO16 31
4330#define R_OR1K_TLS_TPOFF 32
4331#define R_OR1K_TLS_DTPOFF 33
4332#define R_OR1K_TLS_DTPMOD 34
41044333
41054334#endif /* elf.h */
\ No newline at end of file
lib/libc/include/generic-glibc/endian.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/envz.h+1-1
......@@ -1,5 +1,5 @@
11/* Routines for dealing with '\0' separated environment vectors
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/err.h+7-7
......@@ -1,5 +1,5 @@
11/* 4.4BSD utility functions for error messages.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -32,9 +32,9 @@ __BEGIN_DECLS
3232/* Print "program: ", FORMAT, ": ", the standard error string for errno,
3333 and a newline, on stderr. */
3434extern void warn (const char *__format, ...)
35 __attribute__ ((__format__ (__printf__, 1, 2)));
35 __attribute__ ((__format__ (__printf__, 1, 2))) __COLD;
3636extern void vwarn (const char *__format, __gnuc_va_list)
37 __attribute__ ((__format__ (__printf__, 1, 0)));
37 __attribute__ ((__format__ (__printf__, 1, 0))) __COLD;
3838
3939/* Likewise, but without ": " and the standard error string. */
4040extern void warnx (const char *__format, ...)
......@@ -44,13 +44,13 @@ extern void vwarnx (const char *__format, __gnuc_va_list)
4444
4545/* Likewise, and then exit with STATUS. */
4646extern void err (int __status, const char *__format, ...)
47 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
47 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))) __COLD;
4848extern void verr (int __status, const char *__format, __gnuc_va_list)
49 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
49 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))) __COLD;
5050extern void errx (int __status, const char *__format, ...)
51 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
51 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))) __COLD;
5252extern void verrx (int __status, const char *, __gnuc_va_list)
53 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
53 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))) __COLD;
5454
5555#include <bits/floatn.h>
5656#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
lib/libc/include/generic-glibc/errno.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/error.h+3-3
......@@ -1,5 +1,5 @@
11/* Declaration for error-reporting function
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -29,11 +29,11 @@ __BEGIN_DECLS
2929 If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
3030
3131extern void error (int __status, int __errnum, const char *__format, ...)
32 __attribute__ ((__format__ (__printf__, 3, 4)));
32 __attribute__ ((__format__ (__printf__, 3, 4))) __COLD;
3333
3434extern void error_at_line (int __status, int __errnum, const char *__fname,
3535 unsigned int __lineno, const char *__format, ...)
36 __attribute__ ((__format__ (__printf__, 5, 6)));
36 __attribute__ ((__format__ (__printf__, 5, 6))) __COLD;
3737
3838/* If NULL, error will flush stdout, then print on stderr the program
3939 name, a colon and a space. Otherwise, error will call this
lib/libc/include/generic-glibc/execinfo.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/fcntl.h+5-13
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -167,11 +167,6 @@ typedef __pid_t pid_t;
167167 effective IDs, not real IDs. */
168168#endif
169169
170
171/* fcntl was a simple symbol until glibc 2.27 inclusive.
172 * glibc 2.28 onwards converted it to a macro when compiled with
173 * USE_LARGEFILE64. */
174#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2
175170/* Do the file control operation described by CMD on FD.
176171 The remaining arguments are interpreted depending on CMD.
177172
......@@ -192,19 +187,16 @@ extern int fcntl64 (int __fd, int __cmd, ...);
192187# endif
193188#else /* __USE_TIME_BITS64 */
194189# ifdef __REDIRECT
195extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
196 __fcntl_time64) __THROW;
197extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
198 __fcntl_time64) __THROW;
190extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...),
191 __fcntl_time64);
192extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...),
193 __fcntl_time64);
199194# else
200195extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
201196# define fcntl64 __fcntl_time64
202197# define fcntl __fcntl_time64
203198# endif
204199#endif
205#else /* glibc 2.27 or lower */
206extern int fcntl (int __fd, int __cmd, ...);
207#endif
208200
209201/* Open FILE and return a new file descriptor for it, or -1 on error.
210202 OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set
lib/libc/include/generic-glibc/features-time64.h+1-1
......@@ -1,5 +1,5 @@
11/* Features part to handle 64-bit time_t support.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/features.h+20-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -57,7 +57,8 @@
5757 __STRICT_ANSI__).
5858
5959 _FORTIFY_SOURCE Add security hardening to many library functions.
60 Set to 1 or 2; 2 performs stricter checks than 1.
60 Set to 1, 2 or 3; 3 performs stricter checks than 2, which
61 performs stricter checks than 1.
6162
6263 _REENTRANT, _THREAD_SAFE
6364 Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
......@@ -150,6 +151,7 @@
150151#undef __GLIBC_USE_ISOC2X
151152#undef __GLIBC_USE_DEPRECATED_GETS
152153#undef __GLIBC_USE_DEPRECATED_SCANF
154#undef __GLIBC_USE_C2X_STRTOL
153155
154156/* Suppress kernel-name space pollution unless user expressedly asks
155157 for it. */
......@@ -220,12 +222,8 @@
220222# define _DEFAULT_SOURCE 1
221223# undef _ATFILE_SOURCE
222224# define _ATFILE_SOURCE 1
223
224# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || __GLIBC__ > 2
225225# undef _DYNAMIC_STACK_SIZE_SOURCE
226226# define _DYNAMIC_STACK_SIZE_SOURCE 1
227# endif
228
229227#endif
230228
231229/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
......@@ -416,7 +414,9 @@
416414# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
417415# elif !__GNUC_PREREQ (4, 1)
418416# warning _FORTIFY_SOURCE requires GCC 4.1 or later
419# elif _FORTIFY_SOURCE > 2 && __glibc_clang_prereq (9, 0)
417# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \
418 || __GNUC_PREREQ (12, 0))
419
420420# if _FORTIFY_SOURCE > 3
421421# warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform
422422# endif
......@@ -465,6 +465,17 @@
465465# define __GLIBC_USE_DEPRECATED_SCANF 0
466466#endif
467467
468/* ISO C2X added support for a 0b or 0B prefix on binary constants as
469 inputs to strtol-family functions (base 0 or 2). This macro is
470 used to condition redirection in headers to allow that redirection
471 to be disabled when building those functions, despite _GNU_SOURCE
472 being defined. */
473#if __GLIBC_USE (ISOC2X)
474# define __GLIBC_USE_C2X_STRTOL 1
475#else
476# define __GLIBC_USE_C2X_STRTOL 0
477#endif
478
468479/* Get definitions of __STDC_* predefined macros, if the compiler has
469480 not preincluded this header automatically. */
470481#include <stdc-predef.h>
......@@ -481,7 +492,7 @@
481492/* Major and minor version number of the GNU C library package. Use
482493 these macros to test for features in specific releases. */
483494#define __GLIBC__ 2
484/* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */
495#define __GLIBC_MINOR__ 38
485496
486497#define __GLIBC_PREREQ(maj, min) \
487498 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
......@@ -516,4 +527,4 @@
516527#include <gnu/stubs.h>
517528
518529
519#endif /* features.h */
530#endif /* features.h */
\ No newline at end of file
lib/libc/include/generic-glibc/fenv.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -25,7 +25,7 @@
2525#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
2626#include <bits/libc-header-start.h>
2727
28/* Get the architecture dependend definitions. The following definitions
28/* Get the architecture dependent definitions. The following definitions
2929 are expected to be done:
3030
3131 fenv_t type for object representing an entire floating-point
lib/libc/include/generic-glibc/finclude/math-vector-fortran.h+1-1
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019-2021 Free Software Foundation, Inc.
2! Copyright (C) 2019-2023 Free Software Foundation, Inc.
33! This file is part of the GNU C Library.
44!
55! The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/fmtmsg.h+1-1
......@@ -1,5 +1,5 @@
11/* Message display handling.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/fnmatch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/fpregdef.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word bits. Mips version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/fts.h+1-1
......@@ -1,5 +1,5 @@
11/* File tree traversal functions declarations.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/ftw.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/gconv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/getopt.h+1-1
......@@ -1,5 +1,5 @@
11/* Declarations for getopt.
2 Copyright (C) 1989-2021 Free Software Foundation, Inc.
2 Copyright (C) 1989-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 Unlike the bulk of the getopt implementation, this file is NOT part
55 of gnulib; gnulib also has a getopt.h but it is different.
lib/libc/include/generic-glibc/glob.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/gnu-versions.h+1-1
......@@ -1,5 +1,5 @@
11/* Header with interface version macros for library pieces copied elsewhere.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/gnu/lib-names-32.h+1-4
......@@ -3,8 +3,7 @@
33# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
44#endif
55
6#define LD_LINUX_SO "ld-linux.so.2"
7#define LD_SO "ld-linux.so.2"
6#define LD_SO "ld.so.1"
87#define LIBANL_SO "libanl.so.1"
98#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
109#define LIBCRYPT_SO "libcrypt.so.1"
......@@ -21,8 +20,6 @@
2120#define LIBNSS_FILES_SO "libnss_files.so.2"
2221#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2322#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2623#define LIBPTHREAD_SO "libpthread.so.0"
2724#define LIBRESOLV_SO "libresolv.so.2"
2825#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-hard.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-ilp32d.h deleted-30
......@@ -1,30 +0,0 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-ilp32d.h> directly; include <gnu/lib-names.h> instead."
4#endif
5
6#define LD_LINUX_RISCV32_ILP32D_SO "ld-linux-riscv32-ilp32d.so.1"
7#define LD_SO "ld-linux-riscv32-ilp32d.so.1"
8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"
15#define LIBMVEC_SO "libmvec.so.1"
16#define LIBM_SO "libm.so.6"
17#define LIBNSL_SO "libnsl.so.1"
18#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
19#define LIBNSS_DB_SO "libnss_db.so.2"
20#define LIBNSS_DNS_SO "libnss_dns.so.2"
21#define LIBNSS_FILES_SO "libnss_files.so.2"
22#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
23#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"
27#define LIBRESOLV_SO "libresolv.so.2"
28#define LIBRT_SO "librt.so.1"
29#define LIBTHREAD_DB_SO "libthread_db.so.1"
30#define LIBUTIL_SO "libutil.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h-2
......@@ -20,8 +20,6 @@
2020#define LIBNSS_FILES_SO "libnss_files.so.2"
2121#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2222#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2523#define LIBPTHREAD_SO "libpthread.so.0"
2624#define LIBRESOLV_SO "libresolv.so.2"
2725#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h-2
......@@ -20,8 +20,6 @@
2020#define LIBNSS_FILES_SO "libnss_files.so.2"
2121#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2222#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2523#define LIBPTHREAD_SO "libpthread.so.0"
2624#define LIBRESOLV_SO "libresolv.so.2"
2725#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h-2
......@@ -20,8 +20,6 @@
2020#define LIBNSS_FILES_SO "libnss_files.so.2"
2121#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2222#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2523#define LIBPTHREAD_SO "libpthread.so.0"
2624#define LIBRESOLV_SO "libresolv.so.2"
2725#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-o32_soft.h-2
......@@ -20,8 +20,6 @@
2020#define LIBNSS_FILES_SO "libnss_files.so.2"
2121#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2222#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2523#define LIBPTHREAD_SO "libpthread.so.0"
2624#define LIBRESOLV_SO "libresolv.so.2"
2725#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-soft.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/generic-glibc/gnu/libc-version.h+1-1
......@@ -1,5 +1,5 @@
11/* Interface to GNU libc specific functions for version information.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/gnu/stubs-ilp32.h deleted-38
......@@ -1,38 +0,0 @@
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
lib/libc/include/generic-glibc/gnu/stubs-ilp32d.h deleted-24
......@@ -1,24 +0,0 @@
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_fedisableexcept
18#define __stub_feenableexcept
19#define __stub_fegetexcept
20#define __stub_gtty
21#define __stub_revoke
22#define __stub_setlogin
23#define __stub_sigreturn
24#define __stub_stty
lib/libc/include/generic-glibc/grp.h+9-5
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -130,7 +130,8 @@ extern struct group *getgrnam (const char *__name);
130130# ifdef __USE_GNU
131131extern int getgrent_r (struct group *__restrict __resultbuf,
132132 char *__restrict __buffer, size_t __buflen,
133 struct group **__restrict __result);
133 struct group **__restrict __result)
134 __attr_access ((__write_only__, 2, 3));
134135# endif
135136
136137/* Search for an entry with a matching group ID.
......@@ -139,7 +140,8 @@ extern int getgrent_r (struct group *__restrict __resultbuf,
139140 marked with __THROW. */
140141extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
141142 char *__restrict __buffer, size_t __buflen,
142 struct group **__restrict __result);
143 struct group **__restrict __result)
144 __attr_access ((__write_only__, 3, 4));
143145
144146/* Search for an entry with a matching group name.
145147
......@@ -148,7 +150,8 @@ extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
148150extern int getgrnam_r (const char *__restrict __name,
149151 struct group *__restrict __resultbuf,
150152 char *__restrict __buffer, size_t __buflen,
151 struct group **__restrict __result);
153 struct group **__restrict __result)
154 __attr_access ((__write_only__, 3, 4));
152155
153156# ifdef __USE_MISC
154157/* Read a group entry from STREAM. This function is not standardized
......@@ -161,7 +164,8 @@ extern int getgrnam_r (const char *__restrict __name,
161164extern int fgetgrent_r (FILE *__restrict __stream,
162165 struct group *__restrict __resultbuf,
163166 char *__restrict __buffer, size_t __buflen,
164 struct group **__restrict __result);
167 struct group **__restrict __result)
168 __attr_access ((__write_only__, 3, 4));
165169# endif
166170
167171#endif /* POSIX or reentrant */
lib/libc/include/generic-glibc/gshadow.h+9-5
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2009-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2009-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -108,19 +108,23 @@ extern int putsgent (const struct sgrp *__g, FILE *__stream);
108108 or due to the implementation they are cancellation points and
109109 therefore not marked with __THROW. */
110110extern int getsgent_r (struct sgrp *__result_buf, char *__buffer,
111 size_t __buflen, struct sgrp **__result);
111 size_t __buflen, struct sgrp **__result)
112 __attr_access ((__write_only__, 2, 3));
112113
113114extern int getsgnam_r (const char *__name, struct sgrp *__result_buf,
114115 char *__buffer, size_t __buflen,
115 struct sgrp **__result);
116 struct sgrp **__result)
117 __attr_access ((__write_only__, 3, 4));
116118
117119extern int sgetsgent_r (const char *__string, struct sgrp *__result_buf,
118120 char *__buffer, size_t __buflen,
119 struct sgrp **__result);
121 struct sgrp **__result)
122 __attr_access ((__write_only__, 3, 4));
120123
121124extern int fgetsgent_r (FILE *__stream, struct sgrp *__result_buf,
122125 char *__buffer, size_t __buflen,
123 struct sgrp **__result);
126 struct sgrp **__result)
127 __attr_access ((__write_only__, 3, 4));
124128#endif /* misc */
125129
126130__END_DECLS
lib/libc/include/generic-glibc/iconv.h+9-8
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -29,12 +29,19 @@ __BEGIN_DECLS
2929typedef void *iconv_t;
3030
3131
32/* Free resources allocated for descriptor CD for code conversion.
33
34 This function is a possible cancellation point and therefore not
35 marked with __THROW. */
36extern int iconv_close (iconv_t __cd);
37
3238/* Allocate descriptor for code conversion from codeset FROMCODE to
3339 codeset TOCODE.
3440
3541 This function is a possible cancellation point and therefore not
3642 marked with __THROW. */
37extern iconv_t iconv_open (const char *__tocode, const char *__fromcode);
43extern iconv_t iconv_open (const char *__tocode, const char *__fromcode)
44 __attribute_malloc__ __attr_dealloc (iconv_close, 1);
3845
3946/* Convert at most *INBYTESLEFT bytes from *INBUF according to the
4047 code conversion algorithm specified by CD and place up to
......@@ -44,12 +51,6 @@ extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
4451 char **__restrict __outbuf,
4552 size_t *__restrict __outbytesleft);
4653
47/* Free resources allocated for descriptor CD for code conversion.
48
49 This function is a possible cancellation point and therefore not
50 marked with __THROW. */
51extern int iconv_close (iconv_t __cd);
52
5354__END_DECLS
5455
5556#endif /* iconv.h */
\ No newline at end of file
lib/libc/include/generic-glibc/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/ifaddrs.h+1-1
......@@ -1,5 +1,5 @@
11/* ifaddrs.h -- declarations for getting network interface addresses
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/inttypes.h+103-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -164,6 +164,45 @@ typedef wchar_t __gwchar_t;
164164# define PRIxPTR __PRIPTR_PREFIX "x"
165165# define PRIXPTR __PRIPTR_PREFIX "X"
166166
167/* Binary notation. */
168# if __GLIBC_USE (ISOC2X)
169# define PRIb8 "b"
170# define PRIb16 "b"
171# define PRIb32 "b"
172# define PRIb64 __PRI64_PREFIX "b"
173
174# define PRIbLEAST8 "b"
175# define PRIbLEAST16 "b"
176# define PRIbLEAST32 "b"
177# define PRIbLEAST64 __PRI64_PREFIX "b"
178
179# define PRIbFAST8 "b"
180# define PRIbFAST16 __PRIPTR_PREFIX "b"
181# define PRIbFAST32 __PRIPTR_PREFIX "b"
182# define PRIbFAST64 __PRI64_PREFIX "b"
183
184# define PRIbMAX __PRI64_PREFIX "b"
185# define PRIbPTR __PRIPTR_PREFIX "b"
186
187# define PRIB8 "B"
188# define PRIB16 "B"
189# define PRIB32 "B"
190# define PRIB64 __PRI64_PREFIX "B"
191
192# define PRIBLEAST8 "B"
193# define PRIBLEAST16 "B"
194# define PRIBLEAST32 "B"
195# define PRIBLEAST64 __PRI64_PREFIX "B"
196
197# define PRIBFAST8 "B"
198# define PRIBFAST16 __PRIPTR_PREFIX "B"
199# define PRIBFAST32 __PRIPTR_PREFIX "B"
200# define PRIBFAST64 __PRI64_PREFIX "B"
201
202# define PRIBMAX __PRI64_PREFIX "B"
203# define PRIBPTR __PRIPTR_PREFIX "B"
204# endif
205
167206
168207/* Macros for scanning format specifiers. */
169208
......@@ -255,7 +294,7 @@ typedef wchar_t __gwchar_t;
255294# define SCNuMAX __PRI64_PREFIX "u"
256295# define SCNxMAX __PRI64_PREFIX "x"
257296
258/* Macros for scaning `intptr_t' and `uintptr_t'. */
297/* Macros for scanning `intptr_t' and `uintptr_t'. */
259298# define SCNdPTR __PRIPTR_PREFIX "d"
260299# define SCNiPTR __PRIPTR_PREFIX "i"
261300# define SCNoPTR __PRIPTR_PREFIX "o"
......@@ -263,6 +302,28 @@ typedef wchar_t __gwchar_t;
263302# define SCNxPTR __PRIPTR_PREFIX "x"
264303
265304
305/* Binary notation. */
306# if __GLIBC_USE (ISOC2X)
307# define SCNb8 "hhb"
308# define SCNb16 "hb"
309# define SCNb32 "b"
310# define SCNb64 __PRI64_PREFIX "b"
311
312# define SCNbLEAST8 "hhb"
313# define SCNbLEAST16 "hb"
314# define SCNbLEAST32 "b"
315# define SCNbLEAST64 __PRI64_PREFIX "b"
316
317# define SCNbFAST8 "hhb"
318# define SCNbFAST16 __PRIPTR_PREFIX "b"
319# define SCNbFAST32 __PRIPTR_PREFIX "b"
320# define SCNbFAST64 __PRI64_PREFIX "b"
321
322# define SCNbMAX __PRI64_PREFIX "b"
323# define SCNbPTR __PRIPTR_PREFIX "b"
324# endif
325
326
266327__BEGIN_DECLS
267328
268329#if __WORDSIZE == 64
......@@ -311,6 +372,46 @@ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
311372 __gwchar_t ** __restrict __endptr, int __base)
312373 __THROW;
313374
375/* Versions of the above functions that handle '0b' and '0B' prefixes
376 in base 0 or 2. */
377#if __GLIBC_USE (C2X_STRTOL)
378# ifdef __REDIRECT
379extern intmax_t __REDIRECT_NTH (strtoimax, (const char *__restrict __nptr,
380 char **__restrict __endptr,
381 int __base), __isoc23_strtoimax);
382extern uintmax_t __REDIRECT_NTH (strtoumax, (const char *__restrict __nptr,
383 char **__restrict __endptr,
384 int __base), __isoc23_strtoumax);
385extern intmax_t __REDIRECT_NTH (wcstoimax,
386 (const __gwchar_t *__restrict __nptr,
387 __gwchar_t **__restrict __endptr, int __base),
388 __isoc23_wcstoimax);
389extern uintmax_t __REDIRECT_NTH (wcstoumax,
390 (const __gwchar_t *__restrict __nptr,
391 __gwchar_t **__restrict __endptr, int __base),
392 __isoc23_wcstoumax);
393# else
394extern intmax_t __isoc23_strtoimax (const char *__restrict __nptr,
395 char **__restrict __endptr, int __base)
396 __THROW;
397extern uintmax_t __isoc23_strtoumax (const char *__restrict __nptr,
398 char ** __restrict __endptr, int __base)
399 __THROW;
400extern intmax_t __isoc23_wcstoimax (const __gwchar_t *__restrict __nptr,
401 __gwchar_t **__restrict __endptr,
402 int __base)
403 __THROW;
404extern uintmax_t __isoc23_wcstoumax (const __gwchar_t *__restrict __nptr,
405 __gwchar_t ** __restrict __endptr,
406 int __base)
407 __THROW;
408# define strtoimax __isoc23_strtoimax
409# define strtoumax __isoc23_strtoumax
410# define wcstoimax __isoc23_wcstoimax
411# define wcstoumax __isoc23_wcstoumax
412# endif
413#endif
414
314415__END_DECLS
315416
316417#endif /* inttypes.h */
\ No newline at end of file
lib/libc/include/generic-glibc/langinfo.h+1-1
......@@ -1,5 +1,5 @@
11/* Access to locale-dependent parameters.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/libgen.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/libintl.h+1-1
......@@ -1,5 +1,5 @@
11/* Message catalogs for internationalization.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44 This file is derived from the file libgettext.h in the GNU gettext package.
55
lib/libc/include/generic-glibc/limits.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/link.h+28-11
......@@ -1,6 +1,6 @@
11/* Data structure for communication from the run-time dynamic linker for
22 loaded ELF shared objects.
3 Copyright (C) 1995-2021 Free Software Foundation, Inc.
3 Copyright (C) 1995-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -34,14 +34,13 @@
3434#include <bits/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
3535#include <bits/link.h>
3636
37/* Rendezvous structure used by the run-time dynamic linker to communicate
38 details of shared object loading to the debugger. If the executable's
39 dynamic section has a DT_DEBUG element, the run-time linker sets that
40 element's value to the address where this structure can be found. */
37/* The legacy rendezvous structure used by the run-time dynamic linker to
38 communicate details of shared object loading to the debugger. */
4139
4240struct r_debug
4341 {
44 int r_version; /* Version number for this protocol. */
42 /* Version number for this protocol. It should be greater than 0. */
43 int r_version;
4544
4645 struct link_map *r_map; /* Head of the chain of loaded objects. */
4746
......@@ -63,16 +62,34 @@ struct r_debug
6362 ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */
6463 };
6564
66/* This is the instance of that structure used by the dynamic linker. */
65/* This is the symbol of that structure provided by the dynamic linker. */
6766extern struct r_debug _r_debug;
6867
68/* The extended rendezvous structure used by the run-time dynamic linker
69 to communicate details of shared object loading to the debugger. If
70 the executable's dynamic section has a DT_DEBUG element, the run-time
71 linker sets that element's value to the address where this structure
72 can be found. */
73
74struct r_debug_extended
75 {
76 struct r_debug base;
77
78 /* The following field is added by r_version == 2. */
79
80 /* Link to the next r_debug_extended structure. Each r_debug_extended
81 structure represents a different namespace. The first
82 r_debug_extended structure is for the default namespace. */
83 struct r_debug_extended *r_next;
84 };
85
6986/* This symbol refers to the "dynamic structure" in the `.dynamic' section
7087 of whatever module refers to `_DYNAMIC'. So, to find its own
71 `struct r_debug', a program could do:
88 `struct r_debug_extended', a program could do:
7289 for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn)
7390 if (dyn->d_tag == DT_DEBUG)
74 r_debug = (struct r_debug *) dyn->d_un.d_ptr;
75 */
91 r_debug_extended = (struct r_debug_extended *) dyn->d_un.d_ptr;
92 */
7693extern ElfW(Dyn) _DYNAMIC[];
7794
7895/* Structure describing a loaded shared object. The `l_next' and `l_prev'
......@@ -96,7 +113,7 @@ struct link_map
96113#ifdef __USE_GNU
97114
98115/* Version numbers for la_version handshake interface. */
99#define LAV_CURRENT 1
116#include <bits/link_lavcurrent.h>
100117
101118/* Activity types signaled through la_activity. */
102119enum
lib/libc/include/generic-glibc/locale.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/malloc.h+4-3
......@@ -1,5 +1,6 @@
11/* Prototypes and definition for malloc implementation.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
3 Copyright The GNU Toolchain Authors.
34 This file is part of the GNU C Library.
45
56 The GNU C Library is free software; you can redistribute it and/or
......@@ -64,8 +65,8 @@ extern void free (void *__ptr) __THROW;
6465
6566/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
6667extern void *memalign (size_t __alignment, size_t __size)
67 __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur
68 __attr_dealloc_free;
68 __THROW __attribute_malloc__ __attribute_alloc_align__ ((1))
69 __attribute_alloc_size__ ((2)) __wur __attr_dealloc_free;
6970
7071/* Allocate SIZE bytes on a page boundary. */
7172extern void *valloc (size_t __size) __THROW __attribute_malloc__
lib/libc/include/generic-glibc/math.h+76-4
......@@ -1,5 +1,5 @@
11/* Declarations for math functions.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 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
......@@ -573,11 +573,13 @@ extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
573573# define __MATHCALL_NAME(name) f ## name ## l
574574# ifdef __LDBL_COMPAT
575575# define __MATHCALL_REDIR_NAME(name) f ## name
576# define __MATHCALL_REDIR_NAME2(name) f ## name
576577# undef __MATHCALL_NARROW
577578# define __MATHCALL_NARROW(func, redir, nargs) \
578579 __MATHCALL_NARROW_REDIR (func, redir, nargs)
579580# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
580581# define __MATHCALL_REDIR_NAME(name) __ ## f32 ## name ## ieee128
582# define __MATHCALL_REDIR_NAME2(name) __ ## f32 ## name ## ieee128
581583# undef __MATHCALL_NARROW
582584# define __MATHCALL_NARROW(func, redir, nargs) \
583585 __MATHCALL_NARROW_REDIR (func, redir, nargs)
......@@ -589,6 +591,7 @@ extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
589591# if defined __LDBL_COMPAT \
590592 || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
591593# undef __MATHCALL_REDIR_NAME
594# undef __MATHCALL_REDIR_NAME2
592595# undef __MATHCALL_NARROW
593596# define __MATHCALL_NARROW(func, redir, nargs) \
594597 __MATHCALL_NARROW_NORMAL (func, nargs)
......@@ -599,11 +602,13 @@ extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
599602# define __MATHCALL_NAME(name) d ## name ## l
600603# ifdef __LDBL_COMPAT
601604# define __MATHCALL_REDIR_NAME(name) __nldbl_d ## name ## l
605# define __MATHCALL_REDIR_NAME2(name) name
602606# undef __MATHCALL_NARROW
603607# define __MATHCALL_NARROW(func, redir, nargs) \
604608 __MATHCALL_NARROW_REDIR (func, redir, nargs)
605609# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
606610# define __MATHCALL_REDIR_NAME(name) __ ## f64 ## name ## ieee128
611# define __MATHCALL_REDIR_NAME2(name) __ ## f64 ## name ## ieee128
607612# undef __MATHCALL_NARROW
608613# define __MATHCALL_NARROW(func, redir, nargs) \
609614 __MATHCALL_NARROW_REDIR (func, redir, nargs)
......@@ -615,6 +620,7 @@ extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
615620# if defined __LDBL_COMPAT \
616621 || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
617622# undef __MATHCALL_REDIR_NAME
623# undef __MATHCALL_REDIR_NAME2
618624# undef __MATHCALL_NARROW
619625# define __MATHCALL_NARROW(func, redir, nargs) \
620626 __MATHCALL_NARROW_NORMAL (func, nargs)
......@@ -1009,7 +1015,8 @@ enum
10091015
10101016/* Return nonzero value if X is positive or negative infinity. */
10111017# if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \
1012 && !defined __SUPPORT_SNAN__ && !defined __cplusplus
1018 && !defined __SUPPORT_SNAN__ && !defined __cplusplus \
1019 && !defined __clang__
10131020 /* Since __builtin_isinf_sign is broken for float128 before GCC 7.0,
10141021 use the helper function, __isinff128, with older compilers. This is
10151022 only provided for C mode, because in C++ mode, GCC has no support
......@@ -1152,6 +1159,23 @@ iszero (__T __val)
11521159# define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
11531160#endif
11541161
1162/* GNU extension to provide float constants with similar names. */
1163#ifdef __USE_GNU
1164# define M_Ef 2.7182818284590452354f /* e */
1165# define M_LOG2Ef 1.4426950408889634074f /* log_2 e */
1166# define M_LOG10Ef 0.43429448190325182765f /* log_10 e */
1167# define M_LN2f 0.69314718055994530942f /* log_e 2 */
1168# define M_LN10f 2.30258509299404568402f /* log_e 10 */
1169# define M_PIf 3.14159265358979323846f /* pi */
1170# define M_PI_2f 1.57079632679489661923f /* pi/2 */
1171# define M_PI_4f 0.78539816339744830962f /* pi/4 */
1172# define M_1_PIf 0.31830988618379067154f /* 1/pi */
1173# define M_2_PIf 0.63661977236758134308f /* 2/pi */
1174# define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */
1175# define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */
1176# define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */
1177#endif
1178
11551179/* The above constants are not adequate for computation using `long double's.
11561180 Therefore we provide as an extension constants with similar names as a
11571181 GNU extension. Provide enough digits for the 128-bit IEEE quad. */
......@@ -1278,7 +1302,7 @@ iszero (__T __val)
12781302 these operations. Generic support in GCC for these as builtins went
12791303 in 2.97, but not all cpus added their patterns until 3.1. Therefore
12801304 we enable the builtins from 3.1 onwards and use a generic implementation
1281 othwerwise. */
1305 otherwise. */
12821306# define isgreater(x, y) __builtin_isgreater(x, y)
12831307# define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
12841308# define isless(x, y) __builtin_isless(x, y)
......@@ -1368,14 +1392,62 @@ template<> struct __iseqsig_type<long double>
13681392 }
13691393};
13701394
1371# if __HAVE_FLOAT128_UNLIKE_LDBL
1395# if __HAVE_FLOAT32 && __GNUC_PREREQ (13, 0)
1396template<> struct __iseqsig_type<_Float32>
1397{
1398 static int __call (_Float32 __x, _Float32 __y) throw ()
1399 {
1400 return __iseqsigf (__x, __y);
1401 }
1402};
1403# endif
1404
1405# if __HAVE_FLOAT64 && __GNUC_PREREQ (13, 0)
1406template<> struct __iseqsig_type<_Float64>
1407{
1408 static int __call (_Float64 __x, _Float64 __y) throw ()
1409 {
1410 return __iseqsig (__x, __y);
1411 }
1412};
1413# endif
1414
1415# if __HAVE_FLOAT128_UNLIKE_LDBL || (__HAVE_FLOAT128 && __GNUC_PREREQ (13, 0))
13721416 /* When using an IEEE 128-bit long double, _Float128 is defined as long double
13731417 in C++. */
13741418template<> struct __iseqsig_type<_Float128>
13751419{
13761420 static int __call (_Float128 __x, _Float128 __y) throw ()
13771421 {
1422# if __HAVE_FLOAT128_UNLIKE_LDBL
1423 return __iseqsigf128 (__x, __y);
1424# else
1425 return __iseqsigl (__x, __y);
1426# endif
1427 }
1428};
1429# endif
1430
1431# if __HAVE_FLOAT32X && __GNUC_PREREQ (13, 0)
1432template<> struct __iseqsig_type<_Float32x>
1433{
1434 static int __call (_Float32x __x, _Float32x __y) throw ()
1435 {
1436 return __iseqsig (__x, __y);
1437 }
1438};
1439# endif
1440
1441# if __HAVE_FLOAT64X && __GNUC_PREREQ (13, 0)
1442template<> struct __iseqsig_type<_Float64x>
1443{
1444 static int __call (_Float64x __x, _Float64x __y) throw ()
1445 {
1446# if __HAVE_FLOAT64X_LONG_DOUBLE
1447 return __iseqsigl (__x, __y);
1448# else
13781449 return __iseqsigf128 (__x, __y);
1450# endif
13791451 }
13801452};
13811453# endif
lib/libc/include/generic-glibc/mcheck.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/memory.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/mntent.h+1-1
......@@ -1,5 +1,5 @@
11/* Utilities for reading/writing fstab, mtab, etc.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/monetary.h+1-1
......@@ -1,5 +1,5 @@
11/* Header file for monetary value formatting functions.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/mqueue.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/net/ethernet.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/net/if.h+1-1
......@@ -1,5 +1,5 @@
11/* net/if.h -- declarations for inquiring about network interfaces
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/net/if_arp.h+3-2
......@@ -1,7 +1,6 @@
11/* Definitions for Address Resolution Protocol.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
......@@ -95,6 +94,8 @@ struct arphdr
9594#define ARPHRD_ROSE 270
9695#define ARPHRD_X25 271 /* CCITT X.25. */
9796#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware. */
97#define ARPHRD_CAN 280 /* Controller Area Network. */
98#define ARPHRD_MCTP 290
9899#define ARPHRD_PPP 512
99100#define ARPHRD_CISCO 513 /* Cisco HDLC. */
100101#define ARPHRD_HDLC ARPHRD_CISCO
lib/libc/include/generic-glibc/net/if_packet.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux SOCK_PACKET sockets.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/net/if_shaper.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -27,7 +27,7 @@ __BEGIN_DECLS
2727
2828#define SHAPER_QLEN 10
2929/*
30 * This is a bit speed dependant (read it shouldnt be a constant!)
30 * This is a bit speed dependent (read it shouldn't be a constant!)
3131 *
3232 * 5 is about right for 28.8 upwards. Below that double for every
3333 * halving of speed or so. - ie about 20 for 9600 baud.
lib/libc/include/generic-glibc/net/if_slip.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/net/route.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netash/ash.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux AF_ASH sockets.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netatalk/at.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netax25/ax25.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -62,7 +62,7 @@
6262#define AX25_DIGI_INBAND 0x01 /* Allow digipeating within port */
6363#define AX25_DIGI_XBAND 0x02 /* Allow digipeating across ports */
6464
65/* Maximim number of digipeaters: */
65/* Maximum number of digipeaters: */
6666#define AX25_MAX_DIGIS 8
6767
6868
......@@ -80,7 +80,7 @@ struct sockaddr_ax25
8080 };
8181
8282/*
83 * The sockaddr struct with the digipeater adresses:
83 * The sockaddr struct with the digipeater addresses:
8484 */
8585struct full_sockaddr_ax25
8686 {
lib/libc/include/generic-glibc/netdb.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/neteconet/ec.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux AF_ECONET sockets.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/ether.h+1-1
......@@ -1,5 +1,5 @@
11/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/icmp6.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/if_ether.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/if_fddi.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/if_tr.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/igmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -110,7 +110,7 @@ struct igmp {
110110#define IGMP_v2_ROUTER 2
111111
112112/*
113 * The following four defininitions are for backwards compatibility.
113 * The following four definitions are for backwards compatibility.
114114 * They should be removed as soon as all applications are updated to
115115 * use the new constant names.
116116 */
lib/libc/include/generic-glibc/netinet/in.h+19-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -81,6 +81,8 @@ enum
8181#define IPPROTO_PIM IPPROTO_PIM
8282 IPPROTO_COMP = 108, /* Compression Header Protocol. */
8383#define IPPROTO_COMP IPPROTO_COMP
84 IPPROTO_L2TP = 115, /* Layer 2 Tunnelling Protocol. */
85#define IPPROTO_L2TP IPPROTO_L2TP
8486 IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */
8587#define IPPROTO_SCTP IPPROTO_SCTP
8688 IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */
......@@ -196,6 +198,9 @@ enum
196198#define INADDR_BROADCAST ((in_addr_t) 0xffffffff)
197199/* Address indicating an error return. */
198200#define INADDR_NONE ((in_addr_t) 0xffffffff)
201/* Dummy address for source of ICMPv6 errors converted to IPv4 (RFC
202 7600). */
203#define INADDR_DUMMY ((in_addr_t) 0xc0000008)
199204
200205/* Network number for local host loopback. */
201206#define IN_LOOPBACKNET 127
......@@ -275,6 +280,19 @@ struct ip_mreq
275280 struct in_addr imr_interface;
276281 };
277282
283/* IPv4 multicast request with interface index. */
284struct ip_mreqn
285 {
286 /* IP multicast address of group. */
287 struct in_addr imr_multiaddr;
288
289 /* Local IP address of interface. */
290 struct in_addr imr_address;
291
292 /* Interface index. */
293 int imr_ifindex;
294 };
295
278296struct ip_mreq_source
279297 {
280298 /* IP multicast address of group. */
lib/libc/include/generic-glibc/netinet/in_systm.h+1-1
......@@ -1,5 +1,5 @@
11/* System specific type definitions for networking code.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/ip.h+6-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -186,6 +186,11 @@ struct ip_timestamp
186186#define IPTOS_DSCP_AF43 0x98
187187#define IPTOS_DSCP_EF 0xb8
188188
189/*
190 * Voice-Admit DSCP code point from RFC-5865, Section 4.
191 */
192#define IPTOS_DSCP_VA 0xb0
193
189194/*
190195 * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume
191196 * the old ToS Precedence values.
lib/libc/include/generic-glibc/netinet/ip6.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/ip_icmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netinet/tcp.h+3-3
......@@ -48,7 +48,7 @@
4848#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
4949#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
5050#define TCP_INFO 11 /* Information about this connection. */
51#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
51#define TCP_QUICKACK 12 /* Bock/re-enable quick ACKs. */
5252#define TCP_CONGESTION 13 /* Congestion control algorithm. */
5353#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
5454#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
......@@ -209,7 +209,7 @@ enum
209209# define TCPI_OPT_TIMESTAMPS 1
210210# define TCPI_OPT_SACK 2
211211# define TCPI_OPT_WSCALE 4
212# define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
212# define TCPI_OPT_ECN 8 /* ECN was negotiated at TCP session init */
213213# define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
214214# define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
215215
......@@ -307,7 +307,7 @@ enum
307307/* Flags for both getsockopt and setsockopt */
308308#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
309309#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
310 * supercedes everything. */
310 * supersedes everything. */
311311
312312/* Flags for getsockopt */
313313#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
lib/libc/include/generic-glibc/netinet/udp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netipx/ipx.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netiucv/iucv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netpacket/packet.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for use with Linux AF_PACKET sockets.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netrom/netrom.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/netrose/rose.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for Rose packet radio address family.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/nl_types.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/nss.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/obstack.h+1-1
......@@ -1,5 +1,5 @@
11/* obstack.h - object stack macros
2 Copyright (C) 1988-2021 Free Software Foundation, Inc.
2 Copyright (C) 1988-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/printf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/proc_service.h+1-1
......@@ -1,5 +1,5 @@
11/* Callback interface for libthread_db, functions users must define.
2 Copyright (C) 1999-2021 Free Software Foundation, Inc.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/pthread.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -516,7 +516,7 @@ extern int pthread_once (pthread_once_t *__once_control,
516516 exception in C++ code. If cancellation is implemented by unwinding
517517 this is necessary to have the compiler generate the unwind information. */
518518
519/* Set cancelability state of current thread to STATE, returning old
519/* Set cancellability state of current thread to STATE, returning old
520520 state in *OLDSTATE if OLDSTATE is not NULL. */
521521extern int pthread_setcancelstate (int __state, int *__oldstate);
522522
......@@ -933,7 +933,7 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
933933# ifdef __USE_GNU
934934# ifdef __REDIRECT_NTH
935935extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np,
936 (pthread_mutex_t *, int *),
936 (pthread_mutexattr_t *, int *),
937937 pthread_mutexattr_getrobust) __nonnull ((1))
938938 __attribute_deprecated_msg__ ("\
939939pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust");
......@@ -949,7 +949,7 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
949949# ifdef __USE_GNU
950950# ifdef __REDIRECT_NTH
951951extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
952 (pthread_mutex_t *, int),
952 (pthread_mutexattr_t *, int),
953953 pthread_mutexattr_setrobust) __nonnull ((1))
954954 __attribute_deprecated_msg__ ("\
955955pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust");
......@@ -981,7 +981,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
981981 __THROWNL __nonnull ((1));
982982
983983# ifdef __USE_XOPEN2K
984/* Try to acquire read lock for RWLOCK or return after specfied time. */
984/* Try to acquire read lock for RWLOCK or return after specified time. */
985985# ifndef __USE_TIME_BITS64
986986extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
987987 const struct timespec *__restrict
......@@ -1028,7 +1028,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
10281028 __THROWNL __nonnull ((1));
10291029
10301030# ifdef __USE_XOPEN2K
1031/* Try to acquire write lock for RWLOCK or return after specfied time. */
1031/* Try to acquire write lock for RWLOCK or return after specified time. */
10321032# ifndef __USE_TIME_BITS64
10331033extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
10341034 const struct timespec *__restrict
lib/libc/include/generic-glibc/pty.h+1-1
......@@ -1,5 +1,5 @@
11/* Functions for pseudo TTY handling.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/pwd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/re_comp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/regdef.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/regex.h+39-12
......@@ -1,6 +1,6 @@
11/* Definitions for data structures and routines for the regular
22 expression library.
3 Copyright (C) 1985, 1989-2021 Free Software Foundation, Inc.
3 Copyright (C) 1985, 1989-2023 Free Software Foundation, Inc.
44 This file is part of the GNU C Library.
55
66 The GNU C Library is free software; you can redistribute it and/or
......@@ -522,6 +522,30 @@ typedef struct
522522
523523/* Declarations for routines. */
524524
525#ifndef _REGEX_NELTS
526# if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
527 && !defined __STDC_NO_VLA__)
528# define _REGEX_NELTS(n) n
529# else
530# define _REGEX_NELTS(n)
531# endif
532#endif
533
534#if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
535# pragma GCC diagnostic push
536# pragma GCC diagnostic ignored "-Wvla"
537#endif
538
539#ifndef _Attr_access_
540# ifdef __attr_access
541# define _Attr_access_(arg) __attr_access (arg)
542# elif defined __GNUC__ && 10 <= __GNUC__
543# define _Attr_access_(x) __attribute__ ((__access__ x))
544# else
545# define _Attr_access_(x)
546# endif
547#endif
548
525549#ifdef __USE_GNU
526550/* Sets the current default syntax to SYNTAX, and return the old syntax.
527551 You can also simply assign to the 're_syntax_options' variable. */
......@@ -537,7 +561,7 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
537561 'regfree'. */
538562extern const char *re_compile_pattern (const char *__pattern, size_t __length,
539563 struct re_pattern_buffer *__buffer)
540 __attr_access ((__read_only__, 1, 2));
564 _Attr_access_ ((__read_only__, 1, 2));
541565
542566
543567/* Compile a fastmap for the compiled pattern in BUFFER; used to
......@@ -555,7 +579,7 @@ extern regoff_t re_search (struct re_pattern_buffer *__buffer,
555579 const char *__String, regoff_t __length,
556580 regoff_t __start, regoff_t __range,
557581 struct re_registers *__regs)
558 __attr_access ((__read_only__, 2, 3));
582 _Attr_access_ ((__read_only__, 2, 3));
559583
560584
561585/* Like 're_search', but search in the concatenation of STRING1 and
......@@ -566,8 +590,8 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
566590 regoff_t __start, regoff_t __range,
567591 struct re_registers *__regs,
568592 regoff_t __stop)
569 __attr_access ((__read_only__, 2, 3))
570 __attr_access ((__read_only__, 4, 5));
593 _Attr_access_ ((__read_only__, 2, 3))
594 _Attr_access_ ((__read_only__, 4, 5));
571595
572596
573597/* Like 're_search', but return how many characters in STRING the regexp
......@@ -575,7 +599,7 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
575599extern regoff_t re_match (struct re_pattern_buffer *__buffer,
576600 const char *__String, regoff_t __length,
577601 regoff_t __start, struct re_registers *__regs)
578 __attr_access ((__read_only__, 2, 3));
602 _Attr_access_ ((__read_only__, 2, 3));
579603
580604
581605/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
......@@ -584,8 +608,8 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
584608 const char *__string2, regoff_t __length2,
585609 regoff_t __start, struct re_registers *__regs,
586610 regoff_t __stop)
587 __attr_access ((__read_only__, 2, 3))
588 __attr_access ((__read_only__, 4, 5));
611 _Attr_access_ ((__read_only__, 2, 3))
612 _Attr_access_ ((__read_only__, 4, 5));
589613
590614
591615/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
......@@ -654,16 +678,19 @@ extern int regcomp (regex_t *_Restrict_ __preg,
654678
655679extern int regexec (const regex_t *_Restrict_ __preg,
656680 const char *_Restrict_ __String, size_t __nmatch,
657 regmatch_t __pmatch[_Restrict_arr_],
658 int __eflags)
659 __attr_access ((__write_only__, 4, 3));
681 regmatch_t __pmatch[_Restrict_arr_
682 _REGEX_NELTS (__nmatch)],
683 int __eflags);
660684
661685extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
662686 char *_Restrict_ __errbuf, size_t __errbuf_size)
663 __attr_access ((__write_only__, 3, 4));
687 _Attr_access_ ((__write_only__, 3, 4));
664688
665689extern void regfree (regex_t *__preg);
666690
691#if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
692# pragma GCC diagnostic pop
693#endif
667694
668695#ifdef __cplusplus
669696}
lib/libc/include/generic-glibc/regexp.h+1-2
......@@ -1,6 +1,5 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/resolv.h+3-31
......@@ -87,7 +87,7 @@
8787/*
8888 * Resolver configuration file.
8989 * Normally not present, but may contain the address of the
90 * inital name server(s) to query and the domain search list.
90 * initial name server(s) to query and the domain search list.
9191 */
9292
9393#ifndef _PATH_RESCONF
......@@ -132,6 +132,7 @@ struct res_sym {
132132 as a TLD. */
133133#define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */
134134#define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */
135#define RES_NOAAAA 0x08000000 /* Suppress AAAA queries. */
135136
136137#define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH)
137138
......@@ -169,35 +170,6 @@ __END_DECLS
169170#define res_init __res_init
170171#define res_isourserver __res_isourserver
171172
172/* In glibc 2.33 and earlier res_search, res_nsearch, res_query, res_nquery,
173 * res_querydomain, res_nquerydomain, dn_skipname, dn_comp, dn_expand were
174 * #define'd to __res_search, __res_nsearch, etc. glibc 2.34 onwards removes
175 * the macros and exposes the symbols directly. New glibc exposes compat
176 * symbols with underscores for backwards compatibility. Applications linked to
177 * glibc 2.34+ are expected to use the non-underscored symbols.
178 *
179 * It is enough to bring the macros back when compiling against the older glibc
180 * versions.
181 *
182 * See glibc commits:
183 * - ea9878ec271c791880fcbbe519d70c42f8113750 res_*
184 * - 391e02236b931132c0e8b5ba4c3b087c2aaa1044 dn_skipname
185 * - fd8a87c0c1932de591e7ad108ff6288a4b6b18c9 dn_comp
186 * - 640bbdf71c6f10ac26252ac67a22902e26657bd8 dn_expand
187 */
188#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 34)
189#define res_search __res_search
190#define res_nsearch __res_nsearch
191#define res_query __res_query
192#define res_nquery __res_nquery
193#define res_querydomain __res_querydomain
194#define res_nquerydomain __res_nquerydomain
195#define dn_skipname __dn_skipname
196#define dn_comp __dn_comp
197#define dn_expand __dn_expand
198#endif
199/* end glibc compat hacks */
200
201173#ifdef _LIBC
202174# define __RESOLV_DEPRECATED
203175# define __RESOLV_DEPRECATED_MSG(msg)
......@@ -334,4 +306,4 @@ void res_nclose (res_state) __THROW;
334306
335307__END_DECLS
336308
337#endif /* !_RESOLV_H_ */
309#endif /* !_RESOLV_H_ */
\ No newline at end of file
lib/libc/include/generic-glibc/sched.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/scsi/scsi.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/scsi/scsi_ioctl.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/scsi/sg.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -119,7 +119,7 @@ struct sg_scsi_id {
119119/* Used by SG_GET_REQUEST_TABLE ioctl(). */
120120typedef struct sg_req_info {
121121 char req_state; /* 0 -> not used, 1 -> written, 2 -> ready to read */
122 char orphan; /* 0 -> normal request, 1 -> from interruped SG_IO */
122 char orphan; /* 0 -> normal request, 1 -> from interrupted SG_IO */
123123 char sg_io_owned; /* 0 -> complete with read(), 1 -> owned by SG_IO */
124124 char problem; /* 0 -> no problem detected, 1 -> error to report */
125125 int pack_id; /* pack_id associated with request */
lib/libc/include/generic-glibc/search.h+2-2
......@@ -1,5 +1,5 @@
11/* Declarations for System V style searching functions.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -78,7 +78,7 @@ struct _ENTRY;
7878
7979/* Family of hash table handling functions. The functions also
8080 have reentrant counterparts ending with _r. The non-reentrant
81 functions all work on a signle internal hashing table. */
81 functions all work on a single internal hashing table. */
8282
8383/* Search for entry matching ITEM.key in internal hash table. If
8484 ACTION is `FIND' return found entry or signal error by returning
lib/libc/include/generic-glibc/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sgidefs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sgtty.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/shadow.h+9-5
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -122,19 +122,23 @@ extern int putspent (const struct spwd *__p, FILE *__stream);
122122 or due to the implementation they are cancellation points and
123123 therefore not marked with __THROW. */
124124extern int getspent_r (struct spwd *__result_buf, char *__buffer,
125 size_t __buflen, struct spwd **__result);
125 size_t __buflen, struct spwd **__result)
126 __attr_access ((__write_only__, 2, 3));
126127
127128extern int getspnam_r (const char *__name, struct spwd *__result_buf,
128129 char *__buffer, size_t __buflen,
129 struct spwd **__result);
130 struct spwd **__result)
131 __attr_access ((__write_only__, 3, 4));
130132
131133extern int sgetspent_r (const char *__string, struct spwd *__result_buf,
132134 char *__buffer, size_t __buflen,
133 struct spwd **__result);
135 struct spwd **__result)
136 __attr_access ((__write_only__, 3, 4));
134137
135138extern int fgetspent_r (FILE *__stream, struct spwd *__result_buf,
136139 char *__buffer, size_t __buflen,
137 struct spwd **__result);
140 struct spwd **__result)
141 __attr_access ((__write_only__, 3, 4));
138142#endif /* misc */
139143
140144
lib/libc/include/generic-glibc/signal.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/spawn.h+10-4
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX spawn interface.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 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
......@@ -166,7 +166,6 @@ extern int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr,
166166 __restrict __schedparam)
167167 __THROW __nonnull ((1, 2));
168168
169
170169/* Initialize data structure for file attribute for `spawn' call. */
171170extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *
172171 __file_actions)
......@@ -199,7 +198,7 @@ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *
199198 int __fd, int __newfd)
200199 __THROW __nonnull ((1));
201200
202#ifdef __USE_GNU
201#ifdef __USE_MISC
203202/* Add an action changing the directory to PATH during spawn. This
204203 affects the subsequent file actions. */
205204extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
......@@ -221,7 +220,14 @@ posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t *,
221220 int __from)
222221 __THROW __nonnull ((1));
223222
224#endif
223/* Add an action to set the process group of the foreground process group
224 associated with the terminal TCFD. */
225extern int
226posix_spawn_file_actions_addtcsetpgrp_np (posix_spawn_file_actions_t *,
227 int __tcfd)
228 __THROW __nonnull ((1));
229
230#endif /* __USE_MISC */
225231
226232__END_DECLS
227233
lib/libc/include/generic-glibc/stdc-predef.h+5-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -36,17 +36,21 @@
3636#ifdef __GCC_IEC_559
3737# if __GCC_IEC_559 > 0
3838# define __STDC_IEC_559__ 1
39# define __STDC_IEC_60559_BFP__ 201404L
3940# endif
4041#else
4142# define __STDC_IEC_559__ 1
43# define __STDC_IEC_60559_BFP__ 201404L
4244#endif
4345
4446#ifdef __GCC_IEC_559_COMPLEX
4547# if __GCC_IEC_559_COMPLEX > 0
4648# define __STDC_IEC_559_COMPLEX__ 1
49# define __STDC_IEC_60559_COMPLEX__ 201404L
4750# endif
4851#else
4952# define __STDC_IEC_559_COMPLEX__ 1
53# define __STDC_IEC_60559_COMPLEX__ 201404L
5054#endif
5155
5256/* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is
lib/libc/include/generic-glibc/stdint.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/stdio.h+103-32
......@@ -1,5 +1,5 @@
11/* Define ISO C stdio on top of C++ iostreams.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 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
......@@ -42,7 +42,7 @@ __BEGIN_DECLS
4242#include <bits/types/FILE.h>
4343#include <bits/types/struct_FILE.h>
4444
45#ifdef __USE_GNU
45#ifdef __USE_MISC
4646# include <bits/types/cookie_io_functions_t.h>
4747#endif
4848
......@@ -120,18 +120,29 @@ typedef __fpos64_t fpos64_t;
120120# define P_tmpdir "/tmp"
121121#endif
122122
123#define L_tmpnam 20
124#define TMP_MAX 238328
123125
124126/* Get the values:
125 L_tmpnam How long an array of chars must be to be passed to `tmpnam'.
126 TMP_MAX The minimum number of unique filenames generated by tmpnam
127 (and tempnam when it uses tmpnam's name space),
128 or tempnam (the two are separate).
129 L_ctermid How long an array to pass to `ctermid'.
130 L_cuserid How long an array to pass to `cuserid'.
131 FOPEN_MAX Minimum number of files that can be open at once.
132127 FILENAME_MAX Maximum length of a filename. */
133128#include <bits/stdio_lim.h>
134129
130#ifdef __USE_POSIX
131# define L_ctermid 9
132# if !defined __USE_XOPEN2K || defined __USE_GNU
133# define L_cuserid 9
134# endif
135#endif
136
137#undef FOPEN_MAX
138#define FOPEN_MAX 16
139
140
141#if __GLIBC_USE (ISOC2X)
142/* Maximum length of printf output for a NaN. */
143# define _PRINTF_NAN_LEN_MAX 4
144#endif
145
135146
136147/* Standard streams. */
137148extern FILE *stdin; /* Standard input stream. */
......@@ -169,7 +180,7 @@ extern int renameat2 (int __oldfd, const char *__old, int __newfd,
169180
170181 This function is a possible cancellation point and therefore not
171182 marked with __THROW. */
172extern int fclose (FILE *__stream);
183extern int fclose (FILE *__stream) __nonnull ((1));
173184
174185#undef __attr_dealloc_fclose
175186#define __attr_dealloc_fclose __attr_dealloc (fclose, 1)
......@@ -258,7 +269,7 @@ extern FILE *fopen (const char *__restrict __filename,
258269 marked with __THROW. */
259270extern FILE *freopen (const char *__restrict __filename,
260271 const char *__restrict __modes,
261 FILE *__restrict __stream) __wur;
272 FILE *__restrict __stream) __wur __nonnull ((3));
262273#else
263274# ifdef __REDIRECT
264275extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
......@@ -279,7 +290,7 @@ extern FILE *fopen64 (const char *__restrict __filename,
279290 __attribute_malloc__ __attr_dealloc_fclose __wur;
280291extern FILE *freopen64 (const char *__restrict __filename,
281292 const char *__restrict __modes,
282 FILE *__restrict __stream) __wur;
293 FILE *__restrict __stream) __wur __nonnull ((3));
283294#endif
284295
285296#ifdef __USE_POSIX
......@@ -288,7 +299,7 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW
288299 __attribute_malloc__ __attr_dealloc_fclose __wur;
289300#endif
290301
291#ifdef __USE_GNU
302#ifdef __USE_MISC
292303/* Create a new stream that refers to the given magic cookie,
293304 and uses the given functions for input and output. */
294305extern FILE *fopencookie (void *__restrict __magic_cookie,
......@@ -378,7 +389,7 @@ extern int vsnprintf (char *__restrict __s, size_t __maxlen,
378389 __THROWNL __attribute__ ((__format__ (__printf__, 3, 0)));
379390#endif
380391
381#if __GLIBC_USE (LIB_EXT2)
392#if defined (__USE_MISC) || __GLIBC_USE (LIB_EXT2)
382393/* Write formatted output to a string dynamically allocated with `malloc'.
383394 Store the address of the string in *PTR. */
384395extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
......@@ -424,7 +435,28 @@ extern int sscanf (const char *__restrict __s,
424435#include <bits/floatn.h>
425436#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
426437 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
427# ifdef __REDIRECT
438# if __GLIBC_USE (C2X_STRTOL)
439# ifdef __REDIRECT
440extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
441 const char *__restrict __format, ...),
442 __isoc23_fscanf) __wur;
443extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
444 __isoc23_scanf) __wur;
445extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s,
446 const char *__restrict __format, ...),
447 __isoc23_sscanf);
448# else
449extern int __isoc23_fscanf (FILE *__restrict __stream,
450 const char *__restrict __format, ...) __wur;
451extern int __isoc23_scanf (const char *__restrict __format, ...) __wur;
452extern int __isoc23_sscanf (const char *__restrict __s,
453 const char *__restrict __format, ...) __THROW;
454# define fscanf __isoc23_fscanf
455# define scanf __isoc23_scanf
456# define sscanf __isoc23_sscanf
457# endif
458# else
459# ifdef __REDIRECT
428460extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
429461 const char *__restrict __format, ...),
430462 __isoc99_fscanf) __wur;
......@@ -433,15 +465,16 @@ extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
433465extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s,
434466 const char *__restrict __format, ...),
435467 __isoc99_sscanf);
436# else
468# else
437469extern int __isoc99_fscanf (FILE *__restrict __stream,
438470 const char *__restrict __format, ...) __wur;
439471extern int __isoc99_scanf (const char *__restrict __format, ...) __wur;
440472extern int __isoc99_sscanf (const char *__restrict __s,
441473 const char *__restrict __format, ...) __THROW;
442# define fscanf __isoc99_fscanf
443# define scanf __isoc99_scanf
444# define sscanf __isoc99_sscanf
474# define fscanf __isoc99_fscanf
475# define scanf __isoc99_scanf
476# define sscanf __isoc99_sscanf
477# endif
445478# endif
446479#endif
447480
......@@ -468,7 +501,37 @@ extern int vsscanf (const char *__restrict __s,
468501
469502/* Same redirection as above for the v*scanf family. */
470503# if !__GLIBC_USE (DEPRECATED_SCANF)
471# if defined __REDIRECT && !defined __LDBL_COMPAT \
504# if __GLIBC_USE (C2X_STRTOL)
505# if defined __REDIRECT && !defined __LDBL_COMPAT \
506 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
507extern int __REDIRECT (vfscanf,
508 (FILE *__restrict __s,
509 const char *__restrict __format, __gnuc_va_list __arg),
510 __isoc23_vfscanf)
511 __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
512extern int __REDIRECT (vscanf, (const char *__restrict __format,
513 __gnuc_va_list __arg), __isoc23_vscanf)
514 __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
515extern int __REDIRECT_NTH (vsscanf,
516 (const char *__restrict __s,
517 const char *__restrict __format,
518 __gnuc_va_list __arg), __isoc23_vsscanf)
519 __attribute__ ((__format__ (__scanf__, 2, 0)));
520# elif !defined __REDIRECT
521extern int __isoc23_vfscanf (FILE *__restrict __s,
522 const char *__restrict __format,
523 __gnuc_va_list __arg) __wur;
524extern int __isoc23_vscanf (const char *__restrict __format,
525 __gnuc_va_list __arg) __wur;
526extern int __isoc23_vsscanf (const char *__restrict __s,
527 const char *__restrict __format,
528 __gnuc_va_list __arg) __THROW;
529# define vfscanf __isoc23_vfscanf
530# define vscanf __isoc23_vscanf
531# define vsscanf __isoc23_vsscanf
532# endif
533# else
534# if defined __REDIRECT && !defined __LDBL_COMPAT \
472535 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
473536extern int __REDIRECT (vfscanf,
474537 (FILE *__restrict __s,
......@@ -483,7 +546,7 @@ extern int __REDIRECT_NTH (vsscanf,
483546 const char *__restrict __format,
484547 __gnuc_va_list __arg), __isoc99_vsscanf)
485548 __attribute__ ((__format__ (__scanf__, 2, 0)));
486# elif !defined __REDIRECT
549# elif !defined __REDIRECT
487550extern int __isoc99_vfscanf (FILE *__restrict __s,
488551 const char *__restrict __format,
489552 __gnuc_va_list __arg) __wur;
......@@ -492,9 +555,10 @@ extern int __isoc99_vscanf (const char *__restrict __format,
492555extern int __isoc99_vsscanf (const char *__restrict __s,
493556 const char *__restrict __format,
494557 __gnuc_va_list __arg) __THROW;
495# define vfscanf __isoc99_vfscanf
496# define vscanf __isoc99_vscanf
497# define vsscanf __isoc99_vsscanf
558# define vfscanf __isoc99_vfscanf
559# define vscanf __isoc99_vscanf
560# define vsscanf __isoc99_vsscanf
561# endif
498562# endif
499563# endif
500564#endif /* Use ISO C9x. */
......@@ -584,7 +648,7 @@ extern int putw (int __w, FILE *__stream);
584648 This function is a possible cancellation point and therefore not
585649 marked with __THROW. */
586650extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
587 __wur __attr_access ((__write_only__, 1, 2));
651 __wur __fortified_attr_access (__write_only__, 1, 2);
588652
589653#if __GLIBC_USE (DEPRECATED_GETS)
590654/* Get a newline-terminated string from stdin, removing the newline.
......@@ -608,7 +672,7 @@ extern char *gets (char *__s) __wur __attribute_deprecated__;
608672 therefore not marked with __THROW. */
609673extern char *fgets_unlocked (char *__restrict __s, int __n,
610674 FILE *__restrict __stream) __wur
611 __attr_access ((__write_only__, 1, 2));
675 __fortified_attr_access (__write_only__, 1, 2);
612676#endif
613677
614678
......@@ -795,7 +859,7 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur;
795859
796860 This function is a possible cancellation point and therefore not
797861 marked with __THROW. */
798extern void perror (const char *__s);
862extern void perror (const char *__s) __COLD;
799863
800864
801865#ifdef __USE_POSIX
......@@ -879,20 +943,27 @@ extern void funlockfile (FILE *__stream) __THROW;
879943extern int __uflow (FILE *);
880944extern int __overflow (FILE *, int);
881945
946#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
947/* Declare all functions from bits/stdio2-decl.h first. */
948# include <bits/stdio2-decl.h>
949#endif
950
951/* The following headers provide asm redirections. These redirections must
952 appear before the first usage of these functions, e.g. in bits/stdio.h. */
953#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
954# include <bits/stdio-ldbl.h>
955#endif
956
882957/* If we are compiling with optimizing read this file. It contains
883958 several optimizing inline functions and macros. */
884959#ifdef __USE_EXTERN_INLINES
885960# include <bits/stdio.h>
886961#endif
887962#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
963/* Now include the function definitions and redirects too. */
888964# include <bits/stdio2.h>
889965#endif
890966
891#include <bits/floatn.h>
892#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
893# include <bits/stdio-ldbl.h>
894#endif
895
896967__END_DECLS
897968
898969#endif /* <stdio.h> included. */
\ No newline at end of file
lib/libc/include/generic-glibc/stdio_ext.h+1-1
......@@ -1,5 +1,5 @@
11/* Functions to access FILE structure internals.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/stdlib.h+139-4
......@@ -1,4 +1,5 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
2 Copyright The GNU Toolchain Authors.
23 This file is part of the GNU C Library.
34
45 The GNU C Library is free software; you can redistribute it and/or
......@@ -207,6 +208,71 @@ extern unsigned long long int strtoull (const char *__restrict __nptr,
207208 __THROW __nonnull ((1));
208209#endif /* ISO C99 or use MISC. */
209210
211/* Versions of the above functions that handle '0b' and '0B' prefixes
212 in base 0 or 2. */
213#if __GLIBC_USE (C2X_STRTOL)
214# ifdef __REDIRECT
215extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr,
216 char **__restrict __endptr,
217 int __base), __isoc23_strtol)
218 __nonnull ((1));
219extern unsigned long int __REDIRECT_NTH (strtoul,
220 (const char *__restrict __nptr,
221 char **__restrict __endptr,
222 int __base), __isoc23_strtoul)
223 __nonnull ((1));
224# ifdef __USE_MISC
225__extension__
226extern long long int __REDIRECT_NTH (strtoq, (const char *__restrict __nptr,
227 char **__restrict __endptr,
228 int __base), __isoc23_strtoll)
229 __nonnull ((1));
230__extension__
231extern unsigned long long int __REDIRECT_NTH (strtouq,
232 (const char *__restrict __nptr,
233 char **__restrict __endptr,
234 int __base), __isoc23_strtoull)
235 __nonnull ((1));
236# endif
237__extension__
238extern long long int __REDIRECT_NTH (strtoll, (const char *__restrict __nptr,
239 char **__restrict __endptr,
240 int __base), __isoc23_strtoll)
241 __nonnull ((1));
242__extension__
243extern unsigned long long int __REDIRECT_NTH (strtoull,
244 (const char *__restrict __nptr,
245 char **__restrict __endptr,
246 int __base), __isoc23_strtoull)
247 __nonnull ((1));
248# else
249extern long int __isoc23_strtol (const char *__restrict __nptr,
250 char **__restrict __endptr, int __base)
251 __THROW __nonnull ((1));
252extern unsigned long int __isoc23_strtoul (const char *__restrict __nptr,
253 char **__restrict __endptr,
254 int __base)
255 __THROW __nonnull ((1));
256__extension__
257extern long long int __isoc23_strtoll (const char *__restrict __nptr,
258 char **__restrict __endptr, int __base)
259 __THROW __nonnull ((1));
260__extension__
261extern unsigned long long int __isoc23_strtoull (const char *__restrict __nptr,
262 char **__restrict __endptr,
263 int __base)
264 __THROW __nonnull ((1));
265# define strtol __isoc23_strtol
266# define strtoul __isoc23_strtoul
267# ifdef __USE_MISC
268# define strtoq __isoc23_strtoll
269# define strtouq __isoc23_strtoull
270# endif
271# define strtoll __isoc23_strtoll
272# define strtoull __isoc23_strtoull
273# endif
274#endif
275
210276/* Convert a floating-point number to a string. */
211277#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
212278extern int strfromd (char *__dest, size_t __size, const char *__format,
......@@ -292,6 +358,60 @@ extern unsigned long long int strtoull_l (const char *__restrict __nptr,
292358 int __base, locale_t __loc)
293359 __THROW __nonnull ((1, 4));
294360
361/* Versions of the above functions that handle '0b' and '0B' prefixes
362 in base 0 or 2. */
363# if __GLIBC_USE (C2X_STRTOL)
364# ifdef __REDIRECT
365extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr,
366 char **__restrict __endptr,
367 int __base, locale_t __loc),
368 __isoc23_strtol_l)
369 __nonnull ((1, 4));
370extern unsigned long int __REDIRECT_NTH (strtoul_l,
371 (const char *__restrict __nptr,
372 char **__restrict __endptr,
373 int __base, locale_t __loc),
374 __isoc23_strtoul_l)
375 __nonnull ((1, 4));
376__extension__
377extern long long int __REDIRECT_NTH (strtoll_l, (const char *__restrict __nptr,
378 char **__restrict __endptr,
379 int __base,
380 locale_t __loc),
381 __isoc23_strtoll_l)
382 __nonnull ((1, 4));
383__extension__
384extern unsigned long long int __REDIRECT_NTH (strtoull_l,
385 (const char *__restrict __nptr,
386 char **__restrict __endptr,
387 int __base, locale_t __loc),
388 __isoc23_strtoull_l)
389 __nonnull ((1, 4));
390# else
391extern long int __isoc23_strtol_l (const char *__restrict __nptr,
392 char **__restrict __endptr, int __base,
393 locale_t __loc) __THROW __nonnull ((1, 4));
394extern unsigned long int __isoc23_strtoul_l (const char *__restrict __nptr,
395 char **__restrict __endptr,
396 int __base, locale_t __loc)
397 __THROW __nonnull ((1, 4));
398__extension__
399extern long long int __isoc23_strtoll_l (const char *__restrict __nptr,
400 char **__restrict __endptr,
401 int __base, locale_t __loc)
402 __THROW __nonnull ((1, 4));
403__extension__
404extern unsigned long long int __isoc23_strtoull_l (const char *__restrict __nptr,
405 char **__restrict __endptr,
406 int __base, locale_t __loc)
407 __THROW __nonnull ((1, 4));
408# define strtol_l __isoc23_strtol_l
409# define strtoul_l __isoc23_strtoul_l
410# define strtoll_l __isoc23_strtoll_l
411# define strtoull_l __isoc23_strtoull_l
412# endif
413# endif
414
295415extern double strtod_l (const char *__restrict __nptr,
296416 char **__restrict __endptr, locale_t __loc)
297417 __THROW __nonnull ((1, 3));
......@@ -532,6 +652,19 @@ extern int seed48_r (unsigned short int __seed16v[3],
532652extern int lcong48_r (unsigned short int __param[7],
533653 struct drand48_data *__buffer)
534654 __THROW __nonnull ((1, 2));
655
656/* Return a random integer between zero and 2**32-1 (inclusive). */
657extern __uint32_t arc4random (void)
658 __THROW __wur;
659
660/* Fill the buffer with random data. */
661extern void arc4random_buf (void *__buf, size_t __size)
662 __THROW __nonnull ((1));
663
664/* Return a random number between zero (inclusive) and the specified
665 limit (exclusive). */
666extern __uint32_t arc4random_uniform (__uint32_t __upper_bound)
667 __THROW __wur;
535668# endif /* Use misc. */
536669#endif /* Use misc or X/Open. */
537670
......@@ -589,7 +722,8 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
589722#ifdef __USE_ISOC11
590723/* ISO C variant of aligned allocation. */
591724extern void *aligned_alloc (size_t __alignment, size_t __size)
592 __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
725 __THROW __attribute_malloc__ __attribute_alloc_align__ ((1))
726 __attribute_alloc_size__ ((2)) __wur;
593727#endif
594728
595729/* Abort execution and generate a core-dump. */
......@@ -943,7 +1077,8 @@ extern size_t mbstowcs (wchar_t *__restrict __pwcs,
9431077extern size_t wcstombs (char *__restrict __s,
9441078 const wchar_t *__restrict __pwcs, size_t __n)
9451079 __THROW
946 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
1080 __fortified_attr_access (__write_only__, 1, 3)
1081 __attr_access ((__read_only__, 2));
9471082
9481083#ifdef __USE_MISC
9491084/* Determine whether the string value of RESPONSE matches the affirmation
......@@ -997,7 +1132,7 @@ extern char *ptsname (int __fd) __THROW __wur;
9971132 terminal associated with the master FD is open on in BUF.
9981133 Return 0 on success, otherwise an error number. */
9991134extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
1000 __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
1135 __THROW __nonnull ((2)) __fortified_attr_access (__write_only__, 2, 3);
10011136
10021137/* Open a master pseudo terminal and return its file descriptor. */
10031138extern int getpt (void);
lib/libc/include/generic-glibc/string.h+35-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -64,6 +64,22 @@ extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
6464extern int memcmp (const void *__s1, const void *__s2, size_t __n)
6565 __THROW __attribute_pure__ __nonnull ((1, 2));
6666
67/* Compare N bytes of S1 and S2. Return zero if S1 and S2 are equal.
68 Return some non-zero value otherwise.
69
70 Essentially __memcmpeq has the exact same semantics as memcmp
71 except the return value is less constrained. memcmp is always a
72 correct implementation of __memcmpeq. As well !!memcmp, -memcmp,
73 or bcmp are correct implementations.
74
75 __memcmpeq is meant to be used by compilers when memcmp return is
76 only used for its boolean value.
77
78 __memcmpeq is declared only for use by compilers. Programs should
79 continue to use memcmp. */
80extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
81 __THROW __attribute_pure__ __nonnull ((1, 2));
82
6783/* Search N bytes of S for C. */
6884#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
6985extern "C++"
......@@ -258,7 +274,7 @@ extern char *strrchr (const char *__s, int __c)
258274 __THROW __attribute_pure__ __nonnull ((1));
259275#endif
260276
261#ifdef __USE_GNU
277#ifdef __USE_MISC
262278/* This function is similar to `strchr'. But it returns a pointer to
263279 the closing NUL byte in case C is not found in S. */
264280# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
......@@ -352,7 +368,7 @@ extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
352368 __THROW __nonnull ((2, 3));
353369#endif
354370
355#ifdef __USE_GNU
371#ifdef __USE_MISC
356372/* Similar to `strstr' but this function ignores the case of both strings. */
357373# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
358374extern "C++" char *strcasestr (char *__haystack, const char *__needle)
......@@ -366,7 +382,7 @@ extern char *strcasestr (const char *__haystack, const char *__needle)
366382# endif
367383#endif
368384
369#ifdef __USE_GNU
385#ifdef __USE_MISC
370386/* Find the first occurrence of NEEDLE in HAYSTACK.
371387 NEEDLE is NEEDLELEN bytes long;
372388 HAYSTACK is HAYSTACKLEN bytes long. */
......@@ -448,7 +464,7 @@ extern char *strerror_l (int __errnum, locale_t __l) __THROW;
448464/* Set N bytes of S to 0. The compiler will not delete a call to this
449465 function, even if S is dead after the call. */
450466extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1))
451 __attr_access ((__write_only__, 1, 2));
467 __fortified_attr_access (__write_only__, 1, 2);
452468
453469/* Return the next DELIM-delimited token from *STRINGP,
454470 terminating it with a '\0', and update *STRINGP to point past it. */
......@@ -485,6 +501,19 @@ extern char *stpncpy (char *__restrict __dest,
485501 __THROW __nonnull ((1, 2));
486502#endif
487503
504#ifdef __USE_MISC
505/* Copy at most N - 1 characters from SRC to DEST. */
506extern size_t strlcpy (char *__restrict __dest,
507 const char *__restrict __src, size_t __n)
508 __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3));
509
510/* Append SRC to DEST, possibly with truncation to keep the total size
511 below N. */
512extern size_t strlcat (char *__restrict __dest,
513 const char *__restrict __src, size_t __n)
514 __THROW __nonnull ((1, 2)) __attr_access ((__read_write__, 1, 3));
515#endif
516
488517#ifdef __USE_GNU
489518/* Compare S1 and S2 as strings holding name & indices/version numbers. */
490519extern int strverscmp (const char *__s1, const char *__s2)
......@@ -495,7 +524,7 @@ extern char *strfry (char *__string) __THROW __nonnull ((1));
495524
496525/* Frobnicate N bytes of S. */
497526extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1))
498 __attr_access ((__write_only__, 1, 2));
527 __attr_access ((__read_write__, 1, 2));
499528
500529# ifndef basename
501530/* Return the file name within directory of FILENAME. We don't
lib/libc/include/generic-glibc/strings.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/acct.h+4-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -86,7 +86,9 @@ enum
8686 AFORK = 0x01, /* Has executed fork, but no exec. */
8787 ASU = 0x02, /* Used super-user privileges. */
8888 ACORE = 0x08, /* Dumped core. */
89 AXSIG = 0x10 /* Killed by a signal. */
89 AXSIG = 0x10, /* Killed by a signal. */
90 AGROUP = 0x20 /* Was the last task of the process
91 (task group). */
9092 };
9193
9294#if __BYTE_ORDER == __BIG_ENDIAN
lib/libc/include/generic-glibc/sys/asm.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -198,7 +198,7 @@ symbol = value
198198 TEXT(msg)
199199
200200/*
201 * Print formated string
201 * Print formatted string
202202 */
203203#define PRINT(string) \
204204 .set push; \
lib/libc/include/generic-glibc/sys/auxv.h+1-1
......@@ -1,5 +1,5 @@
11/* Access to the auxiliary vector.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/cachectl.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/cdefs.h+104-16
......@@ -1,4 +1,5 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
2 Copyright The GNU Toolchain Authors.
23 This file is part of the GNU C Library.
34
45 The GNU C Library is free software; you can redistribute it and/or
......@@ -26,8 +27,8 @@
2627/* The GNU libc does not support any K&R compilers or the traditional mode
2728 of ISO C compilers anymore. Check for some of the combinations not
2829 supported anymore. */
29#if defined __GNUC__ && !defined __STDC__
30# error "You need a ISO C conforming compiler to use the glibc headers"
30#if defined __GNUC__ && !defined __STDC__ && !defined __cplusplus
31# error "You need a ISO C or C++ conforming compiler to use the glibc headers"
3132#endif
3233
3334/* Some user header file might have defined this before. */
......@@ -80,7 +81,7 @@
8081# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
8182# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
8283# else
83# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
84# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4)
8485# if __cplusplus >= 201103L
8586# define __THROW noexcept (true)
8687# else
......@@ -97,6 +98,12 @@
9798# endif
9899# endif
99100
101# if __GNUC_PREREQ (4, 3) || __glibc_has_attribute (__cold__)
102# define __COLD __attribute__ ((__cold__))
103# else
104# define __COLD
105# endif
106
100107#else /* Not GCC or clang. */
101108
102109# if (defined __cplusplus \
......@@ -109,6 +116,7 @@
109116# define __THROW
110117# define __THROWNL
111118# define __NTH(fct) fct
119# define __COLD
112120
113121#endif /* GCC || clang. */
114122
......@@ -142,7 +150,8 @@
142150#define __bos0(ptr) __builtin_object_size (ptr, 0)
143151
144152/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
145#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0)
153#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
154 || __GNUC_PREREQ (12, 0))
146155# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
147156# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
148157#else
......@@ -150,6 +159,55 @@
150159# define __glibc_objsize(__o) __bos (__o)
151160#endif
152161
162#if __USE_FORTIFY_LEVEL > 0
163/* Compile time conditions to choose between the regular, _chk and _chk_warn
164 variants. These conditions should get evaluated to constant and optimized
165 away. */
166
167#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
168#define __glibc_unsigned_or_positive(__l) \
169 ((__typeof (__l)) 0 < (__typeof (__l)) -1 \
170 || (__builtin_constant_p (__l) && (__l) > 0))
171
172/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
173 condition can be folded to a constant and if it is true, or unknown (-1) */
174#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
175 ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) \
176 || (__glibc_unsigned_or_positive (__l) \
177 && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
178 (__s), (__osz))) \
179 && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz))))
180
181/* Conversely, we know at compile time that the length is unsafe if the
182 __L * __S <= __OBJSZ condition can be folded to a constant and if it is
183 false. */
184#define __glibc_unsafe_len(__l, __s, __osz) \
185 (__glibc_unsigned_or_positive (__l) \
186 && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
187 __s, __osz)) \
188 && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
189
190/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
191 declared. */
192
193#define __glibc_fortify(f, __l, __s, __osz, ...) \
194 (__glibc_safe_or_unknown_len (__l, __s, __osz) \
195 ? __ ## f ## _alias (__VA_ARGS__) \
196 : (__glibc_unsafe_len (__l, __s, __osz) \
197 ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
198 : __ ## f ## _chk (__VA_ARGS__, __osz)))
199
200/* Fortify function f, where object size argument passed to f is the number of
201 elements and not total size. */
202
203#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
204 (__glibc_safe_or_unknown_len (__l, __s, __osz) \
205 ? __ ## f ## _alias (__VA_ARGS__) \
206 : (__glibc_unsafe_len (__l, __s, __osz) \
207 ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
208 : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))
209#endif
210
153211#if __GNUC_PREREQ (4,3)
154212# define __warnattr(msg) __attribute__((__warning__ (msg)))
155213# define __errordecl(name, msg) \
......@@ -210,6 +268,14 @@
210268# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
211269# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
212270
271#ifndef __REDIRECT_FORTIFY
272#define __REDIRECT_FORTIFY __REDIRECT
273#endif
274
275#ifndef __REDIRECT_FORTIFY_NTH
276#define __REDIRECT_FORTIFY_NTH __REDIRECT_NTH
277#endif
278
213279/*
214280#elif __SOME_OTHER_COMPILER__
215281
......@@ -243,6 +309,15 @@
243309# define __attribute_alloc_size__(params) /* Ignore. */
244310#endif
245311
312/* Tell the compiler which argument to an allocation function
313 indicates the alignment of the allocation. */
314#if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__)
315# define __attribute_alloc_align__(param) \
316 __attribute__ ((__alloc_align__ param))
317#else
318# define __attribute_alloc_align__(param) /* Ignore. */
319#endif
320
246321/* At some point during the gcc 2.96 development the `pure' attribute
247322 for functions was introduced. We don't want to use it unconditionally
248323 (although this would be possible) since it generates warnings. */
......@@ -318,16 +393,18 @@
318393#endif
319394
320395/* The nonnull function attribute marks pointer parameters that
321 must not be NULL. */
322#ifndef __nonnull
396 must not be NULL. This has the name __nonnull in glibc,
397 and __attribute_nonnull__ in files shared with Gnulib to avoid
398 collision with a different __nonnull in DragonFlyBSD 5.9. */
399#ifndef __attribute_nonnull__
323400# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
324# define __nonnull(params) __attribute__ ((__nonnull__ params))
401# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
325402# else
326# define __nonnull(params)
403# define __attribute_nonnull__(params)
327404# endif
328#elif !defined __GLIBC__
329# undef __nonnull
330# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params)
405#endif
406#ifndef __nonnull
407# define __nonnull(params) __attribute_nonnull__ (params)
331408#endif
332409
333410/* The returns_nonnull function attribute marks the return type of the function
......@@ -493,9 +570,9 @@
493570 [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
494571#endif
495572
496/* The #ifndef lets Gnulib avoid including these on non-glibc
497 platforms, where the includes typically do not exist. */
498#ifdef __GLIBC__
573/* Gnulib avoids including these, as they don't work on non-glibc or
574 older glibc platforms. */
575#ifndef __GNULIB_CDEFS
499576# include <bits/wordsize.h>
500577# include <bits/long-double.h>
501578#endif
......@@ -507,6 +584,8 @@
507584# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
508585# define __LDBL_REDIR_DECL(name) \
509586 extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
587# define __REDIRECT_LDBL(name, proto, alias) \
588 name proto __asm (__ASMNAME ("__" #alias "ieee128"))
510589
511590/* Alias name defined automatically, with leading underscores. */
512591# define __LDBL_REDIR2_DECL(name) \
......@@ -524,7 +603,6 @@
524603 __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
525604
526605/* Unused. */
527# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
528606# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
529607
530608# else
......@@ -603,12 +681,22 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
603681 size-index is not provided:
604682 access (access-mode, <ref-index> [, <size-index>]) */
605683# define __attr_access(x) __attribute__ ((__access__ x))
684/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
685 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. */
688# if __USE_FORTIFY_LEVEL == 3
689# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o)))
690# else
691# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s))
692# endif
606693# if __GNUC_PREREQ (11, 0)
607694# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
608695# else
609696# define __attr_access_none(argno)
610697# endif
611698#else
699# define __fortified_attr_access(a, o, s)
612700# define __attr_access(x)
613701# define __attr_access_none(argno)
614702#endif
lib/libc/include/generic-glibc/sys/debugreg.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/dir.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/epoll.h+28-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -22,6 +22,7 @@
2222#include <sys/types.h>
2323
2424#include <bits/types/sigset_t.h>
25#include <bits/types/struct_timespec.h>
2526
2627/* Get the platform-dependent flags. */
2728#include <bits/epoll.h>
......@@ -121,7 +122,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
121122 This function is a cancellation point and therefore not marked with
122123 __THROW. */
123124extern int epoll_wait (int __epfd, struct epoll_event *__events,
124 int __maxevents, int __timeout);
125 int __maxevents, int __timeout)
126 __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
125127
126128
127129/* Same as epoll_wait, but the thread's signal mask is temporarily
......@@ -131,7 +133,30 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events,
131133 __THROW. */
132134extern int epoll_pwait (int __epfd, struct epoll_event *__events,
133135 int __maxevents, int __timeout,
134 const __sigset_t *__ss);
136 const __sigset_t *__ss)
137 __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
138
139/* Same as epoll_pwait, but the timeout as a timespec.
140
141 This function is a cancellation point and therefore not marked with
142 __THROW. */
143#ifndef __USE_TIME_BITS64
144extern int epoll_pwait2 (int __epfd, struct epoll_event *__events,
145 int __maxevents, const struct timespec *__timeout,
146 const __sigset_t *__ss)
147 __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
148#else
149# ifdef __REDIRECT
150extern int __REDIRECT (epoll_pwait2, (int __epfd, struct epoll_event *__ev,
151 int __maxevs,
152 const struct timespec *__timeout,
153 const __sigset_t *__ss),
154 __epoll_pwait2_time64)
155 __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
156# else
157# define epoll_pwait2 __epoll_pwait2_time64
158# endif
159#endif
135160
136161__END_DECLS
137162
lib/libc/include/generic-glibc/sys/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/fanotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2010-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/file.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/fpregdef.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/fsuid.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/gmon.h+4-2
......@@ -111,6 +111,8 @@ extern struct __bb *__bb_head;
111111 * Always allocate at least this many tostructs. This
112112 * hides the inadequacy of the ARCDENSITY heuristic, at least
113113 * for small programs.
114 *
115 * Value can be overridden at runtime by glibc.gmon.minarcs tunable.
114116 */
115117#define MINARCS 50
116118
......@@ -124,8 +126,8 @@ extern struct __bb *__bb_head;
124126 * Used to be max representable value of ARCINDEX minus 2, but now
125127 * that ARCINDEX is a long, that's too large; we don't really want
126128 * to allow a 48 gigabyte table.
127 * The old value of 1<<16 wasn't high enough in practice for large C++
128 * programs; will 1<<20 be adequate for long? FIXME
129 *
130 * Value can be overridden at runtime by glibc.gmon.maxarcs tunable.
129131 */
130132#define MAXARCS (1 << 20)
131133
lib/libc/include/generic-glibc/sys/gmon_out.h+1-2
......@@ -1,6 +1,5 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by David Mosberger <davidm@cs.arizona.edu>.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/sys/ifunc.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions used by AArch64 indirect function resolvers.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/io.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/ioctl.h+3-3
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -42,8 +42,8 @@ __BEGIN_DECLS
4242extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
4343#else
4444# ifdef __REDIRECT
45extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
46 __ioctl_time64) __THROW;
45extern int __REDIRECT_NTH (ioctl, (int __fd, unsigned long int __request, ...),
46 __ioctl_time64);
4747# else
4848extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
4949# define ioctl __ioctl_time64
lib/libc/include/generic-glibc/sys/ipc.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/kd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/klog.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/mman.h+4-1
......@@ -1,5 +1,5 @@
11/* Definitions for BSD-style memory management.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 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
......@@ -146,6 +146,9 @@ extern int shm_open (const char *__name, int __oflag, mode_t __mode);
146146/* Remove shared memory segment. */
147147extern int shm_unlink (const char *__name);
148148
149/* System-specific extensions. */
150#include <bits/mman_ext.h>
151
149152__END_DECLS
150153
151154#endif /* sys/mman.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/mount.h+172-2
......@@ -1,5 +1,5 @@
11/* Header file for mounting/unmount Linux filesystems.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 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
......@@ -21,80 +21,119 @@
2121#ifndef _SYS_MOUNT_H
2222#define _SYS_MOUNT_H 1
2323
24#include <fcntl.h>
2425#include <features.h>
26#include <stdint.h>
27#include <stddef.h>
2528#include <sys/ioctl.h>
2629
27#define BLOCK_SIZE 1024
30#ifdef __has_include
31# if __has_include ("linux/mount.h")
32# include "linux/mount.h"
33# endif
34#endif
35
36
2837#define BLOCK_SIZE_BITS 10
38#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
2939
3040
3141/* These are the fs-independent mount-flags: up to 16 flags are
3242 supported */
3343enum
3444{
45#undef MS_RDONLY
3546 MS_RDONLY = 1, /* Mount read-only. */
3647#define MS_RDONLY MS_RDONLY
48#undef MS_NOSUID
3749 MS_NOSUID = 2, /* Ignore suid and sgid bits. */
3850#define MS_NOSUID MS_NOSUID
51#undef MS_NODEV
3952 MS_NODEV = 4, /* Disallow access to device special files. */
4053#define MS_NODEV MS_NODEV
54#undef MS_NOEXEC
4155 MS_NOEXEC = 8, /* Disallow program execution. */
4256#define MS_NOEXEC MS_NOEXEC
57#undef MS_SYNCHRONOUS
4358 MS_SYNCHRONOUS = 16, /* Writes are synced at once. */
4459#define MS_SYNCHRONOUS MS_SYNCHRONOUS
60#undef MS_REMOUNT
4561 MS_REMOUNT = 32, /* Alter flags of a mounted FS. */
4662#define MS_REMOUNT MS_REMOUNT
63#undef MS_MANDLOCK
4764 MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
4865#define MS_MANDLOCK MS_MANDLOCK
66#undef MS_DIRSYNC
4967 MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
5068#define MS_DIRSYNC MS_DIRSYNC
69#undef MS_NOSYMFOLLOW
5170 MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
5271#define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
72#undef MS_NOATIME
5373 MS_NOATIME = 1024, /* Do not update access times. */
5474#define MS_NOATIME MS_NOATIME
75#undef MS_NODIRATIME
5576 MS_NODIRATIME = 2048, /* Do not update directory access times. */
5677#define MS_NODIRATIME MS_NODIRATIME
78#undef MS_BIND
5779 MS_BIND = 4096, /* Bind directory at different place. */
5880#define MS_BIND MS_BIND
81#undef MS_MOVE
5982 MS_MOVE = 8192,
6083#define MS_MOVE MS_MOVE
84#undef MS_REC
6185 MS_REC = 16384,
6286#define MS_REC MS_REC
87#undef MS_SILENT
6388 MS_SILENT = 32768,
6489#define MS_SILENT MS_SILENT
90#undef MS_POSIXACL
6591 MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */
6692#define MS_POSIXACL MS_POSIXACL
93#undef MS_UNBINDABLE
6794 MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */
6895#define MS_UNBINDABLE MS_UNBINDABLE
96#undef MS_PRIVATE
6997 MS_PRIVATE = 1 << 18, /* Change to private. */
7098#define MS_PRIVATE MS_PRIVATE
99#undef MS_SLAVE
71100 MS_SLAVE = 1 << 19, /* Change to slave. */
72101#define MS_SLAVE MS_SLAVE
102#undef MS_SHARED
73103 MS_SHARED = 1 << 20, /* Change to shared. */
74104#define MS_SHARED MS_SHARED
105#undef MS_RELATIME
75106 MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */
76107#define MS_RELATIME MS_RELATIME
108#undef MS_KERNMOUNT
77109 MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */
78110#define MS_KERNMOUNT MS_KERNMOUNT
111#undef MS_I_VERSION
79112 MS_I_VERSION = 1 << 23, /* Update inode I_version field. */
80113#define MS_I_VERSION MS_I_VERSION
114#undef MS_STRICTATIME
81115 MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */
82116#define MS_STRICTATIME MS_STRICTATIME
117#undef MS_LAZYTIME
83118 MS_LAZYTIME = 1 << 25, /* Update the on-disk [acm]times lazily. */
84119#define MS_LAZYTIME MS_LAZYTIME
120#undef MS_ACTIVE
85121 MS_ACTIVE = 1 << 30,
86122#define MS_ACTIVE MS_ACTIVE
123#undef MS_NOUSER
87124 MS_NOUSER = 1 << 31
88125#define MS_NOUSER MS_NOUSER
89126};
90127
91128/* Flags that can be altered by MS_REMOUNT */
129#undef MS_RMT_MASK
92130#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION \
93131 |MS_LAZYTIME)
94132
95133
96134/* Magic mount flag number. Has to be or-ed to the flag values. */
97135
136#undef MS_MGC_VAL
98137#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
99138#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
100139
......@@ -103,20 +142,35 @@ enum
103142 is probably as bad and I don't want to create yet another include
104143 file. */
105144
145#undef BLKROSET
106146#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
147#undef BLKROGET
107148#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
149#undef BLKRRPART
108150#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
151#undef BLKGETSIZE
109152#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
153#undef BLKFLSBUF
110154#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
155#undef BLKRASET
111156#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
157#undef BLKRAGET
112158#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
159#undef BLKFRASET
113160#define BLKFRASET _IO(0x12,100) /* Set filesystem read-ahead. */
161#undef BLKFRAGET
114162#define BLKFRAGET _IO(0x12,101) /* Get filesystem read-ahead. */
163#undef BLKSECTSET
115164#define BLKSECTSET _IO(0x12,102) /* Set max sectors per request. */
165#undef BLKSECTGET
116166#define BLKSECTGET _IO(0x12,103) /* Get max sectors per request. */
167#undef BLKSSZGET
117168#define BLKSSZGET _IO(0x12,104) /* Get block device sector size. */
169#undef BLKBSZGET
118170#define BLKBSZGET _IOR(0x12,112,size_t)
171#undef BLKBSZSET
119172#define BLKBSZSET _IOW(0x12,113,size_t)
173#undef BLKGETSIZE64
120174#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size. */
121175
122176
......@@ -134,6 +188,84 @@ enum
134188};
135189
136190
191/* fsmount flags. */
192#define FSMOUNT_CLOEXEC 0x00000001
193
194/* mount attributes used on fsmount. */
195#define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only. */
196#define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits. */
197#define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files. */
198#define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution. */
199#define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated. */
200#define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */
201#define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */
202#define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */
203#define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times. */
204#define MOUNT_ATTR_IDMAP 0x00100000 /* Idmap mount to @userns_fd in struct mount_attr. */
205#define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks. */
206
207
208#ifndef MOUNT_ATTR_SIZE_VER0
209/* For mount_setattr. */
210struct mount_attr
211{
212 uint64_t attr_set;
213 uint64_t attr_clr;
214 uint64_t propagation;
215 uint64_t userns_fd;
216};
217#endif
218
219#define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */
220
221/* move_mount flags. */
222#define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */
223#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */
224#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */
225#define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */
226#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */
227#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
228#define MOVE_MOUNT_SET_GROUP 0x00000100 /* Set sharing group instead */
229
230
231/* fspick flags. */
232#define FSPICK_CLOEXEC 0x00000001
233#define FSPICK_SYMLINK_NOFOLLOW 0x00000002
234#define FSPICK_NO_AUTOMOUNT 0x00000004
235#define FSPICK_EMPTY_PATH 0x00000008
236
237
238#ifndef FSOPEN_CLOEXEC
239/* The type of fsconfig call made. */
240enum fsconfig_command
241{
242 FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
243# define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
244 FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
245# define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
246 FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
247# define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
248 FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
249# define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
250 FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
251# define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
252 FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
253# define FSCONFIG_SET_FD FSCONFIG_SET_FD
254 FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
255# define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
256 FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
257# define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
258};
259#endif
260
261/* fsopen flags. */
262#define FSOPEN_CLOEXEC 0x00000001
263
264/* open_tree flags. */
265#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
266#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
267
268
137269__BEGIN_DECLS
138270
139271/* Mount a filesystem. */
......@@ -147,6 +279,44 @@ extern int umount (const char *__special_file) __THROW;
147279/* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */
148280extern int umount2 (const char *__special_file, int __flags) __THROW;
149281
282/* Open the filesystem referenced by FS_NAME so it can be configured for
283 mouting. */
284extern int fsopen (const char *__fs_name, unsigned int __flags) __THROW;
285
286/* Create a mount representation for the FD created by fsopen using
287 FLAGS with ATTR_FLAGS describing how the mount is to be performed. */
288extern int fsmount (int __fd, unsigned int __flags,
289 unsigned int __ms_flags) __THROW;
290
291/* Add the mounted FROM_DFD referenced by FROM_PATHNAME filesystem returned
292 by fsmount in the hierarchy in the place TO_DFD reference by TO_PATHNAME
293 using FLAGS. */
294extern int move_mount (int __from_dfd, const char *__from_pathname,
295 int __to_dfd, const char *__to_pathname,
296 unsigned int flags) __THROW;
297
298/* Set parameters and trigger CMD action on the FD context. KEY, VALUE,
299 and AUX are used depending ng of the CMD. */
300extern int fsconfig (int __fd, unsigned int __cmd, const char *__key,
301 const void *__value, int __aux) __THROW;
302
303/* Equivalent of fopen for an existing mount point. */
304extern int fspick (int __dfd, const char *__path, unsigned int __flags)
305 __THROW;
306
307/* Open the mount point FILENAME in directory DFD using FLAGS. */
308extern int open_tree (int __dfd, const char *__filename, unsigned int __flags)
309 __THROW;
310
311/* Change the mount properties of the mount or an entire mount tree. If
312 PATH is a relative pathname, then it is interpreted relative to the
313 directory referred to by the file descriptor dirfd. Otherwise if DFD is
314 the special value AT_FDCWD then PATH is interpreted relative to the current
315 working directory of the calling process. */
316extern int mount_setattr (int __dfd, const char *__path, unsigned int __flags,
317 struct mount_attr *__uattr, size_t __usize)
318 __THROW;
319
150320__END_DECLS
151321
152322#endif /* _SYS_MOUNT_H */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/msg.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/mtio.h+1-2
......@@ -1,5 +1,5 @@
11/* Structures and definitions for magnetic tape I/O control commands.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 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
......@@ -16,7 +16,6 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19/* Written by H. Bergman <hennus@cybercomm.nl>. */
2019
2120#ifndef _SYS_MTIO_H
2221#define _SYS_MTIO_H 1
lib/libc/include/generic-glibc/sys/param.h+1-1
......@@ -1,5 +1,5 @@
11/* Compatibility header for old-style Unix parameters and limits.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/pci.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/perm.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/personality.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/pidfd.h created+49
......@@ -0,0 +1,49 @@
1/* Wrapper for file descriptors that refers to a process functions.
2 Copyright (C) 2022-2023 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 _PIDFD_H
20
21#include <fcntl.h>
22#include <bits/types/siginfo_t.h>
23
24#define PIDFD_NONBLOCK O_NONBLOCK
25
26/* Returns a file descriptor that refers to the process PID. The
27 close-on-exec is set on the file descriptor.
28
29 The FLAGS argument is reserved for future use, it must be specified
30 as 0. */
31extern int pidfd_open (__pid_t __pid, unsigned int __flags) __THROW;
32
33/* Duplicates an existing file descriptor TARGETFD in the process referred
34 by the PIDFD file descriptor PIDFD.
35
36 The FLAGS argument is reserved for future use, it must be specified
37 as 0. */
38extern int pidfd_getfd (int __pidfd, int __targetfd,
39 unsigned int __flags) __THROW;
40
41/* 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. */
46extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info,
47 unsigned int __flags) __THROW;
48
49#endif /* _PIDFD_H */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/platform/ppc.h+1-1
......@@ -1,5 +1,5 @@
11/* Facilities specific to the PowerPC architecture
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/platform/x86.h+1-1
......@@ -1,6 +1,6 @@
11/* Data structure for x86 CPU features.
22 This file is part of the GNU C Library.
3 Copyright (C) 2008-2021 Free Software Foundation, Inc.
3 Copyright (C) 2008-2023 Free Software Foundation, Inc.
44
55 The GNU C Library is free software; you can redistribute it and/or
66 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/sys/poll.h+4-4
......@@ -1,5 +1,5 @@
11/* Compatibility definitions for System V `poll' interface.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 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
......@@ -52,7 +52,7 @@ __BEGIN_DECLS
5252 This function is a cancellation point and therefore not marked with
5353 __THROW. */
5454extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
55 __attr_access ((__write_only__, 1, 2));
55 __fortified_attr_access (__write_only__, 1, 2);
5656
5757#ifdef __USE_GNU
5858/* Like poll, but before waiting the threads signal mask is replaced
......@@ -64,7 +64,7 @@ extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
6464extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
6565 const struct timespec *__timeout,
6666 const __sigset_t *__ss)
67 __attr_access ((__write_only__, 1, 2));
67 __fortified_attr_access (__write_only__, 1, 2);
6868
6969# ifdef __USE_TIME_BITS64
7070# ifdef __REDIRECT
......@@ -72,7 +72,7 @@ extern int __REDIRECT (ppoll, (struct pollfd *__fds, nfds_t __nfds,
7272 const struct timespec *__timeout,
7373 const __sigset_t *__ss),
7474 __ppoll64)
75 __attr_access ((__write_only__, 1, 2));
75 __fortified_attr_access (__write_only__, 1, 2);
7676# else
7777# define ppoll __ppoll64
7878# endif
lib/libc/include/generic-glibc/sys/prctl.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -42,7 +42,7 @@ __BEGIN_DECLS
4242extern int prctl (int __option, ...) __THROW;
4343#else
4444# ifdef __REDIRECT
45extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
45extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64);
4646# else
4747extern int __prctl_time64 (int __option,d ...) __THROW;
4848# define ioctl __prctl_time64
lib/libc/include/generic-glibc/sys/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for core files and libthread_db. Generic Linux version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/generic-glibc/sys/profil.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -170,8 +170,12 @@ enum __ptrace_request
170170#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
171171
172172 /* Get information about system call. */
173 PTRACE_GET_SYSCALL_INFO = 0x420e
173 PTRACE_GET_SYSCALL_INFO = 0x420e,
174174#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
175
176 /* Get rseq configuration information. */
177 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
178#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
175179};
176180
177181
lib/libc/include/generic-glibc/sys/quota.h+1-1
......@@ -1,5 +1,5 @@
11/* This just represents the non-kernel parts of <linux/quota.h>.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/random.h+5-3
......@@ -1,5 +1,5 @@
11/* Interfaces for obtaining random bytes.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 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
......@@ -32,11 +32,13 @@ __BEGIN_DECLS
3232/* Write LENGTH bytes of randomness starting at BUFFER. Return the
3333 number of bytes written, or -1 on error. */
3434ssize_t getrandom (void *__buffer, size_t __length,
35 unsigned int __flags) __wur;
35 unsigned int __flags) __wur
36 __attr_access ((__write_only__, 1, 2));
3637
3738/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
3839 success or -1 on error. */
39int getentropy (void *__buffer, size_t __length) __wur;
40int getentropy (void *__buffer, size_t __length) __wur
41 __attr_access ((__write_only__, 1, 2));
4042
4143__END_DECLS
4244
lib/libc/include/generic-glibc/sys/raw.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/reboot.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/reg.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/regdef.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/resource.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/rseq.h created+169
......@@ -0,0 +1,169 @@
1/* Restartable Sequences exported symbols. Linux header.
2 Copyright (C) 2021-2023 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#define _SYS_RSEQ_H 1
20
21/* Architecture-specific rseq signature. */
22#include <bits/rseq.h>
23
24#include <stddef.h>
25#include <stdint.h>
26#include <sys/cdefs.h>
27
28#ifdef __has_include
29# if __has_include ("linux/rseq.h")
30# define __GLIBC_HAVE_KERNEL_RSEQ
31# endif
32#else
33# include <linux/version.h>
34# if LINUX_VERSION_CODE >= KERNEL_VERSION (4, 18, 0)
35# define __GLIBC_HAVE_KERNEL_RSEQ
36# endif
37#endif
38
39#ifdef __GLIBC_HAVE_KERNEL_RSEQ
40/* We use the structures declarations from the kernel headers. */
41# include <linux/rseq.h>
42#else /* __GLIBC_HAVE_KERNEL_RSEQ */
43/* We use a copy of the include/uapi/linux/rseq.h kernel header. */
44
45enum rseq_cpu_id_state
46 {
47 RSEQ_CPU_ID_UNINITIALIZED = -1,
48 RSEQ_CPU_ID_REGISTRATION_FAILED = -2,
49 };
50
51enum rseq_flags
52 {
53 RSEQ_FLAG_UNREGISTER = (1 << 0),
54 };
55
56enum rseq_cs_flags_bit
57 {
58 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
59 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
60 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,
61 };
62
63enum rseq_cs_flags
64 {
65 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT =
66 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT),
67 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL =
68 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),
69 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE =
70 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT),
71 };
72
73/* struct rseq_cs is aligned on 32 bytes to ensure it is always
74 contained within a single cache-line. It is usually declared as
75 link-time constant data. */
76struct rseq_cs
77 {
78 /* Version of this structure. */
79 uint32_t version;
80 /* enum rseq_cs_flags. */
81 uint32_t flags;
82 uint64_t start_ip;
83 /* Offset from start_ip. */
84 uint64_t post_commit_offset;
85 uint64_t abort_ip;
86 } __attribute__ ((__aligned__ (32)));
87
88/* struct rseq is aligned on 32 bytes to ensure it is always
89 contained within a single cache-line.
90
91 A single struct rseq per thread is allowed. */
92struct rseq
93 {
94 /* Restartable sequences cpu_id_start field. Updated by the
95 kernel. Read by user-space with single-copy atomicity
96 semantics. This field should only be read by the thread which
97 registered this data structure. Aligned on 32-bit. Always
98 contains a value in the range of possible CPUs, although the
99 value may not be the actual current CPU (e.g. if rseq is not
100 initialized). This CPU number value should always be compared
101 against the value of the cpu_id field before performing a rseq
102 commit or returning a value read from a data structure indexed
103 using the cpu_id_start value. */
104 uint32_t cpu_id_start;
105 /* Restartable sequences cpu_id field. Updated by the kernel.
106 Read by user-space with single-copy atomicity semantics. This
107 field should only be read by the thread which registered this
108 data structure. Aligned on 32-bit. Values
109 RSEQ_CPU_ID_UNINITIALIZED and RSEQ_CPU_ID_REGISTRATION_FAILED
110 have a special semantic: the former means "rseq uninitialized",
111 and latter means "rseq initialization failed". This value is
112 meant to be read within rseq critical sections and compared
113 with the cpu_id_start value previously read, before performing
114 the commit instruction, or read and compared with the
115 cpu_id_start value before returning a value loaded from a data
116 structure indexed using the cpu_id_start value. */
117 uint32_t cpu_id;
118 /* Restartable sequences rseq_cs field.
119
120 Contains NULL when no critical section is active for the current
121 thread, or holds a pointer to the currently active struct rseq_cs.
122
123 Updated by user-space, which sets the address of the currently
124 active rseq_cs at the beginning of assembly instruction sequence
125 block, and set to NULL by the kernel when it restarts an assembly
126 instruction sequence block, as well as when the kernel detects that
127 it is preempting or delivering a signal outside of the range
128 targeted by the rseq_cs. Also needs to be set to NULL by user-space
129 before reclaiming memory that contains the targeted struct rseq_cs.
130
131 Read and set by the kernel. Set by user-space with single-copy
132 atomicity semantics. This field should only be updated by the
133 thread which registered this data structure. Aligned on 64-bit.
134
135 32-bit architectures should update the low order bits of the
136 rseq_cs field, leaving the high order bits initialized to 0. */
137 uint64_t rseq_cs;
138 /* Restartable sequences flags field.
139
140 This field should only be updated by the thread which
141 registered this data structure. Read by the kernel.
142 Mainly used for single-stepping through rseq critical sections
143 with debuggers.
144
145 - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT
146 Inhibit instruction sequence block restart on preemption
147 for this thread.
148 - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
149 Inhibit instruction sequence block restart on signal
150 delivery for this thread.
151 - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
152 Inhibit instruction sequence block restart on migration for
153 this thread. */
154 uint32_t flags;
155 } __attribute__ ((__aligned__ (32)));
156
157#endif /* __GLIBC_HAVE_KERNEL_RSEQ */
158
159/* Offset from the thread pointer to the rseq area. */
160extern const ptrdiff_t __rseq_offset;
161
162/* Size of the registered rseq area. 0 if the registration was
163 unsuccessful. */
164extern const unsigned int __rseq_size;
165
166/* Flags used during rseq registration. */
167extern const unsigned int __rseq_flags;
168
169#endif /* sys/rseq.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/select.h+1-1
......@@ -1,5 +1,5 @@
11/* `fd_set' type and related macros, and `select'/`pselect' declarations.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/sem.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/sendfile.h+1-1
......@@ -1,5 +1,5 @@
11/* sendfile -- copy data directly from one file descriptor to another
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/shm.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/single_threaded.h+1-1
......@@ -1,5 +1,5 @@
11/* Support for single-thread optimizations.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/socket.h+3-3
......@@ -1,5 +1,5 @@
11/* Declarations of socket constants, types, and functions.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 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
......@@ -154,7 +154,7 @@ extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
154154 socklen_t __addr_len);
155155
156156/* Read N bytes into BUF through socket FD.
157 If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
157 If ADDR is not NULL, fill in *ADDR_LEN bytes of it with the address of
158158 the sender, and store the actual size of the address in *ADDR_LEN.
159159 Returns the number of bytes read or -1 for errors.
160160
......@@ -181,7 +181,7 @@ extern ssize_t __REDIRECT (sendmsg, (int __fd, const struct msghdr *__message,
181181# else
182182extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
183183 int __flags);
184# defien sendmsg __sendmsg64
184# define sendmsg __sendmsg64
185185# endif
186186#endif
187187
lib/libc/include/generic-glibc/sys/stat.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/statfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for getting information about a filesystem.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/statvfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for getting information about a filesystem.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/swap.h+1-1
......@@ -1,5 +1,5 @@
11/* Calls to enable and disable swapping on specified locations. Linux version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/syscall.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/sysinfo.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/syslog.h+7-7
......@@ -62,7 +62,7 @@
6262#define LOG_PRI(p) ((p) & LOG_PRIMASK)
6363#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
6464
65#ifdef SYSLOG_NAMES
65#if defined SYSLOG_NAMES && defined __USE_MISC
6666#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
6767 /* mark "facility" */
6868#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES << 3, 0)
......@@ -118,7 +118,7 @@ CODE prioritynames[] =
118118 /* facility of pri */
119119#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
120120
121#ifdef SYSLOG_NAMES
121#if defined SYSLOG_NAMES && defined __USE_MISC
122122CODE facilitynames[] =
123123 {
124124 { "auth", LOG_AUTH },
......@@ -205,11 +205,11 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
205205/* Define some macros helping to catch buffer overflows. */
206206#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
207207# include <bits/syslog.h>
208#endif
209
210#include <bits/floatn.h>
211#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
212# include <bits/syslog-ldbl.h>
208#else
209# include <bits/floatn.h>
210# if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
211# include <bits/syslog-ldbl.h>
212# endif
213213#endif
214214
215215__END_DECLS
lib/libc/include/generic-glibc/sys/sysmacros.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions of macros to access `dev_t' values.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/sysmips.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/tas.h+1-2
......@@ -1,6 +1,5 @@
1/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/sys/time.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/timeb.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1994-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1994-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/times.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/timex.h+9-9
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -55,26 +55,26 @@ struct ntptimeval
5555__BEGIN_DECLS
5656
5757#ifndef __USE_TIME_BITS64
58extern int adjtimex (struct timex *__ntx) __THROW;
59extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
58extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1));
59extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW __nonnull ((1));
6060
6161# ifdef __REDIRECT_NTH
6262extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
63 ntp_gettimex);
63 ntp_gettimex) __nonnull ((1));
6464# else
6565# define ntp_gettime ntp_gettimex
6666# endif
67extern int ntp_adjtime (struct timex *__tntx) __THROW;
67extern int ntp_adjtime (struct timex *__tntx) __THROW __nonnull ((1));
6868#else
6969# ifdef __REDIRECT_NTH
7070extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx),
71 ___adjtimex64);
71 ___adjtimex64) __nonnull ((1));
7272extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
73 __ntp_gettime64);
73 __ntp_gettime64) __nonnull ((1));
7474extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv),
75 __ntp_gettimex64);
75 __ntp_gettimex64) __nonnull ((1));
7676extern int __REDIRECT_NTH (ntp_adjtime, (struct timex *__ntx),
77 ___adjtimex64);
77 ___adjtimex64) __nonnull ((1));
7878# else
7979# define adjtimex ___adjtimex64
8080# define ntp_adjtime ___adjtimex64
lib/libc/include/generic-glibc/sys/types.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/sys/uio.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/un.h+3-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -34,10 +34,11 @@ struct sockaddr_un
3434
3535
3636#ifdef __USE_MISC
37# include <stddef.h>
3738# include <string.h> /* For prototype of `strlen'. */
3839
3940/* Evaluate to actual length of the `sockaddr_un' structure. */
40# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
41# define SUN_LEN(ptr) (offsetof (struct sockaddr_un, sun_path) \
4142 + strlen ((ptr)->sun_path))
4243#endif
4344
lib/libc/include/generic-glibc/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/utsname.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/vlimit.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/vm86.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/sys/wait.h+2-7
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -71,12 +71,7 @@ typedef __pid_t pid_t;
7171
7272/* The following values are used by the `waitid' function. */
7373#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
74typedef enum
75{
76 P_ALL, /* Wait for any child. */
77 P_PID, /* Wait for specified process. */
78 P_PGID /* Wait for members of process group. */
79} idtype_t;
74# include <bits/types/idtype_t.h>
8075#endif
8176
8277
lib/libc/include/generic-glibc/sys/xattr.h+14-10
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -40,52 +40,56 @@ enum
4040 is SIZE bytes long). Return 0 on success, -1 for errors. */
4141extern int setxattr (const char *__path, const char *__name,
4242 const void *__value, size_t __size, int __flags)
43 __THROW;
43 __THROW __attr_access ((__read_only__, 3, 4));
4444
4545/* Set the attribute NAME of the file pointed to by PATH to VALUE (which is
4646 SIZE bytes long), not following symlinks for the last pathname component.
4747 Return 0 on success, -1 for errors. */
4848extern int lsetxattr (const char *__path, const char *__name,
4949 const void *__value, size_t __size, int __flags)
50 __THROW;
50 __THROW __attr_access ((__read_only__, 3, 4));
5151
5252/* Set the attribute NAME of the file descriptor FD to VALUE (which is SIZE
5353 bytes long). Return 0 on success, -1 for errors. */
5454extern int fsetxattr (int __fd, const char *__name, const void *__value,
55 size_t __size, int __flags) __THROW;
55 size_t __size, int __flags)
56 __THROW __attr_access ((__read_only__, 3, 4));
5657
5758/* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
5859 SIZE bytes long). Return 0 on success, -1 for errors. */
5960extern ssize_t getxattr (const char *__path, const char *__name,
60 void *__value, size_t __size) __THROW;
61 void *__value, size_t __size)
62 __THROW __attr_access ((__write_only__, 3, 4));
6163
6264/* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
6365 SIZE bytes long), not following symlinks for the last pathname component.
6466 Return 0 on success, -1 for errors. */
6567extern ssize_t lgetxattr (const char *__path, const char *__name,
66 void *__value, size_t __size) __THROW;
68 void *__value, size_t __size)
69 __THROW __attr_access ((__write_only__, 3, 4));
6770
6871/* Get the attribute NAME of the file descriptor FD to VALUE (which is SIZE
6972 bytes long). Return 0 on success, -1 for errors. */
7073extern ssize_t fgetxattr (int __fd, const char *__name, void *__value,
71 size_t __size) __THROW;
74 size_t __size)
75 __THROW __attr_access ((__write_only__, 3, 4));
7276
7377/* List attributes of the file pointed to by PATH into the user-supplied
7478 buffer LIST (which is SIZE bytes big). Return 0 on success, -1 for
7579 errors. */
7680extern ssize_t listxattr (const char *__path, char *__list, size_t __size)
77 __THROW;
81 __THROW __attr_access ((__write_only__, 2, 3));
7882
7983/* List attributes of the file pointed to by PATH into the user-supplied
8084 buffer LIST (which is SIZE bytes big), not following symlinks for the
8185 last pathname component. Return 0 on success, -1 for errors. */
8286extern ssize_t llistxattr (const char *__path, char *__list, size_t __size)
83 __THROW;
87 __THROW __attr_access ((__write_only__, 2, 3));
8488
8589/* List attributes of the file descriptor FD into the user-supplied buffer
8690 LIST (which is SIZE bytes big). Return 0 on success, -1 for errors. */
8791extern ssize_t flistxattr (int __fd, char *__list, size_t __size)
88 __THROW;
92 __THROW __attr_access ((__write_only__, 2, 3));
8993
9094/* Remove the attribute NAME from the file pointed to by PATH. Return 0
9195 on success, -1 for errors. */
lib/libc/include/generic-glibc/tar.h+1-2
......@@ -1,7 +1,6 @@
11/* Extended tar format from POSIX.1.
2 Copyright (C) 1992-2021 Free Software Foundation, Inc.
2 Copyright (C) 1992-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Written by David J. MacKenzie.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/generic-glibc/termios.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/tgmath.h+342-80
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -37,9 +37,17 @@
3737 for older GCC, using other compiler extensions but with macros
3838 expanding their arguments many times (so resulting in exponential
3939 blowup of the size of expansions when calls to such macros are
40 nested inside arguments to such macros). */
40 nested inside arguments to such macros). Because of a long series
41 of defect fixes made after the initial release of TS 18661-1, GCC
42 versions before GCC 13 have __builtin_tgmath semantics that, when
43 integer arguments are passed to narrowing macros returning
44 _Float32x, or non-narrowing macros with at least two generic
45 arguments, do not always correspond to the C2X semantics, so more
46 complicated macro definitions are also used in some cases for
47 versions from GCC 8 to GCC 12. */
4148
4249#define __HAVE_BUILTIN_TGMATH __GNUC_PREREQ (8, 0)
50#define __HAVE_BUILTIN_TGMATH_C2X __GNUC_PREREQ (13, 0)
4351
4452#if __GNUC_PREREQ (2, 7)
4553
......@@ -53,13 +61,25 @@
5361 || (__HAVE_FLOAT128 && !__HAVE_FLOAT64X))
5462# error "Unsupported combination of types for <tgmath.h>."
5563# endif
64# define __TGMATH_1_NARROW_D(F, X) \
65 (F ## l (X))
5666# define __TGMATH_2_NARROW_D(F, X, Y) \
5767 (F ## l (X, Y))
68# define __TGMATH_3_NARROW_D(F, X, Y, Z) \
69 (F ## l (X, Y, Z))
70# define __TGMATH_1_NARROW_F64X(F, X) \
71 (F ## f128 (X))
5872# define __TGMATH_2_NARROW_F64X(F, X, Y) \
5973 (F ## f128 (X, Y))
74# define __TGMATH_3_NARROW_F64X(F, X, Y, Z) \
75 (F ## f128 (X, Y, Z))
6076# if !__HAVE_FLOAT128
77# define __TGMATH_1_NARROW_F32X(F, X) \
78 (F ## f64 (X))
6179# define __TGMATH_2_NARROW_F32X(F, X, Y) \
6280 (F ## f64 (X, Y))
81# define __TGMATH_3_NARROW_F32X(F, X, Y, Z) \
82 (F ## f64 (X, Y, Z))
6383# endif
6484
6585# if __HAVE_BUILTIN_TGMATH
......@@ -127,21 +147,42 @@
127147 __TG_F64X_ARG (X) __TG_F128X_ARG (X) \
128148 __TG_F64_ARG (X) __TG_F128_ARG (X)
129149
150# define __TGMATH_1_NARROW_F(F, X) \
151 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X))
130152# define __TGMATH_2_NARROW_F(F, X, Y) \
131153 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X), (Y))
154# define __TGMATH_3_NARROW_F(F, X, Y, Z) \
155 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F (F) (X), (Y), (Z))
156# define __TGMATH_1_NARROW_F16(F, X) \
157 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X))
132158# define __TGMATH_2_NARROW_F16(F, X, Y) \
133159 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X), (Y))
160# define __TGMATH_3_NARROW_F16(F, X, Y, Z) \
161 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F16 (F) (X), (Y), (Z))
162# define __TGMATH_1_NARROW_F32(F, X) \
163 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X))
134164# define __TGMATH_2_NARROW_F32(F, X, Y) \
135165 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X), (Y))
166# define __TGMATH_3_NARROW_F32(F, X, Y, Z) \
167 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32 (F) (X), (Y), (Z))
168# define __TGMATH_1_NARROW_F64(F, X) \
169 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X))
136170# define __TGMATH_2_NARROW_F64(F, X, Y) \
137171 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y))
138# if __HAVE_FLOAT128
172# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
173 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y), (Z))
174# if __HAVE_FLOAT128 && __HAVE_BUILTIN_TGMATH_C2X
175# define __TGMATH_1_NARROW_F32X(F, X) \
176 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X))
139177# define __TGMATH_2_NARROW_F32X(F, X, Y) \
140178 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X), (Y))
179# define __TGMATH_3_NARROW_F32X(F, X, Y, Z) \
180 __builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X), (Y), (Z))
141181# endif
142182
143# else /* !__HAVE_BUILTIN_TGMATH. */
183# endif
144184
185# if !__HAVE_BUILTIN_TGMATH_C2X
145186# ifdef __NO_LONG_DOUBLE_MATH
146187# define __tgml(fct) fct
147188# else
......@@ -181,13 +222,17 @@
181222/* Whether an expression (of arithmetic type) has a real type. */
182223# define __expr_is_real(E) (__builtin_classify_type (E) != 9)
183224
225/* Type T1 if E is 1, type T2 is E is 0. */
226# define __tgmath_type_if(T1, T2, E) \
227 __typeof__ (*(0 ? (__typeof__ (0 ? (T2 *) 0 : (void *) (E))) 0 \
228 : (__typeof__ (0 ? (T1 *) 0 : (void *) (!(E)))) 0))
229
184230/* The tgmath real type for T, where E is 0 if T is an integer type
185231 and 1 for a floating type. If T has a complex type, it is
186232 unspecified whether the return type is real or complex (but it has
187233 the correct corresponding real type). */
188234# define __tgmath_real_type_sub(T, E) \
189 __typeof__ (*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \
190 : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
235 __tgmath_type_if (T, double, E)
191236
192237/* The tgmath real type of EXPR. */
193238# define __tgmath_real_type(expr) \
......@@ -215,6 +260,56 @@
215260 __real_integer_type (__typeof__ (+(expr))), \
216261 __complex_integer_type (__typeof__ (+(expr))))
217262
263/* The tgmath real type of EXPR1 combined with EXPR2, without handling
264 the C2X rule of interpreting integer arguments as _Float32x if any
265 argument is _FloatNx. */
266# define __tgmath_real_type2_base(expr1, expr2) \
267 __typeof ((__tgmath_real_type (expr1)) 0 + (__tgmath_real_type (expr2)) 0)
268
269/* The tgmath complex type of EXPR1 combined with EXPR2, without
270 handling the C2X rule of interpreting integer arguments as
271 _Float32x if any argument is _FloatNx. */
272# define __tgmath_complex_type2_base(expr1, expr2) \
273 __typeof ((__tgmath_complex_type (expr1)) 0 \
274 + (__tgmath_complex_type (expr2)) 0)
275
276/* The tgmath real type of EXPR1 combined with EXPR2 and EXPR3,
277 without handling the C2X rule of interpreting integer arguments as
278 _Float32x if any argument is _FloatNx. */
279# define __tgmath_real_type3_base(expr1, expr2, expr3) \
280 __typeof ((__tgmath_real_type (expr1)) 0 \
281 + (__tgmath_real_type (expr2)) 0 \
282 + (__tgmath_real_type (expr3)) 0)
283
284/* The tgmath real or complex type of EXPR1 combined with EXPR2 (and
285 EXPR3 if applicable). */
286# if __HAVE_FLOATN_NOT_TYPEDEF
287# define __tgmath_real_type2(expr1, expr2) \
288 __tgmath_type_if (_Float32x, __tgmath_real_type2_base (expr1, expr2), \
289 _Generic ((expr1) + (expr2), _Float32x: 1, default: 0))
290# define __tgmath_complex_type2(expr1, expr2) \
291 __tgmath_type_if (_Float32x, \
292 __tgmath_type_if (_Complex _Float32x, \
293 __tgmath_complex_type2_base (expr1, \
294 expr2), \
295 _Generic ((expr1) + (expr2), \
296 _Complex _Float32x: 1, \
297 default: 0)), \
298 _Generic ((expr1) + (expr2), _Float32x: 1, default: 0))
299# define __tgmath_real_type3(expr1, expr2, expr3) \
300 __tgmath_type_if (_Float32x, \
301 __tgmath_real_type3_base (expr1, expr2, expr3), \
302 _Generic ((expr1) + (expr2) + (expr3), \
303 _Float32x: 1, default: 0))
304# else
305# define __tgmath_real_type2(expr1, expr2) \
306 __tgmath_real_type2_base (expr1, expr2)
307# define __tgmath_complex_type2(expr1, expr2) \
308 __tgmath_complex_type2_base (expr1, expr2)
309# define __tgmath_real_type3(expr1, expr2, expr3) \
310 __tgmath_real_type3_base (expr1, expr2, expr3)
311# endif
312
218313# if (__HAVE_DISTINCT_FLOAT16 \
219314 || __HAVE_DISTINCT_FLOAT32 \
220315 || __HAVE_DISTINCT_FLOAT64 \
......@@ -226,7 +321,10 @@
226321
227322/* Expand to text that checks if ARG_COMB has type _Float128, and if
228323 so calls the appropriately suffixed FCT (which may include a cast),
229 or FCT and CFCT for complex functions, with arguments ARG_CALL. */
324 or FCT and CFCT for complex functions, with arguments ARG_CALL.
325 __TGMATH_F128LD (only used in the __HAVE_FLOAT64X_LONG_DOUBLE case,
326 for narrowing macros) handles long double the same as
327 _Float128. */
230328# if __HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
231329# if (!__HAVE_FLOAT64X \
232330 || __HAVE_FLOAT64X_LONG_DOUBLE \
......@@ -234,6 +332,10 @@
234332# define __TGMATH_F128(arg_comb, fct, arg_call) \
235333 __builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128) \
236334 ? fct ## f128 arg_call :
335# define __TGMATH_F128LD(arg_comb, fct, arg_call) \
336 (__builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128) \
337 || __builtin_types_compatible_p (__typeof (+(arg_comb)), long double)) \
338 ? fct ## f128 arg_call :
237339# define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) \
238340 __builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), _Float128) \
239341 ? (__expr_is_real (arg_comb) \
......@@ -259,7 +361,7 @@
259361# define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) /* Nothing. */
260362# endif
261363
262# endif /* !__HAVE_BUILTIN_TGMATH. */
364# endif /* !__HAVE_BUILTIN_TGMATH_C2X. */
263365
264366/* We have two kinds of generic macros: to support functions which are
265367 only defined on real valued parameters and those which are defined
......@@ -272,14 +374,18 @@
272374 __TGMATH_2 (Fct, (Val1), (Val2))
273375# define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \
274376 __TGMATH_2STD (Fct, (Val1), (Val2))
275# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
377# if __HAVE_BUILTIN_TGMATH_C2X
378# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
276379 __TGMATH_2 (Fct, (Val1), (Val2))
380# endif
277381# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
278382 __TGMATH_2STD (Fct, (Val1), (Val2))
279# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
383# if __HAVE_BUILTIN_TGMATH_C2X
384# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
280385 __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
281# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
386# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
282387 __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
388# endif
283389# define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \
284390 __TGMATH_3 (Fct, (Val1), (Val2), (Val3))
285391# define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
......@@ -289,11 +395,14 @@
289395 __TGMATH_1C (Fct, Cfct, (Val))
290396# define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct) \
291397 __TGMATH_1 (Cfct, (Val))
292# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
398# if __HAVE_BUILTIN_TGMATH_C2X
399# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
293400 __TGMATH_2C (Fct, Cfct, (Val1), (Val2))
401# endif
294402
295# else /* !__HAVE_BUILTIN_TGMATH. */
403# endif
296404
405# if !__HAVE_BUILTIN_TGMATH
297406# define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
298407 (__extension__ ((sizeof (+(Val)) == sizeof (double) \
299408 || __builtin_classify_type (Val) != 8) \
......@@ -330,29 +439,28 @@
330439 : (sizeof (+(Val1)) == sizeof (float)) \
331440 ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \
332441 : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
442# endif
333443
444# if !__HAVE_BUILTIN_TGMATH_C2X
334445# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
335446 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
336447 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
337448 ? __TGMATH_F128 ((Val1) + (Val2), \
338 (__typeof \
339 ((__tgmath_real_type (Val1)) 0 \
340 + (__tgmath_real_type (Val2)) 0)) Fct, \
449 (__tgmath_real_type2 (Val1, Val2)) Fct, \
341450 (Val1, Val2)) \
342 (__typeof ((__tgmath_real_type (Val1)) 0 \
343 + (__tgmath_real_type (Val2)) 0)) \
451 (__tgmath_real_type2 (Val1, Val2)) \
344452 __tgml(Fct) (Val1, Val2) \
345453 : (sizeof (+(Val1)) == sizeof (double) \
346454 || sizeof (+(Val2)) == sizeof (double) \
347455 || __builtin_classify_type (Val1) != 8 \
348456 || __builtin_classify_type (Val2) != 8) \
349 ? (__typeof ((__tgmath_real_type (Val1)) 0 \
350 + (__tgmath_real_type (Val2)) 0)) \
457 ? (__tgmath_real_type2 (Val1, Val2)) \
351458 Fct (Val1, Val2) \
352 : (__typeof ((__tgmath_real_type (Val1)) 0 \
353 + (__tgmath_real_type (Val2)) 0)) \
459 : (__tgmath_real_type2 (Val1, Val2)) \
354460 Fct##f (Val1, Val2)))
461# endif
355462
463# if !__HAVE_BUILTIN_TGMATH
356464# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
357465 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
358466 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
......@@ -369,27 +477,24 @@
369477 : (__typeof ((__tgmath_real_type (Val1)) 0 \
370478 + (__tgmath_real_type (Val2)) 0)) \
371479 Fct##f (Val1, Val2)))
480# endif
372481
482# if !__HAVE_BUILTIN_TGMATH_C2X
373483# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
374484 (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
375485 && __builtin_classify_type ((Val1) + (Val2)) == 8) \
376486 ? __TGMATH_F128 ((Val1) + (Val2), \
377 (__typeof \
378 ((__tgmath_real_type (Val1)) 0 \
379 + (__tgmath_real_type (Val2)) 0)) Fct, \
487 (__tgmath_real_type2 (Val1, Val2)) Fct, \
380488 (Val1, Val2, Val3)) \
381 (__typeof ((__tgmath_real_type (Val1)) 0 \
382 + (__tgmath_real_type (Val2)) 0)) \
489 (__tgmath_real_type2 (Val1, Val2)) \
383490 __tgml(Fct) (Val1, Val2, Val3) \
384491 : (sizeof (+(Val1)) == sizeof (double) \
385492 || sizeof (+(Val2)) == sizeof (double) \
386493 || __builtin_classify_type (Val1) != 8 \
387494 || __builtin_classify_type (Val2) != 8) \
388 ? (__typeof ((__tgmath_real_type (Val1)) 0 \
389 + (__tgmath_real_type (Val2)) 0)) \
495 ? (__tgmath_real_type2 (Val1, Val2)) \
390496 Fct (Val1, Val2, Val3) \
391 : (__typeof ((__tgmath_real_type (Val1)) 0 \
392 + (__tgmath_real_type (Val2)) 0)) \
497 : (__tgmath_real_type2 (Val1, Val2)) \
393498 Fct##f (Val1, Val2, Val3)))
394499
395500# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
......@@ -397,14 +502,10 @@
397502 && __builtin_classify_type ((Val1) + (Val2) + (Val3)) \
398503 == 8) \
399504 ? __TGMATH_F128 ((Val1) + (Val2) + (Val3), \
400 (__typeof \
401 ((__tgmath_real_type (Val1)) 0 \
402 + (__tgmath_real_type (Val2)) 0 \
403 + (__tgmath_real_type (Val3)) 0)) Fct, \
505 (__tgmath_real_type3 (Val1, Val2, \
506 Val3)) Fct, \
404507 (Val1, Val2, Val3)) \
405 (__typeof ((__tgmath_real_type (Val1)) 0 \
406 + (__tgmath_real_type (Val2)) 0 \
407 + (__tgmath_real_type (Val3)) 0)) \
508 (__tgmath_real_type3 (Val1, Val2, Val3)) \
408509 __tgml(Fct) (Val1, Val2, Val3) \
409510 : (sizeof (+(Val1)) == sizeof (double) \
410511 || sizeof (+(Val2)) == sizeof (double) \
......@@ -412,15 +513,13 @@
412513 || __builtin_classify_type (Val1) != 8 \
413514 || __builtin_classify_type (Val2) != 8 \
414515 || __builtin_classify_type (Val3) != 8) \
415 ? (__typeof ((__tgmath_real_type (Val1)) 0 \
416 + (__tgmath_real_type (Val2)) 0 \
417 + (__tgmath_real_type (Val3)) 0)) \
516 ? (__tgmath_real_type3 (Val1, Val2, Val3)) \
418517 Fct (Val1, Val2, Val3) \
419 : (__typeof ((__tgmath_real_type (Val1)) 0 \
420 + (__tgmath_real_type (Val2)) 0 \
421 + (__tgmath_real_type (Val3)) 0)) \
518 : (__tgmath_real_type3 (Val1, Val2, Val3)) \
422519 Fct##f (Val1, Val2, Val3)))
520# endif
423521
522# if !__HAVE_BUILTIN_TGMATH
424523# define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \
425524 (__extension__ ((sizeof (+(Val1)) == sizeof (double) \
426525 || __builtin_classify_type (Val1) != 8) \
......@@ -496,7 +595,9 @@
496595 __tgml(Cfct) (Val))))
497596# define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct) \
498597 __TGMATH_UNARY_REAL_IMAG_RET_REAL ((Val), Cfct, Cfct)
598# endif
499599
600# if !__HAVE_BUILTIN_TGMATH_C2X
500601/* XXX This definition has to be changed as soon as the compiler understands
501602 the imaginary keyword. */
502603# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
......@@ -505,46 +606,49 @@
505606 && __builtin_classify_type (__real__ (Val1) \
506607 + __real__ (Val2)) == 8) \
507608 ? __TGMATH_CF128 ((Val1) + (Val2), \
508 (__typeof \
509 ((__tgmath_complex_type (Val1)) 0 \
510 + (__tgmath_complex_type (Val2)) 0)) \
609 (__tgmath_complex_type2 (Val1, Val2)) \
511610 Fct, \
512 (__typeof \
513 ((__tgmath_complex_type (Val1)) 0 \
514 + (__tgmath_complex_type (Val2)) 0)) \
611 (__tgmath_complex_type2 (Val1, Val2)) \
515612 Cfct, \
516613 (Val1, Val2)) \
517614 (__expr_is_real ((Val1) + (Val2)) \
518 ? (__typeof ((__tgmath_complex_type (Val1)) 0 \
519 + (__tgmath_complex_type (Val2)) 0)) \
615 ? (__tgmath_complex_type2 (Val1, Val2)) \
520616 __tgml(Fct) (Val1, Val2) \
521 : (__typeof ((__tgmath_complex_type (Val1)) 0 \
522 + (__tgmath_complex_type (Val2)) 0)) \
617 : (__tgmath_complex_type2 (Val1, Val2)) \
523618 __tgml(Cfct) (Val1, Val2)) \
524619 : (sizeof (+__real__ (Val1)) == sizeof (double) \
525620 || sizeof (+__real__ (Val2)) == sizeof (double) \
526621 || __builtin_classify_type (__real__ (Val1)) != 8 \
527622 || __builtin_classify_type (__real__ (Val2)) != 8) \
528623 ? (__expr_is_real ((Val1) + (Val2)) \
529 ? (__typeof ((__tgmath_complex_type (Val1)) 0 \
530 + (__tgmath_complex_type (Val2)) 0)) \
624 ? (__tgmath_complex_type2 (Val1, Val2)) \
531625 Fct (Val1, Val2) \
532 : (__typeof ((__tgmath_complex_type (Val1)) 0 \
533 + (__tgmath_complex_type (Val2)) 0)) \
626 : (__tgmath_complex_type2 (Val1, Val2)) \
534627 Cfct (Val1, Val2)) \
535628 : (__expr_is_real ((Val1) + (Val2)) \
536 ? (__typeof ((__tgmath_complex_type (Val1)) 0 \
537 + (__tgmath_complex_type (Val2)) 0)) \
629 ? (__tgmath_complex_type2 (Val1, Val2)) \
538630 Fct##f (Val1, Val2) \
539 : (__typeof ((__tgmath_complex_type (Val1)) 0 \
540 + (__tgmath_complex_type (Val2)) 0)) \
631 : (__tgmath_complex_type2 (Val1, Val2)) \
541632 Cfct##f (Val1, Val2))))
633# endif
542634
635# if !__HAVE_BUILTIN_TGMATH
636# define __TGMATH_1_NARROW_F(F, X) \
637 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (double) \
638 ? F ## l (X) \
639 : F (X)))
543640# define __TGMATH_2_NARROW_F(F, X, Y) \
544641 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
545642 + (__tgmath_real_type (Y)) 0) > sizeof (double) \
546643 ? F ## l (X, Y) \
547644 : F (X, Y)))
645# define __TGMATH_3_NARROW_F(F, X, Y, Z) \
646 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
647 + (__tgmath_real_type (Y)) 0 \
648 + (__tgmath_real_type (Z)) 0) > sizeof (double) \
649 ? F ## l (X, Y, Z) \
650 : F (X, Y, Z)))
651# endif
548652/* In most cases, these narrowing macro definitions based on sizeof
549653 ensure that the function called has the right argument format, as
550654 for other <tgmath.h> macros for compilers before GCC 8, but may not
......@@ -553,52 +657,140 @@
553657
554658 In the case of macros for _Float32x return type, when _Float64x
555659 exists, _Float64 arguments should result in the *f64 function being
556 called while _Float32x arguments should result in the *f64x
557 function being called. These cases cannot be distinguished using
558 sizeof (or at all if the types are typedefs rather than different
559 types). However, for these functions it is OK (does not affect the
560 final result) to call a function with any argument format at least
561 as wide as all the floating-point arguments, unless that affects
562 rounding of integer arguments. Integer arguments are considered to
563 have type _Float64, so the *f64 functions are preferred for f32x*
564 macros when no argument has a wider floating-point type. */
565# if __HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_DISTINCT_FLOAT128
660 called while _Float32x, float and double arguments should result in
661 the *f64x function being called (and integer arguments are
662 considered to have type _Float32x if any argument has type
663 _FloatNx, or double otherwise). These cases cannot be
664 distinguished using sizeof (or at all if the types are typedefs
665 rather than different types, in which case we err on the side of
666 using the wider type if unsure). */
667# if !__HAVE_BUILTIN_TGMATH_C2X
668# if __HAVE_FLOATN_NOT_TYPEDEF
669# define __TGMATH_NARROW_F32X_USE_F64X(X) \
670 !__builtin_types_compatible_p (__typeof (+(X)), _Float64)
671# else
672# define __TGMATH_NARROW_F32X_USE_F64X(X) \
673 (__builtin_types_compatible_p (__typeof (+(X)), double) \
674 || __builtin_types_compatible_p (__typeof (+(X)), float) \
675 || !__floating_type (__typeof (+(X))))
676# endif
677# endif
678# if __HAVE_FLOAT64X_LONG_DOUBLE && __HAVE_DISTINCT_FLOAT128
679# if !__HAVE_BUILTIN_TGMATH
680# define __TGMATH_1_NARROW_F32(F, X) \
681 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
682 ? __TGMATH_F128LD ((X), F, (X)) \
683 F ## f64x (X) \
684 : F ## f64 (X)))
566685# define __TGMATH_2_NARROW_F32(F, X, Y) \
567686 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
568687 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
569 ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \
688 ? __TGMATH_F128LD ((X) + (Y), F, (X, Y)) \
570689 F ## f64x (X, Y) \
571690 : F ## f64 (X, Y)))
691# define __TGMATH_3_NARROW_F32(F, X, Y, Z) \
692 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
693 + (__tgmath_real_type (Y)) 0 \
694 + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
695 ? __TGMATH_F128LD ((X) + (Y) + (Z), F, (X, Y, Z)) \
696 F ## f64x (X, Y, Z) \
697 : F ## f64 (X, Y, Z)))
698# define __TGMATH_1_NARROW_F64(F, X) \
699 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
700 ? __TGMATH_F128LD ((X), F, (X)) \
701 F ## f64x (X) \
702 : F ## f128 (X)))
572703# define __TGMATH_2_NARROW_F64(F, X, Y) \
573704 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
574705 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
575 ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \
706 ? __TGMATH_F128LD ((X) + (Y), F, (X, Y)) \
576707 F ## f64x (X, Y) \
577708 : F ## f128 (X, Y)))
709# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
710 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
711 + (__tgmath_real_type (Y)) 0 \
712 + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
713 ? __TGMATH_F128LD ((X) + (Y) + (Z), F, (X, Y, Z)) \
714 F ## f64x (X, Y, Z) \
715 : F ## f128 (X, Y, Z)))
716# endif
717# if !__HAVE_BUILTIN_TGMATH_C2X
718# define __TGMATH_1_NARROW_F32X(F, X) \
719 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
720 || __TGMATH_NARROW_F32X_USE_F64X (X) \
721 ? __TGMATH_F128 ((X), F, (X)) \
722 F ## f64x (X) \
723 : F ## f64 (X)))
578724# define __TGMATH_2_NARROW_F32X(F, X, Y) \
579725 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
580726 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
727 || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y)) \
581728 ? __TGMATH_F128 ((X) + (Y), F, (X, Y)) \
582729 F ## f64x (X, Y) \
583730 : F ## f64 (X, Y)))
584# elif __HAVE_FLOAT128
731# define __TGMATH_3_NARROW_F32X(F, X, Y, Z) \
732 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
733 + (__tgmath_real_type (Y)) 0 \
734 + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
735 || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y) + (Z)) \
736 ? __TGMATH_F128 ((X) + (Y) + (Z), F, (X, Y, Z)) \
737 F ## f64x (X, Y, Z) \
738 : F ## f64 (X, Y, Z)))
739# endif
740# elif __HAVE_FLOAT128
741# if !__HAVE_BUILTIN_TGMATH
742# define __TGMATH_1_NARROW_F32(F, X) \
743 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
744 ? F ## f128 (X) \
745 : F ## f64 (X)))
585746# define __TGMATH_2_NARROW_F32(F, X, Y) \
586747 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
587748 + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \
588749 ? F ## f128 (X, Y) \
589750 : F ## f64 (X, Y)))
751# define __TGMATH_3_NARROW_F32(F, X, Y, Z) \
752 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
753 + (__tgmath_real_type (Y)) 0 \
754 + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \
755 ? F ## f128 (X, Y, Z) \
756 : F ## f64 (X, Y, Z)))
757# define __TGMATH_1_NARROW_F64(F, X) \
758 (F ## f128 (X))
590759# define __TGMATH_2_NARROW_F64(F, X, Y) \
591760 (F ## f128 (X, Y))
761# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
762 (F ## f128 (X, Y, Z))
763# endif
764# if !__HAVE_BUILTIN_TGMATH_C2X
765# define __TGMATH_1_NARROW_F32X(F, X) \
766 (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float32x) \
767 || __TGMATH_NARROW_F32X_USE_F64X (X) \
768 ? F ## f64x (X) \
769 : F ## f64 (X)))
592770# define __TGMATH_2_NARROW_F32X(F, X, Y) \
593771 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
594772 + (__tgmath_real_type (Y)) 0) > sizeof (_Float32x) \
773 || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y)) \
595774 ? F ## f64x (X, Y) \
596775 : F ## f64 (X, Y)))
597# else
776# define __TGMATH_3_NARROW_F32X(F, X, Y, Z) \
777 (__extension__ (sizeof ((__tgmath_real_type (X)) 0 \
778 + (__tgmath_real_type (Y)) 0 \
779 + (__tgmath_real_type (Z)) 0) > sizeof (_Float32x) \
780 || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y) + (Z)) \
781 ? F ## f64x (X, Y, Z) \
782 : F ## f64 (X, Y, Z)))
783# endif
784# else
785# if !__HAVE_BUILTIN_TGMATH
786# define __TGMATH_1_NARROW_F32(F, X) \
787 (F ## f64 (X))
598788# define __TGMATH_2_NARROW_F32(F, X, Y) \
599789 (F ## f64 (X, Y))
790# define __TGMATH_3_NARROW_F32(F, X, Y, Z) \
791 (F ## f64 (X, Y, Z))
600792# endif
601# endif /* !__HAVE_BUILTIN_TGMATH. */
793# endif
602794#else
603795# error "Unsupported compiler; you cannot use <tgmath.h>"
604796#endif
......@@ -679,6 +871,11 @@
679871/* Compute base-2 logarithm of X. */
680872#define log2(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2)
681873
874#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
875/* Compute exponent to base ten. */
876#define exp10(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp10)
877#endif
878
682879
683880/* Power functions. */
684881
......@@ -764,7 +961,7 @@
764961#define nexttoward(Val1, Val2) \
765962 __TGMATH_BINARY_FIRST_REAL_STD_ONLY (Val1, Val2, nexttoward)
766963
767/* Return the remainder of integer divison X / Y with infinite precision. */
964/* Return the remainder of integer division X / Y with infinite precision. */
768965#define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder)
769966
770967/* Return X times (2 to the Nth power). */
......@@ -786,11 +983,19 @@
786983/* Return positive difference between X and Y. */
787984#define fdim(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fdim)
788985
986#if __GLIBC_USE (ISOC2X) && !defined __USE_GNU
987/* Return maximum numeric value from X and Y. */
988# define fmax(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, fmax)
989
990/* Return minimum numeric value from X and Y. */
991# define fmin(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, fmin)
992#else
789993/* Return maximum numeric value from X and Y. */
790#define fmax(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmax)
994# define fmax(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmax)
791995
792996/* Return minimum numeric value from X and Y. */
793#define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin)
997# define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin)
998#endif
794999
7951000
7961001/* Multiply-add function computed as a ternary operation. */
......@@ -815,7 +1020,9 @@
8151020
8161021/* Like ilogb, but returning long int. */
8171022# define llogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llogb)
1023#endif
8181024
1025#if __GLIBC_USE (IEC_60559_BFP_EXT)
8191026/* Return value with maximum magnitude. */
8201027# define fmaxmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaxmag)
8211028
......@@ -823,6 +1030,38 @@
8231030# define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag)
8241031#endif
8251032
1033#if __GLIBC_USE (ISOC2X)
1034/* Return maximum value from X and Y. */
1035# define fmaximum(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaximum)
1036
1037/* Return minimum value from X and Y. */
1038# define fminimum(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminimum)
1039
1040/* Return maximum numeric value from X and Y. */
1041# define fmaximum_num(Val1, Val2) \
1042 __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaximum_num)
1043
1044/* Return minimum numeric value from X and Y. */
1045# define fminimum_num(Val1, Val2) \
1046 __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminimum_num)
1047
1048/* Return value with maximum magnitude. */
1049# define fmaximum_mag(Val1, Val2) \
1050 __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaximum_mag)
1051
1052/* Return value with minimum magnitude. */
1053# define fminimum_mag(Val1, Val2) \
1054 __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminimum_mag)
1055
1056/* Return numeric value with maximum magnitude. */
1057# define fmaximum_mag_num(Val1, Val2) \
1058 __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaximum_mag_num)
1059
1060/* Return numeric value with minimum magnitude. */
1061# define fminimum_mag_num(Val1, Val2) \
1062 __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminimum_mag_num)
1063#endif
1064
8261065
8271066/* Absolute value, conjugates, and projection. */
8281067
......@@ -865,6 +1104,14 @@
8651104# define fsub(Val1, Val2) __TGMATH_2_NARROW_F (fsub, Val1, Val2)
8661105# define dsub(Val1, Val2) __TGMATH_2_NARROW_D (dsub, Val1, Val2)
8671106
1107/* Square root. */
1108# define fsqrt(Val) __TGMATH_1_NARROW_F (fsqrt, Val)
1109# define dsqrt(Val) __TGMATH_1_NARROW_D (dsqrt, Val)
1110
1111/* Fused multiply-add. */
1112# define ffma(Val1, Val2, Val3) __TGMATH_3_NARROW_F (ffma, Val1, Val2, Val3)
1113# define dfma(Val1, Val2, Val3) __TGMATH_3_NARROW_D (dfma, Val1, Val2, Val3)
1114
8681115#endif
8691116
8701117#if __GLIBC_USE (IEC_60559_TYPES_EXT)
......@@ -874,6 +1121,9 @@
8741121# define f16div(Val1, Val2) __TGMATH_2_NARROW_F16 (f16div, Val1, Val2)
8751122# define f16mul(Val1, Val2) __TGMATH_2_NARROW_F16 (f16mul, Val1, Val2)
8761123# define f16sub(Val1, Val2) __TGMATH_2_NARROW_F16 (f16sub, Val1, Val2)
1124# define f16sqrt(Val) __TGMATH_1_NARROW_F16 (f16sqrt, Val)
1125# define f16fma(Val1, Val2, Val3) \
1126 __TGMATH_3_NARROW_F16 (f16fma, Val1, Val2, Val3)
8771127# endif
8781128
8791129# if __HAVE_FLOAT32
......@@ -881,6 +1131,9 @@
8811131# define f32div(Val1, Val2) __TGMATH_2_NARROW_F32 (f32div, Val1, Val2)
8821132# define f32mul(Val1, Val2) __TGMATH_2_NARROW_F32 (f32mul, Val1, Val2)
8831133# define f32sub(Val1, Val2) __TGMATH_2_NARROW_F32 (f32sub, Val1, Val2)
1134# define f32sqrt(Val) __TGMATH_1_NARROW_F32 (f32sqrt, Val)
1135# define f32fma(Val1, Val2, Val3) \
1136 __TGMATH_3_NARROW_F32 (f32fma, Val1, Val2, Val3)
8841137# endif
8851138
8861139# if __HAVE_FLOAT64 && (__HAVE_FLOAT64X || __HAVE_FLOAT128)
......@@ -888,6 +1141,9 @@
8881141# define f64div(Val1, Val2) __TGMATH_2_NARROW_F64 (f64div, Val1, Val2)
8891142# define f64mul(Val1, Val2) __TGMATH_2_NARROW_F64 (f64mul, Val1, Val2)
8901143# define f64sub(Val1, Val2) __TGMATH_2_NARROW_F64 (f64sub, Val1, Val2)
1144# define f64sqrt(Val) __TGMATH_1_NARROW_F64 (f64sqrt, Val)
1145# define f64fma(Val1, Val2, Val3) \
1146 __TGMATH_3_NARROW_F64 (f64fma, Val1, Val2, Val3)
8911147# endif
8921148
8931149# if __HAVE_FLOAT32X
......@@ -895,6 +1151,9 @@
8951151# define f32xdiv(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xdiv, Val1, Val2)
8961152# define f32xmul(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xmul, Val1, Val2)
8971153# define f32xsub(Val1, Val2) __TGMATH_2_NARROW_F32X (f32xsub, Val1, Val2)
1154# define f32xsqrt(Val) __TGMATH_1_NARROW_F32X (f32xsqrt, Val)
1155# define f32xfma(Val1, Val2, Val3) \
1156 __TGMATH_3_NARROW_F32X (f32xfma, Val1, Val2, Val3)
8981157# endif
8991158
9001159# if __HAVE_FLOAT64X && (__HAVE_FLOAT128X || __HAVE_FLOAT128)
......@@ -902,6 +1161,9 @@
9021161# define f64xdiv(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xdiv, Val1, Val2)
9031162# define f64xmul(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xmul, Val1, Val2)
9041163# define f64xsub(Val1, Val2) __TGMATH_2_NARROW_F64X (f64xsub, Val1, Val2)
1164# define f64xsqrt(Val) __TGMATH_1_NARROW_F64X (f64xsqrt, Val)
1165# define f64xfma(Val1, Val2, Val3) \
1166 __TGMATH_3_NARROW_F64X (f64xfma, Val1, Val2, Val3)
9051167# endif
9061168
9071169#endif
lib/libc/include/generic-glibc/thread_db.h+1-1
......@@ -1,5 +1,5 @@
11/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread
2 Copyright (C) 1999-2021 Free Software Foundation, Inc.
2 Copyright (C) 1999-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/threads.h+5-3
......@@ -1,5 +1,5 @@
11/* ISO C11 Standard: 7.26 - Thread support library <threads.h>.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 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
......@@ -27,7 +27,9 @@ __BEGIN_DECLS
2727#include <bits/thread-shared-types.h>
2828#include <bits/types/struct_timespec.h>
2929
30#ifndef __cplusplus
30#if (!defined __STDC_VERSION__ \
31 || __STDC_VERSION__ <= 201710L \
32 || !__GNUC_PREREQ (13, 0)) && !defined __cplusplus
3133# define thread_local _Thread_local
3234#endif
3335
......@@ -74,7 +76,7 @@ typedef union
7476/* Threads functions. */
7577
7678/* Create a new thread executing the function __FUNC. Arguments for __FUNC
77 are passed through __ARG. If succesful, __THR is set to new thread
79 are passed through __ARG. If successful, __THR is set to new thread
7880 identifier. */
7981extern int thrd_create (thrd_t *__thr, thrd_start_t __func, void *__arg);
8082
lib/libc/include/generic-glibc/time.h+25-12
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
9999 of characters written, or 0 if it would exceed MAXSIZE. */
100100extern size_t strftime (char *__restrict __s, size_t __maxsize,
101101 const char *__restrict __format,
102 const struct tm *__restrict __tp) __THROW;
102 const struct tm *__restrict __tp)
103 __THROW __nonnull((1, 3, 4));
103104
104105#ifdef __USE_XOPEN
105106/* Parse S according to FORMAT and store binary time information in TP.
......@@ -214,7 +215,7 @@ extern char *__REDIRECT_NTH (ctime_r, (const time_t *__restrict __timer,
214215
215216
216217/* Defined in localtime.c. */
217extern char *__tzname[2]; /* Current timezone names. */
218extern char *__tzname[2]; /* Current time zone abbreviations. */
218219extern int __daylight; /* If daylight-saving time is ever in use. */
219220extern long int __timezone; /* Seconds west of UTC. */
220221
......@@ -240,21 +241,30 @@ extern long int timezone;
240241 ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
241242
242243
244#if defined __USE_MISC || __GLIBC_USE (ISOC2X)
245# ifndef __USE_TIME_BITS64
246/* Like `mktime', but for TP represents Universal Time, not local time. */
247extern time_t timegm (struct tm *__tp) __THROW;
248# else
249# ifdef __REDIRECT_NTH
250extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64);
251# else
252# define timegm __timegm64
253# endif
254# endif
255#endif
256
257
243258#ifdef __USE_MISC
244259/* Miscellaneous functions many Unices inherited from the public domain
245260 localtime package. These are included only for compatibility. */
246261
247262#ifndef __USE_TIME_BITS64
248/* Like `mktime', but for TP represents Universal Time, not local time. */
249extern time_t timegm (struct tm *__tp) __THROW;
250263/* Another name for `mktime'. */
251264extern time_t timelocal (struct tm *__tp) __THROW;
252265#else
253266# ifdef __REDIRECT_NTH
254extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64);
255267extern time_t __REDIRECT_NTH (timelocal, (struct tm *__tp), __mktime64);
256# else
257# define timegm __timegm64
258268# endif
259269#endif
260270
......@@ -276,11 +286,12 @@ extern int nanosleep (const struct timespec *__requested_time,
276286extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
277287
278288/* Get current value of clock CLOCK_ID and store it in TP. */
279extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
289extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp)
290 __THROW __nonnull((2));
280291
281292/* Set clock CLOCK_ID to value TP. */
282293extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
283 __THROW;
294 __THROW __nonnull((2));
284295# else
285296# ifdef __REDIRECT
286297extern int __REDIRECT (nanosleep, (const struct timespec *__requested_time,
......@@ -290,9 +301,11 @@ extern int __REDIRECT_NTH (clock_getres, (clockid_t __clock_id,
290301 struct timespec *__res),
291302 __clock_getres64);
292303extern int __REDIRECT_NTH (clock_gettime, (clockid_t __clock_id, struct
293 timespec *__tp), __clock_gettime64);
304 timespec *__tp), __clock_gettime64)
305 __nonnull((2));
294306extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct
295 timespec *__tp), __clock_settime64);
307 timespec *__tp), __clock_settime64)
308 __nonnull((2));
296309# else
297310# define nanosleep __nanosleep64
298311# define clock_getres __clock_getres64
lib/libc/include/generic-glibc/uchar.h+30-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2011-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -31,6 +31,21 @@
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++
35 __cpp_char8_t feature test macro is not defined. */
36#if __GLIBC_USE (ISOC2X) && !defined __cpp_char8_t
37#if __GNUC_PREREQ (10, 0) && defined __cplusplus
38/* Suppress the diagnostic regarding char8_t being a keyword in C++20. */
39# pragma GCC diagnostic push
40# pragma GCC diagnostic ignored "-Wc++20-compat"
41#endif
42/* Define the 8-bit character type. */
43typedef unsigned char char8_t;
44#if __GNUC_PREREQ (10, 0) && defined __cplusplus
45# pragma GCC diagnostic pop
46#endif
47#endif
48
3449#ifndef __USE_ISOCXX11
3550/* Define the 16-bit and 32-bit character types. */
3651typedef __uint_least16_t char16_t;
......@@ -40,6 +55,20 @@ typedef __uint_least32_t char32_t;
4055
4156__BEGIN_DECLS
4257
58/* Declare the C2x mbrtoc8() and c8rtomb() functions in C2x modes or if
59 the C++ __cpp_char8_t feature test macro is defined. */
60#if __GLIBC_USE (ISOC2X) || defined __cpp_char8_t
61/* Write char8_t representation of multibyte character pointed
62 to by S to PC8. */
63extern size_t mbrtoc8 (char8_t *__restrict __pc8,
64 const char *__restrict __s, size_t __n,
65 mbstate_t *__restrict __p) __THROW;
66
67/* Write multibyte representation of char8_t C8 to S. */
68extern size_t c8rtomb (char *__restrict __s, char8_t __c8,
69 mbstate_t *__restrict __ps) __THROW;
70#endif
71
4372/* Write char16_t representation of multibyte character pointed
4473 to by S to PC16. */
4574extern size_t mbrtoc16 (char16_t *__restrict __pc16,
lib/libc/include/generic-glibc/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/ulimit.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/unistd.h+28-15
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -369,7 +369,7 @@ extern void closefrom (int __lowfd) __THROW;
369369 This function is a cancellation point and therefore not marked with
370370 __THROW. */
371371extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
372 __attr_access ((__write_only__, 2, 3));
372 __fortified_attr_access (__write_only__, 2, 3);
373373
374374/* Write N bytes of BUF to FD. Return the number written, or -1.
375375
......@@ -388,7 +388,7 @@ extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
388388 __THROW. */
389389extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
390390 __off_t __offset) __wur
391 __attr_access ((__write_only__, 2, 3));
391 __fortified_attr_access (__write_only__, 2, 3);
392392
393393/* Write N bytes of BUF to FD at the given position OFFSET without
394394 changing the file pointer. Return the number written, or -1.
......@@ -404,7 +404,7 @@ extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
404404extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
405405 __off64_t __offset),
406406 pread64) __wur
407 __attr_access ((__write_only__, 2, 3));
407 __fortified_attr_access (__write_only__, 2, 3);
408408extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
409409 size_t __nbytes, __off64_t __offset),
410410 pwrite64) __wur
......@@ -421,7 +421,7 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
421421 or 0 for EOF. */
422422extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
423423 __off64_t __offset) __wur
424 __attr_access ((__write_only__, 2, 3));
424 __fortified_attr_access (__write_only__, 2, 3);
425425/* Write N bytes of BUF to FD at the given position OFFSET without
426426 changing the file pointer. Return the number written, or -1. */
427427extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
......@@ -528,8 +528,7 @@ extern int fchdir (int __fd) __THROW __wur;
528528 an array is allocated with `malloc'; the array is SIZE
529529 bytes long, unless SIZE == 0, in which case it is as
530530 big as necessary. */
531extern char *getcwd (char *__buf, size_t __size) __THROW __wur
532 __attr_access ((__write_only__, 1, 2));
531extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
533532
534533#ifdef __USE_GNU
535534/* Return a malloc'd string containing the current directory name.
......@@ -643,7 +642,7 @@ extern long int sysconf (int __name) __THROW;
643642#ifdef __USE_POSIX2
644643/* Get the value of the string-valued system variable NAME. */
645644extern size_t confstr (int __name, char *__buf, size_t __len) __THROW
646 __attr_access ((__write_only__, 2, 3));
645 __fortified_attr_access (__write_only__, 2, 3);
647646#endif
648647
649648
......@@ -710,7 +709,7 @@ extern __gid_t getegid (void) __THROW;
710709 the calling process is in. Otherwise, fill in the group IDs
711710 of its supplementary groups in LIST and return the number written. */
712711extern int getgroups (int __size, __gid_t __list[]) __THROW __wur
713 __attr_access ((__write_only__, 2, 1));
712 __fortified_attr_access (__write_only__, 2, 1);
714713#ifdef __USE_GNU
715714/* Return nonzero iff the calling process is in group GID. */
716715extern int group_member (__gid_t __gid) __THROW;
......@@ -802,7 +801,8 @@ extern char *ttyname (int __fd) __THROW;
802801/* Store at most BUFLEN characters of the pathname of the terminal FD is
803802 open on in BUF. Return 0 on success, otherwise an error number. */
804803extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
805 __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3));
804 __THROW __nonnull ((2)) __wur
805 __fortified_attr_access (__write_only__, 2, 3);
806806
807807/* Return 1 if FD is a valid descriptor associated
808808 with a terminal, zero if not. */
......@@ -837,7 +837,8 @@ extern int symlink (const char *__from, const char *__to)
837837 Returns the number of characters read, or -1 for errors. */
838838extern ssize_t readlink (const char *__restrict __path,
839839 char *__restrict __buf, size_t __len)
840 __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
840 __THROW __nonnull ((1, 2)) __wur
841 __fortified_attr_access (__write_only__, 2, 3);
841842
842843#endif /* Use POSIX.1-2001. */
843844
......@@ -849,7 +850,8 @@ extern int symlinkat (const char *__from, int __tofd,
849850/* Like readlink but a relative PATH is interpreted relative to FD. */
850851extern ssize_t readlinkat (int __fd, const char *__restrict __path,
851852 char *__restrict __buf, size_t __len)
852 __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
853 __THROW __nonnull ((2, 3)) __wur
854 __fortified_attr_access (__write_only__, 3, 4);
853855#endif
854856
855857/* Remove the link NAME. */
......@@ -885,7 +887,7 @@ extern char *getlogin (void);
885887 This function is a possible cancellation point and therefore not
886888 marked with __THROW. */
887889extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1))
888 __attr_access ((__write_only__, 1, 2));
890 __fortified_attr_access (__write_only__, 1, 2);
889891#endif
890892
891893#ifdef __USE_MISC
......@@ -907,7 +909,7 @@ extern int setlogin (const char *__name) __THROW __nonnull ((1));
907909 The result is null-terminated if LEN is large enough for the full
908910 name and the terminator. */
909911extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1))
910 __attr_access ((__write_only__, 1, 2));
912 __fortified_attr_access (__write_only__, 1, 2);
911913#endif
912914
913915
......@@ -926,7 +928,8 @@ extern int sethostid (long int __id) __THROW __wur;
926928 Called just like `gethostname' and `sethostname'.
927929 The NIS domain name is usually the empty string when not using NIS. */
928930extern int getdomainname (char *__name, size_t __len)
929 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
931 __THROW __nonnull ((1)) __wur
932 __fortified_attr_access (__write_only__, 1, 2);
930933extern int setdomainname (const char *__name, size_t __len)
931934 __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2));
932935
......@@ -1196,6 +1199,16 @@ int getentropy (void *__buffer, size_t __length) __wur
11961199 __attr_access ((__write_only__, 1, 2));
11971200#endif
11981201
1202#ifdef __USE_GNU
1203/* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS
1204 are define by the CLOSE_RANGE prefix. This function behaves like close
1205 on the range and gaps where the file descriptor is invalid or errors
1206 encountered while closing file descriptors are ignored. Returns 0 on
1207 successor or -1 for failure (and sets errno accordingly). */
1208extern int close_range (unsigned int __fd, unsigned int __max_fd,
1209 int __flags) __THROW;
1210#endif
1211
11991212/* Define some macros helping to catch buffer overflows. */
12001213#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
12011214# include <bits/unistd.h>
lib/libc/include/generic-glibc/utime.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/utmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1993-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/utmpx.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/values.h+1-1
......@@ -1,5 +1,5 @@
11/* Old compatibility names for <limits.h> and <float.h> constants.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/wchar.h+226-28
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1995-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1995-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -37,6 +37,17 @@
3737#define __need___va_list
3838#include <stdarg.h>
3939
40#if defined __USE_XOPEN2K || defined __USE_XOPEN2K8
41# ifdef __GNUC__
42# ifndef _VA_LIST_DEFINED
43typedef __gnuc_va_list va_list;
44# define _VA_LIST_DEFINED
45# endif
46# else
47# include <stdarg.h>
48# endif
49#endif
50
4051#include <bits/wchar.h>
4152#include <bits/types/wint_t.h>
4253#include <bits/types/mbstate_t.h>
......@@ -93,6 +104,19 @@ extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
93104 const wchar_t *__restrict __src, size_t __n)
94105 __THROW __nonnull ((1, 2));
95106
107#ifdef __USE_MISC
108/* Copy at most N - 1 characters from SRC to DEST. */
109extern size_t wcslcpy (wchar_t *__restrict __dest,
110 const wchar_t *__restrict __src, size_t __n)
111 __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3));
112
113/* Append SRC to DEST, possibly with truncation to keep the total size
114 below N. */
115extern size_t wcslcat (wchar_t *__restrict __dest,
116 const wchar_t *__restrict __src, size_t __n)
117 __THROW __nonnull ((1, 2)) __attr_access ((__read_write__, 1, 3));
118#endif
119
96120/* Append SRC onto DEST. */
97121extern wchar_t *wcscat (wchar_t *__restrict __dest,
98122 const wchar_t *__restrict __src)
......@@ -386,42 +410,44 @@ extern long double wcstold (const wchar_t *__restrict __nptr,
386410 wchar_t **__restrict __endptr) __THROW;
387411#endif /* C99 */
388412
413#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X)
389414/* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */
390415
391#if __HAVE_FLOAT16 && defined __USE_GNU
416# if __HAVE_FLOAT16
392417extern _Float16 wcstof16 (const wchar_t *__restrict __nptr,
393418 wchar_t **__restrict __endptr) __THROW;
394#endif
419# endif
395420
396#if __HAVE_FLOAT32 && defined __USE_GNU
421# if __HAVE_FLOAT32
397422extern _Float32 wcstof32 (const wchar_t *__restrict __nptr,
398423 wchar_t **__restrict __endptr) __THROW;
399#endif
424# endif
400425
401#if __HAVE_FLOAT64 && defined __USE_GNU
426# if __HAVE_FLOAT64
402427extern _Float64 wcstof64 (const wchar_t *__restrict __nptr,
403428 wchar_t **__restrict __endptr) __THROW;
404#endif
429# endif
405430
406#if __HAVE_FLOAT128 && defined __USE_GNU
431# if __HAVE_FLOAT128
407432extern _Float128 wcstof128 (const wchar_t *__restrict __nptr,
408433 wchar_t **__restrict __endptr) __THROW;
409#endif
434# endif
410435
411#if __HAVE_FLOAT32X && defined __USE_GNU
436# if __HAVE_FLOAT32X
412437extern _Float32x wcstof32x (const wchar_t *__restrict __nptr,
413438 wchar_t **__restrict __endptr) __THROW;
414#endif
439# endif
415440
416#if __HAVE_FLOAT64X && defined __USE_GNU
441# if __HAVE_FLOAT64X
417442extern _Float64x wcstof64x (const wchar_t *__restrict __nptr,
418443 wchar_t **__restrict __endptr) __THROW;
419#endif
444# endif
420445
421#if __HAVE_FLOAT128X && defined __USE_GNU
446# if __HAVE_FLOAT128X
422447extern _Float128x wcstof128x (const wchar_t *__restrict __nptr,
423448 wchar_t **__restrict __endptr) __THROW;
424#endif
449# endif
450#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) */
425451
426452
427453/* Convert initial portion of wide string NPTR to `long int'
......@@ -467,6 +493,67 @@ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
467493 int __base) __THROW;
468494#endif /* Use GNU. */
469495
496/* Versions of the above functions that handle '0b' and '0B' prefixes
497 in base 0 or 2. */
498#if __GLIBC_USE (C2X_STRTOL)
499# ifdef __REDIRECT
500extern long int __REDIRECT_NTH (wcstol, (const wchar_t *__restrict __nptr,
501 wchar_t **__restrict __endptr,
502 int __base), __isoc23_wcstol);
503extern unsigned long int __REDIRECT_NTH (wcstoul,
504 (const wchar_t *__restrict __nptr,
505 wchar_t **__restrict __endptr,
506 int __base), __isoc23_wcstoul);
507__extension__
508extern long long int __REDIRECT_NTH (wcstoll,
509 (const wchar_t *__restrict __nptr,
510 wchar_t **__restrict __endptr,
511 int __base), __isoc23_wcstoll);
512__extension__
513extern unsigned long long int __REDIRECT_NTH (wcstoull,
514 (const wchar_t *__restrict __nptr,
515 wchar_t **__restrict __endptr,
516 int __base), __isoc23_wcstoull);
517# ifdef __USE_GNU
518__extension__
519extern long long int __REDIRECT_NTH (wcstoq, (const wchar_t *__restrict __nptr,
520 wchar_t **__restrict __endptr,
521 int __base), __isoc23_wcstoll);
522__extension__
523extern unsigned long long int __REDIRECT_NTH (wcstouq,
524 (const wchar_t *__restrict __nptr,
525 wchar_t **__restrict __endptr,
526 int __base), __isoc23_wcstoull);
527# endif
528# else
529extern long int __isoc23_wcstol (const wchar_t *__restrict __nptr,
530 wchar_t **__restrict __endptr, int __base)
531 __THROW;
532extern unsigned long int __isoc23_wcstoul (const wchar_t *__restrict __nptr,
533 wchar_t **__restrict __endptr,
534 int __base)
535 __THROW;
536__extension__
537extern long long int __isoc23_wcstoll (const wchar_t *__restrict __nptr,
538 wchar_t **__restrict __endptr,
539 int __base)
540 __THROW;
541__extension__
542extern unsigned long long int __isoc23_wcstoull (const wchar_t *__restrict __nptr,
543 wchar_t **__restrict __endptr,
544 int __base)
545 __THROW;
546# define wcstol __isoc23_wcstol
547# define wcstoul __isoc23_wcstoul
548# define wcstoll __isoc23_wcstoll
549# define wcstoull __isoc23_wcstoull
550# ifdef __USE_GNU
551# define wcstoq __isoc23_wcstoll
552# define wcstouq __isoc23_wcstoull
553# endif
554# endif
555#endif
556
470557#ifdef __USE_GNU
471558/* Parallel versions of the functions above which take the locale to
472559 use as an additional parameter. These are GNU extensions inspired
......@@ -490,6 +577,56 @@ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
490577 int __base, locale_t __loc)
491578 __THROW;
492579
580/* Versions of the above functions that handle '0b' and '0B' prefixes
581 in base 0 or 2. */
582# if __GLIBC_USE (C2X_STRTOL)
583# ifdef __REDIRECT
584extern long int __REDIRECT_NTH (wcstol_l, (const wchar_t *__restrict __nptr,
585 wchar_t **__restrict __endptr,
586 int __base, locale_t __loc),
587 __isoc23_wcstol_l);
588extern unsigned long int __REDIRECT_NTH (wcstoul_l,
589 (const wchar_t *__restrict __nptr,
590 wchar_t **__restrict __endptr,
591 int __base, locale_t __loc),
592 __isoc23_wcstoul_l);
593__extension__
594extern long long int __REDIRECT_NTH (wcstoll_l,
595 (const wchar_t *__restrict __nptr,
596 wchar_t **__restrict __endptr,
597 int __base, locale_t __loc),
598 __isoc23_wcstoll_l);
599__extension__
600extern unsigned long long int __REDIRECT_NTH (wcstoull_l,
601 (const wchar_t *__restrict __nptr,
602 wchar_t **__restrict __endptr,
603 int __base, locale_t __loc),
604 __isoc23_wcstoull_l);
605# else
606extern long int __isoc23_wcstol_l (const wchar_t *__restrict __nptr,
607 wchar_t **__restrict __endptr, int __base,
608 locale_t __loc) __THROW;
609extern unsigned long int __isoc23_wcstoul_l (const wchar_t *__restrict __nptr,
610 wchar_t **__restrict __endptr,
611 int __base, locale_t __loc)
612 __THROW;
613__extension__
614extern long long int __isoc23_wcstoll_l (const wchar_t *__restrict __nptr,
615 wchar_t **__restrict __endptr,
616 int __base, locale_t __loc)
617 __THROW;
618__extension__
619extern unsigned long long int __isoc23_wcstoull_l (const wchar_t *__restrict __nptr,
620 wchar_t **__restrict __endptr,
621 int __base, locale_t __loc)
622 __THROW;
623# define wcstol_l __isoc23_wcstol_l
624# define wcstoul_l __isoc23_wcstoul_l
625# define wcstoll_l __isoc23_wcstoll_l
626# define wcstoull_l __isoc23_wcstoull_l
627# endif
628# endif
629
493630extern double wcstod_l (const wchar_t *__restrict __nptr,
494631 wchar_t **__restrict __endptr, locale_t __loc)
495632 __THROW;
......@@ -651,9 +788,34 @@ extern int swscanf (const wchar_t *__restrict __s,
651788 functions are at alternative names. When __LDBL_COMPAT or
652789 __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in
653790 bits/wchar-ldbl.h. */
654#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
791# if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
655792 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
656# ifdef __REDIRECT
793# if __GLIBC_USE (C2X_STRTOL)
794# ifdef __REDIRECT
795extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
796 const wchar_t *__restrict __format, ...),
797 __isoc23_fwscanf)
798 /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
799extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...),
800 __isoc23_wscanf)
801 /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
802extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s,
803 const wchar_t *__restrict __format,
804 ...), __isoc23_swscanf)
805 /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
806# else
807extern int __isoc23_fwscanf (__FILE *__restrict __stream,
808 const wchar_t *__restrict __format, ...);
809extern int __isoc23_wscanf (const wchar_t *__restrict __format, ...);
810extern int __isoc23_swscanf (const wchar_t *__restrict __s,
811 const wchar_t *__restrict __format, ...)
812 __THROW;
813# define fwscanf __isoc23_fwscanf
814# define wscanf __isoc23_wscanf
815# define swscanf __isoc23_swscanf
816# endif
817# else
818# ifdef __REDIRECT
657819extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
658820 const wchar_t *__restrict __format, ...),
659821 __isoc99_fwscanf)
......@@ -665,16 +827,17 @@ extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s,
665827 const wchar_t *__restrict __format,
666828 ...), __isoc99_swscanf)
667829 /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
668# else
830# else
669831extern int __isoc99_fwscanf (__FILE *__restrict __stream,
670832 const wchar_t *__restrict __format, ...);
671833extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...);
672834extern int __isoc99_swscanf (const wchar_t *__restrict __s,
673835 const wchar_t *__restrict __format, ...)
674836 __THROW;
675# define fwscanf __isoc99_fwscanf
676# define wscanf __isoc99_wscanf
677# define swscanf __isoc99_swscanf
837# define fwscanf __isoc99_fwscanf
838# define wscanf __isoc99_wscanf
839# define swscanf __isoc99_swscanf
840# endif
678841# endif
679842# endif
680843
......@@ -707,7 +870,34 @@ extern int vswscanf (const wchar_t *__restrict __s,
707870 && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
708871 && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \
709872 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
710# ifdef __REDIRECT
873# if __GLIBC_USE (C2X_STRTOL)
874# ifdef __REDIRECT
875extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
876 const wchar_t *__restrict __format,
877 __gnuc_va_list __arg), __isoc23_vfwscanf)
878 /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
879extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format,
880 __gnuc_va_list __arg), __isoc23_vwscanf)
881 /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
882extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s,
883 const wchar_t *__restrict __format,
884 __gnuc_va_list __arg), __isoc23_vswscanf)
885 /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
886# else
887extern int __isoc23_vfwscanf (__FILE *__restrict __s,
888 const wchar_t *__restrict __format,
889 __gnuc_va_list __arg);
890extern int __isoc23_vwscanf (const wchar_t *__restrict __format,
891 __gnuc_va_list __arg);
892extern int __isoc23_vswscanf (const wchar_t *__restrict __s,
893 const wchar_t *__restrict __format,
894 __gnuc_va_list __arg) __THROW;
895# define vfwscanf __isoc23_vfwscanf
896# define vwscanf __isoc23_vwscanf
897# define vswscanf __isoc23_vswscanf
898# endif
899# else
900# ifdef __REDIRECT
711901extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
712902 const wchar_t *__restrict __format,
713903 __gnuc_va_list __arg), __isoc99_vfwscanf)
......@@ -719,7 +909,7 @@ extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s,
719909 const wchar_t *__restrict __format,
720910 __gnuc_va_list __arg), __isoc99_vswscanf)
721911 /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
722# else
912# else
723913extern int __isoc99_vfwscanf (__FILE *__restrict __s,
724914 const wchar_t *__restrict __format,
725915 __gnuc_va_list __arg);
......@@ -728,9 +918,10 @@ extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
728918extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
729919 const wchar_t *__restrict __format,
730920 __gnuc_va_list __arg) __THROW;
731# define vfwscanf __isoc99_vfwscanf
732# define vwscanf __isoc99_vwscanf
733# define vswscanf __isoc99_vswscanf
921# define vfwscanf __isoc99_vfwscanf
922# define vwscanf __isoc99_vwscanf
923# define vswscanf __isoc99_vswscanf
924# endif
734925# endif
735926# endif
736927
......@@ -864,14 +1055,21 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
8641055
8651056/* Define some macros helping to catch buffer overflows. */
8661057#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
867# include <bits/wchar2.h>
1058/* Declare all functions from bits/wchar2-decl.h first. */
1059# include <bits/wchar2-decl.h>
8681060#endif
8691061
870#include <bits/floatn.h>
1062/* The following headers provide asm redirections. These redirections must
1063 appear before the first usage of these functions, e.g. in bits/wchar.h. */
8711064#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
8721065# include <bits/wchar-ldbl.h>
8731066#endif
8741067
1068#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
1069/* Now include the function definitions and redirects too. */
1070# include <bits/wchar2.h>
1071#endif
1072
8751073__END_DECLS
8761074
8771075#endif /* wchar.h */
\ No newline at end of file
lib/libc/include/generic-glibc/wctype.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/generic-glibc/wordexp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/floatn.h+1-1
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. M68K version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/fp-logb.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. M68K version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/link.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. M68K version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/m68k-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. M68K version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h+1-2
......@@ -1,6 +1,5 @@
1/* Copyright (C) 2010-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
lib/libc/include/m68k-linux-gnu/bits/rseq.h created+29
......@@ -0,0 +1,29 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2023 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/semaphore.h+1-2
......@@ -1,6 +1,5 @@
1/* Copyright (C) 2010-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2010-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
lib/libc/include/m68k-linux-gnu/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/sockaddr.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of struct sockaddr_* members and sizes, Linux/m68k version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* Default read-write lock implementation struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/bits/timesize.h created+20
......@@ -0,0 +1,20 @@
1/* Bit size of the time_t type at glibc build time, Linux/m68k.
2 Copyright (C) 2021-2023 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 32
\ No newline at end of file
lib/libc/include/m68k-linux-gnu/bits/typesizes.h created+74
......@@ -0,0 +1,74 @@
1/* bits/typesizes.h -- underlying types for *_t. m68k version.
2 Copyright (C) 2002-2023 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#define __RLIM_T_MATCHES_RLIM64_T 0
66#define __STATFS_MATCHES_STATFS64 0
67/* And for getitimer, setitimer and rusage */
68#define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
69
70/* Number of descriptors that can fit in an `fd_set'. */
71#define __FD_SETSIZE 1024
72
73
74#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/m68k-linux-gnu/bits/wordsize.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* 68k FPU control word definitions.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/gnu/lib-names.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/m68k-linux-gnu/sys/reg.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/m68k-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mips-linux-gnueabi/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mips-linux-gnueabi/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabi/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mips-linux-gnueabihf/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mips-linux-gnueabihf/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips-linux-gnueabihf/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mips64-linux-gnuabi64/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabi64/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mips64-linux-gnuabin32/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64-linux-gnuabin32/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabi64/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mips64el-linux-gnuabin32/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabi/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mipsel-linux-gnueabi/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabi/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/dlfcn.h+1-1
......@@ -1,5 +1,5 @@
11/* System dependent definitions for run-time dynamic loading.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/errno.h+1-1
......@@ -1,5 +1,5 @@
11/* Error constants. MIPS/Linux specific version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/eventfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/inotify.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/mman.h+12-16
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/MIPS version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -24,25 +24,21 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* These are Linux-specific. */
27#ifdef __USE_MISC
28# define MAP_NORESERVE 0x0400 /* don't check for reservations */
29# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
30# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
32# define MAP_LOCKED 0x8000 /* pages are locked */
33# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
34# define MAP_NONBLOCK 0x20000 /* do not block on IO */
35# define MAP_STACK 0x40000 /* Allocation is for a stack. */
36# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
37# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
27#define MAP_NORESERVE 0x0400 /* don't check for reservations */
28#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
29#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
30#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
31#define MAP_LOCKED 0x8000 /* pages are locked */
32#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
33#define MAP_NONBLOCK 0x20000 /* do not block on IO */
34#define MAP_STACK 0x40000 /* Allocation is for a stack. */
35#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
36#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
3837 underlying mapping. */
39#endif
4038
4139#define __MAP_ANONYMOUS 0x0800
4240
4341/* Include generic Linux declarations. */
4442#include <bits/mman-linux.h>
4543
46#ifdef __USE_MISC
47# define MAP_RENAME MAP_ANONYMOUS
48#endif
\ No newline at end of file
44#define MAP_RENAME MAP_ANONYMOUS
\ No newline at end of file
lib/libc/include/mipsel-linux-gnueabihf/bits/poll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. MIPS version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/resource.h+1-1
......@@ -1,5 +1,5 @@
11/* Bit values & structures for resource limits. Linux/MIPS version.
2 Copyright (C) 1994-2021 Free Software Foundation, Inc.
2 Copyright (C) 1994-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/semaphore.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/shmlba.h+1-1
......@@ -1,5 +1,5 @@
11/* Define SHMLBA. MIPS version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* The proper definitions for Linux/MIPS's sigaction.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
1/* Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
22
33 The GNU C Library is free software; you can redistribute it and/or
44 modify it under the terms of the GNU Lesser General Public
lib/libc/include/mipsel-linux-gnueabihf/bits/signalfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2007-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/signum-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for MIPS.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/socket_type.h+1-1
......@@ -1,5 +1,5 @@
11/* Define enum __socket_type for Linux/MIPS.
2 Copyright (C) 1991-2021 Free Software Foundation, Inc.
2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/termios-struct.h+1-1
......@@ -1,5 +1,5 @@
11/* struct termios definition. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/termios-tcflow.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/mips version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/timerfd.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2008-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/types/stack_t.h+1-1
......@@ -1,5 +1,5 @@
11/* Define stack_t. MIPS Linux version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* MIPS implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/MIPS implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/mipsel-linux-gnueabihf/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/fcntl.h+7-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -33,6 +33,12 @@
3333# define __O_LARGEFILE 0200000
3434#endif
3535
36#if __WORDSIZE == 64
37# define F_GETLK 5
38# define F_SETLK 6
39# define F_SETLKW 7
40#endif
41
3642struct flock
3743 {
3844 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
lib/libc/include/powerpc-linux-gnueabi/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -57,7 +57,7 @@
5757/* Defined to concatenate the literal suffix to be used with _Float128
5858 types, if __HAVE_FLOAT128 is 1. */
5959# if __HAVE_FLOAT128
60# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
60# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6161/* The literal suffix (f128) exist for powerpc only since GCC 7.0. */
6262# if __LDBL_MANT_DIG__ == 113
6363# define __f128(x) x##l
......@@ -71,10 +71,10 @@
7171
7272/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7373# if __HAVE_FLOAT128
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus && !__GNUC_PREREQ (13, 0)
7575typedef long double _Float128;
7676# define __CFLOAT128 _Complex long double
77# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus
77# elif !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7878/* The type _Float128 exist for powerpc only since GCC 7.0. */
7979typedef __float128 _Float128;
8080/* Add a typedef for older GCC and C++ compilers which don't natively support
lib/libc/include/powerpc-linux-gnueabi/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/hwcap.h+1-1
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/ipc-perm.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/mman.h+12-14
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -26,21 +26,19 @@
2626#define PROT_SAO 0x10 /* Strong Access Ordering. */
2727
2828/* These are Linux-specific. */
29#ifdef __USE_MISC
30# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
31# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
32# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
33# define MAP_LOCKED 0x00080 /* Lock the mapping. */
34# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
35# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
36# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
37# define MAP_STACK 0x20000 /* Allocation is for a stack. */
38# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
29#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
30#define MAP_DENYWRITE 0x00800 /* ETXTBSY */
31#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
32#define MAP_LOCKED 0x00080 /* Lock the mapping. */
33#define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
34#define MAP_POPULATE 0x08000 /* 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
4039 faults for the mapping. */
41# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
40#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4241 underlying mapping. */
43#endif
4442
4543/* Flags for `mlockall'. */
4644#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
lib/libc/include/powerpc-linux-gnueabi/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/rseq.h created+37
......@@ -0,0 +1,37 @@
1/* Restartable Sequences Linux powerpc architecture header.
2 Copyright (C) 2021-2023 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 following trap instruction:
32
33 powerpc-be: 0f e5 00 0b twui r5,11
34 powerpc64-le: 0b 00 e5 0f twui r5,11
35 powerpc64-be: 0f e5 00 0b twui r5,11 */
36
37#define RSEQ_SIG 0x0fe5000b
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabi/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -32,7 +32,7 @@
3232
3333/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
3434 the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
35 correctly on 32 bit. It also insists that vecregs are only gauranteed
35 correctly on 32 bit. It also insists that vecregs are only guaranteed
3636 4 byte alignment so we need to use vperm in the setjmp/longjmp routines.
3737 We have to version the code because members like int __mask_was_saved
3838 in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
lib/libc/include/powerpc-linux-gnueabi/bits/sigstack.h+6-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 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
......@@ -23,10 +23,15 @@
2323# error "Never include this file directly. Use <signal.h> instead"
2424#endif
2525
26#ifdef __powerpc64__
27#define MINSIGSTKSZ 8192
28#define SIGSTKSZ 32768
29#else
2630/* Minimum stack size for a signal handler. */
2731#define MINSIGSTKSZ 4096
2832
2933/* System default stack size. */
3034#define SIGSTKSZ 16384
35#endif
3136
3237#endif /* bits/sigstack.h */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabi/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/powerpc-linux-gnueabi/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/termios-baud.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cflag.h+6-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 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
......@@ -32,4 +32,8 @@
3232#define PARODD 00020000
3333#define HUPCL 00040000
3434
35#define CLOCAL 00100000
\ No newline at end of file
35#define CLOCAL 00100000
36
37#ifdef __USE_MISC
38# define ADDRB 04000000000
39#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_iflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_oflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/termios-misc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/timesize.h created+22
......@@ -0,0 +1,22 @@
1/* Bit size of the time_t type at glibc build time, Linux/PowerPC.
2 Copyright (C) 2021-2023 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/powerpc-linux-gnueabi/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. PowerPC version.
2 Copyright (C) 2002-2023 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/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names-32.h deleted-29
......@@ -1,29 +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_SO "ld.so.1"
7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBCRYPT_SO "libcrypt.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 LIBNSS_TEST1_SO "libnss_test1.so.2"
24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
25#define LIBPTHREAD_SO "libpthread.so.0"
26#define LIBRESOLV_SO "libresolv.so.2"
27#define LIBRT_SO "librt.so.1"
28#define LIBTHREAD_DB_SO "libthread_db.so.1"
29#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabi/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/sys/ptrace.h+7-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -36,6 +36,7 @@ __BEGIN_DECLS
3636# undef PTRACE_GETREGS
3737# undef PTRACE_GETREGS64
3838# undef PTRACE_GETREGSET
39# undef PTRACE_GET_RSEQ_CONFIGURATION
3940# undef PTRACE_GETSIGINFO
4041# undef PTRACE_GETSIGMASK
4142# undef PTRACE_GET_SYSCALL_INFO
......@@ -260,8 +261,12 @@ enum __ptrace_request
260261#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
261262
262263 /* Get information about system call. */
263 PTRACE_GET_SYSCALL_INFO = 0x420e
264 PTRACE_GET_SYSCALL_INFO = 0x420e,
264265#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
266
267 /* Get rseq configuration information. */
268 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
269#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
265270};
266271
267272
lib/libc/include/powerpc-linux-gnueabi/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabi/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/fcntl.h+7-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -33,6 +33,12 @@
3333# define __O_LARGEFILE 0200000
3434#endif
3535
36#if __WORDSIZE == 64
37# define F_GETLK 5
38# define F_SETLK 6
39# define F_SETLKW 7
40#endif
41
3642struct flock
3743 {
3844 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
lib/libc/include/powerpc-linux-gnueabihf/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -57,7 +57,7 @@
5757/* Defined to concatenate the literal suffix to be used with _Float128
5858 types, if __HAVE_FLOAT128 is 1. */
5959# if __HAVE_FLOAT128
60# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
60# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6161/* The literal suffix (f128) exist for powerpc only since GCC 7.0. */
6262# if __LDBL_MANT_DIG__ == 113
6363# define __f128(x) x##l
......@@ -71,10 +71,10 @@
7171
7272/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7373# if __HAVE_FLOAT128
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus && !__GNUC_PREREQ (13, 0)
7575typedef long double _Float128;
7676# define __CFLOAT128 _Complex long double
77# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus
77# elif !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7878/* The type _Float128 exist for powerpc only since GCC 7.0. */
7979typedef __float128 _Float128;
8080/* Add a typedef for older GCC and C++ compilers which don't natively support
lib/libc/include/powerpc-linux-gnueabihf/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/hwcap.h+1-1
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/ipc-perm.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/mman.h+12-14
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -26,21 +26,19 @@
2626#define PROT_SAO 0x10 /* Strong Access Ordering. */
2727
2828/* These are Linux-specific. */
29#ifdef __USE_MISC
30# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
31# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
32# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
33# define MAP_LOCKED 0x00080 /* Lock the mapping. */
34# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
35# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
36# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
37# define MAP_STACK 0x20000 /* Allocation is for a stack. */
38# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
29#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
30#define MAP_DENYWRITE 0x00800 /* ETXTBSY */
31#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
32#define MAP_LOCKED 0x00080 /* Lock the mapping. */
33#define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
34#define MAP_POPULATE 0x08000 /* 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
4039 faults for the mapping. */
41# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
40#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4241 underlying mapping. */
43#endif
4442
4543/* Flags for `mlockall'. */
4644#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
lib/libc/include/powerpc-linux-gnueabihf/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/rseq.h created+37
......@@ -0,0 +1,37 @@
1/* Restartable Sequences Linux powerpc architecture header.
2 Copyright (C) 2021-2023 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 following trap instruction:
32
33 powerpc-be: 0f e5 00 0b twui r5,11
34 powerpc64-le: 0b 00 e5 0f twui r5,11
35 powerpc64-be: 0f e5 00 0b twui r5,11 */
36
37#define RSEQ_SIG 0x0fe5000b
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabihf/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -32,7 +32,7 @@
3232
3333/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
3434 the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
35 correctly on 32 bit. It also insists that vecregs are only gauranteed
35 correctly on 32 bit. It also insists that vecregs are only guaranteed
3636 4 byte alignment so we need to use vperm in the setjmp/longjmp routines.
3737 We have to version the code because members like int __mask_was_saved
3838 in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
lib/libc/include/powerpc-linux-gnueabihf/bits/sigstack.h+6-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 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
......@@ -23,10 +23,15 @@
2323# error "Never include this file directly. Use <signal.h> instead"
2424#endif
2525
26#ifdef __powerpc64__
27#define MINSIGSTKSZ 8192
28#define SIGSTKSZ 32768
29#else
2630/* Minimum stack size for a signal handler. */
2731#define MINSIGSTKSZ 4096
2832
2933/* System default stack size. */
3034#define SIGSTKSZ 16384
35#endif
3136
3237#endif /* bits/sigstack.h */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabihf/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/powerpc-linux-gnueabihf/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-baud.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cflag.h+6-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 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
......@@ -32,4 +32,8 @@
3232#define PARODD 00020000
3333#define HUPCL 00040000
3434
35#define CLOCAL 00100000
\ No newline at end of file
35#define CLOCAL 00100000
36
37#ifdef __USE_MISC
38# define ADDRB 04000000000
39#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_iflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_oflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/termios-misc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/timesize.h created+22
......@@ -0,0 +1,22 @@
1/* Bit size of the time_t type at glibc build time, Linux/PowerPC.
2 Copyright (C) 2021-2023 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/powerpc-linux-gnueabihf/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. PowerPC version.
2 Copyright (C) 2002-2023 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-gnueabihf/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names-32.h deleted-29
......@@ -1,29 +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_SO "ld.so.1"
7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBCRYPT_SO "libcrypt.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 LIBNSS_TEST1_SO "libnss_test1.so.2"
24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
25#define LIBPTHREAD_SO "libpthread.so.0"
26#define LIBRESOLV_SO "libresolv.so.2"
27#define LIBRT_SO "librt.so.1"
28#define LIBTHREAD_DB_SO "libthread_db.so.1"
29#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/powerpc-linux-gnueabihf/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/sys/ptrace.h+7-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -36,6 +36,7 @@ __BEGIN_DECLS
3636# undef PTRACE_GETREGS
3737# undef PTRACE_GETREGS64
3838# undef PTRACE_GETREGSET
39# undef PTRACE_GET_RSEQ_CONFIGURATION
3940# undef PTRACE_GETSIGINFO
4041# undef PTRACE_GETSIGMASK
4142# undef PTRACE_GET_SYSCALL_INFO
......@@ -260,8 +261,12 @@ enum __ptrace_request
260261#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
261262
262263 /* Get information about system call. */
263 PTRACE_GET_SYSCALL_INFO = 0x420e
264 PTRACE_GET_SYSCALL_INFO = 0x420e,
264265#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
266
267 /* Get rseq configuration information. */
268 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
269#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
265270};
266271
267272
lib/libc/include/powerpc-linux-gnueabihf/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc-linux-gnueabihf/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/fcntl.h+7-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -33,6 +33,12 @@
3333# define __O_LARGEFILE 0200000
3434#endif
3535
36#if __WORDSIZE == 64
37# define F_GETLK 5
38# define F_SETLK 6
39# define F_SETLKW 7
40#endif
41
3642struct flock
3743 {
3844 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
lib/libc/include/powerpc64-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -57,7 +57,7 @@
5757/* Defined to concatenate the literal suffix to be used with _Float128
5858 types, if __HAVE_FLOAT128 is 1. */
5959# if __HAVE_FLOAT128
60# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
60# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6161/* The literal suffix (f128) exist for powerpc only since GCC 7.0. */
6262# if __LDBL_MANT_DIG__ == 113
6363# define __f128(x) x##l
......@@ -71,10 +71,10 @@
7171
7272/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7373# if __HAVE_FLOAT128
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus && !__GNUC_PREREQ (13, 0)
7575typedef long double _Float128;
7676# define __CFLOAT128 _Complex long double
77# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus
77# elif !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7878/* The type _Float128 exist for powerpc only since GCC 7.0. */
7979typedef __float128 _Float128;
8080/* Add a typedef for older GCC and C++ compilers which don't natively support
lib/libc/include/powerpc64-linux-gnu/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h+1-1
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/ipc-perm.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/mman.h+12-14
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -26,21 +26,19 @@
2626#define PROT_SAO 0x10 /* Strong Access Ordering. */
2727
2828/* These are Linux-specific. */
29#ifdef __USE_MISC
30# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
31# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
32# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
33# define MAP_LOCKED 0x00080 /* Lock the mapping. */
34# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
35# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
36# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
37# define MAP_STACK 0x20000 /* Allocation is for a stack. */
38# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
29#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
30#define MAP_DENYWRITE 0x00800 /* ETXTBSY */
31#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
32#define MAP_LOCKED 0x00080 /* Lock the mapping. */
33#define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
34#define MAP_POPULATE 0x08000 /* 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
4039 faults for the mapping. */
41# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
40#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4241 underlying mapping. */
43#endif
4442
4543/* Flags for `mlockall'. */
4644#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
lib/libc/include/powerpc64-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/rseq.h created+37
......@@ -0,0 +1,37 @@
1/* Restartable Sequences Linux powerpc architecture header.
2 Copyright (C) 2021-2023 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 following trap instruction:
32
33 powerpc-be: 0f e5 00 0b twui r5,11
34 powerpc64-le: 0b 00 e5 0f twui r5,11
35 powerpc64-be: 0f e5 00 0b twui r5,11 */
36
37#define RSEQ_SIG 0x0fe5000b
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -32,7 +32,7 @@
3232
3333/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
3434 the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
35 correctly on 32 bit. It also insists that vecregs are only gauranteed
35 correctly on 32 bit. It also insists that vecregs are only guaranteed
3636 4 byte alignment so we need to use vperm in the setjmp/longjmp routines.
3737 We have to version the code because members like int __mask_was_saved
3838 in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
lib/libc/include/powerpc64-linux-gnu/bits/sigstack.h+6-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 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
......@@ -23,10 +23,15 @@
2323# error "Never include this file directly. Use <signal.h> instead"
2424#endif
2525
26#ifdef __powerpc64__
27#define MINSIGSTKSZ 8192
28#define SIGSTKSZ 32768
29#else
2630/* Minimum stack size for a signal handler. */
2731#define MINSIGSTKSZ 4096
2832
2933/* System default stack size. */
3034#define SIGSTKSZ 16384
35#endif
3136
3237#endif /* bits/sigstack.h */
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/termios-baud.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h+6-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 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
......@@ -32,4 +32,8 @@
3232#define PARODD 00020000
3333#define HUPCL 00040000
3434
35#define CLOCAL 00100000
\ No newline at end of file
35#define CLOCAL 00100000
36
37#ifdef __USE_MISC
38# define ADDRB 04000000000
39#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/termios-misc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/timesize.h created+22
......@@ -0,0 +1,22 @@
1/* Bit size of the time_t type at glibc build time, Linux/PowerPC.
2 Copyright (C) 2021-2023 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/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. PowerPC version.
2 Copyright (C) 2002-2023 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/powerpc64-linux-gnu/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/powerpc64-linux-gnu/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h+7-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -36,6 +36,7 @@ __BEGIN_DECLS
3636# undef PTRACE_GETREGS
3737# undef PTRACE_GETREGS64
3838# undef PTRACE_GETREGSET
39# undef PTRACE_GET_RSEQ_CONFIGURATION
3940# undef PTRACE_GETSIGINFO
4041# undef PTRACE_GETSIGMASK
4142# undef PTRACE_GET_SYSCALL_INFO
......@@ -260,8 +261,12 @@ enum __ptrace_request
260261#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
261262
262263 /* Get information about system call. */
263 PTRACE_GET_SYSCALL_INFO = 0x420e
264 PTRACE_GET_SYSCALL_INFO = 0x420e,
264265#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
266
267 /* Get rseq configuration information. */
268 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
269#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
265270};
266271
267272
lib/libc/include/powerpc64-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/fcntl.h+7-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/PowerPC.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 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
......@@ -33,6 +33,12 @@
3333# define __O_LARGEFILE 0200000
3434#endif
3535
36#if __WORDSIZE == 64
37# define F_GETLK 5
38# define F_SETLK 6
39# define F_SETLKW 7
40#endif
41
3642struct flock
3743 {
3844 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
lib/libc/include/powerpc64le-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on powerpc.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -57,7 +57,7 @@
5757/* Defined to concatenate the literal suffix to be used with _Float128
5858 types, if __HAVE_FLOAT128 is 1. */
5959# if __HAVE_FLOAT128
60# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
60# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6161/* The literal suffix (f128) exist for powerpc only since GCC 7.0. */
6262# if __LDBL_MANT_DIG__ == 113
6363# define __f128(x) x##l
......@@ -71,10 +71,10 @@
7171
7272/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7373# if __HAVE_FLOAT128
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus
74# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus && !__GNUC_PREREQ (13, 0)
7575typedef long double _Float128;
7676# define __CFLOAT128 _Complex long double
77# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus
77# elif !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7878/* The type _Float128 exist for powerpc only since GCC 7.0. */
7979typedef __float128 _Float128;
8080/* Add a typedef for older GCC and C++ compilers which don't natively support
lib/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h+1-1
......@@ -1,5 +1,5 @@
11/* Define FP_FAST_* macros. PowerPC version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h+1-1
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP and AT_HWCAP2.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h+1-1
......@@ -1,5 +1,5 @@
11/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/ipc-perm.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ipc_perm definition. Linux/powerpc version.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-128ibm version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. PowerPC version
2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
2 Copyright (C) 2004-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/mman.h+12-14
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/PowerPC version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 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
......@@ -26,21 +26,19 @@
2626#define PROT_SAO 0x10 /* Strong Access Ordering. */
2727
2828/* These are Linux-specific. */
29#ifdef __USE_MISC
30# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
31# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
32# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
33# define MAP_LOCKED 0x00080 /* Lock the mapping. */
34# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
35# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
36# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
37# define MAP_STACK 0x20000 /* Allocation is for a stack. */
38# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
29#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
30#define MAP_DENYWRITE 0x00800 /* ETXTBSY */
31#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
32#define MAP_LOCKED 0x00080 /* Lock the mapping. */
33#define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
34#define MAP_POPULATE 0x08000 /* 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
4039 faults for the mapping. */
41# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
40#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
4241 underlying mapping. */
43#endif
4442
4543/* Flags for `mlockall'. */
4644#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
lib/libc/include/powerpc64le-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
2 Copyright (C) 2021-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/rseq.h created+37
......@@ -0,0 +1,37 @@
1/* Restartable Sequences Linux powerpc architecture header.
2 Copyright (C) 2021-2023 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 following trap instruction:
32
33 powerpc-be: 0f e5 00 0b twui r5,11
34 powerpc64-le: 0b 00 e5 0f twui r5,11
35 powerpc64-be: 0f e5 00 0b twui r5,11 */
36
37#define RSEQ_SIG 0x0fe5000b
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/setjmp.h+2-2
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -32,7 +32,7 @@
3232
3333/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
3434 the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
35 correctly on 32 bit. It also insists that vecregs are only gauranteed
35 correctly on 32 bit. It also insists that vecregs are only guaranteed
3636 4 byte alignment so we need to use vperm in the setjmp/longjmp routines.
3737 We have to version the code because members like int __mask_was_saved
3838 in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
lib/libc/include/powerpc64le-linux-gnu/bits/sigstack.h+6-1
......@@ -1,5 +1,5 @@
11/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 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
......@@ -23,10 +23,15 @@
2323# error "Never include this file directly. Use <signal.h> instead"
2424#endif
2525
26#ifdef __powerpc64__
27#define MINSIGSTKSZ 8192
28#define SIGSTKSZ 32768
29#else
2630/* Minimum stack size for a signal handler. */
2731#define MINSIGSTKSZ 4096
2832
2933/* System default stack size. */
3034#define SIGSTKSZ 16384
35#endif
3136
3237#endif /* bits/sigstack.h */
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h+1-1
......@@ -1,5 +1,5 @@
11/* Socket constants which vary among Linux architectures. Version for POWER.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud rate selection definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios c_cc symbolic constant definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h+6-2
......@@ -1,5 +1,5 @@
11/* termios control mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 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
......@@ -32,4 +32,8 @@
3232#define PARODD 00020000
3333#define HUPCL 00040000
3434
35#define CLOCAL 00100000
\ No newline at end of file
35#define CLOCAL 00100000
36
37#ifdef __USE_MISC
38# define ADDRB 04000000000
39#endif
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios input mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios local mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h+1-1
......@@ -1,5 +1,5 @@
11/* termios output mode definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h+1-1
......@@ -1,5 +1,5 @@
11/* termios baud platform specific definitions. Linux/powerpc version.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/timesize.h created+22
......@@ -0,0 +1,22 @@
1/* Bit size of the time_t type at glibc build time, Linux/PowerPC.
2 Copyright (C) 2021-2023 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/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* PowerPC implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* Linux/PowerPC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/bits/typesizes.h created+95
......@@ -0,0 +1,95 @@
1/* bits/typesizes.h -- underlying types for *_t. PowerPC version.
2 Copyright (C) 2002-2023 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/powerpc64le-linux-gnu/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word definitions. PowerPC version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/powerpc64le-linux-gnu/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h+7-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/PowerPC version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -36,6 +36,7 @@ __BEGIN_DECLS
3636# undef PTRACE_GETREGS
3737# undef PTRACE_GETREGS64
3838# undef PTRACE_GETREGSET
39# undef PTRACE_GET_RSEQ_CONFIGURATION
3940# undef PTRACE_GETSIGINFO
4041# undef PTRACE_GETSIGMASK
4142# undef PTRACE_GET_SYSCALL_INFO
......@@ -260,8 +261,12 @@ enum __ptrace_request
260261#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
261262
262263 /* Get information about system call. */
263 PTRACE_GET_SYSCALL_INFO = 0x420e
264 PTRACE_GET_SYSCALL_INFO = 0x420e,
264265#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
266
267 /* Get rseq configuration information. */
268 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
269#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
265270};
266271
267272
lib/libc/include/powerpc64le-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/powerpc64le-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2020-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux / RISC-V.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/riscv64-linux-gnu/bits/fenv.h+1-1
......@@ -1,5 +1,5 @@
11/* Floating point environment, RISC-V version.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
2 Copyright (C) 1998-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -55,7 +55,7 @@
5555/* Defined to concatenate the literal suffix to be used with _Float128
5656 types, if __HAVE_FLOAT128 is 1. */
5757# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
5959/* The literal suffix f128 exists only since GCC 7.0. */
6060# define __f128(x) x##l
6161# else
......@@ -65,7 +65,7 @@
6565
6666/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
6767# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6969# define __CFLOAT128 _Complex long double
7070# else
7171# define __CFLOAT128 _Complex _Float128
......@@ -76,7 +76,7 @@
7676# if __HAVE_FLOAT128
7777
7878/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8080typedef long double _Float128;
8181# endif
8282
lib/libc/include/riscv64-linux-gnu/bits/link.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific declarations for dynamic linker interface. RISC-V version.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-128 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. RISC-V version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-specific pthread type layouts. RISC-V version.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/rseq.h created+29
......@@ -0,0 +1,29 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2023 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/setjmp.h+1-1
......@@ -1,5 +1,5 @@
11/* Define the machine-dependent type `jmp_buf'. RISC-V version.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/sigcontext.h+1-1
......@@ -1,5 +1,5 @@
11/* Machine-dependent signal context structure for Linux. RISC-V version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc. This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
55 modify it under the terms of the GNU Lesser General Public
lib/libc/include/riscv64-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* RISC-V internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/riscv64-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/time64.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/time64.h -- underlying types for __time64_t. RISC-V version.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/bits/timesize.h+3-5
......@@ -1,5 +1,5 @@
1/* Bit size of the time_t type at glibc build time, RISC-V case.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
1/* Bit size of the time_t type at glibc build time, general case.
2 Copyright (C) 2018-2023 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
......@@ -16,7 +16,5 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19#include <bits/wordsize.h>
20
21/* RV32 and RV64 both use 64-bit time_t */
19/* Size in bits of the 'time_t' type of the default ABI. */
2220#define __TIMESIZE 64
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/typesizes.h+1-2
......@@ -1,7 +1,6 @@
11/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 Copyright (C) 2011-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/riscv64-linux-gnu/bits/wordsize.h+1-1
......@@ -1,5 +1,5 @@
11/* Determine the wordsize from the preprocessor defines. RISC-V version.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc.
2 Copyright (C) 2002-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/fpu_control.h+1-1
......@@ -1,5 +1,5 @@
11/* FPU control word bits. RISC-V version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64d.h deleted-30
......@@ -1,30 +0,0 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-lp64d.h> directly; include <gnu/lib-names.h> instead."
4#endif
5
6#define LD_LINUX_RISCV64_LP64D_SO "ld-linux-riscv64-lp64d.so.1"
7#define LD_SO "ld-linux-riscv64-lp64d.so.1"
8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"
15#define LIBMVEC_SO "libmvec.so.1"
16#define LIBM_SO "libm.so.6"
17#define LIBNSL_SO "libnsl.so.1"
18#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
19#define LIBNSS_DB_SO "libnss_db.so.2"
20#define LIBNSS_DNS_SO "libnss_dns.so.2"
21#define LIBNSS_FILES_SO "libnss_files.so.2"
22#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
23#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"
27#define LIBRESOLV_SO "libresolv.so.2"
28#define LIBRT_SO "librt.so.1"
29#define LIBTHREAD_DB_SO "libthread_db.so.1"
30#define LIBUTIL_SO "libutil.so.1"
lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64d.h deleted-24
......@@ -1,24 +0,0 @@
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_fedisableexcept
18#define __stub_feenableexcept
19#define __stub_fegetexcept
20#define __stub_gtty
21#define __stub_revoke
22#define __stub_setlogin
23#define __stub_sigreturn
24#define __stub_stty
lib/libc/include/riscv64-linux-gnu/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/sys/asm.h+1-1
......@@ -1,5 +1,5 @@
11/* Miscellaneous macros.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/sys/cachectl.h+1-1
......@@ -1,5 +1,5 @@
11/* RISC-V instruction cache flushing interface
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/riscv64-linux-gnu/sys/ucontext.h+1-1
......@@ -1,5 +1,5 @@
11/* struct ucontext definition, RISC-V version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/riscv64-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/elfclass.h+1-2
......@@ -1,5 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
32 This file is part of the GNU C Library.
43
54 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/fenv.h+1-2
......@@ -1,6 +1,5 @@
1/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Denis Joseph Barrow <djbarrow@de.ibm.com>.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
lib/libc/include/s390x-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -55,7 +55,7 @@
5555/* Defined to concatenate the literal suffix to be used with _Float128
5656 types, if __HAVE_FLOAT128 is 1. */
5757# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
58# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
5959/* The literal suffix f128 exists only since GCC 7.0. */
6060# define __f128(x) x##l
6161# else
......@@ -65,7 +65,7 @@
6565
6666/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
6767# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
68# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6969# define __CFLOAT128 _Complex long double
7070# else
7171# define __CFLOAT128 _Complex _Float128
......@@ -76,7 +76,7 @@
7676# if __HAVE_FLOAT128
7777
7878/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
79# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8080typedef long double _Float128;
8181# endif
8282
lib/libc/include/s390x-linux-gnu/bits/hwcap.h+9-2
......@@ -1,5 +1,5 @@
11/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 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
......@@ -22,6 +22,11 @@
2222
2323/*
2424 * The following must match the kernels asm/elf.h.
25 * Note: The kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e
26 * "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros
27 * from "HWCAP_S390_" to "HWCAP_". For compatibility reasons, we do not
28 * change the prefix in public glibc header file.
29 *
2530 * Note that these are *not* the same as the STORE FACILITY LIST bits.
2631 */
2732#define HWCAP_S390_ESAN3 1
......@@ -47,4 +52,6 @@
4752#define HWCAP_S390_SORT 131072
4853#define HWCAP_S390_DFLT 262144
4954#define HWCAP_S390_VXRS_PDE2 524288
50#define HWCAP_S390_NNPA 1048576
\ No newline at end of file
55#define HWCAP_S390_NNPA 1048576
56#define HWCAP_S390_PCI_MIO 2097152
57#define HWCAP_S390_SIE 4194304
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/link.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2005-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/procfs-extra.h+1-1
......@@ -1,5 +1,5 @@
11/* Extra sys/procfs.h definitions. S/390 version.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. S/390 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/s390x-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. S/390 version.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/rseq.h created+37
......@@ -0,0 +1,37 @@
1/* Restartable Sequences Linux s390 architecture header.
2 Copyright (C) 2021-2023 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 trap4 instruction. As Linux does not make use of the
32 access-register mode nor the linkage stack this instruction will always
33 cause a special-operation exception (the trap-enabled bit in the DUCT
34 is and will stay 0). The instruction pattern is
35 b2 ff 0f ff trap4 4095(%r0) */
36
37#define RSEQ_SIG 0xB2FF0FFF
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/sigaction.h+1-1
......@@ -1,5 +1,5 @@
11/* Definitions for 31 & 64 bit S/390 sigaction.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/statfs.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* S390 internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* S390 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/s390x-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/timesize.h created+22
......@@ -0,0 +1,22 @@
1/* Bit size of the time_t type at glibc build time, Linux/s390.
2 Copyright (C) 2021-2023 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/s390x-linux-gnu/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
2 Copyright (C) 2003-2021 Free Software Foundation, Inc.
2 Copyright (C) 2003-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/utmp.h+1-1
......@@ -1,5 +1,5 @@
11/* The `struct utmp' type, describing entries in the utmp file. GNU version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/bits/utmpx.h+1-1
......@@ -1,5 +1,5 @@
11/* Structures and definitions for the user accounting database. GNU version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 Copyright (C) 1997-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/fpu_control.h+3-5
......@@ -1,7 +1,5 @@
11/* FPU control word definitions. Stub version.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
3 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and
4 Martin Schwidefsky (schwidefsky@de.ibm.com).
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
53 This file is part of the GNU C Library.
64
75 The GNU C Library is free software; you can redistribute it and/or
......@@ -34,8 +32,8 @@
3432typedef unsigned int fpu_control_t;
3533
3634/* Macros for accessing the hardware control word. */
37#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0,0" : "=d" (cw))
38#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0,0" : : "d" (cw))
35#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0" : "=d" (cw))
36#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0" : : "d" (cw))
3937
4038/* Default control word set at startup. */
4139extern fpu_control_t __fpu_control;
lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/s390x-linux-gnu/ieee754.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/sys/ptrace.h+6-2
......@@ -1,6 +1,5 @@
11/* `ptrace' debugger support interface. Linux/S390 version.
2 Copyright (C) 2000-2021 Free Software Foundation, Inc.
3 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
2 Copyright (C) 2000-2023 Free Software Foundation, Inc.
43 This file is part of the GNU C Library.
54
65 The GNU C Library is free software; you can redistribute it and/or
......@@ -86,6 +85,7 @@ __BEGIN_DECLS
8685# undef PTRACE_SYSCALL_INFO_ENTRY
8786# undef PTRACE_SYSCALL_INFO_EXIT
8887# undef PTRACE_SYSCALL_INFO_SECCOMP
88# undef PTRACE_GET_RSEQ_CONFIGURATION
8989#endif
9090/* Type of the REQUEST argument to `ptrace.' */
9191enum __ptrace_request
......@@ -217,6 +217,10 @@ enum __ptrace_request
217217 PTRACE_GET_SYSCALL_INFO = 0x420e,
218218#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
219219
220 /* Get rseq configuration information. */
221 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f,
222#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
223
220224 PTRACE_PEEKUSR_AREA = 0x5000,
221225#define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA
222226
lib/libc/include/s390x-linux-gnu/sys/ucontext.h+1-2
......@@ -1,5 +1,4 @@
1/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
2 Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com).
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
32 This file is part of the GNU C Library.
43
54 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/s390x-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2000-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/sparc-linux-gnu/a.out.h deleted-174
......@@ -1,174 +0,0 @@
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 deleted-13
......@@ -1,13 +0,0 @@
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 deleted-16
......@@ -1,16 +0,0 @@
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 deleted-96
......@@ -1,96 +0,0 @@
1/* Copyright (C) 1999-2021 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 deleted-27
......@@ -1,27 +0,0 @@
1/* Copyright (C) 2002-2021 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 deleted-53
......@@ -1,53 +0,0 @@
1/* Error constants. Linux/Sparc specific version.
2 Copyright (C) 1996-2021 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 deleted-31
......@@ -1,31 +0,0 @@
1/* Copyright (C) 2007-2021 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 deleted-101
......@@ -1,101 +0,0 @@
1/* O_*, F_*, FD_* bit values for Linux/SPARC.
2 Copyright (C) 1995-2021 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 deleted-92
......@@ -1,92 +0,0 @@
1/* Copyright (C) 1997-2021 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_C2X)
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/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-2021 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
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
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
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/sparc-linux-gnu/bits/hwcap.h deleted-51
......@@ -1,51 +0,0 @@
1/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2011-2021 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 deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2005-2021 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 deleted-36
......@@ -1,36 +0,0 @@
1/* Copyright (C) 1996-2021 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 deleted-36
......@@ -1,36 +0,0 @@
1/* struct ipc_perm definition. Linux/sparc version.
2 Copyright (C) 1995-2021 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 deleted-99
......@@ -1,99 +0,0 @@
1/* Machine-specific audit interfaces for dynamic linker. SPARC version.
2 Copyright (C) 2005-2021 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 deleted-27
......@@ -1,27 +0,0 @@
1/* Properties of long double type. SPARC version.
2 Copyright (C) 2016-2021 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 deleted-57
......@@ -1,57 +0,0 @@
1/* Definitions for POSIX memory map interface. Linux/SPARC version.
2 Copyright (C) 1997-2021 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#ifdef __USE_MISC
29# define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */
30# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
32# define MAP_LOCKED 0x0100 /* Lock the mapping. */
33# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
34# define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */
35# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */
36# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
37# define MAP_STACK 0x20000 /* Allocation is for a stack. */
38# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
41# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
42 underlying mapping. */
43#endif
44
45/* Flags for `mlockall'. */
46#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
47#define MCL_FUTURE 0x4000 /* Lock all additions to address
48 space. */
49#define MCL_ONFAULT 0x8000 /* Lock all pages that are
50 faulted in. */
51/* Include generic Linux declarations. */
52#include <bits/mman-linux.h>
53
54/* Other flags. */
55#ifdef __USE_MISC
56# define MAP_RENAME MAP_ANONYMOUS
57#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/poll.h deleted-49
......@@ -1,49 +0,0 @@
1/* Copyright (C) 1997-2021 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 deleted-88
......@@ -1,88 +0,0 @@
1/* Extra sys/procfs.h definitions. SPARC version.
2 Copyright (C) 1996-2021 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 deleted-30
......@@ -1,30 +0,0 @@
1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version.
2 Copyright (C) 2018-2021 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 deleted-61
......@@ -1,61 +0,0 @@
1/* Types for registers for sys/procfs.h. SPARC version.
2 Copyright (C) 1996-2021 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 deleted-20
......@@ -1,20 +0,0 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
2 Copyright (C) 2021 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 deleted-238
......@@ -1,238 +0,0 @@
1/* Bit values & structures for resource limits. Linux/SPARC version.
2 Copyright (C) 1994-2021 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 deleted-67
......@@ -1,67 +0,0 @@
1/* Copyright (C) 1997-2021 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 deleted-29
......@@ -1,29 +0,0 @@
1/* Define SHMLBA. SPARC version.
2 Copyright (C) 2018-2021 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 deleted-89
......@@ -1,89 +0,0 @@
1/* The proper definitions for Linux/SPARC sigaction.
2 Copyright (C) 1996-2021 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 deleted-82
......@@ -1,82 +0,0 @@
1/* Copyright (C) 2000-2021 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 deleted-17
......@@ -1,17 +0,0 @@
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 deleted-12
......@@ -1,12 +0,0 @@
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 deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2007-2021 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 deleted-66
......@@ -1,66 +0,0 @@
1/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2021 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 deleted-32
......@@ -1,32 +0,0 @@
1/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 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 deleted-70
......@@ -1,70 +0,0 @@
1/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 2019-2021 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_TIME_BITS64
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 deleted-55
......@@ -1,55 +0,0 @@
1/* Define enum __socket_type for Linux/SPARC.
2 Copyright (C) 1991-2021 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 deleted-58
......@@ -1,58 +0,0 @@
1/* SPARC internal rwlock struct definitions.
2 Copyright (C) 2019-2021 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 deleted-131
......@@ -1,131 +0,0 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 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 __dev_t st_dev; /* Device. */
32#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
33 unsigned short int __pad1;
34 __ino_t st_ino; /* File serial number. */
35#else
36 __ino64_t st_ino; /* File serial number. */
37#endif
38 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */
40 __uid_t st_uid; /* User ID of the file's owner. */
41 __gid_t st_gid; /* Group ID of the file's group.*/
42 __dev_t st_rdev; /* Device number, if device. */
43 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET64
45 __off_t st_size; /* Size of file, in bytes. */
46#else
47 __off64_t st_size; /* Size of file, in bytes. */
48#endif
49 __blksize_t st_blksize; /* Optimal block size for I/O. */
50
51#ifndef __USE_FILE_OFFSET64
52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else
54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif
56#ifdef __USE_XOPEN2K8
57 /* Nanosecond resolution timestamps are stored in a format
58 equivalent to 'struct timespec'. This is the type used
59 whenever possible but the Unix namespace rules do not allow the
60 identifier 'timespec' to appear in the <sys/stat.h> header.
61 Therefore we have to handle the use of this header in strictly
62 standard-compliant sources special. */
63 struct timespec st_atim; /* Time of last access. */
64 struct timespec st_mtim; /* Time of last modification. */
65 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69#else
70 __time_t st_atime; /* Time of last access. */
71 unsigned long int st_atimensec; /* Nscecs of last access. */
72 __time_t st_mtime; /* Time of last modification. */
73 unsigned long int st_mtimensec; /* Nsecs of last modification. */
74 __time_t st_ctime; /* Time of last status change. */
75 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif
77 unsigned long int __glibc_reserved4;
78 unsigned long int __glibc_reserved5;
79 };
80
81#ifdef __USE_LARGEFILE64
82struct stat64
83 {
84 __dev_t st_dev; /* Device. */
85# if __WORDSIZE == 64
86 unsigned short int __pad1;
87# endif
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 unsigned short int __pad2;
95 __off64_t st_size; /* Size of file, in bytes. */
96 __blksize_t st_blksize; /* Optimal block size for I/O. */
97
98 __blkcnt64_t st_blocks; /* Number 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# define st_atime st_atim.tv_sec /* Backward compatibility. */
110# define st_mtime st_mtim.tv_sec
111# define st_ctime st_ctim.tv_sec
112# else
113 __time_t st_atime; /* Time of last access. */
114 unsigned long int st_atimensec; /* Nscecs of last access. */
115 __time_t st_mtime; /* Time of last modification. */
116 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117 __time_t st_ctime; /* Time of last status change. */
118 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif
120 unsigned long int __glibc_reserved4;
121 unsigned long int __glibc_reserved5;
122 };
123#endif
124
125/* Tell code we have these members. */
126#define _STATBUF_ST_BLKSIZE
127#define _STATBUF_ST_RDEV
128/* Nanosecond resolution time values are supported. */
129#define _STATBUF_ST_NSEC
130
131#endif /* _BITS_STRUCT_STAT_H */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/termios-baud.h deleted-46
......@@ -1,46 +0,0 @@
1/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019-2021 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 deleted-43
......@@ -1,43 +0,0 @@
1/* termios c_cc symbolic constant definitions. Linux/sparc version.
2 Copyright (C) 2019-2021 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 deleted-64
......@@ -1,64 +0,0 @@
1/* termios output mode definitions. Linux/sparc version.
2 Copyright (C) 2019-2021 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 deleted-34
......@@ -1,34 +0,0 @@
1/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019-2021 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 deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2008-2021 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/types/struct_msqid_ds.h deleted-53
......@@ -1,53 +0,0 @@
1/* Linux/SPARC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 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_TIME_BITS64
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 deleted-43
......@@ -1,43 +0,0 @@
1/* Sparc implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 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_TIME_BITS64
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 deleted-49
......@@ -1,49 +0,0 @@
1/* Linux/SPARC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 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_TIME_BITS64
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 deleted-95
......@@ -1,95 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2021 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 deleted-11
......@@ -1,11 +0,0 @@
1/* Determine the wordsize from the preprocessor defines. */
2
3#if defined __arch64__ || defined __sparcv9
4# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
6#else
7# define __WORDSIZE 32
8# define __WORDSIZE32_SIZE_ULONG 0
9# define __WORDSIZE32_PTRDIFF_LONG 0
10# define __WORDSIZE_TIME64_COMPAT32 0
11#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/fpu_control.h deleted-72
......@@ -1,72 +0,0 @@
1/* FPU control word bits. SPARC version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Miguel de Icaza
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 _FPU_CONTROL_H
21#define _FPU_CONTROL_H 1
22
23
24#include <features.h>
25#include <bits/wordsize.h>
26
27/* masking of interrupts */
28#define _FPU_MASK_IM 0x08000000
29#define _FPU_MASK_OM 0x04000000
30#define _FPU_MASK_UM 0x02000000
31#define _FPU_MASK_ZM 0x01000000
32#define _FPU_MASK_PM 0x00800000
33
34/* precision control */
35#define _FPU_EXTENDED 0x00000000 /* RECOMMENDED */
36#define _FPU_DOUBLE 0x20000000
37#define _FPU_80BIT 0x30000000
38#define _FPU_SINGLE 0x10000000 /* DO NOT USE */
39
40/* rounding control / Sparc */
41#define _FPU_RC_DOWN 0xc0000000
42#define _FPU_RC_UP 0x80000000
43#define _FPU_RC_ZERO 0x40000000
44#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
45
46#define _FPU_RESERVED 0x30300000 /* Reserved bits in cw */
47
48
49/* Now two recommended cw */
50
51/* Linux and IEEE default:
52 - extended precision
53 - rounding to nearest
54 - no exceptions */
55#define _FPU_DEFAULT 0x0
56#define _FPU_IEEE 0x0
57
58/* Type of the control word. */
59typedef unsigned long int fpu_control_t;
60
61#if __WORDSIZE == 64
62# define _FPU_GETCW(cw) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (*&cw))
63# define _FPU_SETCW(cw) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (*&cw))
64#else
65# define _FPU_GETCW(cw) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (*&cw))
66# define _FPU_SETCW(cw) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (*&cw))
67#endif
68
69/* Default control word set at startup. */
70extern fpu_control_t __fpu_control;
71
72#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h deleted-30
......@@ -1,30 +0,0 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-64.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 LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"
15#define LIBMVEC_SO "libmvec.so.1"
16#define LIBM_SO "libm.so.6"
17#define LIBNSL_SO "libnsl.so.1"
18#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
19#define LIBNSS_DB_SO "libnss_db.so.2"
20#define LIBNSS_DNS_SO "libnss_dns.so.2"
21#define LIBNSS_FILES_SO "libnss_files.so.2"
22#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
23#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"
27#define LIBRESOLV_SO "libresolv.so.2"
28#define LIBRT_SO "librt.so.1"
29#define LIBTHREAD_DB_SO "libthread_db.so.1"
30#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/lib-names.h deleted-16
......@@ -1,16 +0,0 @@
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 deleted-12
......@@ -1,12 +0,0 @@
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 deleted-170
......@@ -1,170 +0,0 @@
1/* Copyright (C) 1992-2021 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 deleted-233
......@@ -1,233 +0,0 @@
1/* `ptrace' debugger support interface. Linux/SPARC version.
2 Copyright (C) 1996-2021 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 polution, 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
228
229#include <bits/ptrace-shared.h>
230
231__END_DECLS
232
233#endif /* _SYS_PTRACE_H */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/sys/ucontext.h deleted-304
......@@ -1,304 +0,0 @@
1/* Copyright (C) 1998-2021 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 regiters 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 guarenteed 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 deleted-86
......@@ -1,86 +0,0 @@
1/* Copyright (C) 2003-2021 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/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/sparc64-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/sparc64-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/sparc64-linux-gnu/bits/environments.h created+96
......@@ -0,0 +1,96 @@
1/* Copyright (C) 1999-2023 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/sparc64-linux-gnu/bits/epoll.h created+27
......@@ -0,0 +1,27 @@
1/* Copyright (C) 2002-2023 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/sparc64-linux-gnu/bits/errno.h created+53
......@@ -0,0 +1,53 @@
1/* Error constants. Linux/Sparc specific version.
2 Copyright (C) 1996-2023 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/sparc64-linux-gnu/bits/eventfd.h created+31
......@@ -0,0 +1,31 @@
1/* Copyright (C) 2007-2023 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/sparc64-linux-gnu/bits/fcntl.h created+101
......@@ -0,0 +1,101 @@
1/* O_*, F_*, FD_* bit values for Linux/SPARC.
2 Copyright (C) 1995-2023 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/sparc64-linux-gnu/bits/fenv.h created+92
......@@ -0,0 +1,92 @@
1/* Copyright (C) 1997-2023 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_C2X)
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/sparc64-linux-gnu/bits/floatn.h created+97
......@@ -0,0 +1,97 @@
1/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
2 Copyright (C) 2017-2023 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/hwcap.h created+51
......@@ -0,0 +1,51 @@
1/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2011-2023 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/sparc64-linux-gnu/bits/inotify.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2005-2023 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/sparc64-linux-gnu/bits/ioctls.h created+36
......@@ -0,0 +1,36 @@
1/* Copyright (C) 1996-2023 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/sparc64-linux-gnu/bits/ipc-perm.h created+36
......@@ -0,0 +1,36 @@
1/* struct ipc_perm definition. Linux/sparc version.
2 Copyright (C) 1995-2023 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/sparc64-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-2023 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/sparc64-linux-gnu/bits/long-double.h created+27
......@@ -0,0 +1,27 @@
1/* Properties of long double type. SPARC version.
2 Copyright (C) 2016-2023 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/sparc64-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-2023 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/sparc64-linux-gnu/bits/poll.h created+49
......@@ -0,0 +1,49 @@
1/* Copyright (C) 1997-2023 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/sparc64-linux-gnu/bits/procfs-extra.h created+88
......@@ -0,0 +1,88 @@
1/* Extra sys/procfs.h definitions. SPARC version.
2 Copyright (C) 1996-2023 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/sparc64-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-2023 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/sparc64-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-2023 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/sparc64-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-2023 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/sparc64-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-2023 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/sparc64-linux-gnu/bits/rseq.h created+29
......@@ -0,0 +1,29 @@
1/* Restartable Sequences architecture header. Stub version.
2 Copyright (C) 2021-2023 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/setjmp.h created+67
......@@ -0,0 +1,67 @@
1/* Copyright (C) 1997-2023 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/sparc64-linux-gnu/bits/shmlba.h created+29
......@@ -0,0 +1,29 @@
1/* Define SHMLBA. SPARC version.
2 Copyright (C) 2018-2023 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/sparc64-linux-gnu/bits/sigaction.h created+89
......@@ -0,0 +1,89 @@
1/* The proper definitions for Linux/SPARC sigaction.
2 Copyright (C) 1996-2023 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/sparc64-linux-gnu/bits/sigcontext.h created+82
......@@ -0,0 +1,82 @@
1/* Copyright (C) 2000-2023 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/sparc64-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/sparc64-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/sparc64-linux-gnu/bits/signalfd.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2007-2023 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/sparc64-linux-gnu/bits/signum-arch.h created+66
......@@ -0,0 +1,66 @@
1/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2023 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/sparc64-linux-gnu/bits/sigstack.h created+32
......@@ -0,0 +1,32 @@
1/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2023 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/sparc64-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-2023 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_TIME_BITS64
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/sparc64-linux-gnu/bits/socket_type.h created+55
......@@ -0,0 +1,55 @@
1/* Define enum __socket_type for Linux/SPARC.
2 Copyright (C) 1991-2023 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/sparc64-linux-gnu/bits/struct_rwlock.h created+58
......@@ -0,0 +1,58 @@
1/* SPARC internal rwlock struct definitions.
2 Copyright (C) 2019-2023 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/sparc64-linux-gnu/bits/struct_stat.h created+139
......@@ -0,0 +1,139 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2023 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_TIME_BITS64
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_TIME_BITS64 */
83 };
84
85#ifdef __USE_LARGEFILE64
86struct stat64
87 {
88# ifdef __USE_TIME_BITS64
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_TIME_BITS64 */
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/sparc64-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-2023 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/sparc64-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-2023 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/sparc64-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-2023 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/sparc64-linux-gnu/bits/termios-struct.h created+34
......@@ -0,0 +1,34 @@
1/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019-2023 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/sparc64-linux-gnu/bits/timerfd.h created+29
......@@ -0,0 +1,29 @@
1/* Copyright (C) 2008-2023 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/sparc64-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-2023 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/sparc64-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-2023 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_TIME_BITS64
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/sparc64-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-2023 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_TIME_BITS64
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/sparc64-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-2023 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_TIME_BITS64
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/sparc64-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-2023 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/sparc64-linux-gnu/bits/wordsize.h created+11
......@@ -0,0 +1,11 @@
1/* Determine the wordsize from the preprocessor defines. */
2
3#if defined __arch64__ || defined __sparcv9
4# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
6#else
7# define __WORDSIZE 32
8# define __WORDSIZE32_SIZE_ULONG 0
9# define __WORDSIZE32_PTRDIFF_LONG 0
10# define __WORDSIZE_TIME64_COMPAT32 0
11#endif
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/fpu_control.h created+71
......@@ -0,0 +1,71 @@
1/* FPU control word bits. SPARC version.
2 Copyright (C) 1997-2023 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 0x30300000 /* 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# define _FPU_GETCW(cw) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (*&cw))
65# define _FPU_SETCW(cw) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (*&cw))
66#endif
67
68/* Default control word set at startup. */
69extern fpu_control_t __fpu_control;
70
71#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/gnu/lib-names-64.h created+28
......@@ -0,0 +1,28 @@
1/* This file is automatically generated. */
2#ifndef __GNU_LIB_NAMES_H
3# error "Never use <gnu/lib-names-64.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 LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"
15#define LIBMVEC_SO "libmvec.so.1"
16#define LIBM_SO "libm.so.6"
17#define LIBNSL_SO "libnsl.so.1"
18#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
19#define LIBNSS_DB_SO "libnss_db.so.2"
20#define LIBNSS_DNS_SO "libnss_dns.so.2"
21#define LIBNSS_FILES_SO "libnss_files.so.2"
22#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
23#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBPTHREAD_SO "libpthread.so.0"
25#define LIBRESOLV_SO "libresolv.so.2"
26#define LIBRT_SO "librt.so.1"
27#define LIBTHREAD_DB_SO "libthread_db.so.1"
28#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/sparc64-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/sparc64-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/sparc64-linux-gnu/ieee754.h created+170
......@@ -0,0 +1,170 @@
1/* Copyright (C) 1992-2023 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/sparc64-linux-gnu/sys/ptrace.h created+237
......@@ -0,0 +1,237 @@
1/* `ptrace' debugger support interface. Linux/SPARC version.
2 Copyright (C) 1996-2023 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
232
233#include <bits/ptrace-shared.h>
234
235__END_DECLS
236
237#endif /* _SYS_PTRACE_H */
\ No newline at end of file
lib/libc/include/sparc64-linux-gnu/sys/ucontext.h created+304
......@@ -0,0 +1,304 @@
1/* Copyright (C) 1998-2023 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/sparc64-linux-gnu/sys/user.h created+86
......@@ -0,0 +1,86 @@
1/* Copyright (C) 2003-2023 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/sparcv9-linux-gnu/a.out.h deleted-174
......@@ -1,174 +0,0 @@
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/sparcv9-linux-gnu/bits/a.out.h deleted-13
......@@ -1,13 +0,0 @@
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/sparcv9-linux-gnu/bits/endianness.h deleted-16
......@@ -1,16 +0,0 @@
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/sparcv9-linux-gnu/bits/environments.h deleted-96
......@@ -1,96 +0,0 @@
1/* Copyright (C) 1999-2021 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/sparcv9-linux-gnu/bits/epoll.h deleted-27
......@@ -1,27 +0,0 @@
1/* Copyright (C) 2002-2021 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/sparcv9-linux-gnu/bits/errno.h deleted-53
......@@ -1,53 +0,0 @@
1/* Error constants. Linux/Sparc specific version.
2 Copyright (C) 1996-2021 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/sparcv9-linux-gnu/bits/eventfd.h deleted-31
......@@ -1,31 +0,0 @@
1/* Copyright (C) 2007-2021 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/sparcv9-linux-gnu/bits/fcntl.h deleted-101
......@@ -1,101 +0,0 @@
1/* O_*, F_*, FD_* bit values for Linux/SPARC.
2 Copyright (C) 1995-2021 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/sparcv9-linux-gnu/bits/fenv.h deleted-92
......@@ -1,92 +0,0 @@
1/* Copyright (C) 1997-2021 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_C2X)
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/sparcv9-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-2021 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
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
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
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/sparcv9-linux-gnu/bits/hwcap.h deleted-51
......@@ -1,51 +0,0 @@
1/* Defines for bits in AT_HWCAP.
2 Copyright (C) 2011-2021 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/sparcv9-linux-gnu/bits/inotify.h deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2005-2021 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/sparcv9-linux-gnu/bits/ioctls.h deleted-36
......@@ -1,36 +0,0 @@
1/* Copyright (C) 1996-2021 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/sparcv9-linux-gnu/bits/ipc-perm.h deleted-36
......@@ -1,36 +0,0 @@
1/* struct ipc_perm definition. Linux/sparc version.
2 Copyright (C) 1995-2021 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/sparcv9-linux-gnu/bits/link.h deleted-99
......@@ -1,99 +0,0 @@
1/* Machine-specific audit interfaces for dynamic linker. SPARC version.
2 Copyright (C) 2005-2021 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/sparcv9-linux-gnu/bits/long-double.h deleted-27
......@@ -1,27 +0,0 @@
1/* Properties of long double type. SPARC version.
2 Copyright (C) 2016-2021 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/sparcv9-linux-gnu/bits/mman.h deleted-57
......@@ -1,57 +0,0 @@
1/* Definitions for POSIX memory map interface. Linux/SPARC version.
2 Copyright (C) 1997-2021 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#ifdef __USE_MISC
29# define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */
30# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
31# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
32# define MAP_LOCKED 0x0100 /* Lock the mapping. */
33# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
34# define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */
35# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */
36# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
37# define MAP_STACK 0x20000 /* Allocation is for a stack. */
38# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
39# define MAP_SYNC 0x80000 /* Perform synchronous page
40 faults for the mapping. */
41# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
42 underlying mapping. */
43#endif
44
45/* Flags for `mlockall'. */
46#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
47#define MCL_FUTURE 0x4000 /* Lock all additions to address
48 space. */
49#define MCL_ONFAULT 0x8000 /* Lock all pages that are
50 faulted in. */
51/* Include generic Linux declarations. */
52#include <bits/mman-linux.h>
53
54/* Other flags. */
55#ifdef __USE_MISC
56# define MAP_RENAME MAP_ANONYMOUS
57#endif
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/poll.h deleted-49
......@@ -1,49 +0,0 @@
1/* Copyright (C) 1997-2021 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/sparcv9-linux-gnu/bits/procfs-extra.h deleted-88
......@@ -1,88 +0,0 @@
1/* Extra sys/procfs.h definitions. SPARC version.
2 Copyright (C) 1996-2021 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/sparcv9-linux-gnu/bits/procfs-id.h deleted-30
......@@ -1,30 +0,0 @@
1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version.
2 Copyright (C) 2018-2021 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/sparcv9-linux-gnu/bits/procfs.h deleted-61
......@@ -1,61 +0,0 @@
1/* Types for registers for sys/procfs.h. SPARC version.
2 Copyright (C) 1996-2021 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/sparcv9-linux-gnu/bits/pthread_stack_min.h deleted-20
......@@ -1,20 +0,0 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
2 Copyright (C) 2021 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/sparcv9-linux-gnu/bits/resource.h deleted-238
......@@ -1,238 +0,0 @@
1/* Bit values & structures for resource limits. Linux/SPARC version.
2 Copyright (C) 1994-2021 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/sparcv9-linux-gnu/bits/setjmp.h deleted-67
......@@ -1,67 +0,0 @@
1/* Copyright (C) 1997-2021 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/sparcv9-linux-gnu/bits/shmlba.h deleted-29
......@@ -1,29 +0,0 @@
1/* Define SHMLBA. SPARC version.
2 Copyright (C) 2018-2021 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/sparcv9-linux-gnu/bits/sigaction.h deleted-89
......@@ -1,89 +0,0 @@
1/* The proper definitions for Linux/SPARC sigaction.
2 Copyright (C) 1996-2021 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/sparcv9-linux-gnu/bits/sigcontext.h deleted-82
......@@ -1,82 +0,0 @@
1/* Copyright (C) 2000-2021 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/sparcv9-linux-gnu/bits/siginfo-arch.h deleted-17
......@@ -1,17 +0,0 @@
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/sparcv9-linux-gnu/bits/siginfo-consts-arch.h deleted-12
......@@ -1,12 +0,0 @@
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/sparcv9-linux-gnu/bits/signalfd.h deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2007-2021 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/sparcv9-linux-gnu/bits/signum-arch.h deleted-66
......@@ -1,66 +0,0 @@
1/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2021 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/sparcv9-linux-gnu/bits/sigstack.h deleted-32
......@@ -1,32 +0,0 @@
1/* sigstack, sigaltstack definitions.
2 Copyright (C) 1998-2021 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/sparcv9-linux-gnu/bits/socket-constants.h deleted-70
......@@ -1,70 +0,0 @@
1/* Socket constants which vary among Linux architectures. Version for SPARC.
2 Copyright (C) 2019-2021 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_TIME_BITS64
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/sparcv9-linux-gnu/bits/socket_type.h deleted-55
......@@ -1,55 +0,0 @@
1/* Define enum __socket_type for Linux/SPARC.
2 Copyright (C) 1991-2021 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/sparcv9-linux-gnu/bits/struct_rwlock.h deleted-58
......@@ -1,58 +0,0 @@
1/* SPARC internal rwlock struct definitions.
2 Copyright (C) 2019-2021 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/sparcv9-linux-gnu/bits/struct_stat.h deleted-131
......@@ -1,131 +0,0 @@
1/* Definition for struct stat.
2 Copyright (C) 2020-2021 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 __dev_t st_dev; /* Device. */
32#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
33 unsigned short int __pad1;
34 __ino_t st_ino; /* File serial number. */
35#else
36 __ino64_t st_ino; /* File serial number. */
37#endif
38 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */
40 __uid_t st_uid; /* User ID of the file's owner. */
41 __gid_t st_gid; /* Group ID of the file's group.*/
42 __dev_t st_rdev; /* Device number, if device. */
43 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET64
45 __off_t st_size; /* Size of file, in bytes. */
46#else
47 __off64_t st_size; /* Size of file, in bytes. */
48#endif
49 __blksize_t st_blksize; /* Optimal block size for I/O. */
50
51#ifndef __USE_FILE_OFFSET64
52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else
54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif
56#ifdef __USE_XOPEN2K8
57 /* Nanosecond resolution timestamps are stored in a format
58 equivalent to 'struct timespec'. This is the type used
59 whenever possible but the Unix namespace rules do not allow the
60 identifier 'timespec' to appear in the <sys/stat.h> header.
61 Therefore we have to handle the use of this header in strictly
62 standard-compliant sources special. */
63 struct timespec st_atim; /* Time of last access. */
64 struct timespec st_mtim; /* Time of last modification. */
65 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69#else
70 __time_t st_atime; /* Time of last access. */
71 unsigned long int st_atimensec; /* Nscecs of last access. */
72 __time_t st_mtime; /* Time of last modification. */
73 unsigned long int st_mtimensec; /* Nsecs of last modification. */
74 __time_t st_ctime; /* Time of last status change. */
75 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif
77 unsigned long int __glibc_reserved4;
78 unsigned long int __glibc_reserved5;
79 };
80
81#ifdef __USE_LARGEFILE64
82struct stat64
83 {
84 __dev_t st_dev; /* Device. */
85# if __WORDSIZE == 64
86 unsigned short int __pad1;
87# endif
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 unsigned short int __pad2;
95 __off64_t st_size; /* Size of file, in bytes. */
96 __blksize_t st_blksize; /* Optimal block size for I/O. */
97
98 __blkcnt64_t st_blocks; /* Number 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# define st_atime st_atim.tv_sec /* Backward compatibility. */
110# define st_mtime st_mtim.tv_sec
111# define st_ctime st_ctim.tv_sec
112# else
113 __time_t st_atime; /* Time of last access. */
114 unsigned long int st_atimensec; /* Nscecs of last access. */
115 __time_t st_mtime; /* Time of last modification. */
116 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117 __time_t st_ctime; /* Time of last status change. */
118 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif
120 unsigned long int __glibc_reserved4;
121 unsigned long int __glibc_reserved5;
122 };
123#endif
124
125/* Tell code we have these members. */
126#define _STATBUF_ST_BLKSIZE
127#define _STATBUF_ST_RDEV
128/* Nanosecond resolution time values are supported. */
129#define _STATBUF_ST_NSEC
130
131#endif /* _BITS_STRUCT_STAT_H */
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/termios-baud.h deleted-46
......@@ -1,46 +0,0 @@
1/* termios baud rate selection definitions. Linux/sparc version.
2 Copyright (C) 2019-2021 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/sparcv9-linux-gnu/bits/termios-c_cc.h deleted-43
......@@ -1,43 +0,0 @@
1/* termios c_cc symbolic constant definitions. Linux/sparc version.
2 Copyright (C) 2019-2021 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/sparcv9-linux-gnu/bits/termios-c_oflag.h deleted-64
......@@ -1,64 +0,0 @@
1/* termios output mode definitions. Linux/sparc version.
2 Copyright (C) 2019-2021 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/sparcv9-linux-gnu/bits/termios-struct.h deleted-34
......@@ -1,34 +0,0 @@
1/* struct termios definition. Linux/sparc version.
2 Copyright (C) 2019-2021 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/sparcv9-linux-gnu/bits/timerfd.h deleted-29
......@@ -1,29 +0,0 @@
1/* Copyright (C) 2008-2021 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/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h deleted-53
......@@ -1,53 +0,0 @@
1/* Linux/SPARC implementation of the SysV message struct msqid_ds.
2 Copyright (C) 2020-2021 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_TIME_BITS64
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/sparcv9-linux-gnu/bits/types/struct_semid_ds.h deleted-43
......@@ -1,43 +0,0 @@
1/* Sparc implementation of the semaphore struct semid_ds
2 Copyright (C) 1995-2021 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_TIME_BITS64
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/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h deleted-49
......@@ -1,49 +0,0 @@
1/* Linux/SPARC implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 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_TIME_BITS64
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/sparcv9-linux-gnu/bits/typesizes.h deleted-95
......@@ -1,95 +0,0 @@
1/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version.
2 Copyright (C) 2002-2021 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/sparcv9-linux-gnu/bits/wordsize.h deleted-11
......@@ -1,11 +0,0 @@
1/* Determine the wordsize from the preprocessor defines. */
2
3#if defined __arch64__ || defined __sparcv9
4# define __WORDSIZE 64
5# define __WORDSIZE_TIME64_COMPAT32 1
6#else
7# define __WORDSIZE 32
8# define __WORDSIZE32_SIZE_ULONG 0
9# define __WORDSIZE32_PTRDIFF_LONG 0
10# define __WORDSIZE_TIME64_COMPAT32 0
11#endif
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/fpu_control.h deleted-72
......@@ -1,72 +0,0 @@
1/* FPU control word bits. SPARC version.
2 Copyright (C) 1997-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Miguel de Icaza
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 _FPU_CONTROL_H
21#define _FPU_CONTROL_H 1
22
23
24#include <features.h>
25#include <bits/wordsize.h>
26
27/* masking of interrupts */
28#define _FPU_MASK_IM 0x08000000
29#define _FPU_MASK_OM 0x04000000
30#define _FPU_MASK_UM 0x02000000
31#define _FPU_MASK_ZM 0x01000000
32#define _FPU_MASK_PM 0x00800000
33
34/* precision control */
35#define _FPU_EXTENDED 0x00000000 /* RECOMMENDED */
36#define _FPU_DOUBLE 0x20000000
37#define _FPU_80BIT 0x30000000
38#define _FPU_SINGLE 0x10000000 /* DO NOT USE */
39
40/* rounding control / Sparc */
41#define _FPU_RC_DOWN 0xc0000000
42#define _FPU_RC_UP 0x80000000
43#define _FPU_RC_ZERO 0x40000000
44#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
45
46#define _FPU_RESERVED 0x30300000 /* Reserved bits in cw */
47
48
49/* Now two recommended cw */
50
51/* Linux and IEEE default:
52 - extended precision
53 - rounding to nearest
54 - no exceptions */
55#define _FPU_DEFAULT 0x0
56#define _FPU_IEEE 0x0
57
58/* Type of the control word. */
59typedef unsigned long int fpu_control_t;
60
61#if __WORDSIZE == 64
62# define _FPU_GETCW(cw) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (*&cw))
63# define _FPU_SETCW(cw) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (*&cw))
64#else
65# define _FPU_GETCW(cw) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (*&cw))
66# define _FPU_SETCW(cw) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (*&cw))
67#endif
68
69/* Default control word set at startup. */
70extern fpu_control_t __fpu_control;
71
72#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/gnu/lib-names.h deleted-16
......@@ -1,16 +0,0 @@
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/sparcv9-linux-gnu/gnu/stubs.h deleted-12
......@@ -1,12 +0,0 @@
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/sparcv9-linux-gnu/ieee754.h deleted-170
......@@ -1,170 +0,0 @@
1/* Copyright (C) 1992-2021 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/sparcv9-linux-gnu/sys/ptrace.h deleted-233
......@@ -1,233 +0,0 @@
1/* `ptrace' debugger support interface. Linux/SPARC version.
2 Copyright (C) 1996-2021 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 polution, 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
228
229#include <bits/ptrace-shared.h>
230
231__END_DECLS
232
233#endif /* _SYS_PTRACE_H */
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/sys/ucontext.h deleted-304
......@@ -1,304 +0,0 @@
1/* Copyright (C) 1998-2021 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 regiters 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 guarenteed 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/sparcv9-linux-gnu/sys/user.h deleted-86
......@@ -1,86 +0,0 @@
1/* Copyright (C) 2003-2021 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/x86-linux-gnu/bits/dl_find_object.h created+29
......@@ -0,0 +1,29 @@
1/* x86 definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#ifdef __x86_64__
24# define DLFO_STRUCT_HAS_EH_DBASE 0
25#else
26# define DLFO_STRUCT_HAS_EH_DBASE 1
27#endif
28#define DLFO_STRUCT_HAS_EH_COUNT 0
29#define DLFO_EH_SEGMENT_TYPE PT_GNU_EH_FRAME
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/epoll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -58,7 +58,7 @@
5858/* Defined to concatenate the literal suffix to be used with _Float128
5959 types, if __HAVE_FLOAT128 is 1. */
6060# if __HAVE_FLOAT128
61# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
61# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6262/* The literal suffix f128 exists only since GCC 7.0. */
6363# define __f128(x) x##q
6464# else
......@@ -68,7 +68,7 @@
6868
6969/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7070# if __HAVE_FLOAT128
71# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
71# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7272/* Add a typedef for older GCC compilers which don't natively support
7373 _Complex _Float128. */
7474typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
......@@ -82,7 +82,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
8282# if __HAVE_FLOAT128
8383
8484/* The type _Float128 exists only since GCC 7.0. */
85# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
85# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8686typedef __float128 _Float128;
8787# endif
8888
lib/libc/include/x86-linux-gnu/bits/flt-eval-method.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/fp-logb.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/indirect-return.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/link.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -38,8 +38,8 @@ typedef struct La_i86_retval
3838 uint32_t lrv_edx;
3939 long double lrv_st0;
4040 long double lrv_st1;
41 uint64_t lrv_bnd0;
42 uint64_t lrv_bnd1;
41 uint64_t __glibc_unused1;
42 uint64_t __glibc_unused2;
4343} La_i86_retval;
4444
4545
......@@ -96,7 +96,7 @@ typedef struct La_x86_64_regs
9696 La_x86_64_xmm lr_xmm[8];
9797 La_x86_64_vector lr_vector[8];
9898#ifndef __ILP32__
99 __int128_t lr_bnd[4];
99 __int128_t __glibc_unused1[4];
100100#endif
101101} La_x86_64_regs;
102102
......@@ -112,8 +112,8 @@ typedef struct La_x86_64_retval
112112 La_x86_64_vector lrv_vector0;
113113 La_x86_64_vector lrv_vector1;
114114#ifndef __ILP32__
115 __int128_t lrv_bnd0;
116 __int128_t lrv_bnd1;
115 __int128_t __glibc_unused1;
116 __int128_t __glibc_unused2;
117117#endif
118118} La_x86_64_retval;
119119
lib/libc/include/x86-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/math-vector.h+85-1
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 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
......@@ -58,6 +58,90 @@
5858# define __DECL_SIMD_pow __DECL_SIMD_x86_64
5959# undef __DECL_SIMD_powf
6060# define __DECL_SIMD_powf __DECL_SIMD_x86_64
61# undef __DECL_SIMD_acos
62# define __DECL_SIMD_acos __DECL_SIMD_x86_64
63# undef __DECL_SIMD_acosf
64# define __DECL_SIMD_acosf __DECL_SIMD_x86_64
65# undef __DECL_SIMD_atan
66# define __DECL_SIMD_atan __DECL_SIMD_x86_64
67# undef __DECL_SIMD_atanf
68# define __DECL_SIMD_atanf __DECL_SIMD_x86_64
69# undef __DECL_SIMD_asin
70# define __DECL_SIMD_asin __DECL_SIMD_x86_64
71# undef __DECL_SIMD_asinf
72# define __DECL_SIMD_asinf __DECL_SIMD_x86_64
73# undef __DECL_SIMD_hypot
74# define __DECL_SIMD_hypot __DECL_SIMD_x86_64
75# undef __DECL_SIMD_hypotf
76# define __DECL_SIMD_hypotf __DECL_SIMD_x86_64
77# undef __DECL_SIMD_exp2
78# define __DECL_SIMD_exp2 __DECL_SIMD_x86_64
79# undef __DECL_SIMD_exp2f
80# define __DECL_SIMD_exp2f __DECL_SIMD_x86_64
81# undef __DECL_SIMD_exp10
82# define __DECL_SIMD_exp10 __DECL_SIMD_x86_64
83# undef __DECL_SIMD_exp10f
84# define __DECL_SIMD_exp10f __DECL_SIMD_x86_64
85# undef __DECL_SIMD_cosh
86# define __DECL_SIMD_cosh __DECL_SIMD_x86_64
87# undef __DECL_SIMD_coshf
88# define __DECL_SIMD_coshf __DECL_SIMD_x86_64
89# undef __DECL_SIMD_expm1
90# define __DECL_SIMD_expm1 __DECL_SIMD_x86_64
91# undef __DECL_SIMD_expm1f
92# define __DECL_SIMD_expm1f __DECL_SIMD_x86_64
93# undef __DECL_SIMD_sinh
94# define __DECL_SIMD_sinh __DECL_SIMD_x86_64
95# undef __DECL_SIMD_sinhf
96# define __DECL_SIMD_sinhf __DECL_SIMD_x86_64
97# undef __DECL_SIMD_cbrt
98# define __DECL_SIMD_cbrt __DECL_SIMD_x86_64
99# undef __DECL_SIMD_cbrtf
100# define __DECL_SIMD_cbrtf __DECL_SIMD_x86_64
101# undef __DECL_SIMD_atan2
102# define __DECL_SIMD_atan2 __DECL_SIMD_x86_64
103# undef __DECL_SIMD_atan2f
104# define __DECL_SIMD_atan2f __DECL_SIMD_x86_64
105# undef __DECL_SIMD_log10
106# define __DECL_SIMD_log10 __DECL_SIMD_x86_64
107# undef __DECL_SIMD_log10f
108# define __DECL_SIMD_log10f __DECL_SIMD_x86_64
109# undef __DECL_SIMD_log2
110# define __DECL_SIMD_log2 __DECL_SIMD_x86_64
111# undef __DECL_SIMD_log2f
112# define __DECL_SIMD_log2f __DECL_SIMD_x86_64
113# undef __DECL_SIMD_log1p
114# define __DECL_SIMD_log1p __DECL_SIMD_x86_64
115# undef __DECL_SIMD_log1pf
116# define __DECL_SIMD_log1pf __DECL_SIMD_x86_64
117# undef __DECL_SIMD_atanh
118# define __DECL_SIMD_atanh __DECL_SIMD_x86_64
119# undef __DECL_SIMD_atanhf
120# define __DECL_SIMD_atanhf __DECL_SIMD_x86_64
121# undef __DECL_SIMD_acosh
122# define __DECL_SIMD_acosh __DECL_SIMD_x86_64
123# undef __DECL_SIMD_acoshf
124# define __DECL_SIMD_acoshf __DECL_SIMD_x86_64
125# undef __DECL_SIMD_erf
126# define __DECL_SIMD_erf __DECL_SIMD_x86_64
127# undef __DECL_SIMD_erff
128# define __DECL_SIMD_erff __DECL_SIMD_x86_64
129# undef __DECL_SIMD_tanh
130# define __DECL_SIMD_tanh __DECL_SIMD_x86_64
131# undef __DECL_SIMD_tanhf
132# define __DECL_SIMD_tanhf __DECL_SIMD_x86_64
133# undef __DECL_SIMD_asinh
134# define __DECL_SIMD_asinh __DECL_SIMD_x86_64
135# undef __DECL_SIMD_asinhf
136# define __DECL_SIMD_asinhf __DECL_SIMD_x86_64
137# undef __DECL_SIMD_erfc
138# define __DECL_SIMD_erfc __DECL_SIMD_x86_64
139# undef __DECL_SIMD_erfcf
140# define __DECL_SIMD_erfcf __DECL_SIMD_x86_64
141# undef __DECL_SIMD_tan
142# define __DECL_SIMD_tan __DECL_SIMD_x86_64
143# undef __DECL_SIMD_tanf
144# define __DECL_SIMD_tanf __DECL_SIMD_x86_64
61145
62146# endif
63147#endif
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/mman.h+2-4
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -24,9 +24,7 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* Other flags. */
27#ifdef __USE_MISC
28# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
29#endif
27#define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
3028
3129#include <bits/mman-map-flags-generic.h>
3230
lib/libc/include/x86-linux-gnu/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/x86-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/rseq.h created+30
......@@ -0,0 +1,30 @@
1/* Restartable Sequences Linux x86 architecture header.
2 Copyright (C) 2021-2023 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 RSEQ_SIG is used with the following reserved undefined instructions, which
25 trap in user-space:
26
27 x86-32: 0f b9 3d 53 30 05 53 ud1 0x53053053,%edi
28 x86-64: 0f b9 3d 53 30 05 53 ud1 0x53053053(%rip),%edi */
29
30#define RSEQ_SIG 0x53053053
\ No newline at end of file
lib/libc/include/x86-linux-gnu/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/x86-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/timesize.h+3-1
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 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
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19#include <bits/wordsize.h>
20
1921#if defined __x86_64__ && defined __ILP32__
2022/* For x32, time is 64-bit even though word size is 32-bit. */
2123# define __TIMESIZE 64
lib/libc/include/x86-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/finclude/math-vector-fortran.h+86-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019-2021 Free Software Foundation, Inc.
2! Copyright (C) 2019-2023 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
......@@ -28,6 +28,48 @@
2828!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
2929!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
3030!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31!GCC$ builtin (acos) attributes simd (notinbranch) if('x86_64')
32!GCC$ builtin (acosf) attributes simd (notinbranch) if('x86_64')
33!GCC$ builtin (atan) attributes simd (notinbranch) if('x86_64')
34!GCC$ builtin (atanf) attributes simd (notinbranch) if('x86_64')
35!GCC$ builtin (asin) attributes simd (notinbranch) if('x86_64')
36!GCC$ builtin (asinf) attributes simd (notinbranch) if('x86_64')
37!GCC$ builtin (hypot) attributes simd (notinbranch) if('x86_64')
38!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x86_64')
39!GCC$ builtin (exp2) attributes simd (notinbranch) if('x86_64')
40!GCC$ builtin (exp2f) attributes simd (notinbranch) if('x86_64')
41!GCC$ builtin (exp10) attributes simd (notinbranch) if('x86_64')
42!GCC$ builtin (exp10f) attributes simd (notinbranch) if('x86_64')
43!GCC$ builtin (cosh) attributes simd (notinbranch) if('x86_64')
44!GCC$ builtin (coshf) attributes simd (notinbranch) if('x86_64')
45!GCC$ builtin (expm1) attributes simd (notinbranch) if('x86_64')
46!GCC$ builtin (expm1f) attributes simd (notinbranch) if('x86_64')
47!GCC$ builtin (sinh) attributes simd (notinbranch) if('x86_64')
48!GCC$ builtin (sinhf) attributes simd (notinbranch) if('x86_64')
49!GCC$ builtin (cbrt) attributes simd (notinbranch) if('x86_64')
50!GCC$ builtin (cbrtf) attributes simd (notinbranch) if('x86_64')
51!GCC$ builtin (atan2) attributes simd (notinbranch) if('x86_64')
52!GCC$ builtin (atan2f) attributes simd (notinbranch) if('x86_64')
53!GCC$ builtin (log10) attributes simd (notinbranch) if('x86_64')
54!GCC$ builtin (log10f) attributes simd (notinbranch) if('x86_64')
55!GCC$ builtin (log2) attributes simd (notinbranch) if('x86_64')
56!GCC$ builtin (log2f) attributes simd (notinbranch) if('x86_64')
57!GCC$ builtin (log1p) attributes simd (notinbranch) if('x86_64')
58!GCC$ builtin (log1pf) attributes simd (notinbranch) if('x86_64')
59!GCC$ builtin (atanh) attributes simd (notinbranch) if('x86_64')
60!GCC$ builtin (atanhf) attributes simd (notinbranch) if('x86_64')
61!GCC$ builtin (acosh) attributes simd (notinbranch) if('x86_64')
62!GCC$ builtin (acoshf) attributes simd (notinbranch) if('x86_64')
63!GCC$ builtin (erf) attributes simd (notinbranch) if('x86_64')
64!GCC$ builtin (erff) attributes simd (notinbranch) if('x86_64')
65!GCC$ builtin (tanh) attributes simd (notinbranch) if('x86_64')
66!GCC$ builtin (tanhf) attributes simd (notinbranch) if('x86_64')
67!GCC$ builtin (asinh) attributes simd (notinbranch) if('x86_64')
68!GCC$ builtin (asinhf) attributes simd (notinbranch) if('x86_64')
69!GCC$ builtin (erfc) attributes simd (notinbranch) if('x86_64')
70!GCC$ builtin (erfcf) attributes simd (notinbranch) if('x86_64')
71!GCC$ builtin (tan) attributes simd (notinbranch) if('x86_64')
72!GCC$ builtin (tanf) attributes simd (notinbranch) if('x86_64')
3173
3274!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
3375!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
......@@ -40,4 +82,46 @@
4082!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
4183!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
4284!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
85!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
86!GCC$ builtin (acos) attributes simd (notinbranch) if('x32')
87!GCC$ builtin (acosf) attributes simd (notinbranch) if('x32')
88!GCC$ builtin (atan) attributes simd (notinbranch) if('x32')
89!GCC$ builtin (atanf) attributes simd (notinbranch) if('x32')
90!GCC$ builtin (asin) attributes simd (notinbranch) if('x32')
91!GCC$ builtin (asinf) attributes simd (notinbranch) if('x32')
92!GCC$ builtin (hypot) attributes simd (notinbranch) if('x32')
93!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x32')
94!GCC$ builtin (exp2) attributes simd (notinbranch) if('x32')
95!GCC$ builtin (exp2f) attributes simd (notinbranch) if('x32')
96!GCC$ builtin (exp10) attributes simd (notinbranch) if('x32')
97!GCC$ builtin (exp10f) attributes simd (notinbranch) if('x32')
98!GCC$ builtin (cosh) attributes simd (notinbranch) if('x32')
99!GCC$ builtin (coshf) attributes simd (notinbranch) if('x32')
100!GCC$ builtin (expm1) attributes simd (notinbranch) if('x32')
101!GCC$ builtin (expm1f) attributes simd (notinbranch) if('x32')
102!GCC$ builtin (sinh) attributes simd (notinbranch) if('x32')
103!GCC$ builtin (sinhf) attributes simd (notinbranch) if('x32')
104!GCC$ builtin (cbrt) attributes simd (notinbranch) if('x32')
105!GCC$ builtin (cbrtf) attributes simd (notinbranch) if('x32')
106!GCC$ builtin (atan2) attributes simd (notinbranch) if('x32')
107!GCC$ builtin (atan2f) attributes simd (notinbranch) if('x32')
108!GCC$ builtin (log10) attributes simd (notinbranch) if('x32')
109!GCC$ builtin (log10f) attributes simd (notinbranch) if('x32')
110!GCC$ builtin (log2) attributes simd (notinbranch) if('x32')
111!GCC$ builtin (log2f) attributes simd (notinbranch) if('x32')
112!GCC$ builtin (log1p) attributes simd (notinbranch) if('x32')
113!GCC$ builtin (log1pf) attributes simd (notinbranch) if('x32')
114!GCC$ builtin (atanh) attributes simd (notinbranch) if('x32')
115!GCC$ builtin (atanhf) attributes simd (notinbranch) if('x32')
116!GCC$ builtin (acosh) attributes simd (notinbranch) if('x32')
117!GCC$ builtin (acoshf) attributes simd (notinbranch) if('x32')
118!GCC$ builtin (erf) attributes simd (notinbranch) if('x32')
119!GCC$ builtin (erff) attributes simd (notinbranch) if('x32')
120!GCC$ builtin (tanh) attributes simd (notinbranch) if('x32')
121!GCC$ builtin (tanhf) attributes simd (notinbranch) if('x32')
122!GCC$ builtin (asinh) attributes simd (notinbranch) if('x32')
123!GCC$ builtin (asinhf) attributes simd (notinbranch) if('x32')
124!GCC$ builtin (erfc) attributes simd (notinbranch) if('x32')
125!GCC$ builtin (erfcf) attributes simd (notinbranch) if('x32')
126!GCC$ builtin (tan) attributes simd (notinbranch) if('x32')
127!GCC$ builtin (tanf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86-linux-gnu/fpu_control.h+1-2
......@@ -1,7 +1,6 @@
11/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/x86-linux-gnu/gnu/lib-names-32.h created+28
......@@ -0,0 +1,28 @@
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 LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"
15#define LIBMVEC_SO "libmvec.so.1"
16#define LIBM_SO "libm.so.6"
17#define LIBNSL_SO "libnsl.so.1"
18#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
19#define LIBNSS_DB_SO "libnss_db.so.2"
20#define LIBNSS_DNS_SO "libnss_dns.so.2"
21#define LIBNSS_FILES_SO "libnss_files.so.2"
22#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
23#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBPTHREAD_SO "libpthread.so.0"
25#define LIBRESOLV_SO "libresolv.so.2"
26#define LIBRT_SO "librt.so.1"
27#define LIBTHREAD_DB_SO "libthread_db.so.1"
28#define LIBUTIL_SO "libutil.so.1"
\ No newline at end of file
lib/libc/include/x86-linux-gnu/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -190,8 +190,12 @@ enum __ptrace_request
190190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191191
192192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
193 PTRACE_GET_SYSCALL_INFO = 0x420e,
194194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
195
196 /* Get rseq configuration information. */
197 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
198#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
195199};
196200
197201
lib/libc/include/x86-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/dl_find_object.h created+29
......@@ -0,0 +1,29 @@
1/* x86 definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#ifdef __x86_64__
24# define DLFO_STRUCT_HAS_EH_DBASE 0
25#else
26# define DLFO_STRUCT_HAS_EH_DBASE 1
27#endif
28#define DLFO_STRUCT_HAS_EH_COUNT 0
29#define DLFO_EH_SEGMENT_TYPE PT_GNU_EH_FRAME
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/epoll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -58,7 +58,7 @@
5858/* Defined to concatenate the literal suffix to be used with _Float128
5959 types, if __HAVE_FLOAT128 is 1. */
6060# if __HAVE_FLOAT128
61# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
61# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6262/* The literal suffix f128 exists only since GCC 7.0. */
6363# define __f128(x) x##q
6464# else
......@@ -68,7 +68,7 @@
6868
6969/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7070# if __HAVE_FLOAT128
71# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
71# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7272/* Add a typedef for older GCC compilers which don't natively support
7373 _Complex _Float128. */
7474typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
......@@ -82,7 +82,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
8282# if __HAVE_FLOAT128
8383
8484/* The type _Float128 exists only since GCC 7.0. */
85# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
85# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8686typedef __float128 _Float128;
8787# endif
8888
lib/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/fp-logb.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/indirect-return.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/link.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -38,8 +38,8 @@ typedef struct La_i86_retval
3838 uint32_t lrv_edx;
3939 long double lrv_st0;
4040 long double lrv_st1;
41 uint64_t lrv_bnd0;
42 uint64_t lrv_bnd1;
41 uint64_t __glibc_unused1;
42 uint64_t __glibc_unused2;
4343} La_i86_retval;
4444
4545
......@@ -96,7 +96,7 @@ typedef struct La_x86_64_regs
9696 La_x86_64_xmm lr_xmm[8];
9797 La_x86_64_vector lr_vector[8];
9898#ifndef __ILP32__
99 __int128_t lr_bnd[4];
99 __int128_t __glibc_unused1[4];
100100#endif
101101} La_x86_64_regs;
102102
......@@ -112,8 +112,8 @@ typedef struct La_x86_64_retval
112112 La_x86_64_vector lrv_vector0;
113113 La_x86_64_vector lrv_vector1;
114114#ifndef __ILP32__
115 __int128_t lrv_bnd0;
116 __int128_t lrv_bnd1;
115 __int128_t __glibc_unused1;
116 __int128_t __glibc_unused2;
117117#endif
118118} La_x86_64_retval;
119119
lib/libc/include/x86_64-linux-gnu/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/math-vector.h+85-1
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 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
......@@ -58,6 +58,90 @@
5858# define __DECL_SIMD_pow __DECL_SIMD_x86_64
5959# undef __DECL_SIMD_powf
6060# define __DECL_SIMD_powf __DECL_SIMD_x86_64
61# undef __DECL_SIMD_acos
62# define __DECL_SIMD_acos __DECL_SIMD_x86_64
63# undef __DECL_SIMD_acosf
64# define __DECL_SIMD_acosf __DECL_SIMD_x86_64
65# undef __DECL_SIMD_atan
66# define __DECL_SIMD_atan __DECL_SIMD_x86_64
67# undef __DECL_SIMD_atanf
68# define __DECL_SIMD_atanf __DECL_SIMD_x86_64
69# undef __DECL_SIMD_asin
70# define __DECL_SIMD_asin __DECL_SIMD_x86_64
71# undef __DECL_SIMD_asinf
72# define __DECL_SIMD_asinf __DECL_SIMD_x86_64
73# undef __DECL_SIMD_hypot
74# define __DECL_SIMD_hypot __DECL_SIMD_x86_64
75# undef __DECL_SIMD_hypotf
76# define __DECL_SIMD_hypotf __DECL_SIMD_x86_64
77# undef __DECL_SIMD_exp2
78# define __DECL_SIMD_exp2 __DECL_SIMD_x86_64
79# undef __DECL_SIMD_exp2f
80# define __DECL_SIMD_exp2f __DECL_SIMD_x86_64
81# undef __DECL_SIMD_exp10
82# define __DECL_SIMD_exp10 __DECL_SIMD_x86_64
83# undef __DECL_SIMD_exp10f
84# define __DECL_SIMD_exp10f __DECL_SIMD_x86_64
85# undef __DECL_SIMD_cosh
86# define __DECL_SIMD_cosh __DECL_SIMD_x86_64
87# undef __DECL_SIMD_coshf
88# define __DECL_SIMD_coshf __DECL_SIMD_x86_64
89# undef __DECL_SIMD_expm1
90# define __DECL_SIMD_expm1 __DECL_SIMD_x86_64
91# undef __DECL_SIMD_expm1f
92# define __DECL_SIMD_expm1f __DECL_SIMD_x86_64
93# undef __DECL_SIMD_sinh
94# define __DECL_SIMD_sinh __DECL_SIMD_x86_64
95# undef __DECL_SIMD_sinhf
96# define __DECL_SIMD_sinhf __DECL_SIMD_x86_64
97# undef __DECL_SIMD_cbrt
98# define __DECL_SIMD_cbrt __DECL_SIMD_x86_64
99# undef __DECL_SIMD_cbrtf
100# define __DECL_SIMD_cbrtf __DECL_SIMD_x86_64
101# undef __DECL_SIMD_atan2
102# define __DECL_SIMD_atan2 __DECL_SIMD_x86_64
103# undef __DECL_SIMD_atan2f
104# define __DECL_SIMD_atan2f __DECL_SIMD_x86_64
105# undef __DECL_SIMD_log10
106# define __DECL_SIMD_log10 __DECL_SIMD_x86_64
107# undef __DECL_SIMD_log10f
108# define __DECL_SIMD_log10f __DECL_SIMD_x86_64
109# undef __DECL_SIMD_log2
110# define __DECL_SIMD_log2 __DECL_SIMD_x86_64
111# undef __DECL_SIMD_log2f
112# define __DECL_SIMD_log2f __DECL_SIMD_x86_64
113# undef __DECL_SIMD_log1p
114# define __DECL_SIMD_log1p __DECL_SIMD_x86_64
115# undef __DECL_SIMD_log1pf
116# define __DECL_SIMD_log1pf __DECL_SIMD_x86_64
117# undef __DECL_SIMD_atanh
118# define __DECL_SIMD_atanh __DECL_SIMD_x86_64
119# undef __DECL_SIMD_atanhf
120# define __DECL_SIMD_atanhf __DECL_SIMD_x86_64
121# undef __DECL_SIMD_acosh
122# define __DECL_SIMD_acosh __DECL_SIMD_x86_64
123# undef __DECL_SIMD_acoshf
124# define __DECL_SIMD_acoshf __DECL_SIMD_x86_64
125# undef __DECL_SIMD_erf
126# define __DECL_SIMD_erf __DECL_SIMD_x86_64
127# undef __DECL_SIMD_erff
128# define __DECL_SIMD_erff __DECL_SIMD_x86_64
129# undef __DECL_SIMD_tanh
130# define __DECL_SIMD_tanh __DECL_SIMD_x86_64
131# undef __DECL_SIMD_tanhf
132# define __DECL_SIMD_tanhf __DECL_SIMD_x86_64
133# undef __DECL_SIMD_asinh
134# define __DECL_SIMD_asinh __DECL_SIMD_x86_64
135# undef __DECL_SIMD_asinhf
136# define __DECL_SIMD_asinhf __DECL_SIMD_x86_64
137# undef __DECL_SIMD_erfc
138# define __DECL_SIMD_erfc __DECL_SIMD_x86_64
139# undef __DECL_SIMD_erfcf
140# define __DECL_SIMD_erfcf __DECL_SIMD_x86_64
141# undef __DECL_SIMD_tan
142# define __DECL_SIMD_tan __DECL_SIMD_x86_64
143# undef __DECL_SIMD_tanf
144# define __DECL_SIMD_tanf __DECL_SIMD_x86_64
61145
62146# endif
63147#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/mman.h+2-4
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -24,9 +24,7 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* Other flags. */
27#ifdef __USE_MISC
28# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
29#endif
27#define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
3028
3129#include <bits/mman-map-flags-generic.h>
3230
lib/libc/include/x86_64-linux-gnu/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/x86_64-linux-gnu/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/rseq.h created+30
......@@ -0,0 +1,30 @@
1/* Restartable Sequences Linux x86 architecture header.
2 Copyright (C) 2021-2023 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 RSEQ_SIG is used with the following reserved undefined instructions, which
25 trap in user-space:
26
27 x86-32: 0f b9 3d 53 30 05 53 ud1 0x53053053,%edi
28 x86-64: 0f b9 3d 53 30 05 53 ud1 0x53053053(%rip),%edi */
29
30#define RSEQ_SIG 0x53053053
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/timesize.h+3-1
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 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
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19#include <bits/wordsize.h>
20
1921#if defined __x86_64__ && defined __ILP32__
2022/* For x32, time is 64-bit even though word size is 32-bit. */
2123# define __TIMESIZE 64
lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/finclude/math-vector-fortran.h+86-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019-2021 Free Software Foundation, Inc.
2! Copyright (C) 2019-2023 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
......@@ -28,6 +28,48 @@
2828!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
2929!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
3030!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31!GCC$ builtin (acos) attributes simd (notinbranch) if('x86_64')
32!GCC$ builtin (acosf) attributes simd (notinbranch) if('x86_64')
33!GCC$ builtin (atan) attributes simd (notinbranch) if('x86_64')
34!GCC$ builtin (atanf) attributes simd (notinbranch) if('x86_64')
35!GCC$ builtin (asin) attributes simd (notinbranch) if('x86_64')
36!GCC$ builtin (asinf) attributes simd (notinbranch) if('x86_64')
37!GCC$ builtin (hypot) attributes simd (notinbranch) if('x86_64')
38!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x86_64')
39!GCC$ builtin (exp2) attributes simd (notinbranch) if('x86_64')
40!GCC$ builtin (exp2f) attributes simd (notinbranch) if('x86_64')
41!GCC$ builtin (exp10) attributes simd (notinbranch) if('x86_64')
42!GCC$ builtin (exp10f) attributes simd (notinbranch) if('x86_64')
43!GCC$ builtin (cosh) attributes simd (notinbranch) if('x86_64')
44!GCC$ builtin (coshf) attributes simd (notinbranch) if('x86_64')
45!GCC$ builtin (expm1) attributes simd (notinbranch) if('x86_64')
46!GCC$ builtin (expm1f) attributes simd (notinbranch) if('x86_64')
47!GCC$ builtin (sinh) attributes simd (notinbranch) if('x86_64')
48!GCC$ builtin (sinhf) attributes simd (notinbranch) if('x86_64')
49!GCC$ builtin (cbrt) attributes simd (notinbranch) if('x86_64')
50!GCC$ builtin (cbrtf) attributes simd (notinbranch) if('x86_64')
51!GCC$ builtin (atan2) attributes simd (notinbranch) if('x86_64')
52!GCC$ builtin (atan2f) attributes simd (notinbranch) if('x86_64')
53!GCC$ builtin (log10) attributes simd (notinbranch) if('x86_64')
54!GCC$ builtin (log10f) attributes simd (notinbranch) if('x86_64')
55!GCC$ builtin (log2) attributes simd (notinbranch) if('x86_64')
56!GCC$ builtin (log2f) attributes simd (notinbranch) if('x86_64')
57!GCC$ builtin (log1p) attributes simd (notinbranch) if('x86_64')
58!GCC$ builtin (log1pf) attributes simd (notinbranch) if('x86_64')
59!GCC$ builtin (atanh) attributes simd (notinbranch) if('x86_64')
60!GCC$ builtin (atanhf) attributes simd (notinbranch) if('x86_64')
61!GCC$ builtin (acosh) attributes simd (notinbranch) if('x86_64')
62!GCC$ builtin (acoshf) attributes simd (notinbranch) if('x86_64')
63!GCC$ builtin (erf) attributes simd (notinbranch) if('x86_64')
64!GCC$ builtin (erff) attributes simd (notinbranch) if('x86_64')
65!GCC$ builtin (tanh) attributes simd (notinbranch) if('x86_64')
66!GCC$ builtin (tanhf) attributes simd (notinbranch) if('x86_64')
67!GCC$ builtin (asinh) attributes simd (notinbranch) if('x86_64')
68!GCC$ builtin (asinhf) attributes simd (notinbranch) if('x86_64')
69!GCC$ builtin (erfc) attributes simd (notinbranch) if('x86_64')
70!GCC$ builtin (erfcf) attributes simd (notinbranch) if('x86_64')
71!GCC$ builtin (tan) attributes simd (notinbranch) if('x86_64')
72!GCC$ builtin (tanf) attributes simd (notinbranch) if('x86_64')
3173
3274!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
3375!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
......@@ -40,4 +82,46 @@
4082!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
4183!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
4284!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
85!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
86!GCC$ builtin (acos) attributes simd (notinbranch) if('x32')
87!GCC$ builtin (acosf) attributes simd (notinbranch) if('x32')
88!GCC$ builtin (atan) attributes simd (notinbranch) if('x32')
89!GCC$ builtin (atanf) attributes simd (notinbranch) if('x32')
90!GCC$ builtin (asin) attributes simd (notinbranch) if('x32')
91!GCC$ builtin (asinf) attributes simd (notinbranch) if('x32')
92!GCC$ builtin (hypot) attributes simd (notinbranch) if('x32')
93!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x32')
94!GCC$ builtin (exp2) attributes simd (notinbranch) if('x32')
95!GCC$ builtin (exp2f) attributes simd (notinbranch) if('x32')
96!GCC$ builtin (exp10) attributes simd (notinbranch) if('x32')
97!GCC$ builtin (exp10f) attributes simd (notinbranch) if('x32')
98!GCC$ builtin (cosh) attributes simd (notinbranch) if('x32')
99!GCC$ builtin (coshf) attributes simd (notinbranch) if('x32')
100!GCC$ builtin (expm1) attributes simd (notinbranch) if('x32')
101!GCC$ builtin (expm1f) attributes simd (notinbranch) if('x32')
102!GCC$ builtin (sinh) attributes simd (notinbranch) if('x32')
103!GCC$ builtin (sinhf) attributes simd (notinbranch) if('x32')
104!GCC$ builtin (cbrt) attributes simd (notinbranch) if('x32')
105!GCC$ builtin (cbrtf) attributes simd (notinbranch) if('x32')
106!GCC$ builtin (atan2) attributes simd (notinbranch) if('x32')
107!GCC$ builtin (atan2f) attributes simd (notinbranch) if('x32')
108!GCC$ builtin (log10) attributes simd (notinbranch) if('x32')
109!GCC$ builtin (log10f) attributes simd (notinbranch) if('x32')
110!GCC$ builtin (log2) attributes simd (notinbranch) if('x32')
111!GCC$ builtin (log2f) attributes simd (notinbranch) if('x32')
112!GCC$ builtin (log1p) attributes simd (notinbranch) if('x32')
113!GCC$ builtin (log1pf) attributes simd (notinbranch) if('x32')
114!GCC$ builtin (atanh) attributes simd (notinbranch) if('x32')
115!GCC$ builtin (atanhf) attributes simd (notinbranch) if('x32')
116!GCC$ builtin (acosh) attributes simd (notinbranch) if('x32')
117!GCC$ builtin (acoshf) attributes simd (notinbranch) if('x32')
118!GCC$ builtin (erf) attributes simd (notinbranch) if('x32')
119!GCC$ builtin (erff) attributes simd (notinbranch) if('x32')
120!GCC$ builtin (tanh) attributes simd (notinbranch) if('x32')
121!GCC$ builtin (tanhf) attributes simd (notinbranch) if('x32')
122!GCC$ builtin (asinh) attributes simd (notinbranch) if('x32')
123!GCC$ builtin (asinhf) attributes simd (notinbranch) if('x32')
124!GCC$ builtin (erfc) attributes simd (notinbranch) if('x32')
125!GCC$ builtin (erfcf) attributes simd (notinbranch) if('x32')
126!GCC$ builtin (tan) attributes simd (notinbranch) if('x32')
127!GCC$ builtin (tanf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/fpu_control.h+1-2
......@@ -1,7 +1,6 @@
11/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/x86_64-linux-gnu/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -190,8 +190,12 @@ enum __ptrace_request
190190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191191
192192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
193 PTRACE_GET_SYSCALL_INFO = 0x420e,
194194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
195
196 /* Get rseq configuration information. */
197 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
198#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
195199};
196200
197201
lib/libc/include/x86_64-linux-gnu/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnu/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/dl_find_object.h created+29
......@@ -0,0 +1,29 @@
1/* x86 definitions for finding objects.
2 Copyright (C) 2021-2023 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 _DLFCN_H
20# error "Never use <bits/dl_find_object.h> directly; include <dlfcn.h> instead."
21#endif
22
23#ifdef __x86_64__
24# define DLFO_STRUCT_HAS_EH_DBASE 0
25#else
26# define DLFO_STRUCT_HAS_EH_DBASE 1
27#endif
28#define DLFO_STRUCT_HAS_EH_COUNT 0
29#define DLFO_EH_SEGMENT_TYPE PT_GNU_EH_FRAME
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/environments.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1999-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/epoll.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/fcntl.h+1-1
......@@ -1,5 +1,5 @@
11/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/fenv.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1997-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/floatn.h+4-4
......@@ -1,5 +1,5 @@
11/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
2 Copyright (C) 2017-2023 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
......@@ -58,7 +58,7 @@
5858/* Defined to concatenate the literal suffix to be used with _Float128
5959 types, if __HAVE_FLOAT128 is 1. */
6060# if __HAVE_FLOAT128
61# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
61# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
6262/* The literal suffix f128 exists only since GCC 7.0. */
6363# define __f128(x) x##q
6464# else
......@@ -68,7 +68,7 @@
6868
6969/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
7070# if __HAVE_FLOAT128
71# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
71# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
7272/* Add a typedef for older GCC compilers which don't natively support
7373 _Complex _Float128. */
7474typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
......@@ -82,7 +82,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
8282# if __HAVE_FLOAT128
8383
8484/* The type _Float128 exists only since GCC 7.0. */
85# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
85# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0))
8686typedef __float128 _Float128;
8787# endif
8888
lib/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/fp-logb.h+1-1
......@@ -1,5 +1,5 @@
11/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/indirect-return.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/ipctypes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/iscanonical.h+1-1
......@@ -1,5 +1,5 @@
11/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/link.h+6-6
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2004-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
......@@ -38,8 +38,8 @@ typedef struct La_i86_retval
3838 uint32_t lrv_edx;
3939 long double lrv_st0;
4040 long double lrv_st1;
41 uint64_t lrv_bnd0;
42 uint64_t lrv_bnd1;
41 uint64_t __glibc_unused1;
42 uint64_t __glibc_unused2;
4343} La_i86_retval;
4444
4545
......@@ -96,7 +96,7 @@ typedef struct La_x86_64_regs
9696 La_x86_64_xmm lr_xmm[8];
9797 La_x86_64_vector lr_vector[8];
9898#ifndef __ILP32__
99 __int128_t lr_bnd[4];
99 __int128_t __glibc_unused1[4];
100100#endif
101101} La_x86_64_regs;
102102
......@@ -112,8 +112,8 @@ typedef struct La_x86_64_retval
112112 La_x86_64_vector lrv_vector0;
113113 La_x86_64_vector lrv_vector1;
114114#ifndef __ILP32__
115 __int128_t lrv_bnd0;
116 __int128_t lrv_bnd1;
115 __int128_t __glibc_unused1;
116 __int128_t __glibc_unused2;
117117#endif
118118} La_x86_64_retval;
119119
lib/libc/include/x86_64-linux-gnux32/bits/long-double.h+1-1
......@@ -1,5 +1,5 @@
11/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc.
2 Copyright (C) 2016-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/math-vector.h+85-1
......@@ -1,5 +1,5 @@
11/* Platform-specific SIMD declarations of math functions.
2 Copyright (C) 2014-2021 Free Software Foundation, Inc.
2 Copyright (C) 2014-2023 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
......@@ -58,6 +58,90 @@
5858# define __DECL_SIMD_pow __DECL_SIMD_x86_64
5959# undef __DECL_SIMD_powf
6060# define __DECL_SIMD_powf __DECL_SIMD_x86_64
61# undef __DECL_SIMD_acos
62# define __DECL_SIMD_acos __DECL_SIMD_x86_64
63# undef __DECL_SIMD_acosf
64# define __DECL_SIMD_acosf __DECL_SIMD_x86_64
65# undef __DECL_SIMD_atan
66# define __DECL_SIMD_atan __DECL_SIMD_x86_64
67# undef __DECL_SIMD_atanf
68# define __DECL_SIMD_atanf __DECL_SIMD_x86_64
69# undef __DECL_SIMD_asin
70# define __DECL_SIMD_asin __DECL_SIMD_x86_64
71# undef __DECL_SIMD_asinf
72# define __DECL_SIMD_asinf __DECL_SIMD_x86_64
73# undef __DECL_SIMD_hypot
74# define __DECL_SIMD_hypot __DECL_SIMD_x86_64
75# undef __DECL_SIMD_hypotf
76# define __DECL_SIMD_hypotf __DECL_SIMD_x86_64
77# undef __DECL_SIMD_exp2
78# define __DECL_SIMD_exp2 __DECL_SIMD_x86_64
79# undef __DECL_SIMD_exp2f
80# define __DECL_SIMD_exp2f __DECL_SIMD_x86_64
81# undef __DECL_SIMD_exp10
82# define __DECL_SIMD_exp10 __DECL_SIMD_x86_64
83# undef __DECL_SIMD_exp10f
84# define __DECL_SIMD_exp10f __DECL_SIMD_x86_64
85# undef __DECL_SIMD_cosh
86# define __DECL_SIMD_cosh __DECL_SIMD_x86_64
87# undef __DECL_SIMD_coshf
88# define __DECL_SIMD_coshf __DECL_SIMD_x86_64
89# undef __DECL_SIMD_expm1
90# define __DECL_SIMD_expm1 __DECL_SIMD_x86_64
91# undef __DECL_SIMD_expm1f
92# define __DECL_SIMD_expm1f __DECL_SIMD_x86_64
93# undef __DECL_SIMD_sinh
94# define __DECL_SIMD_sinh __DECL_SIMD_x86_64
95# undef __DECL_SIMD_sinhf
96# define __DECL_SIMD_sinhf __DECL_SIMD_x86_64
97# undef __DECL_SIMD_cbrt
98# define __DECL_SIMD_cbrt __DECL_SIMD_x86_64
99# undef __DECL_SIMD_cbrtf
100# define __DECL_SIMD_cbrtf __DECL_SIMD_x86_64
101# undef __DECL_SIMD_atan2
102# define __DECL_SIMD_atan2 __DECL_SIMD_x86_64
103# undef __DECL_SIMD_atan2f
104# define __DECL_SIMD_atan2f __DECL_SIMD_x86_64
105# undef __DECL_SIMD_log10
106# define __DECL_SIMD_log10 __DECL_SIMD_x86_64
107# undef __DECL_SIMD_log10f
108# define __DECL_SIMD_log10f __DECL_SIMD_x86_64
109# undef __DECL_SIMD_log2
110# define __DECL_SIMD_log2 __DECL_SIMD_x86_64
111# undef __DECL_SIMD_log2f
112# define __DECL_SIMD_log2f __DECL_SIMD_x86_64
113# undef __DECL_SIMD_log1p
114# define __DECL_SIMD_log1p __DECL_SIMD_x86_64
115# undef __DECL_SIMD_log1pf
116# define __DECL_SIMD_log1pf __DECL_SIMD_x86_64
117# undef __DECL_SIMD_atanh
118# define __DECL_SIMD_atanh __DECL_SIMD_x86_64
119# undef __DECL_SIMD_atanhf
120# define __DECL_SIMD_atanhf __DECL_SIMD_x86_64
121# undef __DECL_SIMD_acosh
122# define __DECL_SIMD_acosh __DECL_SIMD_x86_64
123# undef __DECL_SIMD_acoshf
124# define __DECL_SIMD_acoshf __DECL_SIMD_x86_64
125# undef __DECL_SIMD_erf
126# define __DECL_SIMD_erf __DECL_SIMD_x86_64
127# undef __DECL_SIMD_erff
128# define __DECL_SIMD_erff __DECL_SIMD_x86_64
129# undef __DECL_SIMD_tanh
130# define __DECL_SIMD_tanh __DECL_SIMD_x86_64
131# undef __DECL_SIMD_tanhf
132# define __DECL_SIMD_tanhf __DECL_SIMD_x86_64
133# undef __DECL_SIMD_asinh
134# define __DECL_SIMD_asinh __DECL_SIMD_x86_64
135# undef __DECL_SIMD_asinhf
136# define __DECL_SIMD_asinhf __DECL_SIMD_x86_64
137# undef __DECL_SIMD_erfc
138# define __DECL_SIMD_erfc __DECL_SIMD_x86_64
139# undef __DECL_SIMD_erfcf
140# define __DECL_SIMD_erfcf __DECL_SIMD_x86_64
141# undef __DECL_SIMD_tan
142# define __DECL_SIMD_tan __DECL_SIMD_x86_64
143# undef __DECL_SIMD_tanf
144# define __DECL_SIMD_tanf __DECL_SIMD_x86_64
61145
62146# endif
63147#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/mman.h+2-4
......@@ -1,5 +1,5 @@
11/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 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
......@@ -24,9 +24,7 @@
2424 But the kernel header is not namespace clean. */
2525
2626/* Other flags. */
27#ifdef __USE_MISC
28# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
29#endif
27#define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
3028
3129#include <bits/mman-map-flags-generic.h>
3230
lib/libc/include/x86_64-linux-gnux32/bits/procfs-id.h+1-1
......@@ -1,5 +1,5 @@
11/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/x86_64-linux-gnux32/bits/procfs.h+1-1
......@@ -1,5 +1,5 @@
11/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 2001-2021 Free Software Foundation, Inc.
2 Copyright (C) 2001-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/rseq.h created+30
......@@ -0,0 +1,30 @@
1/* Restartable Sequences Linux x86 architecture header.
2 Copyright (C) 2021-2023 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 RSEQ_SIG is used with the following reserved undefined instructions, which
25 trap in user-space:
26
27 x86-32: 0f b9 3d 53 30 05 53 ud1 0x53053053,%edi
28 x86-64: 0f b9 3d 53 30 05 53 ud1 0x53053053(%rip),%edi */
29
30#define RSEQ_SIG 0x53053053
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/setjmp.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/sigcontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/struct_mutex.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/struct_rwlock.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h+1-1
......@@ -1,5 +1,5 @@
11/* Definition for struct stat.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
2 Copyright (C) 2020-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/timesize.h+3-1
......@@ -1,5 +1,5 @@
11/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc.
2 Copyright (C) 2018-2023 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
......@@ -16,6 +16,8 @@
1616 License along with the GNU C Library; if not, see
1717 <https://www.gnu.org/licenses/>. */
1818
19#include <bits/wordsize.h>
20
1921#if defined __x86_64__ && defined __ILP32__
2022/* For x32, time is 64-bit even though word size is 32-bit. */
2123# define __TIMESIZE 64
lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h+1-1
......@@ -1,5 +1,5 @@
11/* x86 implementation of the semaphore struct semid_ds.
2 Copyright (C) 1995-2021 Free Software Foundation, Inc.
2 Copyright (C) 1995-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h+1-1
......@@ -1,5 +1,5 @@
11/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc.
2 Copyright (C) 2012-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
44
55 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/finclude/math-vector-fortran.h+86-2
......@@ -1,5 +1,5 @@
11! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*-
2! Copyright (C) 2019-2021 Free Software Foundation, Inc.
2! Copyright (C) 2019-2023 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
......@@ -28,6 +28,48 @@
2828!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
2929!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
3030!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31!GCC$ builtin (acos) attributes simd (notinbranch) if('x86_64')
32!GCC$ builtin (acosf) attributes simd (notinbranch) if('x86_64')
33!GCC$ builtin (atan) attributes simd (notinbranch) if('x86_64')
34!GCC$ builtin (atanf) attributes simd (notinbranch) if('x86_64')
35!GCC$ builtin (asin) attributes simd (notinbranch) if('x86_64')
36!GCC$ builtin (asinf) attributes simd (notinbranch) if('x86_64')
37!GCC$ builtin (hypot) attributes simd (notinbranch) if('x86_64')
38!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x86_64')
39!GCC$ builtin (exp2) attributes simd (notinbranch) if('x86_64')
40!GCC$ builtin (exp2f) attributes simd (notinbranch) if('x86_64')
41!GCC$ builtin (exp10) attributes simd (notinbranch) if('x86_64')
42!GCC$ builtin (exp10f) attributes simd (notinbranch) if('x86_64')
43!GCC$ builtin (cosh) attributes simd (notinbranch) if('x86_64')
44!GCC$ builtin (coshf) attributes simd (notinbranch) if('x86_64')
45!GCC$ builtin (expm1) attributes simd (notinbranch) if('x86_64')
46!GCC$ builtin (expm1f) attributes simd (notinbranch) if('x86_64')
47!GCC$ builtin (sinh) attributes simd (notinbranch) if('x86_64')
48!GCC$ builtin (sinhf) attributes simd (notinbranch) if('x86_64')
49!GCC$ builtin (cbrt) attributes simd (notinbranch) if('x86_64')
50!GCC$ builtin (cbrtf) attributes simd (notinbranch) if('x86_64')
51!GCC$ builtin (atan2) attributes simd (notinbranch) if('x86_64')
52!GCC$ builtin (atan2f) attributes simd (notinbranch) if('x86_64')
53!GCC$ builtin (log10) attributes simd (notinbranch) if('x86_64')
54!GCC$ builtin (log10f) attributes simd (notinbranch) if('x86_64')
55!GCC$ builtin (log2) attributes simd (notinbranch) if('x86_64')
56!GCC$ builtin (log2f) attributes simd (notinbranch) if('x86_64')
57!GCC$ builtin (log1p) attributes simd (notinbranch) if('x86_64')
58!GCC$ builtin (log1pf) attributes simd (notinbranch) if('x86_64')
59!GCC$ builtin (atanh) attributes simd (notinbranch) if('x86_64')
60!GCC$ builtin (atanhf) attributes simd (notinbranch) if('x86_64')
61!GCC$ builtin (acosh) attributes simd (notinbranch) if('x86_64')
62!GCC$ builtin (acoshf) attributes simd (notinbranch) if('x86_64')
63!GCC$ builtin (erf) attributes simd (notinbranch) if('x86_64')
64!GCC$ builtin (erff) attributes simd (notinbranch) if('x86_64')
65!GCC$ builtin (tanh) attributes simd (notinbranch) if('x86_64')
66!GCC$ builtin (tanhf) attributes simd (notinbranch) if('x86_64')
67!GCC$ builtin (asinh) attributes simd (notinbranch) if('x86_64')
68!GCC$ builtin (asinhf) attributes simd (notinbranch) if('x86_64')
69!GCC$ builtin (erfc) attributes simd (notinbranch) if('x86_64')
70!GCC$ builtin (erfcf) attributes simd (notinbranch) if('x86_64')
71!GCC$ builtin (tan) attributes simd (notinbranch) if('x86_64')
72!GCC$ builtin (tanf) attributes simd (notinbranch) if('x86_64')
3173
3274!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
3375!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
......@@ -40,4 +82,46 @@
4082!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
4183!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
4284!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
85!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
86!GCC$ builtin (acos) attributes simd (notinbranch) if('x32')
87!GCC$ builtin (acosf) attributes simd (notinbranch) if('x32')
88!GCC$ builtin (atan) attributes simd (notinbranch) if('x32')
89!GCC$ builtin (atanf) attributes simd (notinbranch) if('x32')
90!GCC$ builtin (asin) attributes simd (notinbranch) if('x32')
91!GCC$ builtin (asinf) attributes simd (notinbranch) if('x32')
92!GCC$ builtin (hypot) attributes simd (notinbranch) if('x32')
93!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x32')
94!GCC$ builtin (exp2) attributes simd (notinbranch) if('x32')
95!GCC$ builtin (exp2f) attributes simd (notinbranch) if('x32')
96!GCC$ builtin (exp10) attributes simd (notinbranch) if('x32')
97!GCC$ builtin (exp10f) attributes simd (notinbranch) if('x32')
98!GCC$ builtin (cosh) attributes simd (notinbranch) if('x32')
99!GCC$ builtin (coshf) attributes simd (notinbranch) if('x32')
100!GCC$ builtin (expm1) attributes simd (notinbranch) if('x32')
101!GCC$ builtin (expm1f) attributes simd (notinbranch) if('x32')
102!GCC$ builtin (sinh) attributes simd (notinbranch) if('x32')
103!GCC$ builtin (sinhf) attributes simd (notinbranch) if('x32')
104!GCC$ builtin (cbrt) attributes simd (notinbranch) if('x32')
105!GCC$ builtin (cbrtf) attributes simd (notinbranch) if('x32')
106!GCC$ builtin (atan2) attributes simd (notinbranch) if('x32')
107!GCC$ builtin (atan2f) attributes simd (notinbranch) if('x32')
108!GCC$ builtin (log10) attributes simd (notinbranch) if('x32')
109!GCC$ builtin (log10f) attributes simd (notinbranch) if('x32')
110!GCC$ builtin (log2) attributes simd (notinbranch) if('x32')
111!GCC$ builtin (log2f) attributes simd (notinbranch) if('x32')
112!GCC$ builtin (log1p) attributes simd (notinbranch) if('x32')
113!GCC$ builtin (log1pf) attributes simd (notinbranch) if('x32')
114!GCC$ builtin (atanh) attributes simd (notinbranch) if('x32')
115!GCC$ builtin (atanhf) attributes simd (notinbranch) if('x32')
116!GCC$ builtin (acosh) attributes simd (notinbranch) if('x32')
117!GCC$ builtin (acoshf) attributes simd (notinbranch) if('x32')
118!GCC$ builtin (erf) attributes simd (notinbranch) if('x32')
119!GCC$ builtin (erff) attributes simd (notinbranch) if('x32')
120!GCC$ builtin (tanh) attributes simd (notinbranch) if('x32')
121!GCC$ builtin (tanhf) attributes simd (notinbranch) if('x32')
122!GCC$ builtin (asinh) attributes simd (notinbranch) if('x32')
123!GCC$ builtin (asinhf) attributes simd (notinbranch) if('x32')
124!GCC$ builtin (erfc) attributes simd (notinbranch) if('x32')
125!GCC$ builtin (erfcf) attributes simd (notinbranch) if('x32')
126!GCC$ builtin (tan) attributes simd (notinbranch) if('x32')
127!GCC$ builtin (tanf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/fpu_control.h+1-2
......@@ -1,7 +1,6 @@
11/* FPU control word bits. x86 version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
2 Copyright (C) 1993-2023 Free Software Foundation, Inc.
33 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe.
54
65 The GNU C Library is free software; you can redistribute it and/or
76 modify it under the terms of the GNU Lesser General Public
lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h-2
......@@ -21,8 +21,6 @@
2121#define LIBNSS_FILES_SO "libnss_files.so.2"
2222#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
2323#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"
2624#define LIBPTHREAD_SO "libpthread.so.0"
2725#define LIBRESOLV_SO "libresolv.so.2"
2826#define LIBRT_SO "librt.so.1"
lib/libc/include/x86_64-linux-gnux32/sys/elf.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
1/* Copyright (C) 1998-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/sys/ptrace.h+6-2
......@@ -1,5 +1,5 @@
11/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2021 Free Software Foundation, Inc.
2 Copyright (C) 1996-2023 Free Software Foundation, Inc.
33
44 This file is part of the GNU C Library.
55
......@@ -190,8 +190,12 @@ enum __ptrace_request
190190#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
191191
192192 /* Get information about system call. */
193 PTRACE_GET_SYSCALL_INFO = 0x420e
193 PTRACE_GET_SYSCALL_INFO = 0x420e,
194194#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
195
196 /* Get rseq configuration information. */
197 PTRACE_GET_RSEQ_CONFIGURATION = 0x420f
198#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION
195199};
196200
197201
lib/libc/include/x86_64-linux-gnux32/sys/ucontext.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or
lib/libc/include/x86_64-linux-gnux32/sys/user.h+1-1
......@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2021 Free Software Foundation, Inc.
1/* Copyright (C) 2001-2023 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
33
44 The GNU C Library is free software; you can redistribute it and/or