authorgravatar for sentrycraft123@gmail.comJan200101 <sentrycraft123@gmail.com> 2020-08-22 15:52:37+02:00
committergravatar for sentrycraft123@gmail.comJan200101 <sentrycraft123@gmail.com> 2020-08-22 22:42:58+02:00
logc61ea4cdb7db3aa8bfb18ebd27a58ae347f731c0
tree934fd4fe13af0e6b6ef96c8c51125fe3e5dea4c3
parent4e63cae369ec6e333e4aecb3d749bedff6484ee3
signaturelock-open Commit is signed but in an unrecognized format.

update glibc headers to 2.32


243 files changed, 2755 insertions(+), 4548 deletions(-)

lib/libc/include/aarch64-linux-gnu/bits/hwcap.h+20-1
...@@ -53,4 +53,23 @@...@@ -53,4 +53,23 @@
53#define HWCAP_SSBS (1 << 28)53#define HWCAP_SSBS (1 << 28)
54#define HWCAP_SB (1 << 29)54#define HWCAP_SB (1 << 29)
55#define HWCAP_PACA (1 << 30)55#define HWCAP_PACA (1 << 30)
56#define HWCAP_PACG (1UL << 31)
\ No newline at end of file
56#define HWCAP_PACG (1UL << 31)
57
58#define HWCAP2_DCPODP (1 << 0)
59#define HWCAP2_SVE2 (1 << 1)
60#define HWCAP2_SVEAES (1 << 2)
61#define HWCAP2_SVEPMULL (1 << 3)
62#define HWCAP2_SVEBITPERM (1 << 4)
63#define HWCAP2_SVESHA3 (1 << 5)
64#define HWCAP2_SVESM4 (1 << 6)
65#define HWCAP2_FLAGM2 (1 << 7)
66#define HWCAP2_FRINT (1 << 8)
67#define HWCAP2_SVEI8MM (1 << 9)
68#define HWCAP2_SVEF32MM (1 << 10)
69#define HWCAP2_SVEF64MM (1 << 11)
70#define HWCAP2_SVEBF16 (1 << 12)
71#define HWCAP2_I8MM (1 << 13)
72#define HWCAP2_BF16 (1 << 14)
73#define HWCAP2_DGH (1 << 15)
74#define HWCAP2_RNG (1 << 16)
75#define HWCAP2_BTI (1 << 17)
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/long-double.h+1-1
...@@ -18,4 +18,4 @@...@@ -18,4 +18,4 @@
1818
19/* long double is distinct from double, so there is nothing to19/* long double is distinct from double, so there is nothing to
20 define here. */20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/typesizes.h+29-9
...@@ -26,31 +26,45 @@...@@ -26,31 +26,45 @@
2626
27/* See <bits/types.h> for the meaning of these macros. This file exists so27/* See <bits/types.h> for the meaning of these macros. This file exists so
28 that <bits/types.h> need not vary across different GNU platforms. */28 that <bits/types.h> need not vary across different GNU platforms. */
29#if __TIMESIZE == 64 && __WORDSIZE == 32
30/* These are the "new" y2038 types defined for architectures added after
31 the 5.1 kernel. */
32# define __INO_T_TYPE __UQUAD_TYPE
33# define __OFF_T_TYPE __SQUAD_TYPE
34# define __RLIM_T_TYPE __UQUAD_TYPE
35# define __BLKCNT_T_TYPE __SQUAD_TYPE
36# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
37# define __FSFILCNT_T_TYPE __UQUAD_TYPE
38# define __TIME_T_TYPE __SQUAD_TYPE
39# define __SUSECONDS_T_TYPE __SQUAD_TYPE
40#else
41# define __INO_T_TYPE __ULONGWORD_TYPE
42# define __OFF_T_TYPE __SLONGWORD_TYPE
43# define __RLIM_T_TYPE __ULONGWORD_TYPE
44# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
45# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
46# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47# define __TIME_T_TYPE __SLONGWORD_TYPE
48# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
49#endif
2950
30#define __DEV_T_TYPE __UQUAD_TYPE51#define __DEV_T_TYPE __UQUAD_TYPE
31#define __UID_T_TYPE __U32_TYPE52#define __UID_T_TYPE __U32_TYPE
32#define __GID_T_TYPE __U32_TYPE53#define __GID_T_TYPE __U32_TYPE
33#define __INO_T_TYPE __ULONGWORD_TYPE
34#define __INO64_T_TYPE __UQUAD_TYPE54#define __INO64_T_TYPE __UQUAD_TYPE
35#define __MODE_T_TYPE __U32_TYPE55#define __MODE_T_TYPE __U32_TYPE
36#define __NLINK_T_TYPE __U32_TYPE56#define __NLINK_T_TYPE __U32_TYPE
37#define __OFF_T_TYPE __SLONGWORD_TYPE
38#define __OFF64_T_TYPE __SQUAD_TYPE57#define __OFF64_T_TYPE __SQUAD_TYPE
39#define __PID_T_TYPE __S32_TYPE58#define __PID_T_TYPE __S32_TYPE
40#define __RLIM_T_TYPE __ULONGWORD_TYPE
41#define __RLIM64_T_TYPE __UQUAD_TYPE59#define __RLIM64_T_TYPE __UQUAD_TYPE
42#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
43#define __BLKCNT64_T_TYPE __SQUAD_TYPE60#define __BLKCNT64_T_TYPE __SQUAD_TYPE
44#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE61#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
46#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47#define __FSFILCNT64_T_TYPE __UQUAD_TYPE62#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
48#define __FSWORD_T_TYPE __SWORD_TYPE63#define __FSWORD_T_TYPE __SWORD_TYPE
49#define __ID_T_TYPE __U32_TYPE64#define __ID_T_TYPE __U32_TYPE
50#define __CLOCK_T_TYPE __SLONGWORD_TYPE65#define __CLOCK_T_TYPE __SLONGWORD_TYPE
51#define __TIME_T_TYPE __SLONGWORD_TYPE
52#define __USECONDS_T_TYPE __U32_TYPE66#define __USECONDS_T_TYPE __U32_TYPE
53#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -62,7 +76,7 @@...@@ -62,7 +76,7 @@
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE76#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE77#define __CPU_MASK_TYPE __ULONGWORD_TYPE
6478
65#ifdef __LP64__79#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
66/* Tell the libc code that off_t and off64_t are actually the same type80/* 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 types81 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */82 for C type-checking purposes. */
...@@ -76,11 +90,17 @@...@@ -76,11 +90,17 @@
7690
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */91/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 192# define __STATFS_MATCHES_STATFS64 1
93
94/* And for getitimer, setitimer and rusage */
95# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
79#else96#else
80# define __RLIM_T_MATCHES_RLIM64_T 097# define __RLIM_T_MATCHES_RLIM64_T 0
8198
82# define __STATFS_MATCHES_STATFS64 099# define __STATFS_MATCHES_STATFS64 0
100
101# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
83#endif102#endif
103
84/* Number of descriptors that can fit in an `fd_set'. */104/* Number of descriptors that can fit in an `fd_set'. */
85#define __FD_SETSIZE 1024105#define __FD_SETSIZE 1024
86106
lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h+1-4
...@@ -15,10 +15,7 @@...@@ -15,10 +15,7 @@
15#define __stub_chflags15#define __stub_chflags
16#define __stub_fchflags16#define __stub_fchflags
17#define __stub_gtty17#define __stub_gtty
18#define __stub_lchmod
19#define __stub_revoke18#define __stub_revoke
20#define __stub_setlogin19#define __stub_setlogin
21#define __stub_sigreturn20#define __stub_sigreturn
22#define __stub_sstk
23#define __stub_stty
24#define __stub_sysctl
\ No newline at end of file
21#define __stub_stty
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h+20-1
...@@ -53,4 +53,23 @@...@@ -53,4 +53,23 @@
53#define HWCAP_SSBS (1 << 28)53#define HWCAP_SSBS (1 << 28)
54#define HWCAP_SB (1 << 29)54#define HWCAP_SB (1 << 29)
55#define HWCAP_PACA (1 << 30)55#define HWCAP_PACA (1 << 30)
56#define HWCAP_PACG (1UL << 31)
\ No newline at end of file
56#define HWCAP_PACG (1UL << 31)
57
58#define HWCAP2_DCPODP (1 << 0)
59#define HWCAP2_SVE2 (1 << 1)
60#define HWCAP2_SVEAES (1 << 2)
61#define HWCAP2_SVEPMULL (1 << 3)
62#define HWCAP2_SVEBITPERM (1 << 4)
63#define HWCAP2_SVESHA3 (1 << 5)
64#define HWCAP2_SVESM4 (1 << 6)
65#define HWCAP2_FLAGM2 (1 << 7)
66#define HWCAP2_FRINT (1 << 8)
67#define HWCAP2_SVEI8MM (1 << 9)
68#define HWCAP2_SVEF32MM (1 << 10)
69#define HWCAP2_SVEF64MM (1 << 11)
70#define HWCAP2_SVEBF16 (1 << 12)
71#define HWCAP2_I8MM (1 << 13)
72#define HWCAP2_BF16 (1 << 14)
73#define HWCAP2_DGH (1 << 15)
74#define HWCAP2_RNG (1 << 16)
75#define HWCAP2_BTI (1 << 17)
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h+1-1
...@@ -18,4 +18,4 @@...@@ -18,4 +18,4 @@
1818
19/* long double is distinct from double, so there is nothing to19/* long double is distinct from double, so there is nothing to
20 define here. */20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h+29-9
...@@ -26,31 +26,45 @@...@@ -26,31 +26,45 @@
2626
27/* See <bits/types.h> for the meaning of these macros. This file exists so27/* See <bits/types.h> for the meaning of these macros. This file exists so
28 that <bits/types.h> need not vary across different GNU platforms. */28 that <bits/types.h> need not vary across different GNU platforms. */
29#if __TIMESIZE == 64 && __WORDSIZE == 32
30/* These are the "new" y2038 types defined for architectures added after
31 the 5.1 kernel. */
32# define __INO_T_TYPE __UQUAD_TYPE
33# define __OFF_T_TYPE __SQUAD_TYPE
34# define __RLIM_T_TYPE __UQUAD_TYPE
35# define __BLKCNT_T_TYPE __SQUAD_TYPE
36# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
37# define __FSFILCNT_T_TYPE __UQUAD_TYPE
38# define __TIME_T_TYPE __SQUAD_TYPE
39# define __SUSECONDS_T_TYPE __SQUAD_TYPE
40#else
41# define __INO_T_TYPE __ULONGWORD_TYPE
42# define __OFF_T_TYPE __SLONGWORD_TYPE
43# define __RLIM_T_TYPE __ULONGWORD_TYPE
44# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
45# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
46# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47# define __TIME_T_TYPE __SLONGWORD_TYPE
48# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
49#endif
2950
30#define __DEV_T_TYPE __UQUAD_TYPE51#define __DEV_T_TYPE __UQUAD_TYPE
31#define __UID_T_TYPE __U32_TYPE52#define __UID_T_TYPE __U32_TYPE
32#define __GID_T_TYPE __U32_TYPE53#define __GID_T_TYPE __U32_TYPE
33#define __INO_T_TYPE __ULONGWORD_TYPE
34#define __INO64_T_TYPE __UQUAD_TYPE54#define __INO64_T_TYPE __UQUAD_TYPE
35#define __MODE_T_TYPE __U32_TYPE55#define __MODE_T_TYPE __U32_TYPE
36#define __NLINK_T_TYPE __U32_TYPE56#define __NLINK_T_TYPE __U32_TYPE
37#define __OFF_T_TYPE __SLONGWORD_TYPE
38#define __OFF64_T_TYPE __SQUAD_TYPE57#define __OFF64_T_TYPE __SQUAD_TYPE
39#define __PID_T_TYPE __S32_TYPE58#define __PID_T_TYPE __S32_TYPE
40#define __RLIM_T_TYPE __ULONGWORD_TYPE
41#define __RLIM64_T_TYPE __UQUAD_TYPE59#define __RLIM64_T_TYPE __UQUAD_TYPE
42#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
43#define __BLKCNT64_T_TYPE __SQUAD_TYPE60#define __BLKCNT64_T_TYPE __SQUAD_TYPE
44#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE61#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
46#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47#define __FSFILCNT64_T_TYPE __UQUAD_TYPE62#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
48#define __FSWORD_T_TYPE __SWORD_TYPE63#define __FSWORD_T_TYPE __SWORD_TYPE
49#define __ID_T_TYPE __U32_TYPE64#define __ID_T_TYPE __U32_TYPE
50#define __CLOCK_T_TYPE __SLONGWORD_TYPE65#define __CLOCK_T_TYPE __SLONGWORD_TYPE
51#define __TIME_T_TYPE __SLONGWORD_TYPE
52#define __USECONDS_T_TYPE __U32_TYPE66#define __USECONDS_T_TYPE __U32_TYPE
53#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -62,7 +76,7 @@...@@ -62,7 +76,7 @@
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE76#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE77#define __CPU_MASK_TYPE __ULONGWORD_TYPE
6478
65#ifdef __LP64__79#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
66/* Tell the libc code that off_t and off64_t are actually the same type80/* 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 types81 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */82 for C type-checking purposes. */
...@@ -76,11 +90,17 @@...@@ -76,11 +90,17 @@
7690
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */91/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 192# define __STATFS_MATCHES_STATFS64 1
93
94/* And for getitimer, setitimer and rusage */
95# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
79#else96#else
80# define __RLIM_T_MATCHES_RLIM64_T 097# define __RLIM_T_MATCHES_RLIM64_T 0
8198
82# define __STATFS_MATCHES_STATFS64 099# define __STATFS_MATCHES_STATFS64 0
100
101# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
83#endif102#endif
103
84/* Number of descriptors that can fit in an `fd_set'. */104/* Number of descriptors that can fit in an `fd_set'. */
85#define __FD_SETSIZE 1024105#define __FD_SETSIZE 1024
86106
lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h+1-4
...@@ -15,10 +15,7 @@...@@ -15,10 +15,7 @@
15#define __stub_chflags15#define __stub_chflags
16#define __stub_fchflags16#define __stub_fchflags
17#define __stub_gtty17#define __stub_gtty
18#define __stub_lchmod
19#define __stub_revoke18#define __stub_revoke
20#define __stub_setlogin19#define __stub_setlogin
21#define __stub_sigreturn20#define __stub_sigreturn
22#define __stub_sstk
23#define __stub_stty
24#define __stub_sysctl
\ No newline at end of file
21#define __stub_stty
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/long-double.h+14-1
...@@ -37,4 +37,17 @@...@@ -37,4 +37,17 @@
37#ifndef __NO_LONG_DOUBLE_MATH37#ifndef __NO_LONG_DOUBLE_MATH
38# define __NO_LONG_DOUBLE_MATH 138# define __NO_LONG_DOUBLE_MATH 1
39#endif39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
40
41/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
42 choice of the underlying ABI of long double. It will always assume
43 a constant value for each translation unit.
44
45 If the value is non-zero, any API which is parameterized by the long
46 double type (i.e the scanf/printf family of functions or the explicitly
47 parameterized math.h functions) will be redirected to a compatible
48 implementation using _Float128 ABI via symbols suffixed with ieee128.
49
50 The mechanism this macro uses to acquire may be a function
51 of architecture, or target specific options used to invoke the
52 compiler. */
53#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/arm-linux-gnueabi/bits/semaphore.h+9-4
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
34
4 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,16 +13,20 @@...@@ -12,16 +13,20 @@
12 Lesser General Public License for more details.13 Lesser General Public License for more details.
1314
14 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1718
18#ifndef _SEMAPHORE_H19#ifndef _SEMAPHORE_H
19# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
20#endif21#endif
2122
23#include <bits/wordsize.h>
2224
23#define __SIZEOF_SEM_T 1625#if __WORDSIZE == 64
2426# define __SIZEOF_SEM_T 32
27#else
28# define __SIZEOF_SEM_T 16
29#endif
2530
26/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
27#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
lib/libc/include/arm-linux-gnueabihf/bits/long-double.h+14-1
...@@ -37,4 +37,17 @@...@@ -37,4 +37,17 @@
37#ifndef __NO_LONG_DOUBLE_MATH37#ifndef __NO_LONG_DOUBLE_MATH
38# define __NO_LONG_DOUBLE_MATH 138# define __NO_LONG_DOUBLE_MATH 1
39#endif39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
40
41/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
42 choice of the underlying ABI of long double. It will always assume
43 a constant value for each translation unit.
44
45 If the value is non-zero, any API which is parameterized by the long
46 double type (i.e the scanf/printf family of functions or the explicitly
47 parameterized math.h functions) will be redirected to a compatible
48 implementation using _Float128 ABI via symbols suffixed with ieee128.
49
50 The mechanism this macro uses to acquire may be a function
51 of architecture, or target specific options used to invoke the
52 compiler. */
53#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h+9-4
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
34
4 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,16 +13,20 @@...@@ -12,16 +13,20 @@
12 Lesser General Public License for more details.13 Lesser General Public License for more details.
1314
14 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1718
18#ifndef _SEMAPHORE_H19#ifndef _SEMAPHORE_H
19# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
20#endif21#endif
2122
23#include <bits/wordsize.h>
2224
23#define __SIZEOF_SEM_T 1625#if __WORDSIZE == 64
2426# define __SIZEOF_SEM_T 32
27#else
28# define __SIZEOF_SEM_T 16
29#endif
2530
26/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
27#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
lib/libc/include/armeb-linux-gnueabi/bits/long-double.h+14-1
...@@ -37,4 +37,17 @@...@@ -37,4 +37,17 @@
37#ifndef __NO_LONG_DOUBLE_MATH37#ifndef __NO_LONG_DOUBLE_MATH
38# define __NO_LONG_DOUBLE_MATH 138# define __NO_LONG_DOUBLE_MATH 1
39#endif39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
40
41/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
42 choice of the underlying ABI of long double. It will always assume
43 a constant value for each translation unit.
44
45 If the value is non-zero, any API which is parameterized by the long
46 double type (i.e the scanf/printf family of functions or the explicitly
47 parameterized math.h functions) will be redirected to a compatible
48 implementation using _Float128 ABI via symbols suffixed with ieee128.
49
50 The mechanism this macro uses to acquire may be a function
51 of architecture, or target specific options used to invoke the
52 compiler. */
53#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h+9-4
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
34
4 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,16 +13,20 @@...@@ -12,16 +13,20 @@
12 Lesser General Public License for more details.13 Lesser General Public License for more details.
1314
14 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1718
18#ifndef _SEMAPHORE_H19#ifndef _SEMAPHORE_H
19# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
20#endif21#endif
2122
23#include <bits/wordsize.h>
2224
23#define __SIZEOF_SEM_T 1625#if __WORDSIZE == 64
2426# define __SIZEOF_SEM_T 32
27#else
28# define __SIZEOF_SEM_T 16
29#endif
2530
26/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
27#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h+14-1
...@@ -37,4 +37,17 @@...@@ -37,4 +37,17 @@
37#ifndef __NO_LONG_DOUBLE_MATH37#ifndef __NO_LONG_DOUBLE_MATH
38# define __NO_LONG_DOUBLE_MATH 138# define __NO_LONG_DOUBLE_MATH 1
39#endif39#endif
40#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
40
41/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
42 choice of the underlying ABI of long double. It will always assume
43 a constant value for each translation unit.
44
45 If the value is non-zero, any API which is parameterized by the long
46 double type (i.e the scanf/printf family of functions or the explicitly
47 parameterized math.h functions) will be redirected to a compatible
48 implementation using _Float128 ABI via symbols suffixed with ieee128.
49
50 The mechanism this macro uses to acquire may be a function
51 of architecture, or target specific options used to invoke the
52 compiler. */
53#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h+9-4
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
34
4 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,16 +13,20 @@...@@ -12,16 +13,20 @@
12 Lesser General Public License for more details.13 Lesser General Public License for more details.
1314
14 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1718
18#ifndef _SEMAPHORE_H19#ifndef _SEMAPHORE_H
19# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
20#endif21#endif
2122
23#include <bits/wordsize.h>
2224
23#define __SIZEOF_SEM_T 1625#if __WORDSIZE == 64
2426# define __SIZEOF_SEM_T 32
27#else
28# define __SIZEOF_SEM_T 16
29#endif
2530
26/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
27#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
lib/libc/include/generic-glibc/argp.h+2-1
...@@ -554,7 +554,8 @@ __NTH (__option_is_end (const struct argp_option *__opt))...@@ -554,7 +554,8 @@ __NTH (__option_is_end (const struct argp_option *__opt))
554# endif554# endif
555#endif /* Use extern inlines. */555#endif /* Use extern inlines. */
556556
557#ifdef __LDBL_COMPAT557#include <bits/floatn.h>
558#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
558# include <bits/argp-ldbl.h>559# include <bits/argp-ldbl.h>
559#endif560#endif
560561
lib/libc/include/generic-glibc/bits/a.out.h+5-1
...@@ -2,6 +2,10 @@...@@ -2,6 +2,10 @@
2# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."2# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
3#endif3#endif
44
5#ifdef __x86_64__
6
5/* Signal to users of this header that this architecture really doesn't7/* Signal to users of this header that this architecture really doesn't
6 support a.out binary format. */8 support a.out binary format. */
7#define __NO_A_OUT_SUPPORT 1
\ No newline at end of file
9#define __NO_A_OUT_SUPPORT 1
10
11#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/endianness.h+2-7
...@@ -5,12 +5,7 @@...@@ -5,12 +5,7 @@
5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."5# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
6#endif6#endif
77
8/* MIPS has selectable endianness. */8/* i386/x86_64 are little-endian. */
9#ifdef __MIPSEB9#define __BYTE_ORDER __LITTLE_ENDIAN
10# define __BYTE_ORDER __BIG_ENDIAN
11#endif
12#ifdef __MIPSEL
13# define __BYTE_ORDER __LITTLE_ENDIAN
14#endif
1510
16#endif /* bits/endianness.h */11#endif /* bits/endianness.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/environments.h+43-25
...@@ -41,13 +41,16 @@...@@ -41,13 +41,16 @@
4141
42#if __WORDSIZE == 6442#if __WORDSIZE == 64
4343
44/* We can never provide environments with 32-bit wide pointers. */44/* Environments with 32-bit wide pointers are optionally provided.
45# define _POSIX_V7_ILP32_OFF32 -145 Therefore following macros aren't defined:
46# define _POSIX_V7_ILP32_OFFBIG -146 # undef _POSIX_V7_ILP32_OFF32
47# define _POSIX_V6_ILP32_OFF32 -147 # undef _POSIX_V7_ILP32_OFFBIG
48# define _POSIX_V6_ILP32_OFFBIG -148 # undef _POSIX_V6_ILP32_OFF32
49# define _XBS5_ILP32_OFF32 -149 # undef _POSIX_V6_ILP32_OFFBIG
50# define _XBS5_ILP32_OFFBIG -150 # undef _XBS5_ILP32_OFF32
51 # undef _XBS5_ILP32_OFFBIG
52 and users need to check at runtime. */
53
51/* We also have no use (for now) for an environment with bigger pointers54/* We also have no use (for now) for an environment with bigger pointers
52 and offsets. */55 and offsets. */
53# define _POSIX_V7_LPBIG_OFFBIG -156# define _POSIX_V7_LPBIG_OFFBIG -1
...@@ -61,27 +64,42 @@...@@ -61,27 +64,42 @@
6164
62#else /* __WORDSIZE == 32 */65#else /* __WORDSIZE == 32 */
6366
64/* By default we have 32-bit wide `int', `long int', pointers and `off_t'67/* We have 32-bit wide `int', `long int' and pointers and all platforms
65 and all platforms support LFS. */68 support LFS. -mx32 has 64-bit wide `off_t'. */
66# define _POSIX_V7_ILP32_OFF32 1
67# define _POSIX_V7_ILP32_OFFBIG 169# define _POSIX_V7_ILP32_OFFBIG 1
68# define _POSIX_V6_ILP32_OFF32 170# define _POSIX_V6_ILP32_OFFBIG 1
69# define _POSIX_V6_ILP32_OFFBIG 1
70# define _XBS5_ILP32_OFF32 1
71# define _XBS5_ILP32_OFFBIG 171# define _XBS5_ILP32_OFFBIG 1
7272
73# ifndef __x86_64__
74/* -m32 has 32-bit wide `off_t'. */
75# define _POSIX_V7_ILP32_OFF32 1
76# define _POSIX_V6_ILP32_OFF32 1
77# define _XBS5_ILP32_OFF32 1
78# endif
79
73/* We optionally provide an environment with the above size but an 64-bit80/* We optionally provide an environment with the above size but an 64-bit
74 side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */81 side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
7582
76/* We can never provide environments with 64-bit wide pointers. */
77# define _POSIX_V7_LP64_OFF64 -1
78# define _POSIX_V7_LPBIG_OFFBIG -1
79# define _POSIX_V6_LP64_OFF64 -1
80# define _POSIX_V6_LPBIG_OFFBIG -1
81# define _XBS5_LP64_OFF64 -1
82# define _XBS5_LPBIG_OFFBIG -1
83
84/* CFLAGS. */
85#define __ILP32_OFFBIG_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
86
87#endif /* __WORDSIZE == 32 */
\ No newline at end of file
83/* Environments with 64-bit wide pointers can be provided,
84 so these macros aren't defined:
85 # undef _POSIX_V7_LP64_OFF64
86 # undef _POSIX_V7_LPBIG_OFFBIG
87 # undef _POSIX_V6_LP64_OFF64
88 # undef _POSIX_V6_LPBIG_OFFBIG
89 # undef _XBS5_LP64_OFF64
90 # undef _XBS5_LPBIG_OFFBIG
91 and sysconf tests for it at runtime. */
92
93#endif /* __WORDSIZE == 32 */
94
95#define __ILP32_OFF32_CFLAGS "-m32"
96#define __ILP32_OFF32_LDFLAGS "-m32"
97#if defined __x86_64__ && defined __ILP32__
98# define __ILP32_OFFBIG_CFLAGS "-mx32"
99# define __ILP32_OFFBIG_LDFLAGS "-mx32"
100#else
101# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
102# define __ILP32_OFFBIG_LDFLAGS "-m32"
103#endif
104#define __LP64_OFF64_CFLAGS "-m64"
105#define __LP64_OFF64_LDFLAGS "-m64"
\ No newline at end of file
lib/libc/include/generic-glibc/bits/epoll.h+3-1
...@@ -24,4 +24,6 @@ enum...@@ -24,4 +24,6 @@ enum
24 {24 {
25 EPOLL_CLOEXEC = 0200000025 EPOLL_CLOEXEC = 02000000
26#define EPOLL_CLOEXEC EPOLL_CLOEXEC26#define EPOLL_CLOEXEC EPOLL_CLOEXEC
27 };
\ No newline at end of file
27 };
28
29#define __EPOLL_PACKED __attribute__ ((__packed__))
\ No newline at end of file
lib/libc/include/generic-glibc/bits/fcntl-linux.h+2-1
...@@ -290,7 +290,8 @@ struct f_owner_ex...@@ -290,7 +290,8 @@ struct f_owner_ex
290290
291#ifdef __USE_GNU291#ifdef __USE_GNU
292/* Hint values for F_{GET,SET}_RW_HINT. */292/* Hint values for F_{GET,SET}_RW_HINT. */
293# define RWF_WRITE_LIFE_NOT_SET 0293# define RWH_WRITE_LIFE_NOT_SET 0
294# define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
294# define RWH_WRITE_LIFE_NONE 1295# define RWH_WRITE_LIFE_NONE 1
295# define RWH_WRITE_LIFE_SHORT 2296# define RWH_WRITE_LIFE_SHORT 2
296# define RWH_WRITE_LIFE_MEDIUM 3297# define RWH_WRITE_LIFE_MEDIUM 3
lib/libc/include/generic-glibc/bits/fcntl.h+11-54
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* O_*, F_*, FD_* bit values for Linux.1/* O_*, F_*, FD_* bit values for Linux/x86.
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -13,56 +13,24 @@...@@ -13,56 +13,24 @@
13 Lesser General Public License for more details.13 Lesser General Public License for more details.
1414
15 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#ifndef _FCNTL_H19#ifndef _FCNTL_H
20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21#endif21#endif
2222
23#include <sgidefs.h>23#ifdef __x86_64__
2424# define __O_LARGEFILE 0
25#define O_APPEND 0x0008
26#define O_SYNC 0x4010
27#define O_NONBLOCK 0x0080
28#define O_CREAT 0x0100 /* not fcntl */
29#define O_TRUNC 0x0200 /* not fcntl */
30#define O_EXCL 0x0400 /* not fcntl */
31#define O_NOCTTY 0x0800 /* not fcntl */
32#define O_ASYNC 0x1000
33
34#define __O_DIRECT 0x8000 /* Direct disk access hint. */
35#define __O_DSYNC 0x0010 /* Synchronize data. */
36
37#if _MIPS_SIM == _ABI64
38/* Not necessary, files are always with 64bit off_t. */
39# define __O_LARGEFILE 0
40#else
41# define __O_LARGEFILE 0x2000 /* Allow large file opens. */
42#endif25#endif
4326
44#ifndef __USE_FILE_OFFSET6427#ifdef __x86_64__
45# define F_GETLK 14 /* Get record locking info. */28/* Not necessary, we always have 64-bit offsets. */
46# define F_SETLK 6 /* Set record locking info (non-blocking). */29# define F_GETLK64 5 /* Get record locking info. */
47# define F_SETLKW 7 /* Set record locking info (blocking). */30# define F_SETLK64 6 /* Set record locking info (non-blocking). */
48#else31# define F_SETLKW64 7 /* Set record locking info (blocking). */
49# define F_GETLK F_GETLK64 /* Get record locking info. */
50# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
51# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
52#endif32#endif
5333
54#if _MIPS_SIM != _ABI64
55# define F_GETLK64 33 /* Get record locking info. */
56# define F_SETLK64 34 /* Set record locking info (non-blocking). */
57# define F_SETLKW64 35 /* Set record locking info (blocking). */
58#else
59# define F_GETLK64 14 /* Get record locking info. */
60# define F_SETLK64 6 /* Set record locking info (non-blocking).*/
61# define F_SETLKW64 7 /* Set record locking info (blocking). */
62#endif
63
64#define __F_SETOWN 24 /* Get owner (process receiving SIGIO). */
65#define __F_GETOWN 23 /* Set owner (process receiving SIGIO). */
6634
67struct flock35struct flock
68 {36 {
...@@ -71,23 +39,12 @@ struct flock...@@ -71,23 +39,12 @@ struct flock
71#ifndef __USE_FILE_OFFSET6439#ifndef __USE_FILE_OFFSET64
72 __off_t l_start; /* Offset where the lock begins. */40 __off_t l_start; /* Offset where the lock begins. */
73 __off_t l_len; /* Size of the locked area; zero means until EOF. */41 __off_t l_len; /* Size of the locked area; zero means until EOF. */
74#if _MIPS_SIM != _ABI64
75 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
76 fcntls in o32 and n32, never has this field. */
77 long int l_sysid;
78#endif
79#else42#else
80 __off64_t l_start; /* Offset where the lock begins. */43 __off64_t l_start; /* Offset where the lock begins. */
81 __off64_t l_len; /* Size of the locked area; zero means until EOF. */44 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
82#endif45#endif
83 __pid_t l_pid; /* Process holding the lock. */46 __pid_t l_pid; /* Process holding the lock. */
84#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64
85 /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
86 flock in o32 and n32, never has this field. */
87 long int __glibc_reserved0[4];
88#endif
89 };47 };
90typedef struct flock flock_t;
9148
92#ifdef __USE_LARGEFILE6449#ifdef __USE_LARGEFILE64
93struct flock6450struct flock64
lib/libc/include/generic-glibc/bits/fenv.h+55-52
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.1/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,101 +12,104 @@...@@ -12,101 +12,104 @@
12 Lesser General Public License for more details.12 Lesser General Public License for more details.
1313
14 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1717
18#ifndef _FENV_H18#ifndef _FENV_H
19# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."19# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
20#endif20#endif
2121
22
23#ifdef __mips_hard_float
24
25/* Define bits representing the exception. We use the bit positions22/* Define bits representing the exception. We use the bit positions
26 of the appropriate bits in the FPU control word. */23 of the appropriate bits in the FPU control word. */
27enum24enum
28 {25 {
29 FE_INEXACT =
30# define FE_INEXACT 0x04
31 FE_INEXACT,
32 FE_UNDERFLOW =
33# define FE_UNDERFLOW 0x08
34 FE_UNDERFLOW,
35 FE_OVERFLOW =
36# define FE_OVERFLOW 0x10
37 FE_OVERFLOW,
38 FE_DIVBYZERO =
39# define FE_DIVBYZERO 0x20
40 FE_DIVBYZERO,
41 FE_INVALID =26 FE_INVALID =
42# define FE_INVALID 0x4027#define FE_INVALID 0x01
43 FE_INVALID,28 FE_INVALID,
29 __FE_DENORM = 0x02,
30 FE_DIVBYZERO =
31#define FE_DIVBYZERO 0x04
32 FE_DIVBYZERO,
33 FE_OVERFLOW =
34#define FE_OVERFLOW 0x08
35 FE_OVERFLOW,
36 FE_UNDERFLOW =
37#define FE_UNDERFLOW 0x10
38 FE_UNDERFLOW,
39 FE_INEXACT =
40#define FE_INEXACT 0x20
41 FE_INEXACT
44 };42 };
4543
46# define FE_ALL_EXCEPT \44#define FE_ALL_EXCEPT \
47 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)45 (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
4846
49/* The MIPS FPU supports all of the four defined rounding modes. We47/* The ix87 FPU supports all of the four defined rounding modes. We
50 use again the bit positions in the FPU control word as the values48 use again the bit positions in the FPU control word as the values
51 for the appropriate macros. */49 for the appropriate macros. */
52enum50enum
53 {51 {
54 FE_TONEAREST =52 FE_TONEAREST =
55# define FE_TONEAREST 0x053#define FE_TONEAREST 0
56 FE_TONEAREST,54 FE_TONEAREST,
57 FE_TOWARDZERO =55 FE_DOWNWARD =
58# define FE_TOWARDZERO 0x156#define FE_DOWNWARD 0x400
59 FE_TOWARDZERO,57 FE_DOWNWARD,
60 FE_UPWARD =58 FE_UPWARD =
61# define FE_UPWARD 0x259#define FE_UPWARD 0x800
62 FE_UPWARD,60 FE_UPWARD,
63 FE_DOWNWARD =61 FE_TOWARDZERO =
64# define FE_DOWNWARD 0x362#define FE_TOWARDZERO 0xc00
65 FE_DOWNWARD63 FE_TOWARDZERO
66 };
67
68#else
69
70/* In the soft-float case, only rounding to nearest is supported, with
71 no exceptions. */
72
73enum
74 {
75 __FE_UNDEFINED = -1,
76
77 FE_TONEAREST =
78# define FE_TONEAREST 0x0
79 FE_TONEAREST
80 };64 };
8165
82# define FE_ALL_EXCEPT 0
83
84#endif
85
8666
87/* Type representing exception flags. */67/* Type representing exception flags. */
88typedef unsigned short int fexcept_t;68typedef unsigned short int fexcept_t;
8969
9070
91/* Type representing floating-point environment. This function corresponds71/* Type representing floating-point environment. This structure
92 to the layout of the block written by the `fstenv'. */72 corresponds to the layout of the block written by the `fstenv'
73 instruction and has additional fields for the contents of the MXCSR
74 register as written by the `stmxcsr' instruction. */
93typedef struct75typedef struct
94 {76 {
95 unsigned int __fp_control_register;77 unsigned short int __control_word;
78 unsigned short int __glibc_reserved1;
79 unsigned short int __status_word;
80 unsigned short int __glibc_reserved2;
81 unsigned short int __tags;
82 unsigned short int __glibc_reserved3;
83 unsigned int __eip;
84 unsigned short int __cs_selector;
85 unsigned int __opcode:11;
86 unsigned int __glibc_reserved4:5;
87 unsigned int __data_offset;
88 unsigned short int __data_selector;
89 unsigned short int __glibc_reserved5;
90#ifdef __x86_64__
91 unsigned int __mxcsr;
92#endif
96 }93 }
97fenv_t;94fenv_t;
9895
99/* If the default argument is used we use this value. */96/* If the default argument is used we use this value. */
100#define FE_DFL_ENV ((const fenv_t *) -1)97#define FE_DFL_ENV ((const fenv_t *) -1)
10198
102#if defined __USE_GNU && defined __mips_hard_float99#ifdef __USE_GNU
103/* Floating-point environment where none of the exception is masked. */100/* Floating-point environment where none of the exception is masked. */
104# define FE_NOMASK_ENV ((const fenv_t *) -2)101# define FE_NOMASK_ENV ((const fenv_t *) -2)
105#endif102#endif
106103
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)104#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
108/* Type representing floating-point control modes. */105/* Type representing floating-point control modes. */
109typedef unsigned int femode_t;106typedef struct
107 {
108 unsigned short int __control_word;
109 unsigned short int __glibc_reserved;
110 unsigned int __mxcsr;
111 }
112femode_t;
110113
111/* Default floating-point control modes. */114/* Default floating-point control modes. */
112# define FE_DFL_MODE ((const femode_t *) -1L)115# define FE_DFL_MODE ((const femode_t *) -1L)
lib/libc/include/generic-glibc/bits/fenvinline.h deleted-8
...@@ -1,8 +0,0 @@
1/* This file provides inline versions of floating-pint environment
2 handling functions. If there were any. */
3
4#ifndef __NO_MATH_INLINES
5
6/* Here is where the code would go. */
7
8#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/floatn.h+43-19
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Macros to control TS 18661-3 glibc features on MIPS platforms.1/* Macros to control TS 18661-3 glibc features on x86.
2 Copyright (C) 2017-2020 Free Software Foundation, Inc.2 Copyright (C) 2017-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -20,35 +20,38 @@...@@ -20,35 +20,38 @@
20#define _BITS_FLOATN_H20#define _BITS_FLOATN_H
2121
22#include <features.h>22#include <features.h>
23#include <bits/long-double.h>
2423
25/* Defined to 1 if the current compiler invocation provides a24/* Defined to 1 if the current compiler invocation provides a
26 floating-point type with the IEEE 754 binary128 format, and this25 floating-point type with the IEEE 754 binary128 format, and this
27 glibc includes corresponding *f128 interfaces for it. */26 glibc includes corresponding *f128 interfaces for it. The required
28#ifndef __NO_LONG_DOUBLE_MATH27 libgcc support was added some time after the basic compiler
28 support, for x86_64 and x86. */
29#if (defined __x86_64__ \
30 ? __GNUC_PREREQ (4, 3) \
31 : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4)))
29# define __HAVE_FLOAT128 132# define __HAVE_FLOAT128 1
30#else33#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 034# define __HAVE_FLOAT128 0
36#endif35#endif
3736
38/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct37/* 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. */38 from the default float, double and long double types in this glibc. */
40#define __HAVE_DISTINCT_FLOAT128 039#if __HAVE_FLOAT128
40# define __HAVE_DISTINCT_FLOAT128 1
41#else
42# define __HAVE_DISTINCT_FLOAT128 0
43#endif
4144
42/* Defined to 1 if the current compiler invocation provides a45/* Defined to 1 if the current compiler invocation provides a
43 floating-point type with the right format for _Float64x, and this46 floating-point type with the right format for _Float64x, and this
44 glibc includes corresponding *f64x interfaces for it. */47 glibc includes corresponding *f64x interfaces for it. */
45#define __HAVE_FLOAT64X __HAVE_FLOAT12848#define __HAVE_FLOAT64X 1
4649
47/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format50/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
48 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has51 of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
49 the format of _Float128, which must be different from that of long52 the format of _Float128, which must be different from that of long
50 double. */53 double. */
51#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT12854#define __HAVE_FLOAT64X_LONG_DOUBLE 1
5255
53#ifndef __ASSEMBLER__56#ifndef __ASSEMBLER__
5457
...@@ -57,7 +60,7 @@...@@ -57,7 +60,7 @@
57# if __HAVE_FLOAT12860# if __HAVE_FLOAT128
58# if !__GNUC_PREREQ (7, 0) || defined __cplusplus61# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
59/* The literal suffix f128 exists only since GCC 7.0. */62/* The literal suffix f128 exists only since GCC 7.0. */
60# define __f128(x) x##l63# define __f128(x) x##q
61# else64# else
62# define __f128(x) x##f12865# define __f128(x) x##f128
63# endif66# endif
...@@ -66,7 +69,10 @@...@@ -66,7 +69,10 @@
66/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */69/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
67# if __HAVE_FLOAT12870# if __HAVE_FLOAT128
68# if !__GNUC_PREREQ (7, 0) || defined __cplusplus71# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
69# define __CFLOAT128 _Complex long double72/* Add a typedef for older GCC compilers which don't natively support
73 _Complex _Float128. */
74typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
75# define __CFLOAT128 __cfloat128
70# else76# else
71# define __CFLOAT128 _Complex _Float12877# define __CFLOAT128 _Complex _Float128
72# endif78# endif
...@@ -77,15 +83,33 @@...@@ -77,15 +83,33 @@
7783
78/* The type _Float128 exists only since GCC 7.0. */84/* The type _Float128 exists only since GCC 7.0. */
79# if !__GNUC_PREREQ (7, 0) || defined __cplusplus85# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
80typedef long double _Float128;86typedef __float128 _Float128;
81# endif87# endif
8288
83/* Various built-in functions do not exist before GCC 7.0. */89/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */
84# if !__GNUC_PREREQ (7, 0)90# if !__GNUC_PREREQ (7, 0)
85# define __builtin_huge_valf128() (__builtin_huge_vall ())91# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
86# define __builtin_inff128() (__builtin_infl ())92# endif
87# define __builtin_nanf128(x) (__builtin_nanl (x))93
88# define __builtin_nansf128(x) (__builtin_nansl (x))94/* Older GCC has only a subset of built-in functions for _Float128 on
95 x86, and __builtin_infq is not usable in static initializers.
96 Converting a narrower sNaN to _Float128 produces a quiet NaN, so
97 attempts to use _Float128 sNaNs will not work properly with older
98 compilers. */
99# if !__GNUC_PREREQ (7, 0)
100# define __builtin_copysignf128 __builtin_copysignq
101# define __builtin_fabsf128 __builtin_fabsq
102# define __builtin_inff128() ((_Float128) __builtin_inf ())
103# define __builtin_nanf128(x) ((_Float128) __builtin_nan (x))
104# define __builtin_nansf128(x) ((_Float128) __builtin_nans (x))
105# endif
106
107/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
108 e.g.: __builtin_signbitf128, before GCC 6. However, there has never
109 been a __builtin_signbitf128 in GCC and the type-generic builtin is
110 only available since GCC 6. */
111# if !__GNUC_PREREQ (6, 0)
112# define __builtin_signbitf128 __signbitf128
89# endif113# endif
90114
91# endif115# endif
lib/libc/include/generic-glibc/bits/flt-eval-method.h+4-13
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Define __GLIBC_FLT_EVAL_METHOD.1/* Define __GLIBC_FLT_EVAL_METHOD. x86 version.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -20,23 +20,14 @@...@@ -20,23 +20,14 @@
20# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."20# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
21#endif21#endif
2222
23/* __GLIBC_FLT_EVAL_METHOD is the value of FLT_EVAL_METHOD used to
24 determine the evaluation method typedefs such as float_t and
25 double_t. It must be a value from C11 or TS 18661-3:2015, and not
26 -1. */
27
28/* 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. */
33
34#ifdef __FLT_EVAL_METHOD__23#ifdef __FLT_EVAL_METHOD__
35# if __FLT_EVAL_METHOD__ == -124# if __FLT_EVAL_METHOD__ == -1
36# define __GLIBC_FLT_EVAL_METHOD 225# define __GLIBC_FLT_EVAL_METHOD 2
37# else26# else
38# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__27# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
39# endif28# endif
40#else29#elif defined __x86_64__
41# define __GLIBC_FLT_EVAL_METHOD 030# define __GLIBC_FLT_EVAL_METHOD 0
31#else
32# define __GLIBC_FLT_EVAL_METHOD 2
42#endif33#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/fp-logb.h+3-7
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.1/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -20,9 +20,5 @@...@@ -20,9 +20,5 @@
20# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."20# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
21#endif21#endif
2222
23/* __FP_LOGB0_IS_MIN is defined to 1 if FP_ILOGB0 is INT_MIN, and 0 if
24 it is -INT_MAX. __FP_LOGBNAN_IS_MIN is defined to 1 if FP_ILOGBNAN
25 is INT_MIN, and 0 if it is INT_MAX. */
26
27#define __FP_LOGB0_IS_MIN 0
28#define __FP_LOGBNAN_IS_MIN 0
\ No newline at end of file
23#define __FP_LOGB0_IS_MIN 1
24#define __FP_LOGBNAN_IS_MIN 1
\ No newline at end of file
lib/libc/include/generic-glibc/bits/indirect-return.h+16-4
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Definition of __INDIRECT_RETURN. Generic version.1/* Definition of __INDIRECT_RETURN. x86 version.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -20,6 +20,18 @@...@@ -20,6 +20,18 @@
20# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."20# error "Never include <bits/indirect-return.h> directly; use <ucontext.h> instead."
21#endif21#endif
2222
23/* __INDIRECT_RETURN is used on swapcontext to indicate if it requires
24 special compiler treatment. */
25#define __INDIRECT_RETURN
\ No newline at end of file
23/* On x86, swapcontext returns via indirect branch when the shadow stack
24 is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext
25 returns via indirect branch. */
26#if defined __CET__ && (__CET__ & 2) != 0
27# if __glibc_has_attribute (__indirect_return__)
28# define __INDIRECT_RETURN __attribute__ ((__indirect_return__))
29# else
30/* Newer compilers provide the indirect_return attribute, but without
31 it we can use returns_twice to affect the optimizer in the same
32 way and avoid unsafe optimizations. */
33# define __INDIRECT_RETURN __attribute__ ((__returns_twice__))
34# endif
35#else
36# define __INDIRECT_RETURN
37#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/ipctypes.h+8-11
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic.1/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -16,21 +16,18 @@...@@ -16,21 +16,18 @@
16 License along with the GNU C Library; if not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19/*19#ifndef _SYS_IPC_H
20 * Never include <bits/ipctypes.h> directly.20# error "Never use <bits/ipctypes.h> directly; include <sys/ipc.h> instead."
21 */21#endif
2222
23#ifndef _BITS_IPCTYPES_H23#ifndef _BITS_IPCTYPES_H
24#define _BITS_IPCTYPES_H 124#define _BITS_IPCTYPES_H 1
2525
26#include <bits/types.h>
27
28/* Used in `struct shmid_ds'. */26/* Used in `struct shmid_ds'. */
29# if __WORDSIZE == 3227# ifdef __x86_64__
30typedef unsigned short int __ipc_pid_t;
31# else
32typedef int __ipc_pid_t;28typedef int __ipc_pid_t;
29# else
30typedef unsigned short int __ipc_pid_t;
33# endif31# endif
3432
35
36#endif /* bits/ipctypes.h */33#endif /* bits/ipctypes.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/iscanonical.h+33-7
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Define iscanonical macro.1/* Define iscanonical macro. ldbl-96 version.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -20,9 +20,35 @@...@@ -20,9 +20,35 @@
20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
21#endif21#endif
2222
23/* Return nonzero value if X is canonical. By default, we only have
24 IEEE interchange binary formats, in which all values are canonical,
25 but the argument must still be converted to its semantic type for
26 any exceptions arising from the conversion, before being
27 discarded. */
28#define iscanonical(x) ((void) (__typeof (x)) (x), 1)
\ No newline at end of file
23extern int __iscanonicall (long double __x)
24 __THROW __attribute__ ((__const__));
25#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
26#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
27#if __HAVE_DISTINCT_FLOAT128
28# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
29#endif
30
31/* Return nonzero value if X is canonical. In IEEE interchange binary
32 formats, all values are canonical, but the argument must still be
33 converted to its semantic type for any exceptions arising from the
34 conversion, before being discarded; in extended precision, there
35 are encodings that are not consistently handled as corresponding to
36 any particular value of the type, and we return 0 for those. */
37#ifndef __cplusplus
38# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
39#else
40/* In C++ mode, __MATH_TG cannot be used, because it relies on
41 __builtin_types_compatible_p, which is a C-only builtin. On the
42 other hand, overloading provides the means to distinguish between
43 the floating-point types. The overloading resolution will match
44 the correct parameter (regardless of type qualifiers (i.e.: const
45 and volatile)). */
46extern "C++" {
47inline int iscanonical (float __val) { return __iscanonicalf (__val); }
48inline int iscanonical (double __val) { return __iscanonical (__val); }
49inline int iscanonical (long double __val) { return __iscanonicall (__val); }
50# if __HAVE_DISTINCT_FLOAT128
51inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
52# endif
53}
54#endif /* __cplusplus */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/link.h+127-85
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2005-2020 Free Software Foundation, Inc.1/* Copyright (C) 2004-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,106 +12,148 @@...@@ -12,106 +12,148 @@
12 Lesser General Public License for more details.12 Lesser General Public License for more details.
1313
14 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1717
18#ifndef _LINK_H18#ifndef _LINK_H
19# error "Never include <bits/link.h> directly; use <link.h> instead."19# error "Never include <bits/link.h> directly; use <link.h> instead."
20#endif20#endif
2121
22#include <sgidefs.h>
2322
24#if _MIPS_SIM == _ABIO3223#ifndef __x86_64__
2524/* Registers for entry into PLT on IA-32. */
26/* Registers for entry into PLT on MIPS. */25typedef struct La_i86_regs
27typedef struct La_mips_32_regs
28{26{
29 uint32_t lr_reg[4]; /* $a0 through $a3 */27 uint32_t lr_edx;
30 double lr_fpreg[2]; /* $f12 and $f14 */28 uint32_t lr_ecx;
31 uint32_t lr_ra;29 uint32_t lr_eax;
32 uint32_t lr_sp;30 uint32_t lr_ebp;
33} La_mips_32_regs;31 uint32_t lr_esp;
3432} La_i86_regs;
35/* Return values for calls from PLT on MIPS. */33
36typedef struct La_mips_32_retval34/* Return values for calls from PLT on IA-32. */
35typedef struct La_i86_retval
37{36{
38 uint32_t lrv_v0;37 uint32_t lrv_eax;
39 uint32_t lrv_v1;38 uint32_t lrv_edx;
40 double lrv_f0;39 long double lrv_st0;
41 double lrv_f2;40 long double lrv_st1;
42} La_mips_32_retval;41 uint64_t lrv_bnd0;
4342 uint64_t lrv_bnd1;
44#else43} La_i86_retval;
4544
46typedef struct La_mips_64_regs
47{
48 uint64_t lr_reg[8]; /* $a0 through $a7 */
49 double lr_fpreg[8]; /* $f12 throgh $f19 */
50 uint64_t lr_ra;
51 uint64_t lr_sp;
52} La_mips_64_regs;
53
54/* Return values for calls from PLT on MIPS. */
55typedef struct La_mips_64_retval
56{
57 uint64_t lrv_v0;
58 uint64_t lrv_v1;
59 double lrv_f0;
60 double lrv_f2;
61} La_mips_64_retval;
62
63#endif
6445
65__BEGIN_DECLS46__BEGIN_DECLS
6647
67#if _MIPS_SIM == _ABIO3248extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
6849 uintptr_t *__refcook,
69extern Elf32_Addr la_mips_o32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,50 uintptr_t *__defcook,
70 uintptr_t *__refcook,51 La_i86_regs *__regs,
71 uintptr_t *__defcook,52 unsigned int *__flags,
72 La_mips_32_regs *__regs,53 const char *__symname,
73 unsigned int *__flags,54 long int *__framesizep);
74 const char *__symname,55extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
75 long int *__framesizep);56 uintptr_t *__refcook,
76extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,57 uintptr_t *__defcook,
77 uintptr_t *__refcook,58 const La_i86_regs *__inregs,
78 uintptr_t *__defcook,59 La_i86_retval *__outregs,
79 const La_mips_32_regs *__inregs,60 const char *symname);
80 La_mips_32_retval *__outregs,61
81 const char *__symname);62__END_DECLS
82
83#elif _MIPS_SIM == _ABIN32
84
85extern Elf32_Addr la_mips_n32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
86 uintptr_t *__refcook,
87 uintptr_t *__defcook,
88 La_mips_64_regs *__regs,
89 unsigned int *__flags,
90 const char *__symname,
91 long int *__framesizep);
92extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
93 uintptr_t *__refcook,
94 uintptr_t *__defcook,
95 const La_mips_64_regs *__inregs,
96 La_mips_64_retval *__outregs,
97 const char *__symname);
9863
99#else64#else
10065
101extern Elf64_Addr la_mips_n64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,66/* Registers for entry into PLT on x86-64. */
102 uintptr_t *__refcook,67# if __GNUC_PREREQ (4,0)
103 uintptr_t *__defcook,68typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16)));
104 La_mips_64_regs *__regs,69typedef float La_x86_64_ymm
105 unsigned int *__flags,70 __attribute__ ((__vector_size__ (32), __aligned__ (16)));
106 const char *__symname,71typedef double La_x86_64_zmm
107 long int *__framesizep);72 __attribute__ ((__vector_size__ (64), __aligned__ (16)));
108extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,73# else
109 uintptr_t *__refcook,74typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__)));
110 uintptr_t *__defcook,75# endif
111 const La_mips_64_regs *__inregs,76
112 La_mips_64_retval *__outregs,77typedef union
113 const char *__symname);78{
79# if __GNUC_PREREQ (4,0)
80 La_x86_64_ymm ymm[2];
81 La_x86_64_zmm zmm[1];
82# endif
83 La_x86_64_xmm xmm[4];
84} La_x86_64_vector __attribute__ ((__aligned__ (16)));
85
86typedef struct La_x86_64_regs
87{
88 uint64_t lr_rdx;
89 uint64_t lr_r8;
90 uint64_t lr_r9;
91 uint64_t lr_rcx;
92 uint64_t lr_rsi;
93 uint64_t lr_rdi;
94 uint64_t lr_rbp;
95 uint64_t lr_rsp;
96 La_x86_64_xmm lr_xmm[8];
97 La_x86_64_vector lr_vector[8];
98#ifndef __ILP32__
99 __int128_t lr_bnd[4];
100#endif
101} La_x86_64_regs;
114102
103/* Return values for calls from PLT on x86-64. */
104typedef struct La_x86_64_retval
105{
106 uint64_t lrv_rax;
107 uint64_t lrv_rdx;
108 La_x86_64_xmm lrv_xmm0;
109 La_x86_64_xmm lrv_xmm1;
110 long double lrv_st0;
111 long double lrv_st1;
112 La_x86_64_vector lrv_vector0;
113 La_x86_64_vector lrv_vector1;
114#ifndef __ILP32__
115 __int128_t lrv_bnd0;
116 __int128_t lrv_bnd1;
115#endif117#endif
118} La_x86_64_retval;
119
120#define La_x32_regs La_x86_64_regs
121#define La_x32_retval La_x86_64_retval
122
123__BEGIN_DECLS
116124
117__END_DECLS
\ No newline at end of file
125extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym,
126 unsigned int __ndx,
127 uintptr_t *__refcook,
128 uintptr_t *__defcook,
129 La_x86_64_regs *__regs,
130 unsigned int *__flags,
131 const char *__symname,
132 long int *__framesizep);
133extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym,
134 unsigned int __ndx,
135 uintptr_t *__refcook,
136 uintptr_t *__defcook,
137 const La_x86_64_regs *__inregs,
138 La_x86_64_retval *__outregs,
139 const char *__symname);
140
141extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym,
142 unsigned int __ndx,
143 uintptr_t *__refcook,
144 uintptr_t *__defcook,
145 La_x32_regs *__regs,
146 unsigned int *__flags,
147 const char *__symname,
148 long int *__framesizep);
149extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym,
150 unsigned int __ndx,
151 uintptr_t *__refcook,
152 uintptr_t *__defcook,
153 const La_x32_regs *__inregs,
154 La_x32_retval *__outregs,
155 const char *__symname);
156
157__END_DECLS
158
159#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/long-double.h+4-7
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Properties of long double type. MIPS version.1/* Properties of long double type. ldbl-96 version.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.2 Copyright (C) 2016-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -16,9 +16,6 @@...@@ -16,9 +16,6 @@
16 License along with the GNU C Library; if not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#include <sgidefs.h>
20
21#if !defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
22# define __NO_LONG_DOUBLE_MATH 1
23#endif
24#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
19/* long double is distinct from double, so there is nothing to
20 define here. */
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/generic-glibc/bits/math-vector.h+41-5
...@@ -4,7 +4,7 @@...@@ -4,7 +4,7 @@
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
7 License published by the Free Software Foundation; either7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.8 version 2.1 of the License, or (at your option) any later version.
99
10 The GNU C Library is distributed in the hope that it will be useful,10 The GNU C Library is distributed in the hope that it will be useful,
...@@ -21,7 +21,43 @@...@@ -21,7 +21,43 @@
21 include <math.h> instead."21 include <math.h> instead."
22#endif22#endif
2323
24/* Get default empty definitions required for __MATHCALL_VEC unfolding.
25 Plaform-specific analogue of this header should redefine them with specific
26 SIMD declarations. */
27#include <bits/libm-simd-decl-stubs.h>
\ No newline at end of file
24/* Get default empty definitions for simd declarations. */
25#include <bits/libm-simd-decl-stubs.h>
26
27#if defined __x86_64__ && defined __FAST_MATH__
28# if defined _OPENMP && _OPENMP >= 201307
29/* OpenMP case. */
30# define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch")
31# elif __GNUC_PREREQ (6,0)
32/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */
33# define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch")))
34# endif
35
36# ifdef __DECL_SIMD_x86_64
37# undef __DECL_SIMD_cos
38# define __DECL_SIMD_cos __DECL_SIMD_x86_64
39# undef __DECL_SIMD_cosf
40# define __DECL_SIMD_cosf __DECL_SIMD_x86_64
41# undef __DECL_SIMD_sin
42# define __DECL_SIMD_sin __DECL_SIMD_x86_64
43# undef __DECL_SIMD_sinf
44# define __DECL_SIMD_sinf __DECL_SIMD_x86_64
45# undef __DECL_SIMD_sincos
46# define __DECL_SIMD_sincos __DECL_SIMD_x86_64
47# undef __DECL_SIMD_sincosf
48# define __DECL_SIMD_sincosf __DECL_SIMD_x86_64
49# undef __DECL_SIMD_log
50# define __DECL_SIMD_log __DECL_SIMD_x86_64
51# undef __DECL_SIMD_logf
52# define __DECL_SIMD_logf __DECL_SIMD_x86_64
53# undef __DECL_SIMD_exp
54# define __DECL_SIMD_exp __DECL_SIMD_x86_64
55# undef __DECL_SIMD_expf
56# define __DECL_SIMD_expf __DECL_SIMD_x86_64
57# undef __DECL_SIMD_pow
58# define __DECL_SIMD_pow __DECL_SIMD_x86_64
59# undef __DECL_SIMD_powf
60# define __DECL_SIMD_powf __DECL_SIMD_x86_64
61
62# endif
63#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h+10-8
...@@ -16,28 +16,30 @@...@@ -16,28 +16,30 @@
16 License along with the GNU C Library; if not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19
20/* Classify given number. */19/* Classify given number. */
21__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))20__MATHDECL_ALIAS (int, __fpclassify,, (_Mdouble_ __value), fpclassify)
22 __attribute__ ((__const__));21 __attribute__ ((__const__));
2322
24/* Test for negative number. */23/* Test for negative number. */
25__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))24__MATHDECL_ALIAS (int, __signbit,, (_Mdouble_ __value), signbit)
26 __attribute__ ((__const__));25 __attribute__ ((__const__));
2726
28/* Return 0 if VALUE is finite or NaN, +1 if it27/* Return 0 if VALUE is finite or NaN, +1 if it
29 is +Infinity, -1 if it is -Infinity. */28 is +Infinity, -1 if it is -Infinity. */
30__MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));29__MATHDECL_ALIAS (int, __isinf,, (_Mdouble_ __value), isinf)
30 __attribute__ ((__const__));
3131
32/* Return nonzero if VALUE is finite and not NaN. Used by isfinite macro. */32/* Return nonzero if VALUE is finite and not NaN. Used by isfinite macro. */
33__MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__));33__MATHDECL_ALIAS (int, __finite,, (_Mdouble_ __value), finite)
34 __attribute__ ((__const__));
3435
35/* Return nonzero if VALUE is not a number. */36/* Return nonzero if VALUE is not a number. */
36__MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));37__MATHDECL_ALIAS (int, __isnan,, (_Mdouble_ __value), isnan)
38 __attribute__ ((__const__));
3739
38/* Test equality. */40/* Test equality. */
39__MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));41__MATHDECL_ALIAS (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y), iseqsig);
4042
41/* Test for signaling NaN. */43/* Test for signaling NaN. */
42__MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value))44__MATHDECL_ALIAS (int, __issignaling,, (_Mdouble_ __value), issignaling)
43 __attribute__ ((__const__));45 __attribute__ ((__const__));
\ No newline at end of file
lib/libc/include/generic-glibc/bits/mathcalls.h+6-3
...@@ -174,12 +174,14 @@ __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));...@@ -174,12 +174,14 @@ __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
174 && !__MATH_DECLARING_FLOATN174 && !__MATH_DECLARING_FLOATN
175/* Return 0 if VALUE is finite or NaN, +1 if it175/* Return 0 if VALUE is finite or NaN, +1 if it
176 is +Infinity, -1 if it is -Infinity. */176 is +Infinity, -1 if it is -Infinity. */
177__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));177__MATHDECL_ALIAS (int,isinf,, (_Mdouble_ __value), isinf)
178 __attribute__ ((__const__));
178# endif179# endif
179180
180# if !__MATH_DECLARING_FLOATN181# if !__MATH_DECLARING_FLOATN
181/* Return nonzero if VALUE is finite and not NaN. */182/* Return nonzero if VALUE is finite and not NaN. */
182__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));183__MATHDECL_ALIAS (int,finite,, (_Mdouble_ __value), finite)
184 __attribute__ ((__const__));
183185
184/* Return the remainder of X/Y. */186/* Return the remainder of X/Y. */
185__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));187__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));
...@@ -208,7 +210,8 @@ __MATHCALL (nan,, (const char *__tagb));...@@ -208,7 +210,8 @@ __MATHCALL (nan,, (const char *__tagb));
208 || __MATH_DECLARING_DOUBLE == 0)) /* isnanf or isnanl don't. */ \210 || __MATH_DECLARING_DOUBLE == 0)) /* isnanf or isnanl don't. */ \
209 && !__MATH_DECLARING_FLOATN211 && !__MATH_DECLARING_FLOATN
210/* Return nonzero if VALUE is not a number. */212/* Return nonzero if VALUE is not a number. */
211__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));213__MATHDECL_ALIAS (int,isnan,, (_Mdouble_ __value), isnan)
214 __attribute__ ((__const__));
212# endif215# endif
213#endif216#endif
214217
lib/libc/include/generic-glibc/bits/mathinline.h deleted-12
...@@ -1,12 +0,0 @@
1/* This file should provide inline versions of math functions.
2
3 Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'.
4
5 This file should define __MATH_INLINES if functions are actually defined as
6 inlines. */
7
8#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
9
10/* Here goes the real code. */
11
12#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/mman-shared.h+1
...@@ -24,6 +24,7 @@...@@ -24,6 +24,7 @@
24/* Flags for mremap. */24/* Flags for mremap. */
25# define MREMAP_MAYMOVE 125# define MREMAP_MAYMOVE 1
26# define MREMAP_FIXED 226# define MREMAP_FIXED 2
27# define MREMAP_DONTUNMAP 4
2728
28/* Flags for memfd_create. */29/* Flags for memfd_create. */
29# ifndef MFD_CLOEXEC30# ifndef MFD_CLOEXEC
lib/libc/include/generic-glibc/bits/mman.h+10-8
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Definitions for POSIX memory map interface. Linux/generic version.1/* Definitions for POSIX memory map interface. Linux/x86_64 version.
2 Copyright (C) 1997-2020 Free Software Foundation, Inc.2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -13,18 +13,20 @@...@@ -13,18 +13,20 @@
13 Lesser General Public License for more details.13 Lesser General Public License for more details.
1414
15 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#ifndef _SYS_MMAN_H19#ifndef _SYS_MMAN_H
20# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."20# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
21#endif21#endif
2222
23/* These definitions are appropriate for architectures that, in the23/* The following definitions basically come from the kernel headers.
24 Linux kernel, either have no uapi/asm/mman.h, or have one that24 But the kernel header is not namespace clean. */
25 includes asm-generic/mman.h without any changes or additions25
26 relevant to glibc. If there are additions relevant to glibc, an26/* Other flags. */
27 architecture-specific bits/mman.h is needed. */27#ifdef __USE_MISC
28# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
29#endif
2830
29#include <bits/mman-map-flags-generic.h>31#include <bits/mman-map-flags-generic.h>
3032
lib/libc/include/generic-glibc/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. Generic version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25/* On most architectures, padding goes after time fields for 32-bit
26 systems and is omitted for 64-bit systems. Some architectures pad
27 before time fields instead, or omit padding despite being
28 32-bit. */
29
30#define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
31#define __MSQ_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/generic-glibc/bits/msq.h+6-33
...@@ -20,7 +20,12 @@...@@ -20,7 +20,12 @@
20#endif20#endif
2121
22#include <bits/types.h>22#include <bits/types.h>
23#include <bits/msq-pad.h>23
24/* Types used in the MSQID_DS structure definition. */
25typedef __syscall_ulong_t msgqnum_t;
26typedef __syscall_ulong_t msglen_t;
27
28#include <bits/types/struct_msqid_ds.h>
2429
25/* Define options for message queue functions. */30/* Define options for message queue functions. */
26#define MSG_NOERROR 010000 /* no error if message is too big */31#define MSG_NOERROR 010000 /* no error if message is too big */
...@@ -29,38 +34,6 @@...@@ -29,38 +34,6 @@
29# define MSG_COPY 040000 /* copy (not remove) all queue messages */34# define MSG_COPY 040000 /* copy (not remove) all queue messages */
30#endif35#endif
3136
32/* Types used in the structure definition. */
33typedef __syscall_ulong_t msgqnum_t;
34typedef __syscall_ulong_t msglen_t;
35
36#if __MSQ_PAD_BEFORE_TIME
37# define __MSQ_PAD_TIME(NAME, RES) \
38 unsigned long int __glibc_reserved ## RES; __time_t NAME
39#elif __MSQ_PAD_AFTER_TIME
40# define __MSQ_PAD_TIME(NAME, RES) \
41 __time_t NAME; unsigned long int __glibc_reserved ## RES
42#else
43# define __MSQ_PAD_TIME(NAME, RES) \
44 __time_t NAME
45#endif
46
47/* Structure of record for one message inside the kernel.
48 The type `struct msg' is opaque. */
49struct msqid_ds
50{
51 struct ipc_perm msg_perm; /* structure describing operation permission */
52 __MSQ_PAD_TIME (msg_stime, 1); /* time of last msgsnd command */
53 __MSQ_PAD_TIME (msg_rtime, 2); /* time of last msgrcv command */
54 __MSQ_PAD_TIME (msg_ctime, 3); /* time of last change */
55 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
56 msgqnum_t msg_qnum; /* number of messages currently on queue */
57 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
58 __pid_t msg_lspid; /* pid of last msgsnd() */
59 __pid_t msg_lrpid; /* pid of last msgrcv() */
60 __syscall_ulong_t __glibc_reserved4;
61 __syscall_ulong_t __glibc_reserved5;
62};
63
64#ifdef __USE_MISC37#ifdef __USE_MISC
6538
66# define msg_cbytes __msg_cbytes39# define msg_cbytes __msg_cbytes
lib/libc/include/generic-glibc/bits/procfs-id.h+7-2
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Generic Linux version.1/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
33
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
...@@ -21,5 +21,10 @@...@@ -21,5 +21,10 @@
21# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."21# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
22#endif22#endif
2323
24#if __WORDSIZE == 32
25typedef unsigned short int __pr_uid_t;
26typedef unsigned short int __pr_gid_t;
27#else
24typedef unsigned int __pr_uid_t;28typedef unsigned int __pr_uid_t;
25typedef unsigned int __pr_gid_t;
\ No newline at end of file
29typedef unsigned int __pr_gid_t;
30#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/procfs.h+25-12
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Types for registers for sys/procfs.h. MIPS version.1/* Types for registers for sys/procfs.h. x86 version.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.2 Copyright (C) 2001-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -13,25 +13,38 @@...@@ -13,25 +13,38 @@
13 Lesser General Public License for more details.13 Lesser General Public License for more details.
1414
15 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#ifndef _SYS_PROCFS_H19#ifndef _SYS_PROCFS_H
20# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."20# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
21#endif21#endif
2222
23#include <sgidefs.h>23/* Type for a general-purpose register. */
2424#ifdef __x86_64__
25/* ELF register definitions */
26#define ELF_NGREG 45
27#define ELF_NFPREG 33
28
29#if _MIPS_SIM == _ABIN32
30__extension__ typedef unsigned long long elf_greg_t;25__extension__ typedef unsigned long long elf_greg_t;
31#else26#else
32typedef unsigned long elf_greg_t;27typedef unsigned long elf_greg_t;
33#endif28#endif
29
30/* And the whole bunch of them. We could have used `struct
31 user_regs_struct' directly in the typedef, but tradition says that
32 the register set is an array, which does have some peculiar
33 semantics, so leave it that way. */
34#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
34typedef elf_greg_t elf_gregset_t[ELF_NGREG];35typedef elf_greg_t elf_gregset_t[ELF_NGREG];
3536
36typedef double elf_fpreg_t;
37typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
\ No newline at end of file
37#ifndef __x86_64__
38/* Register set for the floating-point registers. */
39typedef struct user_fpregs_struct elf_fpregset_t;
40
41/* Register set for the extended floating-point registers. Includes
42 the Pentium III SSE registers in addition to the classic
43 floating-point stuff. */
44typedef struct user_fpxregs_struct elf_fpxregset_t;
45#else
46/* Register set for the extended floating-point registers. Includes
47 the Pentium III SSE registers in addition to the classic
48 floating-point stuff. */
49typedef struct user_fpregs_struct elf_fpregset_t;
50#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/pthreadtypes-arch.h+28-18
...@@ -1,6 +1,4 @@...@@ -1,6 +1,4 @@
1/* Machine-specific pthread type layouts. Generic version.1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
53
6 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -15,31 +13,43 @@...@@ -15,31 +13,43 @@
1513
16 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see15 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1917
20#ifndef _BITS_PTHREADTYPES_ARCH_H18#ifndef _BITS_PTHREADTYPES_ARCH_H
21#define _BITS_PTHREADTYPES_ARCH_H 119#define _BITS_PTHREADTYPES_ARCH_H 1
2220
23#include <bits/wordsize.h>21#include <bits/wordsize.h>
2422
25#if __WORDSIZE == 6423#ifdef __x86_64__
26# define __SIZEOF_PTHREAD_ATTR_T 5624# if __WORDSIZE == 64
27# define __SIZEOF_PTHREAD_MUTEX_T 4025# define __SIZEOF_PTHREAD_MUTEX_T 40
28# define __SIZEOF_PTHREAD_RWLOCK_T 5626# define __SIZEOF_PTHREAD_ATTR_T 56
29# define __SIZEOF_PTHREAD_BARRIER_T 3227# define __SIZEOF_PTHREAD_RWLOCK_T 56
28# define __SIZEOF_PTHREAD_BARRIER_T 32
29# else
30# define __SIZEOF_PTHREAD_MUTEX_T 32
31# define __SIZEOF_PTHREAD_ATTR_T 32
32# define __SIZEOF_PTHREAD_RWLOCK_T 44
33# define __SIZEOF_PTHREAD_BARRIER_T 20
34# endif
30#else35#else
31# define __SIZEOF_PTHREAD_ATTR_T 3636# define __SIZEOF_PTHREAD_MUTEX_T 24
32# define __SIZEOF_PTHREAD_MUTEX_T 2437# define __SIZEOF_PTHREAD_ATTR_T 36
33# define __SIZEOF_PTHREAD_RWLOCK_T 3238# define __SIZEOF_PTHREAD_RWLOCK_T 32
34# define __SIZEOF_PTHREAD_BARRIER_T 2039# define __SIZEOF_PTHREAD_BARRIER_T 20
35#endif40#endif
36#define __SIZEOF_PTHREAD_MUTEXATTR_T 441#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
37#define __SIZEOF_PTHREAD_RWLOCKATTR_T 842#define __SIZEOF_PTHREAD_COND_T 48
38#define __SIZEOF_PTHREAD_BARRIERATTR_T 443#define __SIZEOF_PTHREAD_CONDATTR_T 4
39#define __SIZEOF_PTHREAD_COND_T 4844#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
40#define __SIZEOF_PTHREAD_CONDATTR_T 445#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
4146
42#define __LOCK_ALIGNMENT47#define __LOCK_ALIGNMENT
43#define __ONCE_ALIGNMENT48#define __ONCE_ALIGNMENT
4449
50#ifndef __x86_64__
51/* Extra attributes for the cleanup functions. */
52# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
53#endif
54
45#endif /* bits/pthreadtypes.h */55#endif /* bits/pthreadtypes.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/generic-glibc/bits/sem-pad.h deleted-33
...@@ -1,33 +0,0 @@
1/* Define where padding goes in struct semid_ds. Generic version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25/* On most architectures, padding goes after time fields for 32-bit
26 systems and is omitted for 64-bit systems. Some architectures pad
27 before time fields instead, or omit padding despite being 32-bit,
28 or include it despite being 64-bit. This must match the layout
29 used for struct semid64_ds in <asm/sembuf.h>, as glibc does not do
30 layout conversions for this structure. */
31
32#define __SEM_PAD_AFTER_TIME (__TIMESIZE == 32)
33#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/generic-glibc/bits/sem.h+2-24
...@@ -20,7 +20,8 @@...@@ -20,7 +20,8 @@
20#endif20#endif
2121
22#include <sys/types.h>22#include <sys/types.h>
23#include <bits/sem-pad.h>23#include <bits/timesize.h>
24#include <bits/types/struct_semid_ds.h>
2425
25/* Flags for `semop'. */26/* Flags for `semop'. */
26#define SEM_UNDO 0x1000 /* undo the operation on exit */27#define SEM_UNDO 0x1000 /* undo the operation on exit */
...@@ -34,29 +35,6 @@...@@ -34,29 +35,6 @@
34#define SETVAL 16 /* set semval */35#define SETVAL 16 /* set semval */
35#define SETALL 17 /* set all semval's */36#define SETALL 17 /* set all semval's */
3637
37
38#if __SEM_PAD_BEFORE_TIME
39# define __SEM_PAD_TIME(NAME, RES) \
40 __syscall_ulong_t __glibc_reserved ## RES; __time_t NAME
41#elif __SEM_PAD_AFTER_TIME
42# define __SEM_PAD_TIME(NAME, RES) \
43 __time_t NAME; __syscall_ulong_t __glibc_reserved ## RES
44#else
45# define __SEM_PAD_TIME(NAME, RES) \
46 __time_t NAME
47#endif
48
49/* Data structure describing a set of semaphores. */
50struct semid_ds
51{
52 struct ipc_perm sem_perm; /* operation permission struct */
53 __SEM_PAD_TIME (sem_otime, 1); /* last semop() time */
54 __SEM_PAD_TIME (sem_ctime, 2); /* last time changed by semctl() */
55 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
56 __syscall_ulong_t __glibc_reserved3;
57 __syscall_ulong_t __glibc_reserved4;
58};
59
60/* The user should define a union like the following to use it for arguments38/* The user should define a union like the following to use it for arguments
61 for `semctl'.39 for `semctl'.
6240
lib/libc/include/generic-glibc/bits/semaphore.h+6-3
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
34
4 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,14 +13,16 @@...@@ -12,14 +13,16 @@
12 Lesser General Public License for more details.13 Lesser General Public License for more details.
1314
14 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1718
18#ifndef _SEMAPHORE_H19#ifndef _SEMAPHORE_H
19# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
20#endif21#endif
2122
22#if _MIPS_SIM == _ABI6423#include <bits/wordsize.h>
24
25#if __WORDSIZE == 64
23# define __SIZEOF_SEM_T 3226# define __SIZEOF_SEM_T 32
24#else27#else
25# define __SIZEOF_SEM_T 1628# define __SIZEOF_SEM_T 16
lib/libc/include/generic-glibc/bits/setjmp.h+16-49
...@@ -1,5 +1,4 @@...@@ -1,5 +1,4 @@
1/* Define the machine-dependent type `jmp_buf'. MIPS version.1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
43
5 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -13,61 +12,29 @@...@@ -13,61 +12,29 @@
13 Lesser General Public License for more details.12 Lesser General Public License for more details.
1413
15 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1817
19#ifndef _MIPS_BITS_SETJMP_H18/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
20#define _MIPS_BITS_SETJMP_H 119#ifndef _BITS_SETJMP_H
20#define _BITS_SETJMP_H 1
2121
22#if !defined(_SETJMP_H) && !defined(_PTHREAD_H)22#if !defined _SETJMP_H && !defined _PTHREAD_H
23# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."23# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
24#endif24#endif
2525
26#include <sgidefs.h>26#include <bits/wordsize.h>
2727
28typedef struct __jmp_buf_internal_tag28#ifndef _ASM
29 {
30#if _MIPS_SIM == _ABIO32
31 /* Program counter. */
32 void *__pc;
3329
34 /* Stack pointer. */30# if __WORDSIZE == 64
35 void *__sp;31typedef long int __jmp_buf[8];
32# elif defined __x86_64__
33__extension__ typedef long long int __jmp_buf[8];
34# else
35typedef int __jmp_buf[6];
36# endif
3637
37 /* Callee-saved registers s0 through s7. */
38 int __regs[8];
39
40 /* The frame pointer. */
41 void *__fp;
42
43 /* The global pointer. */
44 void *__gp;
45#else
46 /* Program counter. */
47 __extension__ long long __pc;
48
49 /* Stack pointer. */
50 __extension__ long long __sp;
51
52 /* Callee-saved registers s0 through s7. */
53 __extension__ long long __regs[8];
54
55 /* The frame pointer. */
56 __extension__ long long __fp;
57
58 /* The global pointer. */
59 __extension__ long long __gp;
60#endif
61
62 /* Unused (was floating point status register). */
63 int __glibc_reserved1;
64
65 /* Callee-saved floating point registers. */
66#if _MIPS_SIM == _ABI64
67 double __fpregs[8];
68#else
69 double __fpregs[6];
70#endif38#endif
71 } __jmp_buf[1];
7239
73#endif /* _MIPS_BITS_SETJMP_H */
\ No newline at end of file
40#endif /* bits/setjmp.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/shm-pad.h deleted-37
...@@ -1,37 +0,0 @@
1/* Define where padding goes in struct shmid_ds. Generic version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25/* On most architectures, padding goes after time fields for 32-bit
26 systems and is omitted for 64-bit systems. Some architectures pad
27 before time fields instead, or omit padding despite being 32-bit,
28 or include it despite being 64-bit. Furthermore, some
29 architectures place shm_segsz after the time fields rather than
30 before them, with or without padding there. This must match the
31 layout used for struct shmid64_ds in <asm/shmbuf.h>, as glibc does
32 not do layout conversions for this structure. */
33
34#define __SHM_PAD_AFTER_TIME (__TIMESIZE == 32)
35#define __SHM_PAD_BEFORE_TIME 0
36#define __SHM_SEGSZ_AFTER_TIME 0
37#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/generic-glibc/bits/shm.h+1-34
...@@ -22,7 +22,6 @@...@@ -22,7 +22,6 @@
22#include <bits/types.h>22#include <bits/types.h>
23#include <bits/wordsize.h>23#include <bits/wordsize.h>
24#include <bits/shmlba.h>24#include <bits/shmlba.h>
25#include <bits/shm-pad.h>
2625
27/* Permission flag for shmget. */26/* Permission flag for shmget. */
28#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */27#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
...@@ -43,39 +42,7 @@ __BEGIN_DECLS...@@ -43,39 +42,7 @@ __BEGIN_DECLS
43/* Type to count number of attaches. */42/* Type to count number of attaches. */
44typedef __syscall_ulong_t shmatt_t;43typedef __syscall_ulong_t shmatt_t;
4544
46#if __SHM_PAD_BEFORE_TIME45#include <bits/types/struct_shmid_ds.h>
47# define __SHM_PAD_TIME(NAME, RES) \
48 unsigned long int __glibc_reserved ## RES; __time_t NAME
49#elif __SHM_PAD_AFTER_TIME
50# define __SHM_PAD_TIME(NAME, RES) \
51 __time_t NAME; unsigned long int __glibc_reserved ## RES
52#else
53# define __SHM_PAD_TIME(NAME, RES) \
54 __time_t NAME
55#endif
56
57/* Data structure describing a shared memory segment. */
58struct shmid_ds
59 {
60 struct ipc_perm shm_perm; /* operation permission struct */
61#if !__SHM_SEGSZ_AFTER_TIME
62 size_t shm_segsz; /* size of segment in bytes */
63#endif
64 __SHM_PAD_TIME (shm_atime, 1); /* time of last shmat() */
65 __SHM_PAD_TIME (shm_dtime, 2); /* time of last shmdt() */
66 __SHM_PAD_TIME (shm_ctime, 3); /* time of last change by shmctl() */
67#if __SHM_PAD_BETWEEN_TIME_AND_SEGSZ
68 unsigned long int __glibc_reserved4;
69#endif
70#if __SHM_SEGSZ_AFTER_TIME
71 size_t shm_segsz; /* size of segment in bytes */
72#endif
73 __pid_t shm_cpid; /* pid of creator */
74 __pid_t shm_lpid; /* pid of last shmop */
75 shmatt_t shm_nattch; /* number of current attaches */
76 __syscall_ulong_t __glibc_reserved5;
77 __syscall_ulong_t __glibc_reserved6;
78 };
7946
80#ifdef __USE_MISC47#ifdef __USE_MISC
8148
lib/libc/include/generic-glibc/bits/sigcontext.h+169-10
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -8,7 +8,7 @@...@@ -8,7 +8,7 @@
88
9 The GNU C Library is distributed in the hope that it will be useful,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 of10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.12 Lesser General Public License for more details.
1313
14 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
...@@ -16,22 +16,181 @@...@@ -16,22 +16,181 @@
16 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1717
18#ifndef _BITS_SIGCONTEXT_H18#ifndef _BITS_SIGCONTEXT_H
19#define _BITS_SIGCONTEXT_H 119#define _BITS_SIGCONTEXT_H 1
2020
21#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H21#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
22# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."22# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
23#endif23#endif
2424
25#include <bits/types.h>
26
27#define FP_XSTATE_MAGIC1 0x46505853U
28#define FP_XSTATE_MAGIC2 0x46505845U
29#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
30
31struct _fpx_sw_bytes
32{
33 __uint32_t magic1;
34 __uint32_t extended_size;
35 __uint64_t xstate_bv;
36 __uint32_t xstate_size;
37 __uint32_t __glibc_reserved1[7];
38};
39
40struct _fpreg
41{
42 unsigned short significand[4];
43 unsigned short exponent;
44};
45
46struct _fpxreg
47{
48 unsigned short significand[4];
49 unsigned short exponent;
50 unsigned short __glibc_reserved1[3];
51};
52
53struct _xmmreg
54{
55 __uint32_t element[4];
56};
57
58
59
60#ifndef __x86_64__
61
62struct _fpstate
63{
64 /* Regular FPU environment. */
65 __uint32_t cw;
66 __uint32_t sw;
67 __uint32_t tag;
68 __uint32_t ipoff;
69 __uint32_t cssel;
70 __uint32_t dataoff;
71 __uint32_t datasel;
72 struct _fpreg _st[8];
73 unsigned short status;
74 unsigned short magic;
75
76 /* FXSR FPU environment. */
77 __uint32_t _fxsr_env[6];
78 __uint32_t mxcsr;
79 __uint32_t __glibc_reserved1;
80 struct _fpxreg _fxsr_st[8];
81 struct _xmmreg _xmm[8];
82 __uint32_t __glibc_reserved2[56];
83};
84
25#ifndef sigcontext_struct85#ifndef sigcontext_struct
26/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but86/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
27 we need sigcontext. */87 we need sigcontext. Some packages have come to rely on
88 sigcontext_struct being defined on 32-bit x86, so define this for
89 their benefit. */
28# define sigcontext_struct sigcontext90# define sigcontext_struct sigcontext
91#endif
2992
30# include <asm/sigcontext.h>93#define X86_FXSR_MAGIC 0x0000
3194
32/* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */95struct sigcontext
33# define __need_NULL96{
34# include <stddef.h>97 unsigned short gs, __gsh;
35#endif98 unsigned short fs, __fsh;
99 unsigned short es, __esh;
100 unsigned short ds, __dsh;
101 unsigned long edi;
102 unsigned long esi;
103 unsigned long ebp;
104 unsigned long esp;
105 unsigned long ebx;
106 unsigned long edx;
107 unsigned long ecx;
108 unsigned long eax;
109 unsigned long trapno;
110 unsigned long err;
111 unsigned long eip;
112 unsigned short cs, __csh;
113 unsigned long eflags;
114 unsigned long esp_at_signal;
115 unsigned short ss, __ssh;
116 struct _fpstate * fpstate;
117 unsigned long oldmask;
118 unsigned long cr2;
119};
120
121#else /* __x86_64__ */
122
123struct _fpstate
124{
125 /* FPU environment matching the 64-bit FXSAVE layout. */
126 __uint16_t cwd;
127 __uint16_t swd;
128 __uint16_t ftw;
129 __uint16_t fop;
130 __uint64_t rip;
131 __uint64_t rdp;
132 __uint32_t mxcsr;
133 __uint32_t mxcr_mask;
134 struct _fpxreg _st[8];
135 struct _xmmreg _xmm[16];
136 __uint32_t __glibc_reserved1[24];
137};
138
139struct sigcontext
140{
141 __uint64_t r8;
142 __uint64_t r9;
143 __uint64_t r10;
144 __uint64_t r11;
145 __uint64_t r12;
146 __uint64_t r13;
147 __uint64_t r14;
148 __uint64_t r15;
149 __uint64_t rdi;
150 __uint64_t rsi;
151 __uint64_t rbp;
152 __uint64_t rbx;
153 __uint64_t rdx;
154 __uint64_t rax;
155 __uint64_t rcx;
156 __uint64_t rsp;
157 __uint64_t rip;
158 __uint64_t eflags;
159 unsigned short cs;
160 unsigned short gs;
161 unsigned short fs;
162 unsigned short __pad0;
163 __uint64_t err;
164 __uint64_t trapno;
165 __uint64_t oldmask;
166 __uint64_t cr2;
167 __extension__ union
168 {
169 struct _fpstate * fpstate;
170 __uint64_t __fpstate_word;
171 };
172 __uint64_t __reserved1 [8];
173};
174
175#endif /* __x86_64__ */
176
177struct _xsave_hdr
178{
179 __uint64_t xstate_bv;
180 __uint64_t __glibc_reserved1[2];
181 __uint64_t __glibc_reserved2[5];
182};
183
184struct _ymmh_state
185{
186 __uint32_t ymmh_space[64];
187};
188
189struct _xstate
190{
191 struct _fpstate fpstate;
192 struct _xsave_hdr xstate_hdr;
193 struct _ymmh_state ymmh;
194};
36195
37#endif /* bits/sigcontext.h */
\ No newline at end of file
196#endif /* _BITS_SIGCONTEXT_H */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/siginfo-arch.h+12-2
...@@ -1,7 +1,17 @@...@@ -1,7 +1,17 @@
1/* Architecture-specific adjustments to siginfo_t. */1/* Architecture-specific adjustments to siginfo_t. x86 version. */
2#ifndef _BITS_SIGINFO_ARCH_H2#ifndef _BITS_SIGINFO_ARCH_H
3#define _BITS_SIGINFO_ARCH_H 13#define _BITS_SIGINFO_ARCH_H 1
44
5/* This architecture has no adjustments to make to siginfo_t. */5#if defined __x86_64__ && __WORDSIZE == 32
6/* si_utime and si_stime must be 4 byte aligned for x32 to match the
7 kernel. We align siginfo_t to 8 bytes so that si_utime and
8 si_stime are actually aligned to 8 bytes since their offsets are
9 multiple of 8 bytes. Note: with some compilers, the alignment
10 attribute would be ignored if it were put in __SI_CLOCK_T instead
11 of encapsulated in a typedef. */
12typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
13# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
14# define __SI_CLOCK_T __sigchld_clock_t
15#endif
616
7#endif17#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/signum-generic.h+3-24
...@@ -57,31 +57,9 @@...@@ -57,31 +57,9 @@
57#define SIGQUIT 3 /* Quit. */57#define SIGQUIT 3 /* Quit. */
58#define SIGTRAP 5 /* Trace/breakpoint trap. */58#define SIGTRAP 5 /* Trace/breakpoint trap. */
59#define SIGKILL 9 /* Killed. */59#define SIGKILL 9 /* Killed. */
60#define SIGBUS 10 /* Bus error. */
61#define SIGSYS 12 /* Bad system call. */
62#define SIGPIPE 13 /* Broken pipe. */60#define SIGPIPE 13 /* Broken pipe. */
63#define SIGALRM 14 /* Alarm clock. */61#define SIGALRM 14 /* Alarm clock. */
6462
65/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
66#define SIGURG 16 /* Urgent data is available at a socket. */
67#define SIGSTOP 17 /* Stop, unblockable. */
68#define SIGTSTP 18 /* Keyboard stop. */
69#define SIGCONT 19 /* Continue. */
70#define SIGCHLD 20 /* Child terminated or stopped. */
71#define SIGTTIN 21 /* Background read from control terminal. */
72#define SIGTTOU 22 /* Background write to control terminal. */
73#define SIGPOLL 23 /* Pollable event occurred (System V). */
74#define SIGXCPU 24 /* CPU time limit exceeded. */
75#define SIGXFSZ 25 /* File size limit exceeded. */
76#define SIGVTALRM 26 /* Virtual timer expired. */
77#define SIGPROF 27 /* Profiling timer expired. */
78#define SIGUSR1 30 /* User-defined signal 1. */
79#define SIGUSR2 31 /* User-defined signal 2. */
80
81/* Nonstandard signals found in all modern POSIX systems
82 (including both BSD and Linux). */
83#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
84
85/* Archaic names for compatibility. */63/* Archaic names for compatibility. */
86#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */64#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
87#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */65#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
...@@ -93,8 +71,9 @@...@@ -93,8 +71,9 @@
93 but some real-time signals may be used internally by glibc. Do not71 but some real-time signals may be used internally by glibc. Do not
94 use these constants in application code; use SIGRTMIN and SIGRTMAX72 use these constants in application code; use SIGRTMIN and SIGRTMAX
95 (defined in signal.h) instead. */73 (defined in signal.h) instead. */
96#define __SIGRTMIN 3274
97#define __SIGRTMAX __SIGRTMIN75/* Include system specific bits. */
76#include <bits/signum-arch.h>
9877
99/* Biggest signal number + 1 (including real-time signals). */78/* Biggest signal number + 1 (including real-time signals). */
100#define _NSIG (__SIGRTMAX + 1)79#define _NSIG (__SIGRTMAX + 1)
lib/libc/include/generic-glibc/bits/signum.h deleted-58
...@@ -1,58 +0,0 @@
1/* Signal number definitions. Linux version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 most Linux systems. */
30
31#define SIGSTKFLT 16 /* Stack fault (obsolete). */
32#define SIGPWR 30 /* Power failure imminent. */
33
34#undef SIGBUS
35#define SIGBUS 7
36#undef SIGUSR1
37#define SIGUSR1 10
38#undef SIGUSR2
39#define SIGUSR2 12
40#undef SIGCHLD
41#define SIGCHLD 17
42#undef SIGCONT
43#define SIGCONT 18
44#undef SIGSTOP
45#define SIGSTOP 19
46#undef SIGTSTP
47#define SIGTSTP 20
48#undef SIGURG
49#define SIGURG 23
50#undef SIGPOLL
51#define SIGPOLL 29
52#undef SIGSYS
53#define SIGSYS 31
54
55#undef __SIGRTMAX
56#define __SIGRTMAX 64
57
58#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/socket-constants.h+14-2
...@@ -20,6 +20,8 @@...@@ -20,6 +20,8 @@
20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."20# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
21#endif21#endif
2222
23#include <bits/timesize.h>
24
23#define SOL_SOCKET 125#define SOL_SOCKET 1
24#define SO_ACCEPTCONN 3026#define SO_ACCEPTCONN 30
25#define SO_BROADCAST 627#define SO_BROADCAST 6
...@@ -30,9 +32,19 @@...@@ -30,9 +32,19 @@
30#define SO_OOBINLINE 1032#define SO_OOBINLINE 10
31#define SO_RCVBUF 833#define SO_RCVBUF 8
32#define SO_RCVLOWAT 1834#define SO_RCVLOWAT 18
33#define SO_RCVTIMEO 2035#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
36 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
37# define SO_RCVTIMEO 66
38#else
39# define SO_RCVTIMEO 20
40#endif
34#define SO_REUSEADDR 241#define SO_REUSEADDR 2
35#define SO_SNDBUF 742#define SO_SNDBUF 7
36#define SO_SNDLOWAT 1943#define SO_SNDLOWAT 19
37#define SO_SNDTIMEO 2144#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
45 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
46# define SO_SNDTIMEO 67
47#else
48# define SO_SNDTIMEO 21
49#endif
38#define SO_TYPE 350#define SO_TYPE 3
\ No newline at end of file
lib/libc/include/generic-glibc/bits/stat.h+97-150
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2020 Free Software Foundation, Inc.1/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,7 +12,7 @@...@@ -12,7 +12,7 @@
12 Lesser General Public License for more details.12 Lesser General Public License for more details.
1313
14 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1717
18#if !defined _SYS_STAT_H && !defined _FCNTL_H18#if !defined _SYS_STAT_H && !defined _FCNTL_H
...@@ -22,45 +22,64 @@...@@ -22,45 +22,64 @@
22#ifndef _BITS_STAT_H22#ifndef _BITS_STAT_H
23#define _BITS_STAT_H 123#define _BITS_STAT_H 1
2424
25#include <sgidefs.h>
26
27/* Versions of the `struct stat' data structure. */25/* Versions of the `struct stat' data structure. */
28#define _STAT_VER_LINUX_OLD 126#ifndef __x86_64__
29#define _STAT_VER_KERNEL 127# define _STAT_VER_LINUX_OLD 1
30#define _STAT_VER_SVR4 228# define _STAT_VER_KERNEL 1
31#define _STAT_VER_LINUX 329# define _STAT_VER_SVR4 2
32#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */30# define _STAT_VER_LINUX 3
31
32/* i386 versions of the `xmknod' interface. */
33# define _MKNOD_VER_LINUX 1
34# define _MKNOD_VER_SVR4 2
35# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
36#else
37# define _STAT_VER_KERNEL 0
38# define _STAT_VER_LINUX 1
3339
34/* Versions of the `xmknod' interface. */40/* x86-64 versions of the `xmknod' interface. */
35#define _MKNOD_VER_LINUX 141# define _MKNOD_VER_LINUX 0
36#define _MKNOD_VER_SVR4 242#endif
37#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
3843
44#define _STAT_VER _STAT_VER_LINUX
3945
40#if _MIPS_SIM == _ABIO32
41/* Structure describing file characteristics. */
42struct stat46struct stat
43 {47 {
44 unsigned long int st_dev;48 __dev_t st_dev; /* Device. */
45 long int st_pad1[3];49#ifndef __x86_64__
46#ifndef __USE_FILE_OFFSET6450 unsigned short int __pad1;
47 __ino_t st_ino; /* File serial number. */51#endif
52#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
53 __ino_t st_ino; /* File serial number. */
48#else54#else
49 __ino64_t st_ino; /* File serial number. */55 __ino_t __st_ino; /* 32bit file serial number. */
50#endif56#endif
51 __mode_t st_mode; /* File mode. */57#ifndef __x86_64__
58 __mode_t st_mode; /* File mode. */
59 __nlink_t st_nlink; /* Link count. */
60#else
52 __nlink_t st_nlink; /* Link count. */61 __nlink_t st_nlink; /* Link count. */
62 __mode_t st_mode; /* File mode. */
63#endif
53 __uid_t st_uid; /* User ID of the file's owner. */64 __uid_t st_uid; /* User ID of the file's owner. */
54 __gid_t st_gid; /* Group ID of the file's group.*/65 __gid_t st_gid; /* Group ID of the file's group.*/
55 unsigned long int st_rdev; /* Device number, if device. */66#ifdef __x86_64__
56#ifndef __USE_FILE_OFFSET6467 int __pad0;
57 long int st_pad2[2];68#endif
58 __off_t st_size; /* Size of file, in bytes. */69 __dev_t st_rdev; /* Device number, if device. */
59 /* SVR4 added this extra long to allow for expansion of off_t. */70#ifndef __x86_64__
60 long int st_pad3;71 unsigned short int __pad2;
72#endif
73#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
74 __off_t st_size; /* Size of file, in bytes. */
75#else
76 __off64_t st_size; /* Size of file, in bytes. */
77#endif
78 __blksize_t st_blksize; /* Optimal block size for I/O. */
79#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
80 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else81#else
62 long int st_pad2[3];82 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63 __off64_t st_size; /* Size of file, in bytes. */
64#endif83#endif
65#ifdef __USE_XOPEN2K884#ifdef __USE_XOPEN2K8
66 /* Nanosecond resolution timestamps are stored in a format85 /* Nanosecond resolution timestamps are stored in a format
...@@ -69,134 +88,60 @@ struct stat...@@ -69,134 +88,60 @@ struct stat
69 identifier 'timespec' to appear in the <sys/stat.h> header.88 identifier 'timespec' to appear in the <sys/stat.h> header.
70 Therefore we have to handle the use of this header in strictly89 Therefore we have to handle the use of this header in strictly
71 standard-compliant sources special. */90 standard-compliant sources special. */
72 struct timespec st_atim; /* Time of last access. */91 struct timespec st_atim; /* Time of last access. */
73 struct timespec st_mtim; /* Time of last modification. */92 struct timespec st_mtim; /* Time of last modification. */
74 struct timespec st_ctim; /* Time of last status change. */93 struct timespec st_ctim; /* Time of last status change. */
75# define st_atime st_atim.tv_sec /* Backward compatibility. */94# define st_atime st_atim.tv_sec /* Backward compatibility. */
76# define st_mtime st_mtim.tv_sec95# define st_mtime st_mtim.tv_sec
77# define st_ctime st_ctim.tv_sec96# define st_ctime st_ctim.tv_sec
78#else97#else
79 __time_t st_atime; /* Time of last access. */98 __time_t st_atime; /* Time of last access. */
80 unsigned long int st_atimensec; /* Nscecs of last access. */99 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
81 __time_t st_mtime; /* Time of last modification. */100 __time_t st_mtime; /* Time of last modification. */
82 unsigned long int st_mtimensec; /* Nsecs of last modification. */101 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
83 __time_t st_ctime; /* Time of last status change. */102 __time_t st_ctime; /* Time of last status change. */
84 unsigned long int st_ctimensec; /* Nsecs of last status change. */103 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
85#endif104#endif
86 __blksize_t st_blksize; /* Optimal block size for I/O. */105#ifdef __x86_64__
87#ifndef __USE_FILE_OFFSET64106 __syscall_slong_t __glibc_reserved[3];
88 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
89#else107#else
90 long int st_pad4;108# ifndef __USE_FILE_OFFSET64
91 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */109 unsigned long int __glibc_reserved4;
110 unsigned long int __glibc_reserved5;
111# else
112 __ino64_t st_ino; /* File serial number. */
113# endif
92#endif114#endif
93 long int st_pad5[14];
94 };115 };
95116
96#ifdef __USE_LARGEFILE64117#ifdef __USE_LARGEFILE64
118/* Note stat64 has the same shape as stat for x86-64. */
97struct stat64119struct stat64
98 {120 {
99 unsigned long int st_dev;121 __dev_t st_dev; /* Device. */
100 long int st_pad1[3];122# ifdef __x86_64__
101 __ino64_t st_ino; /* File serial number. */123 __ino64_t st_ino; /* File serial number. */
102 __mode_t st_mode; /* File mode. */
103 __nlink_t st_nlink; /* Link count. */124 __nlink_t st_nlink; /* Link count. */
125 __mode_t st_mode; /* File mode. */
126# else
127 unsigned int __pad1;
128 __ino_t __st_ino; /* 32bit file serial number. */
129 __mode_t st_mode; /* File mode. */
130 __nlink_t st_nlink; /* Link count. */
131# endif
104 __uid_t st_uid; /* User ID of the file's owner. */132 __uid_t st_uid; /* User ID of the file's owner. */
105 __gid_t st_gid; /* Group ID of the file's group.*/133 __gid_t st_gid; /* Group ID of the file's group.*/
106 unsigned long int st_rdev; /* Device number, if device. */134# ifdef __x86_64__
107 long int st_pad2[3];135 int __pad0;
108 __off64_t st_size; /* Size of file, in bytes. */136 __dev_t st_rdev; /* Device number, if device. */
109# ifdef __USE_XOPEN2K8137 __off_t st_size; /* Size of file, in bytes. */
110 /* Nanosecond resolution timestamps are stored in a format
111 equivalent to 'struct timespec'. This is the type used
112 whenever possible but the Unix namespace rules do not allow the
113 identifier 'timespec' to appear in the <sys/stat.h> header.
114 Therefore we have to handle the use of this header in strictly
115 standard-compliant sources special. */
116 struct timespec st_atim; /* Time of last access. */
117 struct timespec st_mtim; /* Time of last modification. */
118 struct timespec st_ctim; /* Time of last status change. */
119# else138# else
120 __time_t st_atime; /* Time of last access. */139 __dev_t st_rdev; /* Device number, if device. */
121 unsigned long int st_atimensec; /* Nscecs of last access. */140 unsigned int __pad2;
122 __time_t st_mtime; /* Time of last modification. */141 __off64_t st_size; /* Size of file, in bytes. */
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# endif142# endif
127 __blksize_t st_blksize; /* Optimal block size for I/O. */143 __blksize_t st_blksize; /* Optimal block size for I/O. */
128 long int st_pad3;144 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
129 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
130 long int st_pad4[14];
131 };
132#endif
133#else
134struct stat
135 {
136 __dev_t st_dev;
137 int st_pad1[3]; /* Reserved for st_dev expansion */
138#ifndef __USE_FILE_OFFSET64
139 __ino_t st_ino;
140#else
141 __ino64_t st_ino;
142#endif
143 __mode_t st_mode;
144 __nlink_t st_nlink;
145 __uid_t st_uid;
146 __gid_t st_gid;
147 __dev_t st_rdev;
148#if !defined __USE_FILE_OFFSET64
149 unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
150 __off_t st_size;
151 int st_pad3;
152#else
153 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
154 __off64_t st_size;
155#endif
156#ifdef __USE_XOPEN2K8
157 /* Nanosecond resolution timestamps are stored in a format
158 equivalent to 'struct timespec'. This is the type used
159 whenever possible but the Unix namespace rules do not allow the
160 identifier 'timespec' to appear in the <sys/stat.h> header.
161 Therefore we have to handle the use of this header in strictly
162 standard-compliant sources special. */
163 struct timespec st_atim; /* Time of last access. */
164 struct timespec st_mtim; /* Time of last modification. */
165 struct timespec st_ctim; /* Time of last status change. */
166# define st_atime st_atim.tv_sec /* Backward compatibility. */
167# define st_mtime st_mtim.tv_sec
168# define st_ctime st_ctim.tv_sec
169#else
170 __time_t st_atime; /* Time of last access. */
171 unsigned long int st_atimensec; /* Nscecs of last access. */
172 __time_t st_mtime; /* Time of last modification. */
173 unsigned long int st_mtimensec; /* Nsecs of last modification. */
174 __time_t st_ctime; /* Time of last status change. */
175 unsigned long int st_ctimensec; /* Nsecs of last status change. */
176#endif
177 __blksize_t st_blksize;
178 unsigned int st_pad4;
179#ifndef __USE_FILE_OFFSET64
180 __blkcnt_t st_blocks;
181#else
182 __blkcnt64_t st_blocks;
183#endif
184 int st_pad5[14];
185 };
186
187#ifdef __USE_LARGEFILE64
188struct stat64
189 {
190 __dev_t st_dev;
191 unsigned int st_pad1[3]; /* Reserved for st_dev expansion */
192 __ino64_t st_ino;
193 __mode_t st_mode;
194 __nlink_t st_nlink;
195 __uid_t st_uid;
196 __gid_t st_gid;
197 __dev_t st_rdev;
198 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
199 __off64_t st_size;
200# ifdef __USE_XOPEN2K8145# ifdef __USE_XOPEN2K8
201 /* Nanosecond resolution timestamps are stored in a format146 /* Nanosecond resolution timestamps are stored in a format
202 equivalent to 'struct timespec'. This is the type used147 equivalent to 'struct timespec'. This is the type used
...@@ -204,28 +149,30 @@ struct stat64...@@ -204,28 +149,30 @@ struct stat64
204 identifier 'timespec' to appear in the <sys/stat.h> header.149 identifier 'timespec' to appear in the <sys/stat.h> header.
205 Therefore we have to handle the use of this header in strictly150 Therefore we have to handle the use of this header in strictly
206 standard-compliant sources special. */151 standard-compliant sources special. */
207 struct timespec st_atim; /* Time of last access. */152 struct timespec st_atim; /* Time of last access. */
208 struct timespec st_mtim; /* Time of last modification. */153 struct timespec st_mtim; /* Time of last modification. */
209 struct timespec st_ctim; /* Time of last status change. */154 struct timespec st_ctim; /* Time of last status change. */
210# else155# else
211 __time_t st_atime; /* Time of last access. */156 __time_t st_atime; /* Time of last access. */
212 unsigned long int st_atimensec; /* Nscecs of last access. */157 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
213 __time_t st_mtime; /* Time of last modification. */158 __time_t st_mtime; /* Time of last modification. */
214 unsigned long int st_mtimensec; /* Nsecs of last modification. */159 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
215 __time_t st_ctime; /* Time of last status change. */160 __time_t st_ctime; /* Time of last status change. */
216 unsigned long int st_ctimensec; /* Nsecs of last status change. */161 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
217# endif162# endif
218 __blksize_t st_blksize;163# ifdef __x86_64__
219 unsigned int st_pad3;164 __syscall_slong_t __glibc_reserved[3];
220 __blkcnt64_t st_blocks;165# else
221 int st_pad4[14];166 __ino64_t st_ino; /* File serial number. */
222};167# endif
223#endif168 };
224#endif169#endif
225170
226/* Tell code we have these members. */171/* Tell code we have these members. */
227#define _STATBUF_ST_BLKSIZE172#define _STATBUF_ST_BLKSIZE
228#define _STATBUF_ST_RDEV173#define _STATBUF_ST_RDEV
174/* Nanosecond resolution time values are supported. */
175#define _STATBUF_ST_NSEC
229176
230/* Encoding of the file mode. */177/* Encoding of the file mode. */
231178
lib/libc/include/generic-glibc/bits/statx-generic.h+1
...@@ -48,6 +48,7 @@...@@ -48,6 +48,7 @@
48# define STATX_ATTR_NODUMP 0x004048# define STATX_ATTR_NODUMP 0x0040
49# define STATX_ATTR_ENCRYPTED 0x080049# define STATX_ATTR_ENCRYPTED 0x0800
50# define STATX_ATTR_AUTOMOUNT 0x100050# define STATX_ATTR_AUTOMOUNT 0x1000
51# define STATX_ATTR_VERITY 0x100000
51#endif /* !STATX_TYPE */52#endif /* !STATX_TYPE */
5253
53__BEGIN_DECLS54__BEGIN_DECLS
lib/libc/include/generic-glibc/bits/stdio-ldbl.h+31-15
...@@ -27,9 +27,17 @@ __LDBL_REDIR_DECL (vfprintf)...@@ -27,9 +27,17 @@ __LDBL_REDIR_DECL (vfprintf)
27__LDBL_REDIR_DECL (vprintf)27__LDBL_REDIR_DECL (vprintf)
28__LDBL_REDIR_DECL (vsprintf)28__LDBL_REDIR_DECL (vsprintf)
29#if !__GLIBC_USE (DEPRECATED_SCANF)29#if !__GLIBC_USE (DEPRECATED_SCANF)
30# if defined __LDBL_COMPAT
30__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf)31__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf)
31__LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)32__LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
32__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)33__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
34# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
35__LDBL_REDIR1_DECL (fscanf, __isoc99_fscanfieee128)
36__LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128)
37__LDBL_REDIR1_DECL (sscanf, __isoc99_sscanfieee128)
38# else
39# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
40# endif
33#else41#else
34__LDBL_REDIR_DECL (fscanf)42__LDBL_REDIR_DECL (fscanf)
35__LDBL_REDIR_DECL (scanf)43__LDBL_REDIR_DECL (scanf)
...@@ -43,9 +51,17 @@ __LDBL_REDIR_DECL (vsnprintf)...@@ -43,9 +51,17 @@ __LDBL_REDIR_DECL (vsnprintf)
4351
44#ifdef __USE_ISOC9952#ifdef __USE_ISOC99
45# if !__GLIBC_USE (DEPRECATED_SCANF)53# if !__GLIBC_USE (DEPRECATED_SCANF)
54# if defined __LDBL_COMPAT
46__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)55__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)
47__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)56__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
48__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)57__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
58# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
59__LDBL_REDIR1_DECL (vfscanf, __isoc99_vfscanfieee128)
60__LDBL_REDIR1_DECL (vscanf, __isoc99_vscanfieee128)
61__LDBL_REDIR1_DECL (vsscanf, __isoc99_vsscanfieee128)
62# else
63# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
64# endif
49# else65# else
50__LDBL_REDIR_DECL (vfscanf)66__LDBL_REDIR_DECL (vfscanf)
51__LDBL_REDIR_DECL (vsscanf)67__LDBL_REDIR_DECL (vsscanf)
...@@ -60,33 +76,33 @@ __LDBL_REDIR_DECL (dprintf)...@@ -60,33 +76,33 @@ __LDBL_REDIR_DECL (dprintf)
6076
61#ifdef __USE_GNU77#ifdef __USE_GNU
62__LDBL_REDIR_DECL (vasprintf)78__LDBL_REDIR_DECL (vasprintf)
63__LDBL_REDIR_DECL (__asprintf)79__LDBL_REDIR2_DECL (asprintf)
64__LDBL_REDIR_DECL (asprintf)80__LDBL_REDIR_DECL (asprintf)
65__LDBL_REDIR_DECL (obstack_printf)81__LDBL_REDIR_DECL (obstack_printf)
66__LDBL_REDIR_DECL (obstack_vprintf)82__LDBL_REDIR_DECL (obstack_vprintf)
67#endif83#endif
6884
69#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function85#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
70__LDBL_REDIR_DECL (__sprintf_chk)86__LDBL_REDIR2_DECL (sprintf_chk)
71__LDBL_REDIR_DECL (__vsprintf_chk)87__LDBL_REDIR2_DECL (vsprintf_chk)
72# if defined __USE_ISOC99 || defined __USE_UNIX9888# if defined __USE_ISOC99 || defined __USE_UNIX98
73__LDBL_REDIR_DECL (__snprintf_chk)89__LDBL_REDIR2_DECL (snprintf_chk)
74__LDBL_REDIR_DECL (__vsnprintf_chk)90__LDBL_REDIR2_DECL (vsnprintf_chk)
75# endif91# endif
76# if __USE_FORTIFY_LEVEL > 192# if __USE_FORTIFY_LEVEL > 1
77__LDBL_REDIR_DECL (__fprintf_chk)93__LDBL_REDIR2_DECL (fprintf_chk)
78__LDBL_REDIR_DECL (__printf_chk)94__LDBL_REDIR2_DECL (printf_chk)
79__LDBL_REDIR_DECL (__vfprintf_chk)95__LDBL_REDIR2_DECL (vfprintf_chk)
80__LDBL_REDIR_DECL (__vprintf_chk)96__LDBL_REDIR2_DECL (vprintf_chk)
81# ifdef __USE_XOPEN2K897# ifdef __USE_XOPEN2K8
82__LDBL_REDIR_DECL (__dprintf_chk)98__LDBL_REDIR2_DECL (dprintf_chk)
83__LDBL_REDIR_DECL (__vdprintf_chk)99__LDBL_REDIR2_DECL (vdprintf_chk)
84# endif100# endif
85# ifdef __USE_GNU101# ifdef __USE_GNU
86__LDBL_REDIR_DECL (__asprintf_chk)102__LDBL_REDIR2_DECL (asprintf_chk)
87__LDBL_REDIR_DECL (__vasprintf_chk)103__LDBL_REDIR2_DECL (vasprintf_chk)
88__LDBL_REDIR_DECL (__obstack_printf_chk)104__LDBL_REDIR2_DECL (obstack_printf_chk)
89__LDBL_REDIR_DECL (__obstack_vprintf_chk)105__LDBL_REDIR2_DECL (obstack_vprintf_chk)
90# endif106# endif
91# endif107# endif
92#endif108#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/stdio2.h+16-9
...@@ -24,10 +24,12 @@...@@ -24,10 +24,12 @@
24#endif24#endif
2525
26extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,26extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
27 const char *__restrict __format, ...) __THROW;27 const char *__restrict __format, ...) __THROW
28 __attr_access ((__write_only__, 1, 3));
28extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,29extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
29 const char *__restrict __format,30 const char *__restrict __format,
30 __gnuc_va_list __ap) __THROW;31 __gnuc_va_list __ap) __THROW
32 __attr_access ((__write_only__, 1, 3));
3133
32#ifdef __va_arg_pack34#ifdef __va_arg_pack
33__fortify_function int35__fortify_function int
...@@ -54,7 +56,8 @@ __NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,...@@ -54,7 +56,8 @@ __NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
5456
55extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,57extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
56 size_t __slen, const char *__restrict __format,58 size_t __slen, const char *__restrict __format,
57 ...) __THROW;59 ...) __THROW
60 __attr_access ((__write_only__, 1, 2));
58extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,61extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
59 size_t __slen, const char *__restrict __format,62 size_t __slen, const char *__restrict __format,
60 __gnuc_va_list __ap) __THROW;63 __gnuc_va_list __ap) __THROW;
...@@ -241,17 +244,19 @@ gets (char *__str)...@@ -241,17 +244,19 @@ gets (char *__str)
241#endif244#endif
242245
243extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,246extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
244 FILE *__restrict __stream) __wur;247 FILE *__restrict __stream)
248 __wur __attr_access ((__write_only__, 1, 3));
245extern char *__REDIRECT (__fgets_alias,249extern char *__REDIRECT (__fgets_alias,
246 (char *__restrict __s, int __n,250 (char *__restrict __s, int __n,
247 FILE *__restrict __stream), fgets) __wur;251 FILE *__restrict __stream), fgets)
252 __wur __attr_access ((__write_only__, 1, 2));
248extern char *__REDIRECT (__fgets_chk_warn,253extern char *__REDIRECT (__fgets_chk_warn,
249 (char *__restrict __s, size_t __size, int __n,254 (char *__restrict __s, size_t __size, int __n,
250 FILE *__restrict __stream), __fgets_chk)255 FILE *__restrict __stream), __fgets_chk)
251 __wur __warnattr ("fgets called with bigger size than length "256 __wur __warnattr ("fgets called with bigger size than length "
252 "of destination buffer");257 "of destination buffer");
253258
254__fortify_function __wur char *259__fortify_function __wur __attr_access ((__write_only__, 1, 2)) char *
255fgets (char *__restrict __s, int __n, FILE *__restrict __stream)260fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
256{261{
257 if (__bos (__s) != (size_t) -1)262 if (__bos (__s) != (size_t) -1)
...@@ -299,17 +304,19 @@ fread (void *__restrict __ptr, size_t __size, size_t __n,...@@ -299,17 +304,19 @@ fread (void *__restrict __ptr, size_t __size, size_t __n,
299304
300#ifdef __USE_GNU305#ifdef __USE_GNU
301extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,306extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
302 int __n, FILE *__restrict __stream) __wur;307 int __n, FILE *__restrict __stream)
308 __wur __attr_access ((__write_only__, 1, 3));
303extern char *__REDIRECT (__fgets_unlocked_alias,309extern char *__REDIRECT (__fgets_unlocked_alias,
304 (char *__restrict __s, int __n,310 (char *__restrict __s, int __n,
305 FILE *__restrict __stream), fgets_unlocked) __wur;311 FILE *__restrict __stream), fgets_unlocked)
312 __wur __attr_access ((__write_only__, 1, 2));
306extern char *__REDIRECT (__fgets_unlocked_chk_warn,313extern char *__REDIRECT (__fgets_unlocked_chk_warn,
307 (char *__restrict __s, size_t __size, int __n,314 (char *__restrict __s, size_t __size, int __n,
308 FILE *__restrict __stream), __fgets_unlocked_chk)315 FILE *__restrict __stream), __fgets_unlocked_chk)
309 __wur __warnattr ("fgets_unlocked called with bigger size than length "316 __wur __warnattr ("fgets_unlocked called with bigger size than length "
310 "of destination buffer");317 "of destination buffer");
311318
312__fortify_function __wur char *319__fortify_function __wur __attr_access ((__write_only__, 1, 2)) char *
313fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)320fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
314{321{
315 if (__bos (__s) != (size_t) -1)322 if (__bos (__s) != (size_t) -1)
lib/libc/include/generic-glibc/bits/stdlib-ldbl.h+22
...@@ -21,21 +21,43 @@...@@ -21,21 +21,43 @@
21#endif21#endif
2222
23#ifdef __USE_ISOC9923#ifdef __USE_ISOC99
24# ifdef __LDBL_COMPAT
24__LDBL_REDIR1_DECL (strtold, strtod)25__LDBL_REDIR1_DECL (strtold, strtod)
26# else
27__LDBL_REDIR1_DECL (strtold, __strtoieee128)
28# endif
25#endif29#endif
2630
27#ifdef __USE_GNU31#ifdef __USE_GNU
32# ifdef __LDBL_COMPAT
28__LDBL_REDIR1_DECL (strtold_l, strtod_l)33__LDBL_REDIR1_DECL (strtold_l, strtod_l)
34# else
35__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
36# endif
29#endif37#endif
3038
31#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)39#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
40# ifdef __LDBL_COMPAT
32__LDBL_REDIR1_DECL (strfroml, strfromd)41__LDBL_REDIR1_DECL (strfroml, strfromd)
42# else
43__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
44# endif
33#endif45#endif
3446
35#ifdef __USE_MISC47#ifdef __USE_MISC
48# if defined __LDBL_COMPAT
36__LDBL_REDIR1_DECL (qecvt, ecvt)49__LDBL_REDIR1_DECL (qecvt, ecvt)
37__LDBL_REDIR1_DECL (qfcvt, fcvt)50__LDBL_REDIR1_DECL (qfcvt, fcvt)
38__LDBL_REDIR1_DECL (qgcvt, gcvt)51__LDBL_REDIR1_DECL (qgcvt, gcvt)
39__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)52__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
40__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)53__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
54# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
55__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
56__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
57__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
58__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
59__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
60# else
61# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
62# endif
41#endif63#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/stdlib.h+11-6
...@@ -50,10 +50,11 @@ __NTH (realpath (const char *__restrict __name, char *__restrict __resolved))...@@ -50,10 +50,11 @@ __NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
5050
5151
52extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,52extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
53 size_t __nreal) __THROW __nonnull ((2));53 size_t __nreal) __THROW __nonnull ((2))
54 __attr_access ((__write_only__, 2, 3));
54extern int __REDIRECT_NTH (__ptsname_r_alias, (int __fd, char *__buf,55extern int __REDIRECT_NTH (__ptsname_r_alias, (int __fd, char *__buf,
55 size_t __buflen), ptsname_r)56 size_t __buflen), ptsname_r)
56 __nonnull ((2));57 __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
57extern int __REDIRECT_NTH (__ptsname_r_chk_warn,58extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
58 (int __fd, char *__buf, size_t __buflen,59 (int __fd, char *__buf, size_t __buflen,
59 size_t __nreal), __ptsname_r_chk)60 size_t __nreal), __ptsname_r_chk)
...@@ -97,11 +98,13 @@ __NTH (wctomb (char *__s, wchar_t __wchar))...@@ -97,11 +98,13 @@ __NTH (wctomb (char *__s, wchar_t __wchar))
9798
98extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,99extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
99 const char *__restrict __src,100 const char *__restrict __src,
100 size_t __len, size_t __dstlen) __THROW;101 size_t __len, size_t __dstlen) __THROW
102 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
101extern size_t __REDIRECT_NTH (__mbstowcs_alias,103extern size_t __REDIRECT_NTH (__mbstowcs_alias,
102 (wchar_t *__restrict __dst,104 (wchar_t *__restrict __dst,
103 const char *__restrict __src,105 const char *__restrict __src,
104 size_t __len), mbstowcs);106 size_t __len), mbstowcs)
107 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
105extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn,108extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn,
106 (wchar_t *__restrict __dst,109 (wchar_t *__restrict __dst,
107 const char *__restrict __src,110 const char *__restrict __src,
...@@ -129,11 +132,13 @@ __NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,...@@ -129,11 +132,13 @@ __NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,
129132
130extern size_t __wcstombs_chk (char *__restrict __dst,133extern size_t __wcstombs_chk (char *__restrict __dst,
131 const wchar_t *__restrict __src,134 const wchar_t *__restrict __src,
132 size_t __len, size_t __dstlen) __THROW;135 size_t __len, size_t __dstlen) __THROW
136 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
133extern size_t __REDIRECT_NTH (__wcstombs_alias,137extern size_t __REDIRECT_NTH (__wcstombs_alias,
134 (char *__restrict __dst,138 (char *__restrict __dst,
135 const wchar_t *__restrict __src,139 const wchar_t *__restrict __src,
136 size_t __len), wcstombs);140 size_t __len), wcstombs)
141 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
137extern size_t __REDIRECT_NTH (__wcstombs_chk_warn,142extern size_t __REDIRECT_NTH (__wcstombs_chk_warn,
138 (char *__restrict __dst,143 (char *__restrict __dst,
139 const wchar_t *__restrict __src,144 const wchar_t *__restrict __src,
lib/libc/include/generic-glibc/bits/string_fortified.h+3-2
...@@ -75,7 +75,7 @@ __NTH (memset (void *__dest, int __ch, size_t __len))...@@ -75,7 +75,7 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
75# include <bits/strings_fortified.h>75# include <bits/strings_fortified.h>
7676
77void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)77void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
78 __THROW __nonnull ((1));78 __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
7979
80__fortify_function void80__fortify_function void
81__NTH (explicit_bzero (void *__dest, size_t __len))81__NTH (explicit_bzero (void *__dest, size_t __len))
...@@ -108,7 +108,8 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,...@@ -108,7 +108,8 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
108108
109/* XXX We have no corresponding builtin yet. */109/* XXX We have no corresponding builtin yet. */
110extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,110extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
111 size_t __destlen) __THROW;111 size_t __destlen) __THROW
112 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
112extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,113extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
113 size_t __n), stpncpy);114 size_t __n), stpncpy);
114115
lib/libc/include/generic-glibc/bits/struct_mutex.h+18-39
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Default mutex implementation struct definitions.1/* x86 internal mutex struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -19,66 +19,45 @@...@@ -19,66 +19,45 @@
19#ifndef _THREAD_MUTEX_INTERNAL_H19#ifndef _THREAD_MUTEX_INTERNAL_H
20#define _THREAD_MUTEX_INTERNAL_H 120#define _THREAD_MUTEX_INTERNAL_H 1
2121
22/* Generic struct for both POSIX and C11 mutexes. New ports are expected
23 to use the default layout, however architecture can redefine it to
24 add arch-specific extension (such as lock-elision). The struct have
25 a size of 32 bytes on LP32 and 40 bytes on LP64 architectures. */
26
27struct __pthread_mutex_s22struct __pthread_mutex_s
28{23{
29 int __lock __LOCK_ALIGNMENT;24 int __lock;
30 unsigned int __count;25 unsigned int __count;
31 int __owner;26 int __owner;
32#if __WORDSIZE == 6427#ifdef __x86_64__
33 unsigned int __nusers;28 unsigned int __nusers;
34#endif29#endif
35 /* KIND must stay at this position in the structure to maintain30 /* KIND must stay at this position in the structure to maintain
36 binary compatibility with static initializers.31 binary compatibility with static initializers. */
37
38 Concurrency notes:
39 The __kind of a mutex is initialized either by the static
40 PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init.
41
42 After a mutex has been initialized, the __kind of a mutex is usually not
43 changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can
44 be enabled. This is done concurrently in the pthread_mutex_*lock
45 functions by using the macro FORCE_ELISION. This macro is only defined
46 for architectures which supports lock elision.
47
48 For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and
49 PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already
50 set type of a mutex. Before a mutex is initialized, only
51 PTHREAD_MUTEX_NO_ELISION_NP can be set with pthread_mutexattr_settype.
52
53 After a mutex has been initialized, the functions pthread_mutex_*lock can
54 enable elision - if the mutex-type and the machine supports it - by
55 setting the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently.
56 Afterwards the lock / unlock functions are using specific elision
57 code-paths. */
58 int __kind;32 int __kind;
59#if __WORDSIZE != 6433#ifdef __x86_64__
60 unsigned int __nusers;34 short __spins;
61#endif35 short __elision;
62#if __WORDSIZE == 64
63 int __spins;
64 __pthread_list_t __list;36 __pthread_list_t __list;
65# define __PTHREAD_MUTEX_HAVE_PREV 137# define __PTHREAD_MUTEX_HAVE_PREV 1
66#else38#else
39 unsigned int __nusers;
67 __extension__ union40 __extension__ union
68 {41 {
69 int __spins;42 struct
43 {
44 short __espins;
45 short __eelision;
46# define __spins __elision_data.__espins
47# define __elision __elision_data.__eelision
48 } __elision_data;
70 __pthread_slist_t __list;49 __pthread_slist_t __list;
71 };50 };
72# define __PTHREAD_MUTEX_HAVE_PREV 051# define __PTHREAD_MUTEX_HAVE_PREV 0
73#endif52#endif
74};53};
7554
76#if __PTHREAD_MUTEX_HAVE_PREV == 155#ifdef __x86_64__
77# define __PTHREAD_MUTEX_INITIALIZER(__kind) \56# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
78 0, 0, 0, 0, __kind, 0, { 0, 0 }57 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
79#else58#else
80# define __PTHREAD_MUTEX_INITIALIZER(__kind) \59# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
81 0, 0, 0, __kind, 0, { 0 }60 0, 0, 0, __kind, 0, { { 0, 0 } }
82#endif61#endif
8362
84#endif63#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/struct_rwlock.h+16-22
...@@ -1,5 +1,6 @@...@@ -1,5 +1,6 @@
1/* MIPS internal rwlock struct definitions.1/* x86 internal rwlock struct definitions.
2 Copyright (C) 2019-2020 Free Software Foundation, Inc.2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3
3 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
45
5 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
...@@ -27,45 +28,38 @@ struct __pthread_rwlock_arch_t...@@ -27,45 +28,38 @@ struct __pthread_rwlock_arch_t
27 unsigned int __writers_futex;28 unsigned int __writers_futex;
28 unsigned int __pad3;29 unsigned int __pad3;
29 unsigned int __pad4;30 unsigned int __pad4;
30#if _MIPS_SIM == _ABI6431#ifdef __x86_64__
31 int __cur_writer;32 int __cur_writer;
32 int __shared;33 int __shared;
33 unsigned long int __pad1;34 signed char __rwelision;
35# ifdef __ILP32__
36 unsigned char __pad1[3];
37# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
38# else
39 unsigned char __pad1[7];
40# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
41# endif
34 unsigned long int __pad2;42 unsigned long int __pad2;
35 /* FLAGS must stay at this position in the structure to maintain43 /* FLAGS must stay at this position in the structure to maintain
36 binary compatibility. */44 binary compatibility. */
37 unsigned int __flags;45 unsigned int __flags;
38# else46#else /* __x86_64__ */
39# if __BYTE_ORDER == __BIG_ENDIAN
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# else
47 /* FLAGS must stay at this position in the structure to maintain47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */48 binary compatibility. */
49 unsigned char __flags;49 unsigned char __flags;
50 unsigned char __shared;50 unsigned char __shared;
51 unsigned char __pad1;51 signed char __rwelision;
52 unsigned char __pad2;52 unsigned char __pad2;
53# endif
54 int __cur_writer;53 int __cur_writer;
55#endif54#endif
56};55};
5756
58#if _MIPS_SIM == _ABI6457#ifdef __x86_64__
59# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \58# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags59 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
61#else60#else
62# if __BYTE_ORDER == __BIG_ENDIAN61# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
63# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
64 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
65# else
66# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
67 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 062 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
68# endif
69#endif63#endif
7064
71#endif65#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/sys_errlist.h deleted-32
...@@ -1,32 +0,0 @@
1/* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version.
2 Copyright (C) 2002-2020 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 _STDIO_H
20# error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead."
21#endif
22
23/* sys_errlist and sys_nerr are deprecated. Use strerror instead. */
24
25#ifdef __USE_MISC
26extern int sys_nerr;
27extern const char *const sys_errlist[];
28#endif
29#ifdef __USE_GNU
30extern int _sys_nerr;
31extern const char *const _sys_errlist[];
32#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/syscall.h+22-2
...@@ -1,11 +1,11 @@...@@ -1,11 +1,11 @@
1/* Generated at libc build time from syscall list. */1/* Generated at libc build time from syscall list. */
2/* The system call list corresponds to kernel 5.4. */2/* The system call list corresponds to kernel 5.7. */
33
4#ifndef _SYSCALL_H4#ifndef _SYSCALL_H
5# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."5# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
6#endif6#endif
77
8#define __GLIBC_LINUX_VERSION_CODE 3287048#define __GLIBC_LINUX_VERSION_CODE 329472
99
10#ifdef __NR_FAST_atomic_update10#ifdef __NR_FAST_atomic_update
11# define SYS_FAST_atomic_update __NR_FAST_atomic_update11# define SYS_FAST_atomic_update __NR_FAST_atomic_update
...@@ -75,6 +75,18 @@...@@ -75,6 +75,18 @@
75# define SYS_alloc_hugepages __NR_alloc_hugepages75# define SYS_alloc_hugepages __NR_alloc_hugepages
76#endif76#endif
7777
78#ifdef __NR_arc_gettls
79# define SYS_arc_gettls __NR_arc_gettls
80#endif
81
82#ifdef __NR_arc_settls
83# define SYS_arc_settls __NR_arc_settls
84#endif
85
86#ifdef __NR_arc_usr_cmpxchg
87# define SYS_arc_usr_cmpxchg __NR_arc_usr_cmpxchg
88#endif
89
78#ifdef __NR_arch_prctl90#ifdef __NR_arch_prctl
79# define SYS_arch_prctl __NR_arch_prctl91# define SYS_arch_prctl __NR_arch_prctl
80#endif92#endif
...@@ -1079,6 +1091,10 @@...@@ -1079,6 +1091,10 @@
1079# define SYS_openat __NR_openat1091# define SYS_openat __NR_openat
1080#endif1092#endif
10811093
1094#ifdef __NR_openat2
1095# define SYS_openat2 __NR_openat2
1096#endif
1097
1082#ifdef __NR_osf_adjtime1098#ifdef __NR_osf_adjtime
1083# define SYS_osf_adjtime __NR_osf_adjtime1099# define SYS_osf_adjtime __NR_osf_adjtime
1084#endif1100#endif
...@@ -1551,6 +1567,10 @@...@@ -1551,6 +1567,10 @@
1551# define SYS_personality __NR_personality1567# define SYS_personality __NR_personality
1552#endif1568#endif
15531569
1570#ifdef __NR_pidfd_getfd
1571# define SYS_pidfd_getfd __NR_pidfd_getfd
1572#endif
1573
1554#ifdef __NR_pidfd_open1574#ifdef __NR_pidfd_open
1555# define SYS_pidfd_open __NR_pidfd_open1575# define SYS_pidfd_open __NR_pidfd_open
1556#endif1576#endif
lib/libc/include/generic-glibc/bits/sysctl.h deleted-1
...@@ -1 +0,0 @@
1/* Empty file. */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/syslog-ldbl.h+2-2
...@@ -27,9 +27,9 @@ __LDBL_REDIR_DECL (vsyslog)...@@ -27,9 +27,9 @@ __LDBL_REDIR_DECL (vsyslog)
27#endif27#endif
2828
29#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function29#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
30__LDBL_REDIR_DECL (__syslog_chk)30__LDBL_REDIR2_DECL (syslog_chk)
3131
32# ifdef __USE_MISC32# ifdef __USE_MISC
33__LDBL_REDIR_DECL (__vsyslog_chk)33__LDBL_REDIR2_DECL (vsyslog_chk)
34# endif34# endif
35#endif35#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/thread-shared-types.h+10
...@@ -116,4 +116,14 @@ struct __pthread_cond_s...@@ -116,4 +116,14 @@ struct __pthread_cond_s
116 unsigned int __g_signals[2];116 unsigned int __g_signals[2];
117};117};
118118
119typedef unsigned int __tss_t;
120typedef unsigned long int __thrd_t;
121
122typedef struct
123{
124 int __data __ONCE_ALIGNMENT;
125} __once_flag;
126
127#define __ONCE_FLAG_INIT { 0 }
128
119#endif /* _THREAD_SHARED_TYPES_H */129#endif /* _THREAD_SHARED_TYPES_H */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/timesize.h+8-5
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Bit size of the time_t type at glibc build time, general case.1/* Bit size of the time_t type at glibc build time, x86-64 and x32 case.
2 Copyright (C) 2018-2020 Free Software Foundation, Inc.2 Copyright (C) 2018-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
...@@ -16,7 +16,10 @@...@@ -16,7 +16,10 @@
16 License along with the GNU C Library; if not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
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
19#if defined __x86_64__ && defined __ILP32__
20/* For x32, time is 64-bit even though word size is 32-bit. */
21# define __TIMESIZE 64
22#else
23/* For others, time size is word size. */
24# define __TIMESIZE __WORDSIZE
25#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types.h+1
...@@ -160,6 +160,7 @@ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */...@@ -160,6 +160,7 @@ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */
160__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */160__STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */
161__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */161__STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
162__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */162__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
163__STD_TYPE __SUSECONDS64_T_TYPE __suseconds64_t;
163164
164__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */165__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
165__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */166__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
lib/libc/include/generic-glibc/bits/typesizes.h+42-24
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* bits/typesizes.h -- underlying types for *_t. Generic version.1/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.2 Copyright (C) 2012-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -26,42 +26,55 @@...@@ -26,42 +26,55 @@
26/* See <bits/types.h> for the meaning of these macros. This file exists so26/* 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. */27 that <bits/types.h> need not vary across different GNU platforms. */
2828
29/* X32 kernel interface is 64-bit. */
30#if defined __x86_64__ && defined __ILP32__
31# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
32# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
33#else
34# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
35# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
36#endif
37
29#define __DEV_T_TYPE __UQUAD_TYPE38#define __DEV_T_TYPE __UQUAD_TYPE
30#define __UID_T_TYPE __U32_TYPE39#define __UID_T_TYPE __U32_TYPE
31#define __GID_T_TYPE __U32_TYPE40#define __GID_T_TYPE __U32_TYPE
32#define __INO_T_TYPE __ULONGWORD_TYPE41#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
33#define __INO64_T_TYPE __UQUAD_TYPE42#define __INO64_T_TYPE __UQUAD_TYPE
34#define __MODE_T_TYPE __U32_TYPE43#define __MODE_T_TYPE __U32_TYPE
35#define __NLINK_T_TYPE __UWORD_TYPE44#ifdef __x86_64__
36#define __OFF_T_TYPE __SLONGWORD_TYPE45# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
46# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
47#else
48# define __NLINK_T_TYPE __UWORD_TYPE
49# define __FSWORD_T_TYPE __SWORD_TYPE
50#endif
51#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
37#define __OFF64_T_TYPE __SQUAD_TYPE52#define __OFF64_T_TYPE __SQUAD_TYPE
38#define __PID_T_TYPE __S32_TYPE53#define __PID_T_TYPE __S32_TYPE
39#define __RLIM_T_TYPE __ULONGWORD_TYPE54#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
40#define __RLIM64_T_TYPE __UQUAD_TYPE55#define __RLIM64_T_TYPE __UQUAD_TYPE
41#define __BLKCNT_T_TYPE __SLONGWORD_TYPE56#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
42#define __BLKCNT64_T_TYPE __SQUAD_TYPE57#define __BLKCNT64_T_TYPE __SQUAD_TYPE
43#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE58#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
44#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE59#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
45#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE60#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
46#define __FSFILCNT64_T_TYPE __UQUAD_TYPE61#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
47#define __FSWORD_T_TYPE __SWORD_TYPE62#define __ID_T_TYPE __U32_TYPE
48#define __ID_T_TYPE __U32_TYPE63#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
49#define __CLOCK_T_TYPE __SLONGWORD_TYPE64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE65#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
53#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
54#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
55#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
56#define __TIMER_T_TYPE void *71#define __TIMER_T_TYPE void *
57#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE72#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
58#define __FSID_T_TYPE struct { int __val[2]; }73#define __FSID_T_TYPE struct { int __val[2]; }
59#define __SSIZE_T_TYPE __SWORD_TYPE74#define __SSIZE_T_TYPE __SWORD_TYPE
60#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE75#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
61#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
62#define __CPU_MASK_TYPE __ULONGWORD_TYPE
6376
64#ifdef __LP64__77#ifdef __x86_64__
65/* Tell the libc code that off_t and off64_t are actually the same type78/* Tell the libc code that off_t and off64_t are actually the same type
66 for all ABI purposes, even if possibly expressed as different base types79 for all ABI purposes, even if possibly expressed as different base types
67 for C type-checking purposes. */80 for C type-checking purposes. */
...@@ -70,19 +83,24 @@...@@ -70,19 +83,24 @@
70/* Same for ino_t and ino64_t. */83/* Same for ino_t and ino64_t. */
71# define __INO_T_MATCHES_INO64_T 184# define __INO_T_MATCHES_INO64_T 1
7285
73/* And for rlim_t and rlim64_t. */86/* And for __rlim_t and __rlim64_t. */
74# define __RLIM_T_MATCHES_RLIM64_T 187# define __RLIM_T_MATCHES_RLIM64_T 1
7588
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */89/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 190# define __STATFS_MATCHES_STATFS64 1
91
92/* And for getitimer, setitimer and rusage */
93# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
78#else94#else
79# define __RLIM_T_MATCHES_RLIM64_T 095# define __RLIM_T_MATCHES_RLIM64_T 0
8096
81# define __STATFS_MATCHES_STATFS64 097# define __STATFS_MATCHES_STATFS64 0
98
99# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
82#endif100#endif
83101
84/* Number of descriptors that can fit in an `fd_set'. */102/* Number of descriptors that can fit in an `fd_set'. */
85#define __FD_SETSIZE 1024103#define __FD_SETSIZE 1024
86104
87105
88#endif /* bits/typesizes.h */106#endif /* bits/typesizes.h */
\ No newline at end of file
lib/libc/include/generic-glibc/bits/unistd.h+35-23
...@@ -21,9 +21,11 @@...@@ -21,9 +21,11 @@
21#endif21#endif
2222
23extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,23extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
24 size_t __buflen) __wur;24 size_t __buflen)
25 __wur __attr_access ((__write_only__, 2, 3));
25extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,26extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,
26 size_t __nbytes), read) __wur;27 size_t __nbytes), read)
28 __wur __attr_access ((__write_only__, 2, 3));
27extern ssize_t __REDIRECT (__read_chk_warn,29extern ssize_t __REDIRECT (__read_chk_warn,
28 (int __fd, void *__buf, size_t __nbytes,30 (int __fd, void *__buf, size_t __nbytes,
29 size_t __buflen), __read_chk)31 size_t __buflen), __read_chk)
...@@ -46,15 +48,19 @@ read (int __fd, void *__buf, size_t __nbytes)...@@ -46,15 +48,19 @@ read (int __fd, void *__buf, size_t __nbytes)
4648
47#ifdef __USE_UNIX9849#ifdef __USE_UNIX98
48extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,50extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
49 __off_t __offset, size_t __bufsize) __wur;51 __off_t __offset, size_t __bufsize)
52 __wur __attr_access ((__write_only__, 2, 3));
50extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,53extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
51 __off64_t __offset, size_t __bufsize) __wur;54 __off64_t __offset, size_t __bufsize)
55 __wur __attr_access ((__write_only__, 2, 3));
52extern ssize_t __REDIRECT (__pread_alias,56extern ssize_t __REDIRECT (__pread_alias,
53 (int __fd, void *__buf, size_t __nbytes,57 (int __fd, void *__buf, size_t __nbytes,
54 __off_t __offset), pread) __wur;58 __off_t __offset), pread)
59 __wur __attr_access ((__write_only__, 2, 3));
55extern ssize_t __REDIRECT (__pread64_alias,60extern ssize_t __REDIRECT (__pread64_alias,
56 (int __fd, void *__buf, size_t __nbytes,61 (int __fd, void *__buf, size_t __nbytes,
57 __off64_t __offset), pread64) __wur;62 __off64_t __offset), pread64)
63 __wur __attr_access ((__write_only__, 2, 3));
58extern ssize_t __REDIRECT (__pread_chk_warn,64extern ssize_t __REDIRECT (__pread_chk_warn,
59 (int __fd, void *__buf, size_t __nbytes,65 (int __fd, void *__buf, size_t __nbytes,
60 __off_t __offset, size_t __bufsize), __pread_chk)66 __off_t __offset, size_t __bufsize), __pread_chk)
...@@ -123,11 +129,11 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)...@@ -123,11 +129,11 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
123extern ssize_t __readlink_chk (const char *__restrict __path,129extern ssize_t __readlink_chk (const char *__restrict __path,
124 char *__restrict __buf, size_t __len,130 char *__restrict __buf, size_t __len,
125 size_t __buflen)131 size_t __buflen)
126 __THROW __nonnull ((1, 2)) __wur;132 __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
127extern ssize_t __REDIRECT_NTH (__readlink_alias,133extern ssize_t __REDIRECT_NTH (__readlink_alias,
128 (const char *__restrict __path,134 (const char *__restrict __path,
129 char *__restrict __buf, size_t __len), readlink)135 char *__restrict __buf, size_t __len), readlink)
130 __nonnull ((1, 2)) __wur;136 __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
131extern ssize_t __REDIRECT_NTH (__readlink_chk_warn,137extern ssize_t __REDIRECT_NTH (__readlink_chk_warn,
132 (const char *__restrict __path,138 (const char *__restrict __path,
133 char *__restrict __buf, size_t __len,139 char *__restrict __buf, size_t __len,
...@@ -155,12 +161,12 @@ __NTH (readlink (const char *__restrict __path, char *__restrict __buf,...@@ -155,12 +161,12 @@ __NTH (readlink (const char *__restrict __path, char *__restrict __buf,
155extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,161extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
156 char *__restrict __buf, size_t __len,162 char *__restrict __buf, size_t __len,
157 size_t __buflen)163 size_t __buflen)
158 __THROW __nonnull ((2, 3)) __wur;164 __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
159extern ssize_t __REDIRECT_NTH (__readlinkat_alias,165extern ssize_t __REDIRECT_NTH (__readlinkat_alias,
160 (int __fd, const char *__restrict __path,166 (int __fd, const char *__restrict __path,
161 char *__restrict __buf, size_t __len),167 char *__restrict __buf, size_t __len),
162 readlinkat)168 readlinkat)
163 __nonnull ((2, 3)) __wur;169 __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4));
164extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn,170extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn,
165 (int __fd, const char *__restrict __path,171 (int __fd, const char *__restrict __path,
166 char *__restrict __buf, size_t __len,172 char *__restrict __buf, size_t __len,
...@@ -187,9 +193,10 @@ __NTH (readlinkat (int __fd, const char *__restrict __path,...@@ -187,9 +193,10 @@ __NTH (readlinkat (int __fd, const char *__restrict __path,
187#endif193#endif
188194
189extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)195extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
190 __THROW __wur;196 __THROW __wur __attr_access ((__write_only__, 1, 2));
191extern char *__REDIRECT_NTH (__getcwd_alias,197extern char *__REDIRECT_NTH (__getcwd_alias,
192 (char *__buf, size_t __size), getcwd) __wur;198 (char *__buf, size_t __size), getcwd)
199 __wur __attr_access ((__write_only__, 1, 2));
193extern char *__REDIRECT_NTH (__getcwd_chk_warn,200extern char *__REDIRECT_NTH (__getcwd_chk_warn,
194 (char *__buf, size_t __size, size_t __buflen),201 (char *__buf, size_t __size, size_t __buflen),
195 __getcwd_chk)202 __getcwd_chk)
...@@ -212,7 +219,7 @@ __NTH (getcwd (char *__buf, size_t __size))...@@ -212,7 +219,7 @@ __NTH (getcwd (char *__buf, size_t __size))
212219
213#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED220#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
214extern char *__getwd_chk (char *__buf, size_t buflen)221extern char *__getwd_chk (char *__buf, size_t buflen)
215 __THROW __nonnull ((1)) __wur;222 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
216extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd)223extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd)
217 __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd "224 __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd "
218 "doesn't specify buffer size");225 "doesn't specify buffer size");
...@@ -227,9 +234,11 @@ __NTH (getwd (char *__buf))...@@ -227,9 +234,11 @@ __NTH (getwd (char *__buf))
227#endif234#endif
228235
229extern size_t __confstr_chk (int __name, char *__buf, size_t __len,236extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
230 size_t __buflen) __THROW;237 size_t __buflen) __THROW
238 __attr_access ((__write_only__, 2, 3));
231extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf,239extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf,
232 size_t __len), confstr);240 size_t __len), confstr)
241 __attr_access ((__write_only__, 2, 3));
233extern size_t __REDIRECT_NTH (__confstr_chk_warn,242extern size_t __REDIRECT_NTH (__confstr_chk_warn,
234 (int __name, char *__buf, size_t __len,243 (int __name, char *__buf, size_t __len,
235 size_t __buflen), __confstr_chk)244 size_t __buflen), __confstr_chk)
...@@ -252,9 +261,9 @@ __NTH (confstr (int __name, char *__buf, size_t __len))...@@ -252,9 +261,9 @@ __NTH (confstr (int __name, char *__buf, size_t __len))
252261
253262
254extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)263extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
255 __THROW __wur;264 __THROW __wur __attr_access ((__write_only__, 2, 1));
256extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]),265extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]),
257 getgroups) __wur;266 getgroups) __wur __attr_access ((__write_only__, 2, 1));
258extern int __REDIRECT_NTH (__getgroups_chk_warn,267extern int __REDIRECT_NTH (__getgroups_chk_warn,
259 (int __size, __gid_t __list[], size_t __listlen),268 (int __size, __gid_t __list[], size_t __listlen),
260 __getgroups_chk)269 __getgroups_chk)
...@@ -277,7 +286,8 @@ __NTH (getgroups (int __size, __gid_t __list[]))...@@ -277,7 +286,8 @@ __NTH (getgroups (int __size, __gid_t __list[]))
277286
278287
279extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,288extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
280 size_t __nreal) __THROW __nonnull ((2));289 size_t __nreal) __THROW __nonnull ((2))
290 __attr_access ((__write_only__, 2, 3));
281extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf,291extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf,
282 size_t __buflen), ttyname_r)292 size_t __buflen), ttyname_r)
283 __nonnull ((2));293 __nonnull ((2));
...@@ -304,7 +314,7 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))...@@ -304,7 +314,7 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
304314
305#ifdef __USE_POSIX199506315#ifdef __USE_POSIX199506
306extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)316extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
307 __nonnull ((1));317 __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
308extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen),318extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen),
309 getlogin_r) __nonnull ((1));319 getlogin_r) __nonnull ((1));
310extern int __REDIRECT (__getlogin_r_chk_warn,320extern int __REDIRECT (__getlogin_r_chk_warn,
...@@ -331,9 +341,10 @@ getlogin_r (char *__buf, size_t __buflen)...@@ -331,9 +341,10 @@ getlogin_r (char *__buf, size_t __buflen)
331341
332#if defined __USE_MISC || defined __USE_UNIX98342#if defined __USE_MISC || defined __USE_UNIX98
333extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)343extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
334 __THROW __nonnull ((1));344 __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
335extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen),345extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen),
336 gethostname) __nonnull ((1));346 gethostname)
347 __nonnull ((1)) __attr_access ((__write_only__, 1, 2));
337extern int __REDIRECT_NTH (__gethostname_chk_warn,348extern int __REDIRECT_NTH (__gethostname_chk_warn,
338 (char *__buf, size_t __buflen, size_t __nreal),349 (char *__buf, size_t __buflen, size_t __nreal),
339 __gethostname_chk)350 __gethostname_chk)
...@@ -358,10 +369,11 @@ __NTH (gethostname (char *__buf, size_t __buflen))...@@ -358,10 +369,11 @@ __NTH (gethostname (char *__buf, size_t __buflen))
358369
359#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98)370#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98)
360extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)371extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
361 __THROW __nonnull ((1)) __wur;372 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
362extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf,373extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf,
363 size_t __buflen),374 size_t __buflen),
364 getdomainname) __nonnull ((1)) __wur;375 getdomainname) __nonnull ((1))
376 __wur __attr_access ((__write_only__, 1, 2));
365extern int __REDIRECT_NTH (__getdomainname_chk_warn,377extern int __REDIRECT_NTH (__getdomainname_chk_warn,
366 (char *__buf, size_t __buflen, size_t __nreal),378 (char *__buf, size_t __buflen, size_t __nreal),
367 __getdomainname_chk)379 __getdomainname_chk)
lib/libc/include/generic-glibc/bits/wchar-ldbl.h+30-6
...@@ -28,9 +28,17 @@ __LDBL_REDIR_DECL (vfwprintf);...@@ -28,9 +28,17 @@ __LDBL_REDIR_DECL (vfwprintf);
28__LDBL_REDIR_DECL (vwprintf);28__LDBL_REDIR_DECL (vwprintf);
29__LDBL_REDIR_DECL (vswprintf);29__LDBL_REDIR_DECL (vswprintf);
30# if !__GLIBC_USE (DEPRECATED_SCANF)30# if !__GLIBC_USE (DEPRECATED_SCANF)
31# if defined __LDBL_COMPAT
31__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf)32__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf)
32__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)33__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
33__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)34__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
35# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
36__LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128)
37__LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128)
38__LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128)
39# else
40# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
41# endif
34# else42# else
35__LDBL_REDIR_DECL (fwscanf);43__LDBL_REDIR_DECL (fwscanf);
36__LDBL_REDIR_DECL (wscanf);44__LDBL_REDIR_DECL (wscanf);
...@@ -39,11 +47,23 @@ __LDBL_REDIR_DECL (swscanf);...@@ -39,11 +47,23 @@ __LDBL_REDIR_DECL (swscanf);
39#endif47#endif
4048
41#ifdef __USE_ISOC9949#ifdef __USE_ISOC99
50# ifdef __LDBL_COMPAT
42__LDBL_REDIR1_DECL (wcstold, wcstod);51__LDBL_REDIR1_DECL (wcstold, wcstod);
52# else
53__LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
54# endif
43# if !__GLIBC_USE (DEPRECATED_SCANF)55# if !__GLIBC_USE (DEPRECATED_SCANF)
56# if defined __LDBL_COMPAT
44__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)57__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)
45__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)58__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
46__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)59__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
60# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
61__LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128)
62__LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128)
63__LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128)
64# else
65# error bits/stdlib-ldbl.h included when no ldbl redirections are required.
66# endif
47# else67# else
48__LDBL_REDIR_DECL (vfwscanf);68__LDBL_REDIR_DECL (vfwscanf);
49__LDBL_REDIR_DECL (vwscanf);69__LDBL_REDIR_DECL (vwscanf);
...@@ -52,16 +72,20 @@ __LDBL_REDIR_DECL (vswscanf);...@@ -52,16 +72,20 @@ __LDBL_REDIR_DECL (vswscanf);
52#endif72#endif
5373
54#ifdef __USE_GNU74#ifdef __USE_GNU
75# ifdef __LDBL_COMPAT
55__LDBL_REDIR1_DECL (wcstold_l, wcstod_l);76__LDBL_REDIR1_DECL (wcstold_l, wcstod_l);
77# else
78__LDBL_REDIR1_DECL (wcstold_l, __wcstoieee128_l)
79# endif
56#endif80#endif
5781
58#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function82#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
59__LDBL_REDIR_DECL (__swprintf_chk)83__LDBL_REDIR2_DECL (swprintf_chk)
60__LDBL_REDIR_DECL (__vswprintf_chk)84__LDBL_REDIR2_DECL (vswprintf_chk)
61# if __USE_FORTIFY_LEVEL > 185# if __USE_FORTIFY_LEVEL > 1
62__LDBL_REDIR_DECL (__fwprintf_chk)86__LDBL_REDIR2_DECL (fwprintf_chk)
63__LDBL_REDIR_DECL (__wprintf_chk)87__LDBL_REDIR2_DECL (wprintf_chk)
64__LDBL_REDIR_DECL (__vfwprintf_chk)88__LDBL_REDIR2_DECL (vfwprintf_chk)
65__LDBL_REDIR_DECL (__vwprintf_chk)89__LDBL_REDIR2_DECL (vwprintf_chk)
66# endif90# endif
67#endif91#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/wordsize.h+11-25
...@@ -1,31 +1,17 @@...@@ -1,31 +1,17 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Determine the wordsize from the preprocessor defines. */
2 This file is part of the GNU C Library.
32
4 The GNU C Library is free software; you can redistribute it and/or3#if defined __x86_64__ && !defined __ILP32__
5 modify it under the terms of the GNU Lesser General Public4# define __WORDSIZE 64
6 License as published by the Free Software Foundation; either5#else
7 version 2.1 of the License, or (at your option) any later version.6# define __WORDSIZE 32
87#define __WORDSIZE32_SIZE_ULONG 0
9 The GNU C Library is distributed in the hope that it will be useful,8#define __WORDSIZE32_PTRDIFF_LONG 0
10 but WITHOUT ANY WARRANTY; without even the implied warranty of9#endif
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#include <sgidefs.h>
19
20#define __WORDSIZE _MIPS_SZPTR
2110
22#if _MIPS_SIM == _ABI6411#ifdef __x86_64__
23# define __WORDSIZE_TIME64_COMPAT32 112# define __WORDSIZE_TIME64_COMPAT32 1
13/* Both x86-64 and x32 use the 64-bit system call interface. */
14# define __SYSCALL_WORDSIZE 64
24#else15#else
25# define __WORDSIZE_TIME64_COMPAT32 016# define __WORDSIZE_TIME64_COMPAT32 0
26#endif
27
28#if __WORDSIZE == 32
29#define __WORDSIZE32_SIZE_ULONG 0
30#define __WORDSIZE32_PTRDIFF_LONG 0
31#endif17#endif
\ No newline at end of file
lib/libc/include/generic-glibc/complex.h+27-2
...@@ -95,11 +95,15 @@ __BEGIN_DECLS...@@ -95,11 +95,15 @@ __BEGIN_DECLS
9595
96#define __MATHCALL(function, args) \96#define __MATHCALL(function, args) \
97 __MATHDECL (_Mdouble_complex_,function, args)97 __MATHDECL (_Mdouble_complex_,function, args)
98#define __MATHDECL(type, function, args) \98#define __MATHDECL_IMPL(type, function, args) \
99 __MATHDECL_1(type, function, args); \99 __MATHDECL_1(type, function, args); \
100 __MATHDECL_1(type, __CONCAT(__,function), args)100 __MATHDECL_1(type, __CONCAT(__,function), args)
101#define __MATHDECL_1(type, function, args) \101#define __MATHDECL(type, function, args) \
102 __MATHDECL_IMPL(type, function, args)
103#define __MATHDECL_1_IMPL(type, function, args) \
102 extern type __MATH_PRECNAME(function) args __THROW104 extern type __MATH_PRECNAME(function) args __THROW
105#define __MATHDECL_1(type, function, args) \
106 __MATHDECL_1_IMPL(type, function, args)
103107
104#define _Mdouble_ double108#define _Mdouble_ double
105#define __MATH_PRECNAME(name) name109#define __MATH_PRECNAME(name) name
...@@ -122,11 +126,31 @@ __BEGIN_DECLS...@@ -122,11 +126,31 @@ __BEGIN_DECLS
122# undef __MATHDECL_1126# undef __MATHDECL_1
123# define __MATHDECL_1(type, function, args) \127# define __MATHDECL_1(type, function, args) \
124 extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function)128 extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function)
129# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
130# undef __MATHDECL_1
131# undef __MATHDECL
132# define __REDIR_TO(function) \
133 __ ## function ## ieee128
134# define __MATHDECL_1(type, function, alias, args) \
135 extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, alias)
136#define __MATHDECL(type, function, args) \
137 __MATHDECL_1(type, function, __REDIR_TO(function), args); \
138 __MATHDECL_1(type, __CONCAT(__,function), __REDIR_TO(function), args)
125# endif139# endif
126140
127# define _Mdouble_ long double141# define _Mdouble_ long double
128# define __MATH_PRECNAME(name) name##l142# define __MATH_PRECNAME(name) name##l
129# include <bits/cmathcalls.h>143# include <bits/cmathcalls.h>
144# if defined __LDBL_COMPAT \
145 || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
146# undef __REDIR_TO
147# undef __MATHDECL_1
148# undef __MATHDECL
149#define __MATHDECL(type, function, args) \
150 __MATHDECL_IMPL(type, function, args)
151# define __MATHDECL_1(type, function, args) \
152 __MATHDECL_1_IMPL(type, function, args)
153# endif
130#endif154#endif
131#undef _Mdouble_155#undef _Mdouble_
132#undef __MATH_PRECNAME156#undef __MATH_PRECNAME
...@@ -215,6 +239,7 @@ __BEGIN_DECLS...@@ -215,6 +239,7 @@ __BEGIN_DECLS
215# undef _Mdouble_complex_239# undef _Mdouble_complex_
216#endif240#endif
217241
242#undef __MATHDECL_1_IMPL
218#undef __MATHDECL_1243#undef __MATHDECL_1
219#undef __MATHDECL244#undef __MATHDECL
220#undef __MATHCALL245#undef __MATHCALL
lib/libc/include/generic-glibc/elf.h+78-2
...@@ -330,7 +330,7 @@ typedef struct...@@ -330,7 +330,7 @@ typedef struct
330#define EM_CLOUDSHIELD 192 /* CloudShield */330#define EM_CLOUDSHIELD 192 /* CloudShield */
331#define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */331#define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */
332#define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */332#define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */
333#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */333#define EM_ARCV2 195 /* Synopsys ARCv2 ISA. */
334#define EM_OPEN8 196 /* Open8 RISC */334#define EM_OPEN8 196 /* Open8 RISC */
335#define EM_RL78 197 /* Renesas RL78 */335#define EM_RL78 197 /* Renesas RL78 */
336#define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */336#define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */
...@@ -721,6 +721,7 @@ typedef struct...@@ -721,6 +721,7 @@ typedef struct
721#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */721#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
722#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */722#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
723#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */723#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
724#define PT_GNU_PROPERTY 0x6474e553 /* GNU property */
724#define PT_LOSUNW 0x6ffffffa725#define PT_LOSUNW 0x6ffffffa
725#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */726#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
726#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */727#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
...@@ -1318,6 +1319,12 @@ typedef struct...@@ -1318,6 +1319,12 @@ typedef struct
1318/* Application-specific semantics, hi */1319/* Application-specific semantics, hi */
1319#define GNU_PROPERTY_HIUSER 0xffffffff1320#define GNU_PROPERTY_HIUSER 0xffffffff
13201321
1322/* AArch64 specific GNU properties. */
1323#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
1324
1325#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
1326#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1)
1327
1321/* The x86 instruction sets indicated by the corresponding bits are1328/* The x86 instruction sets indicated by the corresponding bits are
1322 used in program. Their support in the hardware is optional. */1329 used in program. Their support in the hardware is optional. */
1323#define GNU_PROPERTY_X86_ISA_1_USED 0xc00000001330#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
...@@ -3946,8 +3953,9 @@ enum...@@ -3946,8 +3953,9 @@ enum
3946#define R_RISCV_SET16 553953#define R_RISCV_SET16 55
3947#define R_RISCV_SET32 563954#define R_RISCV_SET32 56
3948#define R_RISCV_32_PCREL 573955#define R_RISCV_32_PCREL 57
3956#define R_RISCV_IRELATIVE 58
39493957
3950#define R_RISCV_NUM 583958#define R_RISCV_NUM 59
39513959
3952/* BPF specific declarations. */3960/* BPF specific declarations. */
39533961
...@@ -4027,6 +4035,74 @@ enum...@@ -4027,6 +4035,74 @@ enum
4027#define R_NDS32_TLS_TPOFF 1024035#define R_NDS32_TLS_TPOFF 102
4028#define R_NDS32_TLS_DESC 1194036#define R_NDS32_TLS_DESC 119
40294037
4038/* ARCompact/ARCv2 specific relocs. */
4039#define R_ARC_NONE 0x0
4040#define R_ARC_8 0x1
4041#define R_ARC_16 0x2
4042#define R_ARC_24 0x3
4043#define R_ARC_32 0x4
4044#define R_ARC_B26 0x5
4045#define R_ARC_B22_PCREL 0x6
4046#define R_ARC_H30 0x7
4047#define R_ARC_N8 0x8
4048#define R_ARC_N16 0x9
4049#define R_ARC_N24 0xA
4050#define R_ARC_N32 0xB
4051#define R_ARC_SDA 0xC
4052#define R_ARC_SECTOFF 0xD
4053#define R_ARC_S21H_PCREL 0xE
4054#define R_ARC_S21W_PCREL 0xF
4055#define R_ARC_S25H_PCREL 0x10
4056#define R_ARC_S25W_PCREL 0x11
4057#define R_ARC_SDA32 0x12
4058#define R_ARC_SDA_LDST 0x13
4059#define R_ARC_SDA_LDST1 0x14
4060#define R_ARC_SDA_LDST2 0x15
4061#define R_ARC_SDA16_LD 0x16
4062#define R_ARC_SDA16_LD1 0x17
4063#define R_ARC_SDA16_LD2 0x18
4064#define R_ARC_S13_PCREL 0x19
4065#define R_ARC_W 0x1A
4066#define R_ARC_32_ME 0x1B
4067#define R_ARC_N32_ME 0x1C
4068#define R_ARC_SECTOFF_ME 0x1D
4069#define R_ARC_SDA32_ME 0x1E
4070#define R_ARC_W_ME 0x1F
4071#define R_ARC_H30_ME 0x20
4072#define R_ARC_SECTOFF_U8 0x21
4073#define R_ARC_SECTOFF_S9 0x22
4074#define R_AC_SECTOFF_U8 0x23
4075#define R_AC_SECTOFF_U8_1 0x24
4076#define R_AC_SECTOFF_U8_2 0x25
4077#define R_AC_SECTOFF_S9 0x26
4078#define R_AC_SECTOFF_S9_1 0x27
4079#define R_AC_SECTOFF_S9_2 0x28
4080#define R_ARC_SECTOFF_ME_1 0x29
4081#define R_ARC_SECTOFF_ME_2 0x2A
4082#define R_ARC_SECTOFF_1 0x2B
4083#define R_ARC_SECTOFF_2 0x2C
4084#define R_ARC_PC32 0x32
4085#define R_ARC_GOTPC32 0x33
4086#define R_ARC_PLT32 0x34
4087#define R_ARC_COPY 0x35
4088#define R_ARC_GLOB_DAT 0x36
4089#define R_ARC_JUMP_SLOT 0x37
4090#define R_ARC_RELATIVE 0x38
4091#define R_ARC_GOTOFF 0x39
4092#define R_ARC_GOTPC 0x3A
4093#define R_ARC_GOT32 0x3B
4094
4095#define R_ARC_TLS_DTPMOD 0x42
4096#define R_ARC_TLS_DTPOFF 0x43
4097#define R_ARC_TLS_TPOFF 0x44
4098#define R_ARC_TLS_GD_GOT 0x45
4099#define R_ARC_TLS_GD_LD 0x46
4100#define R_ARC_TLS_GD_CALL 0x47
4101#define R_ARC_TLS_IE_GOT 0x48
4102#define R_ARC_TLS_DTPOFF_S9 0x4a
4103#define R_ARC_TLS_LE_S9 0x4a
4104#define R_ARC_TLS_LE_32 0x4b
4105
4030__END_DECLS4106__END_DECLS
40314107
4032#endif /* elf.h */4108#endif /* elf.h */
\ No newline at end of file
lib/libc/include/generic-glibc/err.h+2-1
...@@ -52,7 +52,8 @@ extern void errx (int __status, const char *__format, ...)...@@ -52,7 +52,8 @@ extern void errx (int __status, const char *__format, ...)
52extern void verrx (int __status, const char *, __gnuc_va_list)52extern void verrx (int __status, const char *, __gnuc_va_list)
53 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));53 __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
5454
55#ifdef __LDBL_COMPAT55#include <bits/floatn.h>
56#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
56# include <bits/err-ldbl.h>57# include <bits/err-ldbl.h>
57#endif58#endif
5859
lib/libc/include/generic-glibc/error.h+4-2
...@@ -47,11 +47,13 @@ extern unsigned int error_message_count;...@@ -47,11 +47,13 @@ extern unsigned int error_message_count;
47 variable controls whether this mode is selected or not. */47 variable controls whether this mode is selected or not. */
48extern int error_one_per_line;48extern int error_one_per_line;
4949
50#ifdef __LDBL_COMPAT50#include <bits/floatn.h>
51#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
51# include <bits/error-ldbl.h>52# include <bits/error-ldbl.h>
52#else53#else
53/* Do not inline error and error_at_line when long double has the same54/* Do not inline error and error_at_line when long double has the same
54 size of double, because that would invalidate the redirections to the55 size of double, nor when long double reuses the float128
56 implementation, because that would invalidate the redirections to the
55 compatibility functions. */57 compatibility functions. */
56# if defined __extern_always_inline && defined __va_arg_pack58# if defined __extern_always_inline && defined __va_arg_pack
57# include <bits/error.h>59# include <bits/error.h>
lib/libc/include/generic-glibc/features.h+1-1
...@@ -454,7 +454,7 @@...@@ -454,7 +454,7 @@
454/* Major and minor version number of the GNU C library package. Use454/* Major and minor version number of the GNU C library package. Use
455 these macros to test for features in specific releases. */455 these macros to test for features in specific releases. */
456#define __GLIBC__ 2456#define __GLIBC__ 2
457#define __GLIBC_MINOR__ 31457#define __GLIBC_MINOR__ 32
458458
459#define __GLIBC_PREREQ(maj, min) \459#define __GLIBC_PREREQ(maj, min) \
460 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))460 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/include/generic-glibc/fenv.h-4
...@@ -140,10 +140,6 @@ extern int fegetmode (femode_t *__modep) __THROW;...@@ -140,10 +140,6 @@ extern int fegetmode (femode_t *__modep) __THROW;
140extern int fesetmode (const femode_t *__modep) __THROW;140extern int fesetmode (const femode_t *__modep) __THROW;
141#endif141#endif
142142
143/* Include optimization. */
144#ifdef __OPTIMIZE__
145# include <bits/fenvinline.h>
146#endif
147143
148/* NaN support. */144/* NaN support. */
149145
lib/libc/include/generic-glibc/finclude/math-vector-fortran.h+25-1
...@@ -16,4 +16,28 @@...@@ -16,4 +16,28 @@
16! License along with the GNU C Library; if not, see16! License along with the GNU C Library; if not, see
17! <https://www.gnu.org/licenses/>.17! <https://www.gnu.org/licenses/>.
1818
19! No SIMD math functions are available for this platform.
\ No newline at end of file
19!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64')
20!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64')
21!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64')
22!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')
23!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64')
24!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64')
25!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64')
26!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64')
27!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64')
28!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64')
29!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64')
30!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64')
31
32!GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
33!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
34!GCC$ builtin (sin) attributes simd (notinbranch) if('x32')
35!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32')
36!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32')
37!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32')
38!GCC$ builtin (log) attributes simd (notinbranch) if('x32')
39!GCC$ builtin (logf) attributes simd (notinbranch) if('x32')
40!GCC$ builtin (exp) attributes simd (notinbranch) if('x32')
41!GCC$ builtin (expf) attributes simd (notinbranch) if('x32')
42!GCC$ builtin (pow) attributes simd (notinbranch) if('x32')
43!GCC$ builtin (powf) attributes simd (notinbranch) if('x32')
\ No newline at end of file
lib/libc/include/generic-glibc/fpu_control.h+70-93
...@@ -1,6 +1,7 @@...@@ -1,6 +1,7 @@
1/* FPU control word bits. Mips version.1/* FPU control word bits. x86 version.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.2 Copyright (C) 1993-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
4 Contributed by Olaf Flebbe.
45
5 The GNU C Library is free software; you can redistribute it and/or6 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public7 modify it under the terms of the GNU Lesser General Public
...@@ -13,120 +14,96 @@...@@ -13,120 +14,96 @@
13 Lesser General Public License for more details.14 Lesser General Public License for more details.
1415
15 You should have received a copy of the GNU Lesser General Public16 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see17 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */18 <https://www.gnu.org/licenses/>. */
1819
19#ifndef _FPU_CONTROL_H20#ifndef _FPU_CONTROL_H
20#define _FPU_CONTROL_H21#define _FPU_CONTROL_H 1
2122
22/* MIPS FPU floating point control register bits.23/* Note that this file sets on x86-64 only the x87 FPU, it does not
24 touch the SSE unit. */
25
26/* Here is the dirty part. Set up your 387 through the control word
27 * (cw) register.
28 *
29 * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0
30 * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM
31 *
32 * IM: Invalid operation mask
33 * DM: Denormalized operand mask
34 * ZM: Zero-divide mask
35 * OM: Overflow mask
36 * UM: Underflow mask
37 * PM: Precision (inexact result) mask
38 *
39 * Mask bit is 1 means no interrupt.
23 *40 *
24 * 31-25 -> floating point conditions code bits 7-1. These bits are only41 * PC: Precision control
25 * available in MIPS IV.42 * 11 - round to extended precision
26 * 24 -> flush denormalized results to zero instead of43 * 10 - round to double precision
27 * causing unimplemented operation exception. This bit is only44 * 00 - round to single precision
28 * available for MIPS III and newer.
29 * 23 -> Condition bit
30 * 22-21 -> reserved for architecture implementers
31 * 20 -> reserved (read as 0, write with 0)
32 * 19 -> IEEE 754-2008 non-arithmetic ABS.fmt and NEG.fmt enable
33 * 18 -> IEEE 754-2008 recommended NaN encoding enable
34 * 17 -> cause bit for unimplemented operation
35 * 16 -> cause bit for invalid exception
36 * 15 -> cause bit for division by zero exception
37 * 14 -> cause bit for overflow exception
38 * 13 -> cause bit for underflow exception
39 * 12 -> cause bit for inexact exception
40 * 11 -> enable exception for invalid exception
41 * 10 -> enable exception for division by zero exception
42 * 9 -> enable exception for overflow exception
43 * 8 -> enable exception for underflow exception
44 * 7 -> enable exception for inexact exception
45 * 6 -> flag invalid exception
46 * 5 -> flag division by zero exception
47 * 4 -> flag overflow exception
48 * 3 -> flag underflow exception
49 * 2 -> flag inexact exception
50 * 1-0 -> rounding control
51 *45 *
46 * RC: Rounding control
47 * 00 - rounding to nearest
48 * 01 - rounding down (toward - infinity)
49 * 10 - rounding up (toward + infinity)
50 * 11 - rounding toward zero
52 *51 *
53 * Rounding Control:52 * IC: Infinity control
54 * 00 - rounding to nearest (RN)53 * That is for 8087 and 80287 only.
55 * 01 - rounding toward zero (RZ)54 *
56 * 10 - rounding (up) toward plus infinity (RP)55 * The hardware default is 0x037f which we use.
57 * 11 - rounding (down)toward minus infinity (RM)
58 */56 */
5957
60#include <features.h>58#include <features.h>
6159
62#ifdef __mips_soft_float60/* masking of interrupts */
61#define _FPU_MASK_IM 0x01
62#define _FPU_MASK_DM 0x02
63#define _FPU_MASK_ZM 0x04
64#define _FPU_MASK_OM 0x08
65#define _FPU_MASK_UM 0x10
66#define _FPU_MASK_PM 0x20
6367
64#define _FPU_RESERVED 0xffffffff68/* precision control */
65#define _FPU_DEFAULT 0x0000000069#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */
66typedef unsigned int fpu_control_t;70#define _FPU_DOUBLE 0x200
67#define _FPU_GETCW(cw) (cw) = 071#define _FPU_SINGLE 0x0
68#define _FPU_SETCW(cw) (void) (cw)
69extern fpu_control_t __fpu_control;
7072
71#else /* __mips_soft_float */73/* rounding control */
74#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
75#define _FPU_RC_DOWN 0x400
76#define _FPU_RC_UP 0x800
77#define _FPU_RC_ZERO 0xC00
7278
73/* Masks for interrupts. */79#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */
74#define _FPU_MASK_V 0x0800 /* Invalid operation */
75#define _FPU_MASK_Z 0x0400 /* Division by zero */
76#define _FPU_MASK_O 0x0200 /* Overflow */
77#define _FPU_MASK_U 0x0100 /* Underflow */
78#define _FPU_MASK_I 0x0080 /* Inexact operation */
7980
80/* Flush denormalized numbers to zero. */
81#define _FPU_FLUSH_TZ 0x1000000
8281
83/* IEEE 754-2008 compliance control. */82/* The fdlibm code requires strict IEEE double precision arithmetic,
84#define _FPU_ABS2008 0x8000083 and no interrupts for exceptions, rounding to nearest. */
85#define _FPU_NAN2008 0x40000
8684
87/* Rounding control. */85#define _FPU_DEFAULT 0x037f
88#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
89#define _FPU_RC_ZERO 0x1
90#define _FPU_RC_UP 0x2
91#define _FPU_RC_DOWN 0x3
92/* Mask for rounding control. */
93#define _FPU_RC_MASK 0x3
9486
95#define _FPU_RESERVED 0xfe8c0000 /* Reserved bits in cw, incl ABS/NAN2008. */87/* IEEE: same as above. */
88#define _FPU_IEEE 0x037f
9689
90/* Type of the control word. */
91typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
9792
98/* The fdlibm code requires strict IEEE double precision arithmetic,93/* Macros for accessing the hardware control word. "*&" is used to
99 and no interrupts for exceptions, rounding to nearest. */94 work around a bug in older versions of GCC. __volatile__ is used
100#ifdef __mips_nan200895 to support combination of writing the control register and reading
101# define _FPU_DEFAULT 0x000C000096 it back. Without __volatile__, the old value may be used for reading
102#else97 back under compiler optimization.
103# define _FPU_DEFAULT 0x00000000
104#endif
105
106/* IEEE: same as above, but exceptions. */
107#ifdef __mips_nan2008
108# define _FPU_IEEE 0x000C0F80
109#else
110# define _FPU_IEEE 0x00000F80
111#endif
11298
113/* Type of the control word. */99 Note that the use of these macros is not sufficient anymore with
114typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));100 recent hardware nor on x86-64. Some floating point operations are
115101 executed in the SSE/SSE2 engines which have their own control and
116/* Macros for accessing the hardware control word. */102 status register. */
117extern fpu_control_t __mips_fpu_getcw (void) __THROW;103#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
118extern void __mips_fpu_setcw (fpu_control_t) __THROW;104#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
119#ifdef __mips16
120# define _FPU_GETCW(cw) do { (cw) = __mips_fpu_getcw (); } while (0)
121# define _FPU_SETCW(cw) __mips_fpu_setcw (cw)
122#else
123# define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw))
124# define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw))
125#endif
126105
127/* Default control word set at startup. */106/* Default control word set at startup. */
128extern fpu_control_t __fpu_control;107extern fpu_control_t __fpu_control;
129108
130#endif /* __mips_soft_float */
131
132#endif /* fpu_control.h */109#endif /* fpu_control.h */
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/lib-names-32.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/generic-glibc/gnu/lib-names-hard.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h-2
...@@ -19,8 +19,6 @@...@@ -19,8 +19,6 @@
19#define LIBNSS_FILES_SO "libnss_files.so.2"19#define LIBNSS_FILES_SO "libnss_files.so.2"
20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
22#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
23#define LIBNSS_NIS_SO "libnss_nis.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"22#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"23#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"24#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h-2
...@@ -19,8 +19,6 @@...@@ -19,8 +19,6 @@
19#define LIBNSS_FILES_SO "libnss_files.so.2"19#define LIBNSS_FILES_SO "libnss_files.so.2"
20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
22#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
23#define LIBNSS_NIS_SO "libnss_nis.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"22#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"23#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"24#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h-2
...@@ -19,8 +19,6 @@...@@ -19,8 +19,6 @@
19#define LIBNSS_FILES_SO "libnss_files.so.2"19#define LIBNSS_FILES_SO "libnss_files.so.2"
20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
22#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
23#define LIBNSS_NIS_SO "libnss_nis.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"22#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"23#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"24#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/generic-glibc/gnu/lib-names-soft.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/generic-glibc/gnu/lib-names.h+6-35
...@@ -4,43 +4,14 @@...@@ -4,43 +4,14 @@
4#ifndef __GNU_LIB_NAMES_H4#ifndef __GNU_LIB_NAMES_H
5#define __GNU_LIB_NAMES_H 15#define __GNU_LIB_NAMES_H 1
66
7#include <sgidefs.h>7#if !defined __x86_64__
88# include <gnu/lib-names-32.h>
9#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)
10# include <gnu/lib-names-o32_soft.h>
11#endif
12#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)
13# include <gnu/lib-names-o32_hard.h>
14#endif
15#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)
16# include <gnu/lib-names-o32_soft_2008.h>
17#endif
18#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)
19# include <gnu/lib-names-o32_hard_2008.h>
20#endif
21#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
22# include <gnu/lib-names-n32_soft.h>
23#endif
24#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
25# include <gnu/lib-names-n32_hard.h>
26#endif
27#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
28# include <gnu/lib-names-n32_soft_2008.h>
29#endif
30#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
31# include <gnu/lib-names-n32_hard_2008.h>
32#endif
33#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)
34# include <gnu/lib-names-n64_soft.h>
35#endif
36#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)
37# include <gnu/lib-names-n64_hard.h>
38#endif9#endif
39#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)10#if defined __x86_64__ && defined __LP64__
40# include <gnu/lib-names-n64_soft_2008.h>11# include <gnu/lib-names-64.h>
41#endif12#endif
42#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)13#if defined __x86_64__ && defined __ILP32__
43# include <gnu/lib-names-n64_hard_2008.h>14# include <gnu/lib-names-x32.h>
44#endif15#endif
4516
46#endif /* gnu/lib-names.h */17#endif /* gnu/lib-names.h */
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-32.h-2
...@@ -10,9 +10,7 @@...@@ -10,9 +10,7 @@
10#define __stub_chflags10#define __stub_chflags
11#define __stub_fchflags11#define __stub_fchflags
12#define __stub_gtty12#define __stub_gtty
13#define __stub_lchmod
14#define __stub_revoke13#define __stub_revoke
15#define __stub_setlogin14#define __stub_setlogin
16#define __stub_sigreturn15#define __stub_sigreturn
17#define __stub_sstk
18#define __stub_stty16#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-64.h deleted-18
...@@ -1,18 +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_chflags
11#define __stub_fchflags
12#define __stub_gtty
13#define __stub_lchmod
14#define __stub_revoke
15#define __stub_setlogin
16#define __stub_sigreturn
17#define __stub_sstk
18#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-hard.h-2
...@@ -13,9 +13,7 @@...@@ -13,9 +13,7 @@
13#define __stub_chflags13#define __stub_chflags
14#define __stub_fchflags14#define __stub_fchflags
15#define __stub_gtty15#define __stub_gtty
16#define __stub_lchmod
17#define __stub_revoke16#define __stub_revoke
18#define __stub_setlogin17#define __stub_setlogin
19#define __stub_sigreturn18#define __stub_sigreturn
20#define __stub_sstk
21#define __stub_stty19#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-n32_hard.h-2
...@@ -12,9 +12,7 @@...@@ -12,9 +12,7 @@
12#define __stub_chflags12#define __stub_chflags
13#define __stub_fchflags13#define __stub_fchflags
14#define __stub_gtty14#define __stub_gtty
15#define __stub_lchmod
16#define __stub_revoke15#define __stub_revoke
17#define __stub_setlogin16#define __stub_setlogin
18#define __stub_sigreturn17#define __stub_sigreturn
19#define __stub_sstk
20#define __stub_stty18#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-n64_hard.h-2
...@@ -12,9 +12,7 @@...@@ -12,9 +12,7 @@
12#define __stub_chflags12#define __stub_chflags
13#define __stub_fchflags13#define __stub_fchflags
14#define __stub_gtty14#define __stub_gtty
15#define __stub_lchmod
16#define __stub_revoke15#define __stub_revoke
17#define __stub_setlogin16#define __stub_setlogin
18#define __stub_sigreturn17#define __stub_sigreturn
19#define __stub_sstk
20#define __stub_stty18#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-o32_hard.h-2
...@@ -10,9 +10,7 @@...@@ -10,9 +10,7 @@
10#define __stub_chflags10#define __stub_chflags
11#define __stub_fchflags11#define __stub_fchflags
12#define __stub_gtty12#define __stub_gtty
13#define __stub_lchmod
14#define __stub_revoke13#define __stub_revoke
15#define __stub_setlogin14#define __stub_setlogin
16#define __stub_sigreturn15#define __stub_sigreturn
17#define __stub_sstk
18#define __stub_stty16#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs-soft.h-2
...@@ -13,9 +13,7 @@...@@ -13,9 +13,7 @@
13#define __stub_chflags13#define __stub_chflags
14#define __stub_fchflags14#define __stub_fchflags
15#define __stub_gtty15#define __stub_gtty
16#define __stub_lchmod
17#define __stub_revoke16#define __stub_revoke
18#define __stub_setlogin17#define __stub_setlogin
19#define __stub_sigreturn18#define __stub_sigreturn
20#define __stub_sstk
21#define __stub_stty19#define __stub_stty
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/stubs.h+6-34
...@@ -2,41 +2,13 @@...@@ -2,41 +2,13 @@
2 This file selects the right generated file of `__stub_FUNCTION' macros2 This file selects the right generated file of `__stub_FUNCTION' macros
3 based on the architecture being compiled for. */3 based on the architecture being compiled for. */
44
5#include <sgidefs.h>
65
7#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)6#if !defined __x86_64__
8# include <gnu/stubs-o32_soft.h>7# include <gnu/stubs-32.h>
9#endif8#endif
10#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)9#if defined __x86_64__ && defined __LP64__
11# include <gnu/stubs-o32_hard.h>10# include <gnu/stubs-64.h>
12#endif11#endif
13#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)12#if defined __x86_64__ && defined __ILP32__
14# include <gnu/stubs-o32_soft_2008.h>13# include <gnu/stubs-x32.h>
15#endif
16#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32)
17# include <gnu/stubs-o32_hard_2008.h>
18#endif
19#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
20# include <gnu/stubs-n32_soft.h>
21#endif
22#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
23# include <gnu/stubs-n32_hard.h>
24#endif
25#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
26# include <gnu/stubs-n32_soft_2008.h>
27#endif
28#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
29# include <gnu/stubs-n32_hard_2008.h>
30#endif
31#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)
32# include <gnu/stubs-n64_soft.h>
33#endif
34#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)
35# include <gnu/stubs-n64_hard.h>
36#endif
37#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)
38# include <gnu/stubs-n64_soft_2008.h>
39#endif
40#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64)
41# include <gnu/stubs-n64_hard_2008.h>
42#endif14#endif
\ No newline at end of file
lib/libc/include/generic-glibc/inttypes.h+24-24
...@@ -321,10 +321,10 @@ extern long int __strtol_internal (const char *__restrict __nptr,...@@ -321,10 +321,10 @@ extern long int __strtol_internal (const char *__restrict __nptr,
321 __THROW __nonnull ((1)) __wur;321 __THROW __nonnull ((1)) __wur;
322/* Like `strtol' but convert to `intmax_t'. */322/* Like `strtol' but convert to `intmax_t'. */
323__extern_inline intmax_t323__extern_inline intmax_t
324__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,324__NTH (strtoimax (const char *__restrict __nptr, char **__restrict __endptr,
325 int base))325 int __base))
326{326{
327 return __strtol_internal (nptr, endptr, base, 0);327 return __strtol_internal (__nptr, __endptr, __base, 0);
328}328}
329329
330extern unsigned long int __strtoul_internal (const char *__restrict __nptr,330extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
...@@ -333,10 +333,10 @@ extern unsigned long int __strtoul_internal (const char *__restrict __nptr,...@@ -333,10 +333,10 @@ extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
333 __THROW __nonnull ((1)) __wur;333 __THROW __nonnull ((1)) __wur;
334/* Like `strtoul' but convert to `uintmax_t'. */334/* Like `strtoul' but convert to `uintmax_t'. */
335__extern_inline uintmax_t335__extern_inline uintmax_t
336__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,336__NTH (strtoumax (const char *__restrict __nptr, char **__restrict __endptr,
337 int base))337 int __base))
338{338{
339 return __strtoul_internal (nptr, endptr, base, 0);339 return __strtoul_internal (__nptr, __endptr, __base, 0);
340}340}
341341
342extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,342extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
...@@ -345,10 +345,10 @@ extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,...@@ -345,10 +345,10 @@ extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
345 __THROW __nonnull ((1)) __wur;345 __THROW __nonnull ((1)) __wur;
346/* Like `wcstol' but convert to `intmax_t'. */346/* Like `wcstol' but convert to `intmax_t'. */
347__extern_inline intmax_t347__extern_inline intmax_t
348__NTH (wcstoimax (const __gwchar_t *__restrict nptr,348__NTH (wcstoimax (const __gwchar_t *__restrict __nptr,
349 __gwchar_t **__restrict endptr, int base))349 __gwchar_t **__restrict __endptr, int __base))
350{350{
351 return __wcstol_internal (nptr, endptr, base, 0);351 return __wcstol_internal (__nptr, __endptr, __base, 0);
352}352}
353353
354extern unsigned long int __wcstoul_internal (const __gwchar_t *354extern unsigned long int __wcstoul_internal (const __gwchar_t *
...@@ -359,10 +359,10 @@ extern unsigned long int __wcstoul_internal (const __gwchar_t *...@@ -359,10 +359,10 @@ extern unsigned long int __wcstoul_internal (const __gwchar_t *
359 __THROW __nonnull ((1)) __wur;359 __THROW __nonnull ((1)) __wur;
360/* Like `wcstoul' but convert to `uintmax_t'. */360/* Like `wcstoul' but convert to `uintmax_t'. */
361__extern_inline uintmax_t361__extern_inline uintmax_t
362__NTH (wcstoumax (const __gwchar_t *__restrict nptr,362__NTH (wcstoumax (const __gwchar_t *__restrict __nptr,
363 __gwchar_t **__restrict endptr, int base))363 __gwchar_t **__restrict __endptr, int __base))
364{364{
365 return __wcstoul_internal (nptr, endptr, base, 0);365 return __wcstoul_internal (__nptr, __endptr, __base, 0);
366}366}
367367
368# else /* __WORDSIZE == 32 */368# else /* __WORDSIZE == 32 */
...@@ -374,10 +374,10 @@ extern long long int __strtoll_internal (const char *__restrict __nptr,...@@ -374,10 +374,10 @@ extern long long int __strtoll_internal (const char *__restrict __nptr,
374 __THROW __nonnull ((1)) __wur;374 __THROW __nonnull ((1)) __wur;
375/* Like `strtol' but convert to `intmax_t'. */375/* Like `strtol' but convert to `intmax_t'. */
376__extern_inline intmax_t376__extern_inline intmax_t
377__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,377__NTH (strtoimax (const char *__restrict __nptr, char **__restrict __endptr,
378 int base))378 int __base))
379{379{
380 return __strtoll_internal (nptr, endptr, base, 0);380 return __strtoll_internal (__nptr, __endptr, __base, 0);
381}381}
382382
383__extension__383__extension__
...@@ -390,10 +390,10 @@ extern unsigned long long int __strtoull_internal (const char *...@@ -390,10 +390,10 @@ extern unsigned long long int __strtoull_internal (const char *
390 __THROW __nonnull ((1)) __wur;390 __THROW __nonnull ((1)) __wur;
391/* Like `strtoul' but convert to `uintmax_t'. */391/* Like `strtoul' but convert to `uintmax_t'. */
392__extern_inline uintmax_t392__extern_inline uintmax_t
393__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,393__NTH (strtoumax (const char *__restrict __nptr, char **__restrict __endptr,
394 int base))394 int __base))
395{395{
396 return __strtoull_internal (nptr, endptr, base, 0);396 return __strtoull_internal (__nptr, __endptr, __base, 0);
397}397}
398398
399__extension__399__extension__
...@@ -403,10 +403,10 @@ extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr,...@@ -403,10 +403,10 @@ extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr,
403 __THROW __nonnull ((1)) __wur;403 __THROW __nonnull ((1)) __wur;
404/* Like `wcstol' but convert to `intmax_t'. */404/* Like `wcstol' but convert to `intmax_t'. */
405__extern_inline intmax_t405__extern_inline intmax_t
406__NTH (wcstoimax (const __gwchar_t *__restrict nptr,406__NTH (wcstoimax (const __gwchar_t *__restrict __nptr,
407 __gwchar_t **__restrict endptr, int base))407 __gwchar_t **__restrict __endptr, int __base))
408{408{
409 return __wcstoll_internal (nptr, endptr, base, 0);409 return __wcstoll_internal (__nptr, __endptr, __base, 0);
410}410}
411411
412412
...@@ -420,10 +420,10 @@ extern unsigned long long int __wcstoull_internal (const __gwchar_t *...@@ -420,10 +420,10 @@ extern unsigned long long int __wcstoull_internal (const __gwchar_t *
420 __THROW __nonnull ((1)) __wur;420 __THROW __nonnull ((1)) __wur;
421/* Like `wcstoul' but convert to `uintmax_t'. */421/* Like `wcstoul' but convert to `uintmax_t'. */
422__extern_inline uintmax_t422__extern_inline uintmax_t
423__NTH (wcstoumax (const __gwchar_t *__restrict nptr,423__NTH (wcstoumax (const __gwchar_t *__restrict __nptr,
424 __gwchar_t **__restrict endptr, int base))424 __gwchar_t **__restrict __endptr, int __base))
425{425{
426 return __wcstoull_internal (nptr, endptr, base, 0);426 return __wcstoull_internal (__nptr, __endptr, __base, 0);
427}427}
428428
429# endif /* __WORDSIZE == 32 */429# endif /* __WORDSIZE == 32 */
lib/libc/include/generic-glibc/malloc.h+4-3
...@@ -75,11 +75,11 @@ extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;...@@ -75,11 +75,11 @@ extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;
7575
76/* Underlying allocation function; successive calls should return76/* Underlying allocation function; successive calls should return
77 contiguous pieces of memory. */77 contiguous pieces of memory. */
78extern void *(*__morecore) (ptrdiff_t __size);78extern void *(*__morecore) (ptrdiff_t __size) __MALLOC_DEPRECATED;
7979
80/* Default value of `__morecore'. */80/* Default value of `__morecore'. */
81extern void *__default_morecore (ptrdiff_t __size)81extern void *__default_morecore (ptrdiff_t __size)
82__THROW __attribute_malloc__;82__THROW __attribute_malloc__ __MALLOC_DEPRECATED;
8383
84/* SVID2/XPG mallinfo structure */84/* SVID2/XPG mallinfo structure */
8585
...@@ -156,7 +156,8 @@ extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,...@@ -156,7 +156,8 @@ extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,
156 size_t __size,156 size_t __size,
157 const void *)157 const void *)
158__MALLOC_DEPRECATED;158__MALLOC_DEPRECATED;
159extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void);159extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void)
160 __MALLOC_DEPRECATED;
160161
161162
162__END_DECLS163__END_DECLS
lib/libc/include/generic-glibc/math.h+68-20
...@@ -279,8 +279,17 @@ enum...@@ -279,8 +279,17 @@ enum
279#define __MATHDECLX(type, function,suffix, args, attrib) \279#define __MATHDECLX(type, function,suffix, args, attrib) \
280 __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \280 __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
281 __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)281 __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
282#define __MATHDECL_1(type, function,suffix, args) \282#define __MATHDECL_1_IMPL(type, function, suffix, args) \
283 extern type __MATH_PRECNAME(function,suffix) args __THROW283 extern type __MATH_PRECNAME(function,suffix) args __THROW
284#define __MATHDECL_1(type, function, suffix, args) \
285 __MATHDECL_1_IMPL(type, function, suffix, args)
286/* Ignore the alias by default. The alias is only useful with
287 redirections. */
288#define __MATHDECL_ALIAS(type, function, suffix, args, alias) \
289 __MATHDECL_1(type, function, suffix, args)
290
291#define __MATHREDIR(type, function, suffix, args, to) \
292 extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to)
284293
285#define _Mdouble_ double294#define _Mdouble_ double
286#define __MATH_PRECNAME(name,r) __CONCAT(name,r)295#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
...@@ -331,11 +340,37 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -331,11 +340,37 @@ extern long double __REDIRECT_NTH (nexttowardl,
331# endif340# endif
332341
333# undef __MATHDECL_1342# undef __MATHDECL_1
334# define __MATHDECL_2(type, function,suffix, args, alias) \
335 extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \
336 args, alias)
337# define __MATHDECL_1(type, function,suffix, args) \343# define __MATHDECL_1(type, function,suffix, args) \
338 __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))344 __MATHREDIR(type, function, suffix, args, __CONCAT(function,suffix))
345
346# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
347# ifdef __REDIRECT_NTH
348# ifdef __USE_ISOC99
349extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y),
350 __nexttowardf_to_ieee128)
351 __attribute__ ((__const__));
352extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
353 __nexttoward_to_ieee128)
354 __attribute__ ((__const__));
355
356#define __dremieee128 __remainderieee128
357#define __gammaieee128 __lgammaieee128
358
359# endif
360# endif
361
362# undef __MATHDECL_1
363# undef __MATHDECL_ALIAS
364
365# define __REDIRTO(function, suffix) \
366 __ ## function ## ieee128 ## suffix
367# define __REDIRTO_ALT(function, suffix) \
368 __ ## function ## f128 ## suffix
369
370# define __MATHDECL_1(type, function, suffix, args) \
371 __MATHREDIR (type, function, suffix, args, __REDIRTO (function, suffix))
372# define __MATHDECL_ALIAS(type, function, suffix, args, alias) \
373 __MATHREDIR (type, function, suffix, args, __REDIRTO_ALT (alias, suffix))
339# endif374# endif
340375
341/* Include the file of declarations again, this time using `long double'376/* Include the file of declarations again, this time using `long double'
...@@ -348,11 +383,23 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -348,11 +383,23 @@ extern long double __REDIRECT_NTH (nexttowardl,
348# define __MATH_DECLARE_LDOUBLE 1383# define __MATH_DECLARE_LDOUBLE 1
349# include <bits/mathcalls-helper-functions.h>384# include <bits/mathcalls-helper-functions.h>
350# include <bits/mathcalls.h>385# include <bits/mathcalls.h>
386
351# undef _Mdouble_387# undef _Mdouble_
352# undef __MATH_PRECNAME388# undef __MATH_PRECNAME
353# undef __MATH_DECLARING_DOUBLE389# undef __MATH_DECLARING_DOUBLE
354# undef __MATH_DECLARING_FLOATN390# undef __MATH_DECLARING_FLOATN
355391
392# if defined __LDBL_COMPAT \
393 || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
394# undef __REDIRTO
395# undef __REDIRTO_ALT
396# undef __MATHDECL_1
397# undef __MATHDECL_ALIAS
398# define __MATHDECL_1(type, function, suffix, args) \
399 __MATHDECL_1_IMPL(type, function, suffix, args)
400# define __MATHDECL_ALIAS(type, function, suffix, args, alias) \
401 __MATHDECL_1(type, function, suffix, args)
402# endif
356# endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */403# endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */
357404
358#endif /* Use ISO C99. */405#endif /* Use ISO C99. */
...@@ -479,7 +526,9 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -479,7 +526,9 @@ extern long double __REDIRECT_NTH (nexttowardl,
479# undef __MATH_DECLARING_FLOATN526# undef __MATH_DECLARING_FLOATN
480#endif /* __HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC). */527#endif /* __HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC). */
481528
529#undef __MATHDECL_1_IMPL
482#undef __MATHDECL_1530#undef __MATHDECL_1
531#undef __MATHDECL_ALIAS
483#undef __MATHDECL532#undef __MATHDECL
484#undef __MATHCALL533#undef __MATHCALL
485534
...@@ -511,6 +560,11 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -511,6 +560,11 @@ extern long double __REDIRECT_NTH (nexttowardl,
511# ifdef __LDBL_COMPAT560# ifdef __LDBL_COMPAT
512# define __MATHCALL_REDIR_NAME(name) f ## name561# define __MATHCALL_REDIR_NAME(name) f ## name
513# undef __MATHCALL_NARROW562# undef __MATHCALL_NARROW
563# define __MATHCALL_NARROW(func, redir, nargs) \
564 __MATHCALL_NARROW_REDIR (func, redir, nargs)
565# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
566# define __MATHCALL_REDIR_NAME(name) __ ## f32 ## name ## ieee128
567# undef __MATHCALL_NARROW
514# define __MATHCALL_NARROW(func, redir, nargs) \568# define __MATHCALL_NARROW(func, redir, nargs) \
515 __MATHCALL_NARROW_REDIR (func, redir, nargs)569 __MATHCALL_NARROW_REDIR (func, redir, nargs)
516# endif570# endif
...@@ -518,7 +572,8 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -518,7 +572,8 @@ extern long double __REDIRECT_NTH (nexttowardl,
518# undef _Mret_572# undef _Mret_
519# undef _Marg_573# undef _Marg_
520# undef __MATHCALL_NAME574# undef __MATHCALL_NAME
521# ifdef __LDBL_COMPAT575# if defined __LDBL_COMPAT \
576 || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
522# undef __MATHCALL_REDIR_NAME577# undef __MATHCALL_REDIR_NAME
523# undef __MATHCALL_NARROW578# undef __MATHCALL_NARROW
524# define __MATHCALL_NARROW(func, redir, nargs) \579# define __MATHCALL_NARROW(func, redir, nargs) \
...@@ -531,6 +586,11 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -531,6 +586,11 @@ extern long double __REDIRECT_NTH (nexttowardl,
531# ifdef __LDBL_COMPAT586# ifdef __LDBL_COMPAT
532# define __MATHCALL_REDIR_NAME(name) __nldbl_d ## name ## l587# define __MATHCALL_REDIR_NAME(name) __nldbl_d ## name ## l
533# undef __MATHCALL_NARROW588# undef __MATHCALL_NARROW
589# define __MATHCALL_NARROW(func, redir, nargs) \
590 __MATHCALL_NARROW_REDIR (func, redir, nargs)
591# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
592# define __MATHCALL_REDIR_NAME(name) __ ## f64 ## name ## ieee128
593# undef __MATHCALL_NARROW
534# define __MATHCALL_NARROW(func, redir, nargs) \594# define __MATHCALL_NARROW(func, redir, nargs) \
535 __MATHCALL_NARROW_REDIR (func, redir, nargs)595 __MATHCALL_NARROW_REDIR (func, redir, nargs)
536# endif596# endif
...@@ -538,7 +598,8 @@ extern long double __REDIRECT_NTH (nexttowardl,...@@ -538,7 +598,8 @@ extern long double __REDIRECT_NTH (nexttowardl,
538# undef _Mret_598# undef _Mret_
539# undef _Marg_599# undef _Marg_
540# undef __MATHCALL_NAME600# undef __MATHCALL_NAME
541# ifdef __LDBL_COMPAT601# if defined __LDBL_COMPAT \
602 || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
542# undef __MATHCALL_REDIR_NAME603# undef __MATHCALL_REDIR_NAME
543# undef __MATHCALL_NARROW604# undef __MATHCALL_NARROW
544# define __MATHCALL_NARROW(func, redir, nargs) \605# define __MATHCALL_NARROW(func, redir, nargs) \
...@@ -1196,13 +1257,6 @@ iszero (__T __val)...@@ -1196,13 +1257,6 @@ iszero (__T __val)
1196# error "M_* values needed for _Float128x"1257# error "M_* values needed for _Float128x"
1197#endif1258#endif
11981259
1199/* When compiling in strict ISO C compatible mode we must not use the
1200 inline functions since they, among other things, do not set the
1201 `errno' variable correctly. */
1202#if defined __STRICT_ANSI__ && !defined __NO_MATH_INLINES
1203# define __NO_MATH_INLINES 1
1204#endif
1205
1206#ifdef __USE_ISOC991260#ifdef __USE_ISOC99
1207# if __GNUC_PREREQ (3, 1)1261# if __GNUC_PREREQ (3, 1)
1208/* ISO C99 defines some macros to compare number while taking care for1262/* ISO C99 defines some macros to compare number while taking care for
...@@ -1240,12 +1294,6 @@ iszero (__T __val)...@@ -1240,12 +1294,6 @@ iszero (__T __val)
1240# endif1294# endif
1241#endif1295#endif
12421296
1243/* Get machine-dependent inline versions (if there are any). */
1244#ifdef __USE_EXTERN_INLINES
1245# include <bits/mathinline.h>
1246#endif
1247
1248
1249#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)1297#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
1250/* An expression whose type has the widest of the evaluation formats1298/* An expression whose type has the widest of the evaluation formats
1251 of X and Y (which are of floating-point types). */1299 of X and Y (which are of floating-point types). */
lib/libc/include/generic-glibc/monetary.h+2-1
...@@ -50,7 +50,8 @@ extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,...@@ -50,7 +50,8 @@ extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
50 __THROW __attribute_format_strfmon__ (4, 5);50 __THROW __attribute_format_strfmon__ (4, 5);
51#endif51#endif
5252
53#ifdef __LDBL_COMPAT53#include <bits/floatn.h>
54#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
54# include <bits/monetary-ldbl.h>55# include <bits/monetary-ldbl.h>
55#endif56#endif
5657
lib/libc/include/generic-glibc/netinet/icmp6.h+4-4
...@@ -85,16 +85,16 @@ struct icmp6_hdr...@@ -85,16 +85,16 @@ struct icmp6_hdr
85#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */85#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */
8686
87#define ICMP6_FILTER_WILLPASS(type, filterp) \87#define ICMP6_FILTER_WILLPASS(type, filterp) \
88 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)88 ((((filterp)->icmp6_filt[(type) >> 5]) & (1U << ((type) & 31))) == 0)
8989
90#define ICMP6_FILTER_WILLBLOCK(type, filterp) \90#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
91 ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)91 ((((filterp)->icmp6_filt[(type) >> 5]) & (1U << ((type) & 31))) != 0)
9292
93#define ICMP6_FILTER_SETPASS(type, filterp) \93#define ICMP6_FILTER_SETPASS(type, filterp) \
94 ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))94 ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1U << ((type) & 31))))
9595
96#define ICMP6_FILTER_SETBLOCK(type, filterp) \96#define ICMP6_FILTER_SETBLOCK(type, filterp) \
97 ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))))97 ((((filterp)->icmp6_filt[(type) >> 5]) |= (1U << ((type) & 31))))
9898
99#define ICMP6_FILTER_SETPASSALL(filterp) \99#define ICMP6_FILTER_SETPASSALL(filterp) \
100 memset (filterp, 0, sizeof (struct icmp6_filter));100 memset (filterp, 0, sizeof (struct icmp6_filter));
lib/libc/include/generic-glibc/netinet/in.h+4
...@@ -87,8 +87,12 @@ enum...@@ -87,8 +87,12 @@ enum
87#define IPPROTO_UDPLITE IPPROTO_UDPLITE87#define IPPROTO_UDPLITE IPPROTO_UDPLITE
88 IPPROTO_MPLS = 137, /* MPLS in IP. */88 IPPROTO_MPLS = 137, /* MPLS in IP. */
89#define IPPROTO_MPLS IPPROTO_MPLS89#define IPPROTO_MPLS IPPROTO_MPLS
90 IPPROTO_ETHERNET = 143, /* Ethernet-within-IPv6 Encapsulation. */
91#define IPPROTO_ETHERNET IPPROTO_ETHERNET
90 IPPROTO_RAW = 255, /* Raw IP packets. */92 IPPROTO_RAW = 255, /* Raw IP packets. */
91#define IPPROTO_RAW IPPROTO_RAW93#define IPPROTO_RAW IPPROTO_RAW
94 IPPROTO_MPTCP = 262, /* Multipath TCP connection. */
95#define IPPROTO_MPTCP IPPROTO_MPTCP
92 IPPROTO_MAX96 IPPROTO_MAX
93 };97 };
9498
lib/libc/include/generic-glibc/nss.h+201-2
...@@ -19,10 +19,12 @@...@@ -19,10 +19,12 @@
19 and for implementors of new services. */19 and for implementors of new services. */
2020
21#ifndef _NSS_H21#ifndef _NSS_H
22#define _NSS_H 122#define _NSS_H 1
2323
24#include <features.h>24#include <features.h>
25#include <stddef.h>
25#include <stdint.h>26#include <stdint.h>
27#include <sys/types.h>
2628
2729
28__BEGIN_DECLS30__BEGIN_DECLS
...@@ -56,7 +58,204 @@ struct gaih_addrtuple...@@ -56,7 +58,204 @@ struct gaih_addrtuple
56 Attention: Using this function repeatedly will slowly eat up the58 Attention: Using this function repeatedly will slowly eat up the
57 whole memory since previous selection data cannot be freed. */59 whole memory since previous selection data cannot be freed. */
58extern int __nss_configure_lookup (const char *__dbname,60extern int __nss_configure_lookup (const char *__dbname,
59 const char *__string) __THROW;61 const char *__string) __THROW;
62
63/* NSS-related types. */
64struct __netgrent;
65struct aliasent;
66struct ether_addr;
67struct etherent;
68struct group;
69struct hostent;
70struct netent;
71struct passwd;
72struct protoent;
73struct rpcent;
74struct servent;
75struct sgrp;
76struct spwd;
77struct traced_file;
78
79/* Types of functions exported from NSS service modules. */
80typedef enum nss_status nss_endaliasent (void);
81typedef enum nss_status nss_endetherent (void);
82typedef enum nss_status nss_endgrent (void);
83typedef enum nss_status nss_endhostent (void);
84typedef enum nss_status nss_endnetent (void);
85typedef enum nss_status nss_endnetgrent (struct __netgrent *);
86typedef enum nss_status nss_endprotoent (void);
87typedef enum nss_status nss_endpwent (void);
88typedef enum nss_status nss_endrpcent (void);
89typedef enum nss_status nss_endservent (void);
90typedef enum nss_status nss_endsgent (void);
91typedef enum nss_status nss_endspent (void);
92typedef enum nss_status nss_getaliasbyname_r (const char *, struct aliasent *,
93 char *, size_t, int *);
94typedef enum nss_status nss_getaliasent_r (struct aliasent *,
95 char *, size_t, int *);
96typedef enum nss_status nss_getcanonname_r (const char *, char *, size_t,
97 char **, int *, int *);
98typedef enum nss_status nss_getetherent_r (struct etherent *,
99 char *, size_t, int *);
100typedef enum nss_status nss_getgrent_r (struct group *, char *, size_t, int *);
101typedef enum nss_status nss_getgrgid_r (__gid_t, struct group *,
102 char *, size_t, int *);
103typedef enum nss_status nss_getgrnam_r (const char *, struct group *,
104 char *, size_t, int *);
105typedef enum nss_status nss_gethostbyaddr2_r (const void *, __socklen_t, int,
106 struct hostent *, char *, size_t,
107 int *, int *, int32_t *);
108typedef enum nss_status nss_gethostbyaddr_r (const void *, __socklen_t, int,
109 struct hostent *, char *, size_t,
110 int *, int *);
111typedef enum nss_status nss_gethostbyname2_r (const char *, int,
112 struct hostent *, char *, size_t,
113 int *, int *);
114typedef enum nss_status nss_gethostbyname3_r (const char *, int,
115 struct hostent *, char *, size_t,
116 int *, int *, int32_t *,
117 char **);
118typedef enum nss_status nss_gethostbyname4_r (const char *,
119 struct gaih_addrtuple **,
120 char *, size_t,
121 int *, int *, int32_t *);
122typedef enum nss_status nss_gethostbyname_r (const char *, struct hostent *,
123 char *, size_t, int *, int *);
124typedef enum nss_status nss_gethostent_r (struct hostent *, char *, size_t,
125 int *, int *);
126typedef enum nss_status nss_gethostton_r (const char *, struct etherent *,
127 char *, size_t, int *);
128typedef enum nss_status nss_getnetbyaddr_r (uint32_t, int, struct netent *,
129 char *, size_t, int *, int *);
130typedef enum nss_status nss_getnetbyname_r (const char *, struct netent *,
131 char *, size_t, int *, int *);
132typedef enum nss_status nss_getnetent_r (struct netent *,
133 char *, size_t, int *, int *);
134typedef enum nss_status nss_getnetgrent_r (struct __netgrent *,
135 char *, size_t, int *);
136typedef enum nss_status nss_getntohost_r (const struct ether_addr *,
137 struct etherent *, char *, size_t,
138 int *);
139typedef enum nss_status nss_getprotobyname_r (const char *, struct protoent *,
140 char *, size_t, int *);
141typedef enum nss_status nss_getprotobynumber_r (int, struct protoent *,
142 char *, size_t, int *);
143typedef enum nss_status nss_getprotoent_r (struct protoent *,
144 char *, size_t, int *);
145typedef enum nss_status nss_getpublickey (const char *, char *, int *);
146typedef enum nss_status nss_getpwent_r (struct passwd *,
147 char *, size_t, int *);
148typedef enum nss_status nss_getpwnam_r (const char *, struct passwd *,
149 char *, size_t, int *);
150typedef enum nss_status nss_getpwuid_r (__uid_t, struct passwd *,
151 char *, size_t, int *);
152typedef enum nss_status nss_getrpcbyname_r (const char *, struct rpcent *,
153 char *, size_t, int *);
154typedef enum nss_status nss_getrpcbynumber_r (int, struct rpcent *,
155 char *, size_t, int *);
156typedef enum nss_status nss_getrpcent_r (struct rpcent *,
157 char *, size_t, int *);
158typedef enum nss_status nss_getsecretkey (const char *, char *, char *, int *);
159typedef enum nss_status nss_getservbyname_r (const char *, const char *,
160 struct servent *, char *, size_t,
161 int *);
162typedef enum nss_status nss_getservbyport_r (int, const char *,
163 struct servent *, char *, size_t,
164 int *);
165typedef enum nss_status nss_getservent_r (struct servent *, char *, size_t,
166 int *);
167typedef enum nss_status nss_getsgent_r (struct sgrp *, char *, size_t, int *);
168typedef enum nss_status nss_getsgnam_r (const char *, struct sgrp *,
169 char *, size_t, int *);
170typedef enum nss_status nss_getspent_r (struct spwd *, char *, size_t, int *);
171typedef enum nss_status nss_getspnam_r (const char *, struct spwd *,
172 char *, size_t, int *);
173typedef void nss_init (void (*) (size_t, struct traced_file *));
174typedef enum nss_status nss_initgroups_dyn (const char *, __gid_t, long int *,
175 long int *, __gid_t **, long int,
176 int *);
177typedef enum nss_status nss_netname2user (char [], __uid_t *, __gid_t *,
178 int *, __gid_t *, int *);
179typedef enum nss_status nss_setaliasent (void);
180typedef enum nss_status nss_setetherent (int);
181typedef enum nss_status nss_setgrent (int);
182typedef enum nss_status nss_sethostent (int);
183typedef enum nss_status nss_setnetent (int);
184typedef enum nss_status nss_setnetgrent (const char *, struct __netgrent *);
185typedef enum nss_status nss_setprotoent (int);
186typedef enum nss_status nss_setpwent (int);
187typedef enum nss_status nss_setrpcent (int);
188typedef enum nss_status nss_setservent (int);
189typedef enum nss_status nss_setsgent (int);
190typedef enum nss_status nss_setspent (int);
191
192/* Declare all NSS functions for MODULE. */
193#define NSS_DECLARE_MODULE_FUNCTIONS(module) \
194 extern nss_endaliasent _nss_##module##_endaliasent; \
195 extern nss_endetherent _nss_##module##_endetherent; \
196 extern nss_endgrent _nss_##module##_endgrent; \
197 extern nss_endhostent _nss_##module##_endhostent; \
198 extern nss_endnetent _nss_##module##_endnetent; \
199 extern nss_endnetgrent _nss_##module##__endnetgrent; \
200 extern nss_endprotoent _nss_##module##_endprotoent; \
201 extern nss_endpwent _nss_##module##_endpwent; \
202 extern nss_endrpcent _nss_##module##_endrpcent; \
203 extern nss_endservent _nss_##module##_endservent; \
204 extern nss_endsgent _nss_##module##_endsgent; \
205 extern nss_endspent _nss_##module##_endspent; \
206 extern nss_getaliasbyname_r _nss_##module##_getaliasbyname_r; \
207 extern nss_getaliasent_r _nss_##module##_getaliasent_r; \
208 extern nss_getcanonname_r _nss_##module##_getcanonname_r; \
209 extern nss_getetherent_r _nss_##module##_getetherent_r; \
210 extern nss_getgrent_r _nss_##module##_getgrent_r; \
211 extern nss_getgrgid_r _nss_##module##_getgrgid_r; \
212 extern nss_getgrnam_r _nss_##module##_getgrnam_r; \
213 extern nss_gethostbyaddr2_r _nss_##module##_gethostbyaddr2_r; \
214 extern nss_gethostbyaddr_r _nss_##module##_gethostbyaddr_r; \
215 extern nss_gethostbyname2_r _nss_##module##_gethostbyname2_r; \
216 extern nss_gethostbyname3_r _nss_##module##_gethostbyname3_r; \
217 extern nss_gethostbyname4_r _nss_##module##_gethostbyname4_r; \
218 extern nss_gethostbyname_r _nss_##module##_gethostbyname_r; \
219 extern nss_gethostent_r _nss_##module##_gethostent_r; \
220 extern nss_gethostton_r _nss_##module##_gethostton_r; \
221 extern nss_getnetbyaddr_r _nss_##module##_getnetbyaddr_r; \
222 extern nss_getnetbyname_r _nss_##module##_getnetbyname_r; \
223 extern nss_getnetent_r _nss_##module##_getnetent_r; \
224 extern nss_getnetgrent_r _nss_##module##_getnetgrent_r; \
225 extern nss_getntohost_r _nss_##module##_getntohost_r; \
226 extern nss_getprotobyname_r _nss_##module##_getprotobyname_r; \
227 extern nss_getprotobynumber_r _nss_##module##_getprotobynumber_r; \
228 extern nss_getprotoent_r _nss_##module##_getprotoent_r; \
229 extern nss_getpublickey _nss_##module##_getpublickey; \
230 extern nss_getpwent_r _nss_##module##_getpwent_r; \
231 extern nss_getpwnam_r _nss_##module##_getpwnam_r; \
232 extern nss_getpwuid_r _nss_##module##_getpwuid_r; \
233 extern nss_getrpcbyname_r _nss_##module##_getrpcbyname_r; \
234 extern nss_getrpcbynumber_r _nss_##module##_getrpcbynumber_r; \
235 extern nss_getrpcent_r _nss_##module##_getrpcent_r; \
236 extern nss_getsecretkey _nss_##module##_getsecretkey; \
237 extern nss_getservbyname_r _nss_##module##_getservbyname_r; \
238 extern nss_getservbyport_r _nss_##module##_getservbyport_r; \
239 extern nss_getservent_r _nss_##module##_getservent_r; \
240 extern nss_getsgent_r _nss_##module##_getsgent_r; \
241 extern nss_getsgnam_r _nss_##module##_getsgnam_r; \
242 extern nss_getspent_r _nss_##module##_getspent_r; \
243 extern nss_getspnam_r _nss_##module##_getspnam_r; \
244 extern nss_init _nss_##module##_init; \
245 extern nss_initgroups_dyn _nss_##module##_initgroups_dyn; \
246 extern nss_netname2user _nss_##module##_netname2user; \
247 extern nss_setaliasent _nss_##module##_setaliasent; \
248 extern nss_setetherent _nss_##module##_setetherent; \
249 extern nss_setgrent _nss_##module##_setgrent; \
250 extern nss_sethostent _nss_##module##_sethostent; \
251 extern nss_setnetent _nss_##module##_setnetent; \
252 extern nss_setnetgrent _nss_##module##_setnetgrent; \
253 extern nss_setprotoent _nss_##module##_setprotoent; \
254 extern nss_setpwent _nss_##module##_setpwent; \
255 extern nss_setrpcent _nss_##module##_setrpcent; \
256 extern nss_setservent _nss_##module##_setservent; \
257 extern nss_setsgent _nss_##module##_setsgent; \
258 extern nss_setspent _nss_##module##_setspent; \
60259
61__END_DECLS260__END_DECLS
62261
lib/libc/include/generic-glibc/printf.h+2-1
...@@ -182,7 +182,8 @@ extern int printf_size_info (const struct printf_info *__restrict...@@ -182,7 +182,8 @@ extern int printf_size_info (const struct printf_info *__restrict
182 __info, size_t __n, int *__restrict __argtypes)182 __info, size_t __n, int *__restrict __argtypes)
183 __THROW;183 __THROW;
184184
185#ifdef __LDBL_COMPAT185#include <bits/floatn.h>
186#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
186# include <bits/printf-ldbl.h>187# include <bits/printf-ldbl.h>
187#endif188#endif
188189
lib/libc/include/generic-glibc/pthread.h+15
...@@ -27,6 +27,7 @@...@@ -27,6 +27,7 @@
27#include <bits/setjmp.h>27#include <bits/setjmp.h>
28#include <bits/wordsize.h>28#include <bits/wordsize.h>
29#include <bits/types/struct_timespec.h>29#include <bits/types/struct_timespec.h>
30#include <bits/types/__sigset_t.h>
3031
3132
32/* Detach state. */33/* Detach state. */
...@@ -385,6 +386,20 @@ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,...@@ -385,6 +386,20 @@ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
385extern int pthread_getattr_default_np (pthread_attr_t *__attr)386extern int pthread_getattr_default_np (pthread_attr_t *__attr)
386 __THROW __nonnull ((1));387 __THROW __nonnull ((1));
387388
389/* Store *SIGMASK as the signal mask for the new thread in *ATTR. */
390extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr,
391 const __sigset_t *sigmask);
392
393/* Store the signal mask of *ATTR in *SIGMASK. If there is no signal
394 mask stored, return PTHREAD_ATTR_NOSIGMASK_NP. Return zero on
395 success. */
396extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr,
397 __sigset_t *sigmask);
398
399/* Special return value from pthread_attr_getsigmask_np if the signal
400 mask has not been set. */
401#define PTHREAD_ATTR_NO_SIGMASK_NP (-1)
402
388/* Set the default attributes to be used by pthread_create in this403/* Set the default attributes to be used by pthread_create in this
389 process. */404 process. */
390extern int pthread_setattr_default_np (const pthread_attr_t *__attr)405extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
lib/libc/include/generic-glibc/signal.h+17-14
...@@ -27,7 +27,7 @@...@@ -27,7 +27,7 @@
27__BEGIN_DECLS27__BEGIN_DECLS
2828
29#include <bits/types.h>29#include <bits/types.h>
30#include <bits/signum.h>30#include <bits/signum-generic.h>
3131
32#include <bits/types/sig_atomic_t.h>32#include <bits/types/sig_atomic_t.h>
3333
...@@ -148,7 +148,8 @@ extern void psiginfo (const siginfo_t *__pinfo, const char *__s);...@@ -148,7 +148,8 @@ extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
148148
149#ifdef __USE_XOPEN_EXTENDED149#ifdef __USE_XOPEN_EXTENDED
150# ifdef __GNUC__150# ifdef __GNUC__
151extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");151extern int sigpause (int __sig) __asm__ ("__xpg_sigpause")
152 __attribute_deprecated_msg__ ("Use the sigsuspend function instead");
152# else153# else
153extern int __sigpause (int __sig_or_mask, int __is_sig);154extern int __sigpause (int __sig_or_mask, int __is_sig);
154/* Remove a signal from the signal mask and suspend the process. */155/* Remove a signal from the signal mask and suspend the process. */
...@@ -164,7 +165,9 @@ extern int __sigpause (int __sig_or_mask, int __is_sig);...@@ -164,7 +165,9 @@ extern int __sigpause (int __sig_or_mask, int __is_sig);
164 simply do not work in many situations. Use `sigprocmask' instead. */165 simply do not work in many situations. Use `sigprocmask' instead. */
165166
166/* Compute mask for signal SIG. */167/* Compute mask for signal SIG. */
167# define sigmask(sig) ((int)(1u << ((sig) - 1)))168# define sigmask(sig) \
169 __glibc_macro_warning ("sigmask is deprecated") \
170 ((int)(1u << ((sig) - 1)))
168171
169/* Block signals in MASK, returning the old mask. */172/* Block signals in MASK, returning the old mask. */
170extern int sigblock (int __mask) __THROW __attribute_deprecated__;173extern int sigblock (int __mask) __THROW __attribute_deprecated__;
...@@ -281,12 +284,6 @@ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)...@@ -281,12 +284,6 @@ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
281284
282#ifdef __USE_MISC285#ifdef __USE_MISC
283286
284/* Names of the signals. This variable exists only for compatibility.
285 Use `strsignal' instead (see <string.h>). */
286extern const char *const _sys_siglist[_NSIG];
287extern const char *const sys_siglist[_NSIG];
288
289
290/* Get machine-dependent `struct sigcontext' and signal subcodes. */287/* Get machine-dependent `struct sigcontext' and signal subcodes. */
291# include <bits/sigcontext.h>288# include <bits/sigcontext.h>
292289
...@@ -311,7 +308,8 @@ extern int sigreturn (struct sigcontext *__scp) __THROW;...@@ -311,7 +308,8 @@ extern int sigreturn (struct sigcontext *__scp) __THROW;
311/* If INTERRUPT is nonzero, make signal SIG interrupt system calls308/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
312 (causing them to fail with EINTR); if INTERRUPT is zero, make system309 (causing them to fail with EINTR); if INTERRUPT is zero, make system
313 calls be restarted after signal SIG. */310 calls be restarted after signal SIG. */
314extern int siginterrupt (int __sig, int __interrupt) __THROW;311extern int siginterrupt (int __sig, int __interrupt) __THROW
312 __attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead");
315313
316# include <bits/sigstack.h>314# include <bits/sigstack.h>
317# include <bits/ss_flags.h>315# include <bits/ss_flags.h>
...@@ -340,16 +338,21 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)...@@ -340,16 +338,21 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
340/* Simplified interface for signal management. */338/* Simplified interface for signal management. */
341339
342/* Add SIG to the calling process' signal mask. */340/* Add SIG to the calling process' signal mask. */
343extern int sighold (int __sig) __THROW;341extern int sighold (int __sig) __THROW
342 __attribute_deprecated_msg__ ("Use the sigprocmask function instead");
344343
345/* Remove SIG from the calling process' signal mask. */344/* Remove SIG from the calling process' signal mask. */
346extern int sigrelse (int __sig) __THROW;345extern int sigrelse (int __sig) __THROW
346 __attribute_deprecated_msg__ ("Use the sigprocmask function instead");
347347
348/* Set the disposition of SIG to SIG_IGN. */348/* Set the disposition of SIG to SIG_IGN. */
349extern int sigignore (int __sig) __THROW;349extern int sigignore (int __sig) __THROW
350 __attribute_deprecated_msg__ ("Use the signal function instead");
350351
351/* Set the disposition of SIG. */352/* Set the disposition of SIG. */
352extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;353extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW
354 __attribute_deprecated_msg__
355 ("Use the signal and sigprocmask functions instead");
353#endif356#endif
354357
355#if defined __USE_POSIX199506 || defined __USE_UNIX98358#if defined __USE_POSIX199506 || defined __USE_UNIX98
lib/libc/include/generic-glibc/stdio.h+14-13
...@@ -400,9 +400,12 @@ extern int sscanf (const char *__restrict __s,...@@ -400,9 +400,12 @@ extern int sscanf (const char *__restrict __s,
400 const char *__restrict __format, ...) __THROW;400 const char *__restrict __format, ...) __THROW;
401401
402/* For historical reasons, the C99-compliant versions of the scanf402/* For historical reasons, the C99-compliant versions of the scanf
403 functions are at alternative names. When __LDBL_COMPAT is in403 functions are at alternative names. When __LDBL_COMPAT or
404 effect, this is handled in bits/stdio-ldbl.h. */404 __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in
405#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT405 bits/stdio-ldbl.h. */
406#include <bits/floatn.h>
407#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
408 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
406# ifdef __REDIRECT409# ifdef __REDIRECT
407extern int __REDIRECT (fscanf, (FILE *__restrict __stream,410extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
408 const char *__restrict __format, ...),411 const char *__restrict __format, ...),
...@@ -447,7 +450,8 @@ extern int vsscanf (const char *__restrict __s,...@@ -447,7 +450,8 @@ extern int vsscanf (const char *__restrict __s,
447450
448/* Same redirection as above for the v*scanf family. */451/* Same redirection as above for the v*scanf family. */
449# if !__GLIBC_USE (DEPRECATED_SCANF)452# if !__GLIBC_USE (DEPRECATED_SCANF)
450# if defined __REDIRECT && !defined __LDBL_COMPAT453# if defined __REDIRECT && !defined __LDBL_COMPAT \
454 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
451extern int __REDIRECT (vfscanf,455extern int __REDIRECT (vfscanf,
452 (FILE *__restrict __s,456 (FILE *__restrict __s,
453 const char *__restrict __format, __gnuc_va_list __arg),457 const char *__restrict __format, __gnuc_va_list __arg),
...@@ -562,7 +566,7 @@ extern int putw (int __w, FILE *__stream);...@@ -562,7 +566,7 @@ extern int putw (int __w, FILE *__stream);
562 This function is a possible cancellation point and therefore not566 This function is a possible cancellation point and therefore not
563 marked with __THROW. */567 marked with __THROW. */
564extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)568extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
565 __wur;569 __wur __attr_access ((__write_only__, 1, 2));
566570
567#if __GLIBC_USE (DEPRECATED_GETS)571#if __GLIBC_USE (DEPRECATED_GETS)
568/* Get a newline-terminated string from stdin, removing the newline.572/* Get a newline-terminated string from stdin, removing the newline.
...@@ -585,7 +589,8 @@ extern char *gets (char *__s) __wur __attribute_deprecated__;...@@ -585,7 +589,8 @@ extern char *gets (char *__s) __wur __attribute_deprecated__;
585 or due to the implementation it is a cancellation point and589 or due to the implementation it is a cancellation point and
586 therefore not marked with __THROW. */590 therefore not marked with __THROW. */
587extern char *fgets_unlocked (char *__restrict __s, int __n,591extern char *fgets_unlocked (char *__restrict __s, int __n,
588 FILE *__restrict __stream) __wur;592 FILE *__restrict __stream) __wur
593 __attr_access ((__write_only__, 1, 2));
589#endif594#endif
590595
591596
...@@ -774,12 +779,6 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur;...@@ -774,12 +779,6 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur;
774 marked with __THROW. */779 marked with __THROW. */
775extern void perror (const char *__s);780extern void perror (const char *__s);
776781
777/* Provide the declarations for `sys_errlist' and `sys_nerr' if they
778 are available on this system. Even if available, these variables
779 should not be used directly. The `strerror' function provides
780 all the necessary functionality. */
781#include <bits/sys_errlist.h>
782
783782
784#ifdef __USE_POSIX783#ifdef __USE_POSIX
785/* Return the system file descriptor for STREAM. */784/* Return the system file descriptor for STREAM. */
...@@ -866,7 +865,9 @@ extern int __overflow (FILE *, int);...@@ -866,7 +865,9 @@ extern int __overflow (FILE *, int);
866#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function865#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
867# include <bits/stdio2.h>866# include <bits/stdio2.h>
868#endif867#endif
869#ifdef __LDBL_COMPAT868
869#include <bits/floatn.h>
870#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
870# include <bits/stdio-ldbl.h>871# include <bits/stdio-ldbl.h>
871#endif872#endif
872873
lib/libc/include/generic-glibc/stdlib.h+9-6
...@@ -397,7 +397,7 @@ extern long int a64l (const char *__s)...@@ -397,7 +397,7 @@ extern long int a64l (const char *__s)
397 `initstate' and `setstate' functions are those from BSD Unices.397 `initstate' and `setstate' functions are those from BSD Unices.
398 The `rand' and `srand' functions are required by the ANSI standard.398 The `rand' and `srand' functions are required by the ANSI standard.
399 We provide both interfaces to the same random number generator. */399 We provide both interfaces to the same random number generator. */
400/* Return a random long integer between 0 and RAND_MAX inclusive. */400/* Return a random long integer between 0 and 2^31-1 inclusive. */
401extern long int random (void) __THROW;401extern long int random (void) __THROW;
402402
403/* Seed the random number generator with the given number. */403/* Seed the random number generator with the given number. */
...@@ -931,12 +931,13 @@ extern int wctomb (char *__s, wchar_t __wchar) __THROW;...@@ -931,12 +931,13 @@ extern int wctomb (char *__s, wchar_t __wchar) __THROW;
931931
932/* Convert a multibyte string to a wide char string. */932/* Convert a multibyte string to a wide char string. */
933extern size_t mbstowcs (wchar_t *__restrict __pwcs,933extern size_t mbstowcs (wchar_t *__restrict __pwcs,
934 const char *__restrict __s, size_t __n) __THROW;934 const char *__restrict __s, size_t __n) __THROW
935 __attr_access ((__read_only__, 2));
935/* Convert a wide char string to multibyte string. */936/* Convert a wide char string to multibyte string. */
936extern size_t wcstombs (char *__restrict __s,937extern size_t wcstombs (char *__restrict __s,
937 const wchar_t *__restrict __pwcs, size_t __n)938 const wchar_t *__restrict __pwcs, size_t __n)
938 __THROW;939 __THROW
939940 __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2));
940941
941#ifdef __USE_MISC942#ifdef __USE_MISC
942/* Determine whether the string value of RESPONSE matches the affirmation943/* Determine whether the string value of RESPONSE matches the affirmation
...@@ -990,7 +991,7 @@ extern char *ptsname (int __fd) __THROW __wur;...@@ -990,7 +991,7 @@ extern char *ptsname (int __fd) __THROW __wur;
990 terminal associated with the master FD is open on in BUF.991 terminal associated with the master FD is open on in BUF.
991 Return 0 on success, otherwise an error number. */992 Return 0 on success, otherwise an error number. */
992extern int ptsname_r (int __fd, char *__buf, size_t __buflen)993extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
993 __THROW __nonnull ((2));994 __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
994995
995/* Open a master pseudo terminal and return its file descriptor. */996/* Open a master pseudo terminal and return its file descriptor. */
996extern int getpt (void);997extern int getpt (void);
...@@ -1016,7 +1017,9 @@ extern int ttyslot (void) __THROW;...@@ -1016,7 +1017,9 @@ extern int ttyslot (void) __THROW;
1016#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function1017#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
1017# include <bits/stdlib.h>1018# include <bits/stdlib.h>
1018#endif1019#endif
1019#ifdef __LDBL_COMPAT1020
1021#include <bits/floatn.h>
1022#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
1020# include <bits/stdlib-ldbl.h>1023# include <bits/stdlib-ldbl.h>
1021#endif1024#endif
10221025
lib/libc/include/generic-glibc/string.h+36-12
...@@ -53,7 +53,7 @@ extern void *memmove (void *__dest, const void *__src, size_t __n)...@@ -53,7 +53,7 @@ extern void *memmove (void *__dest, const void *__src, size_t __n)
53#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)53#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
54extern void *memccpy (void *__restrict __dest, const void *__restrict __src,54extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
55 int __c, size_t __n)55 int __c, size_t __n)
56 __THROW __nonnull ((1, 2));56 __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4));
57#endif /* Misc || X/Open. */57#endif /* Misc || X/Open. */
5858
5959
...@@ -108,12 +108,15 @@ extern void *rawmemchr (const void *__s, int __c)...@@ -108,12 +108,15 @@ extern void *rawmemchr (const void *__s, int __c)
108/* Search N bytes of S for the final occurrence of C. */108/* Search N bytes of S for the final occurrence of C. */
109# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO109# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
110extern "C++" void *memrchr (void *__s, int __c, size_t __n)110extern "C++" void *memrchr (void *__s, int __c, size_t __n)
111 __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1));111 __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1))
112 __attr_access ((__read_only__, 1, 3));
112extern "C++" const void *memrchr (const void *__s, int __c, size_t __n)113extern "C++" const void *memrchr (const void *__s, int __c, size_t __n)
113 __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1));114 __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1))
115 __attr_access ((__read_only__, 1, 3));
114# else116# else
115extern void *memrchr (const void *__s, int __c, size_t __n)117extern void *memrchr (const void *__s, int __c, size_t __n)
116 __THROW __attribute_pure__ __nonnull ((1));118 __THROW __attribute_pure__ __nonnull ((1))
119 __attr_access ((__read_only__, 1, 3));
117# endif120# endif
118#endif121#endif
119122
...@@ -146,7 +149,7 @@ extern int strcoll (const char *__s1, const char *__s2)...@@ -146,7 +149,7 @@ extern int strcoll (const char *__s1, const char *__s2)
146/* Put a transformation of SRC into no more than N bytes of DEST. */149/* Put a transformation of SRC into no more than N bytes of DEST. */
147extern size_t strxfrm (char *__restrict __dest,150extern size_t strxfrm (char *__restrict __dest,
148 const char *__restrict __src, size_t __n)151 const char *__restrict __src, size_t __n)
149 __THROW __nonnull ((2));152 __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3));
150153
151#ifdef __USE_XOPEN2K8154#ifdef __USE_XOPEN2K8
152/* POSIX.1-2008 extended locale interface (see locale.h). */155/* POSIX.1-2008 extended locale interface (see locale.h). */
...@@ -158,7 +161,8 @@ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)...@@ -158,7 +161,8 @@ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
158/* Put a transformation of SRC into no more than N bytes of DEST,161/* Put a transformation of SRC into no more than N bytes of DEST,
159 using sorting rules from L. */162 using sorting rules from L. */
160extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,163extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
161 locale_t __l) __THROW __nonnull ((2, 4));164 locale_t __l) __THROW __nonnull ((2, 4))
165 __attr_access ((__write_only__, 1, 3));
162#endif166#endif
163167
164#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \168#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \
...@@ -368,7 +372,9 @@ extern char *strcasestr (const char *__haystack, const char *__needle)...@@ -368,7 +372,9 @@ extern char *strcasestr (const char *__haystack, const char *__needle)
368 HAYSTACK is HAYSTACKLEN bytes long. */372 HAYSTACK is HAYSTACKLEN bytes long. */
369extern void *memmem (const void *__haystack, size_t __haystacklen,373extern void *memmem (const void *__haystack, size_t __haystacklen,
370 const void *__needle, size_t __needlelen)374 const void *__needle, size_t __needlelen)
371 __THROW __attribute_pure__ __nonnull ((1, 3));375 __THROW __attribute_pure__ __nonnull ((1, 3))
376 __attr_access ((__read_only__, 1, 2))
377 __attr_access ((__read_only__, 3, 4));
372378
373/* Copy N bytes of SRC to DEST, return pointer to bytes after the379/* Copy N bytes of SRC to DEST, return pointer to bytes after the
374 last written byte. */380 last written byte. */
...@@ -409,17 +415,25 @@ extern char *strerror (int __errnum) __THROW;...@@ -409,17 +415,25 @@ extern char *strerror (int __errnum) __THROW;
409# ifdef __REDIRECT_NTH415# ifdef __REDIRECT_NTH
410extern int __REDIRECT_NTH (strerror_r,416extern int __REDIRECT_NTH (strerror_r,
411 (int __errnum, char *__buf, size_t __buflen),417 (int __errnum, char *__buf, size_t __buflen),
412 __xpg_strerror_r) __nonnull ((2));418 __xpg_strerror_r) __nonnull ((2))
419 __attr_access ((__write_only__, 2, 3));
413# else420# else
414extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)421extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
415 __THROW __nonnull ((2));422 __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
416# define strerror_r __xpg_strerror_r423# define strerror_r __xpg_strerror_r
417# endif424# endif
418# else425# else
419/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be426/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be
420 used. */427 used. */
421extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)428extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
422 __THROW __nonnull ((2)) __wur;429 __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3));
430# endif
431
432# ifdef __USE_GNU
433/* Return a string describing the meaning of tthe error in ERR. */
434extern const char *strerrordesc_np (int __err) __THROW;
435/* Return a string with the error name in ERR. */
436extern const char *strerrorname_np (int __err) __THROW;
423# endif437# endif
424#endif438#endif
425439
...@@ -433,7 +447,8 @@ extern char *strerror_l (int __errnum, locale_t __l) __THROW;...@@ -433,7 +447,8 @@ extern char *strerror_l (int __errnum, locale_t __l) __THROW;
433447
434/* Set N bytes of S to 0. The compiler will not delete a call to this448/* Set N bytes of S to 0. The compiler will not delete a call to this
435 function, even if S is dead after the call. */449 function, even if S is dead after the call. */
436extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1));450extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1))
451 __attr_access ((__write_only__, 1, 2));
437452
438/* Return the next DELIM-delimited token from *STRINGP,453/* Return the next DELIM-delimited token from *STRINGP,
439 terminating it with a '\0', and update *STRINGP to point past it. */454 terminating it with a '\0', and update *STRINGP to point past it. */
...@@ -446,6 +461,14 @@ extern char *strsep (char **__restrict __stringp,...@@ -446,6 +461,14 @@ extern char *strsep (char **__restrict __stringp,
446/* Return a string describing the meaning of the signal number in SIG. */461/* Return a string describing the meaning of the signal number in SIG. */
447extern char *strsignal (int __sig) __THROW;462extern char *strsignal (int __sig) __THROW;
448463
464# ifdef __USE_GNU
465/* Return an abbreviation string for the signal number SIG. */
466extern const char *sigabbrev_np (int __sig) __THROW;
467/* Return a string describing the meaning of the signal number in SIG,
468 the result is not translated. */
469extern const char *sigdescr_np (int __sig) __THROW;
470# endif
471
449/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */472/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
450extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)473extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
451 __THROW __nonnull ((1, 2));474 __THROW __nonnull ((1, 2));
...@@ -471,7 +494,8 @@ extern int strverscmp (const char *__s1, const char *__s2)...@@ -471,7 +494,8 @@ extern int strverscmp (const char *__s1, const char *__s2)
471extern char *strfry (char *__string) __THROW __nonnull ((1));494extern char *strfry (char *__string) __THROW __nonnull ((1));
472495
473/* Frobnicate N bytes of S. */496/* Frobnicate N bytes of S. */
474extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1));497extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1))
498 __attr_access ((__write_only__, 1, 2));
475499
476# ifndef basename500# ifndef basename
477/* Return the file name within directory of FILENAME. We don't501/* Return the file name within directory of FILENAME. We don't
lib/libc/include/generic-glibc/sys/asm.h deleted-497
...@@ -1,497 +0,0 @@
1/* Copyright (C) 1997-2020 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_ASM_H
19#define _SYS_ASM_H
20
21#include <sgidefs.h>
22
23#ifndef CAT
24# define __CAT(str1,str2) str1##str2
25# define CAT(str1,str2) __CAT(str1,str2)
26#endif
27
28/* Redefined as nonempty in the internal header. */
29#define __mips_cfi_startproc /* Empty. */
30#define __mips_cfi_endproc /* Empty. */
31
32/*
33 * Macros to handle different pointer/register sizes for 32/64-bit code
34 *
35 * 64 bit address space isn't used yet, so we may use the R3000 32 bit
36 * defines for now.
37 */
38#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
39# define PTR .word
40# define PTRSIZE 4
41# define PTRLOG 2
42#elif _MIPS_SIM == _ABI64
43# define PTR .dword
44# define PTRSIZE 8
45# define PTRLOG 3
46#endif
47
48/*
49 * PIC specific declarations
50 */
51#if _MIPS_SIM == _ABIO32
52# ifdef __PIC__
53# define CPRESTORE(register) \
54 .cprestore register
55# define CPLOAD(register) \
56 .cpload register
57# else
58# define CPRESTORE(register)
59# define CPLOAD(register)
60# endif
61
62# define CPADD(register) \
63 .cpadd register
64
65/*
66 * Set gp when at 1st instruction
67 */
68# define SETUP_GP \
69 .set noreorder; \
70 .cpload $25; \
71 .set reorder
72/* Set gp when not at 1st instruction */
73# define SETUP_GPX(r) \
74 .set noreorder; \
75 move r, $31; /* Save old ra. */ \
76 bal 10f; /* Find addr of cpload. */ \
77 nop; \
7810: \
79 .cpload $31; \
80 move $31, r; \
81 .set reorder
82# define SETUP_GPX_L(r, l) \
83 .set noreorder; \
84 move r, $31; /* Save old ra. */ \
85 bal l; /* Find addr of cpload. */ \
86 nop; \
87l: \
88 .cpload $31; \
89 move $31, r; \
90 .set reorder
91# define SAVE_GP(x) \
92 .cprestore x /* Save gp trigger t9/jalr conversion. */
93# define SETUP_GP64(a, b)
94# define SETUP_GPX64(a, b)
95# define SETUP_GPX64_L(cp_reg, ra_save, l)
96# define RESTORE_GP64
97# define USE_ALT_CP(a)
98#else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */
99/*
100 * For callee-saved gp calling convention:
101 */
102# define SETUP_GP
103# define SETUP_GPX(r)
104# define SETUP_GPX_L(r, l)
105# define SAVE_GP(x)
106
107# define SETUP_GP64(gpoffset, proc) \
108 .cpsetup $25, gpoffset, proc
109# define SETUP_GPX64(cp_reg, ra_save) \
110 move ra_save, $31; /* Save old ra. */ \
111 .set noreorder; \
112 bal 10f; /* Find addr of .cpsetup. */ \
113 nop; \
11410: \
115 .set reorder; \
116 .cpsetup $31, cp_reg, 10b; \
117 move $31, ra_save
118# define SETUP_GPX64_L(cp_reg, ra_save, l) \
119 move ra_save, $31; /* Save old ra. */ \
120 .set noreorder; \
121 bal l; /* Find addr of .cpsetup. */ \
122 nop; \
123l: \
124 .set reorder; \
125 .cpsetup $31, cp_reg, l; \
126 move $31, ra_save
127# define RESTORE_GP64 \
128 .cpreturn
129/* Use alternate register for context pointer. */
130# define USE_ALT_CP(reg) \
131 .cplocal reg
132#endif /* _MIPS_SIM != _ABIO32 */
133
134/*
135 * Stack Frame Definitions
136 */
137#if _MIPS_SIM == _ABIO32
138# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */
139#endif
140#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
141# define NARGSAVE 0 /* No caller responsibilities. */
142#endif
143
144
145/*
146 * LEAF - declare leaf routine
147 */
148#define LEAF(symbol) \
149 .globl symbol; \
150 .align 2; \
151 .type symbol,@function; \
152 .ent symbol,0; \
153symbol: .frame sp,0,ra; \
154 __mips_cfi_startproc
155
156/*
157 * NESTED - declare nested routine entry point
158 */
159#define NESTED(symbol, framesize, rpc) \
160 .globl symbol; \
161 .align 2; \
162 .type symbol,@function; \
163 .ent symbol,0; \
164symbol: .frame sp, framesize, rpc; \
165 __mips_cfi_startproc
166
167/*
168 * END - mark end of function
169 */
170#ifndef END
171# define END(function) \
172 __mips_cfi_endproc; \
173 .end function; \
174 .size function,.-function
175#endif
176
177/*
178 * EXPORT - export definition of symbol
179 */
180#define EXPORT(symbol) \
181 .globl symbol; \
182symbol: __mips_cfi_startproc
183
184/*
185 * ABS - export absolute symbol
186 */
187#define ABS(symbol,value) \
188 .globl symbol; \
189symbol = value
190
191#define PANIC(msg) \
192 .set push; \
193 .set reorder; \
194 la a0,8f; \
195 jal panic; \
1969: b 9b; \
197 .set pop; \
198 TEXT(msg)
199
200/*
201 * Print formated string
202 */
203#define PRINT(string) \
204 .set push; \
205 .set reorder; \
206 la a0,8f; \
207 jal printk; \
208 .set pop; \
209 TEXT(string)
210
211#define TEXT(msg) \
212 .data; \
2138: .asciiz msg; \
214 .previous;
215
216/*
217 * Build text tables
218 */
219#define TTABLE(string) \
220 .text; \
221 .word 1f; \
222 .previous; \
223 .data; \
2241: .asciz string; \
225 .previous
226
227/*
228 * MIPS IV pref instruction.
229 * Use with .set noreorder only!
230 *
231 * MIPS IV implementations are free to treat this as a nop. The R5000
232 * is one of them. So we should have an option not to use this instruction.
233 */
234#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) \
235 || (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
236# define PREF(hint,addr) \
237 pref hint,addr
238# define PREFX(hint,addr) \
239 prefx hint,addr
240#else
241# define PREF(hint,addr)
242# define PREFX(hint,addr)
243#endif
244
245/*
246 * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs.
247 */
248#if _MIPS_ISA == _MIPS_ISA_MIPS1
249# define MOVN(rd,rs,rt) \
250 .set push; \
251 .set reorder; \
252 beqz rt,9f; \
253 move rd,rs; \
254 .set pop; \
2559:
256# define MOVZ(rd,rs,rt) \
257 .set push; \
258 .set reorder; \
259 bnez rt,9f; \
260 move rd,rt; \
261 .set pop; \
2629:
263#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */
264#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3)
265# define MOVN(rd,rs,rt) \
266 .set push; \
267 .set noreorder; \
268 bnezl rt,9f; \
269 move rd,rs; \
270 .set pop; \
2719:
272# define MOVZ(rd,rs,rt) \
273 .set push; \
274 .set noreorder; \
275 beqzl rt,9f; \
276 movz rd,rs; \
277 .set pop; \
2789:
279#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */
280#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) \
281 || (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
282# define MOVN(rd,rs,rt) \
283 movn rd,rs,rt
284# define MOVZ(rd,rs,rt) \
285 movz rd,rs,rt
286#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) */
287
288/*
289 * Stack alignment
290 */
291#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
292# define ALSZ 15
293# define ALMASK ~15
294#else
295# define ALSZ 7
296# define ALMASK ~7
297#endif
298
299/*
300 * Size of a register
301 */
302#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
303# define SZREG 8
304#else
305# define SZREG 4
306#endif
307
308/*
309 * Use the following macros in assemblercode to load/store registers,
310 * pointers etc.
311 */
312#if (SZREG == 4)
313# define REG_S sw
314# define REG_L lw
315#else
316# define REG_S sd
317# define REG_L ld
318#endif
319
320/*
321 * How to add/sub/load/store/shift C int variables.
322 */
323#if (_MIPS_SZINT == 32)
324# define INT_ADD add
325# define INT_ADDI addi
326# define INT_ADDU addu
327# define INT_ADDIU addiu
328# define INT_SUB sub
329# define INT_SUBI subi
330# define INT_SUBU subu
331# define INT_SUBIU subu
332# define INT_L lw
333# define INT_S sw
334#endif
335
336#if (_MIPS_SZINT == 64)
337# define INT_ADD dadd
338# define INT_ADDI daddi
339# define INT_ADDU daddu
340# define INT_ADDIU daddiu
341# define INT_SUB dsub
342# define INT_SUBI dsubi
343# define INT_SUBU dsubu
344# define INT_SUBIU dsubu
345# define INT_L ld
346# define INT_S sd
347#endif
348
349/*
350 * How to add/sub/load/store/shift C long variables.
351 */
352#if (_MIPS_SZLONG == 32)
353# define LONG_ADD add
354# define LONG_ADDI addi
355# define LONG_ADDU addu
356# define LONG_ADDIU addiu
357# define LONG_SUB sub
358# define LONG_SUBI subi
359# define LONG_SUBU subu
360# define LONG_SUBIU subu
361# define LONG_L lw
362# define LONG_S sw
363# define LONG_SLL sll
364# define LONG_SLLV sllv
365# define LONG_SRL srl
366# define LONG_SRLV srlv
367# define LONG_SRA sra
368# define LONG_SRAV srav
369#endif
370
371#if (_MIPS_SZLONG == 64)
372# define LONG_ADD dadd
373# define LONG_ADDI daddi
374# define LONG_ADDU daddu
375# define LONG_ADDIU daddiu
376# define LONG_SUB dsub
377# define LONG_SUBI dsubi
378# define LONG_SUBU dsubu
379# define LONG_SUBIU dsubu
380# define LONG_L ld
381# define LONG_S sd
382# define LONG_SLL dsll
383# define LONG_SLLV dsllv
384# define LONG_SRL dsrl
385# define LONG_SRLV dsrlv
386# define LONG_SRA dsra
387# define LONG_SRAV dsrav
388#endif
389
390/*
391 * How to add/sub/load/store/shift pointers.
392 */
393#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 32)
394# define PTR_ADD add
395# define PTR_ADDI addi
396# define PTR_ADDU addu
397# define PTR_ADDIU addiu
398# define PTR_SUB sub
399# define PTR_SUBI subi
400# define PTR_SUBU subu
401# define PTR_SUBIU subu
402# define PTR_L lw
403# define PTR_LA la
404# define PTR_S sw
405# define PTR_SLL sll
406# define PTR_SLLV sllv
407# define PTR_SRL srl
408# define PTR_SRLV srlv
409# define PTR_SRA sra
410# define PTR_SRAV srav
411
412# define PTR_SCALESHIFT 2
413#endif
414
415#if _MIPS_SIM == _ABIN32
416# define PTR_ADD add
417# define PTR_ADDI addi
418# define PTR_SUB sub
419# define PTR_SUBI subi
420#if !defined __mips_isa_rev || __mips_isa_rev < 6
421# define PTR_ADDU add /* no u */
422# define PTR_ADDIU addi /* no u */
423# define PTR_SUBU sub /* no u */
424# define PTR_SUBIU sub /* no u */
425#else
426# define PTR_ADDU addu
427# define PTR_ADDIU addiu
428# define PTR_SUBU subu
429# define PTR_SUBIU subu
430#endif
431# define PTR_L lw
432# define PTR_LA la
433# define PTR_S sw
434# define PTR_SLL sll
435# define PTR_SLLV sllv
436# define PTR_SRL srl
437# define PTR_SRLV srlv
438# define PTR_SRA sra
439# define PTR_SRAV srav
440
441# define PTR_SCALESHIFT 2
442#endif
443
444#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \
445 || _MIPS_SIM == _ABI64
446# define PTR_ADD dadd
447# define PTR_ADDI daddi
448# define PTR_ADDU daddu
449# define PTR_ADDIU daddiu
450# define PTR_SUB dsub
451# define PTR_SUBI dsubi
452# define PTR_SUBU dsubu
453# define PTR_SUBIU dsubu
454# define PTR_L ld
455# define PTR_LA dla
456# define PTR_S sd
457# define PTR_SLL dsll
458# define PTR_SLLV dsllv
459# define PTR_SRL dsrl
460# define PTR_SRLV dsrlv
461# define PTR_SRA dsra
462# define PTR_SRAV dsrav
463
464# define PTR_SCALESHIFT 3
465#endif
466
467/*
468 * Some cp0 registers were extended to 64bit for MIPS III.
469 */
470#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) \
471 || (_MIPS_ISA == _MIPS_ISA_MIPS32)
472# define MFC0 mfc0
473# define MTC0 mtc0
474#endif
475#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) \
476 || (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
477# define MFC0 dmfc0
478# define MTC0 dmtc0
479#endif
480
481/* The MIPS architectures do not have a uniform memory model. Particular
482 platforms may provide additional guarantees - for instance, the R4000
483 LL and SC instructions implicitly perform a SYNC, and the 4K promises
484 strong ordering.
485
486 However, in the absence of those guarantees, we must assume weak ordering
487 and SYNC explicitly where necessary.
488
489 Some obsolete MIPS processors may not support the SYNC instruction. This
490 applies to "true" MIPS I processors; most of the processors which compile
491 using MIPS I implement parts of MIPS II. */
492
493#ifndef MIPS_SYNC
494# define MIPS_SYNC sync
495#endif
496
497#endif /* sys/asm.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/cachectl.h deleted-41
...@@ -1,41 +0,0 @@
1/* Copyright (C) 1995-2020 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_CACHECTL_H
19#define _SYS_CACHECTL_H 1
20
21#include <features.h>
22
23/*
24 * Get the kernel definition for the op bits.
25 */
26#include <asm/cachectl.h>
27
28__BEGIN_DECLS
29
30#ifdef __USE_MISC
31extern int cachectl (void *__addr, const int __nbytes, const int __op) __THROW;
32#endif
33extern int __cachectl (void *__addr, const int __nbytes, const int __op) __THROW;
34#ifdef __USE_MISC
35extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW;
36#endif
37extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW;
38
39__END_DECLS
40
41#endif /* sys/cachectl.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/cdefs.h+47-2
...@@ -452,7 +452,37 @@...@@ -452,7 +452,37 @@
452#include <bits/wordsize.h>452#include <bits/wordsize.h>
453#include <bits/long-double.h>453#include <bits/long-double.h>
454454
455#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH455#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
456# ifdef __REDIRECT
457
458/* Alias name defined automatically. */
459# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
460# define __LDBL_REDIR_DECL(name) \
461 extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
462
463/* Alias name defined automatically, with leading underscores. */
464# define __LDBL_REDIR2_DECL(name) \
465 extern __typeof (__##name) __##name \
466 __asm (__ASMNAME ("__" #name "ieee128"));
467
468/* Alias name defined manually. */
469# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
470# define __LDBL_REDIR1_DECL(name, alias) \
471 extern __typeof (name) name __asm (__ASMNAME (#alias));
472
473# define __LDBL_REDIR1_NTH(name, proto, alias) \
474 __REDIRECT_NTH (name, proto, alias)
475# define __REDIRECT_NTH_LDBL(name, proto, alias) \
476 __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
477
478/* Unused. */
479# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
480# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
481
482# else
483_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
484# endif
485#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
456# define __LDBL_COMPAT 1486# define __LDBL_COMPAT 1
457# ifdef __REDIRECT487# ifdef __REDIRECT
458# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)488# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
...@@ -461,6 +491,8 @@...@@ -461,6 +491,8 @@
461# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)491# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
462# define __LDBL_REDIR_NTH(name, proto) \492# define __LDBL_REDIR_NTH(name, proto) \
463 __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)493 __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
494# define __LDBL_REDIR2_DECL(name) \
495 extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
464# define __LDBL_REDIR1_DECL(name, alias) \496# define __LDBL_REDIR1_DECL(name, alias) \
465 extern __typeof (name) name __asm (__ASMNAME (#alias));497 extern __typeof (name) name __asm (__ASMNAME (#alias));
466# define __LDBL_REDIR_DECL(name) \498# define __LDBL_REDIR_DECL(name) \
...@@ -471,11 +503,13 @@...@@ -471,11 +503,13 @@
471 __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)503 __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
472# endif504# endif
473#endif505#endif
474#if !defined __LDBL_COMPAT || !defined __REDIRECT506#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
507 || !defined __REDIRECT
475# define __LDBL_REDIR1(name, proto, alias) name proto508# define __LDBL_REDIR1(name, proto, alias) name proto
476# define __LDBL_REDIR(name, proto) name proto509# define __LDBL_REDIR(name, proto) name proto
477# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW510# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
478# define __LDBL_REDIR_NTH(name, proto) name proto __THROW511# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
512# define __LDBL_REDIR2_DECL(name)
479# define __LDBL_REDIR_DECL(name)513# define __LDBL_REDIR_DECL(name)
480# ifdef __REDIRECT514# ifdef __REDIRECT
481# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)515# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
...@@ -514,4 +548,15 @@...@@ -514,4 +548,15 @@
514# define __HAVE_GENERIC_SELECTION 0548# define __HAVE_GENERIC_SELECTION 0
515#endif549#endif
516550
551#if __GNUC_PREREQ (10, 0)
552/* Designates a 1-based positional argument ref-index of pointer type
553 that can be used to access size-index elements of the pointed-to
554 array according to access mode, or at least one element when
555 size-index is not provided:
556 access (access-mode, <ref-index> [, <size-index>]) */
557#define __attr_access(x) __attribute__ ((__access__ x))
558#else
559# define __attr_access(x)
560#endif
561
517#endif /* sys/cdefs.h */562#endif /* sys/cdefs.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/elf.h+9-5
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 1996-2020 Free Software Foundation, Inc.1/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,14 +12,18 @@...@@ -12,14 +12,18 @@
12 Lesser General Public License for more details.12 Lesser General Public License for more details.
1313
14 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1717
18#ifndef _SYS_ELF_H18#ifndef _SYS_ELF_H
19#define _SYS_ELF_H 119#define _SYS_ELF_H 1
2020
21#warning "This header is obsolete; use <sys/procfs.h> instead."21#ifdef __x86_64__
22# error This header is unsupported on x86-64.
23#else
24# warning "This header is obsolete; use <sys/procfs.h> instead."
2225
23#include <sys/procfs.h>26# include <sys/procfs.h>
27#endif
2428
25#endif /* sys/elf.h */
\ No newline at end of file
29#endif /* _SYS_ELF_H */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/ptrace.h+33-13
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* `ptrace' debugger support interface. Linux version.1/* `ptrace' debugger support interface. Linux/x86 version.
2 Copyright (C) 1996-2020 Free Software Foundation, Inc.2 Copyright (C) 1996-2020 Free Software Foundation, Inc.
33
4 This file is part of the GNU C Library.4 This file is part of the GNU C Library.
...@@ -70,23 +70,19 @@ enum __ptrace_request...@@ -70,23 +70,19 @@ enum __ptrace_request
70 PTRACE_SINGLESTEP = 9,70 PTRACE_SINGLESTEP = 9,
71#define PT_STEP PTRACE_SINGLESTEP71#define PT_STEP PTRACE_SINGLESTEP
7272
73 /* Get all general purpose registers used by a processes.73 /* Get all general purpose registers used by a processes. */
74 This is not supported on all machines. */
75 PTRACE_GETREGS = 12,74 PTRACE_GETREGS = 12,
76#define PT_GETREGS PTRACE_GETREGS75#define PT_GETREGS PTRACE_GETREGS
7776
78 /* Set all general purpose registers used by a processes.77 /* Set all general purpose registers used by a processes. */
79 This is not supported on all machines. */
80 PTRACE_SETREGS = 13,78 PTRACE_SETREGS = 13,
81#define PT_SETREGS PTRACE_SETREGS79#define PT_SETREGS PTRACE_SETREGS
8280
83 /* Get all floating point registers used by a processes.81 /* Get all floating point registers used by a processes. */
84 This is not supported on all machines. */
85 PTRACE_GETFPREGS = 14,82 PTRACE_GETFPREGS = 14,
86#define PT_GETFPREGS PTRACE_GETFPREGS83#define PT_GETFPREGS PTRACE_GETFPREGS
8784
88 /* Set all floating point registers used by a processes.85 /* Set all floating point registers used by a processes. */
89 This is not supported on all machines. */
90 PTRACE_SETFPREGS = 15,86 PTRACE_SETFPREGS = 15,
91#define PT_SETFPREGS PTRACE_SETFPREGS87#define PT_SETFPREGS PTRACE_SETFPREGS
9288
...@@ -98,13 +94,11 @@ enum __ptrace_request...@@ -98,13 +94,11 @@ enum __ptrace_request
98 PTRACE_DETACH = 17,94 PTRACE_DETACH = 17,
99#define PT_DETACH PTRACE_DETACH95#define PT_DETACH PTRACE_DETACH
10096
101 /* Get all extended floating point registers used by a processes.97 /* Get all extended floating point registers used by a processes. */
102 This is not supported on all machines. */
103 PTRACE_GETFPXREGS = 18,98 PTRACE_GETFPXREGS = 18,
104#define PT_GETFPXREGS PTRACE_GETFPXREGS99#define PT_GETFPXREGS PTRACE_GETFPXREGS
105100
106 /* Set all extended floating point registers used by a processes.101 /* Set all extended floating point registers used by a processes. */
107 This is not supported on all machines. */
108 PTRACE_SETFPXREGS = 19,102 PTRACE_SETFPXREGS = 19,
109#define PT_SETFPXREGS PTRACE_SETFPXREGS103#define PT_SETFPXREGS PTRACE_SETFPXREGS
110104
...@@ -112,6 +106,32 @@ enum __ptrace_request...@@ -112,6 +106,32 @@ enum __ptrace_request
112 PTRACE_SYSCALL = 24,106 PTRACE_SYSCALL = 24,
113#define PT_SYSCALL PTRACE_SYSCALL107#define PT_SYSCALL PTRACE_SYSCALL
114108
109 /* Get a TLS entry in the GDT. */
110 PTRACE_GET_THREAD_AREA = 25,
111#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
112
113 /* Change a TLS entry in the GDT. */
114 PTRACE_SET_THREAD_AREA = 26,
115#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
116
117#ifdef __x86_64__
118 /* Access TLS data. */
119 PTRACE_ARCH_PRCTL = 30,
120# define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL
121#endif
122
123 /* Continue and stop at the next syscall, it will not be executed. */
124 PTRACE_SYSEMU = 31,
125#define PT_SYSEMU PTRACE_SYSEMU
126
127 /* Single step the process, the next syscall will not be executed. */
128 PTRACE_SYSEMU_SINGLESTEP = 32,
129#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
130
131 /* Execute process until next taken branch. */
132 PTRACE_SINGLEBLOCK = 33,
133#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
134
115 /* Set ptrace filter options. */135 /* Set ptrace filter options. */
116 PTRACE_SETOPTIONS = 0x4200,136 PTRACE_SETOPTIONS = 0x4200,
117#define PT_SETOPTIONS PTRACE_SETOPTIONS137#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/generic-glibc/sys/random.h+1
...@@ -25,6 +25,7 @@...@@ -25,6 +25,7 @@
25/* Flags for use with getrandom. */25/* Flags for use with getrandom. */
26#define GRND_NONBLOCK 0x0126#define GRND_NONBLOCK 0x01
27#define GRND_RANDOM 0x0227#define GRND_RANDOM 0x02
28#define GRND_INSECURE 0x04
2829
29__BEGIN_DECLS30__BEGIN_DECLS
3031
lib/libc/include/generic-glibc/sys/sysctl.h deleted-76
...@@ -1,76 +0,0 @@
1/* Copyright (C) 1996-2020 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_SYSCTL_H
19#define _SYS_SYSCTL_H 1
20
21#warning "The <sys/sysctl.h> header is deprecated and will be removed."
22
23#include <features.h>
24#define __need_size_t
25#include <stddef.h>
26/* Prevent more kernel headers than necessary to be included. */
27#ifndef _LINUX_KERNEL_H
28# define _LINUX_KERNEL_H 1
29# define __undef_LINUX_KERNEL_H
30#endif
31#ifndef _LINUX_TYPES_H
32# define _LINUX_TYPES_H 1
33# define __undef_LINUX_TYPES_H
34#endif
35#ifndef _LINUX_LIST_H
36# define _LINUX_LIST_H 1
37# define __undef_LINUX_LIST_H
38#endif
39#ifndef __LINUX_COMPILER_H
40# define __LINUX_COMPILER_H 1
41# define __user
42# define __undef__LINUX_COMPILER_H
43#endif
44
45#include <linux/sysctl.h>
46
47#ifdef __undef_LINUX_KERNEL_H
48# undef _LINUX_KERNEL_H
49# undef __undef_LINUX_KERNEL_H
50#endif
51#ifdef __undef_LINUX_TYPES_H
52# undef _LINUX_TYPES_H
53# undef __undef_LINUX_TYPES_H
54#endif
55#ifdef __undef_LINUX_LIST_H
56# undef _LINUX_LIST_H
57# undef __undef_LINUX_LIST_H
58#endif
59#ifdef __undef__LINUX_COMPILER_H
60# undef __LINUX_COMPILER_H
61# undef __user
62# undef __undef__LINUX_COMPILER_H
63#endif
64
65#include <bits/sysctl.h>
66
67__BEGIN_DECLS
68
69/* Read or write system parameters. */
70extern int sysctl (int *__name, int __nlen, void *__oldval,
71 size_t *__oldlenp, void *__newval, size_t __newlen) __THROW
72 __attribute_deprecated__;
73
74__END_DECLS
75
76#endif /* _SYS_SYSCTL_H */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/syslog.h+3-1
...@@ -206,7 +206,9 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)...@@ -206,7 +206,9 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
206#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function206#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
207# include <bits/syslog.h>207# include <bits/syslog.h>
208#endif208#endif
209#ifdef __LDBL_COMPAT209
210#include <bits/floatn.h>
211#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
210# include <bits/syslog-ldbl.h>212# include <bits/syslog-ldbl.h>
211#endif213#endif
212214
lib/libc/include/generic-glibc/sys/ucontext.h+201-63
...@@ -1,4 +1,5 @@...@@ -1,4 +1,5 @@
1/* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library.1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
23
3 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public5 modify it under the terms of the GNU Lesser General Public
...@@ -11,103 +12,236 @@...@@ -11,103 +12,236 @@
11 Lesser General Public License for more details.12 Lesser General Public License for more details.
1213
13 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
14 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
15 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1617
17/* Don't rely on this, the interface is currently messed up and may need to
18 be broken to be fixed. */
19#ifndef _SYS_UCONTEXT_H18#ifndef _SYS_UCONTEXT_H
20#define _SYS_UCONTEXT_H 119#define _SYS_UCONTEXT_H 1
2120
22#include <features.h>21#include <features.h>
2322
23#include <bits/types.h>
24#include <bits/types/sigset_t.h>24#include <bits/types/sigset_t.h>
25#include <bits/types/stack_t.h>25#include <bits/types/stack_t.h>
2626
27#include <sgidefs.h>
2827
28#ifdef __USE_MISC
29# define __ctx(fld) fld
30#else
31# define __ctx(fld) __ ## fld
32#endif
33
34#ifdef __x86_64__
2935
30/* Type for general register. Even in o32 we assume 64-bit registers,36/* Type for general register. */
31 like the kernel. */37__extension__ typedef long long int greg_t;
32__extension__ typedef unsigned long long int greg_t;
3338
34/* Number of general registers. */39/* Number of general registers. */
35#define __NGREG 3240#define __NGREG 23
36#define __NFPREG 32
37#ifdef __USE_MISC41#ifdef __USE_MISC
38# define NGREG __NGREG42# define NGREG __NGREG
39# define NFPREG __NFPREG
40#endif43#endif
4144
42/* Container for all general registers. */45/* Container for all general registers. */
43typedef greg_t gregset_t[__NGREG];46typedef greg_t gregset_t[__NGREG];
4447
45#ifdef __USE_MISC48#ifdef __USE_GNU
46# define __ctx(fld) fld49/* Number of each register in the `gregset_t' array. */
47#else50enum
48# define __ctx(fld) __ ## fld51{
52 REG_R8 = 0,
53# define REG_R8 REG_R8
54 REG_R9,
55# define REG_R9 REG_R9
56 REG_R10,
57# define REG_R10 REG_R10
58 REG_R11,
59# define REG_R11 REG_R11
60 REG_R12,
61# define REG_R12 REG_R12
62 REG_R13,
63# define REG_R13 REG_R13
64 REG_R14,
65# define REG_R14 REG_R14
66 REG_R15,
67# define REG_R15 REG_R15
68 REG_RDI,
69# define REG_RDI REG_RDI
70 REG_RSI,
71# define REG_RSI REG_RSI
72 REG_RBP,
73# define REG_RBP REG_RBP
74 REG_RBX,
75# define REG_RBX REG_RBX
76 REG_RDX,
77# define REG_RDX REG_RDX
78 REG_RAX,
79# define REG_RAX REG_RAX
80 REG_RCX,
81# define REG_RCX REG_RCX
82 REG_RSP,
83# define REG_RSP REG_RSP
84 REG_RIP,
85# define REG_RIP REG_RIP
86 REG_EFL,
87# define REG_EFL REG_EFL
88 REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */
89# define REG_CSGSFS REG_CSGSFS
90 REG_ERR,
91# define REG_ERR REG_ERR
92 REG_TRAPNO,
93# define REG_TRAPNO REG_TRAPNO
94 REG_OLDMASK,
95# define REG_OLDMASK REG_OLDMASK
96 REG_CR2
97# define REG_CR2 REG_CR2
98};
49#endif99#endif
50100
51/* Container for all FPU registers. */101struct _libc_fpxreg
52typedef struct {102{
53 union {103 unsigned short int __ctx(significand)[4];
54 double __ctx(fp_dregs)[__NFPREG];104 unsigned short int __ctx(exponent);
55 struct {105 unsigned short int __glibc_reserved1[3];
56 float _fp_fregs;106};
57 unsigned int _fp_pad;107
58 } __ctx(fp_fregs)[__NFPREG];108struct _libc_xmmreg
59 } __ctx(fp_r);109{
60} fpregset_t;110 __uint32_t __ctx(element)[4];
111};
61112
113struct _libc_fpstate
114{
115 /* 64-bit FXSAVE format. */
116 __uint16_t __ctx(cwd);
117 __uint16_t __ctx(swd);
118 __uint16_t __ctx(ftw);
119 __uint16_t __ctx(fop);
120 __uint64_t __ctx(rip);
121 __uint64_t __ctx(rdp);
122 __uint32_t __ctx(mxcsr);
123 __uint32_t __ctx(mxcr_mask);
124 struct _libc_fpxreg _st[8];
125 struct _libc_xmmreg _xmm[16];
126 __uint32_t __glibc_reserved1[24];
127};
128
129/* Structure to describe FPU registers. */
130typedef struct _libc_fpstate *fpregset_t;
62131
63/* Context to describe whole processor state. */132/* Context to describe whole processor state. */
64#if _MIPS_SIM == _ABIO32
65/* Earlier versions of glibc for mips had an entirely different
66 definition of mcontext_t, that didn't even resemble the
67 corresponding kernel data structure. Fortunately, makecontext,
68 [gs]etcontext et all were not implemented back then, so this can
69 still be rectified. */
70typedef struct133typedef struct
71 {134 {
72 unsigned int __ctx(regmask);
73 unsigned int __ctx(status);
74 greg_t __ctx(pc);
75 gregset_t __ctx(gregs);135 gregset_t __ctx(gregs);
136 /* Note that fpregs is a pointer. */
76 fpregset_t __ctx(fpregs);137 fpregset_t __ctx(fpregs);
77 unsigned int __ctx(fp_owned);138 __extension__ unsigned long long __reserved1 [8];
78 unsigned int __ctx(fpc_csr);139} mcontext_t;
79 unsigned int __ctx(fpc_eir);140
80 unsigned int __ctx(used_math);141/* Userlevel context. */
81 unsigned int __ctx(dsp);142typedef struct ucontext_t
82 greg_t __ctx(mdhi);143 {
83 greg_t __ctx(mdlo);144 unsigned long int __ctx(uc_flags);
84 unsigned long __ctx(hi1);145 struct ucontext_t *uc_link;
85 unsigned long __ctx(lo1);146 stack_t uc_stack;
86 unsigned long __ctx(hi2);147 mcontext_t uc_mcontext;
87 unsigned long __ctx(lo2);148 sigset_t uc_sigmask;
88 unsigned long __ctx(hi3);149 struct _libc_fpstate __fpregs_mem;
89 unsigned long __ctx(lo3);150 __extension__ unsigned long long int __ssp[4];
90 } mcontext_t;151 } ucontext_t;
91#else152
153#else /* !__x86_64__ */
154
155/* Type for general register. */
156typedef int greg_t;
157
158/* Number of general registers. */
159#define __NGREG 19
160#ifdef __USE_MISC
161# define NGREG __NGREG
162#endif
163
164/* Container for all general registers. */
165typedef greg_t gregset_t[__NGREG];
166
167#ifdef __USE_GNU
168/* Number of each register is the `gregset_t' array. */
169enum
170{
171 REG_GS = 0,
172# define REG_GS REG_GS
173 REG_FS,
174# define REG_FS REG_FS
175 REG_ES,
176# define REG_ES REG_ES
177 REG_DS,
178# define REG_DS REG_DS
179 REG_EDI,
180# define REG_EDI REG_EDI
181 REG_ESI,
182# define REG_ESI REG_ESI
183 REG_EBP,
184# define REG_EBP REG_EBP
185 REG_ESP,
186# define REG_ESP REG_ESP
187 REG_EBX,
188# define REG_EBX REG_EBX
189 REG_EDX,
190# define REG_EDX REG_EDX
191 REG_ECX,
192# define REG_ECX REG_ECX
193 REG_EAX,
194# define REG_EAX REG_EAX
195 REG_TRAPNO,
196# define REG_TRAPNO REG_TRAPNO
197 REG_ERR,
198# define REG_ERR REG_ERR
199 REG_EIP,
200# define REG_EIP REG_EIP
201 REG_CS,
202# define REG_CS REG_CS
203 REG_EFL,
204# define REG_EFL REG_EFL
205 REG_UESP,
206# define REG_UESP REG_UESP
207 REG_SS
208# define REG_SS REG_SS
209};
210#endif
211
212/* Definitions taken from the kernel headers. */
213struct _libc_fpreg
214{
215 unsigned short int __ctx(significand)[4];
216 unsigned short int __ctx(exponent);
217};
218
219struct _libc_fpstate
220{
221 unsigned long int __ctx(cw);
222 unsigned long int __ctx(sw);
223 unsigned long int __ctx(tag);
224 unsigned long int __ctx(ipoff);
225 unsigned long int __ctx(cssel);
226 unsigned long int __ctx(dataoff);
227 unsigned long int __ctx(datasel);
228 struct _libc_fpreg _st[8];
229 unsigned long int __ctx(status);
230};
231
232/* Structure to describe FPU registers. */
233typedef struct _libc_fpstate *fpregset_t;
234
235/* Context to describe whole processor state. */
92typedef struct236typedef struct
93 {237 {
94 gregset_t __ctx(gregs);238 gregset_t __ctx(gregs);
239 /* Due to Linux's history we have to use a pointer here. The SysV/i386
240 ABI requires a struct with the values. */
95 fpregset_t __ctx(fpregs);241 fpregset_t __ctx(fpregs);
96 greg_t __ctx(mdhi);242 unsigned long int __ctx(oldmask);
97 greg_t __ctx(hi1);243 unsigned long int __ctx(cr2);
98 greg_t __ctx(hi2);
99 greg_t __ctx(hi3);
100 greg_t __ctx(mdlo);
101 greg_t __ctx(lo1);
102 greg_t __ctx(lo2);
103 greg_t __ctx(lo3);
104 greg_t __ctx(pc);
105 unsigned int __ctx(fpc_csr);
106 unsigned int __ctx(used_math);
107 unsigned int __ctx(dsp);
108 unsigned int __glibc_reserved1;
109 } mcontext_t;244 } mcontext_t;
110#endif
111245
112/* Userlevel context. */246/* Userlevel context. */
113typedef struct ucontext_t247typedef struct ucontext_t
...@@ -117,8 +251,12 @@ typedef struct ucontext_t...@@ -117,8 +251,12 @@ typedef struct ucontext_t
117 stack_t uc_stack;251 stack_t uc_stack;
118 mcontext_t uc_mcontext;252 mcontext_t uc_mcontext;
119 sigset_t uc_sigmask;253 sigset_t uc_sigmask;
254 struct _libc_fpstate __fpregs_mem;
255 unsigned long int __ssp[4];
120 } ucontext_t;256 } ucontext_t;
121257
258#endif /* !__x86_64__ */
259
122#undef __ctx260#undef __ctx
123261
124#endif /* sys/ucontext.h */262#endif /* sys/ucontext.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/user.h+145-175
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
33
4 The GNU C Library is free software; you can redistribute it and/or4 The GNU C Library is free software; you can redistribute it and/or
...@@ -12,199 +12,169 @@...@@ -12,199 +12,169 @@
12 Lesser General Public License for more details.12 Lesser General Public License for more details.
1313
14 You should have received a copy of the GNU Lesser General Public14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */16 <https://www.gnu.org/licenses/>. */
1717
18#ifndef _SYS_USER_H18#ifndef _SYS_USER_H
19#define _SYS_USER_H 119#define _SYS_USER_H 1
2020
21#include <sgidefs.h>
22#include <stddef.h>
23
24/* The whole purpose of this file is for GDB and GDB only. Don't read21/* The whole purpose of this file is for GDB and GDB only. Don't read
25 too much into it. Don't use it for anything other than GDB unless22 too much into it. Don't use it for anything other than GDB unless
26 you know what you are doing. */23 you know what you are doing. */
2724
28/* #include <asm/reg.h> */25#ifdef __x86_64__
29/* Instead of including the kernel header, that will vary depending on
30 whether the 32- or the 64-bit kernel is installed, we paste its
31 contents here. Note that the fact that the file is inline here,
32 instead of included separately, doesn't change in any way the
33 licensing status of a program that includes user.h. Since this is
34 for gdb alone, and gdb is GPLed, no surprises here. */
35#if _MIPS_SIM == _ABIO32
36/*
37 * Various register offset definitions for debuggers, core file
38 * examiners and whatnot.
39 *
40 * This file is subject to the terms and conditions of the GNU General Public
41 * License. See the file "COPYING" in the main directory of this archive
42 * for more details.
43 *
44 * Copyright (C) 1995, 1999 by Ralf Baechle
45 */
46#ifndef __ASM_MIPS_REG_H
47#define __ASM_MIPS_REG_H
48
49/*
50 * This defines/structures correspond to the register layout on stack -
51 * if the order here is changed, it needs to be updated in
52 * include/asm-mips/stackframe.h
53 */
54#define EF_REG0 6
55#define EF_REG1 7
56#define EF_REG2 8
57#define EF_REG3 9
58#define EF_REG4 10
59#define EF_REG5 11
60#define EF_REG6 12
61#define EF_REG7 13
62#define EF_REG8 14
63#define EF_REG9 15
64#define EF_REG10 16
65#define EF_REG11 17
66#define EF_REG12 18
67#define EF_REG13 19
68#define EF_REG14 20
69#define EF_REG15 21
70#define EF_REG16 22
71#define EF_REG17 23
72#define EF_REG18 24
73#define EF_REG19 25
74#define EF_REG20 26
75#define EF_REG21 27
76#define EF_REG22 28
77#define EF_REG23 29
78#define EF_REG24 30
79#define EF_REG25 31
80/*
81 * k0/k1 unsaved
82 */
83#define EF_REG28 34
84#define EF_REG29 35
85#define EF_REG30 36
86#define EF_REG31 37
87
88/*
89 * Saved special registers
90 */
91#define EF_LO 38
92#define EF_HI 39
93
94#define EF_CP0_EPC 40
95#define EF_CP0_BADVADDR 41
96#define EF_CP0_STATUS 42
97#define EF_CP0_CAUSE 43
98
99#define EF_SIZE 180 /* size in bytes */
100
101#endif /* __ASM_MIPS_REG_H */
102
103#else /* _MIPS_SIM != _ABIO32 */
104
105/*
106 * Various register offset definitions for debuggers, core file
107 * examiners and whatnot.
108 *
109 * This file is subject to the terms and conditions of the GNU General Public
110 * License. See the file "COPYING" in the main directory of this archive
111 * for more details.
112 *
113 * Copyright (C) 1995, 1999 Ralf Baechle
114 * Copyright (C) 1995, 1999 Silicon Graphics
115 */
116#ifndef _ASM_REG_H
117#define _ASM_REG_H
118
119/*
120 * This defines/structures correspond to the register layout on stack -
121 * if the order here is changed, it needs to be updated in
122 * include/asm-mips/stackframe.h
123 */
124#define EF_REG0 0
125#define EF_REG1 1
126#define EF_REG2 2
127#define EF_REG3 3
128#define EF_REG4 4
129#define EF_REG5 5
130#define EF_REG6 6
131#define EF_REG7 7
132#define EF_REG8 8
133#define EF_REG9 9
134#define EF_REG10 10
135#define EF_REG11 11
136#define EF_REG12 12
137#define EF_REG13 13
138#define EF_REG14 14
139#define EF_REG15 15
140#define EF_REG16 16
141#define EF_REG17 17
142#define EF_REG18 18
143#define EF_REG19 19
144#define EF_REG20 20
145#define EF_REG21 21
146#define EF_REG22 22
147#define EF_REG23 23
148#define EF_REG24 24
149#define EF_REG25 25
150/*
151 * k0/k1 unsaved
152 */
153#define EF_REG28 28
154#define EF_REG29 29
155#define EF_REG30 30
156#define EF_REG31 31
157
158/*
159 * Saved special registers
160 */
161#define EF_LO 32
162#define EF_HI 33
163
164#define EF_CP0_EPC 34
165#define EF_CP0_BADVADDR 35
166#define EF_CP0_STATUS 36
167#define EF_CP0_CAUSE 37
168
169#define EF_SIZE 304 /* size in bytes */
170
171#endif /* _ASM_REG_H */
17226
173#endif /* _MIPS_SIM != _ABIO32 */27struct user_fpregs_struct
28{
29 unsigned short int cwd;
30 unsigned short int swd;
31 unsigned short int ftw;
32 unsigned short int fop;
33 __extension__ unsigned long long int rip;
34 __extension__ unsigned long long int rdp;
35 unsigned int mxcsr;
36 unsigned int mxcr_mask;
37 unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
38 unsigned int xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
39 unsigned int padding[24];
40};
17441
175#if _MIPS_SIM == _ABIO3242struct user_regs_struct
43{
44 __extension__ unsigned long long int r15;
45 __extension__ unsigned long long int r14;
46 __extension__ unsigned long long int r13;
47 __extension__ unsigned long long int r12;
48 __extension__ unsigned long long int rbp;
49 __extension__ unsigned long long int rbx;
50 __extension__ unsigned long long int r11;
51 __extension__ unsigned long long int r10;
52 __extension__ unsigned long long int r9;
53 __extension__ unsigned long long int r8;
54 __extension__ unsigned long long int rax;
55 __extension__ unsigned long long int rcx;
56 __extension__ unsigned long long int rdx;
57 __extension__ unsigned long long int rsi;
58 __extension__ unsigned long long int rdi;
59 __extension__ unsigned long long int orig_rax;
60 __extension__ unsigned long long int rip;
61 __extension__ unsigned long long int cs;
62 __extension__ unsigned long long int eflags;
63 __extension__ unsigned long long int rsp;
64 __extension__ unsigned long long int ss;
65 __extension__ unsigned long long int fs_base;
66 __extension__ unsigned long long int gs_base;
67 __extension__ unsigned long long int ds;
68 __extension__ unsigned long long int es;
69 __extension__ unsigned long long int fs;
70 __extension__ unsigned long long int gs;
71};
17672
177struct user73struct user
178{74{
179 unsigned long regs[EF_SIZE/4+64]; /* integer and fp regs */75 struct user_regs_struct regs;
180 size_t u_tsize; /* text size (pages) */76 int u_fpvalid;
181 size_t u_dsize; /* data size (pages) */77 struct user_fpregs_struct i387;
182 size_t u_ssize; /* stack size (pages) */78 __extension__ unsigned long long int u_tsize;
183 unsigned long start_code; /* text starting address */79 __extension__ unsigned long long int u_dsize;
184 unsigned long start_data; /* data starting address */80 __extension__ unsigned long long int u_ssize;
185 unsigned long start_stack; /* stack starting address */81 __extension__ unsigned long long int start_code;
186 long int signal; /* signal causing core dump */82 __extension__ unsigned long long int start_stack;
187 void* u_ar0; /* help gdb find registers */83 __extension__ long long int signal;
188 unsigned long magic; /* identifies a core file */84 int reserved;
189 char u_comm[32]; /* user command name */85 __extension__ union
86 {
87 struct user_regs_struct* u_ar0;
88 __extension__ unsigned long long int __u_ar0_word;
89 };
90 __extension__ union
91 {
92 struct user_fpregs_struct* u_fpstate;
93 __extension__ unsigned long long int __u_fpstate_word;
94 };
95 __extension__ unsigned long long int magic;
96 char u_comm [32];
97 __extension__ unsigned long long int u_debugreg [8];
190};98};
19199
192#else100#else
101/* These are the 32-bit x86 structures. */
102struct user_fpregs_struct
103{
104 long int cwd;
105 long int swd;
106 long int twd;
107 long int fip;
108 long int fcs;
109 long int foo;
110 long int fos;
111 long int st_space [20];
112};
193113
194struct user {114struct user_fpxregs_struct
195 __extension__ unsigned long regs[EF_SIZE/8+64]; /* integer and fp regs */115{
196 __extension__ unsigned long u_tsize; /* text size (pages) */116 unsigned short int cwd;
197 __extension__ unsigned long u_dsize; /* data size (pages) */117 unsigned short int swd;
198 __extension__ unsigned long u_ssize; /* stack size (pages) */118 unsigned short int twd;
199 __extension__ unsigned long long start_code; /* text starting address */119 unsigned short int fop;
200 __extension__ unsigned long long start_data; /* data starting address */120 long int fip;
201 __extension__ unsigned long long start_stack; /* stack starting address */121 long int fcs;
202 __extension__ long long signal; /* signal causing core dump */122 long int foo;
203 __extension__ unsigned long long u_ar0; /* help gdb find registers */123 long int fos;
204 __extension__ unsigned long long magic; /* identifies a core file */124 long int mxcsr;
205 char u_comm[32]; /* user command name */125 long int reserved;
126 long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
127 long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
128 long int padding[56];
206};129};
207130
208#endif131struct user_regs_struct
132{
133 long int ebx;
134 long int ecx;
135 long int edx;
136 long int esi;
137 long int edi;
138 long int ebp;
139 long int eax;
140 long int xds;
141 long int xes;
142 long int xfs;
143 long int xgs;
144 long int orig_eax;
145 long int eip;
146 long int xcs;
147 long int eflags;
148 long int esp;
149 long int xss;
150};
151
152struct user
153{
154 struct user_regs_struct regs;
155 int u_fpvalid;
156 struct user_fpregs_struct i387;
157 unsigned long int u_tsize;
158 unsigned long int u_dsize;
159 unsigned long int u_ssize;
160 unsigned long int start_code;
161 unsigned long int start_stack;
162 long int signal;
163 int reserved;
164 struct user_regs_struct* u_ar0;
165 struct user_fpregs_struct* u_fpstate;
166 unsigned long int magic;
167 char u_comm [32];
168 int u_debugreg [8];
169};
170#endif /* __x86_64__ */
171
172#define PAGE_SHIFT 12
173#define PAGE_SIZE (1UL << PAGE_SHIFT)
174#define PAGE_MASK (~(PAGE_SIZE-1))
175#define NBPG PAGE_SIZE
176#define UPAGES 1
177#define HOST_TEXT_START_ADDR (u.start_code)
178#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
209179
210#endif /* _SYS_USER_H */180#endif /* _SYS_USER_H */
\ No newline at end of file
lib/libc/include/generic-glibc/threads.h+5-8
...@@ -24,7 +24,7 @@...@@ -24,7 +24,7 @@
2424
25__BEGIN_DECLS25__BEGIN_DECLS
2626
27#include <bits/pthreadtypes-arch.h>27#include <bits/thread-shared-types.h>
28#include <bits/types/struct_timespec.h>28#include <bits/types/struct_timespec.h>
2929
30#ifndef __cplusplus30#ifndef __cplusplus
...@@ -32,10 +32,10 @@ __BEGIN_DECLS...@@ -32,10 +32,10 @@ __BEGIN_DECLS
32#endif32#endif
3333
34#define TSS_DTOR_ITERATIONS 434#define TSS_DTOR_ITERATIONS 4
35typedef unsigned int tss_t;35typedef __tss_t tss_t;
36typedef void (*tss_dtor_t) (void*);36typedef void (*tss_dtor_t) (void*);
3737
38typedef unsigned long int thrd_t;38typedef __thrd_t thrd_t;
39typedef int (*thrd_start_t) (void*);39typedef int (*thrd_start_t) (void*);
4040
41/* Exit and error codes. */41/* Exit and error codes. */
...@@ -56,11 +56,8 @@ enum...@@ -56,11 +56,8 @@ enum
56 mtx_timed = 256 mtx_timed = 2
57};57};
5858
59typedef struct59typedef __once_flag once_flag;
60{60#define ONCE_FLAG_INIT __ONCE_FLAG_INIT
61 int __data __ONCE_ALIGNMENT;
62} once_flag;
63#define ONCE_FLAG_INIT { 0 }
6461
65typedef union62typedef union
66{63{
lib/libc/include/generic-glibc/unistd.h+41-24
...@@ -357,13 +357,15 @@ extern int close (int __fd);...@@ -357,13 +357,15 @@ extern int close (int __fd);
357357
358 This function is a cancellation point and therefore not marked with358 This function is a cancellation point and therefore not marked with
359 __THROW. */359 __THROW. */
360extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur;360extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
361 __attr_access ((__write_only__, 2, 3));
361362
362/* Write N bytes of BUF to FD. Return the number written, or -1.363/* Write N bytes of BUF to FD. Return the number written, or -1.
363364
364 This function is a cancellation point and therefore not marked with365 This function is a cancellation point and therefore not marked with
365 __THROW. */366 __THROW. */
366extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur;367extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
368 __attr_access ((__read_only__, 2, 3));
367369
368#if defined __USE_UNIX98 || defined __USE_XOPEN2K8370#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
369# ifndef __USE_FILE_OFFSET64371# ifndef __USE_FILE_OFFSET64
...@@ -374,7 +376,8 @@ extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur;...@@ -374,7 +376,8 @@ extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur;
374 This function is a cancellation point and therefore not marked with376 This function is a cancellation point and therefore not marked with
375 __THROW. */377 __THROW. */
376extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,378extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
377 __off_t __offset) __wur;379 __off_t __offset) __wur
380 __attr_access ((__write_only__, 2, 3));
378381
379/* Write N bytes of BUF to FD at the given position OFFSET without382/* Write N bytes of BUF to FD at the given position OFFSET without
380 changing the file pointer. Return the number written, or -1.383 changing the file pointer. Return the number written, or -1.
...@@ -382,15 +385,19 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,...@@ -382,15 +385,19 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
382 This function is a cancellation point and therefore not marked with385 This function is a cancellation point and therefore not marked with
383 __THROW. */386 __THROW. */
384extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,387extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
385 __off_t __offset) __wur;388 __off_t __offset) __wur
389 __attr_access ((__read_only__, 2, 3));
390
386# else391# else
387# ifdef __REDIRECT392# ifdef __REDIRECT
388extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,393extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
389 __off64_t __offset),394 __off64_t __offset),
390 pread64) __wur;395 pread64) __wur
396 __attr_access ((__write_only__, 2, 3));
391extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,397extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
392 size_t __nbytes, __off64_t __offset),398 size_t __nbytes, __off64_t __offset),
393 pwrite64) __wur;399 pwrite64) __wur
400 __attr_access ((__read_only__, 2, 3));
394# else401# else
395# define pread pread64402# define pread pread64
396# define pwrite pwrite64403# define pwrite pwrite64
...@@ -402,11 +409,13 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,...@@ -402,11 +409,13 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
402 changing the file pointer. Return the number read, -1 for errors409 changing the file pointer. Return the number read, -1 for errors
403 or 0 for EOF. */410 or 0 for EOF. */
404extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,411extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
405 __off64_t __offset) __wur;412 __off64_t __offset) __wur
413 __attr_access ((__write_only__, 2, 3));
406/* Write N bytes of BUF to FD at the given position OFFSET without414/* Write N bytes of BUF to FD at the given position OFFSET without
407 changing the file pointer. Return the number written, or -1. */415 changing the file pointer. Return the number written, or -1. */
408extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,416extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
409 __off64_t __offset) __wur;417 __off64_t __offset) __wur
418 __attr_access ((__read_only__, 2, 3));
410# endif419# endif
411#endif420#endif
412421
...@@ -508,7 +517,8 @@ extern int fchdir (int __fd) __THROW __wur;...@@ -508,7 +517,8 @@ extern int fchdir (int __fd) __THROW __wur;
508 an array is allocated with `malloc'; the array is SIZE517 an array is allocated with `malloc'; the array is SIZE
509 bytes long, unless SIZE == 0, in which case it is as518 bytes long, unless SIZE == 0, in which case it is as
510 big as necessary. */519 big as necessary. */
511extern char *getcwd (char *__buf, size_t __size) __THROW __wur;520extern char *getcwd (char *__buf, size_t __size) __THROW __wur
521 __attr_access ((__write_only__, 1, 2));
512522
513#ifdef __USE_GNU523#ifdef __USE_GNU
514/* Return a malloc'd string containing the current directory name.524/* Return a malloc'd string containing the current directory name.
...@@ -523,7 +533,8 @@ extern char *get_current_dir_name (void) __THROW;...@@ -523,7 +533,8 @@ extern char *get_current_dir_name (void) __THROW;
523 If successful, return BUF. If not, put an error message in533 If successful, return BUF. If not, put an error message in
524 BUF and return NULL. BUF should be at least PATH_MAX bytes long. */534 BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
525extern char *getwd (char *__buf)535extern char *getwd (char *__buf)
526 __THROW __nonnull ((1)) __attribute_deprecated__ __wur;536 __THROW __nonnull ((1)) __attribute_deprecated__ __wur
537 __attr_access ((__write_only__, 1));
527#endif538#endif
528539
529540
...@@ -620,7 +631,8 @@ extern long int sysconf (int __name) __THROW;...@@ -620,7 +631,8 @@ extern long int sysconf (int __name) __THROW;
620631
621#ifdef __USE_POSIX2632#ifdef __USE_POSIX2
622/* Get the value of the string-valued system variable NAME. */633/* Get the value of the string-valued system variable NAME. */
623extern size_t confstr (int __name, char *__buf, size_t __len) __THROW;634extern size_t confstr (int __name, char *__buf, size_t __len) __THROW
635 __attr_access ((__write_only__, 2, 3));
624#endif636#endif
625637
626638
...@@ -686,8 +698,8 @@ extern __gid_t getegid (void) __THROW;...@@ -686,8 +698,8 @@ extern __gid_t getegid (void) __THROW;
686/* If SIZE is zero, return the number of supplementary groups698/* If SIZE is zero, return the number of supplementary groups
687 the calling process is in. Otherwise, fill in the group IDs699 the calling process is in. Otherwise, fill in the group IDs
688 of its supplementary groups in LIST and return the number written. */700 of its supplementary groups in LIST and return the number written. */
689extern int getgroups (int __size, __gid_t __list[]) __THROW __wur;701extern int getgroups (int __size, __gid_t __list[]) __THROW __wur
690702 __attr_access ((__write_only__, 2, 1));
691#ifdef __USE_GNU703#ifdef __USE_GNU
692/* Return nonzero iff the calling process is in group GID. */704/* Return nonzero iff the calling process is in group GID. */
693extern int group_member (__gid_t __gid) __THROW;705extern int group_member (__gid_t __gid) __THROW;
...@@ -772,7 +784,7 @@ extern char *ttyname (int __fd) __THROW;...@@ -772,7 +784,7 @@ extern char *ttyname (int __fd) __THROW;
772/* Store at most BUFLEN characters of the pathname of the terminal FD is784/* Store at most BUFLEN characters of the pathname of the terminal FD is
773 open on in BUF. Return 0 on success, otherwise an error number. */785 open on in BUF. Return 0 on success, otherwise an error number. */
774extern int ttyname_r (int __fd, char *__buf, size_t __buflen)786extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
775 __THROW __nonnull ((2)) __wur;787 __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3));
776788
777/* Return 1 if FD is a valid descriptor associated789/* Return 1 if FD is a valid descriptor associated
778 with a terminal, zero if not. */790 with a terminal, zero if not. */
...@@ -807,7 +819,8 @@ extern int symlink (const char *__from, const char *__to)...@@ -807,7 +819,8 @@ extern int symlink (const char *__from, const char *__to)
807 Returns the number of characters read, or -1 for errors. */819 Returns the number of characters read, or -1 for errors. */
808extern ssize_t readlink (const char *__restrict __path,820extern ssize_t readlink (const char *__restrict __path,
809 char *__restrict __buf, size_t __len)821 char *__restrict __buf, size_t __len)
810 __THROW __nonnull ((1, 2)) __wur;822 __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3));
823
811#endif /* Use POSIX.1-2001. */824#endif /* Use POSIX.1-2001. */
812825
813#ifdef __USE_ATFILE826#ifdef __USE_ATFILE
...@@ -818,7 +831,7 @@ extern int symlinkat (const char *__from, int __tofd,...@@ -818,7 +831,7 @@ extern int symlinkat (const char *__from, int __tofd,
818/* Like readlink but a relative PATH is interpreted relative to FD. */831/* Like readlink but a relative PATH is interpreted relative to FD. */
819extern ssize_t readlinkat (int __fd, const char *__restrict __path,832extern ssize_t readlinkat (int __fd, const char *__restrict __path,
820 char *__restrict __buf, size_t __len)833 char *__restrict __buf, size_t __len)
821 __THROW __nonnull ((2, 3)) __wur;834 __THROW __nonnull ((2, 3)) __wur __attr_access ((__read_only__, 3, 4));
822#endif835#endif
823836
824/* Remove the link NAME. */837/* Remove the link NAME. */
...@@ -853,7 +866,8 @@ extern char *getlogin (void);...@@ -853,7 +866,8 @@ extern char *getlogin (void);
853866
854 This function is a possible cancellation point and therefore not867 This function is a possible cancellation point and therefore not
855 marked with __THROW. */868 marked with __THROW. */
856extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1));869extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1))
870 __attr_access ((__write_only__, 1, 2));
857#endif871#endif
858872
859#ifdef __USE_MISC873#ifdef __USE_MISC
...@@ -874,7 +888,8 @@ extern int setlogin (const char *__name) __THROW __nonnull ((1));...@@ -874,7 +888,8 @@ extern int setlogin (const char *__name) __THROW __nonnull ((1));
874/* Put the name of the current host in no more than LEN bytes of NAME.888/* Put the name of the current host in no more than LEN bytes of NAME.
875 The result is null-terminated if LEN is large enough for the full889 The result is null-terminated if LEN is large enough for the full
876 name and the terminator. */890 name and the terminator. */
877extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));891extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1))
892 __attr_access ((__write_only__, 1, 2));
878#endif893#endif
879894
880895
...@@ -882,7 +897,7 @@ extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));...@@ -882,7 +897,7 @@ extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));
882/* Set the name of the current host to NAME, which is LEN bytes long.897/* Set the name of the current host to NAME, which is LEN bytes long.
883 This call is restricted to the super-user. */898 This call is restricted to the super-user. */
884extern int sethostname (const char *__name, size_t __len)899extern int sethostname (const char *__name, size_t __len)
885 __THROW __nonnull ((1)) __wur;900 __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2));
886901
887/* Set the current machine's Internet number to ID.902/* Set the current machine's Internet number to ID.
888 This call is restricted to the super-user. */903 This call is restricted to the super-user. */
...@@ -893,10 +908,9 @@ extern int sethostid (long int __id) __THROW __wur;...@@ -893,10 +908,9 @@ extern int sethostid (long int __id) __THROW __wur;
893 Called just like `gethostname' and `sethostname'.908 Called just like `gethostname' and `sethostname'.
894 The NIS domain name is usually the empty string when not using NIS. */909 The NIS domain name is usually the empty string when not using NIS. */
895extern int getdomainname (char *__name, size_t __len)910extern int getdomainname (char *__name, size_t __len)
896 __THROW __nonnull ((1)) __wur;911 __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2));
897extern int setdomainname (const char *__name, size_t __len)912extern int setdomainname (const char *__name, size_t __len)
898 __THROW __nonnull ((1)) __wur;913 __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2));
899
900914
901/* Revoke access permissions to all processes currently communicating915/* Revoke access permissions to all processes currently communicating
902 with the control terminal, and then send a SIGHUP signal to the process916 with the control terminal, and then send a SIGHUP signal to the process
...@@ -1131,7 +1145,9 @@ extern char *crypt (const char *__key, const char *__salt)...@@ -1131,7 +1145,9 @@ extern char *crypt (const char *__key, const char *__salt)
1131 range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM1145 range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
1132 is without partner. */1146 is without partner. */
1133extern void swab (const void *__restrict __from, void *__restrict __to,1147extern void swab (const void *__restrict __from, void *__restrict __to,
1134 ssize_t __n) __THROW __nonnull ((1, 2));1148 ssize_t __n) __THROW __nonnull ((1, 2))
1149 __attr_access ((__read_only__, 1, 3))
1150 __attr_access ((__write_only__, 2, 3));
1135#endif1151#endif
11361152
11371153
...@@ -1158,7 +1174,8 @@ extern int pthread_atfork (void (*__prepare) (void),...@@ -1158,7 +1174,8 @@ extern int pthread_atfork (void (*__prepare) (void),
1158#ifdef __USE_MISC1174#ifdef __USE_MISC
1159/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on1175/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on
1160 success or -1 on error. */1176 success or -1 on error. */
1161int getentropy (void *__buffer, size_t __length) __wur;1177int getentropy (void *__buffer, size_t __length) __wur
1178 __attr_access ((__write_only__, 1, 2));
1162#endif1179#endif
11631180
1164/* Define some macros helping to catch buffer overflows. */1181/* Define some macros helping to catch buffer overflows. */
lib/libc/include/generic-glibc/wchar.h+9-5
...@@ -633,9 +633,11 @@ extern int swscanf (const wchar_t *__restrict __s,...@@ -633,9 +633,11 @@ extern int swscanf (const wchar_t *__restrict __s,
633 __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;633 __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
634634
635/* For historical reasons, the C99-compliant versions of the scanf635/* For historical reasons, the C99-compliant versions of the scanf
636 functions are at alternative names. When __LDBL_COMPAT is in636 functions are at alternative names. When __LDBL_COMPAT or
637 effect, this is handled in bits/wchar-ldbl.h. */637 __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in
638#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT638 bits/wchar-ldbl.h. */
639#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
640 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
639# ifdef __REDIRECT641# ifdef __REDIRECT
640extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,642extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
641 const wchar_t *__restrict __format, ...),643 const wchar_t *__restrict __format, ...),
...@@ -688,7 +690,8 @@ extern int vswscanf (const wchar_t *__restrict __s,...@@ -688,7 +690,8 @@ extern int vswscanf (const wchar_t *__restrict __s,
688/* Same redirection as above for the v*wscanf family. */690/* Same redirection as above for the v*wscanf family. */
689# if !__GLIBC_USE (DEPRECATED_SCANF) \691# if !__GLIBC_USE (DEPRECATED_SCANF) \
690 && (!defined __LDBL_COMPAT || !defined __REDIRECT) \692 && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
691 && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)693 && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \
694 && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
692# ifdef __REDIRECT695# ifdef __REDIRECT
693extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,696extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
694 const wchar_t *__restrict __format,697 const wchar_t *__restrict __format,
...@@ -849,7 +852,8 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,...@@ -849,7 +852,8 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
849# include <bits/wchar2.h>852# include <bits/wchar2.h>
850#endif853#endif
851854
852#ifdef __LDBL_COMPAT855#include <bits/floatn.h>
856#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
853# include <bits/wchar-ldbl.h>857# include <bits/wchar-ldbl.h>
854#endif858#endif
855859
lib/libc/include/i386-linux-gnu/bits/fenv.h-54
...@@ -113,58 +113,4 @@ femode_t;...@@ -113,58 +113,4 @@ femode_t;
113113
114/* Default floating-point control modes. */114/* Default floating-point control modes. */
115# define FE_DFL_MODE ((const femode_t *) -1L)115# define FE_DFL_MODE ((const femode_t *) -1L)
116#endif
117
118
119#ifdef __USE_EXTERN_INLINES
120__BEGIN_DECLS
121
122/* Optimized versions. */
123#ifndef _LIBC
124extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
125#endif
126__extern_always_inline void
127__NTH (__feraiseexcept_invalid_divbyzero (int __excepts))
128{
129 if ((FE_INVALID & __excepts) != 0)
130 {
131 /* One example of an invalid operation is 0.0 / 0.0. */
132 float __f = 0.0;
133
134# ifdef __SSE_MATH__
135 __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
136# else
137 __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait"
138 : "=t" (__f) : "0" (__f));
139# endif
140 (void) &__f;
141 }
142 if ((FE_DIVBYZERO & __excepts) != 0)
143 {
144 float __f = 1.0;
145 float __g = 0.0;
146
147# ifdef __SSE_MATH__
148 __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
149# else
150 __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
151 : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
152# endif
153 (void) &__f;
154 }
155}
156__extern_inline int
157__NTH (feraiseexcept (int __excepts))
158{
159 if (__builtin_constant_p (__excepts)
160 && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
161 {
162 __feraiseexcept_invalid_divbyzero (__excepts);
163 return 0;
164 }
165
166 return __feraiseexcept_renamed (__excepts);
167}
168
169__END_DECLS
170#endif116#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/long-double.h+1-1
...@@ -18,4 +18,4 @@...@@ -18,4 +18,4 @@
1818
19/* long double is distinct from double, so there is nothing to19/* long double is distinct from double, so there is nothing to
20 define here. */20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/select.h+8-34
...@@ -19,45 +19,19 @@...@@ -19,45 +19,19 @@
19# error "Never use <bits/select.h> directly; include <sys/select.h> instead."19# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
20#endif20#endif
2121
22#include <bits/wordsize.h>
23
24
25#if defined __GNUC__ && __GNUC__ >= 2
26
27# if __WORDSIZE == 64
28# define __FD_ZERO_STOS "stosq"
29# else
30# define __FD_ZERO_STOS "stosl"
31# endif
32
33# define __FD_ZERO(fdsp) \
34 do { \
35 int __d0, __d1; \
36 __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \
37 : "=c" (__d0), "=D" (__d1) \
38 : "a" (0), "0" (sizeof (fd_set) \
39 / sizeof (__fd_mask)), \
40 "1" (&__FDS_BITS (fdsp)[0]) \
41 : "memory"); \
42 } while (0)
43
44#else /* ! GNU CC */
4522
46/* We don't use `memset' because this would require a prototype and23/* We don't use `memset' because this would require a prototype and
47 the array isn't too big. */24 the array isn't too big. */
48# define __FD_ZERO(set) \25#define __FD_ZERO(s) \
49 do { \26 do { \
50 unsigned int __i; \27 unsigned int __i; \
51 fd_set *__arr = (set); \28 fd_set *__arr = (s); \
52 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \29 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
53 __FDS_BITS (__arr)[__i] = 0; \30 __FDS_BITS (__arr)[__i] = 0; \
54 } while (0)31 } while (0)
55
56#endif /* GNU CC */
57
58#define __FD_SET(d, set) \
59 ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
60#define __FD_CLR(d, set) \
61 ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
62#define __FD_ISSET(d, set) \
63 ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
\ No newline at end of file
32#define __FD_SET(d, s) \
33 ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
34#define __FD_CLR(d, s) \
35 ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
36#define __FD_ISSET(d, s) \
37 ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. x86 version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 1
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/semaphore.h+2-3
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
...@@ -28,7 +28,6 @@...@@ -28,7 +28,6 @@
28# define __SIZEOF_SEM_T 1628# define __SIZEOF_SEM_T 16
29#endif29#endif
3030
31
32/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
33#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
3433
lib/libc/include/i386-linux-gnu/bits/sysctl.h deleted-20
...@@ -1,20 +0,0 @@
1/* Copyright (C) 2012-2020 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#if defined __x86_64__ && defined __ILP32__
19# error "sysctl system call is unsupported in x32 kernel"
20#endif
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/typesizes.h+6
...@@ -64,6 +64,7 @@...@@ -64,6 +64,7 @@
64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -87,10 +88,15 @@...@@ -87,10 +88,15 @@
8788
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */89/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 190# define __STATFS_MATCHES_STATFS64 1
91
92/* And for getitimer, setitimer and rusage */
93# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
90#else94#else
91# define __RLIM_T_MATCHES_RLIM64_T 095# define __RLIM_T_MATCHES_RLIM64_T 0
9296
93# define __STATFS_MATCHES_STATFS64 097# define __STATFS_MATCHES_STATFS64 0
98
99# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
94#endif100#endif
95101
96/* Number of descriptors that can fit in an `fd_set'. */102/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/mips-linux-gnu/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#ifdef __MIPSEL__
26# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
27# define __MSQ_PAD_BEFORE_TIME 0
28#else
29# define __MSQ_PAD_AFTER_TIME 0
30# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
31#endif
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/mips-linux-gnu/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 0
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/shm-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#define __SHM_PAD_AFTER_TIME 0
24#define __SHM_PAD_BEFORE_TIME 0
25#define __SHM_SEGSZ_AFTER_TIME 0
26#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/signum.h deleted-68
...@@ -1,68 +0,0 @@
1/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/MIPS. */
30
31#define SIGEMT 7 /* Emulator trap. */
32#define SIGPWR 19 /* Power failure imminent. */
33
34#undef SIGUSR1
35#define SIGUSR1 16
36#undef SIGUSR2
37#define SIGUSR2 17
38#undef SIGCHLD
39#define SIGCHLD 18
40#undef SIGWINCH
41#define SIGWINCH 20
42#undef SIGURG
43#define SIGURG 21
44#undef SIGPOLL
45#define SIGPOLL 22
46#undef SIGSTOP
47#define SIGSTOP 23
48#undef SIGTSTP
49#define SIGTSTP 24
50#undef SIGCONT
51#define SIGCONT 25
52#undef SIGTTIN
53#define SIGTTIN 26
54#undef SIGTTOU
55#define SIGTTOU 27
56#undef SIGVTALRM
57#define SIGVTALRM 28
58#undef SIGPROF
59#define SIGPROF 29
60#undef SIGXCPU
61#define SIGXCPU 30
62#undef SIGXFSZ
63#define SIGXFSZ 31
64
65#undef __SIGRTMAX
66#define __SIGRTMAX 127
67
68#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#ifdef __MIPSEL__
26# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
27# define __MSQ_PAD_BEFORE_TIME 0
28#else
29# define __MSQ_PAD_AFTER_TIME 0
30# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
31#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 0
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#define __SHM_PAD_AFTER_TIME 0
24#define __SHM_PAD_BEFORE_TIME 0
25#define __SHM_SEGSZ_AFTER_TIME 0
26#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/signum.h deleted-68
...@@ -1,68 +0,0 @@
1/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/MIPS. */
30
31#define SIGEMT 7 /* Emulator trap. */
32#define SIGPWR 19 /* Power failure imminent. */
33
34#undef SIGUSR1
35#define SIGUSR1 16
36#undef SIGUSR2
37#define SIGUSR2 17
38#undef SIGCHLD
39#define SIGCHLD 18
40#undef SIGWINCH
41#define SIGWINCH 20
42#undef SIGURG
43#define SIGURG 21
44#undef SIGPOLL
45#define SIGPOLL 22
46#undef SIGSTOP
47#define SIGSTOP 23
48#undef SIGTSTP
49#define SIGTSTP 24
50#undef SIGCONT
51#define SIGCONT 25
52#undef SIGTTIN
53#define SIGTTIN 26
54#undef SIGTTOU
55#define SIGTTOU 27
56#undef SIGVTALRM
57#define SIGVTALRM 28
58#undef SIGPROF
59#define SIGPROF 29
60#undef SIGXCPU
61#define SIGXCPU 30
62#undef SIGXFSZ
63#define SIGXFSZ 31
64
65#undef __SIGRTMAX
66#define __SIGRTMAX 127
67
68#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#ifdef __MIPSEL__
26# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
27# define __MSQ_PAD_BEFORE_TIME 0
28#else
29# define __MSQ_PAD_AFTER_TIME 0
30# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
31#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 0
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#define __SHM_PAD_AFTER_TIME 0
24#define __SHM_PAD_BEFORE_TIME 0
25#define __SHM_SEGSZ_AFTER_TIME 0
26#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/signum.h deleted-68
...@@ -1,68 +0,0 @@
1/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/MIPS. */
30
31#define SIGEMT 7 /* Emulator trap. */
32#define SIGPWR 19 /* Power failure imminent. */
33
34#undef SIGUSR1
35#define SIGUSR1 16
36#undef SIGUSR2
37#define SIGUSR2 17
38#undef SIGCHLD
39#define SIGCHLD 18
40#undef SIGWINCH
41#define SIGWINCH 20
42#undef SIGURG
43#define SIGURG 21
44#undef SIGPOLL
45#define SIGPOLL 22
46#undef SIGSTOP
47#define SIGSTOP 23
48#undef SIGTSTP
49#define SIGTSTP 24
50#undef SIGCONT
51#define SIGCONT 25
52#undef SIGTTIN
53#define SIGTTIN 26
54#undef SIGTTOU
55#define SIGTTOU 27
56#undef SIGVTALRM
57#define SIGVTALRM 28
58#undef SIGPROF
59#define SIGPROF 29
60#undef SIGXCPU
61#define SIGXCPU 30
62#undef SIGXFSZ
63#define SIGXFSZ 31
64
65#undef __SIGRTMAX
66#define __SIGRTMAX 127
67
68#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#ifdef __MIPSEL__
26# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
27# define __MSQ_PAD_BEFORE_TIME 0
28#else
29# define __MSQ_PAD_AFTER_TIME 0
30# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
31#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 0
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#define __SHM_PAD_AFTER_TIME 0
24#define __SHM_PAD_BEFORE_TIME 0
25#define __SHM_SEGSZ_AFTER_TIME 0
26#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h deleted-68
...@@ -1,68 +0,0 @@
1/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/MIPS. */
30
31#define SIGEMT 7 /* Emulator trap. */
32#define SIGPWR 19 /* Power failure imminent. */
33
34#undef SIGUSR1
35#define SIGUSR1 16
36#undef SIGUSR2
37#define SIGUSR2 17
38#undef SIGCHLD
39#define SIGCHLD 18
40#undef SIGWINCH
41#define SIGWINCH 20
42#undef SIGURG
43#define SIGURG 21
44#undef SIGPOLL
45#define SIGPOLL 22
46#undef SIGSTOP
47#define SIGSTOP 23
48#undef SIGTSTP
49#define SIGTSTP 24
50#undef SIGCONT
51#define SIGCONT 25
52#undef SIGTTIN
53#define SIGTTIN 26
54#undef SIGTTOU
55#define SIGTTOU 27
56#undef SIGVTALRM
57#define SIGVTALRM 28
58#undef SIGPROF
59#define SIGPROF 29
60#undef SIGXCPU
61#define SIGXCPU 30
62#undef SIGXFSZ
63#define SIGXFSZ 31
64
65#undef __SIGRTMAX
66#define __SIGRTMAX 127
67
68#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#ifdef __MIPSEL__
26# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
27# define __MSQ_PAD_BEFORE_TIME 0
28#else
29# define __MSQ_PAD_AFTER_TIME 0
30# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
31#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 0
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#define __SHM_PAD_AFTER_TIME 0
24#define __SHM_PAD_BEFORE_TIME 0
25#define __SHM_SEGSZ_AFTER_TIME 0
26#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h deleted-68
...@@ -1,68 +0,0 @@
1/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/MIPS. */
30
31#define SIGEMT 7 /* Emulator trap. */
32#define SIGPWR 19 /* Power failure imminent. */
33
34#undef SIGUSR1
35#define SIGUSR1 16
36#undef SIGUSR2
37#define SIGUSR2 17
38#undef SIGCHLD
39#define SIGCHLD 18
40#undef SIGWINCH
41#define SIGWINCH 20
42#undef SIGURG
43#define SIGURG 21
44#undef SIGPOLL
45#define SIGPOLL 22
46#undef SIGSTOP
47#define SIGSTOP 23
48#undef SIGTSTP
49#define SIGTSTP 24
50#undef SIGCONT
51#define SIGCONT 25
52#undef SIGTTIN
53#define SIGTTIN 26
54#undef SIGTTOU
55#define SIGTTOU 27
56#undef SIGVTALRM
57#define SIGVTALRM 28
58#undef SIGPROF
59#define SIGPROF 29
60#undef SIGXCPU
61#define SIGXCPU 30
62#undef SIGXFSZ
63#define SIGXFSZ 31
64
65#undef __SIGRTMAX
66#define __SIGRTMAX 127
67
68#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h deleted-31
...@@ -1,31 +0,0 @@
1/* Define where padding goes in struct msqid_ds. MIPS version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#ifdef __MIPSEL__
26# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
27# define __MSQ_PAD_BEFORE_TIME 0
28#else
29# define __MSQ_PAD_AFTER_TIME 0
30# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
31#endif
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. MIPS version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 0
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct shmid_ds. MIPS version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#define __SHM_PAD_AFTER_TIME 0
24#define __SHM_PAD_BEFORE_TIME 0
25#define __SHM_SEGSZ_AFTER_TIME 0
26#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/signum.h deleted-68
...@@ -1,68 +0,0 @@
1/* Signal number definitions. Linux/MIPS version.
2 Copyright (C) 1995-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/MIPS. */
30
31#define SIGEMT 7 /* Emulator trap. */
32#define SIGPWR 19 /* Power failure imminent. */
33
34#undef SIGUSR1
35#define SIGUSR1 16
36#undef SIGUSR2
37#define SIGUSR2 17
38#undef SIGCHLD
39#define SIGCHLD 18
40#undef SIGWINCH
41#define SIGWINCH 20
42#undef SIGURG
43#define SIGURG 21
44#undef SIGPOLL
45#define SIGPOLL 22
46#undef SIGSTOP
47#define SIGSTOP 23
48#undef SIGTSTP
49#define SIGTSTP 24
50#undef SIGCONT
51#define SIGCONT 25
52#undef SIGTTIN
53#define SIGTTIN 26
54#undef SIGTTOU
55#define SIGTTOU 27
56#undef SIGVTALRM
57#define SIGVTALRM 28
58#undef SIGPROF
59#define SIGPROF 29
60#undef SIGXCPU
61#define SIGXCPU 30
62#undef SIGXFSZ
63#define SIGXFSZ 31
64
65#undef __SIGRTMAX
66#define __SIGRTMAX 127
67
68#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h deleted-102
...@@ -1,102 +0,0 @@
1/* Inline floating-point environment handling functions for powerpc.
2 Copyright (C) 1995-2020 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 __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
20
21/* Inline definitions for fegetround. */
22# define __fegetround_ISA300() \
23 (__extension__ ({ \
24 union { double __d; unsigned long long __ll; } __u; \
25 __asm__ __volatile__ ( \
26 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
27 : "=f" (__u.__d)); \
28 __u.__ll & 0x0000000000000003LL; \
29 }))
30
31# define __fegetround_ISA2() \
32 (__extension__ ({ \
33 int __fegetround_result; \
34 __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
35 : "=r"(__fegetround_result) : : "cr7"); \
36 __fegetround_result & 3; \
37 }))
38
39# ifdef _ARCH_PWR9
40# define __fegetround() __fegetround_ISA300()
41# elif defined __BUILTIN_CPU_SUPPORTS__
42# define __fegetround() \
43 (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
44 ? __fegetround_ISA300() \
45 : __fegetround_ISA2() \
46 )
47# else
48# define __fegetround() __fegetround_ISA2()
49# endif
50
51# define fegetround() __fegetround ()
52
53# ifndef __NO_MATH_INLINES
54/* The weird 'i#*X' constraints on the following suppress a gcc
55 warning when __excepts is not a constant. Otherwise, they mean the
56 same as just plain 'i'. */
57
58# if __GNUC_PREREQ(3, 4)
59
60/* Inline definition for feraiseexcept. */
61# define feraiseexcept(__excepts) \
62 (__extension__ ({ \
63 int __e = __excepts; \
64 int __ret; \
65 if (__builtin_constant_p (__e) \
66 && (__e & (__e - 1)) == 0 \
67 && __e != FE_INVALID) \
68 { \
69 if (__e != 0) \
70 __asm__ __volatile__ ("mtfsb1 %0" \
71 : : "i#*X" (__builtin_clz (__e))); \
72 __ret = 0; \
73 } \
74 else \
75 __ret = feraiseexcept (__e); \
76 __ret; \
77 }))
78
79/* Inline definition for feclearexcept. */
80# define feclearexcept(__excepts) \
81 (__extension__ ({ \
82 int __e = __excepts; \
83 int __ret; \
84 if (__builtin_constant_p (__e) \
85 && (__e & (__e - 1)) == 0 \
86 && __e != FE_INVALID) \
87 { \
88 if (__e != 0) \
89 __asm__ __volatile__ ("mtfsb0 %0" \
90 : : "i#*X" (__builtin_clz (__e))); \
91 __ret = 0; \
92 } \
93 else \
94 __ret = feclearexcept (__e); \
95 __ret; \
96 }))
97
98# endif /* __GNUC_PREREQ(3, 4). */
99
100# endif /* !__NO_MATH_INLINES. */
101
102#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/hwcap.h+3-1
...@@ -73,4 +73,6 @@...@@ -73,4 +73,6 @@
73#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */73#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */
74#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */74#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */
75#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended75#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended
76 state. */
\ No newline at end of file
76 state. */
77#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */
78#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h+1-1
...@@ -20,7 +20,7 @@...@@ -20,7 +20,7 @@
20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
21#endif21#endif
2222
23#ifdef __NO_LONG_DOUBLE_MATH23#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
24# define iscanonical(x) ((void) (__typeof (x)) (x), 1)24# define iscanonical(x) ((void) (__typeof (x)) (x), 1)
25#else25#else
26extern int __iscanonicall (long double __x)26extern int __iscanonicall (long double __x)
lib/libc/include/powerpc-linux-gnu/bits/long-double.h+1-1
...@@ -22,4 +22,4 @@...@@ -22,4 +22,4 @@
22# define __NO_LONG_DOUBLE_MATH 122# define __NO_LONG_DOUBLE_MATH 1
23# endif23# endif
24#endif24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
25#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct msqid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __MSQ_PAD_AFTER_TIME 0
26#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct semid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SEM_PAD_AFTER_TIME 0
26#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/semaphore.h+2-3
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1/* Machine-specific POSIX semaphore type layouts. PowerPC version.1/* Generic POSIX semaphore type layout
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
4 Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
54
6 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h deleted-28
...@@ -1,28 +0,0 @@
1/* Define where padding goes in struct shmid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SHM_PAD_AFTER_TIME 0
26#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32)
27#define __SHM_SEGSZ_AFTER_TIME 1
28#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h-2
...@@ -19,8 +19,6 @@...@@ -19,8 +19,6 @@
19#define LIBNSS_FILES_SO "libnss_files.so.2"19#define LIBNSS_FILES_SO "libnss_files.so.2"
20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"20#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"21#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
22#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
23#define LIBNSS_NIS_SO "libnss_nis.so.2"
24#define LIBNSS_TEST1_SO "libnss_test1.so.2"22#define LIBNSS_TEST1_SO "libnss_test1.so.2"
25#define LIBNSS_TEST2_SO "libnss_test2.so.2"23#define LIBNSS_TEST2_SO "libnss_test2.so.2"
26#define LIBPTHREAD_SO "libpthread.so.0"24#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/powerpc-linux-gnu/ieee754.h+66-2
...@@ -21,6 +21,7 @@...@@ -21,6 +21,7 @@
21#include <features.h>21#include <features.h>
2222
23#include <bits/endian.h>23#include <bits/endian.h>
24#include <bits/floatn.h>
2425
25__BEGIN_DECLS26__BEGIN_DECLS
2627
...@@ -111,6 +112,65 @@ union ieee754_double...@@ -111,6 +112,65 @@ union ieee754_double
111#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */112#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
112113
113114
115#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
116/* long double is IEEE 128 bit */
117union ieee854_long_double
118 {
119 long double d;
120
121 /* This is the IEEE 854 quad-precision format. */
122 struct
123 {
124#if __BYTE_ORDER == __BIG_ENDIAN
125 unsigned int negative:1;
126 unsigned int exponent:15;
127 /* Together these comprise the mantissa. */
128 unsigned int mantissa0:16;
129 unsigned int mantissa1:32;
130 unsigned int mantissa2:32;
131 unsigned int mantissa3:32;
132#endif /* Big endian. */
133#if __BYTE_ORDER == __LITTLE_ENDIAN
134 /* Together these comprise the mantissa. */
135 unsigned int mantissa3:32;
136 unsigned int mantissa2:32;
137 unsigned int mantissa1:32;
138 unsigned int mantissa0:16;
139 unsigned int exponent:15;
140 unsigned int negative:1;
141#endif /* Little endian. */
142 } ieee;
143
144 /* This format makes it easier to see if a NaN is a signalling NaN. */
145 struct
146 {
147#if __BYTE_ORDER == __BIG_ENDIAN
148 unsigned int negative:1;
149 unsigned int exponent:15;
150 unsigned int quiet_nan:1;
151 /* Together these comprise the mantissa. */
152 unsigned int mantissa0:15;
153 unsigned int mantissa1:32;
154 unsigned int mantissa2:32;
155 unsigned int mantissa3:32;
156#else
157 /* Together these comprise the mantissa. */
158 unsigned int mantissa3:32;
159 unsigned int mantissa2:32;
160 unsigned int mantissa1:32;
161 unsigned int mantissa0:15;
162 unsigned int quiet_nan:1;
163 unsigned int exponent:15;
164 unsigned int negative:1;
165#endif
166 } ieee_nan;
167 };
168
169#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
170#endif
171
172
173#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0)
114/* IBM extended format for long double.174/* IBM extended format for long double.
115175
116 Each long double is made up of two IEEE doubles. The value of the176 Each long double is made up of two IEEE doubles. The value of the
...@@ -121,12 +181,16 @@ union ieee754_double...@@ -121,12 +181,16 @@ union ieee754_double
121 -0.0. No other requirements are made; so, for example, 1.0 may be181 -0.0. No other requirements are made; so, for example, 1.0 may be
122 represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a182 represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
123 NaN is don't-care. */183 NaN is don't-care. */
124
125union ibm_extended_long_double184union ibm_extended_long_double
126 {185 {
127 long double ld;186# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0)
187 __ibm128 ld;
188# else
189 long double ld;
190# endif
128 union ieee754_double d[2];191 union ieee754_double d[2];
129 };192 };
193#endif
130194
131__END_DECLS195__END_DECLS
132196
lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h deleted-102
...@@ -1,102 +0,0 @@
1/* Inline floating-point environment handling functions for powerpc.
2 Copyright (C) 1995-2020 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 __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
20
21/* Inline definitions for fegetround. */
22# define __fegetround_ISA300() \
23 (__extension__ ({ \
24 union { double __d; unsigned long long __ll; } __u; \
25 __asm__ __volatile__ ( \
26 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
27 : "=f" (__u.__d)); \
28 __u.__ll & 0x0000000000000003LL; \
29 }))
30
31# define __fegetround_ISA2() \
32 (__extension__ ({ \
33 int __fegetround_result; \
34 __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
35 : "=r"(__fegetround_result) : : "cr7"); \
36 __fegetround_result & 3; \
37 }))
38
39# ifdef _ARCH_PWR9
40# define __fegetround() __fegetround_ISA300()
41# elif defined __BUILTIN_CPU_SUPPORTS__
42# define __fegetround() \
43 (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
44 ? __fegetround_ISA300() \
45 : __fegetround_ISA2() \
46 )
47# else
48# define __fegetround() __fegetround_ISA2()
49# endif
50
51# define fegetround() __fegetround ()
52
53# ifndef __NO_MATH_INLINES
54/* The weird 'i#*X' constraints on the following suppress a gcc
55 warning when __excepts is not a constant. Otherwise, they mean the
56 same as just plain 'i'. */
57
58# if __GNUC_PREREQ(3, 4)
59
60/* Inline definition for feraiseexcept. */
61# define feraiseexcept(__excepts) \
62 (__extension__ ({ \
63 int __e = __excepts; \
64 int __ret; \
65 if (__builtin_constant_p (__e) \
66 && (__e & (__e - 1)) == 0 \
67 && __e != FE_INVALID) \
68 { \
69 if (__e != 0) \
70 __asm__ __volatile__ ("mtfsb1 %0" \
71 : : "i#*X" (__builtin_clz (__e))); \
72 __ret = 0; \
73 } \
74 else \
75 __ret = feraiseexcept (__e); \
76 __ret; \
77 }))
78
79/* Inline definition for feclearexcept. */
80# define feclearexcept(__excepts) \
81 (__extension__ ({ \
82 int __e = __excepts; \
83 int __ret; \
84 if (__builtin_constant_p (__e) \
85 && (__e & (__e - 1)) == 0 \
86 && __e != FE_INVALID) \
87 { \
88 if (__e != 0) \
89 __asm__ __volatile__ ("mtfsb0 %0" \
90 : : "i#*X" (__builtin_clz (__e))); \
91 __ret = 0; \
92 } \
93 else \
94 __ret = feclearexcept (__e); \
95 __ret; \
96 }))
97
98# endif /* __GNUC_PREREQ(3, 4). */
99
100# endif /* !__NO_MATH_INLINES. */
101
102#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h+3-1
...@@ -73,4 +73,6 @@...@@ -73,4 +73,6 @@
73#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */73#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */
74#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */74#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */
75#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended75#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended
76 state. */
\ No newline at end of file
76 state. */
77#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */
78#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h+1-1
...@@ -20,7 +20,7 @@...@@ -20,7 +20,7 @@
20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
21#endif21#endif
2222
23#ifdef __NO_LONG_DOUBLE_MATH23#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
24# define iscanonical(x) ((void) (__typeof (x)) (x), 1)24# define iscanonical(x) ((void) (__typeof (x)) (x), 1)
25#else25#else
26extern int __iscanonicall (long double __x)26extern int __iscanonicall (long double __x)
lib/libc/include/powerpc64-linux-gnu/bits/long-double.h+1-1
...@@ -22,4 +22,4 @@...@@ -22,4 +22,4 @@
22# define __NO_LONG_DOUBLE_MATH 122# define __NO_LONG_DOUBLE_MATH 1
23# endif23# endif
24#endif24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
25#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct msqid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __MSQ_PAD_AFTER_TIME 0
26#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct semid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SEM_PAD_AFTER_TIME 0
26#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h+2-3
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1/* Machine-specific POSIX semaphore type layouts. PowerPC version.1/* Generic POSIX semaphore type layout
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
4 Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
54
6 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h deleted-28
...@@ -1,28 +0,0 @@
1/* Define where padding goes in struct shmid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SHM_PAD_AFTER_TIME 0
26#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32)
27#define __SHM_SEGSZ_AFTER_TIME 1
28#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h-2
...@@ -10,9 +10,7 @@...@@ -10,9 +10,7 @@
10#define __stub_chflags10#define __stub_chflags
11#define __stub_fchflags11#define __stub_fchflags
12#define __stub_gtty12#define __stub_gtty
13#define __stub_lchmod
14#define __stub_revoke13#define __stub_revoke
15#define __stub_setlogin14#define __stub_setlogin
16#define __stub_sigreturn15#define __stub_sigreturn
17#define __stub_sstk
18#define __stub_stty16#define __stub_stty
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/ieee754.h+66-2
...@@ -21,6 +21,7 @@...@@ -21,6 +21,7 @@
21#include <features.h>21#include <features.h>
2222
23#include <bits/endian.h>23#include <bits/endian.h>
24#include <bits/floatn.h>
2425
25__BEGIN_DECLS26__BEGIN_DECLS
2627
...@@ -111,6 +112,65 @@ union ieee754_double...@@ -111,6 +112,65 @@ union ieee754_double
111#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */112#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
112113
113114
115#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
116/* long double is IEEE 128 bit */
117union ieee854_long_double
118 {
119 long double d;
120
121 /* This is the IEEE 854 quad-precision format. */
122 struct
123 {
124#if __BYTE_ORDER == __BIG_ENDIAN
125 unsigned int negative:1;
126 unsigned int exponent:15;
127 /* Together these comprise the mantissa. */
128 unsigned int mantissa0:16;
129 unsigned int mantissa1:32;
130 unsigned int mantissa2:32;
131 unsigned int mantissa3:32;
132#endif /* Big endian. */
133#if __BYTE_ORDER == __LITTLE_ENDIAN
134 /* Together these comprise the mantissa. */
135 unsigned int mantissa3:32;
136 unsigned int mantissa2:32;
137 unsigned int mantissa1:32;
138 unsigned int mantissa0:16;
139 unsigned int exponent:15;
140 unsigned int negative:1;
141#endif /* Little endian. */
142 } ieee;
143
144 /* This format makes it easier to see if a NaN is a signalling NaN. */
145 struct
146 {
147#if __BYTE_ORDER == __BIG_ENDIAN
148 unsigned int negative:1;
149 unsigned int exponent:15;
150 unsigned int quiet_nan:1;
151 /* Together these comprise the mantissa. */
152 unsigned int mantissa0:15;
153 unsigned int mantissa1:32;
154 unsigned int mantissa2:32;
155 unsigned int mantissa3:32;
156#else
157 /* Together these comprise the mantissa. */
158 unsigned int mantissa3:32;
159 unsigned int mantissa2:32;
160 unsigned int mantissa1:32;
161 unsigned int mantissa0:15;
162 unsigned int quiet_nan:1;
163 unsigned int exponent:15;
164 unsigned int negative:1;
165#endif
166 } ieee_nan;
167 };
168
169#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
170#endif
171
172
173#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0)
114/* IBM extended format for long double.174/* IBM extended format for long double.
115175
116 Each long double is made up of two IEEE doubles. The value of the176 Each long double is made up of two IEEE doubles. The value of the
...@@ -121,12 +181,16 @@ union ieee754_double...@@ -121,12 +181,16 @@ union ieee754_double
121 -0.0. No other requirements are made; so, for example, 1.0 may be181 -0.0. No other requirements are made; so, for example, 1.0 may be
122 represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a182 represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
123 NaN is don't-care. */183 NaN is don't-care. */
124
125union ibm_extended_long_double184union ibm_extended_long_double
126 {185 {
127 long double ld;186# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0)
187 __ibm128 ld;
188# else
189 long double ld;
190# endif
128 union ieee754_double d[2];191 union ieee754_double d[2];
129 };192 };
193#endif
130194
131__END_DECLS195__END_DECLS
132196
lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h deleted-102
...@@ -1,102 +0,0 @@
1/* Inline floating-point environment handling functions for powerpc.
2 Copyright (C) 1995-2020 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 __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
20
21/* Inline definitions for fegetround. */
22# define __fegetround_ISA300() \
23 (__extension__ ({ \
24 union { double __d; unsigned long long __ll; } __u; \
25 __asm__ __volatile__ ( \
26 ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
27 : "=f" (__u.__d)); \
28 __u.__ll & 0x0000000000000003LL; \
29 }))
30
31# define __fegetround_ISA2() \
32 (__extension__ ({ \
33 int __fegetround_result; \
34 __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
35 : "=r"(__fegetround_result) : : "cr7"); \
36 __fegetround_result & 3; \
37 }))
38
39# ifdef _ARCH_PWR9
40# define __fegetround() __fegetround_ISA300()
41# elif defined __BUILTIN_CPU_SUPPORTS__
42# define __fegetround() \
43 (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
44 ? __fegetround_ISA300() \
45 : __fegetround_ISA2() \
46 )
47# else
48# define __fegetround() __fegetround_ISA2()
49# endif
50
51# define fegetround() __fegetround ()
52
53# ifndef __NO_MATH_INLINES
54/* The weird 'i#*X' constraints on the following suppress a gcc
55 warning when __excepts is not a constant. Otherwise, they mean the
56 same as just plain 'i'. */
57
58# if __GNUC_PREREQ(3, 4)
59
60/* Inline definition for feraiseexcept. */
61# define feraiseexcept(__excepts) \
62 (__extension__ ({ \
63 int __e = __excepts; \
64 int __ret; \
65 if (__builtin_constant_p (__e) \
66 && (__e & (__e - 1)) == 0 \
67 && __e != FE_INVALID) \
68 { \
69 if (__e != 0) \
70 __asm__ __volatile__ ("mtfsb1 %0" \
71 : : "i#*X" (__builtin_clz (__e))); \
72 __ret = 0; \
73 } \
74 else \
75 __ret = feraiseexcept (__e); \
76 __ret; \
77 }))
78
79/* Inline definition for feclearexcept. */
80# define feclearexcept(__excepts) \
81 (__extension__ ({ \
82 int __e = __excepts; \
83 int __ret; \
84 if (__builtin_constant_p (__e) \
85 && (__e & (__e - 1)) == 0 \
86 && __e != FE_INVALID) \
87 { \
88 if (__e != 0) \
89 __asm__ __volatile__ ("mtfsb0 %0" \
90 : : "i#*X" (__builtin_clz (__e))); \
91 __ret = 0; \
92 } \
93 else \
94 __ret = feclearexcept (__e); \
95 __ret; \
96 }))
97
98# endif /* __GNUC_PREREQ(3, 4). */
99
100# endif /* !__NO_MATH_INLINES. */
101
102#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h+3-1
...@@ -73,4 +73,6 @@...@@ -73,4 +73,6 @@
73#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */73#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */
74#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */74#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */
75#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended75#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended
76 state. */
\ No newline at end of file
76 state. */
77#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */
78#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h+1-1
...@@ -20,7 +20,7 @@...@@ -20,7 +20,7 @@
20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."20# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
21#endif21#endif
2222
23#ifdef __NO_LONG_DOUBLE_MATH23#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
24# define iscanonical(x) ((void) (__typeof (x)) (x), 1)24# define iscanonical(x) ((void) (__typeof (x)) (x), 1)
25#else25#else
26extern int __iscanonicall (long double __x)26extern int __iscanonicall (long double __x)
lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h+3-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Properties of long double type. ldbl-opt version.1/* Properties of long double type. ldbl-opt version.
2 Copyright (C) 2016-2020 Free Software Foundation, Inc.2 Copyright (C) 2019-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -22,4 +22,5 @@...@@ -22,4 +22,5 @@
22# define __NO_LONG_DOUBLE_MATH 122# define __NO_LONG_DOUBLE_MATH 1
23# endif23# endif
24#endif24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
25
26#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI (__LDBL_MANT_DIG__ == 113)
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct msqid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __MSQ_PAD_AFTER_TIME 0
26#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct semid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SEM_PAD_AFTER_TIME 0
26#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h+2-3
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1/* Machine-specific POSIX semaphore type layouts. PowerPC version.1/* Generic POSIX semaphore type layout
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
4 Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
54
6 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h deleted-28
...@@ -1,28 +0,0 @@
1/* Define where padding goes in struct shmid_ds. PowerPC version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SHM_PAD_AFTER_TIME 0
26#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32)
27#define __SHM_SEGSZ_AFTER_TIME 1
28#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h-2
...@@ -10,9 +10,7 @@...@@ -10,9 +10,7 @@
10#define __stub_chflags10#define __stub_chflags
11#define __stub_fchflags11#define __stub_fchflags
12#define __stub_gtty12#define __stub_gtty
13#define __stub_lchmod
14#define __stub_revoke13#define __stub_revoke
15#define __stub_setlogin14#define __stub_setlogin
16#define __stub_sigreturn15#define __stub_sigreturn
17#define __stub_sstk
18#define __stub_stty16#define __stub_stty
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/ieee754.h+66-2
...@@ -21,6 +21,7 @@...@@ -21,6 +21,7 @@
21#include <features.h>21#include <features.h>
2222
23#include <bits/endian.h>23#include <bits/endian.h>
24#include <bits/floatn.h>
2425
25__BEGIN_DECLS26__BEGIN_DECLS
2627
...@@ -111,6 +112,65 @@ union ieee754_double...@@ -111,6 +112,65 @@ union ieee754_double
111#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */112#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
112113
113114
115#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
116/* long double is IEEE 128 bit */
117union ieee854_long_double
118 {
119 long double d;
120
121 /* This is the IEEE 854 quad-precision format. */
122 struct
123 {
124#if __BYTE_ORDER == __BIG_ENDIAN
125 unsigned int negative:1;
126 unsigned int exponent:15;
127 /* Together these comprise the mantissa. */
128 unsigned int mantissa0:16;
129 unsigned int mantissa1:32;
130 unsigned int mantissa2:32;
131 unsigned int mantissa3:32;
132#endif /* Big endian. */
133#if __BYTE_ORDER == __LITTLE_ENDIAN
134 /* Together these comprise the mantissa. */
135 unsigned int mantissa3:32;
136 unsigned int mantissa2:32;
137 unsigned int mantissa1:32;
138 unsigned int mantissa0:16;
139 unsigned int exponent:15;
140 unsigned int negative:1;
141#endif /* Little endian. */
142 } ieee;
143
144 /* This format makes it easier to see if a NaN is a signalling NaN. */
145 struct
146 {
147#if __BYTE_ORDER == __BIG_ENDIAN
148 unsigned int negative:1;
149 unsigned int exponent:15;
150 unsigned int quiet_nan:1;
151 /* Together these comprise the mantissa. */
152 unsigned int mantissa0:15;
153 unsigned int mantissa1:32;
154 unsigned int mantissa2:32;
155 unsigned int mantissa3:32;
156#else
157 /* Together these comprise the mantissa. */
158 unsigned int mantissa3:32;
159 unsigned int mantissa2:32;
160 unsigned int mantissa1:32;
161 unsigned int mantissa0:15;
162 unsigned int quiet_nan:1;
163 unsigned int exponent:15;
164 unsigned int negative:1;
165#endif
166 } ieee_nan;
167 };
168
169#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
170#endif
171
172
173#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0)
114/* IBM extended format for long double.174/* IBM extended format for long double.
115175
116 Each long double is made up of two IEEE doubles. The value of the176 Each long double is made up of two IEEE doubles. The value of the
...@@ -121,12 +181,16 @@ union ieee754_double...@@ -121,12 +181,16 @@ union ieee754_double
121 -0.0. No other requirements are made; so, for example, 1.0 may be181 -0.0. No other requirements are made; so, for example, 1.0 may be
122 represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a182 represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
123 NaN is don't-care. */183 NaN is don't-care. */
124
125union ibm_extended_long_double184union ibm_extended_long_double
126 {185 {
127 long double ld;186# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0)
187 __ibm128 ld;
188# else
189 long double ld;
190# endif
128 union ieee754_double d[2];191 union ieee754_double d[2];
129 };192 };
193#endif
130194
131__END_DECLS195__END_DECLS
132196
lib/libc/include/riscv64-linux-gnu/bits/long-double.h+1-1
...@@ -18,4 +18,4 @@...@@ -18,4 +18,4 @@
1818
19/* long double is distinct from double, so there is nothing to19/* long double is distinct from double, so there is nothing to
20 define here. */20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/bits/semaphore.h+10-4
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1/* Machine-specific POSIX semaphore type layouts. RISC-V version.1/* Generic POSIX semaphore type layout
2 Copyright (C) 2002-2020 Free Software Foundation, Inc.2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
...@@ -13,14 +13,20 @@...@@ -13,14 +13,20 @@
13 Lesser General Public License for more details.13 Lesser General Public License for more details.
1414
15 You should have received a copy of the GNU Lesser General Public15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */17 <https://www.gnu.org/licenses/>. */
1818
19#ifndef _SEMAPHORE_H19#ifndef _SEMAPHORE_H
20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."20# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
21#endif21#endif
2222
23#define __SIZEOF_SEM_T (4 * __SIZEOF_POINTER__)23#include <bits/wordsize.h>
24
25#if __WORDSIZE == 64
26# define __SIZEOF_SEM_T 32
27#else
28# define __SIZEOF_SEM_T 16
29#endif
2430
25/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
26#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
lib/libc/include/riscv64-linux-gnu/bits/typesizes.h+29-9
...@@ -26,31 +26,45 @@...@@ -26,31 +26,45 @@
2626
27/* See <bits/types.h> for the meaning of these macros. This file exists so27/* See <bits/types.h> for the meaning of these macros. This file exists so
28 that <bits/types.h> need not vary across different GNU platforms. */28 that <bits/types.h> need not vary across different GNU platforms. */
29#if __TIMESIZE == 64 && __WORDSIZE == 32
30/* These are the "new" y2038 types defined for architectures added after
31 the 5.1 kernel. */
32# define __INO_T_TYPE __UQUAD_TYPE
33# define __OFF_T_TYPE __SQUAD_TYPE
34# define __RLIM_T_TYPE __UQUAD_TYPE
35# define __BLKCNT_T_TYPE __SQUAD_TYPE
36# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
37# define __FSFILCNT_T_TYPE __UQUAD_TYPE
38# define __TIME_T_TYPE __SQUAD_TYPE
39# define __SUSECONDS_T_TYPE __SQUAD_TYPE
40#else
41# define __INO_T_TYPE __ULONGWORD_TYPE
42# define __OFF_T_TYPE __SLONGWORD_TYPE
43# define __RLIM_T_TYPE __ULONGWORD_TYPE
44# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
45# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
46# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47# define __TIME_T_TYPE __SLONGWORD_TYPE
48# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
49#endif
2950
30#define __DEV_T_TYPE __UQUAD_TYPE51#define __DEV_T_TYPE __UQUAD_TYPE
31#define __UID_T_TYPE __U32_TYPE52#define __UID_T_TYPE __U32_TYPE
32#define __GID_T_TYPE __U32_TYPE53#define __GID_T_TYPE __U32_TYPE
33#define __INO_T_TYPE __ULONGWORD_TYPE
34#define __INO64_T_TYPE __UQUAD_TYPE54#define __INO64_T_TYPE __UQUAD_TYPE
35#define __MODE_T_TYPE __U32_TYPE55#define __MODE_T_TYPE __U32_TYPE
36#define __NLINK_T_TYPE __U32_TYPE56#define __NLINK_T_TYPE __U32_TYPE
37#define __OFF_T_TYPE __SLONGWORD_TYPE
38#define __OFF64_T_TYPE __SQUAD_TYPE57#define __OFF64_T_TYPE __SQUAD_TYPE
39#define __PID_T_TYPE __S32_TYPE58#define __PID_T_TYPE __S32_TYPE
40#define __RLIM_T_TYPE __ULONGWORD_TYPE
41#define __RLIM64_T_TYPE __UQUAD_TYPE59#define __RLIM64_T_TYPE __UQUAD_TYPE
42#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
43#define __BLKCNT64_T_TYPE __SQUAD_TYPE60#define __BLKCNT64_T_TYPE __SQUAD_TYPE
44#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
45#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE61#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
46#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
47#define __FSFILCNT64_T_TYPE __UQUAD_TYPE62#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
48#define __FSWORD_T_TYPE __SWORD_TYPE63#define __FSWORD_T_TYPE __SWORD_TYPE
49#define __ID_T_TYPE __U32_TYPE64#define __ID_T_TYPE __U32_TYPE
50#define __CLOCK_T_TYPE __SLONGWORD_TYPE65#define __CLOCK_T_TYPE __SLONGWORD_TYPE
51#define __TIME_T_TYPE __SLONGWORD_TYPE
52#define __USECONDS_T_TYPE __U32_TYPE66#define __USECONDS_T_TYPE __U32_TYPE
53#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
54#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
55#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
56#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -62,7 +76,7 @@...@@ -62,7 +76,7 @@
62#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE76#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
63#define __CPU_MASK_TYPE __ULONGWORD_TYPE77#define __CPU_MASK_TYPE __ULONGWORD_TYPE
6478
65#ifdef __LP64__79#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
66/* Tell the libc code that off_t and off64_t are actually the same type80/* 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 types81 for all ABI purposes, even if possibly expressed as different base types
68 for C type-checking purposes. */82 for C type-checking purposes. */
...@@ -76,11 +90,17 @@...@@ -76,11 +90,17 @@
7690
77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */91/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
78# define __STATFS_MATCHES_STATFS64 192# define __STATFS_MATCHES_STATFS64 1
93
94/* And for getitimer, setitimer and rusage */
95# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
79#else96#else
80# define __RLIM_T_MATCHES_RLIM64_T 097# define __RLIM_T_MATCHES_RLIM64_T 0
8198
82# define __STATFS_MATCHES_STATFS64 099# define __STATFS_MATCHES_STATFS64 0
100
101# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
83#endif102#endif
103
84/* Number of descriptors that can fit in an `fd_set'. */104/* Number of descriptors that can fit in an `fd_set'. */
85#define __FD_SETSIZE 1024105#define __FD_SETSIZE 1024
86106
lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h+1-4
...@@ -32,10 +32,7 @@...@@ -32,10 +32,7 @@
32#define __stub_fetestexcept32#define __stub_fetestexcept
33#define __stub_feupdateenv33#define __stub_feupdateenv
34#define __stub_gtty34#define __stub_gtty
35#define __stub_lchmod
36#define __stub_revoke35#define __stub_revoke
37#define __stub_setlogin36#define __stub_setlogin
38#define __stub_sigreturn37#define __stub_sigreturn
39#define __stub_sstk
40#define __stub_stty
41#define __stub_sysctl
\ No newline at end of file
38#define __stub_stty
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/fenv.h+2-2
...@@ -73,14 +73,14 @@ typedef unsigned int fexcept_t; /* size of fpc */...@@ -73,14 +73,14 @@ typedef unsigned int fexcept_t; /* size of fpc */
7373
7474
75/* Type representing floating-point environment. This function corresponds75/* Type representing floating-point environment. This function corresponds
76 to the layout of the block written by the `fstenv'. */76 to the layout of the block used by fegetenv and fesetenv. */
77typedef struct77typedef struct
78{78{
79 fexcept_t __fpc;79 fexcept_t __fpc;
80 void *__unused;80 void *__unused;
81 /* The field __unused (formerly __ieee_instruction_pointer) is a relict from81 /* The field __unused (formerly __ieee_instruction_pointer) is a relict from
82 commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59)82 commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59)
83 and isn´t used anymore. */83 and isn't used anymore. */
84} fenv_t;84} fenv_t;
8585
86/* If the default argument is used we use this value. */86/* If the default argument is used we use this value. */
lib/libc/include/s390x-linux-gnu/bits/long-double.h+1-1
...@@ -22,4 +22,4 @@...@@ -22,4 +22,4 @@
22# define __NO_LONG_DOUBLE_MATH 122# define __NO_LONG_DOUBLE_MATH 1
23# endif23# endif
24#endif24#endif
25#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
25#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/semaphore.h+2-2
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Copyright (C) 2003-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
3 Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
lib/libc/include/s390x-linux-gnu/bits/typesizes.h+7
...@@ -50,6 +50,7 @@...@@ -50,6 +50,7 @@
50#define __TIME_T_TYPE __SLONGWORD_TYPE50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE52#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
53#define __DADDR_T_TYPE __S32_TYPE54#define __DADDR_T_TYPE __S32_TYPE
54#define __KEY_T_TYPE __S32_TYPE55#define __KEY_T_TYPE __S32_TYPE
55#define __CLOCKID_T_TYPE __S32_TYPE56#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -81,10 +82,16 @@...@@ -81,10 +82,16 @@
8182
82/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */83/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
83# define __STATFS_MATCHES_STATFS64 184# define __STATFS_MATCHES_STATFS64 1
85
86/* And for getitimer, setitimer and rusage */
87# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
84#else88#else
85# define __RLIM_T_MATCHES_RLIM64_T 089# define __RLIM_T_MATCHES_RLIM64_T 0
8690
87# define __STATFS_MATCHES_STATFS64 091# define __STATFS_MATCHES_STATFS64 0
92
93/* And for getitimer, setitimer and rusage */
94# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
88#endif95#endif
8996
90/* Number of descriptors that can fit in an `fd_set'. */97/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/sparc-linux-gnu/bits/fenv.h-9
...@@ -83,15 +83,6 @@ typedef unsigned long int fenv_t;...@@ -83,15 +83,6 @@ typedef unsigned long int fenv_t;
83# define FE_NOMASK_ENV ((const fenv_t *) -2)83# define FE_NOMASK_ENV ((const fenv_t *) -2)
84#endif84#endif
8585
86/* For internal use only: access the fp state register. */
87#if __WORDSIZE == 64
88# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X))
89# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X))
90#else
91# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X))
92# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X))
93#endif
94
95#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)86#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
96/* Type representing floating-point control modes. */87/* Type representing floating-point control modes. */
97typedef unsigned long int femode_t;88typedef unsigned long int femode_t;
lib/libc/include/sparc-linux-gnu/bits/long-double.h+1-1
...@@ -24,4 +24,4 @@...@@ -24,4 +24,4 @@
24# define __NO_LONG_DOUBLE_MATH 124# define __NO_LONG_DOUBLE_MATH 1
25# endif25# endif
26#endif26#endif
27#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
27#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/msq-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct msqid_ds. SPARC version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __MSQ_PAD_AFTER_TIME 0
26#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/sparc-linux-gnu/bits/sem-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct semid_ds. SPARC version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SEM_PAD_AFTER_TIME 0
26#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/semaphore.h+2-3
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1/* Machine-specific POSIX semaphore type layouts. SPARC version.1/* Generic POSIX semaphore type layout
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
4 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
54
6 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
lib/libc/include/sparc-linux-gnu/bits/shm-pad.h deleted-28
...@@ -1,28 +0,0 @@
1/* Define where padding goes in struct shmid_ds. SPARC version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SHM_PAD_AFTER_TIME 0
26#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32)
27#define __SHM_SEGSZ_AFTER_TIME 1
28#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/signum.h deleted-39
...@@ -1,39 +0,0 @@
1/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/SPARC systems. Signal values on this platform were chosen
30 for SunOS binary compatibility. */
31
32#define SIGEMT 7 /* Emulator trap. */
33#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */
34#define SIGPWR SIGLOST /* Power failure imminent (SysV). */
35
36#undef __SIGRTMAX
37#define __SIGRTMAX 64
38
39#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/typesizes.h+7
...@@ -50,6 +50,7 @@...@@ -50,6 +50,7 @@
50#define __TIME_T_TYPE __SLONGWORD_TYPE50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __S32_TYPE52#define __SUSECONDS_T_TYPE __S32_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
53#define __DADDR_T_TYPE __S32_TYPE54#define __DADDR_T_TYPE __S32_TYPE
54#define __KEY_T_TYPE __S32_TYPE55#define __KEY_T_TYPE __S32_TYPE
55#define __CLOCKID_T_TYPE __S32_TYPE56#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -75,10 +76,16 @@...@@ -75,10 +76,16 @@
7576
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 178# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
78#else82#else
79# define __RLIM_T_MATCHES_RLIM64_T 083# define __RLIM_T_MATCHES_RLIM64_T 0
8084
81# define __STATFS_MATCHES_STATFS64 085# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
82#endif89#endif
8390
84/* Number of descriptors that can fit in an `fd_set'. */91/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/sparcv9-linux-gnu/bits/fenv.h-9
...@@ -83,15 +83,6 @@ typedef unsigned long int fenv_t;...@@ -83,15 +83,6 @@ typedef unsigned long int fenv_t;
83# define FE_NOMASK_ENV ((const fenv_t *) -2)83# define FE_NOMASK_ENV ((const fenv_t *) -2)
84#endif84#endif
8585
86/* For internal use only: access the fp state register. */
87#if __WORDSIZE == 64
88# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X))
89# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X))
90#else
91# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X))
92# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X))
93#endif
94
95#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)86#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
96/* Type representing floating-point control modes. */87/* Type representing floating-point control modes. */
97typedef unsigned long int femode_t;88typedef unsigned long int femode_t;
lib/libc/include/sparcv9-linux-gnu/bits/long-double.h+1-1
...@@ -24,4 +24,4 @@...@@ -24,4 +24,4 @@
24# define __NO_LONG_DOUBLE_MATH 124# define __NO_LONG_DOUBLE_MATH 1
25# endif25# endif
26#endif26#endif
27#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
27#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct msqid_ds. SPARC version.
2 Copyright (C) 2018-2020 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-pad.h> directly; include <sys/msg.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __MSQ_PAD_AFTER_TIME 0
26#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/resource.h+1-1
...@@ -98,7 +98,7 @@ enum __rlimit_resource...@@ -98,7 +98,7 @@ enum __rlimit_resource
98 __RLIMIT_RTPRIO = 14,98 __RLIMIT_RTPRIO = 14,
99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO99#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
100100
101 /* Maximum CPU time in µs that a process scheduled under a real-time101 /* Maximum CPU time in microseconds that a process scheduled under a real-time
102 scheduling policy may consume without making a blocking system102 scheduling policy may consume without making a blocking system
103 call before being forcibly descheduled. */103 call before being forcibly descheduled. */
104 __RLIMIT_RTTIME = 15,104 __RLIMIT_RTTIME = 15,
lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h deleted-26
...@@ -1,26 +0,0 @@
1/* Define where padding goes in struct semid_ds. SPARC version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SEM_PAD_AFTER_TIME 0
26#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32)
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h+2-3
...@@ -1,7 +1,6 @@...@@ -1,7 +1,6 @@
1/* Machine-specific POSIX semaphore type layouts. SPARC version.1/* Generic POSIX semaphore type layout
2 Copyright (C) 2003-2020 Free Software Foundation, Inc.2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
4 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
54
6 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h deleted-28
...@@ -1,28 +0,0 @@
1/* Define where padding goes in struct shmid_ds. SPARC version.
2 Copyright (C) 2018-2020 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/shm-pad.h> directly; include <sys/shm.h> instead."
21#endif
22
23#include <bits/timesize.h>
24
25#define __SHM_PAD_AFTER_TIME 0
26#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32)
27#define __SHM_SEGSZ_AFTER_TIME 1
28#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/signum.h deleted-39
...@@ -1,39 +0,0 @@
1/* Signal number definitions. Linux/SPARC version.
2 Copyright (C) 1996-2020 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_H
20#define _BITS_SIGNUM_H 1
21
22#ifndef _SIGNAL_H
23#error "Never include <bits/signum.h> directly; use <signal.h> instead."
24#endif
25
26#include <bits/signum-generic.h>
27
28/* Adjustments and additions to the signal number constants for
29 Linux/SPARC systems. Signal values on this platform were chosen
30 for SunOS binary compatibility. */
31
32#define SIGEMT 7 /* Emulator trap. */
33#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */
34#define SIGPWR SIGLOST /* Power failure imminent (SysV). */
35
36#undef __SIGRTMAX
37#define __SIGRTMAX 64
38
39#endif /* <signal.h> included. */
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h+7
...@@ -50,6 +50,7 @@...@@ -50,6 +50,7 @@
50#define __TIME_T_TYPE __SLONGWORD_TYPE50#define __TIME_T_TYPE __SLONGWORD_TYPE
51#define __USECONDS_T_TYPE __U32_TYPE51#define __USECONDS_T_TYPE __U32_TYPE
52#define __SUSECONDS_T_TYPE __S32_TYPE52#define __SUSECONDS_T_TYPE __S32_TYPE
53#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
53#define __DADDR_T_TYPE __S32_TYPE54#define __DADDR_T_TYPE __S32_TYPE
54#define __KEY_T_TYPE __S32_TYPE55#define __KEY_T_TYPE __S32_TYPE
55#define __CLOCKID_T_TYPE __S32_TYPE56#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -75,10 +76,16 @@...@@ -75,10 +76,16 @@
7576
76/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */77/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
77# define __STATFS_MATCHES_STATFS64 178# define __STATFS_MATCHES_STATFS64 1
79
80/* And for getitimer, setitimer and rusage */
81# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
78#else82#else
79# define __RLIM_T_MATCHES_RLIM64_T 083# define __RLIM_T_MATCHES_RLIM64_T 0
8084
81# define __STATFS_MATCHES_STATFS64 085# define __STATFS_MATCHES_STATFS64 0
86
87/* And for getitimer, setitimer and rusage */
88# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
82#endif89#endif
8390
84/* Number of descriptors that can fit in an `fd_set'. */91/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/x86_64-linux-gnu/bits/fenv.h-54
...@@ -113,58 +113,4 @@ femode_t;...@@ -113,58 +113,4 @@ femode_t;
113113
114/* Default floating-point control modes. */114/* Default floating-point control modes. */
115# define FE_DFL_MODE ((const femode_t *) -1L)115# define FE_DFL_MODE ((const femode_t *) -1L)
116#endif
117
118
119#ifdef __USE_EXTERN_INLINES
120__BEGIN_DECLS
121
122/* Optimized versions. */
123#ifndef _LIBC
124extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
125#endif
126__extern_always_inline void
127__NTH (__feraiseexcept_invalid_divbyzero (int __excepts))
128{
129 if ((FE_INVALID & __excepts) != 0)
130 {
131 /* One example of an invalid operation is 0.0 / 0.0. */
132 float __f = 0.0;
133
134# ifdef __SSE_MATH__
135 __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
136# else
137 __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait"
138 : "=t" (__f) : "0" (__f));
139# endif
140 (void) &__f;
141 }
142 if ((FE_DIVBYZERO & __excepts) != 0)
143 {
144 float __f = 1.0;
145 float __g = 0.0;
146
147# ifdef __SSE_MATH__
148 __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
149# else
150 __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
151 : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
152# endif
153 (void) &__f;
154 }
155}
156__extern_inline int
157__NTH (feraiseexcept (int __excepts))
158{
159 if (__builtin_constant_p (__excepts)
160 && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
161 {
162 __feraiseexcept_invalid_divbyzero (__excepts);
163 return 0;
164 }
165
166 return __feraiseexcept_renamed (__excepts);
167}
168
169__END_DECLS
170#endif116#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/long-double.h+1-1
...@@ -18,4 +18,4 @@...@@ -18,4 +18,4 @@
1818
19/* long double is distinct from double, so there is nothing to19/* long double is distinct from double, so there is nothing to
20 define here. */20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/select.h+8-34
...@@ -19,45 +19,19 @@...@@ -19,45 +19,19 @@
19# error "Never use <bits/select.h> directly; include <sys/select.h> instead."19# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
20#endif20#endif
2121
22#include <bits/wordsize.h>
23
24
25#if defined __GNUC__ && __GNUC__ >= 2
26
27# if __WORDSIZE == 64
28# define __FD_ZERO_STOS "stosq"
29# else
30# define __FD_ZERO_STOS "stosl"
31# endif
32
33# define __FD_ZERO(fdsp) \
34 do { \
35 int __d0, __d1; \
36 __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \
37 : "=c" (__d0), "=D" (__d1) \
38 : "a" (0), "0" (sizeof (fd_set) \
39 / sizeof (__fd_mask)), \
40 "1" (&__FDS_BITS (fdsp)[0]) \
41 : "memory"); \
42 } while (0)
43
44#else /* ! GNU CC */
4522
46/* We don't use `memset' because this would require a prototype and23/* We don't use `memset' because this would require a prototype and
47 the array isn't too big. */24 the array isn't too big. */
48# define __FD_ZERO(set) \25#define __FD_ZERO(s) \
49 do { \26 do { \
50 unsigned int __i; \27 unsigned int __i; \
51 fd_set *__arr = (set); \28 fd_set *__arr = (s); \
52 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \29 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
53 __FDS_BITS (__arr)[__i] = 0; \30 __FDS_BITS (__arr)[__i] = 0; \
54 } while (0)31 } while (0)
55
56#endif /* GNU CC */
57
58#define __FD_SET(d, set) \
59 ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
60#define __FD_CLR(d, set) \
61 ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
62#define __FD_ISSET(d, set) \
63 ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
\ No newline at end of file
32#define __FD_SET(d, s) \
33 ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
34#define __FD_CLR(d, s) \
35 ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
36#define __FD_ISSET(d, s) \
37 ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. x86 version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 1
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/semaphore.h+2-3
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
...@@ -28,7 +28,6 @@...@@ -28,7 +28,6 @@
28# define __SIZEOF_SEM_T 1628# define __SIZEOF_SEM_T 16
29#endif29#endif
3030
31
32/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
33#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
3433
lib/libc/include/x86_64-linux-gnu/bits/sysctl.h deleted-20
...@@ -1,20 +0,0 @@
1/* Copyright (C) 2012-2020 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#if defined __x86_64__ && defined __ILP32__
19# error "sysctl system call is unsupported in x32 kernel"
20#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/typesizes.h+6
...@@ -64,6 +64,7 @@...@@ -64,6 +64,7 @@
64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -87,10 +88,15 @@...@@ -87,10 +88,15 @@
8788
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */89/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 190# define __STATFS_MATCHES_STATFS64 1
91
92/* And for getitimer, setitimer and rusage */
93# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
90#else94#else
91# define __RLIM_T_MATCHES_RLIM64_T 095# define __RLIM_T_MATCHES_RLIM64_T 0
9296
93# define __STATFS_MATCHES_STATFS64 097# define __STATFS_MATCHES_STATFS64 0
98
99# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
94#endif100#endif
95101
96/* Number of descriptors that can fit in an `fd_set'. */102/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h-2
...@@ -11,9 +11,7 @@...@@ -11,9 +11,7 @@
11#define __stub_chflags11#define __stub_chflags
12#define __stub_fchflags12#define __stub_fchflags
13#define __stub_gtty13#define __stub_gtty
14#define __stub_lchmod
15#define __stub_revoke14#define __stub_revoke
16#define __stub_setlogin15#define __stub_setlogin
17#define __stub_sigreturn16#define __stub_sigreturn
18#define __stub_sstk
19#define __stub_stty17#define __stub_stty
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/fenv.h-54
...@@ -113,58 +113,4 @@ femode_t;...@@ -113,58 +113,4 @@ femode_t;
113113
114/* Default floating-point control modes. */114/* Default floating-point control modes. */
115# define FE_DFL_MODE ((const femode_t *) -1L)115# define FE_DFL_MODE ((const femode_t *) -1L)
116#endif
117
118
119#ifdef __USE_EXTERN_INLINES
120__BEGIN_DECLS
121
122/* Optimized versions. */
123#ifndef _LIBC
124extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
125#endif
126__extern_always_inline void
127__NTH (__feraiseexcept_invalid_divbyzero (int __excepts))
128{
129 if ((FE_INVALID & __excepts) != 0)
130 {
131 /* One example of an invalid operation is 0.0 / 0.0. */
132 float __f = 0.0;
133
134# ifdef __SSE_MATH__
135 __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
136# else
137 __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait"
138 : "=t" (__f) : "0" (__f));
139# endif
140 (void) &__f;
141 }
142 if ((FE_DIVBYZERO & __excepts) != 0)
143 {
144 float __f = 1.0;
145 float __g = 0.0;
146
147# ifdef __SSE_MATH__
148 __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
149# else
150 __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
151 : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
152# endif
153 (void) &__f;
154 }
155}
156__extern_inline int
157__NTH (feraiseexcept (int __excepts))
158{
159 if (__builtin_constant_p (__excepts)
160 && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
161 {
162 __feraiseexcept_invalid_divbyzero (__excepts);
163 return 0;
164 }
165
166 return __feraiseexcept_renamed (__excepts);
167}
168
169__END_DECLS
170#endif116#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/long-double.h+1-1
...@@ -18,4 +18,4 @@...@@ -18,4 +18,4 @@
1818
19/* long double is distinct from double, so there is nothing to19/* long double is distinct from double, so there is nothing to
20 define here. */20 define here. */
21#define __LONG_DOUBLE_USES_FLOAT128 0
\ No newline at end of file
21#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/select.h+8-34
...@@ -19,45 +19,19 @@...@@ -19,45 +19,19 @@
19# error "Never use <bits/select.h> directly; include <sys/select.h> instead."19# error "Never use <bits/select.h> directly; include <sys/select.h> instead."
20#endif20#endif
2121
22#include <bits/wordsize.h>
23
24
25#if defined __GNUC__ && __GNUC__ >= 2
26
27# if __WORDSIZE == 64
28# define __FD_ZERO_STOS "stosq"
29# else
30# define __FD_ZERO_STOS "stosl"
31# endif
32
33# define __FD_ZERO(fdsp) \
34 do { \
35 int __d0, __d1; \
36 __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \
37 : "=c" (__d0), "=D" (__d1) \
38 : "a" (0), "0" (sizeof (fd_set) \
39 / sizeof (__fd_mask)), \
40 "1" (&__FDS_BITS (fdsp)[0]) \
41 : "memory"); \
42 } while (0)
43
44#else /* ! GNU CC */
4522
46/* We don't use `memset' because this would require a prototype and23/* We don't use `memset' because this would require a prototype and
47 the array isn't too big. */24 the array isn't too big. */
48# define __FD_ZERO(set) \25#define __FD_ZERO(s) \
49 do { \26 do { \
50 unsigned int __i; \27 unsigned int __i; \
51 fd_set *__arr = (set); \28 fd_set *__arr = (s); \
52 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \29 for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
53 __FDS_BITS (__arr)[__i] = 0; \30 __FDS_BITS (__arr)[__i] = 0; \
54 } while (0)31 } while (0)
55
56#endif /* GNU CC */
57
58#define __FD_SET(d, set) \
59 ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
60#define __FD_CLR(d, set) \
61 ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
62#define __FD_ISSET(d, set) \
63 ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
\ No newline at end of file
32#define __FD_SET(d, s) \
33 ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d)))
34#define __FD_CLR(d, s) \
35 ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d)))
36#define __FD_ISSET(d, s) \
37 ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h deleted-24
...@@ -1,24 +0,0 @@
1/* Define where padding goes in struct semid_ds. x86 version.
2 Copyright (C) 2018-2020 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 use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
21#endif
22
23#define __SEM_PAD_AFTER_TIME 1
24#define __SEM_PAD_BEFORE_TIME 0
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h+2-3
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1/* Copyright (C) 2002-2020 Free Software Foundation, Inc.1/* Generic POSIX semaphore type layout
2 Copyright (C) 1995-2020 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.3 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
44
5 The GNU C Library is free software; you can redistribute it and/or5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public6 modify it under the terms of the GNU Lesser General Public
...@@ -28,7 +28,6 @@...@@ -28,7 +28,6 @@
28# define __SIZEOF_SEM_T 1628# define __SIZEOF_SEM_T 16
29#endif29#endif
3030
31
32/* Value returned if `sem_open' failed. */31/* Value returned if `sem_open' failed. */
33#define SEM_FAILED ((sem_t *) 0)32#define SEM_FAILED ((sem_t *) 0)
3433
lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h deleted-20
...@@ -1,20 +0,0 @@
1/* Copyright (C) 2012-2020 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#if defined __x86_64__ && defined __ILP32__
19# error "sysctl system call is unsupported in x32 kernel"
20#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h+6
...@@ -64,6 +64,7 @@...@@ -64,6 +64,7 @@
64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE64#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
65#define __USECONDS_T_TYPE __U32_TYPE65#define __USECONDS_T_TYPE __U32_TYPE
66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE66#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
67#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
67#define __DADDR_T_TYPE __S32_TYPE68#define __DADDR_T_TYPE __S32_TYPE
68#define __KEY_T_TYPE __S32_TYPE69#define __KEY_T_TYPE __S32_TYPE
69#define __CLOCKID_T_TYPE __S32_TYPE70#define __CLOCKID_T_TYPE __S32_TYPE
...@@ -87,10 +88,15 @@...@@ -87,10 +88,15 @@
8788
88/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */89/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
89# define __STATFS_MATCHES_STATFS64 190# define __STATFS_MATCHES_STATFS64 1
91
92/* And for getitimer, setitimer and rusage */
93# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
90#else94#else
91# define __RLIM_T_MATCHES_RLIM64_T 095# define __RLIM_T_MATCHES_RLIM64_T 0
9296
93# define __STATFS_MATCHES_STATFS64 097# define __STATFS_MATCHES_STATFS64 0
98
99# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
94#endif100#endif
95101
96/* Number of descriptors that can fit in an `fd_set'. */102/* Number of descriptors that can fit in an `fd_set'. */
lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h-2
...@@ -20,8 +20,6 @@...@@ -20,8 +20,6 @@
20#define LIBNSS_FILES_SO "libnss_files.so.2"20#define LIBNSS_FILES_SO "libnss_files.so.2"
21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"21#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"22#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
23#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
24#define LIBNSS_NIS_SO "libnss_nis.so.2"
25#define LIBNSS_TEST1_SO "libnss_test1.so.2"23#define LIBNSS_TEST1_SO "libnss_test1.so.2"
26#define LIBNSS_TEST2_SO "libnss_test2.so.2"24#define LIBNSS_TEST2_SO "libnss_test2.so.2"
27#define LIBPTHREAD_SO "libpthread.so.0"25#define LIBPTHREAD_SO "libpthread.so.0"
lib/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h-2
...@@ -16,9 +16,7 @@...@@ -16,9 +16,7 @@
16#define __stub_chflags16#define __stub_chflags
17#define __stub_fchflags17#define __stub_fchflags
18#define __stub_gtty18#define __stub_gtty
19#define __stub_lchmod
20#define __stub_revoke19#define __stub_revoke
21#define __stub_setlogin20#define __stub_setlogin
22#define __stub_sigreturn21#define __stub_sigreturn
23#define __stub_sstk
24#define __stub_stty22#define __stub_stty
\ No newline at end of file