authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-12-14 21:56:02-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-12-15 14:30:03-07:00
log1edf8efa4243eb1715ace35b1a99f7eaa0863fdd
tree75024ea3ec2a0a3d3068a5f99d67faf214d22a89
parent877a1f2a2986e02269c64a05456dff521da27ac1

update glibc headers to 2.34

closes #10308

200 files changed, 3883 insertions(+), 2413 deletions(-)

lib/libc/include/aarch64-linux-gnu/bits/local_lim.h deleted-101
...@@ -1,101 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of the
9 License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20/* The kernel header pollutes the namespace with the NR_OPEN symbol
21 and defines LINK_MAX although filesystems have different maxima. A
22 similar thing is true for OPEN_MAX: the limit can be changed at
23 runtime and therefore the macro must not be defined. Remove this
24 after including the header if necessary. */
25#ifndef NR_OPEN
26# define __undef_NR_OPEN
27#endif
28#ifndef LINK_MAX
29# define __undef_LINK_MAX
30#endif
31#ifndef OPEN_MAX
32# define __undef_OPEN_MAX
33#endif
34#ifndef ARG_MAX
35# define __undef_ARG_MAX
36#endif
37
38/* The kernel sources contain a file with all the needed information. */
39#include <linux/limits.h>
40
41/* Have to remove NR_OPEN? */
42#ifdef __undef_NR_OPEN
43# undef NR_OPEN
44# undef __undef_NR_OPEN
45#endif
46/* Have to remove LINK_MAX? */
47#ifdef __undef_LINK_MAX
48# undef LINK_MAX
49# undef __undef_LINK_MAX
50#endif
51/* Have to remove OPEN_MAX? */
52#ifdef __undef_OPEN_MAX
53# undef OPEN_MAX
54# undef __undef_OPEN_MAX
55#endif
56/* Have to remove ARG_MAX? */
57#ifdef __undef_ARG_MAX
58# undef ARG_MAX
59# undef __undef_ARG_MAX
60#endif
61
62/* The number of data keys per process. */
63#define _POSIX_THREAD_KEYS_MAX 128
64/* This is the value this implementation supports. */
65#define PTHREAD_KEYS_MAX 1024
66
67/* Controlling the iterations of destructors for thread-specific data. */
68#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
69/* Number of iterations this implementation does. */
70#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
71
72/* The number of threads per process. */
73#define _POSIX_THREAD_THREADS_MAX 64
74/* We have no predefined limit on the number of threads. */
75#undef PTHREAD_THREADS_MAX
76
77/* Maximum amount by which a process can descrease its asynchronous I/O
78 priority level. */
79#define AIO_PRIO_DELTA_MAX 20
80
81/* Minimum size for a thread. At least two pages for systems with 64k
82 pages. */
83#define PTHREAD_STACK_MIN 131072
84
85/* Maximum number of timer expiration overruns. */
86#define DELAYTIMER_MAX 2147483647
87
88/* Maximum tty name length. */
89#define TTY_NAME_MAX 32
90
91/* Maximum login name length. This is arbitrary. */
92#define LOGIN_NAME_MAX 256
93
94/* Maximum host name length. */
95#define HOST_NAME_MAX 64
96
97/* Maximum message queue priority level. */
98#define MQ_PRIO_MAX 32768
99
100/* Maximum value the semaphore can have. */
101#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h created+22
...@@ -0,0 +1,22 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of the
9 License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20/* Minimum size for a thread. At least two pages for systems with 64k
21 pages. */
22#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/statfs.h deleted-86
...@@ -1,86 +0,0 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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_STATFS_H
20# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
21#endif
22
23#include <bits/endian.h>
24#include <bits/types.h>
25#include <bits/wordsize.h>
26
27/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
28 statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
29 and accesses it via the statfs64() syscall. All the various
30 APIs offered by libc use the kernel shape for their struct statfs
31 structure; the only difference is that 32-bit programs not
32 using __USE_FILE_OFFSET64 only see the low 32 bits of some
33 of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
34
35#if defined __USE_FILE_OFFSET64
36# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
39#elif __BYTE_ORDER == __LITTLE_ENDIAN
40# define __field64(type, type64, name) \
41 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
42#else
43# define __field64(type, type64, name) \
44 int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
45#endif
46
47struct statfs
48 {
49 __SWORD_TYPE f_type;
50 __SWORD_TYPE f_bsize;
51 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
52 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
53 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
54 __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
55 __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
56 __fsid_t f_fsid;
57 __SWORD_TYPE f_namelen;
58 __SWORD_TYPE f_frsize;
59 __SWORD_TYPE f_flags;
60 __SWORD_TYPE f_spare[4];
61 };
62
63#undef __field64
64
65#ifdef __USE_LARGEFILE64
66struct statfs64
67 {
68 __SWORD_TYPE f_type;
69 __SWORD_TYPE f_bsize;
70 __fsblkcnt64_t f_blocks;
71 __fsblkcnt64_t f_bfree;
72 __fsblkcnt64_t f_bavail;
73 __fsfilcnt64_t f_files;
74 __fsfilcnt64_t f_ffree;
75 __fsid_t f_fsid;
76 __SWORD_TYPE f_namelen;
77 __SWORD_TYPE f_frsize;
78 __SWORD_TYPE f_flags;
79 __SWORD_TYPE f_spare[4];
80 };
81#endif
82
83/* Tell code we have these members. */
84#define _STATFS_F_NAMELEN
85#define _STATFS_F_FRSIZE
86#define _STATFS_F_FLAGS
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/aarch64-linux-gnu/sys/ptrace.h+50
...@@ -25,6 +25,40 @@...@@ -25,6 +25,40 @@
2525
26__BEGIN_DECLS26__BEGIN_DECLS
2727
28/* Avoid collision if the linux ptrace header is already included. */
29#undef PTRACE_TRACEME
30#undef PTRACE_PEEKTEXT
31#undef PTRACE_PEEKDATA
32#undef PTRACE_PEEKUSER
33#undef PTRACE_POKETEXT
34#undef PTRACE_POKEDATA
35#undef PTRACE_POKEUSER
36#undef PTRACE_CONT
37#undef PTRACE_KILL
38#undef PTRACE_SINGLESTEP
39#undef PTRACE_ATTACH
40#undef PTRACE_DETACH
41#undef PTRACE_SYSCALL
42#undef PTRACE_SYSEMU
43#undef PTRACE_SYSEMU_SINGLESTEP
44#undef PTRACE_PEEKMTETAGS
45#undef PTRACE_POKEMTETAGS
46#undef PTRACE_SETOPTIONS
47#undef PTRACE_GETEVENTMSG
48#undef PTRACE_GETSIGINFO
49#undef PTRACE_SETSIGINFO
50#undef PTRACE_GETREGSET
51#undef PTRACE_SETREGSET
52#undef PTRACE_SEIZE
53#undef PTRACE_INTERRUPT
54#undef PTRACE_LISTEN
55#undef PTRACE_PEEKSIGINFO
56#undef PTRACE_GETSIGMASK
57#undef PTRACE_SETSIGMASK
58#undef PTRACE_SECCOMP_GET_FILTER
59#undef PTRACE_SECCOMP_GET_METADATA
60#undef PTRACE_GET_SYSCALL_INFO
61
28/* Type of the REQUEST argument to `ptrace.' */62/* Type of the REQUEST argument to `ptrace.' */
29enum __ptrace_request63enum __ptrace_request
30{64{
...@@ -82,6 +116,22 @@ enum __ptrace_request...@@ -82,6 +116,22 @@ enum __ptrace_request
82 PTRACE_SYSCALL = 24,116 PTRACE_SYSCALL = 24,
83#define PT_SYSCALL PTRACE_SYSCALL117#define PT_SYSCALL PTRACE_SYSCALL
84118
119 /* Continue and stop at the next syscall, it will not be executed. */
120 PTRACE_SYSEMU = 31,
121#define PT_SYSEMU PTRACE_SYSEMU
122
123 /* Single step the process, the next syscall will not be executed. */
124 PTRACE_SYSEMU_SINGLESTEP = 32,
125#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
126
127 /* Read MTE tags. */
128 PTRACE_PEEKMTETAGS = 33,
129#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
130
131 /* Write MTE tags. */
132 PTRACE_POKEMTETAGS = 34,
133#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
134
85 /* Set ptrace filter options. */135 /* Set ptrace filter options. */
86 PTRACE_SETOPTIONS = 0x4200,136 PTRACE_SETOPTIONS = 0x4200,
87#define PT_SETOPTIONS PTRACE_SETOPTIONS137#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h deleted-101
...@@ -1,101 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of the
9 License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20/* The kernel header pollutes the namespace with the NR_OPEN symbol
21 and defines LINK_MAX although filesystems have different maxima. A
22 similar thing is true for OPEN_MAX: the limit can be changed at
23 runtime and therefore the macro must not be defined. Remove this
24 after including the header if necessary. */
25#ifndef NR_OPEN
26# define __undef_NR_OPEN
27#endif
28#ifndef LINK_MAX
29# define __undef_LINK_MAX
30#endif
31#ifndef OPEN_MAX
32# define __undef_OPEN_MAX
33#endif
34#ifndef ARG_MAX
35# define __undef_ARG_MAX
36#endif
37
38/* The kernel sources contain a file with all the needed information. */
39#include <linux/limits.h>
40
41/* Have to remove NR_OPEN? */
42#ifdef __undef_NR_OPEN
43# undef NR_OPEN
44# undef __undef_NR_OPEN
45#endif
46/* Have to remove LINK_MAX? */
47#ifdef __undef_LINK_MAX
48# undef LINK_MAX
49# undef __undef_LINK_MAX
50#endif
51/* Have to remove OPEN_MAX? */
52#ifdef __undef_OPEN_MAX
53# undef OPEN_MAX
54# undef __undef_OPEN_MAX
55#endif
56/* Have to remove ARG_MAX? */
57#ifdef __undef_ARG_MAX
58# undef ARG_MAX
59# undef __undef_ARG_MAX
60#endif
61
62/* The number of data keys per process. */
63#define _POSIX_THREAD_KEYS_MAX 128
64/* This is the value this implementation supports. */
65#define PTHREAD_KEYS_MAX 1024
66
67/* Controlling the iterations of destructors for thread-specific data. */
68#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
69/* Number of iterations this implementation does. */
70#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
71
72/* The number of threads per process. */
73#define _POSIX_THREAD_THREADS_MAX 64
74/* We have no predefined limit on the number of threads. */
75#undef PTHREAD_THREADS_MAX
76
77/* Maximum amount by which a process can descrease its asynchronous I/O
78 priority level. */
79#define AIO_PRIO_DELTA_MAX 20
80
81/* Minimum size for a thread. At least two pages for systems with 64k
82 pages. */
83#define PTHREAD_STACK_MIN 131072
84
85/* Maximum number of timer expiration overruns. */
86#define DELAYTIMER_MAX 2147483647
87
88/* Maximum tty name length. */
89#define TTY_NAME_MAX 32
90
91/* Maximum login name length. This is arbitrary. */
92#define LOGIN_NAME_MAX 256
93
94/* Maximum host name length. */
95#define HOST_NAME_MAX 64
96
97/* Maximum message queue priority level. */
98#define MQ_PRIO_MAX 32768
99
100/* Maximum value the semaphore can have. */
101#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h created+22
...@@ -0,0 +1,22 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3
4 This file is part of the GNU C Library.
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of the
9 License, or (at your option) any later version.
10
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <https://www.gnu.org/licenses/>. */
19
20/* Minimum size for a thread. At least two pages for systems with 64k
21 pages. */
22#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h deleted-86
...@@ -1,86 +0,0 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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_STATFS_H
20# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
21#endif
22
23#include <bits/endian.h>
24#include <bits/types.h>
25#include <bits/wordsize.h>
26
27/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
28 statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
29 and accesses it via the statfs64() syscall. All the various
30 APIs offered by libc use the kernel shape for their struct statfs
31 structure; the only difference is that 32-bit programs not
32 using __USE_FILE_OFFSET64 only see the low 32 bits of some
33 of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
34
35#if defined __USE_FILE_OFFSET64
36# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
39#elif __BYTE_ORDER == __LITTLE_ENDIAN
40# define __field64(type, type64, name) \
41 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
42#else
43# define __field64(type, type64, name) \
44 int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
45#endif
46
47struct statfs
48 {
49 __SWORD_TYPE f_type;
50 __SWORD_TYPE f_bsize;
51 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
52 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
53 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
54 __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
55 __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
56 __fsid_t f_fsid;
57 __SWORD_TYPE f_namelen;
58 __SWORD_TYPE f_frsize;
59 __SWORD_TYPE f_flags;
60 __SWORD_TYPE f_spare[4];
61 };
62
63#undef __field64
64
65#ifdef __USE_LARGEFILE64
66struct statfs64
67 {
68 __SWORD_TYPE f_type;
69 __SWORD_TYPE f_bsize;
70 __fsblkcnt64_t f_blocks;
71 __fsblkcnt64_t f_bfree;
72 __fsblkcnt64_t f_bavail;
73 __fsfilcnt64_t f_files;
74 __fsfilcnt64_t f_ffree;
75 __fsid_t f_fsid;
76 __SWORD_TYPE f_namelen;
77 __SWORD_TYPE f_frsize;
78 __SWORD_TYPE f_flags;
79 __SWORD_TYPE f_spare[4];
80 };
81#endif
82
83/* Tell code we have these members. */
84#define _STATFS_F_NAMELEN
85#define _STATFS_F_FRSIZE
86#define _STATFS_F_FLAGS
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h+50
...@@ -25,6 +25,40 @@...@@ -25,6 +25,40 @@
2525
26__BEGIN_DECLS26__BEGIN_DECLS
2727
28/* Avoid collision if the linux ptrace header is already included. */
29#undef PTRACE_TRACEME
30#undef PTRACE_PEEKTEXT
31#undef PTRACE_PEEKDATA
32#undef PTRACE_PEEKUSER
33#undef PTRACE_POKETEXT
34#undef PTRACE_POKEDATA
35#undef PTRACE_POKEUSER
36#undef PTRACE_CONT
37#undef PTRACE_KILL
38#undef PTRACE_SINGLESTEP
39#undef PTRACE_ATTACH
40#undef PTRACE_DETACH
41#undef PTRACE_SYSCALL
42#undef PTRACE_SYSEMU
43#undef PTRACE_SYSEMU_SINGLESTEP
44#undef PTRACE_PEEKMTETAGS
45#undef PTRACE_POKEMTETAGS
46#undef PTRACE_SETOPTIONS
47#undef PTRACE_GETEVENTMSG
48#undef PTRACE_GETSIGINFO
49#undef PTRACE_SETSIGINFO
50#undef PTRACE_GETREGSET
51#undef PTRACE_SETREGSET
52#undef PTRACE_SEIZE
53#undef PTRACE_INTERRUPT
54#undef PTRACE_LISTEN
55#undef PTRACE_PEEKSIGINFO
56#undef PTRACE_GETSIGMASK
57#undef PTRACE_SETSIGMASK
58#undef PTRACE_SECCOMP_GET_FILTER
59#undef PTRACE_SECCOMP_GET_METADATA
60#undef PTRACE_GET_SYSCALL_INFO
61
28/* Type of the REQUEST argument to `ptrace.' */62/* Type of the REQUEST argument to `ptrace.' */
29enum __ptrace_request63enum __ptrace_request
30{64{
...@@ -82,6 +116,22 @@ enum __ptrace_request...@@ -82,6 +116,22 @@ enum __ptrace_request
82 PTRACE_SYSCALL = 24,116 PTRACE_SYSCALL = 24,
83#define PT_SYSCALL PTRACE_SYSCALL117#define PT_SYSCALL PTRACE_SYSCALL
84118
119 /* Continue and stop at the next syscall, it will not be executed. */
120 PTRACE_SYSEMU = 31,
121#define PT_SYSEMU PTRACE_SYSEMU
122
123 /* Single step the process, the next syscall will not be executed. */
124 PTRACE_SYSEMU_SINGLESTEP = 32,
125#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
126
127 /* Read MTE tags. */
128 PTRACE_PEEKMTETAGS = 33,
129#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
130
131 /* Write MTE tags. */
132 PTRACE_POKEMTETAGS = 34,
133#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
134
85 /* Set ptrace filter options. */135 /* Set ptrace filter options. */
86 PTRACE_SETOPTIONS = 0x4200,136 PTRACE_SETOPTIONS = 0x4200,
87#define PT_SETOPTIONS PTRACE_SETOPTIONS137#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h+29-21
...@@ -28,32 +28,35 @@...@@ -28,32 +28,35 @@
2828
29struct stat29struct stat
30 {30 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
31 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
32 unsigned short int __pad1;35 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET6436# ifndef __USE_FILE_OFFSET64
34 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
35#else38# else
36 __ino_t __st_ino; /* 32bit file serial number. */39 __ino_t __st_ino; /* 32bit file serial number. */
37#endif40# endif
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
41 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
42 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
43 unsigned short int __pad2;46 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
45 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
46#else49# else
47 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
48#endif51# endif
49 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else56# else
54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif58# endif
56#ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
57 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
58 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
59 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -63,28 +66,32 @@ struct stat...@@ -63,28 +66,32 @@ struct stat
63 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
64 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
65 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
69#else72# else
70 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
71 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
72 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
73 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
74 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
75 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif79# endif
77#ifndef __USE_FILE_OFFSET6480# ifndef __USE_FILE_OFFSET64
78 unsigned long int __glibc_reserved4;81 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;82 unsigned long int __glibc_reserved5;
80#else83# else
81 __ino64_t st_ino; /* File serial number. */84 __ino64_t st_ino; /* File serial number. */
82#endif85# endif
86#endif /* __USE_TIME_BITS64 */
83 };87 };
8488
85#ifdef __USE_LARGEFILE6489#ifdef __USE_LARGEFILE64
86struct stat6490struct stat64
87 {91 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
88 __dev_t st_dev; /* Device. */95 __dev_t st_dev; /* Device. */
89 unsigned int __pad1;96 unsigned int __pad1;
9097
...@@ -99,7 +106,7 @@ struct stat64...@@ -99,7 +106,7 @@ struct stat64
99 __blksize_t st_blksize; /* Optimal block size for I/O. */106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8109# ifdef __USE_XOPEN2K8
103 /* Nanosecond resolution timestamps are stored in a format110 /* Nanosecond resolution timestamps are stored in a format
104 equivalent to 'struct timespec'. This is the type used111 equivalent to 'struct timespec'. This is the type used
105 whenever possible but the Unix namespace rules do not allow the112 whenever possible but the Unix namespace rules do not allow the
...@@ -109,15 +116,16 @@ struct stat64...@@ -109,15 +116,16 @@ struct stat64
109 struct timespec st_atim; /* Time of last access. */116 struct timespec st_atim; /* Time of last access. */
110 struct timespec st_mtim; /* Time of last modification. */117 struct timespec st_mtim; /* Time of last modification. */
111 struct timespec st_ctim; /* Time of last status change. */118 struct timespec st_ctim; /* Time of last status change. */
112# else119# else
113 __time_t st_atime; /* Time of last access. */120 __time_t st_atime; /* Time of last access. */
114 unsigned long int st_atimensec; /* Nscecs of last access. */121 unsigned long int st_atimensec; /* Nscecs of last access. */
115 __time_t st_mtime; /* Time of last modification. */122 __time_t st_mtime; /* Time of last modification. */
116 unsigned long int st_mtimensec; /* Nsecs of last modification. */123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117 __time_t st_ctime; /* Time of last status change. */124 __time_t st_ctime; /* Time of last status change. */
118 unsigned long int st_ctimensec; /* Nsecs of last status change. */125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif126# endif
120 __ino64_t st_ino; /* File serial number. */127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121 };129 };
122#endif130#endif
123131
lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h+29-21
...@@ -28,32 +28,35 @@...@@ -28,32 +28,35 @@
2828
29struct stat29struct stat
30 {30 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
31 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
32 unsigned short int __pad1;35 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET6436# ifndef __USE_FILE_OFFSET64
34 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
35#else38# else
36 __ino_t __st_ino; /* 32bit file serial number. */39 __ino_t __st_ino; /* 32bit file serial number. */
37#endif40# endif
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
41 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
42 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
43 unsigned short int __pad2;46 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
45 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
46#else49# else
47 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
48#endif51# endif
49 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else56# else
54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif58# endif
56#ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
57 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
58 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
59 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -63,28 +66,32 @@ struct stat...@@ -63,28 +66,32 @@ struct stat
63 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
64 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
65 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
69#else72# else
70 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
71 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
72 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
73 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
74 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
75 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif79# endif
77#ifndef __USE_FILE_OFFSET6480# ifndef __USE_FILE_OFFSET64
78 unsigned long int __glibc_reserved4;81 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;82 unsigned long int __glibc_reserved5;
80#else83# else
81 __ino64_t st_ino; /* File serial number. */84 __ino64_t st_ino; /* File serial number. */
82#endif85# endif
86#endif /* __USE_TIME_BITS64 */
83 };87 };
8488
85#ifdef __USE_LARGEFILE6489#ifdef __USE_LARGEFILE64
86struct stat6490struct stat64
87 {91 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
88 __dev_t st_dev; /* Device. */95 __dev_t st_dev; /* Device. */
89 unsigned int __pad1;96 unsigned int __pad1;
9097
...@@ -99,7 +106,7 @@ struct stat64...@@ -99,7 +106,7 @@ struct stat64
99 __blksize_t st_blksize; /* Optimal block size for I/O. */106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8109# ifdef __USE_XOPEN2K8
103 /* Nanosecond resolution timestamps are stored in a format110 /* Nanosecond resolution timestamps are stored in a format
104 equivalent to 'struct timespec'. This is the type used111 equivalent to 'struct timespec'. This is the type used
105 whenever possible but the Unix namespace rules do not allow the112 whenever possible but the Unix namespace rules do not allow the
...@@ -109,15 +116,16 @@ struct stat64...@@ -109,15 +116,16 @@ struct stat64
109 struct timespec st_atim; /* Time of last access. */116 struct timespec st_atim; /* Time of last access. */
110 struct timespec st_mtim; /* Time of last modification. */117 struct timespec st_mtim; /* Time of last modification. */
111 struct timespec st_ctim; /* Time of last status change. */118 struct timespec st_ctim; /* Time of last status change. */
112# else119# else
113 __time_t st_atime; /* Time of last access. */120 __time_t st_atime; /* Time of last access. */
114 unsigned long int st_atimensec; /* Nscecs of last access. */121 unsigned long int st_atimensec; /* Nscecs of last access. */
115 __time_t st_mtime; /* Time of last modification. */122 __time_t st_mtime; /* Time of last modification. */
116 unsigned long int st_mtimensec; /* Nsecs of last modification. */123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117 __time_t st_ctime; /* Time of last status change. */124 __time_t st_ctime; /* Time of last status change. */
118 unsigned long int st_ctimensec; /* Nsecs of last status change. */125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif126# endif
120 __ino64_t st_ino; /* File serial number. */127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121 };129 };
122#endif130#endif
123131
lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h+29-21
...@@ -28,32 +28,35 @@...@@ -28,32 +28,35 @@
2828
29struct stat29struct stat
30 {30 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
31 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
32 unsigned short int __pad1;35 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET6436# ifndef __USE_FILE_OFFSET64
34 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
35#else38# else
36 __ino_t __st_ino; /* 32bit file serial number. */39 __ino_t __st_ino; /* 32bit file serial number. */
37#endif40# endif
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
41 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
42 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
43 unsigned short int __pad2;46 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
45 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
46#else49# else
47 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
48#endif51# endif
49 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else56# else
54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif58# endif
56#ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
57 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
58 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
59 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -63,28 +66,32 @@ struct stat...@@ -63,28 +66,32 @@ struct stat
63 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
64 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
65 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
69#else72# else
70 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
71 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
72 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
73 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
74 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
75 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif79# endif
77#ifndef __USE_FILE_OFFSET6480# ifndef __USE_FILE_OFFSET64
78 unsigned long int __glibc_reserved4;81 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;82 unsigned long int __glibc_reserved5;
80#else83# else
81 __ino64_t st_ino; /* File serial number. */84 __ino64_t st_ino; /* File serial number. */
82#endif85# endif
86#endif /* __USE_TIME_BITS64 */
83 };87 };
8488
85#ifdef __USE_LARGEFILE6489#ifdef __USE_LARGEFILE64
86struct stat6490struct stat64
87 {91 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
88 __dev_t st_dev; /* Device. */95 __dev_t st_dev; /* Device. */
89 unsigned int __pad1;96 unsigned int __pad1;
9097
...@@ -99,7 +106,7 @@ struct stat64...@@ -99,7 +106,7 @@ struct stat64
99 __blksize_t st_blksize; /* Optimal block size for I/O. */106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8109# ifdef __USE_XOPEN2K8
103 /* Nanosecond resolution timestamps are stored in a format110 /* Nanosecond resolution timestamps are stored in a format
104 equivalent to 'struct timespec'. This is the type used111 equivalent to 'struct timespec'. This is the type used
105 whenever possible but the Unix namespace rules do not allow the112 whenever possible but the Unix namespace rules do not allow the
...@@ -109,15 +116,16 @@ struct stat64...@@ -109,15 +116,16 @@ struct stat64
109 struct timespec st_atim; /* Time of last access. */116 struct timespec st_atim; /* Time of last access. */
110 struct timespec st_mtim; /* Time of last modification. */117 struct timespec st_mtim; /* Time of last modification. */
111 struct timespec st_ctim; /* Time of last status change. */118 struct timespec st_ctim; /* Time of last status change. */
112# else119# else
113 __time_t st_atime; /* Time of last access. */120 __time_t st_atime; /* Time of last access. */
114 unsigned long int st_atimensec; /* Nscecs of last access. */121 unsigned long int st_atimensec; /* Nscecs of last access. */
115 __time_t st_mtime; /* Time of last modification. */122 __time_t st_mtime; /* Time of last modification. */
116 unsigned long int st_mtimensec; /* Nsecs of last modification. */123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117 __time_t st_ctime; /* Time of last status change. */124 __time_t st_ctime; /* Time of last status change. */
118 unsigned long int st_ctimensec; /* Nsecs of last status change. */125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif126# endif
120 __ino64_t st_ino; /* File serial number. */127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121 };129 };
122#endif130#endif
123131
lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h+29-21
...@@ -28,32 +28,35 @@...@@ -28,32 +28,35 @@
2828
29struct stat29struct stat
30 {30 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
31 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
32 unsigned short int __pad1;35 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET6436# ifndef __USE_FILE_OFFSET64
34 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
35#else38# else
36 __ino_t __st_ino; /* 32bit file serial number. */39 __ino_t __st_ino; /* 32bit file serial number. */
37#endif40# endif
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
41 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
42 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
43 unsigned short int __pad2;46 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
45 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
46#else49# else
47 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
48#endif51# endif
49 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else56# else
54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif58# endif
56#ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
57 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
58 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
59 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -63,28 +66,32 @@ struct stat...@@ -63,28 +66,32 @@ struct stat
63 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
64 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
65 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
69#else72# else
70 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
71 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
72 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
73 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
74 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
75 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif79# endif
77#ifndef __USE_FILE_OFFSET6480# ifndef __USE_FILE_OFFSET64
78 unsigned long int __glibc_reserved4;81 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;82 unsigned long int __glibc_reserved5;
80#else83# else
81 __ino64_t st_ino; /* File serial number. */84 __ino64_t st_ino; /* File serial number. */
82#endif85# endif
86#endif /* __USE_TIME_BITS64 */
83 };87 };
8488
85#ifdef __USE_LARGEFILE6489#ifdef __USE_LARGEFILE64
86struct stat6490struct stat64
87 {91 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
88 __dev_t st_dev; /* Device. */95 __dev_t st_dev; /* Device. */
89 unsigned int __pad1;96 unsigned int __pad1;
9097
...@@ -99,7 +106,7 @@ struct stat64...@@ -99,7 +106,7 @@ struct stat64
99 __blksize_t st_blksize; /* Optimal block size for I/O. */106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8109# ifdef __USE_XOPEN2K8
103 /* Nanosecond resolution timestamps are stored in a format110 /* Nanosecond resolution timestamps are stored in a format
104 equivalent to 'struct timespec'. This is the type used111 equivalent to 'struct timespec'. This is the type used
105 whenever possible but the Unix namespace rules do not allow the112 whenever possible but the Unix namespace rules do not allow the
...@@ -109,15 +116,16 @@ struct stat64...@@ -109,15 +116,16 @@ struct stat64
109 struct timespec st_atim; /* Time of last access. */116 struct timespec st_atim; /* Time of last access. */
110 struct timespec st_mtim; /* Time of last modification. */117 struct timespec st_mtim; /* Time of last modification. */
111 struct timespec st_ctim; /* Time of last status change. */118 struct timespec st_ctim; /* Time of last status change. */
112# else119# else
113 __time_t st_atime; /* Time of last access. */120 __time_t st_atime; /* Time of last access. */
114 unsigned long int st_atimensec; /* Nscecs of last access. */121 unsigned long int st_atimensec; /* Nscecs of last access. */
115 __time_t st_mtime; /* Time of last modification. */122 __time_t st_mtime; /* Time of last modification. */
116 unsigned long int st_mtimensec; /* Nsecs of last modification. */123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117 __time_t st_ctime; /* Time of last status change. */124 __time_t st_ctime; /* Time of last status change. */
118 unsigned long int st_ctimensec; /* Nsecs of last status change. */125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif126# endif
120 __ino64_t st_ino; /* File serial number. */127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121 };129 };
122#endif130#endif
123131
lib/libc/include/csky-linux-gnueabi/bits/statfs.h-11
...@@ -1,6 +1,5 @@...@@ -1,6 +1,5 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
6 modify it under the terms of the GNU Lesser General Public5 modify it under the terms of the GNU Lesser General Public
...@@ -24,18 +23,8 @@...@@ -24,18 +23,8 @@
24#include <bits/types.h>23#include <bits/types.h>
25#include <bits/wordsize.h>24#include <bits/wordsize.h>
2625
27/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
28 statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
29 and accesses it via the statfs64() syscall. All the various
30 APIs offered by libc use the kernel shape for their struct statfs
31 structure; the only difference is that 32-bit programs not
32 using __USE_FILE_OFFSET64 only see the low 32 bits of some
33 of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
34
35#if defined __USE_FILE_OFFSET6426#if defined __USE_FILE_OFFSET64
36# define __field64(type, type64, name) type64 name27# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
39#elif __BYTE_ORDER == __LITTLE_ENDIAN28#elif __BYTE_ORDER == __LITTLE_ENDIAN
40# define __field64(type, type64, name) \29# define __field64(type, type64, name) \
41 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad30 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h+1
...@@ -9,6 +9,7 @@...@@ -9,6 +9,7 @@
9#define LIBANL_SO "libanl.so.1"9#define LIBANL_SO "libanl.so.1"
10#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"10#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
11#define LIBCRYPT_SO "libcrypt.so.1"11#define LIBCRYPT_SO "libcrypt.so.1"
12#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"13#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"14#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"15#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/csky-linux-gnueabihf/bits/statfs.h-11
...@@ -1,6 +1,5 @@...@@ -1,6 +1,5 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.2 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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
6 modify it under the terms of the GNU Lesser General Public5 modify it under the terms of the GNU Lesser General Public
...@@ -24,18 +23,8 @@...@@ -24,18 +23,8 @@
24#include <bits/types.h>23#include <bits/types.h>
25#include <bits/wordsize.h>24#include <bits/wordsize.h>
2625
27/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
28 statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
29 and accesses it via the statfs64() syscall. All the various
30 APIs offered by libc use the kernel shape for their struct statfs
31 structure; the only difference is that 32-bit programs not
32 using __USE_FILE_OFFSET64 only see the low 32 bits of some
33 of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
34
35#if defined __USE_FILE_OFFSET6426#if defined __USE_FILE_OFFSET64
36# define __field64(type, type64, name) type64 name27# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
39#elif __BYTE_ORDER == __LITTLE_ENDIAN28#elif __BYTE_ORDER == __LITTLE_ENDIAN
40# define __field64(type, type64, name) \29# define __field64(type, type64, name) \
41 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad30 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h+1
...@@ -9,6 +9,7 @@...@@ -9,6 +9,7 @@
9#define LIBANL_SO "libanl.so.1"9#define LIBANL_SO "libanl.so.1"
10#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"10#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
11#define LIBCRYPT_SO "libcrypt.so.1"11#define LIBCRYPT_SO "libcrypt.so.1"
12#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
12#define LIBC_SO "libc.so.6"13#define LIBC_SO "libc.so.6"
13#define LIBDL_SO "libdl.so.2"14#define LIBDL_SO "libdl.so.2"
14#define LIBGCC_S_SO "libgcc_s.so.1"15#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/aio.h+12-3
...@@ -193,12 +193,17 @@ extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),...@@ -193,12 +193,17 @@ extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
193extern int __REDIRECT_NTH (aio_cancel,193extern int __REDIRECT_NTH (aio_cancel,
194 (int __fildes, struct aiocb *__aiocbp),194 (int __fildes, struct aiocb *__aiocbp),
195 aio_cancel64);195 aio_cancel64);
196196# ifdef __USE_TIME_BITS64
197extern int __REDIRECT_NTH (aio_suspend,
198 (const struct aiocb *const __list[], int __nent,
199 const struct timespec *__restrict __timeout),
200 __aio_suspend_time64) __nonnull ((1));
201# else
197extern int __REDIRECT_NTH (aio_suspend,202extern int __REDIRECT_NTH (aio_suspend,
198 (const struct aiocb *const __list[], int __nent,203 (const struct aiocb *const __list[], int __nent,
199 const struct timespec *__restrict __timeout),204 const struct timespec *__restrict __timeout),
200 aio_suspend64) __nonnull ((1));205 aio_suspend64) __nonnull ((1));
201206# endif
202extern int __REDIRECT_NTH (aio_fsync,207extern int __REDIRECT_NTH (aio_fsync,
203 (int __operation, struct aiocb *__aiocbp),208 (int __operation, struct aiocb *__aiocbp),
204 aio_fsync64) __nonnull ((2));209 aio_fsync64) __nonnull ((2));
...@@ -210,7 +215,11 @@ extern int __REDIRECT_NTH (aio_fsync,...@@ -210,7 +215,11 @@ extern int __REDIRECT_NTH (aio_fsync,
210# define aio_error aio_error64215# define aio_error aio_error64
211# define aio_return aio_return64216# define aio_return aio_return64
212# define aio_cancel aio_cancel64217# define aio_cancel aio_cancel64
213# define aio_suspend aio_suspend64218# ifdef __USE_TIME_BITS64
219# define aio_suspend __aio_suspend_time64
220# else
221# define aio_suspend aio_suspend64
222# endif
214# define aio_fsync aio_fsync64223# define aio_fsync aio_fsync64
215# endif224# endif
216#endif225#endif
lib/libc/include/generic-glibc/arpa/inet.h+2-1
...@@ -74,7 +74,8 @@ extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;...@@ -74,7 +74,8 @@ extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
7474
75/* Format a network number NET into presentation format and place result75/* Format a network number NET into presentation format and place result
76 in buffer starting at BUF with length of LEN bytes. */76 in buffer starting at BUF with length of LEN bytes. */
77extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;77extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW
78 __attribute_deprecated_msg__ ("Use inet_ntop instead");
7879
79/* Convert network number for interface type AF in buffer starting at80/* Convert network number for interface type AF in buffer starting at
80 CP to presentation format. The result will specifiy BITS bits of81 CP to presentation format. The result will specifiy BITS bits of
lib/libc/include/generic-glibc/arpa/nameser.h+24-9
...@@ -52,6 +52,12 @@...@@ -52,6 +52,12 @@
52#include <sys/types.h>52#include <sys/types.h>
53#include <stdint.h>53#include <stdint.h>
5454
55#ifdef _LIBC
56# define __NAMESER_DEPRECATED
57#else
58# define __NAMESER_DEPRECATED __attribute_deprecated__
59#endif
60
55/*61/*
56 * Define constants based on RFC 883, RFC 1034, RFC 103562 * Define constants based on RFC 883, RFC 1034, RFC 1035
57 */63 */
...@@ -401,14 +407,18 @@ int ns_skiprr (const unsigned char *, const unsigned char *,...@@ -401,14 +407,18 @@ int ns_skiprr (const unsigned char *, const unsigned char *,
401int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;407int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
402int ns_sprintrr (const ns_msg *, const ns_rr *,408int ns_sprintrr (const ns_msg *, const ns_rr *,
403 const char *, const char *, char *, size_t)409 const char *, const char *, char *, size_t)
404 __THROW;410 __THROW __NAMESER_DEPRECATED;
405int ns_sprintrrf (const unsigned char *, size_t, const char *,411int ns_sprintrrf (const unsigned char *, size_t, const char *,
406 ns_class, ns_type, unsigned long,412 ns_class, ns_type, unsigned long,
407 const unsigned char *, size_t, const char *,413 const unsigned char *, size_t, const char *,
408 const char *, char *, size_t) __THROW;414 const char *, char *, size_t)
409int ns_format_ttl (unsigned long, char *, size_t) __THROW;415 __THROW __NAMESER_DEPRECATED;
410int ns_parse_ttl (const char *, unsigned long *) __THROW;416int ns_format_ttl (unsigned long, char *, size_t)
411uint32_t ns_datetosecs (const char *, int *) __THROW;417 __THROW __NAMESER_DEPRECATED;
418int ns_parse_ttl (const char *, unsigned long *)
419 __THROW __NAMESER_DEPRECATED;
420uint32_t ns_datetosecs (const char *, int *)
421 __THROW __NAMESER_DEPRECATED;
412int ns_name_ntol (const unsigned char *, unsigned char *, size_t)422int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
413 __THROW;423 __THROW;
414int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;424int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
...@@ -431,10 +441,15 @@ int ns_name_skip (const unsigned char **, const unsigned char *)...@@ -431,10 +441,15 @@ int ns_name_skip (const unsigned char **, const unsigned char *)
431void ns_name_rollback (const unsigned char *,441void ns_name_rollback (const unsigned char *,
432 const unsigned char **,442 const unsigned char **,
433 const unsigned char **) __THROW;443 const unsigned char **) __THROW;
434int ns_samedomain (const char *, const char *) __THROW;444
435int ns_subdomain (const char *, const char *) __THROW;445int ns_samedomain (const char *, const char *) __THROW
436int ns_makecanon (const char *, char *, size_t) __THROW;446 __NAMESER_DEPRECATED;
437int ns_samename (const char *, const char *) __THROW;447int ns_subdomain (const char *, const char *) __THROW
448 __NAMESER_DEPRECATED;
449int ns_makecanon (const char *, char *, size_t) __THROW
450 __NAMESER_DEPRECATED;
451int ns_samename (const char *, const char *) __THROW
452 __NAMESER_DEPRECATED;
438__END_DECLS453__END_DECLS
439454
440#include <arpa/nameser_compat.h>455#include <arpa/nameser_compat.h>
lib/libc/include/generic-glibc/bits/confname.h+7-1
...@@ -525,8 +525,14 @@ enum...@@ -525,8 +525,14 @@ enum
525525
526 _SC_THREAD_ROBUST_PRIO_INHERIT,526 _SC_THREAD_ROBUST_PRIO_INHERIT,
527#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT527#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
528 _SC_THREAD_ROBUST_PRIO_PROTECT528 _SC_THREAD_ROBUST_PRIO_PROTECT,
529#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT529#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
530
531 _SC_MINSIGSTKSZ,
532#define _SC_MINSIGSTKSZ _SC_MINSIGSTKSZ
533
534 _SC_SIGSTKSZ
535#define _SC_SIGSTKSZ _SC_SIGSTKSZ
530 };536 };
531537
532/* Values for the NAME argument to `confstr'. */538/* Values for the NAME argument to `confstr'. */
lib/libc/include/generic-glibc/bits/libc-header-start.h+26-2
...@@ -44,8 +44,26 @@...@@ -44,8 +44,26 @@
4444
45/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__45/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
46 macro. Most but not all symbols enabled by that macro in TS46 macro. Most but not all symbols enabled by that macro in TS
47 18661-1 are enabled unconditionally in C2X; the symbols in Annex F47 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
48 still require that macro in C2X. */48 Annex F still require a new feature test macro
49 __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
50 __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
51 18661-1 are not included in C2X (and thus should depend on
52 __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
53 enabled).
54
55 __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
56 18661-1 not included in C2X.
57
58 __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
59 18661-1 that are also included in C2X (with no feature test macro
60 required in C2X).
61
62 __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
63 that are included in C2X but conditional on
64 __STDC_WANT_IEC_60559_EXT__. (There are currently no features
65 conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
66 18661-1.) */
49#undef __GLIBC_USE_IEC_60559_BFP_EXT67#undef __GLIBC_USE_IEC_60559_BFP_EXT
50#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__68#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
51# define __GLIBC_USE_IEC_60559_BFP_EXT 169# define __GLIBC_USE_IEC_60559_BFP_EXT 1
...@@ -58,6 +76,12 @@...@@ -58,6 +76,12 @@
58#else76#else
59# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 077# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
60#endif78#endif
79#undef __GLIBC_USE_IEC_60559_EXT
80#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
81# define __GLIBC_USE_IEC_60559_EXT 1
82#else
83# define __GLIBC_USE_IEC_60559_EXT 0
84#endif
6185
62/* ISO/IEC TS 18661-4:2015 defines the86/* ISO/IEC TS 18661-4:2015 defines the
63 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction87 __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
lib/libc/include/generic-glibc/bits/local_lim.h+2-2
...@@ -77,8 +77,8 @@...@@ -77,8 +77,8 @@
77 priority level. */77 priority level. */
78#define AIO_PRIO_DELTA_MAX 2078#define AIO_PRIO_DELTA_MAX 20
7979
80/* Minimum size for a thread. We are free to choose a reasonable value. */80/* Arrange for the definition of PTHREAD_STACK_MIN. */
81#define PTHREAD_STACK_MIN 1638481#include <bits/pthread_stack_min-dynamic.h>
8282
83/* Maximum number of timer expiration overruns. */83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 214748364784#define DELAYTIMER_MAX 2147483647
lib/libc/include/generic-glibc/bits/mathcalls.h+8-4
...@@ -364,17 +364,21 @@ __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round,...@@ -364,17 +364,21 @@ __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round,
364__MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,364__MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
365 unsigned int __width));365 unsigned int __width));
366366
367/* Canonicalize floating-point representation. */
368__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
369#endif
370
371#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
372 || (__MATH_DECLARING_FLOATN \
373 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X))))
367/* Return value with maximum magnitude. */374/* Return value with maximum magnitude. */
368__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));375__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
369376
370/* Return value with minimum magnitude. */377/* Return value with minimum magnitude. */
371__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));378__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
372
373/* Canonicalize floating-point representation. */
374__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
375#endif379#endif
376380
377#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN381#if __GLIBC_USE (IEC_60559_EXT) || __MATH_DECLARING_FLOATN
378/* Total order operation. */382/* Total order operation. */
379__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,383__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,
380 const _Mdouble_ *__y))384 const _Mdouble_ *__y))
lib/libc/include/generic-glibc/bits/msq.h+1
...@@ -26,6 +26,7 @@ typedef __syscall_ulong_t msgqnum_t;...@@ -26,6 +26,7 @@ typedef __syscall_ulong_t msgqnum_t;
26typedef __syscall_ulong_t msglen_t;26typedef __syscall_ulong_t msglen_t;
2727
28#include <bits/types/struct_msqid_ds.h>28#include <bits/types/struct_msqid_ds.h>
29#include <bits/types/struct_msqid64_ds.h>
2930
30/* Define options for message queue functions. */31/* Define options for message queue functions. */
31#define MSG_NOERROR 010000 /* no error if message is too big */32#define MSG_NOERROR 010000 /* no error if message is too big */
lib/libc/include/generic-glibc/bits/platform/x86.h created+311
...@@ -0,0 +1,311 @@
1/* Constants and data structures for x86 CPU features.
2 This file is part of the GNU C Library.
3 Copyright (C) 2008-2020 Free Software Foundation, Inc.
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_PLATFORM_X86_H
20# error "Never include <bits/platform/x86.h> directly; use <sys/platform/x86.h> instead."
21#endif
22
23enum
24{
25 CPUID_INDEX_1 = 0,
26 CPUID_INDEX_7,
27 CPUID_INDEX_80000001,
28 CPUID_INDEX_D_ECX_1,
29 CPUID_INDEX_80000007,
30 CPUID_INDEX_80000008,
31 CPUID_INDEX_7_ECX_1,
32 CPUID_INDEX_19,
33 CPUID_INDEX_14_ECX_0
34};
35
36struct cpuid_feature
37{
38 unsigned int cpuid_array[4];
39 unsigned int active_array[4];
40};
41
42enum cpuid_register_index
43{
44 cpuid_register_index_eax = 0,
45 cpuid_register_index_ebx,
46 cpuid_register_index_ecx,
47 cpuid_register_index_edx
48};
49
50/* CPU features. */
51
52enum
53{
54 x86_cpu_index_1_ecx
55 = (CPUID_INDEX_1 * 8 * 4 * sizeof (unsigned int)
56 + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
57
58 x86_cpu_SSE3 = x86_cpu_index_1_ecx,
59 x86_cpu_PCLMULQDQ = x86_cpu_index_1_ecx + 1,
60 x86_cpu_DTES64 = x86_cpu_index_1_ecx + 2,
61 x86_cpu_MONITOR = x86_cpu_index_1_ecx + 3,
62 x86_cpu_DS_CPL = x86_cpu_index_1_ecx + 4,
63 x86_cpu_VMX = x86_cpu_index_1_ecx + 5,
64 x86_cpu_SMX = x86_cpu_index_1_ecx + 6,
65 x86_cpu_EIST = x86_cpu_index_1_ecx + 7,
66 x86_cpu_TM2 = x86_cpu_index_1_ecx + 8,
67 x86_cpu_SSSE3 = x86_cpu_index_1_ecx + 9,
68 x86_cpu_CNXT_ID = x86_cpu_index_1_ecx + 10,
69 x86_cpu_SDBG = x86_cpu_index_1_ecx + 11,
70 x86_cpu_FMA = x86_cpu_index_1_ecx + 12,
71 x86_cpu_CMPXCHG16B = x86_cpu_index_1_ecx + 13,
72 x86_cpu_XTPRUPDCTRL = x86_cpu_index_1_ecx + 14,
73 x86_cpu_PDCM = x86_cpu_index_1_ecx + 15,
74 x86_cpu_INDEX_1_ECX_16 = x86_cpu_index_1_ecx + 16,
75 x86_cpu_PCID = x86_cpu_index_1_ecx + 17,
76 x86_cpu_DCA = x86_cpu_index_1_ecx + 18,
77 x86_cpu_SSE4_1 = x86_cpu_index_1_ecx + 19,
78 x86_cpu_SSE4_2 = x86_cpu_index_1_ecx + 20,
79 x86_cpu_X2APIC = x86_cpu_index_1_ecx + 21,
80 x86_cpu_MOVBE = x86_cpu_index_1_ecx + 22,
81 x86_cpu_POPCNT = x86_cpu_index_1_ecx + 23,
82 x86_cpu_TSC_DEADLINE = x86_cpu_index_1_ecx + 24,
83 x86_cpu_AES = x86_cpu_index_1_ecx + 25,
84 x86_cpu_XSAVE = x86_cpu_index_1_ecx + 26,
85 x86_cpu_OSXSAVE = x86_cpu_index_1_ecx + 27,
86 x86_cpu_AVX = x86_cpu_index_1_ecx + 28,
87 x86_cpu_F16C = x86_cpu_index_1_ecx + 29,
88 x86_cpu_RDRAND = x86_cpu_index_1_ecx + 30,
89 x86_cpu_INDEX_1_ECX_31 = x86_cpu_index_1_ecx + 31,
90
91 x86_cpu_index_1_edx
92 = (CPUID_INDEX_1 * 8 * 4 * sizeof (unsigned int)
93 + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
94
95 x86_cpu_FPU = x86_cpu_index_1_edx,
96 x86_cpu_VME = x86_cpu_index_1_edx + 1,
97 x86_cpu_DE = x86_cpu_index_1_edx + 2,
98 x86_cpu_PSE = x86_cpu_index_1_edx + 3,
99 x86_cpu_TSC = x86_cpu_index_1_edx + 4,
100 x86_cpu_MSR = x86_cpu_index_1_edx + 5,
101 x86_cpu_PAE = x86_cpu_index_1_edx + 6,
102 x86_cpu_MCE = x86_cpu_index_1_edx + 7,
103 x86_cpu_CX8 = x86_cpu_index_1_edx + 8,
104 x86_cpu_APIC = x86_cpu_index_1_edx + 9,
105 x86_cpu_INDEX_1_EDX_10 = x86_cpu_index_1_edx + 10,
106 x86_cpu_SEP = x86_cpu_index_1_edx + 11,
107 x86_cpu_MTRR = x86_cpu_index_1_edx + 12,
108 x86_cpu_PGE = x86_cpu_index_1_edx + 13,
109 x86_cpu_MCA = x86_cpu_index_1_edx + 14,
110 x86_cpu_CMOV = x86_cpu_index_1_edx + 15,
111 x86_cpu_PAT = x86_cpu_index_1_edx + 16,
112 x86_cpu_PSE_36 = x86_cpu_index_1_edx + 17,
113 x86_cpu_PSN = x86_cpu_index_1_edx + 18,
114 x86_cpu_CLFSH = x86_cpu_index_1_edx + 19,
115 x86_cpu_INDEX_1_EDX_20 = x86_cpu_index_1_edx + 20,
116 x86_cpu_DS = x86_cpu_index_1_edx + 21,
117 x86_cpu_ACPI = x86_cpu_index_1_edx + 22,
118 x86_cpu_MMX = x86_cpu_index_1_edx + 23,
119 x86_cpu_FXSR = x86_cpu_index_1_edx + 24,
120 x86_cpu_SSE = x86_cpu_index_1_edx + 25,
121 x86_cpu_SSE2 = x86_cpu_index_1_edx + 26,
122 x86_cpu_SS = x86_cpu_index_1_edx + 27,
123 x86_cpu_HTT = x86_cpu_index_1_edx + 28,
124 x86_cpu_TM = x86_cpu_index_1_edx + 29,
125 x86_cpu_INDEX_1_EDX_30 = x86_cpu_index_1_edx + 30,
126 x86_cpu_PBE = x86_cpu_index_1_edx + 31,
127
128 x86_cpu_index_7_ebx
129 = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
130 + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
131
132 x86_cpu_FSGSBASE = x86_cpu_index_7_ebx,
133 x86_cpu_TSC_ADJUST = x86_cpu_index_7_ebx + 1,
134 x86_cpu_SGX = x86_cpu_index_7_ebx + 2,
135 x86_cpu_BMI1 = x86_cpu_index_7_ebx + 3,
136 x86_cpu_HLE = x86_cpu_index_7_ebx + 4,
137 x86_cpu_AVX2 = x86_cpu_index_7_ebx + 5,
138 x86_cpu_INDEX_7_EBX_6 = x86_cpu_index_7_ebx + 6,
139 x86_cpu_SMEP = x86_cpu_index_7_ebx + 7,
140 x86_cpu_BMI2 = x86_cpu_index_7_ebx + 8,
141 x86_cpu_ERMS = x86_cpu_index_7_ebx + 9,
142 x86_cpu_INVPCID = x86_cpu_index_7_ebx + 10,
143 x86_cpu_RTM = x86_cpu_index_7_ebx + 11,
144 x86_cpu_RDT_M = x86_cpu_index_7_ebx + 12,
145 x86_cpu_DEPR_FPU_CS_DS = x86_cpu_index_7_ebx + 13,
146 x86_cpu_MPX = x86_cpu_index_7_ebx + 14,
147 x86_cpu_RDT_A = x86_cpu_index_7_ebx + 15,
148 x86_cpu_AVX512F = x86_cpu_index_7_ebx + 16,
149 x86_cpu_AVX512DQ = x86_cpu_index_7_ebx + 17,
150 x86_cpu_RDSEED = x86_cpu_index_7_ebx + 18,
151 x86_cpu_ADX = x86_cpu_index_7_ebx + 19,
152 x86_cpu_SMAP = x86_cpu_index_7_ebx + 20,
153 x86_cpu_AVX512_IFMA = x86_cpu_index_7_ebx + 21,
154 x86_cpu_INDEX_7_EBX_22 = x86_cpu_index_7_ebx + 22,
155 x86_cpu_CLFLUSHOPT = x86_cpu_index_7_ebx + 23,
156 x86_cpu_CLWB = x86_cpu_index_7_ebx + 24,
157 x86_cpu_TRACE = x86_cpu_index_7_ebx + 25,
158 x86_cpu_AVX512PF = x86_cpu_index_7_ebx + 26,
159 x86_cpu_AVX512ER = x86_cpu_index_7_ebx + 27,
160 x86_cpu_AVX512CD = x86_cpu_index_7_ebx + 28,
161 x86_cpu_SHA = x86_cpu_index_7_ebx + 29,
162 x86_cpu_AVX512BW = x86_cpu_index_7_ebx + 30,
163 x86_cpu_AVX512VL = x86_cpu_index_7_ebx + 31,
164
165 x86_cpu_index_7_ecx
166 = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
167 + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
168
169 x86_cpu_PREFETCHWT1 = x86_cpu_index_7_ecx,
170 x86_cpu_AVX512_VBMI = x86_cpu_index_7_ecx + 1,
171 x86_cpu_UMIP = x86_cpu_index_7_ecx + 2,
172 x86_cpu_PKU = x86_cpu_index_7_ecx + 3,
173 x86_cpu_OSPKE = x86_cpu_index_7_ecx + 4,
174 x86_cpu_WAITPKG = x86_cpu_index_7_ecx + 5,
175 x86_cpu_AVX512_VBMI2 = x86_cpu_index_7_ecx + 6,
176 x86_cpu_SHSTK = x86_cpu_index_7_ecx + 7,
177 x86_cpu_GFNI = x86_cpu_index_7_ecx + 8,
178 x86_cpu_VAES = x86_cpu_index_7_ecx + 9,
179 x86_cpu_VPCLMULQDQ = x86_cpu_index_7_ecx + 10,
180 x86_cpu_AVX512_VNNI = x86_cpu_index_7_ecx + 11,
181 x86_cpu_AVX512_BITALG = x86_cpu_index_7_ecx + 12,
182 x86_cpu_INDEX_7_ECX_13 = x86_cpu_index_7_ecx + 13,
183 x86_cpu_AVX512_VPOPCNTDQ = x86_cpu_index_7_ecx + 14,
184 x86_cpu_INDEX_7_ECX_1 = x86_cpu_index_7_ecx + 15,
185 x86_cpu_INDEX_7_ECX_16 = x86_cpu_index_7_ecx + 16,
186/* Note: Bits 17-21: The value of MAWAU used by the BNDLDX and BNDSTX
187 instructions in 64-bit mode. */
188 x86_cpu_RDPID = x86_cpu_index_7_ecx + 22,
189 x86_cpu_KL = x86_cpu_index_7_ecx + 23,
190 x86_cpu_INDEX_7_ECX_24 = x86_cpu_index_7_ecx + 24,
191 x86_cpu_CLDEMOTE = x86_cpu_index_7_ecx + 25,
192 x86_cpu_INDEX_7_ECX_26 = x86_cpu_index_7_ecx + 26,
193 x86_cpu_MOVDIRI = x86_cpu_index_7_ecx + 27,
194 x86_cpu_MOVDIR64B = x86_cpu_index_7_ecx + 28,
195 x86_cpu_ENQCMD = x86_cpu_index_7_ecx + 29,
196 x86_cpu_SGX_LC = x86_cpu_index_7_ecx + 30,
197 x86_cpu_PKS = x86_cpu_index_7_ecx + 31,
198
199 x86_cpu_index_7_edx
200 = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
201 + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
202
203 x86_cpu_INDEX_7_EDX_0 = x86_cpu_index_7_edx,
204 x86_cpu_INDEX_7_EDX_1 = x86_cpu_index_7_edx + 1,
205 x86_cpu_AVX512_4VNNIW = x86_cpu_index_7_edx + 2,
206 x86_cpu_AVX512_4FMAPS = x86_cpu_index_7_edx + 3,
207 x86_cpu_FSRM = x86_cpu_index_7_edx + 4,
208 x86_cpu_UINTR = x86_cpu_index_7_edx + 5,
209 x86_cpu_INDEX_7_EDX_6 = x86_cpu_index_7_edx + 6,
210 x86_cpu_INDEX_7_EDX_7 = x86_cpu_index_7_edx + 7,
211 x86_cpu_AVX512_VP2INTERSECT = x86_cpu_index_7_edx + 8,
212 x86_cpu_INDEX_7_EDX_9 = x86_cpu_index_7_edx + 9,
213 x86_cpu_MD_CLEAR = x86_cpu_index_7_edx + 10,
214 x86_cpu_RTM_ALWAYS_ABORT = x86_cpu_index_7_edx + 11,
215 x86_cpu_INDEX_7_EDX_12 = x86_cpu_index_7_edx + 12,
216 x86_cpu_INDEX_7_EDX_13 = x86_cpu_index_7_edx + 13,
217 x86_cpu_SERIALIZE = x86_cpu_index_7_edx + 14,
218 x86_cpu_HYBRID = x86_cpu_index_7_edx + 15,
219 x86_cpu_TSXLDTRK = x86_cpu_index_7_edx + 16,
220 x86_cpu_INDEX_7_EDX_17 = x86_cpu_index_7_edx + 17,
221 x86_cpu_PCONFIG = x86_cpu_index_7_edx + 18,
222 x86_cpu_INDEX_7_EDX_19 = x86_cpu_index_7_edx + 19,
223 x86_cpu_IBT = x86_cpu_index_7_edx + 20,
224 x86_cpu_INDEX_7_EDX_21 = x86_cpu_index_7_edx + 21,
225 x86_cpu_AMX_BF16 = x86_cpu_index_7_edx + 22,
226 x86_cpu_AVX512_FP16 = x86_cpu_index_7_edx + 23,
227 x86_cpu_AMX_TILE = x86_cpu_index_7_edx + 24,
228 x86_cpu_AMX_INT8 = x86_cpu_index_7_edx + 25,
229 x86_cpu_IBRS_IBPB = x86_cpu_index_7_edx + 26,
230 x86_cpu_STIBP = x86_cpu_index_7_edx + 27,
231 x86_cpu_L1D_FLUSH = x86_cpu_index_7_edx + 28,
232 x86_cpu_ARCH_CAPABILITIES = x86_cpu_index_7_edx + 29,
233 x86_cpu_CORE_CAPABILITIES = x86_cpu_index_7_edx + 30,
234 x86_cpu_SSBD = x86_cpu_index_7_edx + 31,
235
236 x86_cpu_index_80000001_ecx
237 = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
238 + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
239
240 x86_cpu_LAHF64_SAHF64 = x86_cpu_index_80000001_ecx,
241 x86_cpu_SVM = x86_cpu_index_80000001_ecx + 2,
242 x86_cpu_LZCNT = x86_cpu_index_80000001_ecx + 5,
243 x86_cpu_SSE4A = x86_cpu_index_80000001_ecx + 6,
244 x86_cpu_PREFETCHW = x86_cpu_index_80000001_ecx + 8,
245 x86_cpu_XOP = x86_cpu_index_80000001_ecx + 11,
246 x86_cpu_LWP = x86_cpu_index_80000001_ecx + 15,
247 x86_cpu_FMA4 = x86_cpu_index_80000001_ecx + 16,
248 x86_cpu_TBM = x86_cpu_index_80000001_ecx + 21,
249
250 x86_cpu_index_80000001_edx
251 = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
252 + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
253
254 x86_cpu_SYSCALL_SYSRET = x86_cpu_index_80000001_edx + 11,
255 x86_cpu_NX = x86_cpu_index_80000001_edx + 20,
256 x86_cpu_PAGE1GB = x86_cpu_index_80000001_edx + 26,
257 x86_cpu_RDTSCP = x86_cpu_index_80000001_edx + 27,
258 x86_cpu_LM = x86_cpu_index_80000001_edx + 29,
259
260 x86_cpu_index_d_ecx_1_eax
261 = (CPUID_INDEX_D_ECX_1 * 8 * 4 * sizeof (unsigned int)
262 + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
263
264 x86_cpu_XSAVEOPT = x86_cpu_index_d_ecx_1_eax,
265 x86_cpu_XSAVEC = x86_cpu_index_d_ecx_1_eax + 1,
266 x86_cpu_XGETBV_ECX_1 = x86_cpu_index_d_ecx_1_eax + 2,
267 x86_cpu_XSAVES = x86_cpu_index_d_ecx_1_eax + 3,
268 x86_cpu_XFD = x86_cpu_index_d_ecx_1_eax + 4,
269
270 x86_cpu_index_80000007_edx
271 = (CPUID_INDEX_80000007 * 8 * 4 * sizeof (unsigned int)
272 + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
273
274 x86_cpu_INVARIANT_TSC = x86_cpu_index_80000007_edx + 8,
275
276 x86_cpu_index_80000008_ebx
277 = (CPUID_INDEX_80000008 * 8 * 4 * sizeof (unsigned int)
278 + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
279
280 x86_cpu_WBNOINVD = x86_cpu_index_80000008_ebx + 9,
281 x86_cpu_AMD_IBPB = x86_cpu_index_80000008_ebx + 12,
282 x86_cpu_AMD_IBRS = x86_cpu_index_80000008_ebx + 14,
283 x86_cpu_AMD_STIBP = x86_cpu_index_80000008_ebx + 15,
284 x86_cpu_AMD_SSBD = x86_cpu_index_80000008_ebx + 24,
285 x86_cpu_AMD_VIRT_SSBD = x86_cpu_index_80000008_ebx + 25,
286
287 x86_cpu_index_7_ecx_1_eax
288 = (CPUID_INDEX_7_ECX_1 * 8 * 4 * sizeof (unsigned int)
289 + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
290
291 x86_cpu_AVX_VNNI = x86_cpu_index_7_ecx_1_eax + 4,
292 x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5,
293 x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10,
294 x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11,
295 x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12,
296 x86_cpu_HRESET = x86_cpu_index_7_ecx_1_eax + 22,
297 x86_cpu_LAM = x86_cpu_index_7_ecx_1_eax + 26,
298
299 x86_cpu_index_19_ebx
300 = (CPUID_INDEX_19 * 8 * 4 * sizeof (unsigned int)
301 + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
302
303 x86_cpu_AESKLE = x86_cpu_index_19_ebx,
304 x86_cpu_WIDE_KL = x86_cpu_index_19_ebx + 2,
305
306 x86_cpu_index_14_ecx_0_ebx
307 = (CPUID_INDEX_14_ECX_0 * 8 * 4 * sizeof (unsigned int)
308 + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
309
310 x86_cpu_PTWRITE = x86_cpu_index_14_ecx_0_ebx + 4
311};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/poll2.h+6-4
...@@ -26,13 +26,14 @@ __BEGIN_DECLS...@@ -26,13 +26,14 @@ __BEGIN_DECLS
26extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,26extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,
27 int __timeout), poll);27 int __timeout), poll);
28extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,28extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
29 __SIZE_TYPE__ __fdslen);29 __SIZE_TYPE__ __fdslen)
30 __attr_access ((__write_only__, 1, 2));
30extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,31extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
31 int __timeout, __SIZE_TYPE__ __fdslen),32 int __timeout, __SIZE_TYPE__ __fdslen),
32 __poll_chk)33 __poll_chk)
33 __warnattr ("poll called with fds buffer too small file nfds entries");34 __warnattr ("poll called with fds buffer too small file nfds entries");
3435
35__fortify_function int36__fortify_function __attr_access ((__write_only__, 1, 2)) int
36poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)37poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
37{38{
38 if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)39 if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)
...@@ -54,7 +55,8 @@ extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,...@@ -54,7 +55,8 @@ extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
54 const __sigset_t *__ss), ppoll);55 const __sigset_t *__ss), ppoll);
55extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,56extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
56 const struct timespec *__timeout,57 const struct timespec *__timeout,
57 const __sigset_t *__ss, __SIZE_TYPE__ __fdslen);58 const __sigset_t *__ss, __SIZE_TYPE__ __fdslen)
59 __attr_access ((__write_only__, 1, 2));
58extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,60extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
59 const struct timespec *__timeout,61 const struct timespec *__timeout,
60 const __sigset_t *__ss,62 const __sigset_t *__ss,
...@@ -62,7 +64,7 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,...@@ -62,7 +64,7 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
62 __ppoll_chk)64 __ppoll_chk)
63 __warnattr ("ppoll called with fds buffer too small file nfds entries");65 __warnattr ("ppoll called with fds buffer too small file nfds entries");
6466
65__fortify_function int67__fortify_function __attr_access ((__write_only__, 1, 2)) int
66ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,68ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
67 const __sigset_t *__ss)69 const __sigset_t *__ss)
68{70{
lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h created+31
...@@ -0,0 +1,31 @@
1/* Definition of PTHREAD_STACK_MIN, possibly dynamic.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU 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 PTHREAD_STACK_MIN
20# if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE
21# ifndef __ASSEMBLER__
22# define __SC_THREAD_STACK_MIN_VALUE 75
23__BEGIN_DECLS
24extern long int __sysconf (int __name) __THROW;
25__END_DECLS
26# define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
27# endif
28# else
29# include <bits/pthread_stack_min.h>
30# endif
31#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU 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/* Minimum size for a thread. We are free to choose a reasonable value. */
20#define PTHREAD_STACK_MIN 16384
\ No newline at end of file
lib/libc/include/generic-glibc/bits/sem.h+1
...@@ -22,6 +22,7 @@...@@ -22,6 +22,7 @@
22#include <sys/types.h>22#include <sys/types.h>
23#include <bits/timesize.h>23#include <bits/timesize.h>
24#include <bits/types/struct_semid_ds.h>24#include <bits/types/struct_semid_ds.h>
25#include <bits/types/struct_semid64_ds.h>
2526
26/* Flags for `semop'. */27/* Flags for `semop'. */
27#define SEM_UNDO 0x1000 /* undo the operation on exit */28#define SEM_UNDO 0x1000 /* undo the operation on exit */
lib/libc/include/generic-glibc/bits/shm.h+1
...@@ -43,6 +43,7 @@ __BEGIN_DECLS...@@ -43,6 +43,7 @@ __BEGIN_DECLS
43typedef __syscall_ulong_t shmatt_t;43typedef __syscall_ulong_t shmatt_t;
4444
45#include <bits/types/struct_shmid_ds.h>45#include <bits/types/struct_shmid_ds.h>
46#include <bits/types/struct_shmid64_ds.h>
4647
47#ifdef __USE_MISC48#ifdef __USE_MISC
4849
lib/libc/include/generic-glibc/bits/sigstksz.h created+33
...@@ -0,0 +1,33 @@
1/* Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version.
2 Copyright (C) 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 _SIGNAL_H
20# error "Never include <bits/sigstksz.h> directly; use <signal.h> instead."
21#endif
22
23#if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE
24# include <unistd.h>
25
26/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */
27# undef SIGSTKSZ
28# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
29
30/* Minimum stack size for a signal handler: SIGSTKSZ. */
31# undef MINSIGSTKSZ
32# define MINSIGSTKSZ SIGSTKSZ
33#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/socket-constants.h+40-9
...@@ -32,19 +32,50 @@...@@ -32,19 +32,50 @@
32#define SO_OOBINLINE 1032#define SO_OOBINLINE 10
33#define SO_RCVBUF 833#define SO_RCVBUF 8
34#define SO_RCVLOWAT 1834#define SO_RCVLOWAT 18
35#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
41#define SO_REUSEADDR 235#define SO_REUSEADDR 2
42#define SO_SNDBUF 736#define SO_SNDBUF 7
43#define SO_SNDLOWAT 1937#define SO_SNDLOWAT 19
38#define SO_TYPE 3
39
44#if (__TIMESIZE == 64 && __WORDSIZE == 32 \40#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
45 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))41 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
42# define SO_RCVTIMEO 66
46# define SO_SNDTIMEO 6743# define SO_SNDTIMEO 67
44# define SO_TIMESTAMP 63
45# define SO_TIMESTAMPNS 64
46# define SO_TIMESTAMPING 65
47#else47#else
48# define SO_SNDTIMEO 21
49#endif
50#define SO_TYPE 3
\ No newline at end of file
48# if __TIMESIZE == 64
49# define SO_RCVTIMEO 20
50# define SO_SNDTIMEO 21
51# define SO_TIMESTAMP 29
52# define SO_TIMESTAMPNS 35
53# define SO_TIMESTAMPING 37
54# else
55# define SO_RCVTIMEO_OLD 20
56# define SO_SNDTIMEO_OLD 21
57# define SO_RCVTIMEO_NEW 66
58# define SO_SNDTIMEO_NEW 67
59
60# define SO_TIMESTAMP_OLD 29
61# define SO_TIMESTAMPNS_OLD 35
62# define SO_TIMESTAMPING_OLD 37
63# define SO_TIMESTAMP_NEW 63
64# define SO_TIMESTAMPNS_NEW 64
65# define SO_TIMESTAMPING_NEW 65
66
67# ifdef __USE_TIME_BITS64
68# define SO_RCVTIMEO SO_RCVTIMEO_NEW
69# define SO_SNDTIMEO SO_SNDTIMEO_NEW
70# define SO_TIMESTAMP SO_TIMESTAMP_NEW
71# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
72# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
73# else
74# define SO_RCVTIMEO SO_RCVTIMEO_OLD
75# define SO_SNDTIMEO SO_SNDTIMEO_OLD
76# define SO_TIMESTAMP SO_TIMESTAMP_OLD
77# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
78# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
79# endif
80# endif
81#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/struct_stat.h+50-39
...@@ -29,28 +29,31 @@...@@ -29,28 +29,31 @@
29/* Structure describing file characteristics. */29/* Structure describing file characteristics. */
30struct stat30struct stat
31 {31 {
32# ifdef __USE_TIME_BITS64
33# include <bits/struct_stat_time64_helper.h>
34# else
32 unsigned long int st_dev;35 unsigned long int st_dev;
33 long int st_pad1[3];36 long int st_pad1[3];
34#ifndef __USE_FILE_OFFSET6437# ifndef __USE_FILE_OFFSET64
35 __ino_t st_ino; /* File serial number. */38 __ino_t st_ino; /* File serial number. */
36#else39# else
37 __ino64_t st_ino; /* File serial number. */40 __ino64_t st_ino; /* File serial number. */
38#endif41# endif
39 __mode_t st_mode; /* File mode. */42 __mode_t st_mode; /* File mode. */
40 __nlink_t st_nlink; /* Link count. */43 __nlink_t st_nlink; /* Link count. */
41 __uid_t st_uid; /* User ID of the file's owner. */44 __uid_t st_uid; /* User ID of the file's owner. */
42 __gid_t st_gid; /* Group ID of the file's group.*/45 __gid_t st_gid; /* Group ID of the file's group.*/
43 unsigned long int st_rdev; /* Device number, if device. */46 unsigned long int st_rdev; /* Device number, if device. */
44#ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
45 long int st_pad2[2];48 long int st_pad2[2];
46 __off_t st_size; /* Size of file, in bytes. */49 __off_t st_size; /* Size of file, in bytes. */
47 /* SVR4 added this extra long to allow for expansion of off_t. */50 /* SVR4 added this extra long to allow for expansion of off_t. */
48 long int st_pad3;51 long int st_pad3;
49#else52# else
50 long int st_pad2[3];53 long int st_pad2[3];
51 __off64_t st_size; /* Size of file, in bytes. */54 __off64_t st_size; /* Size of file, in bytes. */
52#endif55# endif
53#ifdef __USE_XOPEN2K856# ifdef __USE_XOPEN2K8
54 /* Nanosecond resolution timestamps are stored in a format57 /* Nanosecond resolution timestamps are stored in a format
55 equivalent to 'struct timespec'. This is the type used58 equivalent to 'struct timespec'. This is the type used
56 whenever possible but the Unix namespace rules do not allow the59 whenever possible but the Unix namespace rules do not allow the
...@@ -60,30 +63,34 @@ struct stat...@@ -60,30 +63,34 @@ struct stat
60 struct timespec st_atim; /* Time of last access. */63 struct timespec st_atim; /* Time of last access. */
61 struct timespec st_mtim; /* Time of last modification. */64 struct timespec st_mtim; /* Time of last modification. */
62 struct timespec st_ctim; /* Time of last status change. */65 struct timespec st_ctim; /* Time of last status change. */
63# define st_atime st_atim.tv_sec /* Backward compatibility. */66# define st_atime st_atim.tv_sec /* Backward compatibility. */
64# define st_mtime st_mtim.tv_sec67# define st_mtime st_mtim.tv_sec
65# define st_ctime st_ctim.tv_sec68# define st_ctime st_ctim.tv_sec
66#else69# else
67 __time_t st_atime; /* Time of last access. */70 __time_t st_atime; /* Time of last access. */
68 unsigned long int st_atimensec; /* Nscecs of last access. */71 unsigned long int st_atimensec; /* Nscecs of last access. */
69 __time_t st_mtime; /* Time of last modification. */72 __time_t st_mtime; /* Time of last modification. */
70 unsigned long int st_mtimensec; /* Nsecs of last modification. */73 unsigned long int st_mtimensec; /* Nsecs of last modification. */
71 __time_t st_ctime; /* Time of last status change. */74 __time_t st_ctime; /* Time of last status change. */
72 unsigned long int st_ctimensec; /* Nsecs of last status change. */75 unsigned long int st_ctimensec; /* Nsecs of last status change. */
73#endif76# endif
74 __blksize_t st_blksize; /* Optimal block size for I/O. */77 __blksize_t st_blksize; /* Optimal block size for I/O. */
75#ifndef __USE_FILE_OFFSET6478# ifndef __USE_FILE_OFFSET64
76 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */79 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
77#else80# else
78 long int st_pad4;81 long int st_pad4;
79 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */82 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
80#endif83# endif
81 long int st_pad5[14];84 long int st_pad5[14];
85# endif /* __USE_TIME_BITS64 */
82 };86 };
8387
84#ifdef __USE_LARGEFILE6488# ifdef __USE_LARGEFILE64
85struct stat6489struct stat64
86 {90 {
91# ifdef __USE_TIME_BITS64
92# include <bits/struct_stat_time64_helper.h>
93# else
87 unsigned long int st_dev;94 unsigned long int st_dev;
88 long int st_pad1[3];95 long int st_pad1[3];
89 __ino64_t st_ino; /* File serial number. */96 __ino64_t st_ino; /* File serial number. */
...@@ -94,7 +101,7 @@ struct stat64...@@ -94,7 +101,7 @@ struct stat64
94 unsigned long int st_rdev; /* Device number, if device. */101 unsigned long int st_rdev; /* Device number, if device. */
95 long int st_pad2[3];102 long int st_pad2[3];
96 __off64_t st_size; /* Size of file, in bytes. */103 __off64_t st_size; /* Size of file, in bytes. */
97# ifdef __USE_XOPEN2K8104# ifdef __USE_XOPEN2K8
98 /* Nanosecond resolution timestamps are stored in a format105 /* Nanosecond resolution timestamps are stored in a format
99 equivalent to 'struct timespec'. This is the type used106 equivalent to 'struct timespec'. This is the type used
100 whenever possible but the Unix namespace rules do not allow the107 whenever possible but the Unix namespace rules do not allow the
...@@ -104,44 +111,47 @@ struct stat64...@@ -104,44 +111,47 @@ struct stat64
104 struct timespec st_atim; /* Time of last access. */111 struct timespec st_atim; /* Time of last access. */
105 struct timespec st_mtim; /* Time of last modification. */112 struct timespec st_mtim; /* Time of last modification. */
106 struct timespec st_ctim; /* Time of last status change. */113 struct timespec st_ctim; /* Time of last status change. */
107# else114# else
108 __time_t st_atime; /* Time of last access. */115 __time_t st_atime; /* Time of last access. */
109 unsigned long int st_atimensec; /* Nscecs of last access. */116 unsigned long int st_atimensec; /* Nscecs of last access. */
110 __time_t st_mtime; /* Time of last modification. */117 __time_t st_mtime; /* Time of last modification. */
111 unsigned long int st_mtimensec; /* Nsecs of last modification. */118 unsigned long int st_mtimensec; /* Nsecs of last modification. */
112 __time_t st_ctime; /* Time of last status change. */119 __time_t st_ctime; /* Time of last status change. */
113 unsigned long int st_ctimensec; /* Nsecs of last status change. */120 unsigned long int st_ctimensec; /* Nsecs of last status change. */
114# endif121# endif
115 __blksize_t st_blksize; /* Optimal block size for I/O. */122 __blksize_t st_blksize; /* Optimal block size for I/O. */
116 long int st_pad3;123 long int st_pad3;
117 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */124 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
118 long int st_pad4[14];125 long int st_pad4[14];
126# endif /* __USE_TIME_BITS64 */
119 };127 };
120#endif128# endif /* __USE_LARGEFILE64 */
121#else129
130#else /* _MIPS_SIM != _ABIO32 */
131
122struct stat132struct stat
123 {133 {
124 __dev_t st_dev;134 __dev_t st_dev;
125 int st_pad1[3]; /* Reserved for st_dev expansion */135 int st_pad1[3]; /* Reserved for st_dev expansion */
126#ifndef __USE_FILE_OFFSET64136# ifndef __USE_FILE_OFFSET64
127 __ino_t st_ino;137 __ino_t st_ino;
128#else138# else
129 __ino64_t st_ino;139 __ino64_t st_ino;
130#endif140# endif
131 __mode_t st_mode;141 __mode_t st_mode;
132 __nlink_t st_nlink;142 __nlink_t st_nlink;
133 __uid_t st_uid;143 __uid_t st_uid;
134 __gid_t st_gid;144 __gid_t st_gid;
135 __dev_t st_rdev;145 __dev_t st_rdev;
136#if !defined __USE_FILE_OFFSET64146# if !defined __USE_FILE_OFFSET64
137 unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */147 unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
138 __off_t st_size;148 __off_t st_size;
139 int st_pad3;149 int st_pad3;
140#else150# else
141 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */151 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
142 __off64_t st_size;152 __off64_t st_size;
143#endif153# endif
144#ifdef __USE_XOPEN2K8154# ifdef __USE_XOPEN2K8
145 /* Nanosecond resolution timestamps are stored in a format155 /* Nanosecond resolution timestamps are stored in a format
146 equivalent to 'struct timespec'. This is the type used156 equivalent to 'struct timespec'. This is the type used
147 whenever possible but the Unix namespace rules do not allow the157 whenever possible but the Unix namespace rules do not allow the
...@@ -151,24 +161,24 @@ struct stat...@@ -151,24 +161,24 @@ struct stat
151 struct timespec st_atim; /* Time of last access. */161 struct timespec st_atim; /* Time of last access. */
152 struct timespec st_mtim; /* Time of last modification. */162 struct timespec st_mtim; /* Time of last modification. */
153 struct timespec st_ctim; /* Time of last status change. */163 struct timespec st_ctim; /* Time of last status change. */
154# define st_atime st_atim.tv_sec /* Backward compatibility. */164# define st_atime st_atim.tv_sec /* Backward compatibility. */
155# define st_mtime st_mtim.tv_sec165# define st_mtime st_mtim.tv_sec
156# define st_ctime st_ctim.tv_sec166# define st_ctime st_ctim.tv_sec
157#else167# else
158 __time_t st_atime; /* Time of last access. */168 __time_t st_atime; /* Time of last access. */
159 unsigned long int st_atimensec; /* Nscecs of last access. */169 unsigned long int st_atimensec; /* Nscecs of last access. */
160 __time_t st_mtime; /* Time of last modification. */170 __time_t st_mtime; /* Time of last modification. */
161 unsigned long int st_mtimensec; /* Nsecs of last modification. */171 unsigned long int st_mtimensec; /* Nsecs of last modification. */
162 __time_t st_ctime; /* Time of last status change. */172 __time_t st_ctime; /* Time of last status change. */
163 unsigned long int st_ctimensec; /* Nsecs of last status change. */173 unsigned long int st_ctimensec; /* Nsecs of last status change. */
164#endif174# endif
165 __blksize_t st_blksize;175 __blksize_t st_blksize;
166 unsigned int st_pad4;176 unsigned int st_pad4;
167#ifndef __USE_FILE_OFFSET64177# ifndef __USE_FILE_OFFSET64
168 __blkcnt_t st_blocks;178 __blkcnt_t st_blocks;
169#else179# else
170 __blkcnt64_t st_blocks;180 __blkcnt64_t st_blocks;
171#endif181# endif
172 int st_pad5[14];182 int st_pad5[14];
173 };183 };
174184
...@@ -185,7 +195,7 @@ struct stat64...@@ -185,7 +195,7 @@ struct stat64
185 __dev_t st_rdev;195 __dev_t st_rdev;
186 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */196 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
187 __off64_t st_size;197 __off64_t st_size;
188# ifdef __USE_XOPEN2K8198# ifdef __USE_XOPEN2K8
189 /* Nanosecond resolution timestamps are stored in a format199 /* Nanosecond resolution timestamps are stored in a format
190 equivalent to 'struct timespec'. This is the type used200 equivalent to 'struct timespec'. This is the type used
191 whenever possible but the Unix namespace rules do not allow the201 whenever possible but the Unix namespace rules do not allow the
...@@ -195,20 +205,21 @@ struct stat64...@@ -195,20 +205,21 @@ struct stat64
195 struct timespec st_atim; /* Time of last access. */205 struct timespec st_atim; /* Time of last access. */
196 struct timespec st_mtim; /* Time of last modification. */206 struct timespec st_mtim; /* Time of last modification. */
197 struct timespec st_ctim; /* Time of last status change. */207 struct timespec st_ctim; /* Time of last status change. */
198# else208# else
199 __time_t st_atime; /* Time of last access. */209 __time_t st_atime; /* Time of last access. */
200 unsigned long int st_atimensec; /* Nscecs of last access. */210 unsigned long int st_atimensec; /* Nscecs of last access. */
201 __time_t st_mtime; /* Time of last modification. */211 __time_t st_mtime; /* Time of last modification. */
202 unsigned long int st_mtimensec; /* Nsecs of last modification. */212 unsigned long int st_mtimensec; /* Nsecs of last modification. */
203 __time_t st_ctime; /* Time of last status change. */213 __time_t st_ctime; /* Time of last status change. */
204 unsigned long int st_ctimensec; /* Nsecs of last status change. */214 unsigned long int st_ctimensec; /* Nsecs of last status change. */
205# endif215# endif
206 __blksize_t st_blksize;216 __blksize_t st_blksize;
207 unsigned int st_pad3;217 unsigned int st_pad3;
208 __blkcnt64_t st_blocks;218 __blkcnt64_t st_blocks;
209 int st_pad4[14];219 int st_pad4[14];
210};220};
211#endif221#endif
222
212#endif223#endif
213224
214/* Tell code we have these members. */225/* Tell code we have these members. */
lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h created+66
...@@ -0,0 +1,66 @@
1/* Definition for helper to define struct stat with 64-bit time.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU 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 /* Content of internal __stat64_t64 struct. */
20 __dev_t st_dev; /* Device. */
21 __ino64_t st_ino; /* file serial number. */
22 __mode_t st_mode; /* File mode. */
23 __nlink_t st_nlink; /* Link count. */
24 __uid_t st_uid; /* User ID of the file's owner. */
25 __gid_t st_gid; /* Group ID of the file's group. */
26 __dev_t st_rdev; /* Device number, if device. */
27 __off64_t st_size; /* Size of file, in bytes. */
28 __blksize_t st_blksize; /* Optimal block size for I/O. */
29 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
30#ifdef __USE_XOPEN2K8
31# ifndef __struct_timespec
32# define __struct_timespec struct timespec
33# endif
34 /* Nanosecond resolution timestamps are stored in a format
35 equivalent to 'struct timespec'. This is the type used
36 whenever possible but the Unix namespace rules do not allow the
37 identifier 'timespec' to appear in the <sys/stat.h> header.
38 Therefore we have to handle the use of this header in strictly
39 standard-compliant sources special. */
40 __struct_timespec st_atim;
41 __struct_timespec st_mtim;
42 __struct_timespec st_ctim;
43# define st_atime st_atim.tv_sec
44# define st_mtime st_mtim.tv_sec
45# define st_ctime st_ctim.tv_sec
46# undef __struct_timespec
47#else
48/* The definition should be equal to the 'struct __timespec64' internal
49 layout. */
50# if __BYTE_ORDER == __BIG_ENDIAN
51# define __fieldts64(name) \
52 __time64_t name; __int32_t :32; __int32_t name ## nsec
53# else
54# define __fieldts64(name) \
55 __time64_t name; __int32_t name ## nsec; __int32_t :32
56# endif
57
58 __fieldts64 (st_atime);
59 __fieldts64 (st_mtime);
60 __fieldts64 (st_ctime);
61
62 unsigned long int __glibc_reserved4;
63 unsigned long int __glibc_reserved5;
64
65# undef __fieldts64
66#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.10. */2/* The system call list corresponds to kernel 5.13. */
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 3302408#define __GLIBC_LINUX_VERSION_CODE 331008
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
...@@ -291,6 +291,10 @@...@@ -291,6 +291,10 @@
291# define SYS_epoll_pwait __NR_epoll_pwait291# define SYS_epoll_pwait __NR_epoll_pwait
292#endif292#endif
293293
294#ifdef __NR_epoll_pwait2
295# define SYS_epoll_pwait2 __NR_epoll_pwait2
296#endif
297
294#ifdef __NR_epoll_wait298#ifdef __NR_epoll_wait
295# define SYS_epoll_wait __NR_epoll_wait299# define SYS_epoll_wait __NR_epoll_wait
296#endif300#endif
...@@ -803,6 +807,18 @@...@@ -803,6 +807,18 @@
803# define SYS_kill __NR_kill807# define SYS_kill __NR_kill
804#endif808#endif
805809
810#ifdef __NR_landlock_add_rule
811# define SYS_landlock_add_rule __NR_landlock_add_rule
812#endif
813
814#ifdef __NR_landlock_create_ruleset
815# define SYS_landlock_create_ruleset __NR_landlock_create_ruleset
816#endif
817
818#ifdef __NR_landlock_restrict_self
819# define SYS_landlock_restrict_self __NR_landlock_restrict_self
820#endif
821
806#ifdef __NR_lchown822#ifdef __NR_lchown
807# define SYS_lchown __NR_lchown823# define SYS_lchown __NR_lchown
808#endif824#endif
...@@ -939,6 +955,10 @@...@@ -939,6 +955,10 @@
939# define SYS_mount __NR_mount955# define SYS_mount __NR_mount
940#endif956#endif
941957
958#ifdef __NR_mount_setattr
959# define SYS_mount_setattr __NR_mount_setattr
960#endif
961
942#ifdef __NR_move_mount962#ifdef __NR_move_mount
943# define SYS_move_mount __NR_move_mount963# define SYS_move_mount __NR_move_mount
944#endif964#endif
lib/libc/include/generic-glibc/bits/time.h+10
...@@ -77,6 +77,16 @@ __BEGIN_DECLS...@@ -77,6 +77,16 @@ __BEGIN_DECLS
77/* Tune a POSIX clock. */77/* Tune a POSIX clock. */
78extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;78extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
7979
80#ifdef __USE_TIME_BITS64
81# if defined(__REDIRECT_NTH)
82extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id,
83 struct timex *__utx),
84 __clock_adjtime64);
85# else
86# define clock_adjtime __clock_adjtime64
87# endif
88#endif
89
80__END_DECLS90__END_DECLS
81#endif /* use GNU */91#endif /* use GNU */
8292
lib/libc/include/generic-glibc/bits/timex.h+31
...@@ -25,6 +25,36 @@...@@ -25,6 +25,36 @@
2525
26struct timex26struct timex
27{27{
28# ifdef __USE_TIME_BITS64
29 unsigned int modes; /* mode selector */
30 int :32; /* pad */
31 long long offset; /* time offset (usec) */
32 long long freq; /* frequency offset (scaled ppm) */
33 long long maxerror; /* maximum error (usec) */
34 long long esterror; /* estimated error (usec) */
35 int status; /* clock command/status */
36 int :32; /* pad */
37 long long constant; /* pll time constant */
38 long long precision; /* clock precision (usec) (read only) */
39 long long tolerance; /* clock frequency tolerance (ppm) (ro) */
40 struct timeval time; /* (read only, except for ADJ_SETOFFSET) */
41 long long tick; /* (modified) usecs between clock ticks */
42 long long ppsfreq; /* pps frequency (scaled ppm) (ro) */
43 long long jitter; /* pps jitter (us) (ro) */
44 int shift; /* interval duration (s) (shift) (ro) */
45 int :32; /* pad */
46 long long stabil; /* pps stability (scaled ppm) (ro) */
47 long long jitcnt; /* jitter limit exceeded (ro) */
48 long long calcnt; /* calibration intervals (ro) */
49 long long errcnt; /* calibration errors (ro) */
50 long long stbcnt; /* stability limit exceeded (ro) */
51
52 int tai; /* TAI offset (ro) */
53
54 int :32; int :32; int :32; int :32;
55 int :32; int :32; int :32; int :32;
56 int :32; int :32; int :32;
57# else
28 unsigned int modes; /* mode selector */58 unsigned int modes; /* mode selector */
29 __syscall_slong_t offset; /* time offset (usec) */59 __syscall_slong_t offset; /* time offset (usec) */
30 __syscall_slong_t freq; /* frequency offset (scaled ppm) */60 __syscall_slong_t freq; /* frequency offset (scaled ppm) */
...@@ -51,6 +81,7 @@ struct timex...@@ -51,6 +81,7 @@ struct timex
51 int :32; int :32; int :32; int :32;81 int :32; int :32; int :32; int :32;
52 int :32; int :32; int :32; int :32;82 int :32; int :32; int :32; int :32;
53 int :32; int :32; int :32;83 int :32; int :32; int :32;
84# endif
54};85};
5586
56/* Mode codes (timex.mode) */87/* Mode codes (timex.mode) */
lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h created+30
...@@ -0,0 +1,30 @@
1/* Generic implementation of the SysV message struct msqid64_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_MSG_H
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif
22
23#if __TIMESIZE == 64
24# define __msqid64_ds msqid_ds
25#else
26struct __msqid64_ds
27{
28# include <bits/types/struct_msqid64_ds_helper.h>
29};
30#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h created+30
...@@ -0,0 +1,30 @@
1/* Common definitions for struct msqid_ds with 64-bit time.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU 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 /* Content of internal __msqid64_ds. */
20 struct ipc_perm msg_perm; /* structure describing operation permission */
21 __time64_t msg_stime; /* time of last msgsnd command */
22 __time64_t msg_rtime; /* time of last msgsnd command */
23 __time64_t msg_ctime; /* time of last change */
24 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
25 msgqnum_t msg_qnum; /* number of messages currently on queue */
26 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
27 __pid_t msg_lspid; /* pid of last msgsnd() */
28 __pid_t msg_lrpid; /* pid of last msgrcv() */
29 unsigned long int __glibc_reserved4;
30 unsigned long int __glibc_reserved5;
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h+9-3
...@@ -20,23 +20,28 @@...@@ -20,23 +20,28 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29 __time_t msg_stime; /* time of last msgsnd command */34 __time_t msg_stime; /* time of last msgsnd command */
30 unsigned long int __msg_stime_high;35 unsigned long int __msg_stime_high;
31 __time_t msg_rtime; /* time of last msgsnd command */36 __time_t msg_rtime; /* time of last msgsnd command */
32 unsigned long int __msg_rtime_high;37 unsigned long int __msg_rtime_high;
33 __time_t msg_ctime; /* time of last change */38 __time_t msg_ctime; /* time of last change */
34 unsigned long int __msg_ctime_high;39 unsigned long int __msg_ctime_high;
35#else40# else
36 __time_t msg_stime; /* time of last msgsnd command */41 __time_t msg_stime; /* time of last msgsnd command */
37 __time_t msg_rtime; /* time of last msgsnd command */42 __time_t msg_rtime; /* time of last msgsnd command */
38 __time_t msg_ctime; /* time of last change */43 __time_t msg_ctime; /* time of last change */
39#endif44# endif
40 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
41 msgqnum_t msg_qnum; /* number of messages currently on queue */46 msgqnum_t msg_qnum; /* number of messages currently on queue */
42 msglen_t msg_qbytes; /* max number of bytes allowed on queue */47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -44,4 +49,5 @@ struct msqid_ds...@@ -44,4 +49,5 @@ struct msqid_ds
44 __pid_t msg_lrpid; /* pid of last msgrcv() */49 __pid_t msg_lrpid; /* pid of last msgrcv() */
45 __syscall_ulong_t __glibc_reserved4;50 __syscall_ulong_t __glibc_reserved4;
46 __syscall_ulong_t __glibc_reserved5;51 __syscall_ulong_t __glibc_reserved5;
52#endif
47};53};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h created+30
...@@ -0,0 +1,30 @@
1/* Generic implementation of the semaphore struct semid64_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_SEM_H
20# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
21#endif
22
23#if __TIMESIZE == 64
24# define __semid64_ds semid_ds
25#else
26struct __semid64_ds
27{
28# include <bits/types/struct_semid64_ds_helper.h>
29};
30#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h created+25
...@@ -0,0 +1,25 @@
1/* Common definitions for struct semid_ds with 64-bit time.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 /* Content of internal __semid64_ds. */
20 struct ipc_perm sem_perm; /* operation permission struct */
21 __time64_t sem_otime; /* last semop() time */
22 __time64_t sem_ctime; /* last time changed by semctl() */
23 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
24 unsigned long int __glibc_reserved3;
25 unsigned long int __glibc_reserved4;
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h+7-3
...@@ -23,17 +23,21 @@...@@ -23,17 +23,21 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 __time_t sem_otime; /* last semop() time */31 __time_t sem_otime; /* last semop() time */
29 __syscall_ulong_t __sem_otime_high;32 __syscall_ulong_t __sem_otime_high;
30 __time_t sem_ctime; /* last time changed by semctl() */33 __time_t sem_ctime; /* last time changed by semctl() */
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
32#else35# else
33 __time_t sem_otime;36 __time_t sem_otime;
34 __time_t sem_ctime;37 __time_t sem_ctime;
35#endif38# endif
36 __syscall_ulong_t sem_nsems; /* number of semaphores in set */39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
37 __syscall_ulong_t __glibc_reserved3;40 __syscall_ulong_t __glibc_reserved3;
38 __syscall_ulong_t __glibc_reserved4;41 __syscall_ulong_t __glibc_reserved4;
42#endif
39};43};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h created+30
...@@ -0,0 +1,30 @@
1/* Generic implementation of the shared memory struct shmid_ds.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef _SYS_SHM_H
20# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
21#endif
22
23#if __TIMESIZE == 64
24# define __shmid64_ds shmid_ds
25#else
26struct __shmid64_ds
27{
28# include <bits/types/struct_shmid64_ds_helper.h>
29};
30#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h created+28
...@@ -0,0 +1,28 @@
1/* Common definitions for struct semid_ds with 64-bit time.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 struct ipc_perm shm_perm; /* operation permission struct */
20 size_t shm_segsz; /* size of segment in bytes */
21 __time64_t shm_atime; /* time of last shmat() */
22 __time64_t shm_dtime; /* time of last shmdt() */
23 __time64_t shm_ctime; /* time of last change by shmctl() */
24 __pid_t shm_cpid; /* pid of creator */
25 __pid_t shm_lpid; /* pid of last shmop */
26 shmatt_t shm_nattch; /* number of current attaches */
27 unsigned long int __glibc_reserved5;
28 unsigned long int __glibc_reserved6;
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h+7-3
...@@ -23,23 +23,27 @@...@@ -23,23 +23,27 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 unsigned long int __shm_atime_high;33 unsigned long int __shm_atime_high;
31 __time_t shm_dtime; /* time of last shmdt() */34 __time_t shm_dtime; /* time of last shmdt() */
32 unsigned long int __shm_dtime_high;35 unsigned long int __shm_dtime_high;
33 __time_t shm_ctime; /* time of last change by shmctl() */36 __time_t shm_ctime; /* time of last change by shmctl() */
34 unsigned long int __shm_ctime_high;37 unsigned long int __shm_ctime_high;
35#else38# else
36 __time_t shm_atime; /* time of last shmat() */39 __time_t shm_atime; /* time of last shmat() */
37 __time_t shm_dtime; /* time of last shmdt() */40 __time_t shm_dtime; /* time of last shmdt() */
38 __time_t shm_ctime; /* time of last change by shmctl() */41 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif42# endif
40 __pid_t shm_cpid; /* pid of creator */43 __pid_t shm_cpid; /* pid of creator */
41 __pid_t shm_lpid; /* pid of last shmop */44 __pid_t shm_lpid; /* pid of last shmop */
42 shmatt_t shm_nattch; /* number of current attaches */45 shmatt_t shm_nattch; /* number of current attaches */
43 __syscall_ulong_t __glibc_reserved5;46 __syscall_ulong_t __glibc_reserved5;
44 __syscall_ulong_t __glibc_reserved6;47 __syscall_ulong_t __glibc_reserved6;
48#endif
45 };49 };
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_timespec.h+6-1
...@@ -4,15 +4,20 @@...@@ -4,15 +4,20 @@
44
5#include <bits/types.h>5#include <bits/types.h>
6#include <bits/endian.h>6#include <bits/endian.h>
7#include <bits/types/time_t.h>
78
8/* POSIX.1b structure for a time value. This is like a `struct timeval' but9/* POSIX.1b structure for a time value. This is like a `struct timeval' but
9 has nanoseconds instead of microseconds. */10 has nanoseconds instead of microseconds. */
10struct timespec11struct timespec
11{12{
13#ifdef __USE_TIME_BITS64
14 __time64_t tv_sec; /* Seconds. */
15#else
12 __time_t tv_sec; /* Seconds. */16 __time_t tv_sec; /* Seconds. */
17#endif
13#if __WORDSIZE == 64 \18#if __WORDSIZE == 64 \
14 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \19 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
15 || __TIMESIZE == 3220 || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
16 __syscall_slong_t tv_nsec; /* Nanoseconds. */21 __syscall_slong_t tv_nsec; /* Nanoseconds. */
17#else22#else
18# if __BYTE_ORDER == __BIG_ENDIAN23# if __BYTE_ORDER == __BIG_ENDIAN
lib/libc/include/generic-glibc/bits/types/struct_timeval.h+5
...@@ -7,7 +7,12 @@...@@ -7,7 +7,12 @@
7 microsecond but also has a range of years. */7 microsecond but also has a range of years. */
8struct timeval8struct timeval
9{9{
10#ifdef __USE_TIME_BITS64
11 __time64_t tv_sec; /* Seconds. */
12 __suseconds64_t tv_usec; /* Microseconds. */
13#else
10 __time_t tv_sec; /* Seconds. */14 __time_t tv_sec; /* Seconds. */
11 __suseconds_t tv_usec; /* Microseconds. */15 __suseconds_t tv_usec; /* Microseconds. */
16#endif
12};17};
13#endif18#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/time_t.h+4
...@@ -4,6 +4,10 @@...@@ -4,6 +4,10 @@
4#include <bits/types.h>4#include <bits/types.h>
55
6/* Returned by `time'. */6/* Returned by `time'. */
7#ifdef __USE_TIME_BITS64
8typedef __time64_t time_t;
9#else
7typedef __time_t time_t;10typedef __time_t time_t;
11#endif
812
9#endif13#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/unistd_ext.h+24-1
...@@ -33,4 +33,27 @@...@@ -33,4 +33,27 @@
33 not detached and has not been joined. */33 not detached and has not been joined. */
34extern __pid_t gettid (void) __THROW;34extern __pid_t gettid (void) __THROW;
3535
36#endif
\ No newline at end of file
36#ifdef __has_include
37# if __has_include ("linux/close_range.h")
38# include "linux/close_range.h"
39# endif
40#endif
41/* Unshare the file descriptor table before closing file descriptors. */
42#ifndef CLOSE_RANGE_UNSHARE
43# define CLOSE_RANGE_UNSHARE (1U << 1)
44#endif
45/* Set the FD_CLOEXEC bit instead of closing the file descriptor. */
46#ifndef CLOSE_RANGE_CLOEXEC
47# define CLOSE_RANGE_CLOEXEC (1U << 2)
48#endif
49
50/* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS
51 are define by the CLOSE_RANGE prefix. This function behaves like close
52 on the range, but in a fail-safe where it will either fail and not close
53 any file descriptor or close all of them. Gaps where the file descriptor
54 is invalid are ignored. Returns 0 on successor or -1 for failure (and
55 sets errno accordingly). */
56extern int close_range (unsigned int __fd, unsigned int __max_fd,
57 int __flags) __THROW;
58
59#endif /* __USE_GNU */
\ No newline at end of file
lib/libc/include/generic-glibc/elf.h+6-1
...@@ -336,7 +336,8 @@ typedef struct...@@ -336,7 +336,8 @@ typedef struct
336#define EM_BA2 202 /* Beyond BA2 */336#define EM_BA2 202 /* Beyond BA2 */
337#define EM_XCORE 203 /* XMOS xCORE */337#define EM_XCORE 203 /* XMOS xCORE */
338#define EM_MCHP_PIC 204 /* Microchip 8-bit PIC(r) */338#define EM_MCHP_PIC 204 /* Microchip 8-bit PIC(r) */
339 /* reserved 205-209 */339#define EM_INTELGT 205 /* Intel Graphics Technology */
340 /* reserved 206-209 */
340#define EM_KM32 210 /* KM211 KM32 */341#define EM_KM32 210 /* KM211 KM32 */
341#define EM_KMX32 211 /* KM211 KMX32 */342#define EM_KMX32 211 /* KM211 KMX32 */
342#define EM_EMX16 212 /* KM211 KMX16 */343#define EM_EMX16 212 /* KM211 KMX16 */
...@@ -813,6 +814,10 @@ typedef struct...@@ -813,6 +814,10 @@ typedef struct
813 address keys. */814 address keys. */
814#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication815#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
815 generic key. */816 generic key. */
817#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* AArch64 tagged address
818 control. */
819#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
820 enabled keys. */
816#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */821#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
817#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */822#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
818#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */823#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
lib/libc/include/generic-glibc/fcntl.h+20-7
...@@ -172,17 +172,30 @@ typedef __pid_t pid_t;...@@ -172,17 +172,30 @@ typedef __pid_t pid_t;
172172
173 This function is a cancellation point and therefore not marked with173 This function is a cancellation point and therefore not marked with
174 __THROW. */174 __THROW. */
175#ifndef __USE_FILE_OFFSET64175#ifndef __USE_TIME_BITS64
176# ifndef __USE_FILE_OFFSET64
176extern int fcntl (int __fd, int __cmd, ...);177extern int fcntl (int __fd, int __cmd, ...);
177#else
178# ifdef __REDIRECT
179extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
180# else178# else
181# define fcntl fcntl64179# ifdef __REDIRECT
180extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
181# else
182# define fcntl fcntl64
183# endif
182# endif184# endif
183#endif185# ifdef __USE_LARGEFILE64
184#ifdef __USE_LARGEFILE64
185extern int fcntl64 (int __fd, int __cmd, ...);186extern int fcntl64 (int __fd, int __cmd, ...);
187# endif
188#else /* __USE_TIME_BITS64 */
189# ifdef __REDIRECT
190extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
191 __fcntl_time64) __THROW;
192extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
193 __fcntl_time64) __THROW;
194# else
195extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
196# define fcntl64 __fcntl_time64
197# define fcntl __fcntl_time64
198# endif
186#endif199#endif
187200
188/* Open FILE and return a new file descriptor for it, or -1 on error.201/* Open FILE and return a new file descriptor for it, or -1 on error.
lib/libc/include/generic-glibc/features-time64.h created+37
...@@ -0,0 +1,37 @@
1/* Features part to handle 64-bit time_t support.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU 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/* We need to know the word size in order to check the time size. */
20#include <bits/wordsize.h>
21#include <bits/timesize.h>
22
23#if defined _TIME_BITS
24# if _TIME_BITS == 64
25# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
26# error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
27# elif __TIMESIZE == 32
28# define __USE_TIME_BITS64 1
29# endif
30# elif _TIME_BITS == 32
31# if __TIMESIZE > 32
32# error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
33# endif
34# else
35# error Invalid _TIME_BITS value (can only be 32 or 64-bit)
36# endif
37#endif
\ No newline at end of file
lib/libc/include/generic-glibc/features.h+16-1
...@@ -33,6 +33,8 @@...@@ -33,6 +33,8 @@
33 Extensions to ISO C11 from TS 18661-4:2015.33 Extensions to ISO C11 from TS 18661-4:2015.
34 __STDC_WANT_IEC_60559_TYPES_EXT__34 __STDC_WANT_IEC_60559_TYPES_EXT__
35 Extensions to ISO C11 from TS 18661-3:2015.35 Extensions to ISO C11 from TS 18661-3:2015.
36 __STDC_WANT_IEC_60559_EXT__
37 ISO C2X interfaces defined only in Annex F.
3638
37 _POSIX_SOURCE IEEE Std 1003.1.39 _POSIX_SOURCE IEEE Std 1003.1.
38 _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;40 _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
...@@ -48,6 +50,8 @@...@@ -48,6 +50,8 @@
48 _LARGEFILE64_SOURCE Additional functionality from LFS for large files.50 _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
49 _FILE_OFFSET_BITS=N Select default filesystem interface.51 _FILE_OFFSET_BITS=N Select default filesystem interface.
50 _ATFILE_SOURCE Additional *at interfaces.52 _ATFILE_SOURCE Additional *at interfaces.
53 _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
54 MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
51 _GNU_SOURCE All of the above, plus GNU extensions.55 _GNU_SOURCE All of the above, plus GNU extensions.
52 _DEFAULT_SOURCE The default set of features (taking precedence over56 _DEFAULT_SOURCE The default set of features (taking precedence over
53 __STRICT_ANSI__).57 __STRICT_ANSI__).
...@@ -94,6 +98,8 @@...@@ -94,6 +98,8 @@
94 __USE_FILE_OFFSET64 Define 64bit interface as default.98 __USE_FILE_OFFSET64 Define 64bit interface as default.
95 __USE_MISC Define things from 4.3BSD or System V Unix.99 __USE_MISC Define things from 4.3BSD or System V Unix.
96 __USE_ATFILE Define *at interfaces and AT_* constants for them.100 __USE_ATFILE Define *at interfaces and AT_* constants for them.
101 __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
102 MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
97 __USE_GNU Define GNU extensions.103 __USE_GNU Define GNU extensions.
98 __USE_FORTIFY_LEVEL Additional security measures used, according to level.104 __USE_FORTIFY_LEVEL Additional security measures used, according to level.
99105
...@@ -137,6 +143,7 @@...@@ -137,6 +143,7 @@
137#undef __USE_FILE_OFFSET64143#undef __USE_FILE_OFFSET64
138#undef __USE_MISC144#undef __USE_MISC
139#undef __USE_ATFILE145#undef __USE_ATFILE
146#undef __USE_DYNAMIC_STACK_SIZE
140#undef __USE_GNU147#undef __USE_GNU
141#undef __USE_FORTIFY_LEVEL148#undef __USE_FORTIFY_LEVEL
142#undef __KERNEL_STRICT_NAMES149#undef __KERNEL_STRICT_NAMES
...@@ -213,6 +220,8 @@...@@ -213,6 +220,8 @@
213# define _DEFAULT_SOURCE 1220# define _DEFAULT_SOURCE 1
214# undef _ATFILE_SOURCE221# undef _ATFILE_SOURCE
215# define _ATFILE_SOURCE 1222# define _ATFILE_SOURCE 1
223# undef _DYNAMIC_STACK_SIZE_SOURCE
224# define _DYNAMIC_STACK_SIZE_SOURCE 1
216#endif225#endif
217226
218/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,227/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
...@@ -380,6 +389,8 @@...@@ -380,6 +389,8 @@
380# define __USE_FILE_OFFSET64 1389# define __USE_FILE_OFFSET64 1
381#endif390#endif
382391
392#include <features-time64.h>
393
383#if defined _DEFAULT_SOURCE394#if defined _DEFAULT_SOURCE
384# define __USE_MISC 1395# define __USE_MISC 1
385#endif396#endif
...@@ -388,6 +399,10 @@...@@ -388,6 +399,10 @@
388# define __USE_ATFILE 1399# define __USE_ATFILE 1
389#endif400#endif
390401
402#ifdef _DYNAMIC_STACK_SIZE_SOURCE
403# define __USE_DYNAMIC_STACK_SIZE 1
404#endif
405
391#ifdef _GNU_SOURCE406#ifdef _GNU_SOURCE
392# define __USE_GNU 1407# define __USE_GNU 1
393#endif408#endif
...@@ -462,7 +477,7 @@...@@ -462,7 +477,7 @@
462/* Major and minor version number of the GNU C library package. Use477/* Major and minor version number of the GNU C library package. Use
463 these macros to test for features in specific releases. */478 these macros to test for features in specific releases. */
464#define __GLIBC__ 2479#define __GLIBC__ 2
465#define __GLIBC_MINOR__ 33480#define __GLIBC_MINOR__ 34
466481
467#define __GLIBC_PREREQ(maj, min) \482#define __GLIBC_PREREQ(maj, min) \
468 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))483 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/include/generic-glibc/fts.h+38-5
...@@ -187,6 +187,7 @@ FTSENT *fts_read (FTS *);...@@ -187,6 +187,7 @@ FTSENT *fts_read (FTS *);
187int fts_set (FTS *, FTSENT *, int) __THROW;187int fts_set (FTS *, FTSENT *, int) __THROW;
188#else188#else
189# ifdef __REDIRECT189# ifdef __REDIRECT
190# ifndef __USE_TIME_BITS64
190FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);191FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
191int __REDIRECT (fts_close, (FTS *), fts64_close);192int __REDIRECT (fts_close, (FTS *), fts64_close);
192FTS *__REDIRECT (fts_open, (char * const *, int,193FTS *__REDIRECT (fts_open, (char * const *, int,
...@@ -194,21 +195,53 @@ FTS *__REDIRECT (fts_open, (char * const *, int,...@@ -194,21 +195,53 @@ FTS *__REDIRECT (fts_open, (char * const *, int,
194 fts64_open);195 fts64_open);
195FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read);196FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read);
196int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), fts64_set);197int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), fts64_set);
198# else
199FTSENT *__REDIRECT (fts_children, (FTS *, int), __fts64_children_time64);
200int __REDIRECT (fts_close, (FTS *), __fts64_close_time64);
201FTS *__REDIRECT (fts_open, (char * const *, int,
202 int (*)(const FTSENT **, const FTSENT **)),
203 __fts64_open_time64);
204FTSENT *__REDIRECT (fts_read, (FTS *), __fts64_read_time64);
205int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
206 __fts64_set_time64);
207# endif
197# else208# else
198# define fts_children fts64_children209# ifndef __USE_TIME_BITS64
199# define fts_close fts64_close210# define fts_children fts64_children
200# define fts_open fts64_open211# define fts_close fts64_close
201# define fts_read fts64_read212# define fts_open fts64_open
202# define fts_set fts64_set213# define fts_read fts64_read
214# define fts_set fts64_set
215# else
216# endif
203# endif217# endif
204#endif218#endif
205#ifdef __USE_LARGEFILE64219#ifdef __USE_LARGEFILE64
220# ifndef __USE_TIME_BITS64
206FTSENT64 *fts64_children (FTS64 *, int);221FTSENT64 *fts64_children (FTS64 *, int);
207int fts64_close (FTS64 *);222int fts64_close (FTS64 *);
208FTS64 *fts64_open (char * const *, int,223FTS64 *fts64_open (char * const *, int,
209 int (*)(const FTSENT64 **, const FTSENT64 **));224 int (*)(const FTSENT64 **, const FTSENT64 **));
210FTSENT64 *fts64_read (FTS64 *);225FTSENT64 *fts64_read (FTS64 *);
211int fts64_set (FTS64 *, FTSENT64 *, int) __THROW;226int fts64_set (FTS64 *, FTSENT64 *, int) __THROW;
227# else
228# ifdef __REDIRECT
229FTSENT *__REDIRECT (fts64_children, (FTS64 *, int), __fts64_children_time64);
230int __REDIRECT (fts64_close, (FTS64 *), __fts64_close_time64);
231FTS *__REDIRECT (fts64_open, (char * const *, int,
232 int (*)(const FTSENT64 **, const FTSENT64 **)),
233 __fts64_open_time64);
234FTSENT *__REDIRECT (fts64_read, (FTS64 *), __fts64_read_time64);
235int __REDIRECT_NTH (fts64_set, (FTS64 *, FTSENT64 *, int),
236 __fts64_set_time64);
237# else
238# define fts_children __fts64_children_time64
239# define fts_close __fts64_close_time64
240# define fts_open __fts64_open_time64
241# define fts_read __fts64_read_time64
242# define fts_set __fts64_set_time64
243# endif
244# endif
212#endif245#endif
213__END_DECLS246__END_DECLS
214247
lib/libc/include/generic-glibc/ftw.h+44-2
...@@ -137,15 +137,36 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)...@@ -137,15 +137,36 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
137 __nonnull ((1, 2));137 __nonnull ((1, 2));
138#else138#else
139# ifdef __REDIRECT139# ifdef __REDIRECT
140# ifndef __USE_TIME_BITS64
140extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,141extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
141 int __descriptors), ftw64) __nonnull ((1, 2));142 int __descriptors), ftw64) __nonnull ((1, 2));
143# else
144extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
145 int __descriptors), __ftw64_time64)
146 __nonnull ((1, 2));
147# endif
142# else148# else
143# define ftw ftw64149# ifndef __USE_TIME_BITS64
150# define ftw ftw64
151# else
152# define ftw __ftw64_time64
153# endif
144# endif154# endif
145#endif155#endif
146#ifdef __USE_LARGEFILE64156#ifdef __USE_LARGEFILE64
157# ifndef __USE_TIME_BITS64
147extern int ftw64 (const char *__dir, __ftw64_func_t __func,158extern int ftw64 (const char *__dir, __ftw64_func_t __func,
148 int __descriptors) __nonnull ((1, 2));159 int __descriptors) __nonnull ((1, 2));
160# else
161# ifdef __REDIRECT
162extern int __REDIRECT (ftw64, (const char *__dir, __ftw64_func_t __func,
163 int __descriptors),
164 __ftw64_time64)
165 __nonnull ((1, 2));
166# else
167# define nftw64 __nftw64_time64
168# endif
169# endif
149#endif170#endif
150171
151#ifdef __USE_XOPEN_EXTENDED172#ifdef __USE_XOPEN_EXTENDED
...@@ -159,16 +180,37 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,...@@ -159,16 +180,37 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
159 int __flag) __nonnull ((1, 2));180 int __flag) __nonnull ((1, 2));
160# else181# else
161# ifdef __REDIRECT182# ifdef __REDIRECT
183# ifndef __USE_TIME_BITS64
162extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,184extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
163 int __descriptors, int __flag), nftw64)185 int __descriptors, int __flag), nftw64)
164 __nonnull ((1, 2));186 __nonnull ((1, 2));
187# else
188extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
189 int __descriptors, int __flag), __nftw64_time64)
190 __nonnull ((1, 2));
191# endif
165# else192# else
166# define nftw nftw64193# ifndef __USE_TIME_BITS64
194# define nftw nftw64
195# else
196# define nftw __nftw64_time64
197# endif
167# endif198# endif
168# endif199# endif
169# ifdef __USE_LARGEFILE64200# ifdef __USE_LARGEFILE64
201# ifndef __USE_TIME_BITS64
170extern int nftw64 (const char *__dir, __nftw64_func_t __func,202extern int nftw64 (const char *__dir, __nftw64_func_t __func,
171 int __descriptors, int __flag) __nonnull ((1, 2));203 int __descriptors, int __flag) __nonnull ((1, 2));
204# else
205# ifdef __REDIRECT
206extern int __REDIRECT (nftw64, (const char *__dir, __nftw64_func_t __func,
207 int __descriptors, int __flag),
208 __nftw64_time64)
209 __nonnull ((1, 2));
210# else
211# define nftw64 __nftw64_time64
212# endif
213# endif
172# endif214# endif
173#endif215#endif
174216
lib/libc/include/generic-glibc/glob.h+28-6
...@@ -145,25 +145,47 @@ typedef struct...@@ -145,25 +145,47 @@ typedef struct
145#if !defined __USE_FILE_OFFSET64145#if !defined __USE_FILE_OFFSET64
146extern int glob (const char *__restrict __pattern, int __flags,146extern int glob (const char *__restrict __pattern, int __flags,
147 int (*__errfunc) (const char *, int),147 int (*__errfunc) (const char *, int),
148 glob_t *__restrict __pglob) __THROW;148 glob_t *__restrict __pglob) __THROWNL;
149149
150/* Free storage allocated in PGLOB by a previous `glob' call. */150/* Free storage allocated in PGLOB by a previous `glob' call. */
151extern void globfree (glob_t *__pglob) __THROW;151extern void globfree (glob_t *__pglob) __THROW;
152#else152#else
153extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern,153# ifdef __USE_TIME_BITS64
154 int __flags,154extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
155 int (*__errfunc) (const char *, int),155 int __flags,
156 glob_t *__restrict __pglob), glob64);156 int (*__errfunc) (const char *, int),
157 glob_t *__restrict __pglob),
158 __glob64_time64);
159
160extern void __REDIRECT_NTH (globfree, (glob_t *__pglob),
161 __globfree64_time64);
162# else
163extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
164 int __flags,
165 int (*__errfunc) (const char *, int),
166 glob_t *__restrict __pglob), glob64);
157167
158extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);168extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
169# endif
159#endif170#endif
160171
161#ifdef __USE_LARGEFILE64172#ifdef __USE_LARGEFILE64
173# ifdef __USE_TIME_BITS64
174extern int __REDIRECT_NTHNL (glob64, (const char *__restrict __pattern,
175 int __flags,
176 int (*__errfunc) (const char *, int),
177 glob64_t *__restrict __pglob),
178 __glob64_time64);
179
180extern void __REDIRECT_NTH (globfree64, (glob64_t *__pglob),
181 __globfree64_time64);
182# else
162extern int glob64 (const char *__restrict __pattern, int __flags,183extern int glob64 (const char *__restrict __pattern, int __flags,
163 int (*__errfunc) (const char *, int),184 int (*__errfunc) (const char *, int),
164 glob64_t *__restrict __pglob) __THROW;185 glob64_t *__restrict __pglob) __THROWNL;
165186
166extern void globfree64 (glob64_t *__pglob) __THROW;187extern void globfree64 (glob64_t *__pglob) __THROW;
188# endif
167#endif189#endif
168190
169191
lib/libc/include/generic-glibc/gnu/lib-names-32.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-hard.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h+1
...@@ -7,6 +7,7 @@...@@ -7,6 +7,7 @@
7#define LIBANL_SO "libanl.so.1"7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBCRYPT_SO "libcrypt.so.1"9#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
10#define LIBC_SO "libc.so.6"11#define LIBC_SO "libc.so.6"
11#define LIBDL_SO "libdl.so.2"12#define LIBDL_SO "libdl.so.2"
12#define LIBGCC_S_SO "libgcc_s.so.1"13#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h+1
...@@ -7,6 +7,7 @@...@@ -7,6 +7,7 @@
7#define LIBANL_SO "libanl.so.1"7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBCRYPT_SO "libcrypt.so.1"9#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
10#define LIBC_SO "libc.so.6"11#define LIBC_SO "libc.so.6"
11#define LIBDL_SO "libdl.so.2"12#define LIBDL_SO "libdl.so.2"
12#define LIBGCC_S_SO "libgcc_s.so.1"13#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h+1
...@@ -7,6 +7,7 @@...@@ -7,6 +7,7 @@
7#define LIBANL_SO "libanl.so.1"7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBCRYPT_SO "libcrypt.so.1"9#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
10#define LIBC_SO "libc.so.6"11#define LIBC_SO "libc.so.6"
11#define LIBDL_SO "libdl.so.2"12#define LIBDL_SO "libdl.so.2"
12#define LIBGCC_S_SO "libgcc_s.so.1"13#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-soft.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/malloc.h+7-31
...@@ -56,30 +56,25 @@ __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));...@@ -56,30 +56,25 @@ __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
56 the same pointer that was passed to it, aliasing needs to be allowed56 the same pointer that was passed to it, aliasing needs to be allowed
57 between objects pointed by the old and new pointers. */57 between objects pointed by the old and new pointers. */
58extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)58extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
59__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3));59 __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3))
60 __attr_dealloc_free;
6061
61/* Free a block allocated by `malloc', `realloc' or `calloc'. */62/* Free a block allocated by `malloc', `realloc' or `calloc'. */
62extern void free (void *__ptr) __THROW;63extern void free (void *__ptr) __THROW;
6364
64/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */65/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
65extern void *memalign (size_t __alignment, size_t __size)66extern void *memalign (size_t __alignment, size_t __size)
66__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;67 __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur
68 __attr_dealloc_free;
6769
68/* Allocate SIZE bytes on a page boundary. */70/* Allocate SIZE bytes on a page boundary. */
69extern void *valloc (size_t __size) __THROW __attribute_malloc__71extern void *valloc (size_t __size) __THROW __attribute_malloc__
70 __attribute_alloc_size__ ((1)) __wur;72 __attribute_alloc_size__ ((1)) __wur __attr_dealloc_free;
7173
72/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up74/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
73 __size to nearest pagesize. */75 __size to nearest pagesize. */
74extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;76extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
7577 __wur __attr_dealloc_free;
76/* Underlying allocation function; successive calls should return
77 contiguous pieces of memory. */
78extern void *(*__morecore) (ptrdiff_t __size) __MALLOC_DEPRECATED;
79
80/* Default value of `__morecore'. */
81extern void *__default_morecore (ptrdiff_t __size)
82__THROW __attribute_malloc__ __MALLOC_DEPRECATED;
8378
84/* SVID2/XPG mallinfo structure */79/* SVID2/XPG mallinfo structure */
8580
...@@ -161,24 +156,5 @@ extern void malloc_stats (void) __THROW;...@@ -161,24 +156,5 @@ extern void malloc_stats (void) __THROW;
161/* Output information about state of allocator to stream FP. */156/* Output information about state of allocator to stream FP. */
162extern int malloc_info (int __options, FILE *__fp) __THROW;157extern int malloc_info (int __options, FILE *__fp) __THROW;
163158
164/* Hooks for debugging and user-defined versions. */
165extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr,
166 const void *)
167__MALLOC_DEPRECATED;
168extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook)(size_t __size,
169 const void *)
170__MALLOC_DEPRECATED;
171extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook)(void *__ptr,
172 size_t __size,
173 const void *)
174__MALLOC_DEPRECATED;
175extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,
176 size_t __size,
177 const void *)
178__MALLOC_DEPRECATED;
179extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void)
180 __MALLOC_DEPRECATED;
181
182
183__END_DECLS159__END_DECLS
184#endif /* malloc.h */160#endif /* malloc.h */
\ No newline at end of file
lib/libc/include/generic-glibc/math.h+22-8
...@@ -104,7 +104,7 @@ __BEGIN_DECLS...@@ -104,7 +104,7 @@ __BEGIN_DECLS
104# endif104# endif
105#endif /* __USE_ISOC99 */105#endif /* __USE_ISOC99 */
106106
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)107#if __GLIBC_USE (IEC_60559_BFP_EXT)
108/* Signaling NaN macros, if supported. */108/* Signaling NaN macros, if supported. */
109# if __GNUC_PREREQ (3, 3)109# if __GNUC_PREREQ (3, 3)
110# define SNANF (__builtin_nansf (""))110# define SNANF (__builtin_nansf (""))
...@@ -112,25 +112,39 @@ __BEGIN_DECLS...@@ -112,25 +112,39 @@ __BEGIN_DECLS
112# define SNANL (__builtin_nansl (""))112# define SNANL (__builtin_nansl (""))
113# endif113# endif
114#endif114#endif
115#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)115#if (__HAVE_FLOAT16 \
116 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
117 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
116# define SNANF16 (__builtin_nansf16 (""))118# define SNANF16 (__builtin_nansf16 (""))
117#endif119#endif
118#if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)120#if (__HAVE_FLOAT32 \
121 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
122 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
119# define SNANF32 (__builtin_nansf32 (""))123# define SNANF32 (__builtin_nansf32 (""))
120#endif124#endif
121#if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)125#if (__HAVE_FLOAT64 \
126 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
127 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
122# define SNANF64 (__builtin_nansf64 (""))128# define SNANF64 (__builtin_nansf64 (""))
123#endif129#endif
124#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)130#if (__HAVE_FLOAT128 \
131 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
132 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
125# define SNANF128 (__builtin_nansf128 (""))133# define SNANF128 (__builtin_nansf128 (""))
126#endif134#endif
127#if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)135#if (__HAVE_FLOAT32X \
136 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
137 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
128# define SNANF32X (__builtin_nansf32x (""))138# define SNANF32X (__builtin_nansf32x (""))
129#endif139#endif
130#if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)140#if (__HAVE_FLOAT64X \
141 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
142 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
131# define SNANF64X (__builtin_nansf64x (""))143# define SNANF64X (__builtin_nansf64x (""))
132#endif144#endif
133#if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)145#if (__HAVE_FLOAT128X \
146 && __GLIBC_USE (IEC_60559_TYPES_EXT) \
147 && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
134# define SNANF128X (__builtin_nansf128x (""))148# define SNANF128X (__builtin_nansf128x (""))
135#endif149#endif
136150
lib/libc/include/generic-glibc/monetary.h+4-2
...@@ -37,7 +37,8 @@ __BEGIN_DECLS...@@ -37,7 +37,8 @@ __BEGIN_DECLS
37/* Formatting a monetary value according to the current locale. */37/* Formatting a monetary value according to the current locale. */
38extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,38extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
39 const char *__restrict __format, ...)39 const char *__restrict __format, ...)
40 __THROW __attribute_format_strfmon__ (3, 4);40 __THROW __attribute_format_strfmon__ (3, 4)
41 __attr_access ((__write_only__, 1, 2));
4142
42#ifdef __USE_XOPEN2K843#ifdef __USE_XOPEN2K8
43/* POSIX.1-2008 extended locale interface (see locale.h). */44/* POSIX.1-2008 extended locale interface (see locale.h). */
...@@ -47,7 +48,8 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,...@@ -47,7 +48,8 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
47extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,48extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
48 locale_t __loc,49 locale_t __loc,
49 const char *__restrict __format, ...)50 const char *__restrict __format, ...)
50 __THROW __attribute_format_strfmon__ (4, 5);51 __THROW __attribute_format_strfmon__ (4, 5)
52 __attr_access ((__write_only__, 1, 2));
51#endif53#endif
5254
53#include <bits/floatn.h>55#include <bits/floatn.h>
lib/libc/include/generic-glibc/mqueue.h+22
...@@ -71,6 +71,7 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,...@@ -71,6 +71,7 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
71 unsigned int __msg_prio) __nonnull ((2));71 unsigned int __msg_prio) __nonnull ((2));
7272
73#ifdef __USE_XOPEN2K73#ifdef __USE_XOPEN2K
74# ifndef __USE_TIME_BITS64
74/* Receive the oldest from highest priority messages in message queue75/* Receive the oldest from highest priority messages in message queue
75 MQDES, stop waiting if ABS_TIMEOUT expires. */76 MQDES, stop waiting if ABS_TIMEOUT expires. */
76extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr,77extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr,
...@@ -85,6 +86,27 @@ extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr,...@@ -85,6 +86,27 @@ extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr,
85 size_t __msg_len, unsigned int __msg_prio,86 size_t __msg_len, unsigned int __msg_prio,
86 const struct timespec *__abs_timeout)87 const struct timespec *__abs_timeout)
87 __nonnull ((2, 5));88 __nonnull ((2, 5));
89# else
90# ifdef __REDIRECT
91extern int __REDIRECT (mq_timedreceive, (mqd_t __mqdes,
92 char *__restrict __msg_ptr,
93 size_t __msg_len,
94 unsigned int *__restrict __msg_prio,
95 const struct timespec *__restrict __abs_timeout),
96 __mq_timedreceive_time64)
97 __nonnull ((2, 5));
98
99extern int __REDIRECT (mq_timedsend, (mqd_t __mqdes,
100 const char *__msg_ptr, size_t __msg_len,
101 unsigned int __msg_prio,
102 const struct timespec *__abs_timeout),
103 __mq_timedsend_time64)
104 __nonnull ((2, 5));
105# else
106# define mq_timedreceive __mq_timedreceive_time64
107# define mq_timedsend __mq_timedsend_time64
108# endif
109# endif
88#endif110#endif
89111
90/* Define some inlines helping to catch common problems. */112/* Define some inlines helping to catch common problems. */
lib/libc/include/generic-glibc/net/if.h+3-1
...@@ -191,7 +191,9 @@ __BEGIN_DECLS...@@ -191,7 +191,9 @@ __BEGIN_DECLS
191191
192/* Convert an interface name to an index, and vice versa. */192/* Convert an interface name to an index, and vice versa. */
193extern unsigned int if_nametoindex (const char *__ifname) __THROW;193extern unsigned int if_nametoindex (const char *__ifname) __THROW;
194extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;194extern char *if_indextoname (unsigned int __ifindex,
195 char __ifname[IF_NAMESIZE]) __THROW
196 __attr_access ((__write_only__, 2));
195197
196/* Return a list of all interfaces and their indices. */198/* Return a list of all interfaces and their indices. */
197extern struct if_nameindex *if_nameindex (void) __THROW;199extern struct if_nameindex *if_nameindex (void) __THROW;
lib/libc/include/generic-glibc/netdb.h+11
...@@ -701,6 +701,17 @@ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],...@@ -701,6 +701,17 @@ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
701extern int gai_suspend (const struct gaicb *const __list[], int __ent,701extern int gai_suspend (const struct gaicb *const __list[], int __ent,
702 const struct timespec *__timeout);702 const struct timespec *__timeout);
703703
704# ifdef __USE_TIME_BITS64
705# if defined(__REDIRECT)
706extern int __REDIRECT (gai_suspend, (const struct gaicb *const __list[],
707 int __ent,
708 const struct timespec *__timeout),
709 __gai_suspend_time64);
710# else
711# define gai_suspend __gai_suspend_time64
712# endif
713# endif
714
704/* Get the error status of the request REQ. */715/* Get the error status of the request REQ. */
705extern int gai_error (struct gaicb *__req) __THROW;716extern int gai_error (struct gaicb *__req) __THROW;
706717
lib/libc/include/generic-glibc/netinet/icmp6.h+2
...@@ -69,6 +69,8 @@ struct icmp6_hdr...@@ -69,6 +69,8 @@ struct icmp6_hdr
69#define MLD_LISTENER_QUERY 13069#define MLD_LISTENER_QUERY 130
70#define MLD_LISTENER_REPORT 13170#define MLD_LISTENER_REPORT 131
71#define MLD_LISTENER_REDUCTION 13271#define MLD_LISTENER_REDUCTION 132
72#define ICMPV6_EXT_ECHO_REQUEST 160
73#define ICMPV6_EXT_ECHO_REPLY 161
7274
73#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */75#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
74#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */76#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */
lib/libc/include/generic-glibc/netinet/ip_icmp.h+18
...@@ -89,6 +89,24 @@ struct icmphdr...@@ -89,6 +89,24 @@ struct icmphdr
89#define ICMP_EXC_TTL 0 /* TTL count exceeded */89#define ICMP_EXC_TTL 0 /* TTL count exceeded */
90#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */90#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
9191
92/* Codes for ICMP_EXT_ECHO (PROBE) */
93#define ICMP_EXT_ECHO 42
94#define ICMP_EXT_ECHOREPLY 43
95#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */
96#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */
97#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No table entry */
98#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */
99
100/* Constants for EXT_ECHO (PROBE) */
101#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply */
102#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply */
103#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply */
104#define ICMP_EXT_ECHO_CTYPE_NAME 1
105#define ICMP_EXT_ECHO_CTYPE_INDEX 2
106#define ICMP_EXT_ECHO_CTYPE_ADDR 3
107#define ICMP_AFI_IP 1 /* Address Family Identifier for IPV4 */
108#define ICMP_AFI_IP6 2 /* Address Family Identifier for IPV6 */
109
92110
93#ifdef __USE_MISC111#ifdef __USE_MISC
94/*112/*
lib/libc/include/generic-glibc/nss.h+1-1
...@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);...@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);
196 extern nss_endgrent _nss_##module##_endgrent; \196 extern nss_endgrent _nss_##module##_endgrent; \
197 extern nss_endhostent _nss_##module##_endhostent; \197 extern nss_endhostent _nss_##module##_endhostent; \
198 extern nss_endnetent _nss_##module##_endnetent; \198 extern nss_endnetent _nss_##module##_endnetent; \
199 extern nss_endnetgrent _nss_##module##__endnetgrent; \199 extern nss_endnetgrent _nss_##module##_endnetgrent; \
200 extern nss_endprotoent _nss_##module##_endprotoent; \200 extern nss_endprotoent _nss_##module##_endprotoent; \
201 extern nss_endpwent _nss_##module##_endpwent; \201 extern nss_endpwent _nss_##module##_endpwent; \
202 extern nss_endrpcent _nss_##module##_endrpcent; \202 extern nss_endrpcent _nss_##module##_endrpcent; \
lib/libc/include/generic-glibc/pthread.h+157-15
...@@ -29,7 +29,9 @@...@@ -29,7 +29,9 @@
29#include <bits/types/struct_timespec.h>29#include <bits/types/struct_timespec.h>
30#include <bits/types/__sigset_t.h>30#include <bits/types/__sigset_t.h>
31#include <bits/types/struct___jmp_buf_tag.h>31#include <bits/types/struct___jmp_buf_tag.h>
3232#ifdef __USE_MISC
33# include <bits/pthread_stack_min-dynamic.h>
34#endif
3335
34/* Detach state. */36/* Detach state. */
35enum37enum
...@@ -221,6 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);...@@ -221,6 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);
221 the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */223 the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
222extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;224extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
223225
226# ifndef __USE_TIME_BITS64
224/* Make calling thread wait for termination of the thread TH, but only227/* Make calling thread wait for termination of the thread TH, but only
225 until TIMEOUT. The exit status of the thread is stored in228 until TIMEOUT. The exit status of the thread is stored in
226 *THREAD_RETURN, if THREAD_RETURN is not NULL.229 *THREAD_RETURN, if THREAD_RETURN is not NULL.
...@@ -240,6 +243,23 @@ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,...@@ -240,6 +243,23 @@ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
240extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,243extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
241 clockid_t __clockid,244 clockid_t __clockid,
242 const struct timespec *__abstime);245 const struct timespec *__abstime);
246# else
247# ifdef __REDIRECT
248extern int __REDIRECT (pthread_timedjoin_np,
249 (pthread_t __th, void **__thread_return,
250 const struct timespec *__abstime),
251 __pthread_timedjoin_np64);
252
253extern int __REDIRECT (pthread_clockjoin_np,
254 (pthread_t __th, void **__thread_return,
255 clockid_t __clockid,
256 const struct timespec *__abstime),
257 __pthread_clockjoin_np64);
258# else
259# define pthread_timedjoin_np __pthread_timedjoin_np64
260# define pthread_clockjoin_np __pthread_clockjoin_np64
261# endif
262# endif
243#endif263#endif
244264
245/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.265/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
...@@ -454,11 +474,14 @@ extern int pthread_setconcurrency (int __level) __THROW;...@@ -454,11 +474,14 @@ extern int pthread_setconcurrency (int __level) __THROW;
454#endif474#endif
455475
456#ifdef __USE_GNU476#ifdef __USE_GNU
457/* Yield the processor to another thread or process.
458 This function is similar to the POSIX `sched_yield' function but
459 might be differently implemented in the case of a m-on-n thread
460 implementation. */
461extern int pthread_yield (void) __THROW;477extern int pthread_yield (void) __THROW;
478# ifdef __REDIRECT_NTH
479extern int __REDIRECT_NTH (pthread_yield, (void), sched_yield)
480 __attribute_deprecated_msg__ ("\
481pthread_yield is deprecated, use sched_yield instead");
482# else
483# define pthread_yield sched_yield
484# endif
462485
463486
464/* Limit specified thread TH to run only on the processors represented487/* Limit specified thread TH to run only on the processors represented
...@@ -773,16 +796,39 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)...@@ -773,16 +796,39 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
773796
774#ifdef __USE_XOPEN2K797#ifdef __USE_XOPEN2K
775/* Wait until lock becomes available, or specified time passes. */798/* Wait until lock becomes available, or specified time passes. */
799# ifndef __USE_TIME_BITS64
776extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,800extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
777 const struct timespec *__restrict801 const struct timespec *__restrict
778 __abstime) __THROWNL __nonnull ((1, 2));802 __abstime) __THROWNL __nonnull ((1, 2));
803# else
804# ifdef __REDIRECT_NTHNL
805extern int __REDIRECT_NTHNL (pthread_mutex_timedlock,
806 (pthread_mutex_t *__restrict __mutex,
807 const struct timespec *__restrict __abstime),
808 __pthread_mutex_timedlock64) __nonnull ((1, 2));
809# else
810# define pthread_mutex_timedlock __pthread_mutex_timedlock64
811# endif
812# endif
779#endif813#endif
780814
781#ifdef __USE_GNU815#ifdef __USE_GNU
816# ifndef __USE_TIME_BITS64
782extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,817extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
783 clockid_t __clockid,818 clockid_t __clockid,
784 const struct timespec *__restrict819 const struct timespec *__restrict
785 __abstime) __THROWNL __nonnull ((1, 3));820 __abstime) __THROWNL __nonnull ((1, 3));
821# else
822# ifdef __REDIRECT_NTHNL
823extern int __REDIRECT_NTHNL (pthread_mutex_clocklock,
824 (pthread_mutex_t *__restrict __mutex,
825 clockid_t __clockid,
826 const struct timespec *__restrict __abstime),
827 __pthread_mutex_clocklock64) __nonnull ((1, 3));
828# else
829# define pthread_mutex_clocklock __pthread_mutex_clocklock64
830# endif
831# endif
786#endif832#endif
787833
788/* Unlock a mutex. */834/* Unlock a mutex. */
...@@ -809,8 +855,14 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,...@@ -809,8 +855,14 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
809extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)855extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
810 __THROW __nonnull ((1));856 __THROW __nonnull ((1));
811# ifdef __USE_GNU857# ifdef __USE_GNU
812extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)858# ifdef __REDIRECT_NTH
813 __THROW __nonnull ((1));859extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
860 pthread_mutex_consistent) __nonnull ((1))
861 __attribute_deprecated_msg__ ("\
862pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent");
863# else
864# define pthread_mutex_consistent_np pthread_mutex_consistent
865# endif
814# endif866# endif
815#endif867#endif
816868
...@@ -879,9 +931,15 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,...@@ -879,9 +931,15 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
879 int *__robustness)931 int *__robustness)
880 __THROW __nonnull ((1, 2));932 __THROW __nonnull ((1, 2));
881# ifdef __USE_GNU933# ifdef __USE_GNU
882extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,934# ifdef __REDIRECT_NTH
883 int *__robustness)935extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np,
884 __THROW __nonnull ((1, 2));936 (pthread_mutex_t *, int *),
937 pthread_mutexattr_getrobust) __nonnull ((1))
938 __attribute_deprecated_msg__ ("\
939pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust");
940# else
941# define pthread_mutexattr_getrobust_np pthread_mutexattr_getrobust
942# endif
885# endif943# endif
886944
887/* Set the robustness flag of the mutex attribute ATTR. */945/* Set the robustness flag of the mutex attribute ATTR. */
...@@ -889,13 +947,18 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,...@@ -889,13 +947,18 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
889 int __robustness)947 int __robustness)
890 __THROW __nonnull ((1));948 __THROW __nonnull ((1));
891# ifdef __USE_GNU949# ifdef __USE_GNU
892extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,950# ifdef __REDIRECT_NTH
893 int __robustness)951extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
894 __THROW __nonnull ((1));952 (pthread_mutex_t *, int),
953 pthread_mutexattr_setrobust) __nonnull ((1))
954 __attribute_deprecated_msg__ ("\
955pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust");
956# else
957# define pthread_mutexattr_setrobust_np pthread_mutexattr_setrobust
958# endif
895# endif959# endif
896#endif960#endif
897961
898
899#if defined __USE_UNIX98 || defined __USE_XOPEN2K962#if defined __USE_UNIX98 || defined __USE_XOPEN2K
900/* Functions for handling read-write locks. */963/* Functions for handling read-write locks. */
901964
...@@ -919,16 +982,41 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)...@@ -919,16 +982,41 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
919982
920# ifdef __USE_XOPEN2K983# ifdef __USE_XOPEN2K
921/* Try to acquire read lock for RWLOCK or return after specfied time. */984/* Try to acquire read lock for RWLOCK or return after specfied time. */
985# ifndef __USE_TIME_BITS64
922extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,986extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
923 const struct timespec *__restrict987 const struct timespec *__restrict
924 __abstime) __THROWNL __nonnull ((1, 2));988 __abstime) __THROWNL __nonnull ((1, 2));
989# else
990# ifdef __REDIRECT_NTHNL
991extern int __REDIRECT_NTHNL (pthread_rwlock_timedrdlock,
992 (pthread_rwlock_t *__restrict __rwlock,
993 const struct timespec *__restrict __abstime),
994 __pthread_rwlock_timedrdlock64)
995 __nonnull ((1, 2));
996# else
997# define pthread_rwlock_timedrdlock __pthread_rwlock_timedrdlock64
998# endif
999# endif
925# endif1000# endif
9261001
927# ifdef __USE_GNU1002# ifdef __USE_GNU
1003# ifndef __USE_TIME_BITS64
928extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,1004extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
929 clockid_t __clockid,1005 clockid_t __clockid,
930 const struct timespec *__restrict1006 const struct timespec *__restrict
931 __abstime) __THROWNL __nonnull ((1, 3));1007 __abstime) __THROWNL __nonnull ((1, 3));
1008# else
1009# ifdef __REDIRECT_NTHNL
1010extern int __REDIRECT_NTHNL (pthread_rwlock_clockrdlock,
1011 (pthread_rwlock_t *__restrict __rwlock,
1012 clockid_t __clockid,
1013 const struct timespec *__restrict __abstime),
1014 __pthread_rwlock_clockrdlock64)
1015 __nonnull ((1, 3));
1016# else
1017# define pthread_rwlock_clockrdlock __pthread_rwlock_clockrdlock64
1018# endif
1019# endif
932# endif1020# endif
9331021
934/* Acquire write lock for RWLOCK. */1022/* Acquire write lock for RWLOCK. */
...@@ -941,16 +1029,42 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)...@@ -941,16 +1029,42 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
9411029
942# ifdef __USE_XOPEN2K1030# ifdef __USE_XOPEN2K
943/* Try to acquire write lock for RWLOCK or return after specfied time. */1031/* Try to acquire write lock for RWLOCK or return after specfied time. */
1032# ifndef __USE_TIME_BITS64
944extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,1033extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
945 const struct timespec *__restrict1034 const struct timespec *__restrict
946 __abstime) __THROWNL __nonnull ((1, 2));1035 __abstime) __THROWNL __nonnull ((1, 2));
1036# else
1037# ifdef __REDIRECT_NTHNL
1038extern int __REDIRECT_NTHNL (pthread_rwlock_timedwrlock,
1039 (pthread_rwlock_t *__restrict __rwlock,
1040 const struct timespec *__restrict __abstime),
1041 __pthread_rwlock_timedwrlock64)
1042 __nonnull ((1, 2));
1043# else
1044# define pthread_rwlock_timedwrlock __pthread_rwlock_timedwrlock64
1045# endif
1046# endif
947# endif1047# endif
9481048
949# ifdef __USE_GNU1049# ifdef __USE_GNU
1050# ifndef __USE_TIME_BITS64
950extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,1051extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
951 clockid_t __clockid,1052 clockid_t __clockid,
952 const struct timespec *__restrict1053 const struct timespec *__restrict
953 __abstime) __THROWNL __nonnull ((1, 3));1054 __abstime) __THROWNL __nonnull ((1, 3));
1055
1056# else
1057# ifdef __REDIRECT_NTHNL
1058extern int __REDIRECT_NTHNL (pthread_rwlock_clockwrlock,
1059 (pthread_rwlock_t *__restrict __rwlock,
1060 clockid_t __clockid,
1061 const struct timespec *__restrict __abstime),
1062 __pthread_rwlock_clockwrlock64)
1063 __nonnull ((1, 3));
1064# else
1065# define pthread_rwlock_clockwrlock __pthread_rwlock_clockwrlock64
1066# endif
1067# endif
954# endif1068# endif
9551069
956/* Unlock RWLOCK. */1070/* Unlock RWLOCK. */
...@@ -1027,10 +1141,23 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,...@@ -1027,10 +1141,23 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
10271141
1028 This function is a cancellation point and therefore not marked with1142 This function is a cancellation point and therefore not marked with
1029 __THROW. */1143 __THROW. */
1144# ifndef __USE_TIME_BITS64
1030extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,1145extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
1031 pthread_mutex_t *__restrict __mutex,1146 pthread_mutex_t *__restrict __mutex,
1032 const struct timespec *__restrict __abstime)1147 const struct timespec *__restrict __abstime)
1033 __nonnull ((1, 2, 3));1148 __nonnull ((1, 2, 3));
1149# else
1150# ifdef __REDIRECT
1151extern int __REDIRECT (pthread_cond_timedwait,
1152 (pthread_cond_t *__restrict __cond,
1153 pthread_mutex_t *__restrict __mutex,
1154 const struct timespec *__restrict __abstime),
1155 __pthread_cond_timedwait64)
1156 __nonnull ((1, 2, 3));
1157# else
1158# define pthread_cond_timedwait __pthread_cond_timedwait64
1159# endif
1160# endif
10341161
1035# ifdef __USE_GNU1162# ifdef __USE_GNU
1036/* Wait for condition variable COND to be signaled or broadcast until1163/* Wait for condition variable COND to be signaled or broadcast until
...@@ -1040,11 +1167,25 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,...@@ -1040,11 +1167,25 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
10401167
1041 This function is a cancellation point and therefore not marked with1168 This function is a cancellation point and therefore not marked with
1042 __THROW. */1169 __THROW. */
1170# ifndef __USE_TIME_BITS64
1043extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,1171extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
1044 pthread_mutex_t *__restrict __mutex,1172 pthread_mutex_t *__restrict __mutex,
1045 __clockid_t __clock_id,1173 __clockid_t __clock_id,
1046 const struct timespec *__restrict __abstime)1174 const struct timespec *__restrict __abstime)
1047 __nonnull ((1, 2, 4));1175 __nonnull ((1, 2, 4));
1176# else
1177# ifdef __REDIRECT
1178extern int __REDIRECT (pthread_cond_clockwait,
1179 (pthread_cond_t *__restrict __cond,
1180 pthread_mutex_t *__restrict __mutex,
1181 __clockid_t __clock_id,
1182 const struct timespec *__restrict __abstime),
1183 __pthread_cond_clockwait64)
1184 __nonnull ((1, 2, 4));
1185# else
1186# define pthread_cond_clockwait __pthread_cond_clockwait64
1187# endif
1188# endif
1048# endif1189# endif
10491190
1050/* Functions for handling condition variable attributes. */1191/* Functions for handling condition variable attributes. */
...@@ -1165,7 +1306,8 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;...@@ -1165,7 +1306,8 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;
11651306
1166/* Store POINTER in the thread-specific data slot identified by KEY. */1307/* Store POINTER in the thread-specific data slot identified by KEY. */
1167extern int pthread_setspecific (pthread_key_t __key,1308extern int pthread_setspecific (pthread_key_t __key,
1168 const void *__pointer) __THROW ;1309 const void *__pointer)
1310 __THROW __attr_access_none (2);
11691311
11701312
1171#ifdef __USE_XOPEN2K1313#ifdef __USE_XOPEN2K
lib/libc/include/generic-glibc/pwd.h+8-4
...@@ -139,20 +139,23 @@ extern struct passwd *getpwnam (const char *__name) __nonnull ((1));...@@ -139,20 +139,23 @@ extern struct passwd *getpwnam (const char *__name) __nonnull ((1));
139extern int getpwent_r (struct passwd *__restrict __resultbuf,139extern int getpwent_r (struct passwd *__restrict __resultbuf,
140 char *__restrict __buffer, size_t __buflen,140 char *__restrict __buffer, size_t __buflen,
141 struct passwd **__restrict __result)141 struct passwd **__restrict __result)
142 __nonnull ((1, 2, 4));142 __nonnull ((1, 2, 4))
143 __attr_access ((__write_only__, 2, 3));
143# endif144# endif
144145
145extern int getpwuid_r (__uid_t __uid,146extern int getpwuid_r (__uid_t __uid,
146 struct passwd *__restrict __resultbuf,147 struct passwd *__restrict __resultbuf,
147 char *__restrict __buffer, size_t __buflen,148 char *__restrict __buffer, size_t __buflen,
148 struct passwd **__restrict __result)149 struct passwd **__restrict __result)
149 __nonnull ((2, 3, 5));150 __nonnull ((2, 3, 5))
151 __attr_access ((__write_only__, 3, 4));
150152
151extern int getpwnam_r (const char *__restrict __name,153extern int getpwnam_r (const char *__restrict __name,
152 struct passwd *__restrict __resultbuf,154 struct passwd *__restrict __resultbuf,
153 char *__restrict __buffer, size_t __buflen,155 char *__restrict __buffer, size_t __buflen,
154 struct passwd **__restrict __result)156 struct passwd **__restrict __result)
155 __nonnull ((1, 2, 3, 5));157 __nonnull ((1, 2, 3, 5))
158 __attr_access ((__write_only__, 3, 4));
156159
157160
158# ifdef __USE_MISC161# ifdef __USE_MISC
...@@ -167,7 +170,8 @@ extern int fgetpwent_r (FILE *__restrict __stream,...@@ -167,7 +170,8 @@ extern int fgetpwent_r (FILE *__restrict __stream,
167 struct passwd *__restrict __resultbuf,170 struct passwd *__restrict __resultbuf,
168 char *__restrict __buffer, size_t __buflen,171 char *__restrict __buffer, size_t __buflen,
169 struct passwd **__restrict __result)172 struct passwd **__restrict __result)
170 __nonnull ((1, 2, 3, 5));173 __nonnull ((1, 2, 3, 5))
174 __attr_access ((__write_only__, 3, 4));
171# endif175# endif
172176
173#endif /* POSIX or reentrant */177#endif /* POSIX or reentrant */
lib/libc/include/generic-glibc/regex.h+16-7
...@@ -536,7 +536,8 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);...@@ -536,7 +536,8 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
536 'regcomp', with a malloc'ed value, or set to NULL before calling536 'regcomp', with a malloc'ed value, or set to NULL before calling
537 'regfree'. */537 'regfree'. */
538extern const char *re_compile_pattern (const char *__pattern, size_t __length,538extern const char *re_compile_pattern (const char *__pattern, size_t __length,
539 struct re_pattern_buffer *__buffer);539 struct re_pattern_buffer *__buffer)
540 __attr_access ((__read_only__, 1, 2));
540541
541542
542/* Compile a fastmap for the compiled pattern in BUFFER; used to543/* Compile a fastmap for the compiled pattern in BUFFER; used to
...@@ -553,7 +554,8 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);...@@ -553,7 +554,8 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
553extern regoff_t re_search (struct re_pattern_buffer *__buffer,554extern regoff_t re_search (struct re_pattern_buffer *__buffer,
554 const char *__String, regoff_t __length,555 const char *__String, regoff_t __length,
555 regoff_t __start, regoff_t __range,556 regoff_t __start, regoff_t __range,
556 struct re_registers *__regs);557 struct re_registers *__regs)
558 __attr_access ((__read_only__, 2, 3));
557559
558560
559/* Like 're_search', but search in the concatenation of STRING1 and561/* Like 're_search', but search in the concatenation of STRING1 and
...@@ -563,14 +565,17 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,...@@ -563,14 +565,17 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
563 const char *__string2, regoff_t __length2,565 const char *__string2, regoff_t __length2,
564 regoff_t __start, regoff_t __range,566 regoff_t __start, regoff_t __range,
565 struct re_registers *__regs,567 struct re_registers *__regs,
566 regoff_t __stop);568 regoff_t __stop)
569 __attr_access ((__read_only__, 2, 3))
570 __attr_access ((__read_only__, 4, 5));
567571
568572
569/* Like 're_search', but return how many characters in STRING the regexp573/* Like 're_search', but return how many characters in STRING the regexp
570 in BUFFER matched, starting at position START. */574 in BUFFER matched, starting at position START. */
571extern regoff_t re_match (struct re_pattern_buffer *__buffer,575extern regoff_t re_match (struct re_pattern_buffer *__buffer,
572 const char *__String, regoff_t __length,576 const char *__String, regoff_t __length,
573 regoff_t __start, struct re_registers *__regs);577 regoff_t __start, struct re_registers *__regs)
578 __attr_access ((__read_only__, 2, 3));
574579
575580
576/* Relates to 're_match' as 're_search_2' relates to 're_search'. */581/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
...@@ -578,7 +583,9 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,...@@ -578,7 +583,9 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
578 const char *__string1, regoff_t __length1,583 const char *__string1, regoff_t __length1,
579 const char *__string2, regoff_t __length2,584 const char *__string2, regoff_t __length2,
580 regoff_t __start, struct re_registers *__regs,585 regoff_t __start, struct re_registers *__regs,
581 regoff_t __stop);586 regoff_t __stop)
587 __attr_access ((__read_only__, 2, 3))
588 __attr_access ((__read_only__, 4, 5));
582589
583590
584/* Set REGS to hold NUM_REGS registers, storing them in STARTS and591/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
...@@ -648,10 +655,12 @@ extern int regcomp (regex_t *_Restrict_ __preg,...@@ -648,10 +655,12 @@ extern int regcomp (regex_t *_Restrict_ __preg,
648extern int regexec (const regex_t *_Restrict_ __preg,655extern int regexec (const regex_t *_Restrict_ __preg,
649 const char *_Restrict_ __String, size_t __nmatch,656 const char *_Restrict_ __String, size_t __nmatch,
650 regmatch_t __pmatch[_Restrict_arr_],657 regmatch_t __pmatch[_Restrict_arr_],
651 int __eflags);658 int __eflags)
659 __attr_access ((__write_only__, 4, 3));
652660
653extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,661extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
654 char *_Restrict_ __errbuf, size_t __errbuf_size);662 char *_Restrict_ __errbuf, size_t __errbuf_size)
663 __attr_access ((__write_only__, 3, 4));
655664
656extern void regfree (regex_t *__preg);665extern void regfree (regex_t *__preg);
657666
lib/libc/include/generic-glibc/resolv.h+55-48
...@@ -168,20 +168,28 @@ __END_DECLS...@@ -168,20 +168,28 @@ __END_DECLS
168#define res_close __res_close168#define res_close __res_close
169#define res_init __res_init169#define res_init __res_init
170#define res_isourserver __res_isourserver170#define res_isourserver __res_isourserver
171#define res_mkquery __res_mkquery171
172#define res_query __res_query172#ifdef _LIBC
173#define res_querydomain __res_querydomain173# define __RESOLV_DEPRECATED
174#define res_search __res_search174# define __RESOLV_DEPRECATED_MSG(msg)
175#define res_send __res_send175#else
176# define __RESOLV_DEPRECATED __attribute_deprecated__
177# define __RESOLV_DEPRECATED_MSG(msg) __attribute_deprecated_msg__ (msg)
178#endif
176179
177__BEGIN_DECLS180__BEGIN_DECLS
178void fp_nquery (const unsigned char *, int, FILE *) __THROW;181void fp_nquery (const unsigned char *, int, FILE *) __THROW
179void fp_query (const unsigned char *, FILE *) __THROW;182 __RESOLV_DEPRECATED;
180const char * hostalias (const char *) __THROW;183void fp_query (const unsigned char *, FILE *) __THROW
181void p_query (const unsigned char *) __THROW;184 __RESOLV_DEPRECATED;
185const char * hostalias (const char *) __THROW
186 __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
187void p_query (const unsigned char *) __THROW
188 __RESOLV_DEPRECATED;
182void res_close (void) __THROW;189void res_close (void) __THROW;
183int res_init (void) __THROW;190int res_init (void) __THROW;
184int res_isourserver (const struct sockaddr_in *) __THROW;191int res_isourserver (const struct sockaddr_in *) __THROW
192 __RESOLV_DEPRECATED;
185int res_mkquery (int, const char *, int, int,193int res_mkquery (int, const char *, int, int,
186 const unsigned char *, int, const unsigned char *,194 const unsigned char *, int, const unsigned char *,
187 unsigned char *, int) __THROW;195 unsigned char *, int) __THROW;
...@@ -197,10 +205,7 @@ __END_DECLS...@@ -197,10 +205,7 @@ __END_DECLS
197205
198#define b64_ntop __b64_ntop206#define b64_ntop __b64_ntop
199#define b64_pton __b64_pton207#define b64_pton __b64_pton
200#define dn_comp __dn_comp
201#define dn_count_labels __dn_count_labels208#define dn_count_labels __dn_count_labels
202#define dn_expand __dn_expand
203#define dn_skipname __dn_skipname
204#define fp_resstat __fp_resstat209#define fp_resstat __fp_resstat
205#define loc_aton __loc_aton210#define loc_aton __loc_aton
206#define loc_ntoa __loc_ntoa211#define loc_ntoa __loc_ntoa
...@@ -215,19 +220,10 @@ __END_DECLS...@@ -215,19 +220,10 @@ __END_DECLS
215#define p_rcode __p_rcode220#define p_rcode __p_rcode
216#define putlong __putlong221#define putlong __putlong
217#define putshort __putshort222#define putshort __putshort
218#define res_dnok __res_dnok
219#define res_hnok __res_hnok
220#define res_hostalias __res_hostalias223#define res_hostalias __res_hostalias
221#define res_mailok __res_mailok
222#define res_nameinquery __res_nameinquery224#define res_nameinquery __res_nameinquery
223#define res_nclose __res_nclose225#define res_nclose __res_nclose
224#define res_ninit __res_ninit226#define res_ninit __res_ninit
225#define res_nmkquery __res_nmkquery
226#define res_nquery __res_nquery
227#define res_nquerydomain __res_nquerydomain
228#define res_nsearch __res_nsearch
229#define res_nsend __res_nsend
230#define res_ownok __res_ownok
231#define res_queriesmatch __res_queriesmatch227#define res_queriesmatch __res_queriesmatch
232#define res_randomid __res_randomid228#define res_randomid __res_randomid
233#define sym_ntop __sym_ntop229#define sym_ntop __sym_ntop
...@@ -238,50 +234,61 @@ int res_hnok (const char *) __THROW;...@@ -238,50 +234,61 @@ int res_hnok (const char *) __THROW;
238int res_ownok (const char *) __THROW;234int res_ownok (const char *) __THROW;
239int res_mailok (const char *) __THROW;235int res_mailok (const char *) __THROW;
240int res_dnok (const char *) __THROW;236int res_dnok (const char *) __THROW;
241int sym_ston (const struct res_sym *, const char *, int *) __THROW;237int sym_ston (const struct res_sym *, const char *, int *) __THROW
242const char * sym_ntos (const struct res_sym *, int, int *) __THROW;238 __RESOLV_DEPRECATED;
243const char * sym_ntop (const struct res_sym *, int, int *) __THROW;239const char * sym_ntos (const struct res_sym *, int, int *) __THROW
240 __RESOLV_DEPRECATED;
241const char * sym_ntop (const struct res_sym *, int, int *) __THROW
242 __RESOLV_DEPRECATED;
244int b64_ntop (const unsigned char *, size_t, char *, size_t)243int b64_ntop (const unsigned char *, size_t, char *, size_t)
245 __THROW;244 __THROW;
246int b64_pton (char const *, unsigned char *, size_t) __THROW;245int b64_pton (char const *, unsigned char *, size_t) __THROW;
247int loc_aton (const char *__ascii, unsigned char *__binary) __THROW;246int loc_aton (const char *__ascii, unsigned char *__binary) __THROW
248const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW;247 __RESOLV_DEPRECATED;
248const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW
249 __RESOLV_DEPRECATED;
249int dn_skipname (const unsigned char *, const unsigned char *)250int dn_skipname (const unsigned char *, const unsigned char *)
250 __THROW;251 __THROW;
251void putlong (uint32_t, unsigned char *) __THROW;252void putlong (uint32_t, unsigned char *) __THROW
252void putshort (uint16_t, unsigned char *) __THROW;253 __RESOLV_DEPRECATED_MSG ("use NS_PUT16 instead");
253const char * p_class (int) __THROW;254void putshort (uint16_t, unsigned char *) __THROW
254const char * p_time (uint32_t) __THROW;255 __RESOLV_DEPRECATED_MSG ("use NS_PUT32 instead");
255const char * p_type (int) __THROW;256const char * p_class (int) __THROW __RESOLV_DEPRECATED;
256const char * p_rcode (int) __THROW;257const char * p_time (uint32_t) __THROW __RESOLV_DEPRECATED;
257const unsigned char * p_cdnname (const unsigned char *,258const char * p_type (int) __THROW __RESOLV_DEPRECATED;
258 const unsigned char *, int, FILE *) __THROW;259const char * p_rcode (int) __THROW __RESOLV_DEPRECATED;
260const unsigned char * p_cdnname (const unsigned char *, const unsigned char *,
261 int, FILE *) __THROW __RESOLV_DEPRECATED;
259const unsigned char * p_cdname (const unsigned char *, const unsigned char *,262const unsigned char * p_cdname (const unsigned char *, const unsigned char *,
260 FILE *) __THROW;263 FILE *) __THROW __RESOLV_DEPRECATED;
261const unsigned char * p_fqnname (const unsigned char *__cp,264const unsigned char * p_fqnname (const unsigned char *__cp,
262 const unsigned char *__msg,265 const unsigned char *__msg,
263 int, char *, int) __THROW;266 int, char *, int) __THROW __RESOLV_DEPRECATED;
264const unsigned char * p_fqname (const unsigned char *,267const unsigned char * p_fqname (const unsigned char *, const unsigned char *,
265 const unsigned char *, FILE *) __THROW;268 FILE *) __THROW __RESOLV_DEPRECATED;
266const char * p_option (unsigned long __option) __THROW;269const char * p_option (unsigned long __option) __THROW __RESOLV_DEPRECATED;
267int dn_count_labels (const char *) __THROW;270int dn_count_labels (const char *) __THROW __RESOLV_DEPRECATED;
268int dn_comp (const char *, unsigned char *, int, unsigned char **,271int dn_comp (const char *, unsigned char *, int, unsigned char **,
269 unsigned char **) __THROW;272 unsigned char **) __THROW;
270int dn_expand (const unsigned char *, const unsigned char *,273int dn_expand (const unsigned char *, const unsigned char *,
271 const unsigned char *, char *, int) __THROW;274 const unsigned char *, char *, int) __THROW;
272unsigned int res_randomid (void) __THROW;275unsigned int res_randomid (void) __THROW
276 __RESOLV_DEPRECATED_MSG ("use getentropy instead");
273int res_nameinquery (const char *, int, int,277int res_nameinquery (const char *, int, int,
274 const unsigned char *,278 const unsigned char *,
275 const unsigned char *) __THROW;279 const unsigned char *) __THROW
280 __RESOLV_DEPRECATED;
276int res_queriesmatch (const unsigned char *,281int res_queriesmatch (const unsigned char *,
277 const unsigned char *,282 const unsigned char *,
278 const unsigned char *,283 const unsigned char *,
279 const unsigned char *) __THROW;284 const unsigned char *) __THROW
285 __RESOLV_DEPRECATED;
280/* Things involving a resolver context. */286/* Things involving a resolver context. */
281int res_ninit (res_state) __THROW;287int res_ninit (res_state) __THROW;
282void fp_resstat (const res_state, FILE *) __THROW;288void fp_resstat (const res_state, FILE *) __THROW
289 __RESOLV_DEPRECATED;
283const char * res_hostalias (const res_state, const char *, char *, size_t)290const char * res_hostalias (const res_state, const char *, char *, size_t)
284 __THROW;291 __THROW __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
285int res_nquery (res_state, const char *, int, int,292int res_nquery (res_state, const char *, int, int,
286 unsigned char *, int) __THROW;293 unsigned char *, int) __THROW;
287int res_nsearch (res_state, const char *, int, int,294int res_nsearch (res_state, const char *, int, int,
lib/libc/include/generic-glibc/sched.h+10-1
...@@ -74,8 +74,17 @@ extern int sched_get_priority_max (int __algorithm) __THROW;...@@ -74,8 +74,17 @@ extern int sched_get_priority_max (int __algorithm) __THROW;
74extern int sched_get_priority_min (int __algorithm) __THROW;74extern int sched_get_priority_min (int __algorithm) __THROW;
7575
76/* Get the SCHED_RR interval for the named process. */76/* Get the SCHED_RR interval for the named process. */
77#ifndef __USE_TIME_BITS64
77extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;78extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
7879#else
80# ifdef __REDIRECT_NTH
81extern int __REDIRECT_NTH (sched_rr_get_interval,
82 (__pid_t __pid, struct timespec *__t),
83 __sched_rr_get_interval64);
84# else
85# define sched_rr_get_interval __sched_rr_get_interval64
86# endif
87#endif
7988
80#ifdef __USE_GNU89#ifdef __USE_GNU
81/* Access macros for `cpu_set'. */90/* Access macros for `cpu_set'. */
lib/libc/include/generic-glibc/semaphore.h+25
...@@ -59,16 +59,41 @@ extern int sem_wait (sem_t *__sem) __nonnull ((1));...@@ -59,16 +59,41 @@ extern int sem_wait (sem_t *__sem) __nonnull ((1));
5959
60 This function is a cancellation point and therefore not marked with60 This function is a cancellation point and therefore not marked with
61 __THROW. */61 __THROW. */
62# ifndef __USE_TIME_BITS64
62extern int sem_timedwait (sem_t *__restrict __sem,63extern int sem_timedwait (sem_t *__restrict __sem,
63 const struct timespec *__restrict __abstime)64 const struct timespec *__restrict __abstime)
64 __nonnull ((1, 2));65 __nonnull ((1, 2));
66# else
67# ifdef __REDIRECT
68extern int __REDIRECT (sem_timedwait,
69 (sem_t *__restrict __sem,
70 const struct timespec *__restrict __abstime),
71 __sem_timedwait64)
72 __nonnull ((1, 2));
73# else
74# define sem_timedwait __sem_timedwait64
75# endif
76# endif
65#endif77#endif
6678
67#ifdef __USE_GNU79#ifdef __USE_GNU
80# ifndef __USE_TIME_BITS64
68extern int sem_clockwait (sem_t *__restrict __sem,81extern int sem_clockwait (sem_t *__restrict __sem,
69 clockid_t clock,82 clockid_t clock,
70 const struct timespec *__restrict __abstime)83 const struct timespec *__restrict __abstime)
71 __nonnull ((1, 3));84 __nonnull ((1, 3));
85# else
86# ifdef __REDIRECT
87extern int __REDIRECT (sem_clockwait,
88 (sem_t *__restrict __sem,
89 clockid_t clock,
90 const struct timespec *__restrict __abstime),
91 __sem_clockwait64)
92 __nonnull ((1, 3));
93# else
94# define sem_clockwait __sem_clockwait64
95# endif
96# endif
72#endif97#endif
7398
74/* Test whether SEM is posted. */99/* Test whether SEM is posted. */
lib/libc/include/generic-glibc/signal.h+14
...@@ -269,10 +269,23 @@ extern int sigwaitinfo (const sigset_t *__restrict __set,...@@ -269,10 +269,23 @@ extern int sigwaitinfo (const sigset_t *__restrict __set,
269269
270 This function is a cancellation point and therefore not marked with270 This function is a cancellation point and therefore not marked with
271 __THROW. */271 __THROW. */
272# ifndef __USE_TIME_BITS64
272extern int sigtimedwait (const sigset_t *__restrict __set,273extern int sigtimedwait (const sigset_t *__restrict __set,
273 siginfo_t *__restrict __info,274 siginfo_t *__restrict __info,
274 const struct timespec *__restrict __timeout)275 const struct timespec *__restrict __timeout)
275 __nonnull ((1));276 __nonnull ((1));
277# else
278# ifdef __REDIRECT
279extern int __REDIRECT (sigtimedwait,
280 (const sigset_t *__restrict __set,
281 siginfo_t *__restrict __info,
282 const struct timespec *__restrict __timeout),
283 __sigtimedwait64)
284 __nonnull ((1));
285# else
286# define sigtimedwait __sigtimedwait64
287# endif
288# endif
276289
277/* Send signal SIG to the process PID. Associate data in VAL with the290/* Send signal SIG to the process PID. Associate data in VAL with the
278 signal. */291 signal. */
...@@ -312,6 +325,7 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW...@@ -312,6 +325,7 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW
312 __attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead");325 __attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead");
313326
314# include <bits/sigstack.h>327# include <bits/sigstack.h>
328# include <bits/sigstksz.h>
315# include <bits/ss_flags.h>329# include <bits/ss_flags.h>
316330
317/* Alternate signal handler stack interface.331/* Alternate signal handler stack interface.
lib/libc/include/generic-glibc/spawn.h+8
...@@ -213,6 +213,14 @@ extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *...@@ -213,6 +213,14 @@ extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
213extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *,213extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *,
214 int __fd)214 int __fd)
215 __THROW __nonnull ((1));215 __THROW __nonnull ((1));
216
217/* Add an action to close all file descriptor greater than or equal to FROM
218 during spawn. This affects the subsequent file actions. */
219extern int
220posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t *,
221 int __from)
222 __THROW __nonnull ((1));
223
216#endif224#endif
217225
218__END_DECLS226__END_DECLS
lib/libc/include/generic-glibc/stdio.h+48-26
...@@ -165,31 +165,43 @@ extern int renameat2 (int __oldfd, const char *__old, int __newfd,...@@ -165,31 +165,43 @@ extern int renameat2 (int __oldfd, const char *__old, int __newfd,
165 const char *__new, unsigned int __flags) __THROW;165 const char *__new, unsigned int __flags) __THROW;
166#endif166#endif
167167
168/* Close STREAM.
169
170 This function is a possible cancellation point and therefore not
171 marked with __THROW. */
172extern int fclose (FILE *__stream);
173
174#undef __attr_dealloc_fclose
175#define __attr_dealloc_fclose __attr_dealloc (fclose, 1)
176
168/* Create a temporary file and open it read/write.177/* Create a temporary file and open it read/write.
169178
170 This function is a possible cancellation point and therefore not179 This function is a possible cancellation point and therefore not
171 marked with __THROW. */180 marked with __THROW. */
172#ifndef __USE_FILE_OFFSET64181#ifndef __USE_FILE_OFFSET64
173extern FILE *tmpfile (void) __wur;182extern FILE *tmpfile (void)
183 __attribute_malloc__ __attr_dealloc_fclose __wur;
174#else184#else
175# ifdef __REDIRECT185# ifdef __REDIRECT
176extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur;186extern FILE *__REDIRECT (tmpfile, (void), tmpfile64)
187 __attribute_malloc__ __attr_dealloc_fclose __wur;
177# else188# else
178# define tmpfile tmpfile64189# define tmpfile tmpfile64
179# endif190# endif
180#endif191#endif
181192
182#ifdef __USE_LARGEFILE64193#ifdef __USE_LARGEFILE64
183extern FILE *tmpfile64 (void) __wur;194extern FILE *tmpfile64 (void)
195 __attribute_malloc__ __attr_dealloc_fclose __wur;
184#endif196#endif
185197
186/* Generate a temporary filename. */198/* Generate a temporary filename. */
187extern char *tmpnam (char *__s) __THROW __wur;199extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
188200
189#ifdef __USE_MISC201#ifdef __USE_MISC
190/* This is the reentrant variant of `tmpnam'. The only difference is202/* This is the reentrant variant of `tmpnam'. The only difference is
191 that it does not allow S to be NULL. */203 that it does not allow S to be NULL. */
192extern char *tmpnam_r (char *__s) __THROW __wur;204extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
193#endif205#endif
194206
195207
...@@ -202,15 +214,9 @@ extern char *tmpnam_r (char *__s) __THROW __wur;...@@ -202,15 +214,9 @@ extern char *tmpnam_r (char *__s) __THROW __wur;
202 P_tmpdir is tried and finally "/tmp". The storage for the filename214 P_tmpdir is tried and finally "/tmp". The storage for the filename
203 is allocated by `malloc'. */215 is allocated by `malloc'. */
204extern char *tempnam (const char *__dir, const char *__pfx)216extern char *tempnam (const char *__dir, const char *__pfx)
205 __THROW __attribute_malloc__ __wur;217 __THROW __attribute_malloc__ __wur __attr_dealloc_free;
206#endif218#endif
207219
208
209/* Close STREAM.
210
211 This function is a possible cancellation point and therefore not
212 marked with __THROW. */
213extern int fclose (FILE *__stream);
214/* Flush STREAM, or all streams if STREAM is NULL.220/* Flush STREAM, or all streams if STREAM is NULL.
215221
216 This function is a possible cancellation point and therefore not222 This function is a possible cancellation point and therefore not
...@@ -244,7 +250,8 @@ extern int fcloseall (void);...@@ -244,7 +250,8 @@ extern int fcloseall (void);
244 This function is a possible cancellation point and therefore not250 This function is a possible cancellation point and therefore not
245 marked with __THROW. */251 marked with __THROW. */
246extern FILE *fopen (const char *__restrict __filename,252extern FILE *fopen (const char *__restrict __filename,
247 const char *__restrict __modes) __wur;253 const char *__restrict __modes)
254 __attribute_malloc__ __attr_dealloc_fclose __wur;
248/* Open a file, replacing an existing stream with it.255/* Open a file, replacing an existing stream with it.
249256
250 This function is a possible cancellation point and therefore not257 This function is a possible cancellation point and therefore not
...@@ -256,7 +263,7 @@ extern FILE *freopen (const char *__restrict __filename,...@@ -256,7 +263,7 @@ extern FILE *freopen (const char *__restrict __filename,
256# ifdef __REDIRECT263# ifdef __REDIRECT
257extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,264extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
258 const char *__restrict __modes), fopen64)265 const char *__restrict __modes), fopen64)
259 __wur;266 __attribute_malloc__ __attr_dealloc_fclose __wur;
260extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,267extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
261 const char *__restrict __modes,268 const char *__restrict __modes,
262 FILE *__restrict __stream), freopen64)269 FILE *__restrict __stream), freopen64)
...@@ -268,7 +275,8 @@ extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,...@@ -268,7 +275,8 @@ extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
268#endif275#endif
269#ifdef __USE_LARGEFILE64276#ifdef __USE_LARGEFILE64
270extern FILE *fopen64 (const char *__restrict __filename,277extern FILE *fopen64 (const char *__restrict __filename,
271 const char *__restrict __modes) __wur;278 const char *__restrict __modes)
279 __attribute_malloc__ __attr_dealloc_fclose __wur;
272extern FILE *freopen64 (const char *__restrict __filename,280extern FILE *freopen64 (const char *__restrict __filename,
273 const char *__restrict __modes,281 const char *__restrict __modes,
274 FILE *__restrict __stream) __wur;282 FILE *__restrict __stream) __wur;
...@@ -276,7 +284,8 @@ extern FILE *freopen64 (const char *__restrict __filename,...@@ -276,7 +284,8 @@ extern FILE *freopen64 (const char *__restrict __filename,
276284
277#ifdef __USE_POSIX285#ifdef __USE_POSIX
278/* Create a new stream that refers to an existing system file descriptor. */286/* Create a new stream that refers to an existing system file descriptor. */
279extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;287extern FILE *fdopen (int __fd, const char *__modes) __THROW
288 __attribute_malloc__ __attr_dealloc_fclose __wur;
280#endif289#endif
281290
282#ifdef __USE_GNU291#ifdef __USE_GNU
...@@ -284,21 +293,30 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;...@@ -284,21 +293,30 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
284 and uses the given functions for input and output. */293 and uses the given functions for input and output. */
285extern FILE *fopencookie (void *__restrict __magic_cookie,294extern FILE *fopencookie (void *__restrict __magic_cookie,
286 const char *__restrict __modes,295 const char *__restrict __modes,
287 cookie_io_functions_t __io_funcs) __THROW __wur;296 cookie_io_functions_t __io_funcs) __THROW
297 __attribute_malloc__ __attr_dealloc_fclose __wur;
288#endif298#endif
289299
290#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)300#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
291/* Create a new stream that refers to a memory buffer. */301/* Create a new stream that refers to a memory buffer. */
292extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)302extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
293 __THROW __wur;303 __THROW __attribute_malloc__ __attr_dealloc_fclose __wur;
294304
295/* Open a stream that writes into a malloc'd buffer that is expanded as305/* Open a stream that writes into a malloc'd buffer that is expanded as
296 necessary. *BUFLOC and *SIZELOC are updated with the buffer's location306 necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
297 and the number of characters written on fflush or fclose. */307 and the number of characters written on fflush or fclose. */
298extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;308extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW
309 __attribute_malloc__ __attr_dealloc_fclose __wur;
310
311#ifdef _WCHAR_H
312/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
313 a wide character string. Declared here only to add attribute malloc
314 and only if <wchar.h> has been previously #included. */
315extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW
316 __attribute_malloc__ __attr_dealloc_fclose;
317# endif
299#endif318#endif
300319
301
302/* If BUF is NULL, make STREAM unbuffered.320/* If BUF is NULL, make STREAM unbuffered.
303 Else make it use buffer BUF, of size BUFSIZ. */321 Else make it use buffer BUF, of size BUFSIZ. */
304extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;322extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
...@@ -792,29 +810,33 @@ extern int fileno_unlocked (FILE *__stream) __THROW __wur;...@@ -792,29 +810,33 @@ extern int fileno_unlocked (FILE *__stream) __THROW __wur;
792810
793811
794#ifdef __USE_POSIX2812#ifdef __USE_POSIX2
795/* Create a new stream connected to a pipe running the given command.813/* Close a stream opened by popen and return the status of its child.
796814
797 This function is a possible cancellation point and therefore not815 This function is a possible cancellation point and therefore not
798 marked with __THROW. */816 marked with __THROW. */
799extern FILE *popen (const char *__command, const char *__modes) __wur;817extern int pclose (FILE *__stream);
800818
801/* Close a stream opened by popen and return the status of its child.819/* Create a new stream connected to a pipe running the given command.
802820
803 This function is a possible cancellation point and therefore not821 This function is a possible cancellation point and therefore not
804 marked with __THROW. */822 marked with __THROW. */
805extern int pclose (FILE *__stream);823extern FILE *popen (const char *__command, const char *__modes)
824 __attribute_malloc__ __attr_dealloc (pclose, 1) __wur;
825
806#endif826#endif
807827
808828
809#ifdef __USE_POSIX829#ifdef __USE_POSIX
810/* Return the name of the controlling terminal. */830/* Return the name of the controlling terminal. */
811extern char *ctermid (char *__s) __THROW;831extern char *ctermid (char *__s) __THROW
832 __attr_access ((__write_only__, 1));
812#endif /* Use POSIX. */833#endif /* Use POSIX. */
813834
814835
815#if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU836#if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU
816/* Return the name of the current user. */837/* Return the name of the current user. */
817extern char *cuserid (char *__s);838extern char *cuserid (char *__s)
839 __attr_access ((__write_only__, 1));
818#endif /* Use X/Open, but not issue 6. */840#endif /* Use X/Open, but not issue 6. */
819841
820842
lib/libc/include/generic-glibc/stdlib.h+11-5
...@@ -550,6 +550,9 @@ extern void *calloc (size_t __nmemb, size_t __size)...@@ -550,6 +550,9 @@ extern void *calloc (size_t __nmemb, size_t __size)
550extern void *realloc (void *__ptr, size_t __size)550extern void *realloc (void *__ptr, size_t __size)
551 __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));551 __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
552552
553/* Free a block allocated by `malloc', `realloc' or `calloc'. */
554extern void free (void *__ptr) __THROW;
555
553#ifdef __USE_MISC556#ifdef __USE_MISC
554/* Re-allocate the previously allocated block in PTR, making the new557/* Re-allocate the previously allocated block in PTR, making the new
555 block large enough for NMEMB elements of SIZE bytes each. */558 block large enough for NMEMB elements of SIZE bytes each. */
...@@ -558,11 +561,13 @@ extern void *realloc (void *__ptr, size_t __size)...@@ -558,11 +561,13 @@ extern void *realloc (void *__ptr, size_t __size)
558 between objects pointed by the old and new pointers. */561 between objects pointed by the old and new pointers. */
559extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)562extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
560 __THROW __attribute_warn_unused_result__563 __THROW __attribute_warn_unused_result__
561 __attribute_alloc_size__ ((2, 3));564 __attribute_alloc_size__ ((2, 3))
562#endif565 __attr_dealloc_free;
563566
564/* Free a block allocated by `malloc', `realloc' or `calloc'. */567/* Add reallocarray as its own deallocator. */
565extern void free (void *__ptr) __THROW;568extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
569 __THROW __attr_dealloc (reallocarray, 1);
570#endif
566571
567#ifdef __USE_MISC572#ifdef __USE_MISC
568# include <alloca.h>573# include <alloca.h>
...@@ -788,7 +793,8 @@ extern int system (const char *__command) __wur;...@@ -788,7 +793,8 @@ extern int system (const char *__command) __wur;
788/* Return a malloc'd string containing the canonical absolute name of the793/* Return a malloc'd string containing the canonical absolute name of the
789 existing named file. */794 existing named file. */
790extern char *canonicalize_file_name (const char *__name)795extern char *canonicalize_file_name (const char *__name)
791 __THROW __nonnull ((1)) __wur;796 __THROW __nonnull ((1)) __attribute_malloc__
797 __attr_dealloc_free __wur;
792#endif798#endif
793799
794#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED800#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
lib/libc/include/generic-glibc/sys/cdefs.h+113-58
...@@ -34,7 +34,29 @@...@@ -34,7 +34,29 @@
34#undef __P34#undef __P
35#undef __PMT35#undef __PMT
3636
37#ifdef __GNUC__37/* Compilers that lack __has_attribute may object to
38 #if defined __has_attribute && __has_attribute (...)
39 even though they do not need to evaluate the right-hand side of the &&.
40 Similarly for __has_builtin, etc. */
41#if (defined __has_attribute \
42 && (!defined __clang_minor__ \
43 || 3 < __clang_major__ + (5 <= __clang_minor__)))
44# define __glibc_has_attribute(attr) __has_attribute (attr)
45#else
46# define __glibc_has_attribute(attr) 0
47#endif
48#ifdef __has_builtin
49# define __glibc_has_builtin(name) __has_builtin (name)
50#else
51# define __glibc_has_builtin(name) 0
52#endif
53#ifdef __has_extension
54# define __glibc_has_extension(ext) __has_extension (ext)
55#else
56# define __glibc_has_extension(ext) 0
57#endif
58
59#if defined __GNUC__ || defined __clang__
3860
39/* All functions, except those with callbacks or those that61/* All functions, except those with callbacks or those that
40 synchronize memory, are leaf functions. */62 synchronize memory, are leaf functions. */
...@@ -48,16 +70,17 @@...@@ -48,16 +70,17 @@
4870
49/* GCC can always grok prototypes. For C++ programs we add throw()71/* GCC can always grok prototypes. For C++ programs we add throw()
50 to help it optimize the function calls. But this only works with72 to help it optimize the function calls. But this only works with
51 gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions73 gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
52 as non-throwing using a function attribute since programs can use74 as non-throwing using a function attribute since programs can use
53 the -fexceptions options for C code as well. */75 the -fexceptions options for C code as well. */
54# if !defined __cplusplus && __GNUC_PREREQ (3, 3)76# if !defined __cplusplus \
77 && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
55# define __THROW __attribute__ ((__nothrow__ __LEAF))78# define __THROW __attribute__ ((__nothrow__ __LEAF))
56# define __THROWNL __attribute__ ((__nothrow__))79# define __THROWNL __attribute__ ((__nothrow__))
57# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct80# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
58# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct81# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
59# else82# else
60# if defined __cplusplus && __GNUC_PREREQ (2,8)83# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
61# if __cplusplus >= 201103L84# if __cplusplus >= 201103L
62# define __THROW noexcept (true)85# define __THROW noexcept (true)
63# else86# else
...@@ -74,7 +97,7 @@...@@ -74,7 +97,7 @@
74# endif97# endif
75# endif98# endif
7699
77#else /* Not GCC. */100#else /* Not GCC or clang. */
78101
79# if (defined __cplusplus \102# if (defined __cplusplus \
80 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))103 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
...@@ -87,16 +110,7 @@...@@ -87,16 +110,7 @@
87# define __THROWNL110# define __THROWNL
88# define __NTH(fct) fct111# define __NTH(fct) fct
89112
90#endif /* GCC. */113#endif /* GCC || clang. */
91
92/* Compilers that are not clang may object to
93 #if defined __clang__ && __has_extension(...)
94 even though they do not need to evaluate the right-hand side of the &&. */
95#if defined __clang__ && defined __has_extension
96# define __glibc_clang_has_extension(ext) __has_extension (ext)
97#else
98# define __glibc_clang_has_extension(ext) 0
99#endif
100114
101/* These two macros are not used in glibc anymore. They are kept here115/* These two macros are not used in glibc anymore. They are kept here
102 only because some other projects expect the macros to be defined. */116 only because some other projects expect the macros to be defined. */
...@@ -149,11 +163,11 @@...@@ -149,11 +163,11 @@
149 Headers that should use flexible arrays only if they're "real"163 Headers that should use flexible arrays only if they're "real"
150 (e.g. only if they won't affect sizeof()) should test164 (e.g. only if they won't affect sizeof()) should test
151 #if __glibc_c99_flexarr_available. */165 #if __glibc_c99_flexarr_available. */
152#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L166#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
153# define __flexarr []167# define __flexarr []
154# define __glibc_c99_flexarr_available 1168# define __glibc_c99_flexarr_available 1
155#elif __GNUC_PREREQ (2,97)169#elif __GNUC_PREREQ (2,97) || defined __clang__
156/* GCC 2.97 supports C99 flexible array members as an extension,170/* GCC 2.97 and clang support C99 flexible array members as an extension,
157 even when in C89 mode or compiling C++ (any version). */171 even when in C89 mode or compiling C++ (any version). */
158# define __flexarr []172# define __flexarr []
159# define __glibc_c99_flexarr_available 1173# define __glibc_c99_flexarr_available 1
...@@ -179,7 +193,7 @@...@@ -179,7 +193,7 @@
179 Example:193 Example:
180 int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */194 int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
181195
182#if defined __GNUC__ && __GNUC__ >= 2196#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
183197
184# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))198# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
185# ifdef __cplusplus199# ifdef __cplusplus
...@@ -204,17 +218,17 @@...@@ -204,17 +218,17 @@
204*/218*/
205#endif219#endif
206220
207/* GCC has various useful declarations that can be made with the221/* GCC and clang have various useful declarations that can be made with
208 `__attribute__' syntax. All of the ways we use this do fine if222 the '__attribute__' syntax. All of the ways we use this do fine if
209 they are omitted for compilers that don't understand it. */223 they are omitted for compilers that don't understand it. */
210#if !defined __GNUC__ || __GNUC__ < 2224#if !(defined __GNUC__ || defined __clang__)
211# define __attribute__(xyz) /* Ignore */225# define __attribute__(xyz) /* Ignore */
212#endif226#endif
213227
214/* At some point during the gcc 2.96 development the `malloc' attribute228/* At some point during the gcc 2.96 development the `malloc' attribute
215 for functions was introduced. We don't want to use it unconditionally229 for functions was introduced. We don't want to use it unconditionally
216 (although this would be possible) since it generates warnings. */230 (although this would be possible) since it generates warnings. */
217#if __GNUC_PREREQ (2,96)231#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
218# define __attribute_malloc__ __attribute__ ((__malloc__))232# define __attribute_malloc__ __attribute__ ((__malloc__))
219#else233#else
220# define __attribute_malloc__ /* Ignore */234# define __attribute_malloc__ /* Ignore */
...@@ -232,23 +246,29 @@...@@ -232,23 +246,29 @@
232/* At some point during the gcc 2.96 development the `pure' attribute246/* At some point during the gcc 2.96 development the `pure' attribute
233 for functions was introduced. We don't want to use it unconditionally247 for functions was introduced. We don't want to use it unconditionally
234 (although this would be possible) since it generates warnings. */248 (although this would be possible) since it generates warnings. */
235#if __GNUC_PREREQ (2,96)249#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
236# define __attribute_pure__ __attribute__ ((__pure__))250# define __attribute_pure__ __attribute__ ((__pure__))
237#else251#else
238# define __attribute_pure__ /* Ignore */252# define __attribute_pure__ /* Ignore */
239#endif253#endif
240254
241/* This declaration tells the compiler that the value is constant. */255/* This declaration tells the compiler that the value is constant. */
242#if __GNUC_PREREQ (2,5)256#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
243# define __attribute_const__ __attribute__ ((__const__))257# define __attribute_const__ __attribute__ ((__const__))
244#else258#else
245# define __attribute_const__ /* Ignore */259# define __attribute_const__ /* Ignore */
246#endif260#endif
247261
262#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
263# define __attribute_maybe_unused__ __attribute__ ((__unused__))
264#else
265# define __attribute_maybe_unused__ /* Ignore */
266#endif
267
248/* At some point during the gcc 3.1 development the `used' attribute268/* At some point during the gcc 3.1 development the `used' attribute
249 for functions was introduced. We don't want to use it unconditionally269 for functions was introduced. We don't want to use it unconditionally
250 (although this would be possible) since it generates warnings. */270 (although this would be possible) since it generates warnings. */
251#if __GNUC_PREREQ (3,1)271#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
252# define __attribute_used__ __attribute__ ((__used__))272# define __attribute_used__ __attribute__ ((__used__))
253# define __attribute_noinline__ __attribute__ ((__noinline__))273# define __attribute_noinline__ __attribute__ ((__noinline__))
254#else274#else
...@@ -257,7 +277,7 @@...@@ -257,7 +277,7 @@
257#endif277#endif
258278
259/* Since version 3.2, gcc allows marking deprecated functions. */279/* Since version 3.2, gcc allows marking deprecated functions. */
260#if __GNUC_PREREQ (3,2)280#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
261# define __attribute_deprecated__ __attribute__ ((__deprecated__))281# define __attribute_deprecated__ __attribute__ ((__deprecated__))
262#else282#else
263# define __attribute_deprecated__ /* Ignore */283# define __attribute_deprecated__ /* Ignore */
...@@ -267,7 +287,7 @@...@@ -267,7 +287,7 @@
267 when a deprecated function is used. clang claims to be gcc 4.2, but287 when a deprecated function is used. clang claims to be gcc 4.2, but
268 may also support this feature. */288 may also support this feature. */
269#if __GNUC_PREREQ (4,5) \289#if __GNUC_PREREQ (4,5) \
270 || __glibc_clang_has_extension (__attribute_deprecated_with_message__)290 || __glibc_has_extension (__attribute_deprecated_with_message__)
271# define __attribute_deprecated_msg__(msg) \291# define __attribute_deprecated_msg__(msg) \
272 __attribute__ ((__deprecated__ (msg)))292 __attribute__ ((__deprecated__ (msg)))
273#else293#else
...@@ -280,7 +300,7 @@...@@ -280,7 +300,7 @@
280 If several `format_arg' attributes are given for the same function, in300 If several `format_arg' attributes are given for the same function, in
281 gcc-3.0 and older, all but the last one are ignored. In newer gccs,301 gcc-3.0 and older, all but the last one are ignored. In newer gccs,
282 all designated arguments are considered. */302 all designated arguments are considered. */
283#if __GNUC_PREREQ (2,8)303#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
284# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))304# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
285#else305#else
286# define __attribute_format_arg__(x) /* Ignore */306# define __attribute_format_arg__(x) /* Ignore */
...@@ -290,27 +310,42 @@...@@ -290,27 +310,42 @@
290 attribute for functions was introduced. We don't want to use it310 attribute for functions was introduced. We don't want to use it
291 unconditionally (although this would be possible) since it311 unconditionally (although this would be possible) since it
292 generates warnings. */312 generates warnings. */
293#if __GNUC_PREREQ (2,97)313#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
294# define __attribute_format_strfmon__(a,b) \314# define __attribute_format_strfmon__(a,b) \
295 __attribute__ ((__format__ (__strfmon__, a, b)))315 __attribute__ ((__format__ (__strfmon__, a, b)))
296#else316#else
297# define __attribute_format_strfmon__(a,b) /* Ignore */317# define __attribute_format_strfmon__(a,b) /* Ignore */
298#endif318#endif
299319
300/* The nonull function attribute allows to mark pointer parameters which320/* The nonnull function attribute marks pointer parameters that
301 must not be NULL. */321 must not be NULL. */
302#if __GNUC_PREREQ (3,3)322#ifndef __nonnull
303# define __nonnull(params) __attribute__ ((__nonnull__ params))323# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
304#else324# define __nonnull(params) __attribute__ ((__nonnull__ params))
305# define __nonnull(params)325# else
326# define __nonnull(params)
327# endif
328#elif !defined __GLIBC__
329# undef __nonnull
330# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params)
331#endif
332
333/* The returns_nonnull function attribute marks the return type of the function
334 as always being non-null. */
335#ifndef __returns_nonnull
336# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__)
337# define __returns_nonnull __attribute__ ((__returns_nonnull__))
338# else
339# define __returns_nonnull
340# endif
306#endif341#endif
307342
308/* If fortification mode, we warn about unused results of certain343/* If fortification mode, we warn about unused results of certain
309 function calls which can lead to problems. */344 function calls which can lead to problems. */
310#if __GNUC_PREREQ (3,4)345#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
311# define __attribute_warn_unused_result__ \346# define __attribute_warn_unused_result__ \
312 __attribute__ ((__warn_unused_result__))347 __attribute__ ((__warn_unused_result__))
313# if __USE_FORTIFY_LEVEL > 0348# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
314# define __wur __attribute_warn_unused_result__349# define __wur __attribute_warn_unused_result__
315# endif350# endif
316#else351#else
...@@ -321,7 +356,7 @@...@@ -321,7 +356,7 @@
321#endif356#endif
322357
323/* Forces a function to be always inlined. */358/* Forces a function to be always inlined. */
324#if __GNUC_PREREQ (3,2)359#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
325/* The Linux kernel defines __always_inline in stddef.h (283d7573), and360/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
326 it conflicts with this definition. Therefore undefine it first to361 it conflicts with this definition. Therefore undefine it first to
327 allow either header to be included first. */362 allow either header to be included first. */
...@@ -334,7 +369,7 @@...@@ -334,7 +369,7 @@
334369
335/* Associate error messages with the source location of the call site rather370/* Associate error messages with the source location of the call site rather
336 than with the source location inside the function. */371 than with the source location inside the function. */
337#if __GNUC_PREREQ (4,3)372#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
338# define __attribute_artificial__ __attribute__ ((__artificial__))373# define __attribute_artificial__ __attribute__ ((__artificial__))
339#else374#else
340# define __attribute_artificial__ /* Ignore */375# define __attribute_artificial__ /* Ignore */
...@@ -377,12 +412,14 @@...@@ -377,12 +412,14 @@
377 run in pedantic mode if the uses are carefully marked using the412 run in pedantic mode if the uses are carefully marked using the
378 `__extension__' keyword. But this is not generally available before413 `__extension__' keyword. But this is not generally available before
379 version 2.8. */414 version 2.8. */
380#if !__GNUC_PREREQ (2,8)415#if !(__GNUC_PREREQ (2,8) || defined __clang__)
381# define __extension__ /* Ignore */416# define __extension__ /* Ignore */
382#endif417#endif
383418
384/* __restrict is known in EGCS 1.2 and above. */419/* __restrict is known in EGCS 1.2 and above, and in clang.
385#if !__GNUC_PREREQ (2,92)420 It works also in C++ mode (outside of arrays), but only when spelled
421 as '__restrict', not 'restrict'. */
422#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
386# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L423# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
387# define __restrict restrict424# define __restrict restrict
388# else425# else
...@@ -392,8 +429,9 @@...@@ -392,8 +429,9 @@
392429
393/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is430/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
394 array_name[restrict]431 array_name[restrict]
395 GCC 3.1 supports this. */432 GCC 3.1 and clang support this.
396#if __GNUC_PREREQ (3,1) && !defined __GNUG__433 This syntax is not usable in C++ mode. */
434#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
397# define __restrict_arr __restrict435# define __restrict_arr __restrict
398#else436#else
399# ifdef __GNUC__437# ifdef __GNUC__
...@@ -408,7 +446,7 @@...@@ -408,7 +446,7 @@
408# endif446# endif
409#endif447#endif
410448
411#if __GNUC__ >= 3449#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
412# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)450# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
413# define __glibc_likely(cond) __builtin_expect ((cond), 1)451# define __glibc_likely(cond) __builtin_expect ((cond), 1)
414#else452#else
...@@ -416,15 +454,10 @@...@@ -416,15 +454,10 @@
416# define __glibc_likely(cond) (cond)454# define __glibc_likely(cond) (cond)
417#endif455#endif
418456
419#ifdef __has_attribute
420# define __glibc_has_attribute(attr) __has_attribute (attr)
421#else
422# define __glibc_has_attribute(attr) 0
423#endif
424
425#if (!defined _Noreturn \457#if (!defined _Noreturn \
426 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \458 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
427 && !__GNUC_PREREQ (4,7))459 && !(__GNUC_PREREQ (4,7) \
460 || (3 < __clang_major__ + (5 <= __clang_minor__))))
428# if __GNUC_PREREQ (2,8)461# if __GNUC_PREREQ (2,8)
429# define _Noreturn __attribute__ ((__noreturn__))462# define _Noreturn __attribute__ ((__noreturn__))
430# else463# else
...@@ -453,14 +486,19 @@...@@ -453,14 +486,19 @@
453486
454#if (!defined _Static_assert && !defined __cplusplus \487#if (!defined _Static_assert && !defined __cplusplus \
455 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \488 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
456 && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))489 && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
490 || defined __STRICT_ANSI__))
457# define _Static_assert(expr, diagnostic) \491# define _Static_assert(expr, diagnostic) \
458 extern int (*__Static_assert_function (void)) \492 extern int (*__Static_assert_function (void)) \
459 [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]493 [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
460#endif494#endif
461495
462#include <bits/wordsize.h>496/* The #ifndef lets Gnulib avoid including these on non-glibc
463#include <bits/long-double.h>497 platforms, where the includes typically do not exist. */
498#ifdef __GLIBC__
499# include <bits/wordsize.h>
500# include <bits/long-double.h>
501#endif
464502
465#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1503#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
466# ifdef __REDIRECT504# ifdef __REDIRECT
...@@ -550,7 +588,7 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf...@@ -550,7 +588,7 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
550 check is required to enable the use of generic selection. */588 check is required to enable the use of generic selection. */
551#if !defined __cplusplus \589#if !defined __cplusplus \
552 && (__GNUC_PREREQ (4, 9) \590 && (__GNUC_PREREQ (4, 9) \
553 || __glibc_clang_has_extension (c_generic_selections) \591 || __glibc_has_extension (c_generic_selections) \
554 || (!defined __GNUC__ && defined __STDC_VERSION__ \592 || (!defined __GNUC__ && defined __STDC_VERSION__ \
555 && __STDC_VERSION__ >= 201112L))593 && __STDC_VERSION__ >= 201112L))
556# define __HAVE_GENERIC_SELECTION 1594# define __HAVE_GENERIC_SELECTION 1
...@@ -564,9 +602,26 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf...@@ -564,9 +602,26 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
564 array according to access mode, or at least one element when602 array according to access mode, or at least one element when
565 size-index is not provided:603 size-index is not provided:
566 access (access-mode, <ref-index> [, <size-index>]) */604 access (access-mode, <ref-index> [, <size-index>]) */
567#define __attr_access(x) __attribute__ ((__access__ x))605# define __attr_access(x) __attribute__ ((__access__ x))
606# if __GNUC_PREREQ (11, 0)
607# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
608# else
609# define __attr_access_none(argno)
610# endif
568#else611#else
569# define __attr_access(x)612# define __attr_access(x)
613# define __attr_access_none(argno)
614#endif
615
616#if __GNUC_PREREQ (11, 0)
617/* Designates dealloc as a function to call to deallocate objects
618 allocated by the declared function. */
619# define __attr_dealloc(dealloc, argno) \
620 __attribute__ ((__malloc__ (dealloc, argno)))
621# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
622#else
623# define __attr_dealloc(dealloc, argno)
624# define __attr_dealloc_free
570#endif625#endif
571626
572/* Specify that a function such as setjmp or vfork may return627/* Specify that a function such as setjmp or vfork may return
lib/libc/include/generic-glibc/sys/ioctl.h+10
...@@ -38,7 +38,17 @@ __BEGIN_DECLS...@@ -38,7 +38,17 @@ __BEGIN_DECLS
38/* Perform the I/O control operation specified by REQUEST on FD.38/* Perform the I/O control operation specified by REQUEST on FD.
39 One argument may follow; its presence and type depend on REQUEST.39 One argument may follow; its presence and type depend on REQUEST.
40 Return value depends on REQUEST. Usually -1 indicates error. */40 Return value depends on REQUEST. Usually -1 indicates error. */
41#ifndef __USE_TIME_BITS64
41extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;42extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
43#else
44# ifdef __REDIRECT
45extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
46 __ioctl_time64) __THROW;
47# else
48extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
49# define ioctl __ioctl_time64
50# endif
51#endif
4252
43__END_DECLS53__END_DECLS
4454
lib/libc/include/generic-glibc/sys/mount.h+2
...@@ -48,6 +48,8 @@ enum...@@ -48,6 +48,8 @@ enum
48#define MS_MANDLOCK MS_MANDLOCK48#define MS_MANDLOCK MS_MANDLOCK
49 MS_DIRSYNC = 128, /* Directory modifications are synchronous. */49 MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
50#define MS_DIRSYNC MS_DIRSYNC50#define MS_DIRSYNC MS_DIRSYNC
51 MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
52#define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
51 MS_NOATIME = 1024, /* Do not update access times. */53 MS_NOATIME = 1024, /* Do not update access times. */
52#define MS_NOATIME MS_NOATIME54#define MS_NOATIME MS_NOATIME
53 MS_NODIRATIME = 2048, /* Do not update directory access times. */55 MS_NODIRATIME = 2048, /* Do not update directory access times. */
lib/libc/include/generic-glibc/sys/msg.h+10
...@@ -58,7 +58,17 @@ struct msgbuf...@@ -58,7 +58,17 @@ struct msgbuf
58__BEGIN_DECLS58__BEGIN_DECLS
5959
60/* Message queue control operation. */60/* Message queue control operation. */
61#ifndef __USE_TIME_BITS64
61extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;62extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
63#else
64# ifdef __REDIRECT_NTH
65extern int __REDIRECT_NTH (msgctl,
66 (int __msqid, int __cmd, struct msqid_ds *__buf),
67 __msgctl64);
68# else
69# define msgctl __msgctl64
70# endif
71#endif
6272
63/* Get messages queue. */73/* Get messages queue. */
64extern int msgget (key_t __key, int __msgflg) __THROW;74extern int msgget (key_t __key, int __msgflg) __THROW;
lib/libc/include/generic-glibc/sys/platform/x86.h+7-7
...@@ -30,7 +30,7 @@ extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)...@@ -30,7 +30,7 @@ extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)
30 __attribute__ ((pure));30 __attribute__ ((pure));
3131
32static __inline__ _Bool32static __inline__ _Bool
33x86_cpu_has_feature (unsigned int __index)33x86_cpu_present (unsigned int __index)
34{34{
35 const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf35 const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
36 (__index / (8 * sizeof (unsigned int) * 4));36 (__index / (8 * sizeof (unsigned int) * 4));
...@@ -43,7 +43,7 @@ x86_cpu_has_feature (unsigned int __index)...@@ -43,7 +43,7 @@ x86_cpu_has_feature (unsigned int __index)
43}43}
4444
45static __inline__ _Bool45static __inline__ _Bool
46x86_cpu_is_usable (unsigned int __index)46x86_cpu_active (unsigned int __index)
47{47{
48 const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf48 const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
49 (__index / (8 * sizeof (unsigned int) * 4));49 (__index / (8 * sizeof (unsigned int) * 4));
...@@ -52,13 +52,13 @@ x86_cpu_is_usable (unsigned int __index)...@@ -52,13 +52,13 @@ x86_cpu_is_usable (unsigned int __index)
52 unsigned int __bit = __reg & (8 * sizeof (unsigned int) - 1);52 unsigned int __bit = __reg & (8 * sizeof (unsigned int) - 1);
53 __reg /= 8 * sizeof (unsigned int);53 __reg /= 8 * sizeof (unsigned int);
5454
55 return __ptr->usable_array[__reg] & (1 << __bit);55 return __ptr->active_array[__reg] & (1 << __bit);
56}56}
5757
58/* HAS_CPU_FEATURE evaluates to true if CPU supports the feature. */58/* CPU_FEATURE_PRESENT evaluates to true if CPU supports the feature. */
59#define HAS_CPU_FEATURE(name) x86_cpu_has_feature (x86_cpu_##name)59#define CPU_FEATURE_PRESENT(name) x86_cpu_present (x86_cpu_##name)
60/* CPU_FEATURE_USABLE evaluates to true if the feature is usable. */60/* CPU_FEATURE_ACTIVE evaluates to true if the feature is active. */
61#define CPU_FEATURE_USABLE(name) x86_cpu_is_usable (x86_cpu_##name)61#define CPU_FEATURE_ACTIVE(name) x86_cpu_active (x86_cpu_##name)
6262
63__END_DECLS63__END_DECLS
6464
lib/libc/include/generic-glibc/sys/poll.h+16-2
...@@ -51,7 +51,8 @@ __BEGIN_DECLS...@@ -51,7 +51,8 @@ __BEGIN_DECLS
5151
52 This function is a cancellation point and therefore not marked with52 This function is a cancellation point and therefore not marked with
53 __THROW. */53 __THROW. */
54extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);54extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
55 __attr_access ((__write_only__, 1, 2));
5556
56#ifdef __USE_GNU57#ifdef __USE_GNU
57/* Like poll, but before waiting the threads signal mask is replaced58/* Like poll, but before waiting the threads signal mask is replaced
...@@ -62,7 +63,20 @@ extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);...@@ -62,7 +63,20 @@ extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
62 __THROW. */63 __THROW. */
63extern int ppoll (struct pollfd *__fds, nfds_t __nfds,64extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
64 const struct timespec *__timeout,65 const struct timespec *__timeout,
65 const __sigset_t *__ss);66 const __sigset_t *__ss)
67 __attr_access ((__write_only__, 1, 2));
68
69# ifdef __USE_TIME_BITS64
70# ifdef __REDIRECT
71extern int __REDIRECT (ppoll, (struct pollfd *__fds, nfds_t __nfds,
72 const struct timespec *__timeout,
73 const __sigset_t *__ss),
74 __ppoll64)
75 __attr_access ((__write_only__, 1, 2));
76# else
77# define ppoll __ppoll64
78# endif
79# endif
66#endif80#endif
6781
68__END_DECLS82__END_DECLS
lib/libc/include/generic-glibc/sys/prctl.h+10-4
...@@ -25,10 +25,6 @@...@@ -25,10 +25,6 @@
25 we're picking up... */25 we're picking up... */
2626
27/* Memory tagging control operations (for AArch64). */27/* Memory tagging control operations (for AArch64). */
28#ifndef PR_TAGGED_ADDR_ENABLE
29# define PR_TAGGED_ADDR_ENABLE (1UL << 8)
30#endif
31
32#ifndef PR_MTE_TCF_SHIFT28#ifndef PR_MTE_TCF_SHIFT
33# define PR_MTE_TCF_SHIFT 129# define PR_MTE_TCF_SHIFT 1
34# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)30# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
...@@ -42,7 +38,17 @@...@@ -42,7 +38,17 @@
42__BEGIN_DECLS38__BEGIN_DECLS
4339
44/* Control process execution. */40/* Control process execution. */
41#ifndef __USE_TIME_BITS64
45extern int prctl (int __option, ...) __THROW;42extern int prctl (int __option, ...) __THROW;
43#else
44# ifdef __REDIRECT
45extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
46# else
47extern int __prctl_time64 (int __option,d ...) __THROW;
48# define ioctl __prctl_time64
49# endif
50#endif
51
4652
47__END_DECLS53__END_DECLS
4854
lib/libc/include/generic-glibc/sys/resource.h+18-6
...@@ -48,18 +48,19 @@ typedef int __priority_which_t;...@@ -48,18 +48,19 @@ typedef int __priority_which_t;
48 Returns 0 if successful, -1 if not (and sets errno). */48 Returns 0 if successful, -1 if not (and sets errno). */
49#ifndef __USE_FILE_OFFSET6449#ifndef __USE_FILE_OFFSET64
50extern int getrlimit (__rlimit_resource_t __resource,50extern int getrlimit (__rlimit_resource_t __resource,
51 struct rlimit *__rlimits) __THROW;51 struct rlimit *__rlimits) __THROW __nonnull ((2));
52#else52#else
53# ifdef __REDIRECT_NTH53# ifdef __REDIRECT_NTH
54extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,54extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
55 struct rlimit *__rlimits), getrlimit64);55 struct rlimit *__rlimits), getrlimit64)
56 __nonnull ((2));
56# else57# else
57# define getrlimit getrlimit6458# define getrlimit getrlimit64
58# endif59# endif
59#endif60#endif
60#ifdef __USE_LARGEFILE6461#ifdef __USE_LARGEFILE64
61extern int getrlimit64 (__rlimit_resource_t __resource,62extern int getrlimit64 (__rlimit_resource_t __resource,
62 struct rlimit64 *__rlimits) __THROW;63 struct rlimit64 *__rlimits) __THROW __nonnull ((2));
63#endif64#endif
6465
65/* Set the soft and hard limits for RESOURCE to *RLIMITS.66/* Set the soft and hard limits for RESOURCE to *RLIMITS.
...@@ -67,25 +68,36 @@ extern int getrlimit64 (__rlimit_resource_t __resource,...@@ -67,25 +68,36 @@ extern int getrlimit64 (__rlimit_resource_t __resource,
67 Return 0 if successful, -1 if not (and sets errno). */68 Return 0 if successful, -1 if not (and sets errno). */
68#ifndef __USE_FILE_OFFSET6469#ifndef __USE_FILE_OFFSET64
69extern int setrlimit (__rlimit_resource_t __resource,70extern int setrlimit (__rlimit_resource_t __resource,
70 const struct rlimit *__rlimits) __THROW;71 const struct rlimit *__rlimits) __THROW __nonnull ((2));
71#else72#else
72# ifdef __REDIRECT_NTH73# ifdef __REDIRECT_NTH
73extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,74extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
74 const struct rlimit *__rlimits),75 const struct rlimit *__rlimits),
75 setrlimit64);76 setrlimit64) __nonnull ((2));
76# else77# else
77# define setrlimit setrlimit6478# define setrlimit setrlimit64
78# endif79# endif
79#endif80#endif
80#ifdef __USE_LARGEFILE6481#ifdef __USE_LARGEFILE64
81extern int setrlimit64 (__rlimit_resource_t __resource,82extern int setrlimit64 (__rlimit_resource_t __resource,
82 const struct rlimit64 *__rlimits) __THROW;83 const struct rlimit64 *__rlimits) __THROW
84 __nonnull ((2));
83#endif85#endif
8486
85/* Return resource usage information on process indicated by WHO87/* Return resource usage information on process indicated by WHO
86 and put it in *USAGE. Returns 0 for success, -1 for failure. */88 and put it in *USAGE. Returns 0 for success, -1 for failure. */
87extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;89extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
8890
91#ifdef __USE_TIME_BITS64
92# if defined(__REDIRECT_NTH)
93extern int __REDIRECT_NTH (getrusage, (__rusage_who_t __who,
94 struct rusage *__usage),
95 __getrusage64);
96# else
97# define getrusage __getrusage64
98# endif
99#endif
100
89/* Return the highest priority of any process specified by WHICH and WHO101/* Return the highest priority of any process specified by WHICH and WHO
90 (see above); if WHO is zero, the current process, process group, or user102 (see above); if WHO is zero, the current process, process group, or user
91 (as specified by WHO) is used. A lower priority number means higher103 (as specified by WHO) is used. A lower priority number means higher
lib/libc/include/generic-glibc/sys/select.h+27
...@@ -98,10 +98,23 @@ __BEGIN_DECLS...@@ -98,10 +98,23 @@ __BEGIN_DECLS
9898
99 This function is a cancellation point and therefore not marked with99 This function is a cancellation point and therefore not marked with
100 __THROW. */100 __THROW. */
101#ifndef __USE_TIME_BITS64
101extern int select (int __nfds, fd_set *__restrict __readfds,102extern int select (int __nfds, fd_set *__restrict __readfds,
102 fd_set *__restrict __writefds,103 fd_set *__restrict __writefds,
103 fd_set *__restrict __exceptfds,104 fd_set *__restrict __exceptfds,
104 struct timeval *__restrict __timeout);105 struct timeval *__restrict __timeout);
106#else
107# ifdef __REDIRECT
108extern int __REDIRECT (select,
109 (int __nfds, fd_set *__restrict __readfds,
110 fd_set *__restrict __writefds,
111 fd_set *__restrict __exceptfds,
112 struct timeval *__restrict __timeout),
113 __select64);
114# else
115# define select __select64
116# endif
117#endif
105118
106#ifdef __USE_XOPEN2K119#ifdef __USE_XOPEN2K
107/* Same as above only that the TIMEOUT value is given with higher120/* Same as above only that the TIMEOUT value is given with higher
...@@ -110,11 +123,25 @@ extern int select (int __nfds, fd_set *__restrict __readfds,...@@ -110,11 +123,25 @@ extern int select (int __nfds, fd_set *__restrict __readfds,
110123
111 This function is a cancellation point and therefore not marked with124 This function is a cancellation point and therefore not marked with
112 __THROW. */125 __THROW. */
126# ifndef __USE_TIME_BITS64
113extern int pselect (int __nfds, fd_set *__restrict __readfds,127extern int pselect (int __nfds, fd_set *__restrict __readfds,
114 fd_set *__restrict __writefds,128 fd_set *__restrict __writefds,
115 fd_set *__restrict __exceptfds,129 fd_set *__restrict __exceptfds,
116 const struct timespec *__restrict __timeout,130 const struct timespec *__restrict __timeout,
117 const __sigset_t *__restrict __sigmask);131 const __sigset_t *__restrict __sigmask);
132# else
133# ifdef __REDIRECT
134extern int __REDIRECT (pselect,
135 (int __nfds, fd_set *__restrict __readfds,
136 fd_set *__restrict __writefds,
137 fd_set *__restrict __exceptfds,
138 const struct timespec *__restrict __timeout,
139 const __sigset_t *__restrict __sigmask),
140 __pselect64);
141# else
142# define pselect __pselect64
143# endif
144# endif
118#endif145#endif
119146
120147
lib/libc/include/generic-glibc/sys/sem.h+21
...@@ -48,7 +48,17 @@ struct sembuf...@@ -48,7 +48,17 @@ struct sembuf
48__BEGIN_DECLS48__BEGIN_DECLS
4949
50/* Semaphore control operation. */50/* Semaphore control operation. */
51#ifndef __USE_TIME_BITS64
51extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW;52extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW;
53#else
54# ifdef __REDIRECT_NTH
55extern int __REDIRECT_NTH (semctl,
56 (int __semid, int __semnum, int __cmd, ...),
57 __semctl64);
58# else
59# define semctl __semctl64
60# endif
61#endif
5262
53/* Get semaphore. */63/* Get semaphore. */
54extern int semget (key_t __key, int __nsems, int __semflg) __THROW;64extern int semget (key_t __key, int __nsems, int __semflg) __THROW;
...@@ -58,8 +68,19 @@ extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW;...@@ -58,8 +68,19 @@ extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW;
5868
59#ifdef __USE_GNU69#ifdef __USE_GNU
60/* Operate on semaphore with timeout. */70/* Operate on semaphore with timeout. */
71# ifndef __USE_TIME_BITS64
61extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,72extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
62 const struct timespec *__timeout) __THROW;73 const struct timespec *__timeout) __THROW;
74# else
75# ifdef __REDIRECT_NTH
76extern int __REDIRECT_NTH (semtimedop, (int __semid, struct sembuf *__sops,
77 size_t __nsops,
78 const struct timespec *__timeout),
79 __semtimedop64);
80# else
81# define semtimedop __semtimedop64
82# endif
83# endif
63#endif84#endif
6485
65__END_DECLS86__END_DECLS
lib/libc/include/generic-glibc/sys/shm.h+10
...@@ -46,7 +46,17 @@ __BEGIN_DECLS...@@ -46,7 +46,17 @@ __BEGIN_DECLS
46 facility. The definition is found in XPG4.2. */46 facility. The definition is found in XPG4.2. */
4747
48/* Shared memory control operation. */48/* Shared memory control operation. */
49#ifndef __USE_TIME_BITS64
49extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;50extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
51#else
52# ifdef __REDIRECT_NTH
53extern int __REDIRECT_NTH (shmctl,
54 (int __shmid, int __cmd, struct shmid_ds *__buf),
55 __shmctl64);
56# else
57# define shmctl __shmctl64
58# endif
59#endif
5060
51/* Get shared memory segment. */61/* Get shared memory segment. */
52extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;62extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
lib/libc/include/generic-glibc/sys/socket.h+75-1
...@@ -170,8 +170,20 @@ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,...@@ -170,8 +170,20 @@ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
170170
171 This function is a cancellation point and therefore not marked with171 This function is a cancellation point and therefore not marked with
172 __THROW. */172 __THROW. */
173#ifndef __USE_TIME_BITS64
173extern ssize_t sendmsg (int __fd, const struct msghdr *__message,174extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
174 int __flags);175 int __flags);
176#else
177# ifdef __REDIRECT
178extern ssize_t __REDIRECT (sendmsg, (int __fd, const struct msghdr *__message,
179 int __flags),
180 __sendmsg64);
181# else
182extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
183 int __flags);
184# defien sendmsg __sendmsg64
185# endif
186#endif
175187
176#ifdef __USE_GNU188#ifdef __USE_GNU
177/* Send a VLEN messages as described by VMESSAGES to socket FD.189/* Send a VLEN messages as described by VMESSAGES to socket FD.
...@@ -179,16 +191,39 @@ extern ssize_t sendmsg (int __fd, const struct msghdr *__message,...@@ -179,16 +191,39 @@ extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
179191
180 This function is a cancellation point and therefore not marked with192 This function is a cancellation point and therefore not marked with
181 __THROW. */193 __THROW. */
194# ifndef __USE_TIME_BITS64
182extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,195extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
183 unsigned int __vlen, int __flags);196 unsigned int __vlen, int __flags);
184#endif197# else
198# ifdef __REDIRECT
199extern int __REDIRECT (sendmmsg, (int __fd, struct mmsghdr *__vmessages,
200 unsigned int __vlen, int __flags),
201 __sendmmsg64);
202# else
203extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
204 unsigned int __vlen, int __flags);
205# define sendmmsg __sendmmsg64
206# endif
207# endif /* __USE_TIME_BITS64 */
208#endif /* __USE_GNU */
185209
186/* Receive a message as described by MESSAGE from socket FD.210/* Receive a message as described by MESSAGE from socket FD.
187 Returns the number of bytes read or -1 for errors.211 Returns the number of bytes read or -1 for errors.
188212
189 This function is a cancellation point and therefore not marked with213 This function is a cancellation point and therefore not marked with
190 __THROW. */214 __THROW. */
215#ifndef __USE_TIME_BITS64
191extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);216extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
217#else
218# ifdef __REDIRECT
219extern ssize_t __REDIRECT (recvmsg,
220 (int __fd, struct msghdr *__message, int __flags),
221 __recvmsg64);
222# else
223extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, int __flags);
224# define recvmsg __recvmsg64
225# endif
226#endif
192227
193#ifdef __USE_GNU228#ifdef __USE_GNU
194/* Receive up to VLEN messages as described by VMESSAGES from socket FD.229/* Receive up to VLEN messages as described by VMESSAGES from socket FD.
...@@ -196,24 +231,63 @@ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);...@@ -196,24 +231,63 @@ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
196231
197 This function is a cancellation point and therefore not marked with232 This function is a cancellation point and therefore not marked with
198 __THROW. */233 __THROW. */
234# ifndef __USE_TIME_BITS64
199extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,235extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
200 unsigned int __vlen, int __flags,236 unsigned int __vlen, int __flags,
201 struct timespec *__tmo);237 struct timespec *__tmo);
238# else
239# ifdef __REDIRECT
240extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages,
241 unsigned int __vlen, int __flags,
242 struct timespec *__tmo),
243 __recvmmsg64);
244# else
245# define recvmmsg __recvmmsg64
246# endif
247# endif
202#endif248#endif
203249
204250
205/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL251/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
206 into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's252 into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
207 actual length. Returns 0 on success, -1 for errors. */253 actual length. Returns 0 on success, -1 for errors. */
254#ifndef __USE_TIME_BITS64
208extern int getsockopt (int __fd, int __level, int __optname,255extern int getsockopt (int __fd, int __level, int __optname,
209 void *__restrict __optval,256 void *__restrict __optval,
210 socklen_t *__restrict __optlen) __THROW;257 socklen_t *__restrict __optlen) __THROW;
258#else
259# ifdef __REDIRECT
260extern int __REDIRECT_NTH (getsockopt,
261 (int __fd, int __level, int __optname,
262 void *__restrict __optval,
263 socklen_t *__restrict __optlen),
264 __getsockopt64);
265# else
266extern int __getsockopt64 (int __fd, int __level, int __optname,
267 void *__restrict __optval,
268 socklen_t *__restrict __optlen) __THROW;
269# define getsockopt __getsockopt64
270# endif
271#endif
211272
212/* Set socket FD's option OPTNAME at protocol level LEVEL273/* Set socket FD's option OPTNAME at protocol level LEVEL
213 to *OPTVAL (which is OPTLEN bytes long).274 to *OPTVAL (which is OPTLEN bytes long).
214 Returns 0 on success, -1 for errors. */275 Returns 0 on success, -1 for errors. */
276#ifndef __USE_TIME_BITS64
215extern int setsockopt (int __fd, int __level, int __optname,277extern int setsockopt (int __fd, int __level, int __optname,
216 const void *__optval, socklen_t __optlen) __THROW;278 const void *__optval, socklen_t __optlen) __THROW;
279#else
280# ifdef __REDIRECT
281extern int __REDIRECT_NTH (setsockopt,
282 (int __fd, int __level, int __optname,
283 const void *__optval, socklen_t __optlen),
284 __setsockopt64);
285# else
286extern int __setsockopt64 (int __fd, int __level, int __optname,
287 const void *__optval, socklen_t __optlen) __THROW;
288# define setsockopt __setsockopt64
289# endif
290#endif
217291
218292
219/* Prepare to accept connections on socket FD.293/* Prepare to accept connections on socket FD.
lib/libc/include/generic-glibc/sys/stat.h+103-10
...@@ -209,21 +209,51 @@ extern int stat (const char *__restrict __file,...@@ -209,21 +209,51 @@ extern int stat (const char *__restrict __file,
209 that file descriptor FD is open on and put them in BUF. */209 that file descriptor FD is open on and put them in BUF. */
210extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));210extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
211#else211#else
212# ifdef __REDIRECT_NTH212# ifdef __USE_TIME_BITS64
213# ifdef __REDIRECT_NTH
214extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
215 struct stat *__restrict __buf),
216 __stat64_time64)
217 __nonnull ((1, 2));
218extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf),
219 __fstat64_time64)
220 __nonnull ((2));
221# else
222# define stat __stat64_time64
223# define fstat __fstat64_time64
224# endif
225# else
226# ifdef __REDIRECT_NTH
213extern int __REDIRECT_NTH (stat, (const char *__restrict __file,227extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
214 struct stat *__restrict __buf), stat64)228 struct stat *__restrict __buf), stat64)
215 __nonnull ((1, 2));229 __nonnull ((1, 2));
216extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)230extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
217 __nonnull ((2));231 __nonnull ((2));
218# else232# else
219# define stat stat64233# define stat stat64
220# define fstat fstat64234# define fstat fstat64
235# endif
221# endif236# endif
222#endif237#endif
223#ifdef __USE_LARGEFILE64238#ifdef __USE_LARGEFILE64
239# ifndef __USE_TIME_BITS64
224extern int stat64 (const char *__restrict __file,240extern int stat64 (const char *__restrict __file,
225 struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));241 struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
226extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));242extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
243# else
244# ifdef __REDIRECT_NTH
245extern int __REDIRECT_NTH (stat64, (const char *__restrict __file,
246 struct stat64 *__restrict __buf),
247 __stat64_time64)
248 __nonnull ((1, 2));
249extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),
250 __fstat64_time64)
251 __nonnull ((2));
252# else
253# define stat64 __stat64_time64
254# define fstat64 __fstat64_time
255# endif
256# endif
227#endif257#endif
228258
229#ifdef __USE_ATFILE259#ifdef __USE_ATFILE
...@@ -235,20 +265,44 @@ extern int fstatat (int __fd, const char *__restrict __file,...@@ -235,20 +265,44 @@ extern int fstatat (int __fd, const char *__restrict __file,
235 struct stat *__restrict __buf, int __flag)265 struct stat *__restrict __buf, int __flag)
236 __THROW __nonnull ((2, 3));266 __THROW __nonnull ((2, 3));
237# else267# else
238# ifdef __REDIRECT_NTH268# ifdef __USE_TIME_BITS64
269# ifdef __REDIRECT_NTH
239extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,270extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
240 struct stat *__restrict __buf,271 struct stat *__restrict __buf,
241 int __flag),272 int __flag),
242 fstatat64) __nonnull ((2, 3));273 __fstatat64_time64) __nonnull ((2, 3));
274# else
275# define fstatat __fstatat64_time64
276# endif
243# else277# else
244# define fstatat fstatat64278# ifdef __REDIRECT_NTH
279extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
280 struct stat *__restrict __buf,
281 int __flag),
282 fstatat64) __nonnull ((2, 3));
283# else
284# define fstatat fstatat64
285# endif
245# endif286# endif
246# endif287# endif
247288
248# ifdef __USE_LARGEFILE64289# ifdef __USE_LARGEFILE64
290# ifndef __USE_TIME_BITS64
249extern int fstatat64 (int __fd, const char *__restrict __file,291extern int fstatat64 (int __fd, const char *__restrict __file,
250 struct stat64 *__restrict __buf, int __flag)292 struct stat64 *__restrict __buf, int __flag)
251 __THROW __nonnull ((2, 3));293 __THROW __nonnull ((2, 3));
294# else
295# ifdef __REDIRECT_NTH
296extern int __REDIRECT_NTH (fstatat64, (int __fd,
297 const char *__restrict __file,
298 struct stat64 *__restrict __buf,
299 int __flag),
300 __fstatat64_time64)
301 __nonnull ((2, 3));
302# else
303# define fstatat64 __fstatat64_time64
304# endif
305# endif
252# endif306# endif
253#endif307#endif
254308
...@@ -259,19 +313,37 @@ extern int fstatat64 (int __fd, const char *__restrict __file,...@@ -259,19 +313,37 @@ extern int fstatat64 (int __fd, const char *__restrict __file,
259extern int lstat (const char *__restrict __file,313extern int lstat (const char *__restrict __file,
260 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));314 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
261# else315# else
262# ifdef __REDIRECT_NTH316# ifdef __USE_TIME_BITS64
317# ifdef __REDIRECT_NTH
263extern int __REDIRECT_NTH (lstat,318extern int __REDIRECT_NTH (lstat,
264 (const char *__restrict __file,319 (const char *__restrict __file,
265 struct stat *__restrict __buf), lstat64)320 struct stat *__restrict __buf), __lstat64_time64)
266 __nonnull ((1, 2));321 __nonnull ((1, 2));
322# else
323# define lstat __lstat64_time64
324# endif
267# else325# else
268# define lstat lstat64326# ifdef __REDIRECT_NTH
327extern int __REDIRECT_NTH (lstat,
328 (const char *__restrict __file,
329 struct stat *__restrict __buf), lstat64)
330 __nonnull ((1, 2));
331# else
332# define lstat lstat64
333# endif
269# endif334# endif
270# endif335# endif
271# ifdef __USE_LARGEFILE64336# ifdef __USE_LARGEFILE64
337# ifndef __USE_TIME_BITS64
272extern int lstat64 (const char *__restrict __file,338extern int lstat64 (const char *__restrict __file,
273 struct stat64 *__restrict __buf)339 struct stat64 *__restrict __buf)
274 __THROW __nonnull ((1, 2));340 __THROW __nonnull ((1, 2));
341# else
342extern int __REDIRECT_NTH (lstat64, (const char *__restrict __file,
343 struct stat64 *__restrict __buf),
344 __lstat64_time64)
345 __nonnull ((1, 2));
346# endif
275# endif347# endif
276#endif348#endif
277349
...@@ -355,17 +427,38 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)...@@ -355,17 +427,38 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
355#endif427#endif
356 428
357#ifdef __USE_ATFILE429#ifdef __USE_ATFILE
430# ifndef __USE_TIME_BITS64
358/* Set file access and modification times relative to directory file431/* Set file access and modification times relative to directory file
359 descriptor. */432 descriptor. */
360extern int utimensat (int __fd, const char *__path,433extern int utimensat (int __fd, const char *__path,
361 const struct timespec __times[2],434 const struct timespec __times[2],
362 int __flags)435 int __flags)
363 __THROW __nonnull ((2));436 __THROW __nonnull ((2));
437# else
438# ifdef __REDIRECT_NTH
439extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path,
440 const struct timespec __times[2],
441 int flags),
442 __utimensat64) __nonnull ((2));
443# else
444# define utimensat __utimensat64
445# endif
446# endif
364#endif447#endif
365448
366#ifdef __USE_XOPEN2K8449#ifdef __USE_XOPEN2K8
450# ifndef __USE_TIME_BITS64
367/* Set file access and modification times of the file associated with FD. */451/* Set file access and modification times of the file associated with FD. */
368extern int futimens (int __fd, const struct timespec __times[2]) __THROW;452extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
453
454# else
455# ifdef __REDIRECT_NTH
456extern int __REDIRECT_NTH (futimens, (int fd, const struct timespec __times[2]),
457 __futimens64);
458# else
459# define futimens __futimens64
460# endif
461# endif
369#endif462#endif
370463
371#ifdef __USE_GNU464#ifdef __USE_GNU
lib/libc/include/generic-glibc/sys/statvfs.h+1-1
...@@ -21,7 +21,7 @@...@@ -21,7 +21,7 @@
2121
22#include <features.h>22#include <features.h>
2323
24/* Get the system-specific definition of `struct statfs'. */24/* Get the system-specific definition of `struct statvfs'. */
25#include <bits/statvfs.h>25#include <bits/statvfs.h>
2626
27#ifndef __USE_FILE_OFFSET6427#ifndef __USE_FILE_OFFSET64
lib/libc/include/generic-glibc/sys/time.h+71
...@@ -63,10 +63,21 @@ struct timezone...@@ -63,10 +63,21 @@ struct timezone
63 use localtime etc. instead.63 use localtime etc. instead.
64 This function itself is semi-obsolete;64 This function itself is semi-obsolete;
65 most callers should use time or clock_gettime instead. */65 most callers should use time or clock_gettime instead. */
66#ifndef __USE_TIME_BITS64
66extern int gettimeofday (struct timeval *__restrict __tv,67extern int gettimeofday (struct timeval *__restrict __tv,
67 void *__restrict __tz) __THROW __nonnull ((1));68 void *__restrict __tz) __THROW __nonnull ((1));
69#else
70# ifdef __REDIRECT_NTH
71extern int __REDIRECT_NTH (gettimeofday, (struct timeval *__restrict __tv,
72 void *__restrict __tz),
73 __gettimeofday64) __nonnull ((1));
74# else
75# define gettimeofday __gettimeofday64
76# endif
77#endif
6878
69#ifdef __USE_MISC79#ifdef __USE_MISC
80# ifndef __USE_TIME_BITS64
70/* Set the current time of day and timezone information.81/* Set the current time of day and timezone information.
71 This call is restricted to the super-user.82 This call is restricted to the super-user.
72 Setting the timezone in this way is obsolete, but we don't yet83 Setting the timezone in this way is obsolete, but we don't yet
...@@ -82,6 +93,20 @@ extern int settimeofday (const struct timeval *__tv,...@@ -82,6 +93,20 @@ extern int settimeofday (const struct timeval *__tv,
82 This call is restricted to the super-user. */93 This call is restricted to the super-user. */
83extern int adjtime (const struct timeval *__delta,94extern int adjtime (const struct timeval *__delta,
84 struct timeval *__olddelta) __THROW;95 struct timeval *__olddelta) __THROW;
96# else
97# ifdef __REDIRECT_NTH
98extern int __REDIRECT_NTH (settimeofday, (const struct timeval *__tv,
99 const struct timezone *__tz),
100 __settimeofday64);
101
102extern int __REDIRECT_NTH (adjtime, (const struct timeval *__delta,
103 struct timeval *__olddelta),
104 __adjtime64);
105# else
106# define settimeofday __settimeofday64
107# define adjtime __adjtime64
108# endif
109# endif
85#endif110#endif
86111
87112
...@@ -118,6 +143,7 @@ typedef enum __itimer_which __itimer_which_t;...@@ -118,6 +143,7 @@ typedef enum __itimer_which __itimer_which_t;
118typedef int __itimer_which_t;143typedef int __itimer_which_t;
119#endif144#endif
120145
146#ifndef __USE_TIME_BITS64
121/* Set *VALUE to the current setting of timer WHICH.147/* Set *VALUE to the current setting of timer WHICH.
122 Return 0 on success, -1 on errors. */148 Return 0 on success, -1 on errors. */
123extern int getitimer (__itimer_which_t __which,149extern int getitimer (__itimer_which_t __which,
...@@ -136,21 +162,66 @@ extern int setitimer (__itimer_which_t __which,...@@ -136,21 +162,66 @@ extern int setitimer (__itimer_which_t __which,
136extern int utimes (const char *__file, const struct timeval __tvp[2])162extern int utimes (const char *__file, const struct timeval __tvp[2])
137 __THROW __nonnull ((1));163 __THROW __nonnull ((1));
138164
165#else
166# ifdef __REDIRECT_NTH
167extern int __REDIRECT_NTH (getitimer, (__itimer_which_t __which,
168 struct itimerval *__value),
169 __getitimer64);
170
171extern int __REDIRECT_NTH (setitimer, (__itimer_which_t __which,
172 const struct itimerval *__restrict __new,
173 struct itimerval *__restrict __old),
174 __setitimer64);
175
176extern int __REDIRECT_NTH (utimes, (const char *__file,
177 const struct timeval __tvp[2]),
178 __utimes64) __nonnull ((1));
179# else
180# define getitimer __getitimer64
181# define setitimer __setitimer64
182# define utimes __utimes64
183# endif
184#endif
185
139#ifdef __USE_MISC186#ifdef __USE_MISC
187# ifndef __USE_TIME_BITS64
140/* Same as `utimes', but does not follow symbolic links. */188/* Same as `utimes', but does not follow symbolic links. */
141extern int lutimes (const char *__file, const struct timeval __tvp[2])189extern int lutimes (const char *__file, const struct timeval __tvp[2])
142 __THROW __nonnull ((1));190 __THROW __nonnull ((1));
143191
144/* Same as `utimes', but takes an open file descriptor instead of a name. */192/* Same as `utimes', but takes an open file descriptor instead of a name. */
145extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;193extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
194# else
195# ifdef __REDIRECT_NTH
196extern int __REDIRECT_NTH (lutimes, (const char *__file,
197 const struct timeval __tvp[2]),
198 __lutimes64) __nonnull ((1));
199
200extern int __REDIRECT_NTH (futimes, (int __fd, const struct timeval __tvp[2]),
201 __futimes64);
202# else
203# define lutimes __lutimes64
204# define futimes __futimes64
205# endif
206# endif
146#endif207#endif
147208
148#ifdef __USE_GNU209#ifdef __USE_GNU
210# ifndef __USE_TIME_BITS64
149/* Change the access time of FILE relative to FD to TVP[0] and the211/* Change the access time of FILE relative to FD to TVP[0] and the
150 modification time of FILE to TVP[1]. If TVP is a null pointer, use212 modification time of FILE to TVP[1]. If TVP is a null pointer, use
151 the current time instead. Returns 0 on success, -1 on errors. */213 the current time instead. Returns 0 on success, -1 on errors. */
152extern int futimesat (int __fd, const char *__file,214extern int futimesat (int __fd, const char *__file,
153 const struct timeval __tvp[2]) __THROW;215 const struct timeval __tvp[2]) __THROW;
216# else
217# ifdef __REDIRECT_NTH
218extern int __REDIRECT_NTH (futimesat, (int __fd, const char *__file,
219 const struct timeval __tvp[2]),
220 __futimesat64);
221# else
222# define futimesat __futimesat64
223# endif
224# endif
154#endif225#endif
155226
156227
lib/libc/include/generic-glibc/sys/timerfd.h+22
...@@ -47,9 +47,31 @@ extern int timerfd_settime (int __ufd, int __flags,...@@ -47,9 +47,31 @@ extern int timerfd_settime (int __ufd, int __flags,
47 const struct itimerspec *__utmr,47 const struct itimerspec *__utmr,
48 struct itimerspec *__otmr) __THROW;48 struct itimerspec *__otmr) __THROW;
4949
50#ifdef __USE_TIME_BITS64
51# if defined(__REDIRECT_NTH)
52extern int __REDIRECT_NTH (timerfd_settime,
53 (int __ufd, int __flags,
54 const struct itimerspec *__restrict __value,
55 struct itimerspec *__restrict __ovalue),
56 __timerfd_settime64);
57# else
58# define timerfd_settime __timerfd_settime64
59# endif
60#endif
61
50/* Return the next expiration time of UFD. */62/* Return the next expiration time of UFD. */
51extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;63extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
5264
65#ifdef __USE_TIME_BITS64
66# if defined(__REDIRECT_NTH)
67extern int __REDIRECT_NTH (timerfd_gettime, (int __ufd,
68 struct itimerspec *__otmr),
69 __timerfd_gettime64);
70# else
71# define timerfd_gettime __timerfd_gettime64
72# endif
73#endif
74
53__END_DECLS75__END_DECLS
5476
55#endif /* sys/timerfd.h */77#endif /* sys/timerfd.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/timex.h+23-6
...@@ -54,17 +54,34 @@ struct ntptimeval...@@ -54,17 +54,34 @@ struct ntptimeval
5454
55__BEGIN_DECLS55__BEGIN_DECLS
5656
57extern int __adjtimex (struct timex *__ntx) __THROW;57#ifndef __USE_TIME_BITS64
58extern int adjtimex (struct timex *__ntx) __THROW;58extern int adjtimex (struct timex *__ntx) __THROW;
59extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
5960
60#ifdef __REDIRECT_NTH61# ifdef __REDIRECT_NTH
61extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),62extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
62 ntp_gettimex);63 ntp_gettimex);
64# else
65# define ntp_gettime ntp_gettimex
66# endif
67extern int ntp_adjtime (struct timex *__tntx) __THROW;
63#else68#else
64extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;69# ifdef __REDIRECT_NTH
65# define ntp_gettime ntp_gettimex70extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx),
71 ___adjtimex64);
72extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
73 __ntp_gettime64);
74extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv),
75 __ntp_gettimex64);
76extern int __REDIRECT_NTH (ntp_adjtime, (struct timex *__ntx),
77 ___adjtimex64);
78# else
79# define adjtimex ___adjtimex64
80# define ntp_adjtime ___adjtimex64
81# define ntp_gettime __ntp_gettime64
82# define ntp_gettimex __ntp_gettimex64
83# endif
66#endif84#endif
67extern int ntp_adjtime (struct timex *__tntx) __THROW;
6885
69__END_DECLS86__END_DECLS
7087
lib/libc/include/generic-glibc/sys/uio.h+24-13
...@@ -39,7 +39,7 @@ __BEGIN_DECLS...@@ -39,7 +39,7 @@ __BEGIN_DECLS
39 This function is a cancellation point and therefore not marked with39 This function is a cancellation point and therefore not marked with
40 __THROW. */40 __THROW. */
41extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)41extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
42 __wur;42 __wur __attr_access ((__read_only__, 2, 3));
4343
44/* Write data pointed by the buffers described by IOVEC, which44/* Write data pointed by the buffers described by IOVEC, which
45 is a vector of COUNT 'struct iovec's, to file descriptor FD.45 is a vector of COUNT 'struct iovec's, to file descriptor FD.
...@@ -50,7 +50,7 @@ extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)...@@ -50,7 +50,7 @@ extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
50 This function is a cancellation point and therefore not marked with50 This function is a cancellation point and therefore not marked with
51 __THROW. */51 __THROW. */
52extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)52extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
53 __wur;53 __wur __attr_access ((__read_only__, 2, 3));
5454
5555
56#ifdef __USE_MISC56#ifdef __USE_MISC
...@@ -65,7 +65,8 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)...@@ -65,7 +65,8 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
65 This function is a cancellation point and therefore not marked with65 This function is a cancellation point and therefore not marked with
66 __THROW. */66 __THROW. */
67extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,67extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
68 __off_t __offset) __wur;68 __off_t __offset)
69 __wur __attr_access ((__read_only__, 2, 3));
6970
70/* Write data pointed by the buffers described by IOVEC, which is a71/* Write data pointed by the buffers described by IOVEC, which is a
71 vector of COUNT 'struct iovec's, to file descriptor FD at the given72 vector of COUNT 'struct iovec's, to file descriptor FD at the given
...@@ -77,16 +78,19 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,...@@ -77,16 +78,19 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
77 This function is a cancellation point and therefore not marked with78 This function is a cancellation point and therefore not marked with
78 __THROW. */79 __THROW. */
79extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,80extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
80 __off_t __offset) __wur;81 __off_t __offset)
82 __wur __attr_access ((__read_only__, 2, 3));
8183
82# else84# else
83# ifdef __REDIRECT85# ifdef __REDIRECT
84extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,86extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
85 int __count, __off64_t __offset),87 int __count, __off64_t __offset),
86 preadv64) __wur;88 preadv64)
89 __wur __attr_access ((__read_only__, 2, 3));
87extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,90extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
88 int __count, __off64_t __offset),91 int __count, __off64_t __offset),
89 pwritev64) __wur;92 pwritev64)
93 __wur __attr_access ((__read_only__, 2, 3));
90# else94# else
91# define preadv preadv6495# define preadv preadv64
92# define pwritev pwritev6496# define pwritev pwritev64
...@@ -104,7 +108,8 @@ extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,...@@ -104,7 +108,8 @@ extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
104 This function is a cancellation point and therefore not marked with108 This function is a cancellation point and therefore not marked with
105 __THROW. */109 __THROW. */
106extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,110extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
107 __off64_t __offset) __wur;111 __off64_t __offset)
112 __wur __attr_access ((__read_only__, 2, 3));
108113
109/* Write data pointed by the buffers described by IOVEC, which is a114/* Write data pointed by the buffers described by IOVEC, which is a
110 vector of COUNT 'struct iovec's, to file descriptor FD at the given115 vector of COUNT 'struct iovec's, to file descriptor FD at the given
...@@ -116,7 +121,8 @@ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,...@@ -116,7 +121,8 @@ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
116 This function is a cancellation point and therefore not marked with121 This function is a cancellation point and therefore not marked with
117 __THROW. */122 __THROW. */
118extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,123extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
119 __off64_t __offset) __wur;124 __off64_t __offset)
125 __wur __attr_access ((__read_only__, 2, 3));
120# endif126# endif
121#endif /* Use misc. */127#endif /* Use misc. */
122128
...@@ -125,7 +131,8 @@ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,...@@ -125,7 +131,8 @@ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
125# ifndef __USE_FILE_OFFSET64131# ifndef __USE_FILE_OFFSET64
126/* Same as preadv but with an additional flag argumenti defined at uio.h. */132/* Same as preadv but with an additional flag argumenti defined at uio.h. */
127extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count,133extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count,
128 __off_t __offset, int ___flags) __wur;134 __off_t __offset, int ___flags)
135 __wur __attr_access ((__read_only__, 2, 3));
129136
130/* Same as preadv but with an additional flag argument defined at uio.h. */137/* Same as preadv but with an additional flag argument defined at uio.h. */
131extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,138extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
...@@ -136,11 +143,13 @@ extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,...@@ -136,11 +143,13 @@ extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
136extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,143extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
137 int __count, __off64_t __offset,144 int __count, __off64_t __offset,
138 int __flags),145 int __flags),
139 pwritev64v2) __wur;146 pwritev64v2)
147 __wur __attr_access ((__read_only__, 2, 3));
140extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,148extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
141 int __count, __off64_t __offset,149 int __count, __off64_t __offset,
142 int __flags),150 int __flags),
143 preadv64v2) __wur;151 preadv64v2)
152 __wur __attr_access ((__read_only__, 2, 3));
144# else153# else
145# define preadv2 preadv64v2154# define preadv2 preadv64v2
146# define pwritev2 pwritev64v2155# define pwritev2 pwritev64v2
...@@ -151,12 +160,14 @@ extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,...@@ -151,12 +160,14 @@ extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
151/* Same as preadv but with an additional flag argumenti defined at uio.h. */160/* Same as preadv but with an additional flag argumenti defined at uio.h. */
152extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,161extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,
153 int __count, __off64_t __offset,162 int __count, __off64_t __offset,
154 int ___flags) __wur;163 int ___flags)
164 __wur __attr_access ((__read_only__, 2, 3));
155165
156/* Same as preadv but with an additional flag argument defined at uio.h. */166/* Same as preadv but with an additional flag argument defined at uio.h. */
157extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,167extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,
158 int __count, __off64_t __offset,168 int __count, __off64_t __offset,
159 int __flags) __wur;169 int __flags)
170 __wur __attr_access ((__read_only__, 2, 3));
160# endif171# endif
161#endif /* Use GNU. */172#endif /* Use GNU. */
162173
lib/libc/include/generic-glibc/sys/wait.h+20
...@@ -144,14 +144,34 @@ struct rusage;...@@ -144,14 +144,34 @@ struct rusage;
144 nil, store information about the child's resource usage there. If the144 nil, store information about the child's resource usage there. If the
145 WUNTRACED bit is set in OPTIONS, return status for stopped children;145 WUNTRACED bit is set in OPTIONS, return status for stopped children;
146 otherwise don't. */146 otherwise don't. */
147# ifndef __USE_TIME_BITS64
147extern __pid_t wait3 (int *__stat_loc, int __options,148extern __pid_t wait3 (int *__stat_loc, int __options,
148 struct rusage * __usage) __THROWNL;149 struct rusage * __usage) __THROWNL;
150# else
151# ifdef __REDIRECT_NTHNL
152extern __pid_t __REDIRECT_NTHNL (wait3, (int *__stat_loc, int __options,
153 struct rusage * __usage),
154 __wait3_time64);
155# else
156# define wait3 __wait3_time64
157# endif
158# endif
149#endif159#endif
150160
151#ifdef __USE_MISC161#ifdef __USE_MISC
162# ifndef __USE_TIME_BITS64
152/* PID is like waitpid. Other args are like wait3. */163/* PID is like waitpid. Other args are like wait3. */
153extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,164extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
154 struct rusage *__usage) __THROWNL;165 struct rusage *__usage) __THROWNL;
166# else
167# ifdef __REDIRECT_NTHNL
168extern __pid_t __REDIRECT_NTHNL (wait4, (__pid_t __pid, int *__stat_loc,
169 int __options, struct rusage *__usage),
170 __wait4_time64);
171# else
172# define wait4 __wait4_time64
173# endif
174# endif
155#endif /* Use misc. */175#endif /* Use misc. */
156176
157177
lib/libc/include/generic-glibc/threads.h+33
...@@ -88,8 +88,18 @@ extern thrd_t thrd_current (void);...@@ -88,8 +88,18 @@ extern thrd_t thrd_current (void);
88 __TIME_POINT. The current thread may resume if receives a signal. In88 __TIME_POINT. The current thread may resume if receives a signal. In
89 that case, if __REMAINING is not NULL, the remaining time is stored in89 that case, if __REMAINING is not NULL, the remaining time is stored in
90 the object pointed by it. */90 the object pointed by it. */
91#ifndef __USE_TIME_BITS64
91extern int thrd_sleep (const struct timespec *__time_point,92extern int thrd_sleep (const struct timespec *__time_point,
92 struct timespec *__remaining);93 struct timespec *__remaining);
94#else
95# ifdef __REDIRECT
96extern int __REDIRECT (thrd_sleep, (const struct timespec *__time_point,
97 struct timespec *__remaining),
98 __thrd_sleep64);
99# else
100# define thrd_sleep __thrd_sleep64
101# endif
102#endif
93103
94/* Terminate current thread execution, cleaning up any thread local104/* Terminate current thread execution, cleaning up any thread local
95 storage and freeing resources. Returns the value specified in __RES. */105 storage and freeing resources. Returns the value specified in __RES. */
...@@ -131,8 +141,19 @@ extern int mtx_lock (mtx_t *__mutex);...@@ -131,8 +141,19 @@ extern int mtx_lock (mtx_t *__mutex);
131/* Block the current thread until the mutex pointed by __MUTEX is unlocked141/* Block the current thread until the mutex pointed by __MUTEX is unlocked
132 or time pointed by __TIME_POINT is reached. In case the mutex is unlock,142 or time pointed by __TIME_POINT is reached. In case the mutex is unlock,
133 the current thread will not be blocked. */143 the current thread will not be blocked. */
144#ifndef __USE_TIME_BITS64
134extern int mtx_timedlock (mtx_t *__restrict __mutex,145extern int mtx_timedlock (mtx_t *__restrict __mutex,
135 const struct timespec *__restrict __time_point);146 const struct timespec *__restrict __time_point);
147#else
148# ifdef __REDIRECT
149extern int __REDIRECT (mtx_timedlock, (mtx_t *__restrict __mutex,
150 const struct timespec *__restrict
151 __time_point),
152 __mtx_timedlock64);
153# else
154# define mtx_timedlock __mtx_timedlock64
155# endif
156#endif
136157
137/* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex158/* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex
138 is free the current threads takes control of it, otherwise it returns159 is free the current threads takes control of it, otherwise it returns
...@@ -171,9 +192,21 @@ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex);...@@ -171,9 +192,21 @@ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex);
171/* Block current thread on the condition variable until condition variable192/* Block current thread on the condition variable until condition variable
172 pointed by __COND is signaled or time pointed by __TIME_POINT is193 pointed by __COND is signaled or time pointed by __TIME_POINT is
173 reached. */194 reached. */
195#ifndef __USE_TIME_BITS64
174extern int cnd_timedwait (cnd_t *__restrict __cond,196extern int cnd_timedwait (cnd_t *__restrict __cond,
175 mtx_t *__restrict __mutex,197 mtx_t *__restrict __mutex,
176 const struct timespec *__restrict __time_point);198 const struct timespec *__restrict __time_point);
199#else
200# ifdef __REDIRECT
201extern int __REDIRECT (cnd_timedwait, (cnd_t *__restrict __cond,
202 mtx_t *__restrict __mutex,
203 const struct timespec *__restrict
204 __time_point),
205 __cnd_timedwait64);
206# else
207# define cnd_timedwait __cnd_timedwait64
208# endif
209#endif
177210
178/* Destroy condition variable pointed by __cond and free all of its211/* Destroy condition variable pointed by __cond and free all of its
179 resources. */212 resources. */
lib/libc/include/generic-glibc/time.h+144-5
...@@ -71,6 +71,7 @@ __BEGIN_DECLS...@@ -71,6 +71,7 @@ __BEGIN_DECLS
71 The result / CLOCKS_PER_SEC is program time in seconds. */71 The result / CLOCKS_PER_SEC is program time in seconds. */
72extern clock_t clock (void) __THROW;72extern clock_t clock (void) __THROW;
7373
74#ifndef __USE_TIME_BITS64
74/* Return the current time and put it in *TIMER if TIMER is not NULL. */75/* Return the current time and put it in *TIMER if TIMER is not NULL. */
75extern time_t time (time_t *__timer) __THROW;76extern time_t time (time_t *__timer) __THROW;
7677
...@@ -80,7 +81,18 @@ extern double difftime (time_t __time1, time_t __time0)...@@ -80,7 +81,18 @@ extern double difftime (time_t __time1, time_t __time0)
8081
81/* Return the `time_t' representation of TP and normalize TP. */82/* Return the `time_t' representation of TP and normalize TP. */
82extern time_t mktime (struct tm *__tp) __THROW;83extern time_t mktime (struct tm *__tp) __THROW;
8384#else
85# ifdef __REDIRECT_NTH
86extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64);
87extern double __REDIRECT_NTH (difftime, (time_t __time1, time_t __time0),
88 __difftime64) __attribute__ ((__const__));
89extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
90# else
91# define time __time64
92# define difftime __difftime64
93# define mktime __mktime64
94# endif
95#endif
8496
85/* Format TP into S according to FORMAT.97/* Format TP into S according to FORMAT.
86 Write no more than MAXSIZE characters and return the number98 Write no more than MAXSIZE characters and return the number
...@@ -114,6 +126,7 @@ extern char *strptime_l (const char *__restrict __s,...@@ -114,6 +126,7 @@ extern char *strptime_l (const char *__restrict __s,
114#endif126#endif
115127
116128
129#ifndef __USE_TIME_BITS64
117/* Return the `struct tm' representation of *TIMER130/* Return the `struct tm' representation of *TIMER
118 in Universal Coordinated Time (aka Greenwich Mean Time). */131 in Universal Coordinated Time (aka Greenwich Mean Time). */
119extern struct tm *gmtime (const time_t *__timer) __THROW;132extern struct tm *gmtime (const time_t *__timer) __THROW;
...@@ -122,7 +135,20 @@ extern struct tm *gmtime (const time_t *__timer) __THROW;...@@ -122,7 +135,20 @@ extern struct tm *gmtime (const time_t *__timer) __THROW;
122 of *TIMER in the local timezone. */135 of *TIMER in the local timezone. */
123extern struct tm *localtime (const time_t *__timer) __THROW;136extern struct tm *localtime (const time_t *__timer) __THROW;
124137
138#else
139# ifdef __REDIRECT_NTH
140extern struct tm*__REDIRECT_NTH (gmtime, (const time_t *__timer), __gmtime64);
141extern struct tm *__REDIRECT_NTH (localtime, (const time_t *__timer),
142 __localtime64);
143# else
144# define gmtime __gmtime64
145# define localtime __localtime64
146# endif
147#endif
148
149
125#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)150#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
151# ifndef __USE_TIME_BITS64
126/* Return the `struct tm' representation of *TIMER in UTC,152/* Return the `struct tm' representation of *TIMER in UTC,
127 using *TP to store the result. */153 using *TP to store the result. */
128extern struct tm *gmtime_r (const time_t *__restrict __timer,154extern struct tm *gmtime_r (const time_t *__restrict __timer,
...@@ -132,6 +158,20 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer,...@@ -132,6 +158,20 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer,
132 using *TP to store the result. */158 using *TP to store the result. */
133extern struct tm *localtime_r (const time_t *__restrict __timer,159extern struct tm *localtime_r (const time_t *__restrict __timer,
134 struct tm *__restrict __tp) __THROW;160 struct tm *__restrict __tp) __THROW;
161# else
162# ifdef __REDIRECT_NTH
163extern struct tm*__REDIRECT_NTH (gmtime_r, (const time_t *__restrict __timer,
164 struct tm *__restrict __tp),
165 __gmtime64_r);
166
167extern struct tm*__REDIRECT_NTH (localtime_r, (const time_t *__restrict __t,
168 struct tm *__restrict __tp),
169 __localtime64_r);
170# else
171# define gmtime_r __gmtime64_r
172# define localtime_r __localtime_r
173# endif
174# endif
135#endif /* POSIX || C2X */175#endif /* POSIX || C2X */
136176
137/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"177/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
...@@ -139,9 +179,17 @@ extern struct tm *localtime_r (const time_t *__restrict __timer,...@@ -139,9 +179,17 @@ extern struct tm *localtime_r (const time_t *__restrict __timer,
139extern char *asctime (const struct tm *__tp) __THROW;179extern char *asctime (const struct tm *__tp) __THROW;
140180
141/* Equivalent to `asctime (localtime (timer))'. */181/* Equivalent to `asctime (localtime (timer))'. */
182#ifndef __USE_TIME_BITS64
142extern char *ctime (const time_t *__timer) __THROW;183extern char *ctime (const time_t *__timer) __THROW;
184#else
185# ifdef __REDIRECT_NTH
186extern char *__REDIRECT_NTH (ctime, (const time_t *__timer), __ctime64);
187# else
188# define ctime __ctime64
189# endif
190#endif
143191
144#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)192#ifdef __USE_POSIX
145/* Reentrant versions of the above functions. */193/* Reentrant versions of the above functions. */
146194
147/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"195/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
...@@ -150,9 +198,19 @@ extern char *asctime_r (const struct tm *__restrict __tp,...@@ -150,9 +198,19 @@ extern char *asctime_r (const struct tm *__restrict __tp,
150 char *__restrict __buf) __THROW;198 char *__restrict __buf) __THROW;
151199
152/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */200/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
201#ifndef __USE_TIME_BITS64
153extern char *ctime_r (const time_t *__restrict __timer,202extern char *ctime_r (const time_t *__restrict __timer,
154 char *__restrict __buf) __THROW;203 char *__restrict __buf) __THROW;
155#endif /* POSIX || C2X */204#else
205# ifdef __REDIRECT_NTH
206extern char *__REDIRECT_NTH (ctime_r, (const time_t *__restrict __timer,
207 char *__restrict __buf), __ctime64_r);
208# else
209# define ctime_r __ctime64_r
210# endif
211#endif
212
213#endif /* POSIX */
156214
157215
158/* Defined in localtime.c. */216/* Defined in localtime.c. */
...@@ -186,11 +244,19 @@ extern long int timezone;...@@ -186,11 +244,19 @@ extern long int timezone;
186/* Miscellaneous functions many Unices inherited from the public domain244/* Miscellaneous functions many Unices inherited from the public domain
187 localtime package. These are included only for compatibility. */245 localtime package. These are included only for compatibility. */
188246
247#ifndef __USE_TIME_BITS64
189/* Like `mktime', but for TP represents Universal Time, not local time. */248/* Like `mktime', but for TP represents Universal Time, not local time. */
190extern time_t timegm (struct tm *__tp) __THROW;249extern time_t timegm (struct tm *__tp) __THROW;
191
192/* Another name for `mktime'. */250/* Another name for `mktime'. */
193extern time_t timelocal (struct tm *__tp) __THROW;251extern time_t timelocal (struct tm *__tp) __THROW;
252#else
253# ifdef __REDIRECT_NTH
254extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64);
255extern time_t __REDIRECT_NTH (timelocal, (struct tm *__tp), __mktime64);
256# else
257# define timegm __timegm64
258# endif
259#endif
194260
195/* Return the number of days in YEAR. */261/* Return the number of days in YEAR. */
196extern int dysize (int __year) __THROW __attribute__ ((__const__));262extern int dysize (int __year) __THROW __attribute__ ((__const__));
...@@ -198,6 +264,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));...@@ -198,6 +264,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
198264
199265
200#ifdef __USE_POSIX199309266#ifdef __USE_POSIX199309
267# ifndef __USE_TIME_BITS64
201/* Pause execution for a number of nanoseconds.268/* Pause execution for a number of nanoseconds.
202269
203 This function is a cancellation point and therefore not marked with270 This function is a cancellation point and therefore not marked with
...@@ -205,7 +272,6 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));...@@ -205,7 +272,6 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
205extern int nanosleep (const struct timespec *__requested_time,272extern int nanosleep (const struct timespec *__requested_time,
206 struct timespec *__remaining);273 struct timespec *__remaining);
207274
208
209/* Get resolution of clock CLOCK_ID. */275/* Get resolution of clock CLOCK_ID. */
210extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;276extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
211277
...@@ -215,15 +281,46 @@ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;...@@ -215,15 +281,46 @@ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
215/* Set clock CLOCK_ID to value TP. */281/* Set clock CLOCK_ID to value TP. */
216extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)282extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
217 __THROW;283 __THROW;
284# else
285# ifdef __REDIRECT
286extern int __REDIRECT (nanosleep, (const struct timespec *__requested_time,
287 struct timespec *__remaining),
288 __nanosleep64);
289extern int __REDIRECT_NTH (clock_getres, (clockid_t __clock_id,
290 struct timespec *__res),
291 __clock_getres64);
292extern int __REDIRECT_NTH (clock_gettime, (clockid_t __clock_id, struct
293 timespec *__tp), __clock_gettime64);
294extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct
295 timespec *__tp), __clock_settime64);
296# else
297# define nanosleep __nanosleep64
298# define clock_getres __clock_getres64
299# define clock_gettime __clock_gettime64
300# define clock_settime __clock_settime64
301# endif
302# endif
303
218304
219# ifdef __USE_XOPEN2K305# ifdef __USE_XOPEN2K
220/* High-resolution sleep with the specified clock.306/* High-resolution sleep with the specified clock.
221307
222 This function is a cancellation point and therefore not marked with308 This function is a cancellation point and therefore not marked with
223 __THROW. */309 __THROW. */
310# ifndef __USE_TIME_BITS64
224extern int clock_nanosleep (clockid_t __clock_id, int __flags,311extern int clock_nanosleep (clockid_t __clock_id, int __flags,
225 const struct timespec *__req,312 const struct timespec *__req,
226 struct timespec *__rem);313 struct timespec *__rem);
314# else
315# ifdef __REDIRECT
316extern int __REDIRECT (clock_nanosleep, (clockid_t __clock_id, int __flags,
317 const struct timespec *__req,
318 struct timespec *__rem),
319 __clock_nanosleep_time64);
320# else
321# define clock_nanosleep __clock_nanosleep_time64
322# endif
323# endif
227324
228/* Return clock ID for CPU-time clock. */325/* Return clock ID for CPU-time clock. */
229extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;326extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
...@@ -239,6 +336,7 @@ extern int timer_create (clockid_t __clock_id,...@@ -239,6 +336,7 @@ extern int timer_create (clockid_t __clock_id,
239extern int timer_delete (timer_t __timerid) __THROW;336extern int timer_delete (timer_t __timerid) __THROW;
240337
241/* Set timer TIMERID to VALUE, returning old value in OVALUE. */338/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
339# ifndef __USE_TIME_BITS64
242extern int timer_settime (timer_t __timerid, int __flags,340extern int timer_settime (timer_t __timerid, int __flags,
243 const struct itimerspec *__restrict __value,341 const struct itimerspec *__restrict __value,
244 struct itimerspec *__restrict __ovalue) __THROW;342 struct itimerspec *__restrict __ovalue) __THROW;
...@@ -246,6 +344,21 @@ extern int timer_settime (timer_t __timerid, int __flags,...@@ -246,6 +344,21 @@ extern int timer_settime (timer_t __timerid, int __flags,
246/* Get current value of timer TIMERID and store it in VALUE. */344/* Get current value of timer TIMERID and store it in VALUE. */
247extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)345extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
248 __THROW;346 __THROW;
347# else
348# ifdef __REDIRECT_NTH
349extern int __REDIRECT_NTH (timer_settime, (timer_t __timerid, int __flags,
350 const struct itimerspec *__restrict __value,
351 struct itimerspec *__restrict __ovalue),
352 __timer_settime64);
353
354extern int __REDIRECT_NTH (timer_gettime, (timer_t __timerid,
355 struct itimerspec *__value),
356 __timer_gettime64);
357# else
358# define timer_settime __timer_settime64
359# define timer_gettime __timer_gettime64
360# endif
361# endif
249362
250/* Get expiration overrun for timer TIMERID. */363/* Get expiration overrun for timer TIMERID. */
251extern int timer_getoverrun (timer_t __timerid) __THROW;364extern int timer_getoverrun (timer_t __timerid) __THROW;
...@@ -253,9 +366,35 @@ extern int timer_getoverrun (timer_t __timerid) __THROW;...@@ -253,9 +366,35 @@ extern int timer_getoverrun (timer_t __timerid) __THROW;
253366
254367
255#ifdef __USE_ISOC11368#ifdef __USE_ISOC11
369# ifndef __USE_TIME_BITS64
256/* Set TS to calendar time based in time base BASE. */370/* Set TS to calendar time based in time base BASE. */
257extern int timespec_get (struct timespec *__ts, int __base)371extern int timespec_get (struct timespec *__ts, int __base)
258 __THROW __nonnull ((1));372 __THROW __nonnull ((1));
373# else
374# ifdef __REDIRECT_NTH
375extern int __REDIRECT_NTH (timespec_get, (struct timespec *__ts, int __base),
376 __timespec_get64) __nonnull ((1));
377# else
378# define timespec_get __timespec_get64
379# endif
380# endif
381#endif
382
383
384#if __GLIBC_USE (ISOC2X)
385# ifndef __USE_TIME_BITS64
386/* Set TS to resolution of time base BASE. */
387extern int timespec_getres (struct timespec *__ts, int __base)
388 __THROW;
389# else
390# ifdef __REDIRECT_NTH
391extern int __REDIRECT_NTH (timespec_getres, (struct timespec *__ts,
392 int __base),
393 __timespec_getres64);
394# else
395# define timespec_getres __timespec_getres64
396# endif
397# endif
259#endif398#endif
260399
261400
lib/libc/include/generic-glibc/unistd.h+18
...@@ -295,6 +295,11 @@ extern int euidaccess (const char *__name, int __type)...@@ -295,6 +295,11 @@ extern int euidaccess (const char *__name, int __type)
295/* An alias for `euidaccess', used by some other systems. */295/* An alias for `euidaccess', used by some other systems. */
296extern int eaccess (const char *__name, int __type)296extern int eaccess (const char *__name, int __type)
297 __THROW __nonnull ((1));297 __THROW __nonnull ((1));
298
299/* Execute program relative to a directory file descriptor. */
300extern int execveat (int __fd, const char *__path, char *const __argv[],
301 char *const __envp[], int __flags)
302 __THROW __nonnull ((2, 3));
298#endif303#endif
299304
300#ifdef __USE_ATFILE305#ifdef __USE_ATFILE
...@@ -352,6 +357,12 @@ extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)...@@ -352,6 +357,12 @@ extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
352 __THROW. */357 __THROW. */
353extern int close (int __fd);358extern int close (int __fd);
354359
360#ifdef __USE_MISC
361/* Close all open file descriptors greater than or equal to LOWFD.
362 Negative LOWFD is clamped to 0. */
363extern void closefrom (int __lowfd) __THROW;
364#endif
365
355/* Read NBYTES into BUF from FD. Return the366/* Read NBYTES into BUF from FD. Return the
356 number read, -1 for errors or 0 for EOF.367 number read, -1 for errors or 0 for EOF.
357368
...@@ -776,6 +787,13 @@ extern __pid_t fork (void) __THROWNL;...@@ -776,6 +787,13 @@ extern __pid_t fork (void) __THROWNL;
776extern __pid_t vfork (void) __THROW;787extern __pid_t vfork (void) __THROW;
777#endif /* Use misc or XPG < 7. */788#endif /* Use misc or XPG < 7. */
778789
790#ifdef __USE_GNU
791/* This is similar to fork, however it does not run the atfork handlers
792 neither reinitialize any internal locks in multithread case.
793 Different than fork, _Fork is async-signal-safe. */
794extern __pid_t _Fork (void) __THROW;
795#endif
796
779797
780/* Return the pathname of the terminal FD is open on, or NULL on errors.798/* Return the pathname of the terminal FD is open on, or NULL on errors.
781 The returned storage is good only until the next call to this function. */799 The returned storage is good only until the next call to this function. */
lib/libc/include/generic-glibc/utime.h+16
...@@ -35,16 +35,32 @@ __BEGIN_DECLS...@@ -35,16 +35,32 @@ __BEGIN_DECLS
35/* Structure describing file times. */35/* Structure describing file times. */
36struct utimbuf36struct utimbuf
37 {37 {
38#ifdef __USE_TIME_BITS64
39 __time64_t actime; /* Access time. */
40 __time64_t modtime; /* Modification time. */
41#else
38 __time_t actime; /* Access time. */42 __time_t actime; /* Access time. */
39 __time_t modtime; /* Modification time. */43 __time_t modtime; /* Modification time. */
44#endif
40 };45 };
4146
42/* Set the access and modification times of FILE to those given in47/* Set the access and modification times of FILE to those given in
43 *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */48 *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
49#ifndef __USE_TIME_BITS64
44extern int utime (const char *__file,50extern int utime (const char *__file,
45 const struct utimbuf *__file_times)51 const struct utimbuf *__file_times)
46 __THROW __nonnull ((1));52 __THROW __nonnull ((1));
4753
54#else
55# ifdef __REDIRECT_NTH
56extern int __REDIRECT_NTH (utime, (const char *__file,
57 const struct utimbuf *__file_times),
58 __utime64);
59# else
60# define utime __utime64
61# endif
62#endif
63
48__END_DECLS64__END_DECLS
4965
50#endif /* utime.h */66#endif /* utime.h */
\ No newline at end of file
lib/libc/include/generic-glibc/wchar.h+17-2
...@@ -151,7 +151,8 @@ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,...@@ -151,7 +151,8 @@ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
151 size_t __n, locale_t __loc) __THROW;151 size_t __n, locale_t __loc) __THROW;
152152
153/* Duplicate S, returning an identical malloc'd string. */153/* Duplicate S, returning an identical malloc'd string. */
154extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;154extern wchar_t *wcsdup (const wchar_t *__s) __THROW
155 __attribute_malloc__ __attr_dealloc_free;
155#endif156#endif
156157
157/* Find the first occurrence of WC in WCS. */158/* Find the first occurrence of WC in WCS. */
...@@ -562,9 +563,23 @@ extern wchar_t *wcpncpy (wchar_t *__restrict __dest,...@@ -562,9 +563,23 @@ extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
562/* Wide character I/O functions. */563/* Wide character I/O functions. */
563564
564#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)565#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
566# ifndef __attr_dealloc_fclose
567# if defined __has_builtin
568# if __has_builtin (__builtin_fclose)
569/* If the attribute macro hasn't been defined yet (by <stdio.h>) and
570 fclose is a built-in, use it. */
571# define __attr_dealloc_fclose __attr_dealloc (__builtin_fclose, 1)
572# endif
573# endif
574# endif
575# ifndef __attr_dealloc_fclose
576# define __attr_dealloc_fclose /* empty */
577# endif
578
565/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces579/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
566 a wide character string. */580 a wide character string. */
567extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;581extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW
582 __attribute_malloc__ __attr_dealloc_fclose;
568#endif583#endif
569584
570#if defined __USE_ISOC95 || defined __USE_UNIX98585#if defined __USE_ISOC95 || defined __USE_UNIX98
lib/libc/include/i386-linux-gnu/bits/struct_stat.h+49-41
...@@ -25,43 +25,46 @@...@@ -25,43 +25,46 @@
2525
26struct stat26struct stat
27 {27 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
28 __dev_t st_dev; /* Device. */31 __dev_t st_dev; /* Device. */
29#ifndef __x86_64__32# ifndef __x86_64__
30 unsigned short int __pad1;33 unsigned short int __pad1;
31#endif34# endif
32#if defined __x86_64__ || !defined __USE_FILE_OFFSET6435# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
33 __ino_t st_ino; /* File serial number. */36 __ino_t st_ino; /* File serial number. */
34#else37# else
35 __ino_t __st_ino; /* 32bit file serial number. */38 __ino_t __st_ino; /* 32bit file serial number. */
36#endif39# endif
37#ifndef __x86_64__40# ifndef __x86_64__
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40#else43# else
41 __nlink_t st_nlink; /* Link count. */44 __nlink_t st_nlink; /* Link count. */
42 __mode_t st_mode; /* File mode. */45 __mode_t st_mode; /* File mode. */
43#endif46# endif
44 __uid_t st_uid; /* User ID of the file's owner. */47 __uid_t st_uid; /* User ID of the file's owner. */
45 __gid_t st_gid; /* Group ID of the file's group.*/48 __gid_t st_gid; /* Group ID of the file's group.*/
46#ifdef __x86_64__49# ifdef __x86_64__
47 int __pad0;50 int __pad0;
48#endif51# endif
49 __dev_t st_rdev; /* Device number, if device. */52 __dev_t st_rdev; /* Device number, if device. */
50#ifndef __x86_64__53# ifndef __x86_64__
51 unsigned short int __pad2;54 unsigned short int __pad2;
52#endif55# endif
53#if defined __x86_64__ || !defined __USE_FILE_OFFSET6456# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
54 __off_t st_size; /* Size of file, in bytes. */57 __off_t st_size; /* Size of file, in bytes. */
55#else58# else
56 __off64_t st_size; /* Size of file, in bytes. */59 __off64_t st_size; /* Size of file, in bytes. */
57#endif60# endif
58 __blksize_t st_blksize; /* Optimal block size for I/O. */61 __blksize_t st_blksize; /* Optimal block size for I/O. */
59#if defined __x86_64__ || !defined __USE_FILE_OFFSET6462# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
60 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */63 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else64# else
62 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */65 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63#endif66# endif
64#ifdef __USE_XOPEN2K867# ifdef __USE_XOPEN2K8
65 /* Nanosecond resolution timestamps are stored in a format68 /* Nanosecond resolution timestamps are stored in a format
66 equivalent to 'struct timespec'. This is the type used69 equivalent to 'struct timespec'. This is the type used
67 whenever possible but the Unix namespace rules do not allow the70 whenever possible but the Unix namespace rules do not allow the
...@@ -71,58 +74,62 @@ struct stat...@@ -71,58 +74,62 @@ struct stat
71 struct timespec st_atim; /* Time of last access. */74 struct timespec st_atim; /* Time of last access. */
72 struct timespec st_mtim; /* Time of last modification. */75 struct timespec st_mtim; /* Time of last modification. */
73 struct timespec st_ctim; /* Time of last status change. */76 struct timespec st_ctim; /* Time of last status change. */
74# define st_atime st_atim.tv_sec /* Backward compatibility. */77# define st_atime st_atim.tv_sec /* Backward compatibility. */
75# define st_mtime st_mtim.tv_sec78# define st_mtime st_mtim.tv_sec
76# define st_ctime st_ctim.tv_sec79# define st_ctime st_ctim.tv_sec
77#else80# else
78 __time_t st_atime; /* Time of last access. */81 __time_t st_atime; /* Time of last access. */
79 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */82 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
80 __time_t st_mtime; /* Time of last modification. */83 __time_t st_mtime; /* Time of last modification. */
81 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */84 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
82 __time_t st_ctime; /* Time of last status change. */85 __time_t st_ctime; /* Time of last status change. */
83 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */86 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
84#endif87# endif
85#ifdef __x86_64__88# ifdef __x86_64__
86 __syscall_slong_t __glibc_reserved[3];89 __syscall_slong_t __glibc_reserved[3];
87#else90# else
88# ifndef __USE_FILE_OFFSET6491# ifndef __USE_FILE_OFFSET64
89 unsigned long int __glibc_reserved4;92 unsigned long int __glibc_reserved4;
90 unsigned long int __glibc_reserved5;93 unsigned long int __glibc_reserved5;
91# else94# else
92 __ino64_t st_ino; /* File serial number. */95 __ino64_t st_ino; /* File serial number. */
96# endif
93# endif97# endif
94#endif98#endif /* __USE_TIME_BITS64 */
95 };99 };
96100
97#ifdef __USE_LARGEFILE64101#ifdef __USE_LARGEFILE64
98/* Note stat64 has the same shape as stat for x86-64. */102/* Note stat64 has the same shape as stat for x86-64. */
99struct stat64103struct stat64
100 {104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
101 __dev_t st_dev; /* Device. */108 __dev_t st_dev; /* Device. */
102# ifdef __x86_64__109# ifdef __x86_64__
103 __ino64_t st_ino; /* File serial number. */110 __ino64_t st_ino; /* File serial number. */
104 __nlink_t st_nlink; /* Link count. */111 __nlink_t st_nlink; /* Link count. */
105 __mode_t st_mode; /* File mode. */112 __mode_t st_mode; /* File mode. */
106# else113# else
107 unsigned int __pad1;114 unsigned int __pad1;
108 __ino_t __st_ino; /* 32bit file serial number. */115 __ino_t __st_ino; /* 32bit file serial number. */
109 __mode_t st_mode; /* File mode. */116 __mode_t st_mode; /* File mode. */
110 __nlink_t st_nlink; /* Link count. */117 __nlink_t st_nlink; /* Link count. */
111# endif118# endif
112 __uid_t st_uid; /* User ID of the file's owner. */119 __uid_t st_uid; /* User ID of the file's owner. */
113 __gid_t st_gid; /* Group ID of the file's group.*/120 __gid_t st_gid; /* Group ID of the file's group.*/
114# ifdef __x86_64__121# ifdef __x86_64__
115 int __pad0;122 int __pad0;
116 __dev_t st_rdev; /* Device number, if device. */123 __dev_t st_rdev; /* Device number, if device. */
117 __off_t st_size; /* Size of file, in bytes. */124 __off_t st_size; /* Size of file, in bytes. */
118# else125# else
119 __dev_t st_rdev; /* Device number, if device. */126 __dev_t st_rdev; /* Device number, if device. */
120 unsigned int __pad2;127 unsigned int __pad2;
121 __off64_t st_size; /* Size of file, in bytes. */128 __off64_t st_size; /* Size of file, in bytes. */
122# endif129# endif
123 __blksize_t st_blksize; /* Optimal block size for I/O. */130 __blksize_t st_blksize; /* Optimal block size for I/O. */
124 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
125# ifdef __USE_XOPEN2K8132# ifdef __USE_XOPEN2K8
126 /* Nanosecond resolution timestamps are stored in a format133 /* Nanosecond resolution timestamps are stored in a format
127 equivalent to 'struct timespec'. This is the type used134 equivalent to 'struct timespec'. This is the type used
128 whenever possible but the Unix namespace rules do not allow the135 whenever possible but the Unix namespace rules do not allow the
...@@ -132,19 +139,20 @@ struct stat64...@@ -132,19 +139,20 @@ struct stat64
132 struct timespec st_atim; /* Time of last access. */139 struct timespec st_atim; /* Time of last access. */
133 struct timespec st_mtim; /* Time of last modification. */140 struct timespec st_mtim; /* Time of last modification. */
134 struct timespec st_ctim; /* Time of last status change. */141 struct timespec st_ctim; /* Time of last status change. */
135# else142# else
136 __time_t st_atime; /* Time of last access. */143 __time_t st_atime; /* Time of last access. */
137 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
138 __time_t st_mtime; /* Time of last modification. */145 __time_t st_mtime; /* Time of last modification. */
139 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
140 __time_t st_ctime; /* Time of last status change. */147 __time_t st_ctime; /* Time of last status change. */
141 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
142# endif149# endif
143# ifdef __x86_64__150# ifdef __x86_64__
144 __syscall_slong_t __glibc_reserved[3];151 __syscall_slong_t __glibc_reserved[3];
145# else152# else
146 __ino64_t st_ino; /* File serial number. */153 __ino64_t st_ino; /* File serial number. */
147# endif154# endif
155# endif /* __USE_TIME_BITS64 */
148 };156 };
149#endif157#endif
150158
lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h+4
...@@ -23,6 +23,9 @@...@@ -23,6 +23,9 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
...@@ -31,4 +34,5 @@ struct semid_ds...@@ -31,4 +34,5 @@ struct semid_ds
31 __syscall_ulong_t sem_nsems; /* number of semaphores in set */34 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
32 __syscall_ulong_t __glibc_reserved3;35 __syscall_ulong_t __glibc_reserved3;
33 __syscall_ulong_t __glibc_reserved4;36 __syscall_ulong_t __glibc_reserved4;
37#endif
34};38};
\ No newline at end of file
lib/libc/include/m68k-linux-gnu/bits/struct_stat.h+29-21
...@@ -25,32 +25,35 @@...@@ -25,32 +25,35 @@
2525
26struct stat26struct stat
27 {27 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
28 __dev_t st_dev; /* Device. */31 __dev_t st_dev; /* Device. */
29 unsigned short int __pad1;32 unsigned short int __pad1;
30#ifndef __USE_FILE_OFFSET6433# ifndef __USE_FILE_OFFSET64
31 __ino_t st_ino; /* File serial number. */34 __ino_t st_ino; /* File serial number. */
32#else35# else
33 __ino_t __st_ino; /* 32bit file serial number. */36 __ino_t __st_ino; /* 32bit file serial number. */
34#endif37# endif
35 __mode_t st_mode; /* File mode. */38 __mode_t st_mode; /* File mode. */
36 __nlink_t st_nlink; /* Link count. */39 __nlink_t st_nlink; /* Link count. */
37 __uid_t st_uid; /* User ID of the file's owner. */40 __uid_t st_uid; /* User ID of the file's owner. */
38 __gid_t st_gid; /* Group ID of the file's group.*/41 __gid_t st_gid; /* Group ID of the file's group.*/
39 __dev_t st_rdev; /* Device number, if device. */42 __dev_t st_rdev; /* Device number, if device. */
40 unsigned short int __pad2;43 unsigned short int __pad2;
41#ifndef __USE_FILE_OFFSET6444# ifndef __USE_FILE_OFFSET64
42 __off_t st_size; /* Size of file, in bytes. */45 __off_t st_size; /* Size of file, in bytes. */
43#else46# else
44 __off64_t st_size; /* Size of file, in bytes. */47 __off64_t st_size; /* Size of file, in bytes. */
45#endif48# endif
46 __blksize_t st_blksize; /* Optimal block size for I/O. */49 __blksize_t st_blksize; /* Optimal block size for I/O. */
4750
48#ifndef __USE_FILE_OFFSET6451# ifndef __USE_FILE_OFFSET64
49 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */52 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
50#else53# else
51 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */54 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
52#endif55# endif
53#ifdef __USE_XOPEN2K856# ifdef __USE_XOPEN2K8
54 /* Nanosecond resolution timestamps are stored in a format57 /* Nanosecond resolution timestamps are stored in a format
55 equivalent to 'struct timespec'. This is the type used58 equivalent to 'struct timespec'. This is the type used
56 whenever possible but the Unix namespace rules do not allow the59 whenever possible but the Unix namespace rules do not allow the
...@@ -60,28 +63,32 @@ struct stat...@@ -60,28 +63,32 @@ struct stat
60 struct timespec st_atim; /* Time of last access. */63 struct timespec st_atim; /* Time of last access. */
61 struct timespec st_mtim; /* Time of last modification. */64 struct timespec st_mtim; /* Time of last modification. */
62 struct timespec st_ctim; /* Time of last status change. */65 struct timespec st_ctim; /* Time of last status change. */
63# define st_atime st_atim.tv_sec /* Backward compatibility. */66# define st_atime st_atim.tv_sec /* Backward compatibility. */
64# define st_mtime st_mtim.tv_sec67# define st_mtime st_mtim.tv_sec
65# define st_ctime st_ctim.tv_sec68# define st_ctime st_ctim.tv_sec
66#else69# else
67 __time_t st_atime; /* Time of last access. */70 __time_t st_atime; /* Time of last access. */
68 unsigned long int st_atimensec; /* Nscecs of last access. */71 unsigned long int st_atimensec; /* Nscecs of last access. */
69 __time_t st_mtime; /* Time of last modification. */72 __time_t st_mtime; /* Time of last modification. */
70 unsigned long int st_mtimensec; /* Nsecs of last modification. */73 unsigned long int st_mtimensec; /* Nsecs of last modification. */
71 __time_t st_ctime; /* Time of last status change. */74 __time_t st_ctime; /* Time of last status change. */
72 unsigned long int st_ctimensec; /* Nsecs of last status change. */75 unsigned long int st_ctimensec; /* Nsecs of last status change. */
73#endif76# endif
74#ifndef __USE_FILE_OFFSET6477# ifndef __USE_FILE_OFFSET64
75 unsigned long int __glibc_reserved4;78 unsigned long int __glibc_reserved4;
76 unsigned long int __glibc_reserved5;79 unsigned long int __glibc_reserved5;
77#else80# else
78 __ino64_t st_ino; /* File serial number. */81 __ino64_t st_ino; /* File serial number. */
79#endif82# endif
83#endif /* __USE_TIME_BITS64 */
80 };84 };
8185
82#ifdef __USE_LARGEFILE6486#ifdef __USE_LARGEFILE64
83struct stat6487struct stat64
84 {88 {
89# ifdef __USE_TIME_BITS64
90# include <bits/struct_stat_time64_helper.h>
91# else
85 __dev_t st_dev; /* Device. */92 __dev_t st_dev; /* Device. */
86 unsigned short int __pad1;93 unsigned short int __pad1;
8794
...@@ -96,7 +103,7 @@ struct stat64...@@ -96,7 +103,7 @@ struct stat64
96 __blksize_t st_blksize; /* Optimal block size for I/O. */103 __blksize_t st_blksize; /* Optimal block size for I/O. */
97104
98 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */105 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
99# ifdef __USE_XOPEN2K8106# ifdef __USE_XOPEN2K8
100 /* Nanosecond resolution timestamps are stored in a format107 /* Nanosecond resolution timestamps are stored in a format
101 equivalent to 'struct timespec'. This is the type used108 equivalent to 'struct timespec'. This is the type used
102 whenever possible but the Unix namespace rules do not allow the109 whenever possible but the Unix namespace rules do not allow the
...@@ -106,15 +113,16 @@ struct stat64...@@ -106,15 +113,16 @@ struct stat64
106 struct timespec st_atim; /* Time of last access. */113 struct timespec st_atim; /* Time of last access. */
107 struct timespec st_mtim; /* Time of last modification. */114 struct timespec st_mtim; /* Time of last modification. */
108 struct timespec st_ctim; /* Time of last status change. */115 struct timespec st_ctim; /* Time of last status change. */
109# else116# else
110 __time_t st_atime; /* Time of last access. */117 __time_t st_atime; /* Time of last access. */
111 unsigned long int st_atimensec; /* Nscecs of last access. */118 unsigned long int st_atimensec; /* Nscecs of last access. */
112 __time_t st_mtime; /* Time of last modification. */119 __time_t st_mtime; /* Time of last modification. */
113 unsigned long int st_mtimensec; /* Nsecs of last modification. */120 unsigned long int st_mtimensec; /* Nsecs of last modification. */
114 __time_t st_ctime; /* Time of last status change. */121 __time_t st_ctime; /* Time of last status change. */
115 unsigned long int st_ctimensec; /* Nsecs of last status change. */122 unsigned long int st_ctimensec; /* Nsecs of last status change. */
116# endif123# endif
117 __ino64_t st_ino; /* File serial number. */124 __ino64_t st_ino; /* File serial number. */
125# endif /* __USE_TIME_BITS64 */
118 };126 };
119#endif127#endif
120128
lib/libc/include/m68k-linux-gnu/gnu/lib-names.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.2"14#define LIBGCC_S_SO "libgcc_s.so.2"
lib/libc/include/mips-linux-gnu/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages with 64k pages. */
81#define PTHREAD_STACK_MIN 131072
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* Minimum size for a thread. At least two pages with 64k pages. */
20#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 410032#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409935#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 4102
40# define SO_SNDTIMEO 4101
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 4102
46# define SO_SNDTIMEO_OLD 4101
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h+12-6
...@@ -20,32 +20,37 @@...@@ -20,32 +20,37 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29# ifdef __MIPSEL__34# ifdef __MIPSEL__
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_stime_high;36 unsigned long int __msg_stime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_rtime_high;38 unsigned long int __msg_rtime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35 unsigned long int __msg_ctime_high;40 unsigned long int __msg_ctime_high;
36# else41# else
37 unsigned long int __msg_stime_high;42 unsigned long int __msg_stime_high;
38 __time_t msg_stime; /* time of last msgsnd command */43 __time_t msg_stime; /* time of last msgsnd command */
39 unsigned long int __msg_rtime_high;44 unsigned long int __msg_rtime_high;
40 __time_t msg_rtime; /* time of last msgsnd command */45 __time_t msg_rtime; /* time of last msgsnd command */
41 unsigned long int __msg_ctime_high;46 unsigned long int __msg_ctime_high;
42 __time_t msg_ctime; /* time of last change */47 __time_t msg_ctime; /* time of last change */
43# endif48# endif
44#else49# else
45 __time_t msg_stime; /* time of last msgsnd command */50 __time_t msg_stime; /* time of last msgsnd command */
46 __time_t msg_rtime; /* time of last msgsnd command */51 __time_t msg_rtime; /* time of last msgsnd command */
47 __time_t msg_ctime; /* time of last change */52 __time_t msg_ctime; /* time of last change */
48#endif53# endif
49 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */54 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
50 msgqnum_t msg_qnum; /* number of messages currently on queue */55 msgqnum_t msg_qnum; /* number of messages currently on queue */
51 msglen_t msg_qbytes; /* max number of bytes allowed on queue */56 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -53,4 +58,5 @@ struct msqid_ds...@@ -53,4 +58,5 @@ struct msqid_ds
53 __pid_t msg_lrpid; /* pid of last msgrcv() */58 __pid_t msg_lrpid; /* pid of last msgrcv() */
54 __syscall_ulong_t __glibc_reserved4;59 __syscall_ulong_t __glibc_reserved4;
55 __syscall_ulong_t __glibc_reserved5;60 __syscall_ulong_t __glibc_reserved5;
61#endif
56};62};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h+4
...@@ -23,10 +23,14 @@...@@ -23,10 +23,14 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __time_t sem_ctime; /* last time changed by semctl() */31 __time_t sem_ctime; /* last time changed by semctl() */
29 __syscall_ulong_t sem_nsems; /* number of semaphores in set */32 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
30 __syscall_ulong_t __sem_otime_high;33 __syscall_ulong_t __sem_otime_high;
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
35#endif
32};36};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h+9-5
...@@ -23,27 +23,31 @@...@@ -23,27 +23,31 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 __time_t shm_dtime; /* time of last shmdt() */33 __time_t shm_dtime; /* time of last shmdt() */
31 __time_t shm_ctime; /* time of last change by shmctl() */34 __time_t shm_ctime; /* time of last change by shmctl() */
32#else35# else
33 __time_t shm_atime; /* time of last shmat() */36 __time_t shm_atime; /* time of last shmat() */
34 __time_t shm_dtime; /* time of last shmdt() */37 __time_t shm_dtime; /* time of last shmdt() */
35 __time_t shm_ctime; /* time of last change by shmctl() */38 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif39# endif
37 __pid_t shm_cpid; /* pid of creator */40 __pid_t shm_cpid; /* pid of creator */
38 __pid_t shm_lpid; /* pid of last shmop */41 __pid_t shm_lpid; /* pid of last shmop */
39 shmatt_t shm_nattch; /* number of current attaches */42 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 3243# if __TIMESIZE == 32
41 unsigned short int __shm_atime_high;44 unsigned short int __shm_atime_high;
42 unsigned short int __shm_dtime_high;45 unsigned short int __shm_dtime_high;
43 unsigned short int __shm_ctime_high;46 unsigned short int __shm_ctime_high;
44 unsigned short int __glibc_reserved4;47 unsigned short int __glibc_reserved4;
45#else48# else
46 __syscall_ulong_t __glibc_reserved5;49 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;50 __syscall_ulong_t __glibc_reserved6;
51# endif
48#endif52#endif
49 };53 };
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages with 64k pages. */
81#define PTHREAD_STACK_MIN 131072
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* Minimum size for a thread. At least two pages with 64k pages. */
20#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 410032#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409935#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 4102
40# define SO_SNDTIMEO 4101
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 4102
46# define SO_SNDTIMEO_OLD 4101
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h+12-6
...@@ -20,32 +20,37 @@...@@ -20,32 +20,37 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29# ifdef __MIPSEL__34# ifdef __MIPSEL__
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_stime_high;36 unsigned long int __msg_stime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_rtime_high;38 unsigned long int __msg_rtime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35 unsigned long int __msg_ctime_high;40 unsigned long int __msg_ctime_high;
36# else41# else
37 unsigned long int __msg_stime_high;42 unsigned long int __msg_stime_high;
38 __time_t msg_stime; /* time of last msgsnd command */43 __time_t msg_stime; /* time of last msgsnd command */
39 unsigned long int __msg_rtime_high;44 unsigned long int __msg_rtime_high;
40 __time_t msg_rtime; /* time of last msgsnd command */45 __time_t msg_rtime; /* time of last msgsnd command */
41 unsigned long int __msg_ctime_high;46 unsigned long int __msg_ctime_high;
42 __time_t msg_ctime; /* time of last change */47 __time_t msg_ctime; /* time of last change */
43# endif48# endif
44#else49# else
45 __time_t msg_stime; /* time of last msgsnd command */50 __time_t msg_stime; /* time of last msgsnd command */
46 __time_t msg_rtime; /* time of last msgsnd command */51 __time_t msg_rtime; /* time of last msgsnd command */
47 __time_t msg_ctime; /* time of last change */52 __time_t msg_ctime; /* time of last change */
48#endif53# endif
49 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */54 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
50 msgqnum_t msg_qnum; /* number of messages currently on queue */55 msgqnum_t msg_qnum; /* number of messages currently on queue */
51 msglen_t msg_qbytes; /* max number of bytes allowed on queue */56 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -53,4 +58,5 @@ struct msqid_ds...@@ -53,4 +58,5 @@ struct msqid_ds
53 __pid_t msg_lrpid; /* pid of last msgrcv() */58 __pid_t msg_lrpid; /* pid of last msgrcv() */
54 __syscall_ulong_t __glibc_reserved4;59 __syscall_ulong_t __glibc_reserved4;
55 __syscall_ulong_t __glibc_reserved5;60 __syscall_ulong_t __glibc_reserved5;
61#endif
56};62};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h+4
...@@ -23,10 +23,14 @@...@@ -23,10 +23,14 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __time_t sem_ctime; /* last time changed by semctl() */31 __time_t sem_ctime; /* last time changed by semctl() */
29 __syscall_ulong_t sem_nsems; /* number of semaphores in set */32 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
30 __syscall_ulong_t __sem_otime_high;33 __syscall_ulong_t __sem_otime_high;
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
35#endif
32};36};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h+9-5
...@@ -23,27 +23,31 @@...@@ -23,27 +23,31 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 __time_t shm_dtime; /* time of last shmdt() */33 __time_t shm_dtime; /* time of last shmdt() */
31 __time_t shm_ctime; /* time of last change by shmctl() */34 __time_t shm_ctime; /* time of last change by shmctl() */
32#else35# else
33 __time_t shm_atime; /* time of last shmat() */36 __time_t shm_atime; /* time of last shmat() */
34 __time_t shm_dtime; /* time of last shmdt() */37 __time_t shm_dtime; /* time of last shmdt() */
35 __time_t shm_ctime; /* time of last change by shmctl() */38 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif39# endif
37 __pid_t shm_cpid; /* pid of creator */40 __pid_t shm_cpid; /* pid of creator */
38 __pid_t shm_lpid; /* pid of last shmop */41 __pid_t shm_lpid; /* pid of last shmop */
39 shmatt_t shm_nattch; /* number of current attaches */42 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 3243# if __TIMESIZE == 32
41 unsigned short int __shm_atime_high;44 unsigned short int __shm_atime_high;
42 unsigned short int __shm_dtime_high;45 unsigned short int __shm_dtime_high;
43 unsigned short int __shm_ctime_high;46 unsigned short int __shm_ctime_high;
44 unsigned short int __glibc_reserved4;47 unsigned short int __glibc_reserved4;
45#else48# else
46 __syscall_ulong_t __glibc_reserved5;49 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;50 __syscall_ulong_t __glibc_reserved6;
51# endif
48#endif52#endif
49 };53 };
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages with 64k pages. */
81#define PTHREAD_STACK_MIN 131072
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* Minimum size for a thread. At least two pages with 64k pages. */
20#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 410032#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409935#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 4102
40# define SO_SNDTIMEO 4101
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 4102
46# define SO_SNDTIMEO_OLD 4101
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h+12-6
...@@ -20,32 +20,37 @@...@@ -20,32 +20,37 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29# ifdef __MIPSEL__34# ifdef __MIPSEL__
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_stime_high;36 unsigned long int __msg_stime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_rtime_high;38 unsigned long int __msg_rtime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35 unsigned long int __msg_ctime_high;40 unsigned long int __msg_ctime_high;
36# else41# else
37 unsigned long int __msg_stime_high;42 unsigned long int __msg_stime_high;
38 __time_t msg_stime; /* time of last msgsnd command */43 __time_t msg_stime; /* time of last msgsnd command */
39 unsigned long int __msg_rtime_high;44 unsigned long int __msg_rtime_high;
40 __time_t msg_rtime; /* time of last msgsnd command */45 __time_t msg_rtime; /* time of last msgsnd command */
41 unsigned long int __msg_ctime_high;46 unsigned long int __msg_ctime_high;
42 __time_t msg_ctime; /* time of last change */47 __time_t msg_ctime; /* time of last change */
43# endif48# endif
44#else49# else
45 __time_t msg_stime; /* time of last msgsnd command */50 __time_t msg_stime; /* time of last msgsnd command */
46 __time_t msg_rtime; /* time of last msgsnd command */51 __time_t msg_rtime; /* time of last msgsnd command */
47 __time_t msg_ctime; /* time of last change */52 __time_t msg_ctime; /* time of last change */
48#endif53# endif
49 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */54 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
50 msgqnum_t msg_qnum; /* number of messages currently on queue */55 msgqnum_t msg_qnum; /* number of messages currently on queue */
51 msglen_t msg_qbytes; /* max number of bytes allowed on queue */56 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -53,4 +58,5 @@ struct msqid_ds...@@ -53,4 +58,5 @@ struct msqid_ds
53 __pid_t msg_lrpid; /* pid of last msgrcv() */58 __pid_t msg_lrpid; /* pid of last msgrcv() */
54 __syscall_ulong_t __glibc_reserved4;59 __syscall_ulong_t __glibc_reserved4;
55 __syscall_ulong_t __glibc_reserved5;60 __syscall_ulong_t __glibc_reserved5;
61#endif
56};62};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h+4
...@@ -23,10 +23,14 @@...@@ -23,10 +23,14 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __time_t sem_ctime; /* last time changed by semctl() */31 __time_t sem_ctime; /* last time changed by semctl() */
29 __syscall_ulong_t sem_nsems; /* number of semaphores in set */32 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
30 __syscall_ulong_t __sem_otime_high;33 __syscall_ulong_t __sem_otime_high;
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
35#endif
32};36};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h+9-5
...@@ -23,27 +23,31 @@...@@ -23,27 +23,31 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 __time_t shm_dtime; /* time of last shmdt() */33 __time_t shm_dtime; /* time of last shmdt() */
31 __time_t shm_ctime; /* time of last change by shmctl() */34 __time_t shm_ctime; /* time of last change by shmctl() */
32#else35# else
33 __time_t shm_atime; /* time of last shmat() */36 __time_t shm_atime; /* time of last shmat() */
34 __time_t shm_dtime; /* time of last shmdt() */37 __time_t shm_dtime; /* time of last shmdt() */
35 __time_t shm_ctime; /* time of last change by shmctl() */38 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif39# endif
37 __pid_t shm_cpid; /* pid of creator */40 __pid_t shm_cpid; /* pid of creator */
38 __pid_t shm_lpid; /* pid of last shmop */41 __pid_t shm_lpid; /* pid of last shmop */
39 shmatt_t shm_nattch; /* number of current attaches */42 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 3243# if __TIMESIZE == 32
41 unsigned short int __shm_atime_high;44 unsigned short int __shm_atime_high;
42 unsigned short int __shm_dtime_high;45 unsigned short int __shm_dtime_high;
43 unsigned short int __shm_ctime_high;46 unsigned short int __shm_ctime_high;
44 unsigned short int __glibc_reserved4;47 unsigned short int __glibc_reserved4;
45#else48# else
46 __syscall_ulong_t __glibc_reserved5;49 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;50 __syscall_ulong_t __glibc_reserved6;
51# endif
48#endif52#endif
49 };53 };
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages with 64k pages. */
81#define PTHREAD_STACK_MIN 131072
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* Minimum size for a thread. At least two pages with 64k pages. */
20#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 410032#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409935#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 4102
40# define SO_SNDTIMEO 4101
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 4102
46# define SO_SNDTIMEO_OLD 4101
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h+12-6
...@@ -20,32 +20,37 @@...@@ -20,32 +20,37 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29# ifdef __MIPSEL__34# ifdef __MIPSEL__
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_stime_high;36 unsigned long int __msg_stime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_rtime_high;38 unsigned long int __msg_rtime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35 unsigned long int __msg_ctime_high;40 unsigned long int __msg_ctime_high;
36# else41# else
37 unsigned long int __msg_stime_high;42 unsigned long int __msg_stime_high;
38 __time_t msg_stime; /* time of last msgsnd command */43 __time_t msg_stime; /* time of last msgsnd command */
39 unsigned long int __msg_rtime_high;44 unsigned long int __msg_rtime_high;
40 __time_t msg_rtime; /* time of last msgsnd command */45 __time_t msg_rtime; /* time of last msgsnd command */
41 unsigned long int __msg_ctime_high;46 unsigned long int __msg_ctime_high;
42 __time_t msg_ctime; /* time of last change */47 __time_t msg_ctime; /* time of last change */
43# endif48# endif
44#else49# else
45 __time_t msg_stime; /* time of last msgsnd command */50 __time_t msg_stime; /* time of last msgsnd command */
46 __time_t msg_rtime; /* time of last msgsnd command */51 __time_t msg_rtime; /* time of last msgsnd command */
47 __time_t msg_ctime; /* time of last change */52 __time_t msg_ctime; /* time of last change */
48#endif53# endif
49 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */54 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
50 msgqnum_t msg_qnum; /* number of messages currently on queue */55 msgqnum_t msg_qnum; /* number of messages currently on queue */
51 msglen_t msg_qbytes; /* max number of bytes allowed on queue */56 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -53,4 +58,5 @@ struct msqid_ds...@@ -53,4 +58,5 @@ struct msqid_ds
53 __pid_t msg_lrpid; /* pid of last msgrcv() */58 __pid_t msg_lrpid; /* pid of last msgrcv() */
54 __syscall_ulong_t __glibc_reserved4;59 __syscall_ulong_t __glibc_reserved4;
55 __syscall_ulong_t __glibc_reserved5;60 __syscall_ulong_t __glibc_reserved5;
61#endif
56};62};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h+4
...@@ -23,10 +23,14 @@...@@ -23,10 +23,14 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __time_t sem_ctime; /* last time changed by semctl() */31 __time_t sem_ctime; /* last time changed by semctl() */
29 __syscall_ulong_t sem_nsems; /* number of semaphores in set */32 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
30 __syscall_ulong_t __sem_otime_high;33 __syscall_ulong_t __sem_otime_high;
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
35#endif
32};36};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h+9-5
...@@ -23,27 +23,31 @@...@@ -23,27 +23,31 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 __time_t shm_dtime; /* time of last shmdt() */33 __time_t shm_dtime; /* time of last shmdt() */
31 __time_t shm_ctime; /* time of last change by shmctl() */34 __time_t shm_ctime; /* time of last change by shmctl() */
32#else35# else
33 __time_t shm_atime; /* time of last shmat() */36 __time_t shm_atime; /* time of last shmat() */
34 __time_t shm_dtime; /* time of last shmdt() */37 __time_t shm_dtime; /* time of last shmdt() */
35 __time_t shm_ctime; /* time of last change by shmctl() */38 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif39# endif
37 __pid_t shm_cpid; /* pid of creator */40 __pid_t shm_cpid; /* pid of creator */
38 __pid_t shm_lpid; /* pid of last shmop */41 __pid_t shm_lpid; /* pid of last shmop */
39 shmatt_t shm_nattch; /* number of current attaches */42 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 3243# if __TIMESIZE == 32
41 unsigned short int __shm_atime_high;44 unsigned short int __shm_atime_high;
42 unsigned short int __shm_dtime_high;45 unsigned short int __shm_dtime_high;
43 unsigned short int __shm_ctime_high;46 unsigned short int __shm_ctime_high;
44 unsigned short int __glibc_reserved4;47 unsigned short int __glibc_reserved4;
45#else48# else
46 __syscall_ulong_t __glibc_reserved5;49 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;50 __syscall_ulong_t __glibc_reserved6;
51# endif
48#endif52#endif
49 };53 };
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages with 64k pages. */
81#define PTHREAD_STACK_MIN 131072
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* Minimum size for a thread. At least two pages with 64k pages. */
20#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 410032#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409935#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 4102
40# define SO_SNDTIMEO 4101
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 4102
46# define SO_SNDTIMEO_OLD 4101
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h+12-6
...@@ -20,32 +20,37 @@...@@ -20,32 +20,37 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29# ifdef __MIPSEL__34# ifdef __MIPSEL__
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_stime_high;36 unsigned long int __msg_stime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_rtime_high;38 unsigned long int __msg_rtime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35 unsigned long int __msg_ctime_high;40 unsigned long int __msg_ctime_high;
36# else41# else
37 unsigned long int __msg_stime_high;42 unsigned long int __msg_stime_high;
38 __time_t msg_stime; /* time of last msgsnd command */43 __time_t msg_stime; /* time of last msgsnd command */
39 unsigned long int __msg_rtime_high;44 unsigned long int __msg_rtime_high;
40 __time_t msg_rtime; /* time of last msgsnd command */45 __time_t msg_rtime; /* time of last msgsnd command */
41 unsigned long int __msg_ctime_high;46 unsigned long int __msg_ctime_high;
42 __time_t msg_ctime; /* time of last change */47 __time_t msg_ctime; /* time of last change */
43# endif48# endif
44#else49# else
45 __time_t msg_stime; /* time of last msgsnd command */50 __time_t msg_stime; /* time of last msgsnd command */
46 __time_t msg_rtime; /* time of last msgsnd command */51 __time_t msg_rtime; /* time of last msgsnd command */
47 __time_t msg_ctime; /* time of last change */52 __time_t msg_ctime; /* time of last change */
48#endif53# endif
49 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */54 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
50 msgqnum_t msg_qnum; /* number of messages currently on queue */55 msgqnum_t msg_qnum; /* number of messages currently on queue */
51 msglen_t msg_qbytes; /* max number of bytes allowed on queue */56 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -53,4 +58,5 @@ struct msqid_ds...@@ -53,4 +58,5 @@ struct msqid_ds
53 __pid_t msg_lrpid; /* pid of last msgrcv() */58 __pid_t msg_lrpid; /* pid of last msgrcv() */
54 __syscall_ulong_t __glibc_reserved4;59 __syscall_ulong_t __glibc_reserved4;
55 __syscall_ulong_t __glibc_reserved5;60 __syscall_ulong_t __glibc_reserved5;
61#endif
56};62};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h+4
...@@ -23,10 +23,14 @@...@@ -23,10 +23,14 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __time_t sem_ctime; /* last time changed by semctl() */31 __time_t sem_ctime; /* last time changed by semctl() */
29 __syscall_ulong_t sem_nsems; /* number of semaphores in set */32 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
30 __syscall_ulong_t __sem_otime_high;33 __syscall_ulong_t __sem_otime_high;
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
35#endif
32};36};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h+9-5
...@@ -23,27 +23,31 @@...@@ -23,27 +23,31 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 __time_t shm_dtime; /* time of last shmdt() */33 __time_t shm_dtime; /* time of last shmdt() */
31 __time_t shm_ctime; /* time of last change by shmctl() */34 __time_t shm_ctime; /* time of last change by shmctl() */
32#else35# else
33 __time_t shm_atime; /* time of last shmat() */36 __time_t shm_atime; /* time of last shmat() */
34 __time_t shm_dtime; /* time of last shmdt() */37 __time_t shm_dtime; /* time of last shmdt() */
35 __time_t shm_ctime; /* time of last change by shmctl() */38 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif39# endif
37 __pid_t shm_cpid; /* pid of creator */40 __pid_t shm_cpid; /* pid of creator */
38 __pid_t shm_lpid; /* pid of last shmop */41 __pid_t shm_lpid; /* pid of last shmop */
39 shmatt_t shm_nattch; /* number of current attaches */42 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 3243# if __TIMESIZE == 32
41 unsigned short int __shm_atime_high;44 unsigned short int __shm_atime_high;
42 unsigned short int __shm_dtime_high;45 unsigned short int __shm_dtime_high;
43 unsigned short int __shm_ctime_high;46 unsigned short int __shm_ctime_high;
44 unsigned short int __glibc_reserved4;47 unsigned short int __glibc_reserved4;
45#else48# else
46 __syscall_ulong_t __glibc_reserved5;49 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;50 __syscall_ulong_t __glibc_reserved6;
51# endif
48#endif52#endif
49 };53 };
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages with 64k pages. */
81#define PTHREAD_STACK_MIN 131072
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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/* Minimum size for a thread. At least two pages with 64k pages. */
20#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 410032#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409935#define SO_SNDLOWAT 4099
37#define SO_SNDTIMEO 4101
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 4102
40# define SO_SNDTIMEO 4101
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 4102
46# define SO_SNDTIMEO_OLD 4101
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h+12-6
...@@ -20,32 +20,37 @@...@@ -20,32 +20,37 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29# ifdef __MIPSEL__34# ifdef __MIPSEL__
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_stime_high;36 unsigned long int __msg_stime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_rtime_high;38 unsigned long int __msg_rtime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35 unsigned long int __msg_ctime_high;40 unsigned long int __msg_ctime_high;
36# else41# else
37 unsigned long int __msg_stime_high;42 unsigned long int __msg_stime_high;
38 __time_t msg_stime; /* time of last msgsnd command */43 __time_t msg_stime; /* time of last msgsnd command */
39 unsigned long int __msg_rtime_high;44 unsigned long int __msg_rtime_high;
40 __time_t msg_rtime; /* time of last msgsnd command */45 __time_t msg_rtime; /* time of last msgsnd command */
41 unsigned long int __msg_ctime_high;46 unsigned long int __msg_ctime_high;
42 __time_t msg_ctime; /* time of last change */47 __time_t msg_ctime; /* time of last change */
43# endif48# endif
44#else49# else
45 __time_t msg_stime; /* time of last msgsnd command */50 __time_t msg_stime; /* time of last msgsnd command */
46 __time_t msg_rtime; /* time of last msgsnd command */51 __time_t msg_rtime; /* time of last msgsnd command */
47 __time_t msg_ctime; /* time of last change */52 __time_t msg_ctime; /* time of last change */
48#endif53# endif
49 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */54 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
50 msgqnum_t msg_qnum; /* number of messages currently on queue */55 msgqnum_t msg_qnum; /* number of messages currently on queue */
51 msglen_t msg_qbytes; /* max number of bytes allowed on queue */56 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -53,4 +58,5 @@ struct msqid_ds...@@ -53,4 +58,5 @@ struct msqid_ds
53 __pid_t msg_lrpid; /* pid of last msgrcv() */58 __pid_t msg_lrpid; /* pid of last msgrcv() */
54 __syscall_ulong_t __glibc_reserved4;59 __syscall_ulong_t __glibc_reserved4;
55 __syscall_ulong_t __glibc_reserved5;60 __syscall_ulong_t __glibc_reserved5;
61#endif
56};62};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h+4
...@@ -23,10 +23,14 @@...@@ -23,10 +23,14 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __time_t sem_ctime; /* last time changed by semctl() */31 __time_t sem_ctime; /* last time changed by semctl() */
29 __syscall_ulong_t sem_nsems; /* number of semaphores in set */32 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
30 __syscall_ulong_t __sem_otime_high;33 __syscall_ulong_t __sem_otime_high;
31 __syscall_ulong_t __sem_ctime_high;34 __syscall_ulong_t __sem_ctime_high;
35#endif
32};36};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h+9-5
...@@ -23,27 +23,31 @@...@@ -23,27 +23,31 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27 size_t shm_segsz; /* size of segment in bytes */30 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 3231# if __TIMESIZE == 32
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 __time_t shm_dtime; /* time of last shmdt() */33 __time_t shm_dtime; /* time of last shmdt() */
31 __time_t shm_ctime; /* time of last change by shmctl() */34 __time_t shm_ctime; /* time of last change by shmctl() */
32#else35# else
33 __time_t shm_atime; /* time of last shmat() */36 __time_t shm_atime; /* time of last shmat() */
34 __time_t shm_dtime; /* time of last shmdt() */37 __time_t shm_dtime; /* time of last shmdt() */
35 __time_t shm_ctime; /* time of last change by shmctl() */38 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif39# endif
37 __pid_t shm_cpid; /* pid of creator */40 __pid_t shm_cpid; /* pid of creator */
38 __pid_t shm_lpid; /* pid of last shmop */41 __pid_t shm_lpid; /* pid of last shmop */
39 shmatt_t shm_nattch; /* number of current attaches */42 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 3243# if __TIMESIZE == 32
41 unsigned short int __shm_atime_high;44 unsigned short int __shm_atime_high;
42 unsigned short int __shm_dtime_high;45 unsigned short int __shm_dtime_high;
43 unsigned short int __shm_ctime_high;46 unsigned short int __shm_ctime_high;
44 unsigned short int __glibc_reserved4;47 unsigned short int __glibc_reserved4;
45#else48# else
46 __syscall_ulong_t __glibc_reserved5;49 __syscall_ulong_t __glibc_reserved5;
47 __syscall_ulong_t __glibc_reserved6;50 __syscall_ulong_t __glibc_reserved6;
51# endif
48#endif52#endif
49 };53 };
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/local_lim.h deleted-100
...@@ -1,100 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages for systems with 64k
81 pages. */
82#define PTHREAD_STACK_MIN 131072
83
84/* Maximum number of timer expiration overruns. */
85#define DELAYTIMER_MAX 2147483647
86
87/* Maximum tty name length. */
88#define TTY_NAME_MAX 32
89
90/* Maximum login name length. This is arbitrary. */
91#define LOGIN_NAME_MAX 256
92
93/* Maximum host name length. */
94#define HOST_NAME_MAX 64
95
96/* Maximum message queue priority level. */
97#define MQ_PRIO_MAX 32768
98
99/* Maximum value the semaphore can have. */
100#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/pthread_stack_min.h created+21
...@@ -0,0 +1,21 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* Minimum size for a thread. At least two pages for systems with 64k
20 pages. */
21#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 1030#define SO_OOBINLINE 10
31#define SO_RCVBUF 831#define SO_RCVBUF 8
32#define SO_RCVLOWAT 1632#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
34#define SO_REUSEADDR 233#define SO_REUSEADDR 2
35#define SO_SNDBUF 734#define SO_SNDBUF 7
36#define SO_SNDLOWAT 1735#define SO_SNDLOWAT 17
37#define SO_SNDTIMEO 19
38#define SO_TYPE 3
\ No newline at end of file
36#define SO_TYPE 3
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 18
40# define SO_SNDTIMEO 19
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 18
46# define SO_SNDTIMEO_OLD 19
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h+29-23
...@@ -26,35 +26,37 @@...@@ -26,35 +26,37 @@
26#include <bits/wordsize.h>26#include <bits/wordsize.h>
2727
28#if __WORDSIZE == 3228#if __WORDSIZE == 32
29
30struct stat29struct stat
31 {30 {
31# ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33# else
32 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
33# ifndef __USE_FILE_OFFSET6435# ifndef __USE_FILE_OFFSET64
34 unsigned short int __pad1;36 unsigned short int __pad1;
35 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
36# else38# else
37 __ino64_t st_ino; /* File serial number. */39 __ino64_t st_ino; /* File serial number. */
38# endif40# endif
39 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
40 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
41 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
42 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
43 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
44 unsigned short int __pad2;46 unsigned short int __pad2;
45# ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
46 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
47# else49# else
48 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
49# endif51# endif
50 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5153
52# ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
53 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
54# else56# else
55 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
56# endif58# endif
57# ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
58 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
59 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
60 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -64,25 +66,28 @@ struct stat...@@ -64,25 +66,28 @@ struct stat
64 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
65 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
66 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
67# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
68# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
69# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
70# else72# else
71 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
72 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
73 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
74 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
75 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
76 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77# endif79# endif
78 unsigned long int __glibc_reserved4;80 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;81 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
80 };83 };
8184
82
83# ifdef __USE_LARGEFILE6485# ifdef __USE_LARGEFILE64
84struct stat6486struct stat64
85 {87 {
88# ifdef __USE_TIME_BITS64
89# include <bits/struct_stat_time64_helper.h>
90# else
86 __dev_t st_dev; /* Device. */91 __dev_t st_dev; /* Device. */
87 __ino64_t st_ino; /* File serial number. */92 __ino64_t st_ino; /* File serial number. */
88 __mode_t st_mode; /* File mode. */93 __mode_t st_mode; /* File mode. */
...@@ -94,7 +99,7 @@ struct stat64...@@ -94,7 +99,7 @@ struct stat64
94 __off64_t st_size; /* Size of file, in bytes. */99 __off64_t st_size; /* Size of file, in bytes. */
95 __blksize_t st_blksize; /* Optimal block size for I/O. */100 __blksize_t st_blksize; /* Optimal block size for I/O. */
96 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
97# ifdef __USE_XOPEN2K8102# ifdef __USE_XOPEN2K8
98 /* Nanosecond resolution timestamps are stored in a format103 /* Nanosecond resolution timestamps are stored in a format
99 equivalent to 'struct timespec'. This is the type used104 equivalent to 'struct timespec'. This is the type used
100 whenever possible but the Unix namespace rules do not allow the105 whenever possible but the Unix namespace rules do not allow the
...@@ -104,19 +109,20 @@ struct stat64...@@ -104,19 +109,20 @@ struct stat64
104 struct timespec st_atim; /* Time of last access. */109 struct timespec st_atim; /* Time of last access. */
105 struct timespec st_mtim; /* Time of last modification. */110 struct timespec st_mtim; /* Time of last modification. */
106 struct timespec st_ctim; /* Time of last status change. */111 struct timespec st_ctim; /* Time of last status change. */
107# define st_atime st_atim.tv_sec /* Backward compatibility. */112# define st_atime st_atim.tv_sec /* Backward compatibility. */
108# define st_mtime st_mtim.tv_sec113# define st_mtime st_mtim.tv_sec
109# define st_ctime st_ctim.tv_sec114# define st_ctime st_ctim.tv_sec
110# else115# else
111 __time_t st_atime; /* Time of last access. */116 __time_t st_atime; /* Time of last access. */
112 unsigned long int st_atimensec; /* Nscecs of last access. */117 unsigned long int st_atimensec; /* Nscecs of last access. */
113 __time_t st_mtime; /* Time of last modification. */118 __time_t st_mtime; /* Time of last modification. */
114 unsigned long int st_mtimensec; /* Nsecs of last modification. */119 unsigned long int st_mtimensec; /* Nsecs of last modification. */
115 __time_t st_ctime; /* Time of last status change. */120 __time_t st_ctime; /* Time of last status change. */
116 unsigned long int st_ctimensec; /* Nsecs of last status change. */121 unsigned long int st_ctimensec; /* Nsecs of last status change. */
117# endif122# endif
118 unsigned long int __glibc_reserved4;123 unsigned long int __glibc_reserved4;
119 unsigned long int __glibc_reserved5;124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
120 };126 };
121# endif /* __USE_LARGEFILE64 */127# endif /* __USE_LARGEFILE64 */
122128
lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h+9-3
...@@ -20,23 +20,28 @@...@@ -20,23 +20,28 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29 unsigned long int __msg_stime_high;34 unsigned long int __msg_stime_high;
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_rtime_high;36 unsigned long int __msg_rtime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_ctime_high;38 unsigned long int __msg_ctime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35#else40# else
36 __time_t msg_stime; /* time of last msgsnd command */41 __time_t msg_stime; /* time of last msgsnd command */
37 __time_t msg_rtime; /* time of last msgsnd command */42 __time_t msg_rtime; /* time of last msgsnd command */
38 __time_t msg_ctime; /* time of last change */43 __time_t msg_ctime; /* time of last change */
39#endif44# endif
40 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
41 msgqnum_t msg_qnum; /* number of messages currently on queue */46 msgqnum_t msg_qnum; /* number of messages currently on queue */
42 msglen_t msg_qbytes; /* max number of bytes allowed on queue */47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -44,4 +49,5 @@ struct msqid_ds...@@ -44,4 +49,5 @@ struct msqid_ds
44 __pid_t msg_lrpid; /* pid of last msgrcv() */49 __pid_t msg_lrpid; /* pid of last msgrcv() */
45 __syscall_ulong_t __glibc_reserved4;50 __syscall_ulong_t __glibc_reserved4;
46 __syscall_ulong_t __glibc_reserved5;51 __syscall_ulong_t __glibc_reserved5;
52#endif
47};53};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h+7-3
...@@ -23,17 +23,21 @@...@@ -23,17 +23,21 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
29 __time_t sem_otime; /* last semop() time */32 __time_t sem_otime; /* last semop() time */
30 __syscall_ulong_t __sem_ctime_high;33 __syscall_ulong_t __sem_ctime_high;
31 __time_t sem_ctime; /* last time changed by semctl() */34 __time_t sem_ctime; /* last time changed by semctl() */
32#else35# else
33 __time_t sem_otime; /* last semop() time */36 __time_t sem_otime; /* last semop() time */
34 __time_t sem_ctime; /* last time changed by semctl() */37 __time_t sem_ctime; /* last time changed by semctl() */
35#endif38# endif
36 __syscall_ulong_t sem_nsems; /* number of semaphores in set */39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
37 __syscall_ulong_t __glibc_reserved3;40 __syscall_ulong_t __glibc_reserved3;
38 __syscall_ulong_t __glibc_reserved4;41 __syscall_ulong_t __glibc_reserved4;
42#endif
39};43};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h+7-3
...@@ -23,8 +23,11 @@...@@ -23,8 +23,11 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 unsigned long int __shm_atime_high;31 unsigned long int __shm_atime_high;
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 unsigned long int __shm_dtime_high;33 unsigned long int __shm_dtime_high;
...@@ -32,15 +35,16 @@ struct shmid_ds...@@ -32,15 +35,16 @@ struct shmid_ds
32 unsigned long int __shm_ctime_high;35 unsigned long int __shm_ctime_high;
33 __time_t shm_ctime; /* time of last change by shmctl() */36 __time_t shm_ctime; /* time of last change by shmctl() */
34 unsigned long int __glibc_reserved4;37 unsigned long int __glibc_reserved4;
35#else38# else
36 __time_t shm_atime; /* time of last shmat() */39 __time_t shm_atime; /* time of last shmat() */
37 __time_t shm_dtime; /* time of last shmdt() */40 __time_t shm_dtime; /* time of last shmdt() */
38 __time_t shm_ctime; /* time of last change by shmctl() */41 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif42# endif
40 size_t shm_segsz; /* size of segment in bytes */43 size_t shm_segsz; /* size of segment in bytes */
41 __pid_t shm_cpid; /* pid of creator */44 __pid_t shm_cpid; /* pid of creator */
42 __pid_t shm_lpid; /* pid of last shmop */45 __pid_t shm_lpid; /* pid of last shmop */
43 shmatt_t shm_nattch; /* number of current attaches */46 shmatt_t shm_nattch; /* number of current attaches */
44 __syscall_ulong_t __glibc_reserved5;47 __syscall_ulong_t __glibc_reserved5;
45 __syscall_ulong_t __glibc_reserved6;48 __syscall_ulong_t __glibc_reserved6;
49#endif
46 };50 };
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h+1
...@@ -7,6 +7,7 @@...@@ -7,6 +7,7 @@
7#define LIBANL_SO "libanl.so.1"7#define LIBANL_SO "libanl.so.1"
8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"8#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
9#define LIBCRYPT_SO "libcrypt.so.1"9#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
10#define LIBC_SO "libc.so.6"11#define LIBC_SO "libc.so.6"
11#define LIBDL_SO "libdl.so.2"12#define LIBDL_SO "libdl.so.2"
12#define LIBGCC_S_SO "libgcc_s.so.1"13#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc-linux-gnu/sys/ptrace.h+10
...@@ -70,6 +70,8 @@ __BEGIN_DECLS...@@ -70,6 +70,8 @@ __BEGIN_DECLS
70# undef PTRACE_SYSCALL_INFO_ENTRY70# undef PTRACE_SYSCALL_INFO_ENTRY
71# undef PTRACE_SYSCALL_INFO_EXIT71# undef PTRACE_SYSCALL_INFO_EXIT
72# undef PTRACE_SYSCALL_INFO_SECCOMP72# undef PTRACE_SYSCALL_INFO_SECCOMP
73# undef PTRACE_SYSEMU
74# undef PTRACE_SYSEMU_SINGLESTEP
73# undef PTRACE_TRACEME75# undef PTRACE_TRACEME
74#endif76#endif
7577
...@@ -188,6 +190,14 @@ enum __ptrace_request...@@ -188,6 +190,14 @@ enum __ptrace_request
188 PTRACE_SETVSRREGS = 28,190 PTRACE_SETVSRREGS = 28,
189#define PT_SETVSRREGS PTRACE_SETVSRREGS191#define PT_SETVSRREGS PTRACE_SETVSRREGS
190192
193 /* Continue and stop at the next syscall, it will not be executed. */
194 PTRACE_SYSEMU = 29,
195#define PT_SYSEMU PTRACE_SYSEMU
196
197 /* Single step the process, the next syscall will not be executed. */
198 PTRACE_SYSEMU_SINGLESTEP = 30,
199#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
200
191 /* Execute process until next taken branch. */201 /* Execute process until next taken branch. */
192 PTRACE_SINGLEBLOCK = 256,202 PTRACE_SINGLEBLOCK = 256,
193#define PT_STEPBLOCK PTRACE_SINGLEBLOCK203#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h deleted-100
...@@ -1,100 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages for systems with 64k
81 pages. */
82#define PTHREAD_STACK_MIN 131072
83
84/* Maximum number of timer expiration overruns. */
85#define DELAYTIMER_MAX 2147483647
86
87/* Maximum tty name length. */
88#define TTY_NAME_MAX 32
89
90/* Maximum login name length. This is arbitrary. */
91#define LOGIN_NAME_MAX 256
92
93/* Maximum host name length. */
94#define HOST_NAME_MAX 64
95
96/* Maximum message queue priority level. */
97#define MQ_PRIO_MAX 32768
98
99/* Maximum value the semaphore can have. */
100#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h created+21
...@@ -0,0 +1,21 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* Minimum size for a thread. At least two pages for systems with 64k
20 pages. */
21#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 1030#define SO_OOBINLINE 10
31#define SO_RCVBUF 831#define SO_RCVBUF 8
32#define SO_RCVLOWAT 1632#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
34#define SO_REUSEADDR 233#define SO_REUSEADDR 2
35#define SO_SNDBUF 734#define SO_SNDBUF 7
36#define SO_SNDLOWAT 1735#define SO_SNDLOWAT 17
37#define SO_SNDTIMEO 19
38#define SO_TYPE 3
\ No newline at end of file
36#define SO_TYPE 3
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 18
40# define SO_SNDTIMEO 19
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 18
46# define SO_SNDTIMEO_OLD 19
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h+29-23
...@@ -26,35 +26,37 @@...@@ -26,35 +26,37 @@
26#include <bits/wordsize.h>26#include <bits/wordsize.h>
2727
28#if __WORDSIZE == 3228#if __WORDSIZE == 32
29
30struct stat29struct stat
31 {30 {
31# ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33# else
32 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
33# ifndef __USE_FILE_OFFSET6435# ifndef __USE_FILE_OFFSET64
34 unsigned short int __pad1;36 unsigned short int __pad1;
35 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
36# else38# else
37 __ino64_t st_ino; /* File serial number. */39 __ino64_t st_ino; /* File serial number. */
38# endif40# endif
39 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
40 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
41 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
42 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
43 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
44 unsigned short int __pad2;46 unsigned short int __pad2;
45# ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
46 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
47# else49# else
48 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
49# endif51# endif
50 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5153
52# ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
53 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
54# else56# else
55 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
56# endif58# endif
57# ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
58 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
59 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
60 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -64,25 +66,28 @@ struct stat...@@ -64,25 +66,28 @@ struct stat
64 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
65 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
66 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
67# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
68# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
69# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
70# else72# else
71 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
72 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
73 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
74 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
75 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
76 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77# endif79# endif
78 unsigned long int __glibc_reserved4;80 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;81 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
80 };83 };
8184
82
83# ifdef __USE_LARGEFILE6485# ifdef __USE_LARGEFILE64
84struct stat6486struct stat64
85 {87 {
88# ifdef __USE_TIME_BITS64
89# include <bits/struct_stat_time64_helper.h>
90# else
86 __dev_t st_dev; /* Device. */91 __dev_t st_dev; /* Device. */
87 __ino64_t st_ino; /* File serial number. */92 __ino64_t st_ino; /* File serial number. */
88 __mode_t st_mode; /* File mode. */93 __mode_t st_mode; /* File mode. */
...@@ -94,7 +99,7 @@ struct stat64...@@ -94,7 +99,7 @@ struct stat64
94 __off64_t st_size; /* Size of file, in bytes. */99 __off64_t st_size; /* Size of file, in bytes. */
95 __blksize_t st_blksize; /* Optimal block size for I/O. */100 __blksize_t st_blksize; /* Optimal block size for I/O. */
96 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
97# ifdef __USE_XOPEN2K8102# ifdef __USE_XOPEN2K8
98 /* Nanosecond resolution timestamps are stored in a format103 /* Nanosecond resolution timestamps are stored in a format
99 equivalent to 'struct timespec'. This is the type used104 equivalent to 'struct timespec'. This is the type used
100 whenever possible but the Unix namespace rules do not allow the105 whenever possible but the Unix namespace rules do not allow the
...@@ -104,19 +109,20 @@ struct stat64...@@ -104,19 +109,20 @@ struct stat64
104 struct timespec st_atim; /* Time of last access. */109 struct timespec st_atim; /* Time of last access. */
105 struct timespec st_mtim; /* Time of last modification. */110 struct timespec st_mtim; /* Time of last modification. */
106 struct timespec st_ctim; /* Time of last status change. */111 struct timespec st_ctim; /* Time of last status change. */
107# define st_atime st_atim.tv_sec /* Backward compatibility. */112# define st_atime st_atim.tv_sec /* Backward compatibility. */
108# define st_mtime st_mtim.tv_sec113# define st_mtime st_mtim.tv_sec
109# define st_ctime st_ctim.tv_sec114# define st_ctime st_ctim.tv_sec
110# else115# else
111 __time_t st_atime; /* Time of last access. */116 __time_t st_atime; /* Time of last access. */
112 unsigned long int st_atimensec; /* Nscecs of last access. */117 unsigned long int st_atimensec; /* Nscecs of last access. */
113 __time_t st_mtime; /* Time of last modification. */118 __time_t st_mtime; /* Time of last modification. */
114 unsigned long int st_mtimensec; /* Nsecs of last modification. */119 unsigned long int st_mtimensec; /* Nsecs of last modification. */
115 __time_t st_ctime; /* Time of last status change. */120 __time_t st_ctime; /* Time of last status change. */
116 unsigned long int st_ctimensec; /* Nsecs of last status change. */121 unsigned long int st_ctimensec; /* Nsecs of last status change. */
117# endif122# endif
118 unsigned long int __glibc_reserved4;123 unsigned long int __glibc_reserved4;
119 unsigned long int __glibc_reserved5;124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
120 };126 };
121# endif /* __USE_LARGEFILE64 */127# endif /* __USE_LARGEFILE64 */
122128
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h+9-3
...@@ -20,23 +20,28 @@...@@ -20,23 +20,28 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29 unsigned long int __msg_stime_high;34 unsigned long int __msg_stime_high;
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_rtime_high;36 unsigned long int __msg_rtime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_ctime_high;38 unsigned long int __msg_ctime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35#else40# else
36 __time_t msg_stime; /* time of last msgsnd command */41 __time_t msg_stime; /* time of last msgsnd command */
37 __time_t msg_rtime; /* time of last msgsnd command */42 __time_t msg_rtime; /* time of last msgsnd command */
38 __time_t msg_ctime; /* time of last change */43 __time_t msg_ctime; /* time of last change */
39#endif44# endif
40 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
41 msgqnum_t msg_qnum; /* number of messages currently on queue */46 msgqnum_t msg_qnum; /* number of messages currently on queue */
42 msglen_t msg_qbytes; /* max number of bytes allowed on queue */47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -44,4 +49,5 @@ struct msqid_ds...@@ -44,4 +49,5 @@ struct msqid_ds
44 __pid_t msg_lrpid; /* pid of last msgrcv() */49 __pid_t msg_lrpid; /* pid of last msgrcv() */
45 __syscall_ulong_t __glibc_reserved4;50 __syscall_ulong_t __glibc_reserved4;
46 __syscall_ulong_t __glibc_reserved5;51 __syscall_ulong_t __glibc_reserved5;
52#endif
47};53};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h+7-3
...@@ -23,17 +23,21 @@...@@ -23,17 +23,21 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
29 __time_t sem_otime; /* last semop() time */32 __time_t sem_otime; /* last semop() time */
30 __syscall_ulong_t __sem_ctime_high;33 __syscall_ulong_t __sem_ctime_high;
31 __time_t sem_ctime; /* last time changed by semctl() */34 __time_t sem_ctime; /* last time changed by semctl() */
32#else35# else
33 __time_t sem_otime; /* last semop() time */36 __time_t sem_otime; /* last semop() time */
34 __time_t sem_ctime; /* last time changed by semctl() */37 __time_t sem_ctime; /* last time changed by semctl() */
35#endif38# endif
36 __syscall_ulong_t sem_nsems; /* number of semaphores in set */39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
37 __syscall_ulong_t __glibc_reserved3;40 __syscall_ulong_t __glibc_reserved3;
38 __syscall_ulong_t __glibc_reserved4;41 __syscall_ulong_t __glibc_reserved4;
42#endif
39};43};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h+7-3
...@@ -23,8 +23,11 @@...@@ -23,8 +23,11 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 unsigned long int __shm_atime_high;31 unsigned long int __shm_atime_high;
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 unsigned long int __shm_dtime_high;33 unsigned long int __shm_dtime_high;
...@@ -32,15 +35,16 @@ struct shmid_ds...@@ -32,15 +35,16 @@ struct shmid_ds
32 unsigned long int __shm_ctime_high;35 unsigned long int __shm_ctime_high;
33 __time_t shm_ctime; /* time of last change by shmctl() */36 __time_t shm_ctime; /* time of last change by shmctl() */
34 unsigned long int __glibc_reserved4;37 unsigned long int __glibc_reserved4;
35#else38# else
36 __time_t shm_atime; /* time of last shmat() */39 __time_t shm_atime; /* time of last shmat() */
37 __time_t shm_dtime; /* time of last shmdt() */40 __time_t shm_dtime; /* time of last shmdt() */
38 __time_t shm_ctime; /* time of last change by shmctl() */41 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif42# endif
40 size_t shm_segsz; /* size of segment in bytes */43 size_t shm_segsz; /* size of segment in bytes */
41 __pid_t shm_cpid; /* pid of creator */44 __pid_t shm_cpid; /* pid of creator */
42 __pid_t shm_lpid; /* pid of last shmop */45 __pid_t shm_lpid; /* pid of last shmop */
43 shmatt_t shm_nattch; /* number of current attaches */46 shmatt_t shm_nattch; /* number of current attaches */
44 __syscall_ulong_t __glibc_reserved5;47 __syscall_ulong_t __glibc_reserved5;
45 __syscall_ulong_t __glibc_reserved6;48 __syscall_ulong_t __glibc_reserved6;
49#endif
46 };50 };
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h+10
...@@ -70,6 +70,8 @@ __BEGIN_DECLS...@@ -70,6 +70,8 @@ __BEGIN_DECLS
70# undef PTRACE_SYSCALL_INFO_ENTRY70# undef PTRACE_SYSCALL_INFO_ENTRY
71# undef PTRACE_SYSCALL_INFO_EXIT71# undef PTRACE_SYSCALL_INFO_EXIT
72# undef PTRACE_SYSCALL_INFO_SECCOMP72# undef PTRACE_SYSCALL_INFO_SECCOMP
73# undef PTRACE_SYSEMU
74# undef PTRACE_SYSEMU_SINGLESTEP
73# undef PTRACE_TRACEME75# undef PTRACE_TRACEME
74#endif76#endif
7577
...@@ -188,6 +190,14 @@ enum __ptrace_request...@@ -188,6 +190,14 @@ enum __ptrace_request
188 PTRACE_SETVSRREGS = 28,190 PTRACE_SETVSRREGS = 28,
189#define PT_SETVSRREGS PTRACE_SETVSRREGS191#define PT_SETVSRREGS PTRACE_SETVSRREGS
190192
193 /* Continue and stop at the next syscall, it will not be executed. */
194 PTRACE_SYSEMU = 29,
195#define PT_SYSEMU PTRACE_SYSEMU
196
197 /* Single step the process, the next syscall will not be executed. */
198 PTRACE_SYSEMU_SINGLESTEP = 30,
199#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
200
191 /* Execute process until next taken branch. */201 /* Execute process until next taken branch. */
192 PTRACE_SINGLEBLOCK = 256,202 PTRACE_SINGLEBLOCK = 256,
193#define PT_STEPBLOCK PTRACE_SINGLEBLOCK203#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h deleted-100
...@@ -1,100 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. At least two pages for systems with 64k
81 pages. */
82#define PTHREAD_STACK_MIN 131072
83
84/* Maximum number of timer expiration overruns. */
85#define DELAYTIMER_MAX 2147483647
86
87/* Maximum tty name length. */
88#define TTY_NAME_MAX 32
89
90/* Maximum login name length. This is arbitrary. */
91#define LOGIN_NAME_MAX 256
92
93/* Maximum host name length. */
94#define HOST_NAME_MAX 64
95
96/* Maximum message queue priority level. */
97#define MQ_PRIO_MAX 32768
98
99/* Maximum value the semaphore can have. */
100#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h created+21
...@@ -0,0 +1,21 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* Minimum size for a thread. At least two pages for systems with 64k
20 pages. */
21#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 1030#define SO_OOBINLINE 10
31#define SO_RCVBUF 831#define SO_RCVBUF 8
32#define SO_RCVLOWAT 1632#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
34#define SO_REUSEADDR 233#define SO_REUSEADDR 2
35#define SO_SNDBUF 734#define SO_SNDBUF 7
36#define SO_SNDLOWAT 1735#define SO_SNDLOWAT 17
37#define SO_SNDTIMEO 19
38#define SO_TYPE 3
\ No newline at end of file
36#define SO_TYPE 3
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 18
40# define SO_SNDTIMEO 19
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 35
43# define SO_TIMESTAMPING 37
44#else
45# define SO_RCVTIMEO_OLD 18
46# define SO_SNDTIMEO_OLD 19
47# define SO_RCVTIMEO_NEW 66
48# define SO_SNDTIMEO_NEW 67
49
50# define SO_TIMESTAMP_OLD 29
51# define SO_TIMESTAMPNS_OLD 35
52# define SO_TIMESTAMPING_OLD 37
53# define SO_TIMESTAMP_NEW 63
54# define SO_TIMESTAMPNS_NEW 64
55# define SO_TIMESTAMPING_NEW 65
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h+29-23
...@@ -26,35 +26,37 @@...@@ -26,35 +26,37 @@
26#include <bits/wordsize.h>26#include <bits/wordsize.h>
2727
28#if __WORDSIZE == 3228#if __WORDSIZE == 32
29
30struct stat29struct stat
31 {30 {
31# ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33# else
32 __dev_t st_dev; /* Device. */34 __dev_t st_dev; /* Device. */
33# ifndef __USE_FILE_OFFSET6435# ifndef __USE_FILE_OFFSET64
34 unsigned short int __pad1;36 unsigned short int __pad1;
35 __ino_t st_ino; /* File serial number. */37 __ino_t st_ino; /* File serial number. */
36# else38# else
37 __ino64_t st_ino; /* File serial number. */39 __ino64_t st_ino; /* File serial number. */
38# endif40# endif
39 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
40 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
41 __uid_t st_uid; /* User ID of the file's owner. */43 __uid_t st_uid; /* User ID of the file's owner. */
42 __gid_t st_gid; /* Group ID of the file's group.*/44 __gid_t st_gid; /* Group ID of the file's group.*/
43 __dev_t st_rdev; /* Device number, if device. */45 __dev_t st_rdev; /* Device number, if device. */
44 unsigned short int __pad2;46 unsigned short int __pad2;
45# ifndef __USE_FILE_OFFSET6447# ifndef __USE_FILE_OFFSET64
46 __off_t st_size; /* Size of file, in bytes. */48 __off_t st_size; /* Size of file, in bytes. */
47# else49# else
48 __off64_t st_size; /* Size of file, in bytes. */50 __off64_t st_size; /* Size of file, in bytes. */
49# endif51# endif
50 __blksize_t st_blksize; /* Optimal block size for I/O. */52 __blksize_t st_blksize; /* Optimal block size for I/O. */
5153
52# ifndef __USE_FILE_OFFSET6454# ifndef __USE_FILE_OFFSET64
53 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */55 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
54# else56# else
55 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
56# endif58# endif
57# ifdef __USE_XOPEN2K859# ifdef __USE_XOPEN2K8
58 /* Nanosecond resolution timestamps are stored in a format60 /* Nanosecond resolution timestamps are stored in a format
59 equivalent to 'struct timespec'. This is the type used61 equivalent to 'struct timespec'. This is the type used
60 whenever possible but the Unix namespace rules do not allow the62 whenever possible but the Unix namespace rules do not allow the
...@@ -64,25 +66,28 @@ struct stat...@@ -64,25 +66,28 @@ struct stat
64 struct timespec st_atim; /* Time of last access. */66 struct timespec st_atim; /* Time of last access. */
65 struct timespec st_mtim; /* Time of last modification. */67 struct timespec st_mtim; /* Time of last modification. */
66 struct timespec st_ctim; /* Time of last status change. */68 struct timespec st_ctim; /* Time of last status change. */
67# define st_atime st_atim.tv_sec /* Backward compatibility. */69# define st_atime st_atim.tv_sec /* Backward compatibility. */
68# define st_mtime st_mtim.tv_sec70# define st_mtime st_mtim.tv_sec
69# define st_ctime st_ctim.tv_sec71# define st_ctime st_ctim.tv_sec
70# else72# else
71 __time_t st_atime; /* Time of last access. */73 __time_t st_atime; /* Time of last access. */
72 unsigned long int st_atimensec; /* Nscecs of last access. */74 unsigned long int st_atimensec; /* Nscecs of last access. */
73 __time_t st_mtime; /* Time of last modification. */75 __time_t st_mtime; /* Time of last modification. */
74 unsigned long int st_mtimensec; /* Nsecs of last modification. */76 unsigned long int st_mtimensec; /* Nsecs of last modification. */
75 __time_t st_ctime; /* Time of last status change. */77 __time_t st_ctime; /* Time of last status change. */
76 unsigned long int st_ctimensec; /* Nsecs of last status change. */78 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77# endif79# endif
78 unsigned long int __glibc_reserved4;80 unsigned long int __glibc_reserved4;
79 unsigned long int __glibc_reserved5;81 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
80 };83 };
8184
82
83# ifdef __USE_LARGEFILE6485# ifdef __USE_LARGEFILE64
84struct stat6486struct stat64
85 {87 {
88# ifdef __USE_TIME_BITS64
89# include <bits/struct_stat_time64_helper.h>
90# else
86 __dev_t st_dev; /* Device. */91 __dev_t st_dev; /* Device. */
87 __ino64_t st_ino; /* File serial number. */92 __ino64_t st_ino; /* File serial number. */
88 __mode_t st_mode; /* File mode. */93 __mode_t st_mode; /* File mode. */
...@@ -94,7 +99,7 @@ struct stat64...@@ -94,7 +99,7 @@ struct stat64
94 __off64_t st_size; /* Size of file, in bytes. */99 __off64_t st_size; /* Size of file, in bytes. */
95 __blksize_t st_blksize; /* Optimal block size for I/O. */100 __blksize_t st_blksize; /* Optimal block size for I/O. */
96 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
97# ifdef __USE_XOPEN2K8102# ifdef __USE_XOPEN2K8
98 /* Nanosecond resolution timestamps are stored in a format103 /* Nanosecond resolution timestamps are stored in a format
99 equivalent to 'struct timespec'. This is the type used104 equivalent to 'struct timespec'. This is the type used
100 whenever possible but the Unix namespace rules do not allow the105 whenever possible but the Unix namespace rules do not allow the
...@@ -104,19 +109,20 @@ struct stat64...@@ -104,19 +109,20 @@ struct stat64
104 struct timespec st_atim; /* Time of last access. */109 struct timespec st_atim; /* Time of last access. */
105 struct timespec st_mtim; /* Time of last modification. */110 struct timespec st_mtim; /* Time of last modification. */
106 struct timespec st_ctim; /* Time of last status change. */111 struct timespec st_ctim; /* Time of last status change. */
107# define st_atime st_atim.tv_sec /* Backward compatibility. */112# define st_atime st_atim.tv_sec /* Backward compatibility. */
108# define st_mtime st_mtim.tv_sec113# define st_mtime st_mtim.tv_sec
109# define st_ctime st_ctim.tv_sec114# define st_ctime st_ctim.tv_sec
110# else115# else
111 __time_t st_atime; /* Time of last access. */116 __time_t st_atime; /* Time of last access. */
112 unsigned long int st_atimensec; /* Nscecs of last access. */117 unsigned long int st_atimensec; /* Nscecs of last access. */
113 __time_t st_mtime; /* Time of last modification. */118 __time_t st_mtime; /* Time of last modification. */
114 unsigned long int st_mtimensec; /* Nsecs of last modification. */119 unsigned long int st_mtimensec; /* Nsecs of last modification. */
115 __time_t st_ctime; /* Time of last status change. */120 __time_t st_ctime; /* Time of last status change. */
116 unsigned long int st_ctimensec; /* Nsecs of last status change. */121 unsigned long int st_ctimensec; /* Nsecs of last status change. */
117# endif122# endif
118 unsigned long int __glibc_reserved4;123 unsigned long int __glibc_reserved4;
119 unsigned long int __glibc_reserved5;124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
120 };126 };
121# endif /* __USE_LARGEFILE64 */127# endif /* __USE_LARGEFILE64 */
122128
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h+9-3
...@@ -20,23 +20,28 @@...@@ -20,23 +20,28 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29 unsigned long int __msg_stime_high;34 unsigned long int __msg_stime_high;
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_rtime_high;36 unsigned long int __msg_rtime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_ctime_high;38 unsigned long int __msg_ctime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35#else40# else
36 __time_t msg_stime; /* time of last msgsnd command */41 __time_t msg_stime; /* time of last msgsnd command */
37 __time_t msg_rtime; /* time of last msgsnd command */42 __time_t msg_rtime; /* time of last msgsnd command */
38 __time_t msg_ctime; /* time of last change */43 __time_t msg_ctime; /* time of last change */
39#endif44# endif
40 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
41 msgqnum_t msg_qnum; /* number of messages currently on queue */46 msgqnum_t msg_qnum; /* number of messages currently on queue */
42 msglen_t msg_qbytes; /* max number of bytes allowed on queue */47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -44,4 +49,5 @@ struct msqid_ds...@@ -44,4 +49,5 @@ struct msqid_ds
44 __pid_t msg_lrpid; /* pid of last msgrcv() */49 __pid_t msg_lrpid; /* pid of last msgrcv() */
45 __syscall_ulong_t __glibc_reserved4;50 __syscall_ulong_t __glibc_reserved4;
46 __syscall_ulong_t __glibc_reserved5;51 __syscall_ulong_t __glibc_reserved5;
52#endif
47};53};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h+7-3
...@@ -23,17 +23,21 @@...@@ -23,17 +23,21 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
29 __time_t sem_otime; /* last semop() time */32 __time_t sem_otime; /* last semop() time */
30 __syscall_ulong_t __sem_ctime_high;33 __syscall_ulong_t __sem_ctime_high;
31 __time_t sem_ctime; /* last time changed by semctl() */34 __time_t sem_ctime; /* last time changed by semctl() */
32#else35# else
33 __time_t sem_otime; /* last semop() time */36 __time_t sem_otime; /* last semop() time */
34 __time_t sem_ctime; /* last time changed by semctl() */37 __time_t sem_ctime; /* last time changed by semctl() */
35#endif38# endif
36 __syscall_ulong_t sem_nsems; /* number of semaphores in set */39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
37 __syscall_ulong_t __glibc_reserved3;40 __syscall_ulong_t __glibc_reserved3;
38 __syscall_ulong_t __glibc_reserved4;41 __syscall_ulong_t __glibc_reserved4;
42#endif
39};43};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h+7-3
...@@ -23,8 +23,11 @@...@@ -23,8 +23,11 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 unsigned long int __shm_atime_high;31 unsigned long int __shm_atime_high;
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 unsigned long int __shm_dtime_high;33 unsigned long int __shm_dtime_high;
...@@ -32,15 +35,16 @@ struct shmid_ds...@@ -32,15 +35,16 @@ struct shmid_ds
32 unsigned long int __shm_ctime_high;35 unsigned long int __shm_ctime_high;
33 __time_t shm_ctime; /* time of last change by shmctl() */36 __time_t shm_ctime; /* time of last change by shmctl() */
34 unsigned long int __glibc_reserved4;37 unsigned long int __glibc_reserved4;
35#else38# else
36 __time_t shm_atime; /* time of last shmat() */39 __time_t shm_atime; /* time of last shmat() */
37 __time_t shm_dtime; /* time of last shmdt() */40 __time_t shm_dtime; /* time of last shmdt() */
38 __time_t shm_ctime; /* time of last change by shmctl() */41 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif42# endif
40 size_t shm_segsz; /* size of segment in bytes */43 size_t shm_segsz; /* size of segment in bytes */
41 __pid_t shm_cpid; /* pid of creator */44 __pid_t shm_cpid; /* pid of creator */
42 __pid_t shm_lpid; /* pid of last shmop */45 __pid_t shm_lpid; /* pid of last shmop */
43 shmatt_t shm_nattch; /* number of current attaches */46 shmatt_t shm_nattch; /* number of current attaches */
44 __syscall_ulong_t __glibc_reserved5;47 __syscall_ulong_t __glibc_reserved5;
45 __syscall_ulong_t __glibc_reserved6;48 __syscall_ulong_t __glibc_reserved6;
49#endif
46 };50 };
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h+10
...@@ -70,6 +70,8 @@ __BEGIN_DECLS...@@ -70,6 +70,8 @@ __BEGIN_DECLS
70# undef PTRACE_SYSCALL_INFO_ENTRY70# undef PTRACE_SYSCALL_INFO_ENTRY
71# undef PTRACE_SYSCALL_INFO_EXIT71# undef PTRACE_SYSCALL_INFO_EXIT
72# undef PTRACE_SYSCALL_INFO_SECCOMP72# undef PTRACE_SYSCALL_INFO_SECCOMP
73# undef PTRACE_SYSEMU
74# undef PTRACE_SYSEMU_SINGLESTEP
73# undef PTRACE_TRACEME75# undef PTRACE_TRACEME
74#endif76#endif
7577
...@@ -188,6 +190,14 @@ enum __ptrace_request...@@ -188,6 +190,14 @@ enum __ptrace_request
188 PTRACE_SETVSRREGS = 28,190 PTRACE_SETVSRREGS = 28,
189#define PT_SETVSRREGS PTRACE_SETVSRREGS191#define PT_SETVSRREGS PTRACE_SETVSRREGS
190192
193 /* Continue and stop at the next syscall, it will not be executed. */
194 PTRACE_SYSEMU = 29,
195#define PT_SYSEMU PTRACE_SYSEMU
196
197 /* Single step the process, the next syscall will not be executed. */
198 PTRACE_SYSEMU_SINGLESTEP = 30,
199#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
200
191 /* Execute process until next taken branch. */201 /* Execute process until next taken branch. */
192 PTRACE_SINGLEBLOCK = 256,202 PTRACE_SINGLEBLOCK = 256,
193#define PT_STEPBLOCK PTRACE_SINGLEBLOCK203#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/include/riscv64-linux-gnu/bits/statfs.h deleted-86
...@@ -1,86 +0,0 @@
1/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
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_STATFS_H
20# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
21#endif
22
23#include <bits/endian.h>
24#include <bits/types.h>
25#include <bits/wordsize.h>
26
27/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
28 statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
29 and accesses it via the statfs64() syscall. All the various
30 APIs offered by libc use the kernel shape for their struct statfs
31 structure; the only difference is that 32-bit programs not
32 using __USE_FILE_OFFSET64 only see the low 32 bits of some
33 of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
34
35#if defined __USE_FILE_OFFSET64
36# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
39#elif __BYTE_ORDER == __LITTLE_ENDIAN
40# define __field64(type, type64, name) \
41 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
42#else
43# define __field64(type, type64, name) \
44 int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
45#endif
46
47struct statfs
48 {
49 __SWORD_TYPE f_type;
50 __SWORD_TYPE f_bsize;
51 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
52 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
53 __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
54 __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
55 __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
56 __fsid_t f_fsid;
57 __SWORD_TYPE f_namelen;
58 __SWORD_TYPE f_frsize;
59 __SWORD_TYPE f_flags;
60 __SWORD_TYPE f_spare[4];
61 };
62
63#undef __field64
64
65#ifdef __USE_LARGEFILE64
66struct statfs64
67 {
68 __SWORD_TYPE f_type;
69 __SWORD_TYPE f_bsize;
70 __fsblkcnt64_t f_blocks;
71 __fsblkcnt64_t f_bfree;
72 __fsblkcnt64_t f_bavail;
73 __fsfilcnt64_t f_files;
74 __fsfilcnt64_t f_ffree;
75 __fsid_t f_fsid;
76 __SWORD_TYPE f_namelen;
77 __SWORD_TYPE f_frsize;
78 __SWORD_TYPE f_flags;
79 __SWORD_TYPE f_spare[4];
80 };
81#endif
82
83/* Tell code we have these members. */
84#define _STATFS_F_NAMELEN
85#define _STATFS_F_FRSIZE
86#define _STATFS_F_FLAGS
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/s390x-linux-gnu/bits/hwcap.h+3-1
...@@ -45,4 +45,6 @@...@@ -45,4 +45,6 @@
45#define HWCAP_S390_VXRS_EXT2 3276845#define HWCAP_S390_VXRS_EXT2 32768
46#define HWCAP_S390_VXRS_PDE 6553646#define HWCAP_S390_VXRS_PDE 65536
47#define HWCAP_S390_SORT 13107247#define HWCAP_S390_SORT 131072
48#define HWCAP_S390_DFLT 262144
\ No newline at end of file
48#define HWCAP_S390_DFLT 262144
49#define HWCAP_S390_VXRS_PDE2 524288
50#define HWCAP_S390_NNPA 1048576
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/struct_stat.h+32-24
...@@ -65,32 +65,35 @@ struct stat...@@ -65,32 +65,35 @@ struct stat
65#else65#else
66struct stat66struct stat
67 {67 {
68# ifdef __USE_TIME_BITS64
69# include <bits/struct_stat_time64_helper.h>
70# else
68 __dev_t st_dev; /* Device. */71 __dev_t st_dev; /* Device. */
69 unsigned int __pad1;72 unsigned int __pad1;
70# ifndef __USE_FILE_OFFSET6473# ifndef __USE_FILE_OFFSET64
71 __ino_t st_ino; /* File serial number. */74 __ino_t st_ino; /* File serial number. */
72# else75# else
73 __ino_t __st_ino; /* 32bit file serial number. */76 __ino_t __st_ino; /* 32bit file serial number. */
74# endif77# endif
75 __mode_t st_mode; /* File mode. */78 __mode_t st_mode; /* File mode. */
76 __nlink_t st_nlink; /* Link count. */79 __nlink_t st_nlink; /* Link count. */
77 __uid_t st_uid; /* User ID of the file's owner. */80 __uid_t st_uid; /* User ID of the file's owner. */
78 __gid_t st_gid; /* Group ID of the file's group.*/81 __gid_t st_gid; /* Group ID of the file's group.*/
79 __dev_t st_rdev; /* Device number, if device. */82 __dev_t st_rdev; /* Device number, if device. */
80 unsigned int __pad2;83 unsigned int __pad2;
81# ifndef __USE_FILE_OFFSET6484# ifndef __USE_FILE_OFFSET64
82 __off_t st_size; /* Size of file, in bytes. */85 __off_t st_size; /* Size of file, in bytes. */
83# else86# else
84 __off64_t st_size; /* Size of file, in bytes. */87 __off64_t st_size; /* Size of file, in bytes. */
85# endif88# endif
86 __blksize_t st_blksize; /* Optimal block size for I/O. */89 __blksize_t st_blksize; /* Optimal block size for I/O. */
8790
88# ifndef __USE_FILE_OFFSET6491# ifndef __USE_FILE_OFFSET64
89 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */92 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
90# else93# else
91 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */94 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
92# endif95# endif
93# ifdef __USE_XOPEN2K896# ifdef __USE_XOPEN2K8
94 /* Nanosecond resolution timestamps are stored in a format97 /* Nanosecond resolution timestamps are stored in a format
95 equivalent to 'struct timespec'. This is the type used98 equivalent to 'struct timespec'. This is the type used
96 whenever possible but the Unix namespace rules do not allow the99 whenever possible but the Unix namespace rules do not allow the
...@@ -100,25 +103,26 @@ struct stat...@@ -100,25 +103,26 @@ struct stat
100 struct timespec st_atim; /* Time of last access. */103 struct timespec st_atim; /* Time of last access. */
101 struct timespec st_mtim; /* Time of last modification. */104 struct timespec st_mtim; /* Time of last modification. */
102 struct timespec st_ctim; /* Time of last status change. */105 struct timespec st_ctim; /* Time of last status change. */
103# define st_atime st_atim.tv_sec /* Backward compatibility. */106# define st_atime st_atim.tv_sec /* Backward compatibility. */
104# define st_mtime st_mtim.tv_sec107# define st_mtime st_mtim.tv_sec
105# define st_ctime st_ctim.tv_sec108# define st_ctime st_ctim.tv_sec
106# else109# else
107 __time_t st_atime; /* Time of last access. */110 __time_t st_atime; /* Time of last access. */
108 unsigned long int st_atimensec; /* Nscecs of last access. */111 unsigned long int st_atimensec; /* Nscecs of last access. */
109 __time_t st_mtime; /* Time of last modification. */112 __time_t st_mtime; /* Time of last modification. */
110 unsigned long int st_mtimensec; /* Nsecs of last modification. */113 unsigned long int st_mtimensec; /* Nsecs of last modification. */
111 __time_t st_ctime; /* Time of last status change. */114 __time_t st_ctime; /* Time of last status change. */
112 unsigned long int st_ctimensec; /* Nsecs of last status change. */115 unsigned long int st_ctimensec; /* Nsecs of last status change. */
113# endif116# endif
114# ifndef __USE_FILE_OFFSET64117# ifndef __USE_FILE_OFFSET64
115 unsigned long int __glibc_reserved4;118 unsigned long int __glibc_reserved4;
116 unsigned long int __glibc_reserved5;119 unsigned long int __glibc_reserved5;
117# else120# else
118 __ino64_t st_ino; /* File serial number. */121 __ino64_t st_ino; /* File serial number. */
122# endif
119# endif123# endif
120 };124 };
121#endif125# endif
122126
123#ifdef __USE_LARGEFILE64127#ifdef __USE_LARGEFILE64
124# if __WORDSIZE == 64128# if __WORDSIZE == 64
...@@ -162,6 +166,9 @@ struct stat64...@@ -162,6 +166,9 @@ struct stat64
162# else166# else
163struct stat64167struct stat64
164 {168 {
169# ifdef __USE_TIME_BITS64
170# include <bits/struct_stat_time64_helper.h>
171# else
165 __dev_t st_dev; /* Device. */172 __dev_t st_dev; /* Device. */
166 unsigned int __pad1;173 unsigned int __pad1;
167174
...@@ -176,7 +183,7 @@ struct stat64...@@ -176,7 +183,7 @@ struct stat64
176 __blksize_t st_blksize; /* Optimal block size for I/O. */183 __blksize_t st_blksize; /* Optimal block size for I/O. */
177184
178 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */185 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
179# ifdef __USE_XOPEN2K8186# ifdef __USE_XOPEN2K8
180 /* Nanosecond resolution timestamps are stored in a format187 /* Nanosecond resolution timestamps are stored in a format
181 equivalent to 'struct timespec'. This is the type used188 equivalent to 'struct timespec'. This is the type used
182 whenever possible but the Unix namespace rules do not allow the189 whenever possible but the Unix namespace rules do not allow the
...@@ -186,18 +193,19 @@ struct stat64...@@ -186,18 +193,19 @@ struct stat64
186 struct timespec st_atim; /* Time of last access. */193 struct timespec st_atim; /* Time of last access. */
187 struct timespec st_mtim; /* Time of last modification. */194 struct timespec st_mtim; /* Time of last modification. */
188 struct timespec st_ctim; /* Time of last status change. */195 struct timespec st_ctim; /* Time of last status change. */
189# define st_atime st_atim.tv_sec /* Backward compatibility. */196# define st_atime st_atim.tv_sec /* Backward compatibility. */
190# define st_mtime st_mtim.tv_sec197# define st_mtime st_mtim.tv_sec
191# define st_ctime st_ctim.tv_sec198# define st_ctime st_ctim.tv_sec
192# else199# else
193 __time_t st_atime; /* Time of last access. */200 __time_t st_atime; /* Time of last access. */
194 unsigned long int st_atimensec; /* Nscecs of last access. */201 unsigned long int st_atimensec; /* Nscecs of last access. */
195 __time_t st_mtime; /* Time of last modification. */202 __time_t st_mtime; /* Time of last modification. */
196 unsigned long int st_mtimensec; /* Nsecs of last modification. */203 unsigned long int st_mtimensec; /* Nsecs of last modification. */
197 __time_t st_ctime; /* Time of last status change. */204 __time_t st_ctime; /* Time of last status change. */
198 unsigned long int st_ctimensec; /* Nsecs of last status change. */205 unsigned long int st_ctimensec; /* Nsecs of last status change. */
199# endif206# endif
200 __ino64_t st_ino; /* File serial number. */207 __ino64_t st_ino; /* File serial number. */
208# endif
201 };209 };
202# endif210# endif
203#endif211#endif
lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/s390x-linux-gnu/sys/ptrace.h+10
...@@ -39,6 +39,8 @@ __BEGIN_DECLS...@@ -39,6 +39,8 @@ __BEGIN_DECLS
39# undef PTRACE_ATTACH39# undef PTRACE_ATTACH
40# undef PTRACE_DETACH40# undef PTRACE_DETACH
41# undef PTRACE_SYSCALL41# undef PTRACE_SYSCALL
42# undef PTRACE_SYSEMU
43# undef PTRACE_SYSEMU_SINGLESTEP
42# undef PTRACE_SETOPTIONS44# undef PTRACE_SETOPTIONS
43# undef PTRACE_GETEVENTMSG45# undef PTRACE_GETEVENTMSG
44# undef PTRACE_GETSIGINFO46# undef PTRACE_GETSIGINFO
...@@ -146,6 +148,14 @@ enum __ptrace_request...@@ -146,6 +148,14 @@ enum __ptrace_request
146 PTRACE_SYSCALL = 24,148 PTRACE_SYSCALL = 24,
147#define PT_SYSCALL PTRACE_SYSCALL149#define PT_SYSCALL PTRACE_SYSCALL
148150
151 /* Continue and stop at the next syscall, it will not be executed. */
152 PTRACE_SYSEMU = 31,
153#define PT_SYSEMU PTRACE_SYSEMU
154
155 /* Single step the process, the next syscall will not be executed. */
156 PTRACE_SYSEMU_SINGLESTEP = 32,
157#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
158
149 /* Set ptrace filter options. */159 /* Set ptrace filter options. */
150 PTRACE_SETOPTIONS = 0x4200,160 PTRACE_SETOPTIONS = 0x4200,
151#define PT_SETOPTIONS PTRACE_SETOPTIONS161#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/sparc-linux-gnu/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. We are free to choose a reasonable value. */
81#define PTHREAD_STACK_MIN 24576
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* Minimum size for a thread. We are free to choose a reasonable value. */
20#define PTHREAD_STACK_MIN 24576
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 204832#define SO_RCVLOWAT 2048
33#define SO_RCVTIMEO 8192
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409635#define SO_SNDLOWAT 4096
37#define SO_SNDTIMEO 16384
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 8192
40# define SO_SNDTIMEO 16384
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 33
43# define SO_TIMESTAMPING 35
44#else
45# define SO_RCVTIMEO_OLD 8192
46# define SO_SNDTIMEO_OLD 16384
47# define SO_RCVTIMEO_NEW 68
48# define SO_SNDTIMEO_NEW 69
49
50# define SO_TIMESTAMP_OLD 0x001d
51# define SO_TIMESTAMPNS_OLD 0x0021
52# define SO_TIMESTAMPING_OLD 0x0023
53# define SO_TIMESTAMP_NEW 0x0046
54# define SO_TIMESTAMPNS_NEW 0x0042
55# define SO_TIMESTAMPING_NEW 0x0043
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h+9-3
...@@ -20,23 +20,28 @@...@@ -20,23 +20,28 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29 unsigned long int __msg_stime_high;34 unsigned long int __msg_stime_high;
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_rtime_high;36 unsigned long int __msg_rtime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_ctime_high;38 unsigned long int __msg_ctime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35#else40# else
36 __time_t msg_stime; /* time of last msgsnd command */41 __time_t msg_stime; /* time of last msgsnd command */
37 __time_t msg_rtime; /* time of last msgsnd command */42 __time_t msg_rtime; /* time of last msgsnd command */
38 __time_t msg_ctime; /* time of last change */43 __time_t msg_ctime; /* time of last change */
39#endif44# endif
40 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
41 msgqnum_t msg_qnum; /* number of messages currently on queue */46 msgqnum_t msg_qnum; /* number of messages currently on queue */
42 msglen_t msg_qbytes; /* max number of bytes allowed on queue */47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -44,4 +49,5 @@ struct msqid_ds...@@ -44,4 +49,5 @@ struct msqid_ds
44 __pid_t msg_lrpid; /* pid of last msgrcv() */49 __pid_t msg_lrpid; /* pid of last msgrcv() */
45 __syscall_ulong_t __glibc_reserved4;50 __syscall_ulong_t __glibc_reserved4;
46 __syscall_ulong_t __glibc_reserved5;51 __syscall_ulong_t __glibc_reserved5;
52#endif
47};53};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h+7-3
...@@ -23,17 +23,21 @@...@@ -23,17 +23,21 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
29 __time_t sem_otime; /* last semop() time */32 __time_t sem_otime; /* last semop() time */
30 __syscall_ulong_t __sem_ctime_high;33 __syscall_ulong_t __sem_ctime_high;
31 __time_t sem_ctime; /* last time changed by semctl() */34 __time_t sem_ctime; /* last time changed by semctl() */
32#else35# else
33 __time_t sem_otime; /* last semop() time */36 __time_t sem_otime; /* last semop() time */
34 __time_t sem_ctime; /* last time changed by semctl() */37 __time_t sem_ctime; /* last time changed by semctl() */
35#endif38# endif
36 __syscall_ulong_t sem_nsems; /* number of semaphores in set */39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
37 __syscall_ulong_t __glibc_reserved3;40 __syscall_ulong_t __glibc_reserved3;
38 __syscall_ulong_t __glibc_reserved4;41 __syscall_ulong_t __glibc_reserved4;
42#endif
39};43};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h+7-3
...@@ -23,23 +23,27 @@...@@ -23,23 +23,27 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 unsigned long int __shm_atime_high;31 unsigned long int __shm_atime_high;
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 unsigned long int __shm_dtime_high;33 unsigned long int __shm_dtime_high;
31 __time_t shm_dtime; /* time of last shmdt() */34 __time_t shm_dtime; /* time of last shmdt() */
32 unsigned long int __shm_ctime_high;35 unsigned long int __shm_ctime_high;
33 __time_t shm_ctime; /* time of last change by shmctl() */36 __time_t shm_ctime; /* time of last change by shmctl() */
34#else37# else
35 __time_t shm_atime; /* time of last shmat() */38 __time_t shm_atime; /* time of last shmat() */
36 __time_t shm_dtime; /* time of last shmdt() */39 __time_t shm_dtime; /* time of last shmdt() */
37 __time_t shm_ctime; /* time of last change by shmctl() */40 __time_t shm_ctime; /* time of last change by shmctl() */
38#endif41# endif
39 size_t shm_segsz; /* size of segment in bytes */42 size_t shm_segsz; /* size of segment in bytes */
40 __pid_t shm_cpid; /* pid of creator */43 __pid_t shm_cpid; /* pid of creator */
41 __pid_t shm_lpid; /* pid of last shmop */44 __pid_t shm_lpid; /* pid of last shmop */
42 shmatt_t shm_nattch; /* number of current attaches */45 shmatt_t shm_nattch; /* number of current attaches */
43 __syscall_ulong_t __glibc_reserved5;46 __syscall_ulong_t __glibc_reserved5;
44 __syscall_ulong_t __glibc_reserved6;47 __syscall_ulong_t __glibc_reserved6;
48#endif
45 };49 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h deleted-99
...@@ -1,99 +0,0 @@
1/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* The kernel header pollutes the namespace with the NR_OPEN symbol
20 and defines LINK_MAX although filesystems have different maxima. A
21 similar thing is true for OPEN_MAX: the limit can be changed at
22 runtime and therefore the macro must not be defined. Remove this
23 after including the header if necessary. */
24#ifndef NR_OPEN
25# define __undef_NR_OPEN
26#endif
27#ifndef LINK_MAX
28# define __undef_LINK_MAX
29#endif
30#ifndef OPEN_MAX
31# define __undef_OPEN_MAX
32#endif
33#ifndef ARG_MAX
34# define __undef_ARG_MAX
35#endif
36
37/* The kernel sources contain a file with all the needed information. */
38#include <linux/limits.h>
39
40/* Have to remove NR_OPEN? */
41#ifdef __undef_NR_OPEN
42# undef NR_OPEN
43# undef __undef_NR_OPEN
44#endif
45/* Have to remove LINK_MAX? */
46#ifdef __undef_LINK_MAX
47# undef LINK_MAX
48# undef __undef_LINK_MAX
49#endif
50/* Have to remove OPEN_MAX? */
51#ifdef __undef_OPEN_MAX
52# undef OPEN_MAX
53# undef __undef_OPEN_MAX
54#endif
55/* Have to remove ARG_MAX? */
56#ifdef __undef_ARG_MAX
57# undef ARG_MAX
58# undef __undef_ARG_MAX
59#endif
60
61/* The number of data keys per process. */
62#define _POSIX_THREAD_KEYS_MAX 128
63/* This is the value this implementation supports. */
64#define PTHREAD_KEYS_MAX 1024
65
66/* Controlling the iterations of destructors for thread-specific data. */
67#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
68/* Number of iterations this implementation does. */
69#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
70
71/* The number of threads per process. */
72#define _POSIX_THREAD_THREADS_MAX 64
73/* We have no predefined limit on the number of threads. */
74#undef PTHREAD_THREADS_MAX
75
76/* Maximum amount by which a process can descrease its asynchronous I/O
77 priority level. */
78#define AIO_PRIO_DELTA_MAX 20
79
80/* Minimum size for a thread. We are free to choose a reasonable value. */
81#define PTHREAD_STACK_MIN 24576
82
83/* Maximum number of timer expiration overruns. */
84#define DELAYTIMER_MAX 2147483647
85
86/* Maximum tty name length. */
87#define TTY_NAME_MAX 32
88
89/* Maximum login name length. This is arbitrary. */
90#define LOGIN_NAME_MAX 256
91
92/* Maximum host name length. */
93#define HOST_NAME_MAX 64
94
95/* Maximum message queue priority level. */
96#define MQ_PRIO_MAX 32768
97
98/* Maximum value the semaphore can have. */
99#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/pthread_stack_min.h created+20
...@@ -0,0 +1,20 @@
1/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
2 Copyright (C) 2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If
17 not, see <https://www.gnu.org/licenses/>. */
18
19/* Minimum size for a thread. We are free to choose a reasonable value. */
20#define PTHREAD_STACK_MIN 24576
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h+35-3
...@@ -30,9 +30,41 @@...@@ -30,9 +30,41 @@
30#define SO_OOBINLINE 25630#define SO_OOBINLINE 256
31#define SO_RCVBUF 409831#define SO_RCVBUF 4098
32#define SO_RCVLOWAT 204832#define SO_RCVLOWAT 2048
33#define SO_RCVTIMEO 8192
34#define SO_REUSEADDR 433#define SO_REUSEADDR 4
35#define SO_SNDBUF 409734#define SO_SNDBUF 4097
36#define SO_SNDLOWAT 409635#define SO_SNDLOWAT 4096
37#define SO_SNDTIMEO 16384
38#define SO_TYPE 4104
\ No newline at end of file
36#define SO_TYPE 4104
37
38#if __TIMESIZE == 64
39# define SO_RCVTIMEO 8192
40# define SO_SNDTIMEO 16384
41# define SO_TIMESTAMP 29
42# define SO_TIMESTAMPNS 33
43# define SO_TIMESTAMPING 35
44#else
45# define SO_RCVTIMEO_OLD 8192
46# define SO_SNDTIMEO_OLD 16384
47# define SO_RCVTIMEO_NEW 68
48# define SO_SNDTIMEO_NEW 69
49
50# define SO_TIMESTAMP_OLD 0x001d
51# define SO_TIMESTAMPNS_OLD 0x0021
52# define SO_TIMESTAMPING_OLD 0x0023
53# define SO_TIMESTAMP_NEW 0x0046
54# define SO_TIMESTAMPNS_NEW 0x0042
55# define SO_TIMESTAMPING_NEW 0x0043
56
57# ifdef __USE_TIME_BITS64
58# define SO_RCVTIMEO SO_RCVTIMEO_NEW
59# define SO_SNDTIMEO SO_SNDTIMEO_NEW
60# define SO_TIMESTAMP SO_TIMESTAMP_NEW
61# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
62# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
63# else
64# define SO_RCVTIMEO SO_RCVTIMEO_OLD
65# define SO_SNDTIMEO SO_SNDTIMEO_OLD
66# define SO_TIMESTAMP SO_TIMESTAMP_OLD
67# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
68# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
69# endif
70#endif
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h+9-3
...@@ -20,23 +20,28 @@...@@ -20,23 +20,28 @@
20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."20# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
21#endif21#endif
2222
23#include <bits/types/time_t.h>
24
23/* Structure of record for one message inside the kernel.25/* Structure of record for one message inside the kernel.
24 The type `struct msg' is opaque. */26 The type `struct msg' is opaque. */
25struct msqid_ds27struct msqid_ds
26{28{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
27 struct ipc_perm msg_perm; /* structure describing operation permission */32 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 3233# if __TIMESIZE == 32
29 unsigned long int __msg_stime_high;34 unsigned long int __msg_stime_high;
30 __time_t msg_stime; /* time of last msgsnd command */35 __time_t msg_stime; /* time of last msgsnd command */
31 unsigned long int __msg_rtime_high;36 unsigned long int __msg_rtime_high;
32 __time_t msg_rtime; /* time of last msgsnd command */37 __time_t msg_rtime; /* time of last msgsnd command */
33 unsigned long int __msg_ctime_high;38 unsigned long int __msg_ctime_high;
34 __time_t msg_ctime; /* time of last change */39 __time_t msg_ctime; /* time of last change */
35#else40# else
36 __time_t msg_stime; /* time of last msgsnd command */41 __time_t msg_stime; /* time of last msgsnd command */
37 __time_t msg_rtime; /* time of last msgsnd command */42 __time_t msg_rtime; /* time of last msgsnd command */
38 __time_t msg_ctime; /* time of last change */43 __time_t msg_ctime; /* time of last change */
39#endif44# endif
40 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */45 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
41 msgqnum_t msg_qnum; /* number of messages currently on queue */46 msgqnum_t msg_qnum; /* number of messages currently on queue */
42 msglen_t msg_qbytes; /* max number of bytes allowed on queue */47 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
...@@ -44,4 +49,5 @@ struct msqid_ds...@@ -44,4 +49,5 @@ struct msqid_ds
44 __pid_t msg_lrpid; /* pid of last msgrcv() */49 __pid_t msg_lrpid; /* pid of last msgrcv() */
45 __syscall_ulong_t __glibc_reserved4;50 __syscall_ulong_t __glibc_reserved4;
46 __syscall_ulong_t __glibc_reserved5;51 __syscall_ulong_t __glibc_reserved5;
52#endif
47};53};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h+7-3
...@@ -23,17 +23,21 @@...@@ -23,17 +23,21 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
29 __time_t sem_otime; /* last semop() time */32 __time_t sem_otime; /* last semop() time */
30 __syscall_ulong_t __sem_ctime_high;33 __syscall_ulong_t __sem_ctime_high;
31 __time_t sem_ctime; /* last time changed by semctl() */34 __time_t sem_ctime; /* last time changed by semctl() */
32#else35# else
33 __time_t sem_otime; /* last semop() time */36 __time_t sem_otime; /* last semop() time */
34 __time_t sem_ctime; /* last time changed by semctl() */37 __time_t sem_ctime; /* last time changed by semctl() */
35#endif38# endif
36 __syscall_ulong_t sem_nsems; /* number of semaphores in set */39 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
37 __syscall_ulong_t __glibc_reserved3;40 __syscall_ulong_t __glibc_reserved3;
38 __syscall_ulong_t __glibc_reserved4;41 __syscall_ulong_t __glibc_reserved4;
42#endif
39};43};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h+7-3
...@@ -23,23 +23,27 @@...@@ -23,23 +23,27 @@
23/* Data structure describing a shared memory segment. */23/* Data structure describing a shared memory segment. */
24struct shmid_ds24struct shmid_ds
25 {25 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
26 struct ipc_perm shm_perm; /* operation permission struct */29 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 3230# if __TIMESIZE == 32
28 unsigned long int __shm_atime_high;31 unsigned long int __shm_atime_high;
29 __time_t shm_atime; /* time of last shmat() */32 __time_t shm_atime; /* time of last shmat() */
30 unsigned long int __shm_dtime_high;33 unsigned long int __shm_dtime_high;
31 __time_t shm_dtime; /* time of last shmdt() */34 __time_t shm_dtime; /* time of last shmdt() */
32 unsigned long int __shm_ctime_high;35 unsigned long int __shm_ctime_high;
33 __time_t shm_ctime; /* time of last change by shmctl() */36 __time_t shm_ctime; /* time of last change by shmctl() */
34#else37# else
35 __time_t shm_atime; /* time of last shmat() */38 __time_t shm_atime; /* time of last shmat() */
36 __time_t shm_dtime; /* time of last shmdt() */39 __time_t shm_dtime; /* time of last shmdt() */
37 __time_t shm_ctime; /* time of last change by shmctl() */40 __time_t shm_ctime; /* time of last change by shmctl() */
38#endif41# endif
39 size_t shm_segsz; /* size of segment in bytes */42 size_t shm_segsz; /* size of segment in bytes */
40 __pid_t shm_cpid; /* pid of creator */43 __pid_t shm_cpid; /* pid of creator */
41 __pid_t shm_lpid; /* pid of last shmop */44 __pid_t shm_lpid; /* pid of last shmop */
42 shmatt_t shm_nattch; /* number of current attaches */45 shmatt_t shm_nattch; /* number of current attaches */
43 __syscall_ulong_t __glibc_reserved5;46 __syscall_ulong_t __glibc_reserved5;
44 __syscall_ulong_t __glibc_reserved6;47 __syscall_ulong_t __glibc_reserved6;
48#endif
45 };49 };
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h+49-41
...@@ -25,43 +25,46 @@...@@ -25,43 +25,46 @@
2525
26struct stat26struct stat
27 {27 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
28 __dev_t st_dev; /* Device. */31 __dev_t st_dev; /* Device. */
29#ifndef __x86_64__32# ifndef __x86_64__
30 unsigned short int __pad1;33 unsigned short int __pad1;
31#endif34# endif
32#if defined __x86_64__ || !defined __USE_FILE_OFFSET6435# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
33 __ino_t st_ino; /* File serial number. */36 __ino_t st_ino; /* File serial number. */
34#else37# else
35 __ino_t __st_ino; /* 32bit file serial number. */38 __ino_t __st_ino; /* 32bit file serial number. */
36#endif39# endif
37#ifndef __x86_64__40# ifndef __x86_64__
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40#else43# else
41 __nlink_t st_nlink; /* Link count. */44 __nlink_t st_nlink; /* Link count. */
42 __mode_t st_mode; /* File mode. */45 __mode_t st_mode; /* File mode. */
43#endif46# endif
44 __uid_t st_uid; /* User ID of the file's owner. */47 __uid_t st_uid; /* User ID of the file's owner. */
45 __gid_t st_gid; /* Group ID of the file's group.*/48 __gid_t st_gid; /* Group ID of the file's group.*/
46#ifdef __x86_64__49# ifdef __x86_64__
47 int __pad0;50 int __pad0;
48#endif51# endif
49 __dev_t st_rdev; /* Device number, if device. */52 __dev_t st_rdev; /* Device number, if device. */
50#ifndef __x86_64__53# ifndef __x86_64__
51 unsigned short int __pad2;54 unsigned short int __pad2;
52#endif55# endif
53#if defined __x86_64__ || !defined __USE_FILE_OFFSET6456# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
54 __off_t st_size; /* Size of file, in bytes. */57 __off_t st_size; /* Size of file, in bytes. */
55#else58# else
56 __off64_t st_size; /* Size of file, in bytes. */59 __off64_t st_size; /* Size of file, in bytes. */
57#endif60# endif
58 __blksize_t st_blksize; /* Optimal block size for I/O. */61 __blksize_t st_blksize; /* Optimal block size for I/O. */
59#if defined __x86_64__ || !defined __USE_FILE_OFFSET6462# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
60 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */63 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else64# else
62 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */65 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63#endif66# endif
64#ifdef __USE_XOPEN2K867# ifdef __USE_XOPEN2K8
65 /* Nanosecond resolution timestamps are stored in a format68 /* Nanosecond resolution timestamps are stored in a format
66 equivalent to 'struct timespec'. This is the type used69 equivalent to 'struct timespec'. This is the type used
67 whenever possible but the Unix namespace rules do not allow the70 whenever possible but the Unix namespace rules do not allow the
...@@ -71,58 +74,62 @@ struct stat...@@ -71,58 +74,62 @@ struct stat
71 struct timespec st_atim; /* Time of last access. */74 struct timespec st_atim; /* Time of last access. */
72 struct timespec st_mtim; /* Time of last modification. */75 struct timespec st_mtim; /* Time of last modification. */
73 struct timespec st_ctim; /* Time of last status change. */76 struct timespec st_ctim; /* Time of last status change. */
74# define st_atime st_atim.tv_sec /* Backward compatibility. */77# define st_atime st_atim.tv_sec /* Backward compatibility. */
75# define st_mtime st_mtim.tv_sec78# define st_mtime st_mtim.tv_sec
76# define st_ctime st_ctim.tv_sec79# define st_ctime st_ctim.tv_sec
77#else80# else
78 __time_t st_atime; /* Time of last access. */81 __time_t st_atime; /* Time of last access. */
79 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */82 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
80 __time_t st_mtime; /* Time of last modification. */83 __time_t st_mtime; /* Time of last modification. */
81 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */84 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
82 __time_t st_ctime; /* Time of last status change. */85 __time_t st_ctime; /* Time of last status change. */
83 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */86 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
84#endif87# endif
85#ifdef __x86_64__88# ifdef __x86_64__
86 __syscall_slong_t __glibc_reserved[3];89 __syscall_slong_t __glibc_reserved[3];
87#else90# else
88# ifndef __USE_FILE_OFFSET6491# ifndef __USE_FILE_OFFSET64
89 unsigned long int __glibc_reserved4;92 unsigned long int __glibc_reserved4;
90 unsigned long int __glibc_reserved5;93 unsigned long int __glibc_reserved5;
91# else94# else
92 __ino64_t st_ino; /* File serial number. */95 __ino64_t st_ino; /* File serial number. */
96# endif
93# endif97# endif
94#endif98#endif /* __USE_TIME_BITS64 */
95 };99 };
96100
97#ifdef __USE_LARGEFILE64101#ifdef __USE_LARGEFILE64
98/* Note stat64 has the same shape as stat for x86-64. */102/* Note stat64 has the same shape as stat for x86-64. */
99struct stat64103struct stat64
100 {104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
101 __dev_t st_dev; /* Device. */108 __dev_t st_dev; /* Device. */
102# ifdef __x86_64__109# ifdef __x86_64__
103 __ino64_t st_ino; /* File serial number. */110 __ino64_t st_ino; /* File serial number. */
104 __nlink_t st_nlink; /* Link count. */111 __nlink_t st_nlink; /* Link count. */
105 __mode_t st_mode; /* File mode. */112 __mode_t st_mode; /* File mode. */
106# else113# else
107 unsigned int __pad1;114 unsigned int __pad1;
108 __ino_t __st_ino; /* 32bit file serial number. */115 __ino_t __st_ino; /* 32bit file serial number. */
109 __mode_t st_mode; /* File mode. */116 __mode_t st_mode; /* File mode. */
110 __nlink_t st_nlink; /* Link count. */117 __nlink_t st_nlink; /* Link count. */
111# endif118# endif
112 __uid_t st_uid; /* User ID of the file's owner. */119 __uid_t st_uid; /* User ID of the file's owner. */
113 __gid_t st_gid; /* Group ID of the file's group.*/120 __gid_t st_gid; /* Group ID of the file's group.*/
114# ifdef __x86_64__121# ifdef __x86_64__
115 int __pad0;122 int __pad0;
116 __dev_t st_rdev; /* Device number, if device. */123 __dev_t st_rdev; /* Device number, if device. */
117 __off_t st_size; /* Size of file, in bytes. */124 __off_t st_size; /* Size of file, in bytes. */
118# else125# else
119 __dev_t st_rdev; /* Device number, if device. */126 __dev_t st_rdev; /* Device number, if device. */
120 unsigned int __pad2;127 unsigned int __pad2;
121 __off64_t st_size; /* Size of file, in bytes. */128 __off64_t st_size; /* Size of file, in bytes. */
122# endif129# endif
123 __blksize_t st_blksize; /* Optimal block size for I/O. */130 __blksize_t st_blksize; /* Optimal block size for I/O. */
124 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
125# ifdef __USE_XOPEN2K8132# ifdef __USE_XOPEN2K8
126 /* Nanosecond resolution timestamps are stored in a format133 /* Nanosecond resolution timestamps are stored in a format
127 equivalent to 'struct timespec'. This is the type used134 equivalent to 'struct timespec'. This is the type used
128 whenever possible but the Unix namespace rules do not allow the135 whenever possible but the Unix namespace rules do not allow the
...@@ -132,19 +139,20 @@ struct stat64...@@ -132,19 +139,20 @@ struct stat64
132 struct timespec st_atim; /* Time of last access. */139 struct timespec st_atim; /* Time of last access. */
133 struct timespec st_mtim; /* Time of last modification. */140 struct timespec st_mtim; /* Time of last modification. */
134 struct timespec st_ctim; /* Time of last status change. */141 struct timespec st_ctim; /* Time of last status change. */
135# else142# else
136 __time_t st_atime; /* Time of last access. */143 __time_t st_atime; /* Time of last access. */
137 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
138 __time_t st_mtime; /* Time of last modification. */145 __time_t st_mtime; /* Time of last modification. */
139 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
140 __time_t st_ctime; /* Time of last status change. */147 __time_t st_ctime; /* Time of last status change. */
141 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
142# endif149# endif
143# ifdef __x86_64__150# ifdef __x86_64__
144 __syscall_slong_t __glibc_reserved[3];151 __syscall_slong_t __glibc_reserved[3];
145# else152# else
146 __ino64_t st_ino; /* File serial number. */153 __ino64_t st_ino; /* File serial number. */
147# endif154# endif
155# endif /* __USE_TIME_BITS64 */
148 };156 };
149#endif157#endif
150158
lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h+4
...@@ -23,6 +23,9 @@...@@ -23,6 +23,9 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
...@@ -31,4 +34,5 @@ struct semid_ds...@@ -31,4 +34,5 @@ struct semid_ds
31 __syscall_ulong_t sem_nsems; /* number of semaphores in set */34 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
32 __syscall_ulong_t __glibc_reserved3;35 __syscall_ulong_t __glibc_reserved3;
33 __syscall_ulong_t __glibc_reserved4;36 __syscall_ulong_t __glibc_reserved4;
37#endif
34};38};
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h+49-41
...@@ -25,43 +25,46 @@...@@ -25,43 +25,46 @@
2525
26struct stat26struct stat
27 {27 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
28 __dev_t st_dev; /* Device. */31 __dev_t st_dev; /* Device. */
29#ifndef __x86_64__32# ifndef __x86_64__
30 unsigned short int __pad1;33 unsigned short int __pad1;
31#endif34# endif
32#if defined __x86_64__ || !defined __USE_FILE_OFFSET6435# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
33 __ino_t st_ino; /* File serial number. */36 __ino_t st_ino; /* File serial number. */
34#else37# else
35 __ino_t __st_ino; /* 32bit file serial number. */38 __ino_t __st_ino; /* 32bit file serial number. */
36#endif39# endif
37#ifndef __x86_64__40# ifndef __x86_64__
38 __mode_t st_mode; /* File mode. */41 __mode_t st_mode; /* File mode. */
39 __nlink_t st_nlink; /* Link count. */42 __nlink_t st_nlink; /* Link count. */
40#else43# else
41 __nlink_t st_nlink; /* Link count. */44 __nlink_t st_nlink; /* Link count. */
42 __mode_t st_mode; /* File mode. */45 __mode_t st_mode; /* File mode. */
43#endif46# endif
44 __uid_t st_uid; /* User ID of the file's owner. */47 __uid_t st_uid; /* User ID of the file's owner. */
45 __gid_t st_gid; /* Group ID of the file's group.*/48 __gid_t st_gid; /* Group ID of the file's group.*/
46#ifdef __x86_64__49# ifdef __x86_64__
47 int __pad0;50 int __pad0;
48#endif51# endif
49 __dev_t st_rdev; /* Device number, if device. */52 __dev_t st_rdev; /* Device number, if device. */
50#ifndef __x86_64__53# ifndef __x86_64__
51 unsigned short int __pad2;54 unsigned short int __pad2;
52#endif55# endif
53#if defined __x86_64__ || !defined __USE_FILE_OFFSET6456# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
54 __off_t st_size; /* Size of file, in bytes. */57 __off_t st_size; /* Size of file, in bytes. */
55#else58# else
56 __off64_t st_size; /* Size of file, in bytes. */59 __off64_t st_size; /* Size of file, in bytes. */
57#endif60# endif
58 __blksize_t st_blksize; /* Optimal block size for I/O. */61 __blksize_t st_blksize; /* Optimal block size for I/O. */
59#if defined __x86_64__ || !defined __USE_FILE_OFFSET6462# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
60 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */63 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else64# else
62 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */65 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63#endif66# endif
64#ifdef __USE_XOPEN2K867# ifdef __USE_XOPEN2K8
65 /* Nanosecond resolution timestamps are stored in a format68 /* Nanosecond resolution timestamps are stored in a format
66 equivalent to 'struct timespec'. This is the type used69 equivalent to 'struct timespec'. This is the type used
67 whenever possible but the Unix namespace rules do not allow the70 whenever possible but the Unix namespace rules do not allow the
...@@ -71,58 +74,62 @@ struct stat...@@ -71,58 +74,62 @@ struct stat
71 struct timespec st_atim; /* Time of last access. */74 struct timespec st_atim; /* Time of last access. */
72 struct timespec st_mtim; /* Time of last modification. */75 struct timespec st_mtim; /* Time of last modification. */
73 struct timespec st_ctim; /* Time of last status change. */76 struct timespec st_ctim; /* Time of last status change. */
74# define st_atime st_atim.tv_sec /* Backward compatibility. */77# define st_atime st_atim.tv_sec /* Backward compatibility. */
75# define st_mtime st_mtim.tv_sec78# define st_mtime st_mtim.tv_sec
76# define st_ctime st_ctim.tv_sec79# define st_ctime st_ctim.tv_sec
77#else80# else
78 __time_t st_atime; /* Time of last access. */81 __time_t st_atime; /* Time of last access. */
79 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */82 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
80 __time_t st_mtime; /* Time of last modification. */83 __time_t st_mtime; /* Time of last modification. */
81 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */84 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
82 __time_t st_ctime; /* Time of last status change. */85 __time_t st_ctime; /* Time of last status change. */
83 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */86 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
84#endif87# endif
85#ifdef __x86_64__88# ifdef __x86_64__
86 __syscall_slong_t __glibc_reserved[3];89 __syscall_slong_t __glibc_reserved[3];
87#else90# else
88# ifndef __USE_FILE_OFFSET6491# ifndef __USE_FILE_OFFSET64
89 unsigned long int __glibc_reserved4;92 unsigned long int __glibc_reserved4;
90 unsigned long int __glibc_reserved5;93 unsigned long int __glibc_reserved5;
91# else94# else
92 __ino64_t st_ino; /* File serial number. */95 __ino64_t st_ino; /* File serial number. */
96# endif
93# endif97# endif
94#endif98#endif /* __USE_TIME_BITS64 */
95 };99 };
96100
97#ifdef __USE_LARGEFILE64101#ifdef __USE_LARGEFILE64
98/* Note stat64 has the same shape as stat for x86-64. */102/* Note stat64 has the same shape as stat for x86-64. */
99struct stat64103struct stat64
100 {104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
101 __dev_t st_dev; /* Device. */108 __dev_t st_dev; /* Device. */
102# ifdef __x86_64__109# ifdef __x86_64__
103 __ino64_t st_ino; /* File serial number. */110 __ino64_t st_ino; /* File serial number. */
104 __nlink_t st_nlink; /* Link count. */111 __nlink_t st_nlink; /* Link count. */
105 __mode_t st_mode; /* File mode. */112 __mode_t st_mode; /* File mode. */
106# else113# else
107 unsigned int __pad1;114 unsigned int __pad1;
108 __ino_t __st_ino; /* 32bit file serial number. */115 __ino_t __st_ino; /* 32bit file serial number. */
109 __mode_t st_mode; /* File mode. */116 __mode_t st_mode; /* File mode. */
110 __nlink_t st_nlink; /* Link count. */117 __nlink_t st_nlink; /* Link count. */
111# endif118# endif
112 __uid_t st_uid; /* User ID of the file's owner. */119 __uid_t st_uid; /* User ID of the file's owner. */
113 __gid_t st_gid; /* Group ID of the file's group.*/120 __gid_t st_gid; /* Group ID of the file's group.*/
114# ifdef __x86_64__121# ifdef __x86_64__
115 int __pad0;122 int __pad0;
116 __dev_t st_rdev; /* Device number, if device. */123 __dev_t st_rdev; /* Device number, if device. */
117 __off_t st_size; /* Size of file, in bytes. */124 __off_t st_size; /* Size of file, in bytes. */
118# else125# else
119 __dev_t st_rdev; /* Device number, if device. */126 __dev_t st_rdev; /* Device number, if device. */
120 unsigned int __pad2;127 unsigned int __pad2;
121 __off64_t st_size; /* Size of file, in bytes. */128 __off64_t st_size; /* Size of file, in bytes. */
122# endif129# endif
123 __blksize_t st_blksize; /* Optimal block size for I/O. */130 __blksize_t st_blksize; /* Optimal block size for I/O. */
124 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
125# ifdef __USE_XOPEN2K8132# ifdef __USE_XOPEN2K8
126 /* Nanosecond resolution timestamps are stored in a format133 /* Nanosecond resolution timestamps are stored in a format
127 equivalent to 'struct timespec'. This is the type used134 equivalent to 'struct timespec'. This is the type used
128 whenever possible but the Unix namespace rules do not allow the135 whenever possible but the Unix namespace rules do not allow the
...@@ -132,19 +139,20 @@ struct stat64...@@ -132,19 +139,20 @@ struct stat64
132 struct timespec st_atim; /* Time of last access. */139 struct timespec st_atim; /* Time of last access. */
133 struct timespec st_mtim; /* Time of last modification. */140 struct timespec st_mtim; /* Time of last modification. */
134 struct timespec st_ctim; /* Time of last status change. */141 struct timespec st_ctim; /* Time of last status change. */
135# else142# else
136 __time_t st_atime; /* Time of last access. */143 __time_t st_atime; /* Time of last access. */
137 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
138 __time_t st_mtime; /* Time of last modification. */145 __time_t st_mtime; /* Time of last modification. */
139 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
140 __time_t st_ctime; /* Time of last status change. */147 __time_t st_ctime; /* Time of last status change. */
141 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
142# endif149# endif
143# ifdef __x86_64__150# ifdef __x86_64__
144 __syscall_slong_t __glibc_reserved[3];151 __syscall_slong_t __glibc_reserved[3];
145# else152# else
146 __ino64_t st_ino; /* File serial number. */153 __ino64_t st_ino; /* File serial number. */
147# endif154# endif
155# endif /* __USE_TIME_BITS64 */
148 };156 };
149#endif157#endif
150158
lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h+4
...@@ -23,6 +23,9 @@...@@ -23,6 +23,9 @@
23/* Data structure describing a set of semaphores. */23/* Data structure describing a set of semaphores. */
24struct semid_ds24struct semid_ds
25{25{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
26 struct ipc_perm sem_perm; /* operation permission struct */29 struct ipc_perm sem_perm; /* operation permission struct */
27 __time_t sem_otime; /* last semop() time */30 __time_t sem_otime; /* last semop() time */
28 __syscall_ulong_t __sem_otime_high;31 __syscall_ulong_t __sem_otime_high;
...@@ -31,4 +34,5 @@ struct semid_ds...@@ -31,4 +34,5 @@ struct semid_ds
31 __syscall_ulong_t sem_nsems; /* number of semaphores in set */34 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
32 __syscall_ulong_t __glibc_reserved3;35 __syscall_ulong_t __glibc_reserved3;
33 __syscall_ulong_t __glibc_reserved4;36 __syscall_ulong_t __glibc_reserved4;
37#endif
34};38};
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8#define LIBANL_SO "libanl.so.1"8#define LIBANL_SO "libanl.so.1"
9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"9#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
10#define LIBCRYPT_SO "libcrypt.so.1"10#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
11#define LIBC_SO "libc.so.6"12#define LIBC_SO "libc.so.6"
12#define LIBDL_SO "libdl.so.2"13#define LIBDL_SO "libdl.so.2"
13#define LIBGCC_S_SO "libgcc_s.so.1"14#define LIBGCC_S_SO "libgcc_s.so.1"