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 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/aarch64-linux-gnu/sys/ptrace.h+50
......@@ -25,6 +25,40 @@
2525
2626__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
2862/* Type of the REQUEST argument to `ptrace.' */
2963enum __ptrace_request
3064{
......@@ -82,6 +116,22 @@ enum __ptrace_request
82116 PTRACE_SYSCALL = 24,
83117#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
85135 /* Set ptrace filter options. */
86136 PTRACE_SETOPTIONS = 0x4200,
87137#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 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h+50
......@@ -25,6 +25,40 @@
2525
2626__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
2862/* Type of the REQUEST argument to `ptrace.' */
2963enum __ptrace_request
3064{
......@@ -82,6 +116,22 @@ enum __ptrace_request
82116 PTRACE_SYSCALL = 24,
83117#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
85135 /* Set ptrace filter options. */
86136 PTRACE_SETOPTIONS = 0x4200,
87137#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h+29-21
......@@ -28,32 +28,35 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
3134 __dev_t st_dev; /* Device. */
3235 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET64
36# ifndef __USE_FILE_OFFSET64
3437 __ino_t st_ino; /* File serial number. */
35#else
38# else
3639 __ino_t __st_ino; /* 32bit file serial number. */
37#endif
40# endif
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
4043 __uid_t st_uid; /* User ID of the file's owner. */
4144 __gid_t st_gid; /* Group ID of the file's group.*/
4245 __dev_t st_rdev; /* Device number, if device. */
4346 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4548 __off_t st_size; /* Size of file, in bytes. */
46#else
49# else
4750 __off64_t st_size; /* Size of file, in bytes. */
48#endif
51# endif
4952 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5255 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else
56# else
5457 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif
56#ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5760 /* Nanosecond resolution timestamps are stored in a format
5861 equivalent to 'struct timespec'. This is the type used
5962 whenever possible but the Unix namespace rules do not allow the
......@@ -63,28 +66,32 @@ struct stat
6366 struct timespec st_atim; /* Time of last access. */
6467 struct timespec st_mtim; /* Time of last modification. */
6568 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69#else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7073 __time_t st_atime; /* Time of last access. */
7174 unsigned long int st_atimensec; /* Nscecs of last access. */
7275 __time_t st_mtime; /* Time of last modification. */
7376 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7477 __time_t st_ctime; /* Time of last status change. */
7578 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif
77#ifndef __USE_FILE_OFFSET64
79# endif
80# ifndef __USE_FILE_OFFSET64
7881 unsigned long int __glibc_reserved4;
7982 unsigned long int __glibc_reserved5;
80#else
83# else
8184 __ino64_t st_ino; /* File serial number. */
82#endif
85# endif
86#endif /* __USE_TIME_BITS64 */
8387 };
8488
8589#ifdef __USE_LARGEFILE64
8690struct stat64
8791 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
8895 __dev_t st_dev; /* Device. */
8996 unsigned int __pad1;
9097
......@@ -99,7 +106,7 @@ struct stat64
99106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8
109# ifdef __USE_XOPEN2K8
103110 /* Nanosecond resolution timestamps are stored in a format
104111 equivalent to 'struct timespec'. This is the type used
105112 whenever possible but the Unix namespace rules do not allow the
......@@ -109,15 +116,16 @@ struct stat64
109116 struct timespec st_atim; /* Time of last access. */
110117 struct timespec st_mtim; /* Time of last modification. */
111118 struct timespec st_ctim; /* Time of last status change. */
112# else
119# else
113120 __time_t st_atime; /* Time of last access. */
114121 unsigned long int st_atimensec; /* Nscecs of last access. */
115122 __time_t st_mtime; /* Time of last modification. */
116123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117124 __time_t st_ctime; /* Time of last status change. */
118125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif
126# endif
120127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121129 };
122130#endif
123131
lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h+29-21
......@@ -28,32 +28,35 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
3134 __dev_t st_dev; /* Device. */
3235 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET64
36# ifndef __USE_FILE_OFFSET64
3437 __ino_t st_ino; /* File serial number. */
35#else
38# else
3639 __ino_t __st_ino; /* 32bit file serial number. */
37#endif
40# endif
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
4043 __uid_t st_uid; /* User ID of the file's owner. */
4144 __gid_t st_gid; /* Group ID of the file's group.*/
4245 __dev_t st_rdev; /* Device number, if device. */
4346 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4548 __off_t st_size; /* Size of file, in bytes. */
46#else
49# else
4750 __off64_t st_size; /* Size of file, in bytes. */
48#endif
51# endif
4952 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5255 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else
56# else
5457 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif
56#ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5760 /* Nanosecond resolution timestamps are stored in a format
5861 equivalent to 'struct timespec'. This is the type used
5962 whenever possible but the Unix namespace rules do not allow the
......@@ -63,28 +66,32 @@ struct stat
6366 struct timespec st_atim; /* Time of last access. */
6467 struct timespec st_mtim; /* Time of last modification. */
6568 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69#else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7073 __time_t st_atime; /* Time of last access. */
7174 unsigned long int st_atimensec; /* Nscecs of last access. */
7275 __time_t st_mtime; /* Time of last modification. */
7376 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7477 __time_t st_ctime; /* Time of last status change. */
7578 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif
77#ifndef __USE_FILE_OFFSET64
79# endif
80# ifndef __USE_FILE_OFFSET64
7881 unsigned long int __glibc_reserved4;
7982 unsigned long int __glibc_reserved5;
80#else
83# else
8184 __ino64_t st_ino; /* File serial number. */
82#endif
85# endif
86#endif /* __USE_TIME_BITS64 */
8387 };
8488
8589#ifdef __USE_LARGEFILE64
8690struct stat64
8791 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
8895 __dev_t st_dev; /* Device. */
8996 unsigned int __pad1;
9097
......@@ -99,7 +106,7 @@ struct stat64
99106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8
109# ifdef __USE_XOPEN2K8
103110 /* Nanosecond resolution timestamps are stored in a format
104111 equivalent to 'struct timespec'. This is the type used
105112 whenever possible but the Unix namespace rules do not allow the
......@@ -109,15 +116,16 @@ struct stat64
109116 struct timespec st_atim; /* Time of last access. */
110117 struct timespec st_mtim; /* Time of last modification. */
111118 struct timespec st_ctim; /* Time of last status change. */
112# else
119# else
113120 __time_t st_atime; /* Time of last access. */
114121 unsigned long int st_atimensec; /* Nscecs of last access. */
115122 __time_t st_mtime; /* Time of last modification. */
116123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117124 __time_t st_ctime; /* Time of last status change. */
118125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif
126# endif
120127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121129 };
122130#endif
123131
lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h+29-21
......@@ -28,32 +28,35 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
3134 __dev_t st_dev; /* Device. */
3235 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET64
36# ifndef __USE_FILE_OFFSET64
3437 __ino_t st_ino; /* File serial number. */
35#else
38# else
3639 __ino_t __st_ino; /* 32bit file serial number. */
37#endif
40# endif
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
4043 __uid_t st_uid; /* User ID of the file's owner. */
4144 __gid_t st_gid; /* Group ID of the file's group.*/
4245 __dev_t st_rdev; /* Device number, if device. */
4346 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4548 __off_t st_size; /* Size of file, in bytes. */
46#else
49# else
4750 __off64_t st_size; /* Size of file, in bytes. */
48#endif
51# endif
4952 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5255 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else
56# else
5457 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif
56#ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5760 /* Nanosecond resolution timestamps are stored in a format
5861 equivalent to 'struct timespec'. This is the type used
5962 whenever possible but the Unix namespace rules do not allow the
......@@ -63,28 +66,32 @@ struct stat
6366 struct timespec st_atim; /* Time of last access. */
6467 struct timespec st_mtim; /* Time of last modification. */
6568 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69#else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7073 __time_t st_atime; /* Time of last access. */
7174 unsigned long int st_atimensec; /* Nscecs of last access. */
7275 __time_t st_mtime; /* Time of last modification. */
7376 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7477 __time_t st_ctime; /* Time of last status change. */
7578 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif
77#ifndef __USE_FILE_OFFSET64
79# endif
80# ifndef __USE_FILE_OFFSET64
7881 unsigned long int __glibc_reserved4;
7982 unsigned long int __glibc_reserved5;
80#else
83# else
8184 __ino64_t st_ino; /* File serial number. */
82#endif
85# endif
86#endif /* __USE_TIME_BITS64 */
8387 };
8488
8589#ifdef __USE_LARGEFILE64
8690struct stat64
8791 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
8895 __dev_t st_dev; /* Device. */
8996 unsigned int __pad1;
9097
......@@ -99,7 +106,7 @@ struct stat64
99106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8
109# ifdef __USE_XOPEN2K8
103110 /* Nanosecond resolution timestamps are stored in a format
104111 equivalent to 'struct timespec'. This is the type used
105112 whenever possible but the Unix namespace rules do not allow the
......@@ -109,15 +116,16 @@ struct stat64
109116 struct timespec st_atim; /* Time of last access. */
110117 struct timespec st_mtim; /* Time of last modification. */
111118 struct timespec st_ctim; /* Time of last status change. */
112# else
119# else
113120 __time_t st_atime; /* Time of last access. */
114121 unsigned long int st_atimensec; /* Nscecs of last access. */
115122 __time_t st_mtime; /* Time of last modification. */
116123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117124 __time_t st_ctime; /* Time of last status change. */
118125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif
126# endif
120127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121129 };
122130#endif
123131
lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h+29-21
......@@ -28,32 +28,35 @@
2828
2929struct stat
3030 {
31#ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33#else
3134 __dev_t st_dev; /* Device. */
3235 unsigned short int __pad1;
33#ifndef __USE_FILE_OFFSET64
36# ifndef __USE_FILE_OFFSET64
3437 __ino_t st_ino; /* File serial number. */
35#else
38# else
3639 __ino_t __st_ino; /* 32bit file serial number. */
37#endif
40# endif
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
4043 __uid_t st_uid; /* User ID of the file's owner. */
4144 __gid_t st_gid; /* Group ID of the file's group.*/
4245 __dev_t st_rdev; /* Device number, if device. */
4346 unsigned short int __pad2;
44#ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4548 __off_t st_size; /* Size of file, in bytes. */
46#else
49# else
4750 __off64_t st_size; /* Size of file, in bytes. */
48#endif
51# endif
4952 __blksize_t st_blksize; /* Optimal block size for I/O. */
5053
51#ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5255 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
53#else
56# else
5457 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
55#endif
56#ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5760 /* Nanosecond resolution timestamps are stored in a format
5861 equivalent to 'struct timespec'. This is the type used
5962 whenever possible but the Unix namespace rules do not allow the
......@@ -63,28 +66,32 @@ struct stat
6366 struct timespec st_atim; /* Time of last access. */
6467 struct timespec st_mtim; /* Time of last modification. */
6568 struct timespec st_ctim; /* Time of last status change. */
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69#else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7073 __time_t st_atime; /* Time of last access. */
7174 unsigned long int st_atimensec; /* Nscecs of last access. */
7275 __time_t st_mtime; /* Time of last modification. */
7376 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7477 __time_t st_ctime; /* Time of last status change. */
7578 unsigned long int st_ctimensec; /* Nsecs of last status change. */
76#endif
77#ifndef __USE_FILE_OFFSET64
79# endif
80# ifndef __USE_FILE_OFFSET64
7881 unsigned long int __glibc_reserved4;
7982 unsigned long int __glibc_reserved5;
80#else
83# else
8184 __ino64_t st_ino; /* File serial number. */
82#endif
85# endif
86#endif /* __USE_TIME_BITS64 */
8387 };
8488
8589#ifdef __USE_LARGEFILE64
8690struct stat64
8791 {
92# ifdef __USE_TIME_BITS64
93# include <bits/struct_stat_time64_helper.h>
94# else
8895 __dev_t st_dev; /* Device. */
8996 unsigned int __pad1;
9097
......@@ -99,7 +106,7 @@ struct stat64
99106 __blksize_t st_blksize; /* Optimal block size for I/O. */
100107
101108 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
102# ifdef __USE_XOPEN2K8
109# ifdef __USE_XOPEN2K8
103110 /* Nanosecond resolution timestamps are stored in a format
104111 equivalent to 'struct timespec'. This is the type used
105112 whenever possible but the Unix namespace rules do not allow the
......@@ -109,15 +116,16 @@ struct stat64
109116 struct timespec st_atim; /* Time of last access. */
110117 struct timespec st_mtim; /* Time of last modification. */
111118 struct timespec st_ctim; /* Time of last status change. */
112# else
119# else
113120 __time_t st_atime; /* Time of last access. */
114121 unsigned long int st_atimensec; /* Nscecs of last access. */
115122 __time_t st_mtime; /* Time of last modification. */
116123 unsigned long int st_mtimensec; /* Nsecs of last modification. */
117124 __time_t st_ctime; /* Time of last status change. */
118125 unsigned long int st_ctimensec; /* Nsecs of last status change. */
119# endif
126# endif
120127 __ino64_t st_ino; /* File serial number. */
128# endif /* __USE_TIME_BITS64 */
121129 };
122130#endif
123131
lib/libc/include/csky-linux-gnueabi/bits/statfs.h-11
......@@ -1,6 +1,5 @@
11/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
......@@ -24,18 +23,8 @@
2423#include <bits/types.h>
2524#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
3526#if defined __USE_FILE_OFFSET64
3627# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
3928#elif __BYTE_ORDER == __LITTLE_ENDIAN
4029# define __field64(type, type64, name) \
4130 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h+1
......@@ -9,6 +9,7 @@
99#define LIBANL_SO "libanl.so.1"
1010#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1111#define LIBCRYPT_SO "libcrypt.so.1"
12#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1213#define LIBC_SO "libc.so.6"
1314#define LIBDL_SO "libdl.so.2"
1415#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/csky-linux-gnueabihf/bits/statfs.h-11
......@@ -1,6 +1,5 @@
11/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
22 This file is part of the GNU C Library.
3 Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
43
54 The GNU C Library is free software; you can redistribute it and/or
65 modify it under the terms of the GNU Lesser General Public
......@@ -24,18 +23,8 @@
2423#include <bits/types.h>
2524#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
3526#if defined __USE_FILE_OFFSET64
3627# define __field64(type, type64, name) type64 name
37#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
38# define __field64(type, type64, name) type name
3928#elif __BYTE_ORDER == __LITTLE_ENDIAN
4029# define __field64(type, type64, name) \
4130 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h+1
......@@ -9,6 +9,7 @@
99#define LIBANL_SO "libanl.so.1"
1010#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1111#define LIBCRYPT_SO "libcrypt.so.1"
12#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1213#define LIBC_SO "libc.so.6"
1314#define LIBDL_SO "libdl.so.2"
1415#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),
193193extern int __REDIRECT_NTH (aio_cancel,
194194 (int __fildes, struct aiocb *__aiocbp),
195195 aio_cancel64);
196
196# 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
197202extern int __REDIRECT_NTH (aio_suspend,
198203 (const struct aiocb *const __list[], int __nent,
199204 const struct timespec *__restrict __timeout),
200205 aio_suspend64) __nonnull ((1));
201
206# endif
202207extern int __REDIRECT_NTH (aio_fsync,
203208 (int __operation, struct aiocb *__aiocbp),
204209 aio_fsync64) __nonnull ((2));
......@@ -210,7 +215,11 @@ extern int __REDIRECT_NTH (aio_fsync,
210215# define aio_error aio_error64
211216# define aio_return aio_return64
212217# define aio_cancel aio_cancel64
213# define aio_suspend aio_suspend64
218# ifdef __USE_TIME_BITS64
219# define aio_suspend __aio_suspend_time64
220# else
221# define aio_suspend aio_suspend64
222# endif
214223# define aio_fsync aio_fsync64
215224# endif
216225#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;
7474
7575/* Format a network number NET into presentation format and place result
7676 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
7980/* Convert network number for interface type AF in buffer starting at
8081 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 @@
5252#include <sys/types.h>
5353#include <stdint.h>
5454
55#ifdef _LIBC
56# define __NAMESER_DEPRECATED
57#else
58# define __NAMESER_DEPRECATED __attribute_deprecated__
59#endif
60
5561/*
5662 * Define constants based on RFC 883, RFC 1034, RFC 1035
5763 */
......@@ -401,14 +407,18 @@ int ns_skiprr (const unsigned char *, const unsigned char *,
401407int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
402408int ns_sprintrr (const ns_msg *, const ns_rr *,
403409 const char *, const char *, char *, size_t)
404 __THROW;
410 __THROW __NAMESER_DEPRECATED;
405411int ns_sprintrrf (const unsigned char *, size_t, const char *,
406412 ns_class, ns_type, unsigned long,
407413 const unsigned char *, size_t, const char *,
408 const char *, char *, size_t) __THROW;
409int ns_format_ttl (unsigned long, char *, size_t) __THROW;
410int ns_parse_ttl (const char *, unsigned long *) __THROW;
411uint32_t ns_datetosecs (const char *, int *) __THROW;
414 const char *, char *, size_t)
415 __THROW __NAMESER_DEPRECATED;
416int ns_format_ttl (unsigned long, char *, size_t)
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;
412422int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
413423 __THROW;
414424int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
......@@ -431,10 +441,15 @@ int ns_name_skip (const unsigned char **, const unsigned char *)
431441void ns_name_rollback (const unsigned char *,
432442 const unsigned char **,
433443 const unsigned char **) __THROW;
434int ns_samedomain (const char *, const char *) __THROW;
435int ns_subdomain (const char *, const char *) __THROW;
436int ns_makecanon (const char *, char *, size_t) __THROW;
437int ns_samename (const char *, const char *) __THROW;
444
445int ns_samedomain (const char *, const char *) __THROW
446 __NAMESER_DEPRECATED;
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;
438453__END_DECLS
439454
440455#include <arpa/nameser_compat.h>
lib/libc/include/generic-glibc/bits/confname.h+7-1
......@@ -525,8 +525,14 @@ enum
525525
526526 _SC_THREAD_ROBUST_PRIO_INHERIT,
527527#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
528 _SC_THREAD_ROBUST_PRIO_PROTECT
528 _SC_THREAD_ROBUST_PRIO_PROTECT,
529529#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
530536 };
531537
532538/* Values for the NAME argument to `confstr'. */
lib/libc/include/generic-glibc/bits/libc-header-start.h+26-2
......@@ -44,8 +44,26 @@
4444
4545/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
4646 macro. Most but not all symbols enabled by that macro in TS
47 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
48 still require that macro in C2X. */
47 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
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.) */
4967#undef __GLIBC_USE_IEC_60559_BFP_EXT
5068#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
5169# define __GLIBC_USE_IEC_60559_BFP_EXT 1
......@@ -58,6 +76,12 @@
5876#else
5977# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
6078#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
6286/* ISO/IEC TS 18661-4:2015 defines the
6387 __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 @@
7777 priority level. */
7878#define AIO_PRIO_DELTA_MAX 20
7979
80/* Minimum size for a thread. We are free to choose a reasonable value. */
81#define PTHREAD_STACK_MIN 16384
80/* Arrange for the definition of PTHREAD_STACK_MIN. */
81#include <bits/pthread_stack_min-dynamic.h>
8282
8383/* Maximum number of timer expiration overruns. */
8484#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,
364364__MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
365365 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))))
367374/* Return value with maximum magnitude. */
368375__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
369376
370377/* Return value with minimum magnitude. */
371378__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
372
373/* Canonicalize floating-point representation. */
374__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
375379#endif
376380
377#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
381#if __GLIBC_USE (IEC_60559_EXT) || __MATH_DECLARING_FLOATN
378382/* Total order operation. */
379383__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,
380384 const _Mdouble_ *__y))
lib/libc/include/generic-glibc/bits/msq.h+1
......@@ -26,6 +26,7 @@ typedef __syscall_ulong_t msgqnum_t;
2626typedef __syscall_ulong_t msglen_t;
2727
2828#include <bits/types/struct_msqid_ds.h>
29#include <bits/types/struct_msqid64_ds.h>
2930
3031/* Define options for message queue functions. */
3132#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
2626extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,
2727 int __timeout), poll);
2828extern 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));
3031extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
3132 int __timeout, __SIZE_TYPE__ __fdslen),
3233 __poll_chk)
3334 __warnattr ("poll called with fds buffer too small file nfds entries");
3435
35__fortify_function int
36__fortify_function __attr_access ((__write_only__, 1, 2)) int
3637poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
3738{
3839 if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)
......@@ -54,7 +55,8 @@ extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
5455 const __sigset_t *__ss), ppoll);
5556extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
5657 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));
5860extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
5961 const struct timespec *__timeout,
6062 const __sigset_t *__ss,
......@@ -62,7 +64,7 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
6264 __ppoll_chk)
6365 __warnattr ("ppoll called with fds buffer too small file nfds entries");
6466
65__fortify_function int
67__fortify_function __attr_access ((__write_only__, 1, 2)) int
6668ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
6769 const __sigset_t *__ss)
6870{
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 @@
2222#include <sys/types.h>
2323#include <bits/timesize.h>
2424#include <bits/types/struct_semid_ds.h>
25#include <bits/types/struct_semid64_ds.h>
2526
2627/* Flags for `semop'. */
2728#define SEM_UNDO 0x1000 /* undo the operation on exit */
lib/libc/include/generic-glibc/bits/shm.h+1
......@@ -43,6 +43,7 @@ __BEGIN_DECLS
4343typedef __syscall_ulong_t shmatt_t;
4444
4545#include <bits/types/struct_shmid_ds.h>
46#include <bits/types/struct_shmid64_ds.h>
4647
4748#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 @@
3232#define SO_OOBINLINE 10
3333#define SO_RCVBUF 8
3434#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
4135#define SO_REUSEADDR 2
4236#define SO_SNDBUF 7
4337#define SO_SNDLOWAT 19
38#define SO_TYPE 3
39
4440#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
4541 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
42# define SO_RCVTIMEO 66
4643# define SO_SNDTIMEO 67
44# define SO_TIMESTAMP 63
45# define SO_TIMESTAMPNS 64
46# define SO_TIMESTAMPING 65
4747#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 @@
2929/* Structure describing file characteristics. */
3030struct stat
3131 {
32# ifdef __USE_TIME_BITS64
33# include <bits/struct_stat_time64_helper.h>
34# else
3235 unsigned long int st_dev;
3336 long int st_pad1[3];
34#ifndef __USE_FILE_OFFSET64
37# ifndef __USE_FILE_OFFSET64
3538 __ino_t st_ino; /* File serial number. */
36#else
39# else
3740 __ino64_t st_ino; /* File serial number. */
38#endif
41# endif
3942 __mode_t st_mode; /* File mode. */
4043 __nlink_t st_nlink; /* Link count. */
4144 __uid_t st_uid; /* User ID of the file's owner. */
4245 __gid_t st_gid; /* Group ID of the file's group.*/
4346 unsigned long int st_rdev; /* Device number, if device. */
44#ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4548 long int st_pad2[2];
4649 __off_t st_size; /* Size of file, in bytes. */
4750 /* SVR4 added this extra long to allow for expansion of off_t. */
4851 long int st_pad3;
49#else
52# else
5053 long int st_pad2[3];
5154 __off64_t st_size; /* Size of file, in bytes. */
52#endif
53#ifdef __USE_XOPEN2K8
55# endif
56# ifdef __USE_XOPEN2K8
5457 /* Nanosecond resolution timestamps are stored in a format
5558 equivalent to 'struct timespec'. This is the type used
5659 whenever possible but the Unix namespace rules do not allow the
......@@ -60,30 +63,34 @@ struct stat
6063 struct timespec st_atim; /* Time of last access. */
6164 struct timespec st_mtim; /* Time of last modification. */
6265 struct timespec st_ctim; /* Time of last status change. */
63# define st_atime st_atim.tv_sec /* Backward compatibility. */
64# define st_mtime st_mtim.tv_sec
65# define st_ctime st_ctim.tv_sec
66#else
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69# else
6770 __time_t st_atime; /* Time of last access. */
6871 unsigned long int st_atimensec; /* Nscecs of last access. */
6972 __time_t st_mtime; /* Time of last modification. */
7073 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7174 __time_t st_ctime; /* Time of last status change. */
7275 unsigned long int st_ctimensec; /* Nsecs of last status change. */
73#endif
76# endif
7477 __blksize_t st_blksize; /* Optimal block size for I/O. */
75#ifndef __USE_FILE_OFFSET64
78# ifndef __USE_FILE_OFFSET64
7679 __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
77#else
80# else
7881 long int st_pad4;
7982 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
80#endif
83# endif
8184 long int st_pad5[14];
85# endif /* __USE_TIME_BITS64 */
8286 };
8387
84#ifdef __USE_LARGEFILE64
88# ifdef __USE_LARGEFILE64
8589struct stat64
8690 {
91# ifdef __USE_TIME_BITS64
92# include <bits/struct_stat_time64_helper.h>
93# else
8794 unsigned long int st_dev;
8895 long int st_pad1[3];
8996 __ino64_t st_ino; /* File serial number. */
......@@ -94,7 +101,7 @@ struct stat64
94101 unsigned long int st_rdev; /* Device number, if device. */
95102 long int st_pad2[3];
96103 __off64_t st_size; /* Size of file, in bytes. */
97# ifdef __USE_XOPEN2K8
104# ifdef __USE_XOPEN2K8
98105 /* Nanosecond resolution timestamps are stored in a format
99106 equivalent to 'struct timespec'. This is the type used
100107 whenever possible but the Unix namespace rules do not allow the
......@@ -104,44 +111,47 @@ struct stat64
104111 struct timespec st_atim; /* Time of last access. */
105112 struct timespec st_mtim; /* Time of last modification. */
106113 struct timespec st_ctim; /* Time of last status change. */
107# else
114# else
108115 __time_t st_atime; /* Time of last access. */
109116 unsigned long int st_atimensec; /* Nscecs of last access. */
110117 __time_t st_mtime; /* Time of last modification. */
111118 unsigned long int st_mtimensec; /* Nsecs of last modification. */
112119 __time_t st_ctime; /* Time of last status change. */
113120 unsigned long int st_ctimensec; /* Nsecs of last status change. */
114# endif
121# endif
115122 __blksize_t st_blksize; /* Optimal block size for I/O. */
116123 long int st_pad3;
117124 __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
118125 long int st_pad4[14];
126# endif /* __USE_TIME_BITS64 */
119127 };
120#endif
121#else
128# endif /* __USE_LARGEFILE64 */
129
130#else /* _MIPS_SIM != _ABIO32 */
131
122132struct stat
123133 {
124134 __dev_t st_dev;
125135 int st_pad1[3]; /* Reserved for st_dev expansion */
126#ifndef __USE_FILE_OFFSET64
136# ifndef __USE_FILE_OFFSET64
127137 __ino_t st_ino;
128#else
138# else
129139 __ino64_t st_ino;
130#endif
140# endif
131141 __mode_t st_mode;
132142 __nlink_t st_nlink;
133143 __uid_t st_uid;
134144 __gid_t st_gid;
135145 __dev_t st_rdev;
136#if !defined __USE_FILE_OFFSET64
146# if !defined __USE_FILE_OFFSET64
137147 unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
138148 __off_t st_size;
139149 int st_pad3;
140#else
150# else
141151 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
142152 __off64_t st_size;
143#endif
144#ifdef __USE_XOPEN2K8
153# endif
154# ifdef __USE_XOPEN2K8
145155 /* Nanosecond resolution timestamps are stored in a format
146156 equivalent to 'struct timespec'. This is the type used
147157 whenever possible but the Unix namespace rules do not allow the
......@@ -151,24 +161,24 @@ struct stat
151161 struct timespec st_atim; /* Time of last access. */
152162 struct timespec st_mtim; /* Time of last modification. */
153163 struct timespec st_ctim; /* Time of last status change. */
154# define st_atime st_atim.tv_sec /* Backward compatibility. */
155# define st_mtime st_mtim.tv_sec
156# define st_ctime st_ctim.tv_sec
157#else
164# define st_atime st_atim.tv_sec /* Backward compatibility. */
165# define st_mtime st_mtim.tv_sec
166# define st_ctime st_ctim.tv_sec
167# else
158168 __time_t st_atime; /* Time of last access. */
159169 unsigned long int st_atimensec; /* Nscecs of last access. */
160170 __time_t st_mtime; /* Time of last modification. */
161171 unsigned long int st_mtimensec; /* Nsecs of last modification. */
162172 __time_t st_ctime; /* Time of last status change. */
163173 unsigned long int st_ctimensec; /* Nsecs of last status change. */
164#endif
174# endif
165175 __blksize_t st_blksize;
166176 unsigned int st_pad4;
167#ifndef __USE_FILE_OFFSET64
177# ifndef __USE_FILE_OFFSET64
168178 __blkcnt_t st_blocks;
169#else
179# else
170180 __blkcnt64_t st_blocks;
171#endif
181# endif
172182 int st_pad5[14];
173183 };
174184
......@@ -185,7 +195,7 @@ struct stat64
185195 __dev_t st_rdev;
186196 unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
187197 __off64_t st_size;
188# ifdef __USE_XOPEN2K8
198# ifdef __USE_XOPEN2K8
189199 /* Nanosecond resolution timestamps are stored in a format
190200 equivalent to 'struct timespec'. This is the type used
191201 whenever possible but the Unix namespace rules do not allow the
......@@ -195,20 +205,21 @@ struct stat64
195205 struct timespec st_atim; /* Time of last access. */
196206 struct timespec st_mtim; /* Time of last modification. */
197207 struct timespec st_ctim; /* Time of last status change. */
198# else
208# else
199209 __time_t st_atime; /* Time of last access. */
200210 unsigned long int st_atimensec; /* Nscecs of last access. */
201211 __time_t st_mtime; /* Time of last modification. */
202212 unsigned long int st_mtimensec; /* Nsecs of last modification. */
203213 __time_t st_ctime; /* Time of last status change. */
204214 unsigned long int st_ctimensec; /* Nsecs of last status change. */
205# endif
215# endif
206216 __blksize_t st_blksize;
207217 unsigned int st_pad3;
208218 __blkcnt64_t st_blocks;
209219 int st_pad4[14];
210220};
211221#endif
222
212223#endif
213224
214225/* 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 @@
11/* 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
44#ifndef _SYSCALL_H
55# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
66#endif
77
8#define __GLIBC_LINUX_VERSION_CODE 330240
8#define __GLIBC_LINUX_VERSION_CODE 331008
99
1010#ifdef __NR_FAST_atomic_update
1111# define SYS_FAST_atomic_update __NR_FAST_atomic_update
......@@ -291,6 +291,10 @@
291291# define SYS_epoll_pwait __NR_epoll_pwait
292292#endif
293293
294#ifdef __NR_epoll_pwait2
295# define SYS_epoll_pwait2 __NR_epoll_pwait2
296#endif
297
294298#ifdef __NR_epoll_wait
295299# define SYS_epoll_wait __NR_epoll_wait
296300#endif
......@@ -803,6 +807,18 @@
803807# define SYS_kill __NR_kill
804808#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
806822#ifdef __NR_lchown
807823# define SYS_lchown __NR_lchown
808824#endif
......@@ -939,6 +955,10 @@
939955# define SYS_mount __NR_mount
940956#endif
941957
958#ifdef __NR_mount_setattr
959# define SYS_mount_setattr __NR_mount_setattr
960#endif
961
942962#ifdef __NR_move_mount
943963# define SYS_move_mount __NR_move_mount
944964#endif
lib/libc/include/generic-glibc/bits/time.h+10
......@@ -77,6 +77,16 @@ __BEGIN_DECLS
7777/* Tune a POSIX clock. */
7878extern 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
8090__END_DECLS
8191#endif /* use GNU */
8292
lib/libc/include/generic-glibc/bits/timex.h+31
......@@ -25,6 +25,36 @@
2525
2626struct timex
2727{
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
2858 unsigned int modes; /* mode selector */
2959 __syscall_slong_t offset; /* time offset (usec) */
3060 __syscall_slong_t freq; /* frequency offset (scaled ppm) */
......@@ -51,6 +81,7 @@ struct timex
5181 int :32; int :32; int :32; int :32;
5282 int :32; int :32; int :32; int :32;
5383 int :32; int :32; int :32;
84# endif
5485};
5586
5687/* 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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
33# if __TIMESIZE == 32
2934 __time_t msg_stime; /* time of last msgsnd command */
3035 unsigned long int __msg_stime_high;
3136 __time_t msg_rtime; /* time of last msgsnd command */
3237 unsigned long int __msg_rtime_high;
3338 __time_t msg_ctime; /* time of last change */
3439 unsigned long int __msg_ctime_high;
35#else
40# else
3641 __time_t msg_stime; /* time of last msgsnd command */
3742 __time_t msg_rtime; /* time of last msgsnd command */
3843 __time_t msg_ctime; /* time of last change */
39#endif
44# endif
4045 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
4146 msgqnum_t msg_qnum; /* number of messages currently on queue */
4247 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -44,4 +49,5 @@ struct msqid_ds
4449 __pid_t msg_lrpid; /* pid of last msgrcv() */
4550 __syscall_ulong_t __glibc_reserved4;
4651 __syscall_ulong_t __glibc_reserved5;
52#endif
4753};
\ 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 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 __time_t sem_otime; /* last semop() time */
2932 __syscall_ulong_t __sem_otime_high;
3033 __time_t sem_ctime; /* last time changed by semctl() */
3134 __syscall_ulong_t __sem_ctime_high;
32#else
35# else
3336 __time_t sem_otime;
3437 __time_t sem_ctime;
35#endif
38# endif
3639 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3740 __syscall_ulong_t __glibc_reserved3;
3841 __syscall_ulong_t __glibc_reserved4;
42#endif
3943};
\ 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 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 unsigned long int __shm_atime_high;
3134 __time_t shm_dtime; /* time of last shmdt() */
3235 unsigned long int __shm_dtime_high;
3336 __time_t shm_ctime; /* time of last change by shmctl() */
3437 unsigned long int __shm_ctime_high;
35#else
38# else
3639 __time_t shm_atime; /* time of last shmat() */
3740 __time_t shm_dtime; /* time of last shmdt() */
3841 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif
42# endif
4043 __pid_t shm_cpid; /* pid of creator */
4144 __pid_t shm_lpid; /* pid of last shmop */
4245 shmatt_t shm_nattch; /* number of current attaches */
4346 __syscall_ulong_t __glibc_reserved5;
4447 __syscall_ulong_t __glibc_reserved6;
48#endif
4549 };
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_timespec.h+6-1
......@@ -4,15 +4,20 @@
44
55#include <bits/types.h>
66#include <bits/endian.h>
7#include <bits/types/time_t.h>
78
89/* POSIX.1b structure for a time value. This is like a `struct timeval' but
910 has nanoseconds instead of microseconds. */
1011struct timespec
1112{
13#ifdef __USE_TIME_BITS64
14 __time64_t tv_sec; /* Seconds. */
15#else
1216 __time_t tv_sec; /* Seconds. */
17#endif
1318#if __WORDSIZE == 64 \
1419 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
15 || __TIMESIZE == 32
20 || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
1621 __syscall_slong_t tv_nsec; /* Nanoseconds. */
1722#else
1823# if __BYTE_ORDER == __BIG_ENDIAN
lib/libc/include/generic-glibc/bits/types/struct_timeval.h+5
......@@ -7,7 +7,12 @@
77 microsecond but also has a range of years. */
88struct timeval
99{
10#ifdef __USE_TIME_BITS64
11 __time64_t tv_sec; /* Seconds. */
12 __suseconds64_t tv_usec; /* Microseconds. */
13#else
1014 __time_t tv_sec; /* Seconds. */
1115 __suseconds_t tv_usec; /* Microseconds. */
16#endif
1217};
1318#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/time_t.h+4
......@@ -4,6 +4,10 @@
44#include <bits/types.h>
55
66/* Returned by `time'. */
7#ifdef __USE_TIME_BITS64
8typedef __time64_t time_t;
9#else
710typedef __time_t time_t;
11#endif
812
913#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/unistd_ext.h+24-1
......@@ -33,4 +33,27 @@
3333 not detached and has not been joined. */
3434extern __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
336336#define EM_BA2 202 /* Beyond BA2 */
337337#define EM_XCORE 203 /* XMOS xCORE */
338338#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 */
340341#define EM_KM32 210 /* KM211 KM32 */
341342#define EM_KMX32 211 /* KM211 KMX32 */
342343#define EM_EMX16 212 /* KM211 KMX16 */
......@@ -813,6 +814,10 @@ typedef struct
813814 address keys. */
814815#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
815816 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. */
816821#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
817822#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
818823#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;
172172
173173 This function is a cancellation point and therefore not marked with
174174 __THROW. */
175#ifndef __USE_FILE_OFFSET64
175#ifndef __USE_TIME_BITS64
176# ifndef __USE_FILE_OFFSET64
176177extern int fcntl (int __fd, int __cmd, ...);
177#else
178# ifdef __REDIRECT
179extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
180178# else
181# define fcntl fcntl64
179# ifdef __REDIRECT
180extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
181# else
182# define fcntl fcntl64
183# endif
182184# endif
183#endif
184#ifdef __USE_LARGEFILE64
185# ifdef __USE_LARGEFILE64
185186extern 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
186199#endif
187200
188201/* 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 @@
3333 Extensions to ISO C11 from TS 18661-4:2015.
3434 __STDC_WANT_IEC_60559_TYPES_EXT__
3535 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
3739 _POSIX_SOURCE IEEE Std 1003.1.
3840 _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
......@@ -48,6 +50,8 @@
4850 _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
4951 _FILE_OFFSET_BITS=N Select default filesystem interface.
5052 _ATFILE_SOURCE Additional *at interfaces.
53 _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
54 MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
5155 _GNU_SOURCE All of the above, plus GNU extensions.
5256 _DEFAULT_SOURCE The default set of features (taking precedence over
5357 __STRICT_ANSI__).
......@@ -94,6 +98,8 @@
9498 __USE_FILE_OFFSET64 Define 64bit interface as default.
9599 __USE_MISC Define things from 4.3BSD or System V Unix.
96100 __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.
97103 __USE_GNU Define GNU extensions.
98104 __USE_FORTIFY_LEVEL Additional security measures used, according to level.
99105
......@@ -137,6 +143,7 @@
137143#undef __USE_FILE_OFFSET64
138144#undef __USE_MISC
139145#undef __USE_ATFILE
146#undef __USE_DYNAMIC_STACK_SIZE
140147#undef __USE_GNU
141148#undef __USE_FORTIFY_LEVEL
142149#undef __KERNEL_STRICT_NAMES
......@@ -213,6 +220,8 @@
213220# define _DEFAULT_SOURCE 1
214221# undef _ATFILE_SOURCE
215222# define _ATFILE_SOURCE 1
223# undef _DYNAMIC_STACK_SIZE_SOURCE
224# define _DYNAMIC_STACK_SIZE_SOURCE 1
216225#endif
217226
218227/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
......@@ -380,6 +389,8 @@
380389# define __USE_FILE_OFFSET64 1
381390#endif
382391
392#include <features-time64.h>
393
383394#if defined _DEFAULT_SOURCE
384395# define __USE_MISC 1
385396#endif
......@@ -388,6 +399,10 @@
388399# define __USE_ATFILE 1
389400#endif
390401
402#ifdef _DYNAMIC_STACK_SIZE_SOURCE
403# define __USE_DYNAMIC_STACK_SIZE 1
404#endif
405
391406#ifdef _GNU_SOURCE
392407# define __USE_GNU 1
393408#endif
......@@ -462,7 +477,7 @@
462477/* Major and minor version number of the GNU C library package. Use
463478 these macros to test for features in specific releases. */
464479#define __GLIBC__ 2
465#define __GLIBC_MINOR__ 33
480#define __GLIBC_MINOR__ 34
466481
467482#define __GLIBC_PREREQ(maj, min) \
468483 ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/include/generic-glibc/fts.h+38-5
......@@ -187,6 +187,7 @@ FTSENT *fts_read (FTS *);
187187int fts_set (FTS *, FTSENT *, int) __THROW;
188188#else
189189# ifdef __REDIRECT
190# ifndef __USE_TIME_BITS64
190191FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
191192int __REDIRECT (fts_close, (FTS *), fts64_close);
192193FTS *__REDIRECT (fts_open, (char * const *, int,
......@@ -194,21 +195,53 @@ FTS *__REDIRECT (fts_open, (char * const *, int,
194195 fts64_open);
195196FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read);
196197int __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
197208# else
198# define fts_children fts64_children
199# define fts_close fts64_close
200# define fts_open fts64_open
201# define fts_read fts64_read
202# define fts_set fts64_set
209# ifndef __USE_TIME_BITS64
210# define fts_children fts64_children
211# define fts_close fts64_close
212# define fts_open fts64_open
213# define fts_read fts64_read
214# define fts_set fts64_set
215# else
216# endif
203217# endif
204218#endif
205219#ifdef __USE_LARGEFILE64
220# ifndef __USE_TIME_BITS64
206221FTSENT64 *fts64_children (FTS64 *, int);
207222int fts64_close (FTS64 *);
208223FTS64 *fts64_open (char * const *, int,
209224 int (*)(const FTSENT64 **, const FTSENT64 **));
210225FTSENT64 *fts64_read (FTS64 *);
211226int 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
212245#endif
213246__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)
137137 __nonnull ((1, 2));
138138#else
139139# ifdef __REDIRECT
140# ifndef __USE_TIME_BITS64
140141extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
141142 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
142148# else
143# define ftw ftw64
149# ifndef __USE_TIME_BITS64
150# define ftw ftw64
151# else
152# define ftw __ftw64_time64
153# endif
144154# endif
145155#endif
146156#ifdef __USE_LARGEFILE64
157# ifndef __USE_TIME_BITS64
147158extern int ftw64 (const char *__dir, __ftw64_func_t __func,
148159 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
149170#endif
150171
151172#ifdef __USE_XOPEN_EXTENDED
......@@ -159,16 +180,37 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
159180 int __flag) __nonnull ((1, 2));
160181# else
161182# ifdef __REDIRECT
183# ifndef __USE_TIME_BITS64
162184extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
163185 int __descriptors, int __flag), nftw64)
164186 __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
165192# else
166# define nftw nftw64
193# ifndef __USE_TIME_BITS64
194# define nftw nftw64
195# else
196# define nftw __nftw64_time64
197# endif
167198# endif
168199# endif
169200# ifdef __USE_LARGEFILE64
201# ifndef __USE_TIME_BITS64
170202extern int nftw64 (const char *__dir, __nftw64_func_t __func,
171203 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
172214# endif
173215#endif
174216
lib/libc/include/generic-glibc/glob.h+28-6
......@@ -145,25 +145,47 @@ typedef struct
145145#if !defined __USE_FILE_OFFSET64
146146extern int glob (const char *__restrict __pattern, int __flags,
147147 int (*__errfunc) (const char *, int),
148 glob_t *__restrict __pglob) __THROW;
148 glob_t *__restrict __pglob) __THROWNL;
149149
150150/* Free storage allocated in PGLOB by a previous `glob' call. */
151151extern void globfree (glob_t *__pglob) __THROW;
152152#else
153extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern,
154 int __flags,
155 int (*__errfunc) (const char *, int),
156 glob_t *__restrict __pglob), glob64);
153# ifdef __USE_TIME_BITS64
154extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
155 int __flags,
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
158168extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
169# endif
159170#endif
160171
161172#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
162183extern int glob64 (const char *__restrict __pattern, int __flags,
163184 int (*__errfunc) (const char *, int),
164 glob64_t *__restrict __pglob) __THROW;
185 glob64_t *__restrict __pglob) __THROWNL;
165186
166187extern void globfree64 (glob64_t *__pglob) __THROW;
188# endif
167189#endif
168190
169191
lib/libc/include/generic-glibc/gnu/lib-names-32.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-hard.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h+1
......@@ -7,6 +7,7 @@
77#define LIBANL_SO "libanl.so.1"
88#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
99#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1011#define LIBC_SO "libc.so.6"
1112#define LIBDL_SO "libdl.so.2"
1213#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h+1
......@@ -7,6 +7,7 @@
77#define LIBANL_SO "libanl.so.1"
88#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
99#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1011#define LIBC_SO "libc.so.6"
1112#define LIBDL_SO "libdl.so.2"
1213#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h+1
......@@ -7,6 +7,7 @@
77#define LIBANL_SO "libanl.so.1"
88#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
99#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1011#define LIBC_SO "libc.so.6"
1112#define LIBDL_SO "libdl.so.2"
1213#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-soft.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#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));
5656 the same pointer that was passed to it, aliasing needs to be allowed
5757 between objects pointed by the old and new pointers. */
5858extern 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
6162/* Free a block allocated by `malloc', `realloc' or `calloc'. */
6263extern void free (void *__ptr) __THROW;
6364
6465/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
6566extern 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
6870/* Allocate SIZE bytes on a page boundary. */
6971extern void *valloc (size_t __size) __THROW __attribute_malloc__
70 __attribute_alloc_size__ ((1)) __wur;
72 __attribute_alloc_size__ ((1)) __wur __attr_dealloc_free;
7173
7274/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
7375 __size to nearest pagesize. */
74extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;
75
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;
76extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
77 __wur __attr_dealloc_free;
8378
8479/* SVID2/XPG mallinfo structure */
8580
......@@ -161,24 +156,5 @@ extern void malloc_stats (void) __THROW;
161156/* Output information about state of allocator to stream FP. */
162157extern 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
183159__END_DECLS
184160#endif /* malloc.h */
\ No newline at end of file
lib/libc/include/generic-glibc/math.h+22-8
......@@ -104,7 +104,7 @@ __BEGIN_DECLS
104104# endif
105105#endif /* __USE_ISOC99 */
106106
107#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
107#if __GLIBC_USE (IEC_60559_BFP_EXT)
108108/* Signaling NaN macros, if supported. */
109109# if __GNUC_PREREQ (3, 3)
110110# define SNANF (__builtin_nansf (""))
......@@ -112,25 +112,39 @@ __BEGIN_DECLS
112112# define SNANL (__builtin_nansl (""))
113113# endif
114114#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)))
116118# define SNANF16 (__builtin_nansf16 (""))
117119#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)))
119123# define SNANF32 (__builtin_nansf32 (""))
120124#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)))
122128# define SNANF64 (__builtin_nansf64 (""))
123129#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)))
125133# define SNANF128 (__builtin_nansf128 (""))
126134#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)))
128138# define SNANF32X (__builtin_nansf32x (""))
129139#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)))
131143# define SNANF64X (__builtin_nansf64x (""))
132144#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)))
134148# define SNANF128X (__builtin_nansf128x (""))
135149#endif
136150
lib/libc/include/generic-glibc/monetary.h+4-2
......@@ -37,7 +37,8 @@ __BEGIN_DECLS
3737/* Formatting a monetary value according to the current locale. */
3838extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
3939 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
4243#ifdef __USE_XOPEN2K8
4344/* POSIX.1-2008 extended locale interface (see locale.h). */
......@@ -47,7 +48,8 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
4748extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
4849 locale_t __loc,
4950 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));
5153#endif
5254
5355#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,
7171 unsigned int __msg_prio) __nonnull ((2));
7272
7373#ifdef __USE_XOPEN2K
74# ifndef __USE_TIME_BITS64
7475/* Receive the oldest from highest priority messages in message queue
7576 MQDES, stop waiting if ABS_TIMEOUT expires. */
7677extern 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,
8586 size_t __msg_len, unsigned int __msg_prio,
8687 const struct timespec *__abs_timeout)
8788 __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
88110#endif
89111
90112/* Define some inlines helping to catch common problems. */
lib/libc/include/generic-glibc/net/if.h+3-1
......@@ -191,7 +191,9 @@ __BEGIN_DECLS
191191
192192/* Convert an interface name to an index, and vice versa. */
193193extern 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
196198/* Return a list of all interfaces and their indices. */
197199extern 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],
701701extern int gai_suspend (const struct gaicb *const __list[], int __ent,
702702 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
704715/* Get the error status of the request REQ. */
705716extern int gai_error (struct gaicb *__req) __THROW;
706717
lib/libc/include/generic-glibc/netinet/icmp6.h+2
......@@ -69,6 +69,8 @@ struct icmp6_hdr
6969#define MLD_LISTENER_QUERY 130
7070#define MLD_LISTENER_REPORT 131
7171#define MLD_LISTENER_REDUCTION 132
72#define ICMPV6_EXT_ECHO_REQUEST 160
73#define ICMPV6_EXT_ECHO_REPLY 161
7274
7375#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
7476#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
8989#define ICMP_EXC_TTL 0 /* TTL count exceeded */
9090#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
93111#ifdef __USE_MISC
94112/*
lib/libc/include/generic-glibc/nss.h+1-1
......@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);
196196 extern nss_endgrent _nss_##module##_endgrent; \
197197 extern nss_endhostent _nss_##module##_endhostent; \
198198 extern nss_endnetent _nss_##module##_endnetent; \
199 extern nss_endnetgrent _nss_##module##__endnetgrent; \
199 extern nss_endnetgrent _nss_##module##_endnetgrent; \
200200 extern nss_endprotoent _nss_##module##_endprotoent; \
201201 extern nss_endpwent _nss_##module##_endpwent; \
202202 extern nss_endrpcent _nss_##module##_endrpcent; \
lib/libc/include/generic-glibc/pthread.h+157-15
......@@ -29,7 +29,9 @@
2929#include <bits/types/struct_timespec.h>
3030#include <bits/types/__sigset_t.h>
3131#include <bits/types/struct___jmp_buf_tag.h>
32
32#ifdef __USE_MISC
33# include <bits/pthread_stack_min-dynamic.h>
34#endif
3335
3436/* Detach state. */
3537enum
......@@ -221,6 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);
221223 the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
222224extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
223225
226# ifndef __USE_TIME_BITS64
224227/* Make calling thread wait for termination of the thread TH, but only
225228 until TIMEOUT. The exit status of the thread is stored in
226229 *THREAD_RETURN, if THREAD_RETURN is not NULL.
......@@ -240,6 +243,23 @@ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
240243extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
241244 clockid_t __clockid,
242245 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
243263#endif
244264
245265/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
......@@ -454,11 +474,14 @@ extern int pthread_setconcurrency (int __level) __THROW;
454474#endif
455475
456476#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. */
461477extern 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
464487/* Limit specified thread TH to run only on the processors represented
......@@ -773,16 +796,39 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
773796
774797#ifdef __USE_XOPEN2K
775798/* Wait until lock becomes available, or specified time passes. */
799# ifndef __USE_TIME_BITS64
776800extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
777801 const struct timespec *__restrict
778802 __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
779813#endif
780814
781815#ifdef __USE_GNU
816# ifndef __USE_TIME_BITS64
782817extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
783818 clockid_t __clockid,
784819 const struct timespec *__restrict
785820 __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
786832#endif
787833
788834/* Unlock a mutex. */
......@@ -809,8 +855,14 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
809855extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
810856 __THROW __nonnull ((1));
811857# ifdef __USE_GNU
812extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
813 __THROW __nonnull ((1));
858# ifdef __REDIRECT_NTH
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
814866# endif
815867#endif
816868
......@@ -879,9 +931,15 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
879931 int *__robustness)
880932 __THROW __nonnull ((1, 2));
881933# ifdef __USE_GNU
882extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
883 int *__robustness)
884 __THROW __nonnull ((1, 2));
934# ifdef __REDIRECT_NTH
935extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np,
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
885943# endif
886944
887945/* Set the robustness flag of the mutex attribute ATTR. */
......@@ -889,13 +947,18 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
889947 int __robustness)
890948 __THROW __nonnull ((1));
891949# ifdef __USE_GNU
892extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
893 int __robustness)
894 __THROW __nonnull ((1));
950# ifdef __REDIRECT_NTH
951extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
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
895959# endif
896960#endif
897961
898
899962#if defined __USE_UNIX98 || defined __USE_XOPEN2K
900963/* Functions for handling read-write locks. */
901964
......@@ -919,16 +982,41 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
919982
920983# ifdef __USE_XOPEN2K
921984/* Try to acquire read lock for RWLOCK or return after specfied time. */
985# ifndef __USE_TIME_BITS64
922986extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
923987 const struct timespec *__restrict
924988 __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
9251000# endif
9261001
9271002# ifdef __USE_GNU
1003# ifndef __USE_TIME_BITS64
9281004extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
9291005 clockid_t __clockid,
9301006 const struct timespec *__restrict
9311007 __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
9321020# endif
9331021
9341022/* Acquire write lock for RWLOCK. */
......@@ -941,16 +1029,42 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
9411029
9421030# ifdef __USE_XOPEN2K
9431031/* Try to acquire write lock for RWLOCK or return after specfied time. */
1032# ifndef __USE_TIME_BITS64
9441033extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
9451034 const struct timespec *__restrict
9461035 __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
9471047# endif
9481048
9491049# ifdef __USE_GNU
1050# ifndef __USE_TIME_BITS64
9501051extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
9511052 clockid_t __clockid,
9521053 const struct timespec *__restrict
9531054 __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
9541068# endif
9551069
9561070/* Unlock RWLOCK. */
......@@ -1027,10 +1141,23 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
10271141
10281142 This function is a cancellation point and therefore not marked with
10291143 __THROW. */
1144# ifndef __USE_TIME_BITS64
10301145extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
10311146 pthread_mutex_t *__restrict __mutex,
10321147 const struct timespec *__restrict __abstime)
10331148 __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
10351162# ifdef __USE_GNU
10361163/* 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,
10401167
10411168 This function is a cancellation point and therefore not marked with
10421169 __THROW. */
1170# ifndef __USE_TIME_BITS64
10431171extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
10441172 pthread_mutex_t *__restrict __mutex,
10451173 __clockid_t __clock_id,
10461174 const struct timespec *__restrict __abstime)
10471175 __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
10481189# endif
10491190
10501191/* Functions for handling condition variable attributes. */
......@@ -1165,7 +1306,8 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;
11651306
11661307/* Store POINTER in the thread-specific data slot identified by KEY. */
11671308extern int pthread_setspecific (pthread_key_t __key,
1168 const void *__pointer) __THROW ;
1309 const void *__pointer)
1310 __THROW __attr_access_none (2);
11691311
11701312
11711313#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));
139139extern int getpwent_r (struct passwd *__restrict __resultbuf,
140140 char *__restrict __buffer, size_t __buflen,
141141 struct passwd **__restrict __result)
142 __nonnull ((1, 2, 4));
142 __nonnull ((1, 2, 4))
143 __attr_access ((__write_only__, 2, 3));
143144# endif
144145
145146extern int getpwuid_r (__uid_t __uid,
146147 struct passwd *__restrict __resultbuf,
147148 char *__restrict __buffer, size_t __buflen,
148149 struct passwd **__restrict __result)
149 __nonnull ((2, 3, 5));
150 __nonnull ((2, 3, 5))
151 __attr_access ((__write_only__, 3, 4));
150152
151153extern int getpwnam_r (const char *__restrict __name,
152154 struct passwd *__restrict __resultbuf,
153155 char *__restrict __buffer, size_t __buflen,
154156 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
158161# ifdef __USE_MISC
......@@ -167,7 +170,8 @@ extern int fgetpwent_r (FILE *__restrict __stream,
167170 struct passwd *__restrict __resultbuf,
168171 char *__restrict __buffer, size_t __buflen,
169172 struct passwd **__restrict __result)
170 __nonnull ((1, 2, 3, 5));
173 __nonnull ((1, 2, 3, 5))
174 __attr_access ((__write_only__, 3, 4));
171175# endif
172176
173177#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);
536536 'regcomp', with a malloc'ed value, or set to NULL before calling
537537 'regfree'. */
538538extern 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
542543/* 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);
553554extern regoff_t re_search (struct re_pattern_buffer *__buffer,
554555 const char *__String, regoff_t __length,
555556 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
559561/* 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,
563565 const char *__string2, regoff_t __length2,
564566 regoff_t __start, regoff_t __range,
565567 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
569573/* Like 're_search', but return how many characters in STRING the regexp
570574 in BUFFER matched, starting at position START. */
571575extern regoff_t re_match (struct re_pattern_buffer *__buffer,
572576 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
576581/* 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,
578583 const char *__string1, regoff_t __length1,
579584 const char *__string2, regoff_t __length2,
580585 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
584591/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
......@@ -648,10 +655,12 @@ extern int regcomp (regex_t *_Restrict_ __preg,
648655extern int regexec (const regex_t *_Restrict_ __preg,
649656 const char *_Restrict_ __String, size_t __nmatch,
650657 regmatch_t __pmatch[_Restrict_arr_],
651 int __eflags);
658 int __eflags)
659 __attr_access ((__write_only__, 4, 3));
652660
653661extern 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
656665extern void regfree (regex_t *__preg);
657666
lib/libc/include/generic-glibc/resolv.h+55-48
......@@ -168,20 +168,28 @@ __END_DECLS
168168#define res_close __res_close
169169#define res_init __res_init
170170#define res_isourserver __res_isourserver
171#define res_mkquery __res_mkquery
172#define res_query __res_query
173#define res_querydomain __res_querydomain
174#define res_search __res_search
175#define res_send __res_send
171
172#ifdef _LIBC
173# define __RESOLV_DEPRECATED
174# define __RESOLV_DEPRECATED_MSG(msg)
175#else
176# define __RESOLV_DEPRECATED __attribute_deprecated__
177# define __RESOLV_DEPRECATED_MSG(msg) __attribute_deprecated_msg__ (msg)
178#endif
176179
177180__BEGIN_DECLS
178void fp_nquery (const unsigned char *, int, FILE *) __THROW;
179void fp_query (const unsigned char *, FILE *) __THROW;
180const char * hostalias (const char *) __THROW;
181void p_query (const unsigned char *) __THROW;
181void fp_nquery (const unsigned char *, int, FILE *) __THROW
182 __RESOLV_DEPRECATED;
183void fp_query (const unsigned char *, FILE *) __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;
182189void res_close (void) __THROW;
183190int res_init (void) __THROW;
184int res_isourserver (const struct sockaddr_in *) __THROW;
191int res_isourserver (const struct sockaddr_in *) __THROW
192 __RESOLV_DEPRECATED;
185193int res_mkquery (int, const char *, int, int,
186194 const unsigned char *, int, const unsigned char *,
187195 unsigned char *, int) __THROW;
......@@ -197,10 +205,7 @@ __END_DECLS
197205
198206#define b64_ntop __b64_ntop
199207#define b64_pton __b64_pton
200#define dn_comp __dn_comp
201208#define dn_count_labels __dn_count_labels
202#define dn_expand __dn_expand
203#define dn_skipname __dn_skipname
204209#define fp_resstat __fp_resstat
205210#define loc_aton __loc_aton
206211#define loc_ntoa __loc_ntoa
......@@ -215,19 +220,10 @@ __END_DECLS
215220#define p_rcode __p_rcode
216221#define putlong __putlong
217222#define putshort __putshort
218#define res_dnok __res_dnok
219#define res_hnok __res_hnok
220223#define res_hostalias __res_hostalias
221#define res_mailok __res_mailok
222224#define res_nameinquery __res_nameinquery
223225#define res_nclose __res_nclose
224226#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
231227#define res_queriesmatch __res_queriesmatch
232228#define res_randomid __res_randomid
233229#define sym_ntop __sym_ntop
......@@ -238,50 +234,61 @@ int res_hnok (const char *) __THROW;
238234int res_ownok (const char *) __THROW;
239235int res_mailok (const char *) __THROW;
240236int res_dnok (const char *) __THROW;
241int sym_ston (const struct res_sym *, const char *, int *) __THROW;
242const char * sym_ntos (const struct res_sym *, int, int *) __THROW;
243const char * sym_ntop (const struct res_sym *, int, int *) __THROW;
237int sym_ston (const struct res_sym *, const char *, int *) __THROW
238 __RESOLV_DEPRECATED;
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;
244243int b64_ntop (const unsigned char *, size_t, char *, size_t)
245 __THROW;
244 __THROW;
246245int b64_pton (char const *, unsigned char *, size_t) __THROW;
247int loc_aton (const char *__ascii, unsigned char *__binary) __THROW;
248const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW;
246int loc_aton (const char *__ascii, unsigned char *__binary) __THROW
247 __RESOLV_DEPRECATED;
248const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW
249 __RESOLV_DEPRECATED;
249250int dn_skipname (const unsigned char *, const unsigned char *)
250 __THROW;
251void putlong (uint32_t, unsigned char *) __THROW;
252void putshort (uint16_t, unsigned char *) __THROW;
253const char * p_class (int) __THROW;
254const char * p_time (uint32_t) __THROW;
255const char * p_type (int) __THROW;
256const char * p_rcode (int) __THROW;
257const unsigned char * p_cdnname (const unsigned char *,
258 const unsigned char *, int, FILE *) __THROW;
251 __THROW;
252void putlong (uint32_t, unsigned char *) __THROW
253 __RESOLV_DEPRECATED_MSG ("use NS_PUT16 instead");
254void putshort (uint16_t, unsigned char *) __THROW
255 __RESOLV_DEPRECATED_MSG ("use NS_PUT32 instead");
256const char * p_class (int) __THROW __RESOLV_DEPRECATED;
257const char * p_time (uint32_t) __THROW __RESOLV_DEPRECATED;
258const char * p_type (int) __THROW __RESOLV_DEPRECATED;
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;
259262const unsigned char * p_cdname (const unsigned char *, const unsigned char *,
260 FILE *) __THROW;
263 FILE *) __THROW __RESOLV_DEPRECATED;
261264const unsigned char * p_fqnname (const unsigned char *__cp,
262265 const unsigned char *__msg,
263 int, char *, int) __THROW;
264const unsigned char * p_fqname (const unsigned char *,
265 const unsigned char *, FILE *) __THROW;
266const char * p_option (unsigned long __option) __THROW;
267int dn_count_labels (const char *) __THROW;
266 int, char *, int) __THROW __RESOLV_DEPRECATED;
267const unsigned char * p_fqname (const unsigned char *, const unsigned char *,
268 FILE *) __THROW __RESOLV_DEPRECATED;
269const char * p_option (unsigned long __option) __THROW __RESOLV_DEPRECATED;
270int dn_count_labels (const char *) __THROW __RESOLV_DEPRECATED;
268271int dn_comp (const char *, unsigned char *, int, unsigned char **,
269272 unsigned char **) __THROW;
270273int dn_expand (const unsigned char *, const unsigned char *,
271274 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");
273277int res_nameinquery (const char *, int, int,
274278 const unsigned char *,
275 const unsigned char *) __THROW;
279 const unsigned char *) __THROW
280 __RESOLV_DEPRECATED;
276281int res_queriesmatch (const unsigned char *,
277282 const unsigned char *,
278283 const unsigned char *,
279 const unsigned char *) __THROW;
284 const unsigned char *) __THROW
285 __RESOLV_DEPRECATED;
280286/* Things involving a resolver context. */
281287int res_ninit (res_state) __THROW;
282void fp_resstat (const res_state, FILE *) __THROW;
288void fp_resstat (const res_state, FILE *) __THROW
289 __RESOLV_DEPRECATED;
283290const char * res_hostalias (const res_state, const char *, char *, size_t)
284 __THROW;
291 __THROW __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
285292int res_nquery (res_state, const char *, int, int,
286293 unsigned char *, int) __THROW;
287294int 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;
7474extern int sched_get_priority_min (int __algorithm) __THROW;
7575
7676/* Get the SCHED_RR interval for the named process. */
77#ifndef __USE_TIME_BITS64
7778extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
78
79#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
8089#ifdef __USE_GNU
8190/* 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));
5959
6060 This function is a cancellation point and therefore not marked with
6161 __THROW. */
62# ifndef __USE_TIME_BITS64
6263extern int sem_timedwait (sem_t *__restrict __sem,
6364 const struct timespec *__restrict __abstime)
6465 __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
6577#endif
6678
6779#ifdef __USE_GNU
80# ifndef __USE_TIME_BITS64
6881extern int sem_clockwait (sem_t *__restrict __sem,
6982 clockid_t clock,
7083 const struct timespec *__restrict __abstime)
7184 __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
7297#endif
7398
7499/* 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,
269269
270270 This function is a cancellation point and therefore not marked with
271271 __THROW. */
272# ifndef __USE_TIME_BITS64
272273extern int sigtimedwait (const sigset_t *__restrict __set,
273274 siginfo_t *__restrict __info,
274275 const struct timespec *__restrict __timeout)
275276 __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
277290/* Send signal SIG to the process PID. Associate data in VAL with the
278291 signal. */
......@@ -312,6 +325,7 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW
312325 __attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead");
313326
314327# include <bits/sigstack.h>
328# include <bits/sigstksz.h>
315329# include <bits/ss_flags.h>
316330
317331/* 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 *
213213extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *,
214214 int __fd)
215215 __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
216224#endif
217225
218226__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,
165165 const char *__new, unsigned int __flags) __THROW;
166166#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
168177/* Create a temporary file and open it read/write.
169178
170179 This function is a possible cancellation point and therefore not
171180 marked with __THROW. */
172181#ifndef __USE_FILE_OFFSET64
173extern FILE *tmpfile (void) __wur;
182extern FILE *tmpfile (void)
183 __attribute_malloc__ __attr_dealloc_fclose __wur;
174184#else
175185# ifdef __REDIRECT
176extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur;
186extern FILE *__REDIRECT (tmpfile, (void), tmpfile64)
187 __attribute_malloc__ __attr_dealloc_fclose __wur;
177188# else
178189# define tmpfile tmpfile64
179190# endif
180191#endif
181192
182193#ifdef __USE_LARGEFILE64
183extern FILE *tmpfile64 (void) __wur;
194extern FILE *tmpfile64 (void)
195 __attribute_malloc__ __attr_dealloc_fclose __wur;
184196#endif
185197
186198/* Generate a temporary filename. */
187extern char *tmpnam (char *__s) __THROW __wur;
199extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
188200
189201#ifdef __USE_MISC
190202/* This is the reentrant variant of `tmpnam'. The only difference is
191203 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;
193205#endif
194206
195207
......@@ -202,15 +214,9 @@ extern char *tmpnam_r (char *__s) __THROW __wur;
202214 P_tmpdir is tried and finally "/tmp". The storage for the filename
203215 is allocated by `malloc'. */
204216extern char *tempnam (const char *__dir, const char *__pfx)
205 __THROW __attribute_malloc__ __wur;
217 __THROW __attribute_malloc__ __wur __attr_dealloc_free;
206218#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);
214220/* Flush STREAM, or all streams if STREAM is NULL.
215221
216222 This function is a possible cancellation point and therefore not
......@@ -244,7 +250,8 @@ extern int fcloseall (void);
244250 This function is a possible cancellation point and therefore not
245251 marked with __THROW. */
246252extern FILE *fopen (const char *__restrict __filename,
247 const char *__restrict __modes) __wur;
253 const char *__restrict __modes)
254 __attribute_malloc__ __attr_dealloc_fclose __wur;
248255/* Open a file, replacing an existing stream with it.
249256
250257 This function is a possible cancellation point and therefore not
......@@ -256,7 +263,7 @@ extern FILE *freopen (const char *__restrict __filename,
256263# ifdef __REDIRECT
257264extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
258265 const char *__restrict __modes), fopen64)
259 __wur;
266 __attribute_malloc__ __attr_dealloc_fclose __wur;
260267extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
261268 const char *__restrict __modes,
262269 FILE *__restrict __stream), freopen64)
......@@ -268,7 +275,8 @@ extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
268275#endif
269276#ifdef __USE_LARGEFILE64
270277extern FILE *fopen64 (const char *__restrict __filename,
271 const char *__restrict __modes) __wur;
278 const char *__restrict __modes)
279 __attribute_malloc__ __attr_dealloc_fclose __wur;
272280extern FILE *freopen64 (const char *__restrict __filename,
273281 const char *__restrict __modes,
274282 FILE *__restrict __stream) __wur;
......@@ -276,7 +284,8 @@ extern FILE *freopen64 (const char *__restrict __filename,
276284
277285#ifdef __USE_POSIX
278286/* 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;
280289#endif
281290
282291#ifdef __USE_GNU
......@@ -284,21 +293,30 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
284293 and uses the given functions for input and output. */
285294extern FILE *fopencookie (void *__restrict __magic_cookie,
286295 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;
288298#endif
289299
290300#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
291301/* Create a new stream that refers to a memory buffer. */
292302extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
293 __THROW __wur;
303 __THROW __attribute_malloc__ __attr_dealloc_fclose __wur;
294304
295305/* Open a stream that writes into a malloc'd buffer that is expanded as
296306 necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
297307 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
299318#endif
300319
301
302320/* If BUF is NULL, make STREAM unbuffered.
303321 Else make it use buffer BUF, of size BUFSIZ. */
304322extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
......@@ -792,29 +810,33 @@ extern int fileno_unlocked (FILE *__stream) __THROW __wur;
792810
793811
794812#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
797815 This function is a possible cancellation point and therefore not
798816 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
803821 This function is a possible cancellation point and therefore not
804822 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
806826#endif
807827
808828
809829#ifdef __USE_POSIX
810830/* 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));
812833#endif /* Use POSIX. */
813834
814835
815836#if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU
816837/* Return the name of the current user. */
817extern char *cuserid (char *__s);
838extern char *cuserid (char *__s)
839 __attr_access ((__write_only__, 1));
818840#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)
550550extern void *realloc (void *__ptr, size_t __size)
551551 __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
553556#ifdef __USE_MISC
554557/* Re-allocate the previously allocated block in PTR, making the new
555558 block large enough for NMEMB elements of SIZE bytes each. */
......@@ -558,11 +561,13 @@ extern void *realloc (void *__ptr, size_t __size)
558561 between objects pointed by the old and new pointers. */
559562extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
560563 __THROW __attribute_warn_unused_result__
561 __attribute_alloc_size__ ((2, 3));
562#endif
564 __attribute_alloc_size__ ((2, 3))
565 __attr_dealloc_free;
563566
564/* Free a block allocated by `malloc', `realloc' or `calloc'. */
565extern void free (void *__ptr) __THROW;
567/* Add reallocarray as its own deallocator. */
568extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
569 __THROW __attr_dealloc (reallocarray, 1);
570#endif
566571
567572#ifdef __USE_MISC
568573# include <alloca.h>
......@@ -788,7 +793,8 @@ extern int system (const char *__command) __wur;
788793/* Return a malloc'd string containing the canonical absolute name of the
789794 existing named file. */
790795extern char *canonicalize_file_name (const char *__name)
791 __THROW __nonnull ((1)) __wur;
796 __THROW __nonnull ((1)) __attribute_malloc__
797 __attr_dealloc_free __wur;
792798#endif
793799
794800#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
lib/libc/include/generic-glibc/sys/cdefs.h+113-58
......@@ -34,7 +34,29 @@
3434#undef __P
3535#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
3961/* All functions, except those with callbacks or those that
4062 synchronize memory, are leaf functions. */
......@@ -48,16 +70,17 @@
4870
4971/* GCC can always grok prototypes. For C++ programs we add throw()
5072 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 functions
73 gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
5274 as non-throwing using a function attribute since programs can use
5375 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__))
5578# define __THROW __attribute__ ((__nothrow__ __LEAF))
5679# define __THROWNL __attribute__ ((__nothrow__))
5780# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
5881# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
5982# else
60# if defined __cplusplus && __GNUC_PREREQ (2,8)
83# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
6184# if __cplusplus >= 201103L
6285# define __THROW noexcept (true)
6386# else
......@@ -74,7 +97,7 @@
7497# endif
7598# endif
7699
77#else /* Not GCC. */
100#else /* Not GCC or clang. */
78101
79102# if (defined __cplusplus \
80103 || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
......@@ -87,16 +110,7 @@
87110# define __THROWNL
88111# define __NTH(fct) fct
89112
90#endif /* GCC. */
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
113#endif /* GCC || clang. */
100114
101115/* These two macros are not used in glibc anymore. They are kept here
102116 only because some other projects expect the macros to be defined. */
......@@ -149,11 +163,11 @@
149163 Headers that should use flexible arrays only if they're "real"
150164 (e.g. only if they won't affect sizeof()) should test
151165 #if __glibc_c99_flexarr_available. */
152#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
166#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
153167# define __flexarr []
154168# define __glibc_c99_flexarr_available 1
155#elif __GNUC_PREREQ (2,97)
156/* GCC 2.97 supports C99 flexible array members as an extension,
169#elif __GNUC_PREREQ (2,97) || defined __clang__
170/* GCC 2.97 and clang support C99 flexible array members as an extension,
157171 even when in C89 mode or compiling C++ (any version). */
158172# define __flexarr []
159173# define __glibc_c99_flexarr_available 1
......@@ -179,7 +193,7 @@
179193 Example:
180194 int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
181195
182#if defined __GNUC__ && __GNUC__ >= 2
196#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
183197
184198# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
185199# ifdef __cplusplus
......@@ -204,17 +218,17 @@
204218*/
205219#endif
206220
207/* GCC has various useful declarations that can be made with the
208 `__attribute__' syntax. All of the ways we use this do fine if
209 they are omitted for compilers that don't understand it. */
210#if !defined __GNUC__ || __GNUC__ < 2
221/* GCC and clang have various useful declarations that can be made with
222 the '__attribute__' syntax. All of the ways we use this do fine if
223 they are omitted for compilers that don't understand it. */
224#if !(defined __GNUC__ || defined __clang__)
211225# define __attribute__(xyz) /* Ignore */
212226#endif
213227
214228/* At some point during the gcc 2.96 development the `malloc' attribute
215229 for functions was introduced. We don't want to use it unconditionally
216230 (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__)
218232# define __attribute_malloc__ __attribute__ ((__malloc__))
219233#else
220234# define __attribute_malloc__ /* Ignore */
......@@ -232,23 +246,29 @@
232246/* At some point during the gcc 2.96 development the `pure' attribute
233247 for functions was introduced. We don't want to use it unconditionally
234248 (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__)
236250# define __attribute_pure__ __attribute__ ((__pure__))
237251#else
238252# define __attribute_pure__ /* Ignore */
239253#endif
240254
241255/* 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__)
243257# define __attribute_const__ __attribute__ ((__const__))
244258#else
245259# define __attribute_const__ /* Ignore */
246260#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
248268/* At some point during the gcc 3.1 development the `used' attribute
249269 for functions was introduced. We don't want to use it unconditionally
250270 (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__)
252272# define __attribute_used__ __attribute__ ((__used__))
253273# define __attribute_noinline__ __attribute__ ((__noinline__))
254274#else
......@@ -257,7 +277,7 @@
257277#endif
258278
259279/* 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__)
261281# define __attribute_deprecated__ __attribute__ ((__deprecated__))
262282#else
263283# define __attribute_deprecated__ /* Ignore */
......@@ -267,7 +287,7 @@
267287 when a deprecated function is used. clang claims to be gcc 4.2, but
268288 may also support this feature. */
269289#if __GNUC_PREREQ (4,5) \
270 || __glibc_clang_has_extension (__attribute_deprecated_with_message__)
290 || __glibc_has_extension (__attribute_deprecated_with_message__)
271291# define __attribute_deprecated_msg__(msg) \
272292 __attribute__ ((__deprecated__ (msg)))
273293#else
......@@ -280,7 +300,7 @@
280300 If several `format_arg' attributes are given for the same function, in
281301 gcc-3.0 and older, all but the last one are ignored. In newer gccs,
282302 all designated arguments are considered. */
283#if __GNUC_PREREQ (2,8)
303#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
284304# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
285305#else
286306# define __attribute_format_arg__(x) /* Ignore */
......@@ -290,27 +310,42 @@
290310 attribute for functions was introduced. We don't want to use it
291311 unconditionally (although this would be possible) since it
292312 generates warnings. */
293#if __GNUC_PREREQ (2,97)
313#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
294314# define __attribute_format_strfmon__(a,b) \
295315 __attribute__ ((__format__ (__strfmon__, a, b)))
296316#else
297317# define __attribute_format_strfmon__(a,b) /* Ignore */
298318#endif
299319
300/* The nonull function attribute allows to mark pointer parameters which
320/* The nonnull function attribute marks pointer parameters that
301321 must not be NULL. */
302#if __GNUC_PREREQ (3,3)
303# define __nonnull(params) __attribute__ ((__nonnull__ params))
304#else
305# define __nonnull(params)
322#ifndef __nonnull
323# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
324# define __nonnull(params) __attribute__ ((__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
306341#endif
307342
308343/* If fortification mode, we warn about unused results of certain
309344 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__)
311346# define __attribute_warn_unused_result__ \
312347 __attribute__ ((__warn_unused_result__))
313# if __USE_FORTIFY_LEVEL > 0
348# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
314349# define __wur __attribute_warn_unused_result__
315350# endif
316351#else
......@@ -321,7 +356,7 @@
321356#endif
322357
323358/* Forces a function to be always inlined. */
324#if __GNUC_PREREQ (3,2)
359#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
325360/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
326361 it conflicts with this definition. Therefore undefine it first to
327362 allow either header to be included first. */
......@@ -334,7 +369,7 @@
334369
335370/* Associate error messages with the source location of the call site rather
336371 than with the source location inside the function. */
337#if __GNUC_PREREQ (4,3)
372#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
338373# define __attribute_artificial__ __attribute__ ((__artificial__))
339374#else
340375# define __attribute_artificial__ /* Ignore */
......@@ -377,12 +412,14 @@
377412 run in pedantic mode if the uses are carefully marked using the
378413 `__extension__' keyword. But this is not generally available before
379414 version 2.8. */
380#if !__GNUC_PREREQ (2,8)
415#if !(__GNUC_PREREQ (2,8) || defined __clang__)
381416# define __extension__ /* Ignore */
382417#endif
383418
384/* __restrict is known in EGCS 1.2 and above. */
385#if !__GNUC_PREREQ (2,92)
419/* __restrict is known in EGCS 1.2 and above, and in clang.
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)
386423# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
387424# define __restrict restrict
388425# else
......@@ -392,8 +429,9 @@
392429
393430/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
394431 array_name[restrict]
395 GCC 3.1 supports this. */
396#if __GNUC_PREREQ (3,1) && !defined __GNUG__
432 GCC 3.1 and clang support this.
433 This syntax is not usable in C++ mode. */
434#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
397435# define __restrict_arr __restrict
398436#else
399437# ifdef __GNUC__
......@@ -408,7 +446,7 @@
408446# endif
409447#endif
410448
411#if __GNUC__ >= 3
449#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
412450# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
413451# define __glibc_likely(cond) __builtin_expect ((cond), 1)
414452#else
......@@ -416,15 +454,10 @@
416454# define __glibc_likely(cond) (cond)
417455#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
425457#if (!defined _Noreturn \
426458 && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
427 && !__GNUC_PREREQ (4,7))
459 && !(__GNUC_PREREQ (4,7) \
460 || (3 < __clang_major__ + (5 <= __clang_minor__))))
428461# if __GNUC_PREREQ (2,8)
429462# define _Noreturn __attribute__ ((__noreturn__))
430463# else
......@@ -453,14 +486,19 @@
453486
454487#if (!defined _Static_assert && !defined __cplusplus \
455488 && (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__))
457491# define _Static_assert(expr, diagnostic) \
458492 extern int (*__Static_assert_function (void)) \
459493 [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
460494#endif
461495
462#include <bits/wordsize.h>
463#include <bits/long-double.h>
496/* The #ifndef lets Gnulib avoid including these on non-glibc
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
465503#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
466504# ifdef __REDIRECT
......@@ -550,7 +588,7 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
550588 check is required to enable the use of generic selection. */
551589#if !defined __cplusplus \
552590 && (__GNUC_PREREQ (4, 9) \
553 || __glibc_clang_has_extension (c_generic_selections) \
591 || __glibc_has_extension (c_generic_selections) \
554592 || (!defined __GNUC__ && defined __STDC_VERSION__ \
555593 && __STDC_VERSION__ >= 201112L))
556594# define __HAVE_GENERIC_SELECTION 1
......@@ -564,9 +602,26 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
564602 array according to access mode, or at least one element when
565603 size-index is not provided:
566604 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
568611#else
569612# 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
570625#endif
571626
572627/* 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
3838/* Perform the I/O control operation specified by REQUEST on FD.
3939 One argument may follow; its presence and type depend on REQUEST.
4040 Return value depends on REQUEST. Usually -1 indicates error. */
41#ifndef __USE_TIME_BITS64
4142extern 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
4353__END_DECLS
4454
lib/libc/include/generic-glibc/sys/mount.h+2
......@@ -48,6 +48,8 @@ enum
4848#define MS_MANDLOCK MS_MANDLOCK
4949 MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
5050#define MS_DIRSYNC MS_DIRSYNC
51 MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
52#define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
5153 MS_NOATIME = 1024, /* Do not update access times. */
5254#define MS_NOATIME MS_NOATIME
5355 MS_NODIRATIME = 2048, /* Do not update directory access times. */
lib/libc/include/generic-glibc/sys/msg.h+10
......@@ -58,7 +58,17 @@ struct msgbuf
5858__BEGIN_DECLS
5959
6060/* Message queue control operation. */
61#ifndef __USE_TIME_BITS64
6162extern 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
6373/* Get messages queue. */
6474extern 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)
3030 __attribute__ ((pure));
3131
3232static __inline__ _Bool
33x86_cpu_has_feature (unsigned int __index)
33x86_cpu_present (unsigned int __index)
3434{
3535 const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
3636 (__index / (8 * sizeof (unsigned int) * 4));
......@@ -43,7 +43,7 @@ x86_cpu_has_feature (unsigned int __index)
4343}
4444
4545static __inline__ _Bool
46x86_cpu_is_usable (unsigned int __index)
46x86_cpu_active (unsigned int __index)
4747{
4848 const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
4949 (__index / (8 * sizeof (unsigned int) * 4));
......@@ -52,13 +52,13 @@ x86_cpu_is_usable (unsigned int __index)
5252 unsigned int __bit = __reg & (8 * sizeof (unsigned int) - 1);
5353 __reg /= 8 * sizeof (unsigned int);
5454
55 return __ptr->usable_array[__reg] & (1 << __bit);
55 return __ptr->active_array[__reg] & (1 << __bit);
5656}
5757
58/* HAS_CPU_FEATURE evaluates to true if CPU supports the feature. */
59#define HAS_CPU_FEATURE(name) x86_cpu_has_feature (x86_cpu_##name)
60/* CPU_FEATURE_USABLE evaluates to true if the feature is usable. */
61#define CPU_FEATURE_USABLE(name) x86_cpu_is_usable (x86_cpu_##name)
58/* CPU_FEATURE_PRESENT evaluates to true if CPU supports the feature. */
59#define CPU_FEATURE_PRESENT(name) x86_cpu_present (x86_cpu_##name)
60/* CPU_FEATURE_ACTIVE evaluates to true if the feature is active. */
61#define CPU_FEATURE_ACTIVE(name) x86_cpu_active (x86_cpu_##name)
6262
6363__END_DECLS
6464
lib/libc/include/generic-glibc/sys/poll.h+16-2
......@@ -51,7 +51,8 @@ __BEGIN_DECLS
5151
5252 This function is a cancellation point and therefore not marked with
5353 __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
5657#ifdef __USE_GNU
5758/* 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);
6263 __THROW. */
6364extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
6465 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
6680#endif
6781
6882__END_DECLS
lib/libc/include/generic-glibc/sys/prctl.h+10-4
......@@ -25,10 +25,6 @@
2525 we're picking up... */
2626
2727/* Memory tagging control operations (for AArch64). */
28#ifndef PR_TAGGED_ADDR_ENABLE
29# define PR_TAGGED_ADDR_ENABLE (1UL << 8)
30#endif
31
3228#ifndef PR_MTE_TCF_SHIFT
3329# define PR_MTE_TCF_SHIFT 1
3430# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
......@@ -42,7 +38,17 @@
4238__BEGIN_DECLS
4339
4440/* Control process execution. */
41#ifndef __USE_TIME_BITS64
4542extern 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
4753__END_DECLS
4854
lib/libc/include/generic-glibc/sys/resource.h+18-6
......@@ -48,18 +48,19 @@ typedef int __priority_which_t;
4848 Returns 0 if successful, -1 if not (and sets errno). */
4949#ifndef __USE_FILE_OFFSET64
5050extern int getrlimit (__rlimit_resource_t __resource,
51 struct rlimit *__rlimits) __THROW;
51 struct rlimit *__rlimits) __THROW __nonnull ((2));
5252#else
5353# ifdef __REDIRECT_NTH
5454extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
55 struct rlimit *__rlimits), getrlimit64);
55 struct rlimit *__rlimits), getrlimit64)
56 __nonnull ((2));
5657# else
5758# define getrlimit getrlimit64
5859# endif
5960#endif
6061#ifdef __USE_LARGEFILE64
6162extern int getrlimit64 (__rlimit_resource_t __resource,
62 struct rlimit64 *__rlimits) __THROW;
63 struct rlimit64 *__rlimits) __THROW __nonnull ((2));
6364#endif
6465
6566/* Set the soft and hard limits for RESOURCE to *RLIMITS.
......@@ -67,25 +68,36 @@ extern int getrlimit64 (__rlimit_resource_t __resource,
6768 Return 0 if successful, -1 if not (and sets errno). */
6869#ifndef __USE_FILE_OFFSET64
6970extern int setrlimit (__rlimit_resource_t __resource,
70 const struct rlimit *__rlimits) __THROW;
71 const struct rlimit *__rlimits) __THROW __nonnull ((2));
7172#else
7273# ifdef __REDIRECT_NTH
7374extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
7475 const struct rlimit *__rlimits),
75 setrlimit64);
76 setrlimit64) __nonnull ((2));
7677# else
7778# define setrlimit setrlimit64
7879# endif
7980#endif
8081#ifdef __USE_LARGEFILE64
8182extern int setrlimit64 (__rlimit_resource_t __resource,
82 const struct rlimit64 *__rlimits) __THROW;
83 const struct rlimit64 *__rlimits) __THROW
84 __nonnull ((2));
8385#endif
8486
8587/* Return resource usage information on process indicated by WHO
8688 and put it in *USAGE. Returns 0 for success, -1 for failure. */
8789extern 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
89101/* Return the highest priority of any process specified by WHICH and WHO
90102 (see above); if WHO is zero, the current process, process group, or user
91103 (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
9898
9999 This function is a cancellation point and therefore not marked with
100100 __THROW. */
101#ifndef __USE_TIME_BITS64
101102extern int select (int __nfds, fd_set *__restrict __readfds,
102103 fd_set *__restrict __writefds,
103104 fd_set *__restrict __exceptfds,
104105 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
106119#ifdef __USE_XOPEN2K
107120/* 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,
110123
111124 This function is a cancellation point and therefore not marked with
112125 __THROW. */
126# ifndef __USE_TIME_BITS64
113127extern int pselect (int __nfds, fd_set *__restrict __readfds,
114128 fd_set *__restrict __writefds,
115129 fd_set *__restrict __exceptfds,
116130 const struct timespec *__restrict __timeout,
117131 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
118145#endif
119146
120147
lib/libc/include/generic-glibc/sys/sem.h+21
......@@ -48,7 +48,17 @@ struct sembuf
4848__BEGIN_DECLS
4949
5050/* Semaphore control operation. */
51#ifndef __USE_TIME_BITS64
5152extern 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
5363/* Get semaphore. */
5464extern 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;
5868
5969#ifdef __USE_GNU
6070/* Operate on semaphore with timeout. */
71# ifndef __USE_TIME_BITS64
6172extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
6273 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
6384#endif
6485
6586__END_DECLS
lib/libc/include/generic-glibc/sys/shm.h+10
......@@ -46,7 +46,17 @@ __BEGIN_DECLS
4646 facility. The definition is found in XPG4.2. */
4747
4848/* Shared memory control operation. */
49#ifndef __USE_TIME_BITS64
4950extern 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
5161/* Get shared memory segment. */
5262extern 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,
170170
171171 This function is a cancellation point and therefore not marked with
172172 __THROW. */
173#ifndef __USE_TIME_BITS64
173174extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
174175 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
176188#ifdef __USE_GNU
177189/* 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,
179191
180192 This function is a cancellation point and therefore not marked with
181193 __THROW. */
194# ifndef __USE_TIME_BITS64
182195extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
183196 unsigned int __vlen, int __flags);
184#endif
197# 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
186210/* Receive a message as described by MESSAGE from socket FD.
187211 Returns the number of bytes read or -1 for errors.
188212
189213 This function is a cancellation point and therefore not marked with
190214 __THROW. */
215#ifndef __USE_TIME_BITS64
191216extern 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
193228#ifdef __USE_GNU
194229/* 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);
196231
197232 This function is a cancellation point and therefore not marked with
198233 __THROW. */
234# ifndef __USE_TIME_BITS64
199235extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
200236 unsigned int __vlen, int __flags,
201237 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
202248#endif
203249
204250
205251/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
206252 into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
207253 actual length. Returns 0 on success, -1 for errors. */
254#ifndef __USE_TIME_BITS64
208255extern int getsockopt (int __fd, int __level, int __optname,
209256 void *__restrict __optval,
210257 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
212273/* Set socket FD's option OPTNAME at protocol level LEVEL
213274 to *OPTVAL (which is OPTLEN bytes long).
214275 Returns 0 on success, -1 for errors. */
276#ifndef __USE_TIME_BITS64
215277extern int setsockopt (int __fd, int __level, int __optname,
216278 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
219293/* 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,
209209 that file descriptor FD is open on and put them in BUF. */
210210extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
211211#else
212# ifdef __REDIRECT_NTH
212# 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
213227extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
214228 struct stat *__restrict __buf), stat64)
215229 __nonnull ((1, 2));
216230extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
217231 __nonnull ((2));
218# else
219# define stat stat64
220# define fstat fstat64
232# else
233# define stat stat64
234# define fstat fstat64
235# endif
221236# endif
222237#endif
223238#ifdef __USE_LARGEFILE64
239# ifndef __USE_TIME_BITS64
224240extern int stat64 (const char *__restrict __file,
225241 struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
226242extern 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
227257#endif
228258
229259#ifdef __USE_ATFILE
......@@ -235,20 +265,44 @@ extern int fstatat (int __fd, const char *__restrict __file,
235265 struct stat *__restrict __buf, int __flag)
236266 __THROW __nonnull ((2, 3));
237267# else
238# ifdef __REDIRECT_NTH
268# ifdef __USE_TIME_BITS64
269# ifdef __REDIRECT_NTH
239270extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
240271 struct stat *__restrict __buf,
241272 int __flag),
242 fstatat64) __nonnull ((2, 3));
273 __fstatat64_time64) __nonnull ((2, 3));
274# else
275# define fstatat __fstatat64_time64
276# endif
243277# else
244# define fstatat fstatat64
278# 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
245286# endif
246287# endif
247288
248289# ifdef __USE_LARGEFILE64
290# ifndef __USE_TIME_BITS64
249291extern int fstatat64 (int __fd, const char *__restrict __file,
250292 struct stat64 *__restrict __buf, int __flag)
251293 __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
252306# endif
253307#endif
254308
......@@ -259,19 +313,37 @@ extern int fstatat64 (int __fd, const char *__restrict __file,
259313extern int lstat (const char *__restrict __file,
260314 struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
261315# else
262# ifdef __REDIRECT_NTH
316# ifdef __USE_TIME_BITS64
317# ifdef __REDIRECT_NTH
263318extern int __REDIRECT_NTH (lstat,
264319 (const char *__restrict __file,
265 struct stat *__restrict __buf), lstat64)
320 struct stat *__restrict __buf), __lstat64_time64)
266321 __nonnull ((1, 2));
322# else
323# define lstat __lstat64_time64
324# endif
267325# else
268# define lstat lstat64
326# 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
269334# endif
270335# endif
271336# ifdef __USE_LARGEFILE64
337# ifndef __USE_TIME_BITS64
272338extern int lstat64 (const char *__restrict __file,
273339 struct stat64 *__restrict __buf)
274340 __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
275347# endif
276348#endif
277349
......@@ -355,17 +427,38 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
355427#endif
356428
357429#ifdef __USE_ATFILE
430# ifndef __USE_TIME_BITS64
358431/* Set file access and modification times relative to directory file
359432 descriptor. */
360433extern int utimensat (int __fd, const char *__path,
361434 const struct timespec __times[2],
362435 int __flags)
363436 __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
364447#endif
365448
366449#ifdef __USE_XOPEN2K8
450# ifndef __USE_TIME_BITS64
367451/* Set file access and modification times of the file associated with FD. */
368452extern 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
369462#endif
370463
371464#ifdef __USE_GNU
lib/libc/include/generic-glibc/sys/statvfs.h+1-1
......@@ -21,7 +21,7 @@
2121
2222#include <features.h>
2323
24/* Get the system-specific definition of `struct statfs'. */
24/* Get the system-specific definition of `struct statvfs'. */
2525#include <bits/statvfs.h>
2626
2727#ifndef __USE_FILE_OFFSET64
lib/libc/include/generic-glibc/sys/time.h+71
......@@ -63,10 +63,21 @@ struct timezone
6363 use localtime etc. instead.
6464 This function itself is semi-obsolete;
6565 most callers should use time or clock_gettime instead. */
66#ifndef __USE_TIME_BITS64
6667extern int gettimeofday (struct timeval *__restrict __tv,
6768 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
6979#ifdef __USE_MISC
80# ifndef __USE_TIME_BITS64
7081/* Set the current time of day and timezone information.
7182 This call is restricted to the super-user.
7283 Setting the timezone in this way is obsolete, but we don't yet
......@@ -82,6 +93,20 @@ extern int settimeofday (const struct timeval *__tv,
8293 This call is restricted to the super-user. */
8394extern int adjtime (const struct timeval *__delta,
8495 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
85110#endif
86111
87112
......@@ -118,6 +143,7 @@ typedef enum __itimer_which __itimer_which_t;
118143typedef int __itimer_which_t;
119144#endif
120145
146#ifndef __USE_TIME_BITS64
121147/* Set *VALUE to the current setting of timer WHICH.
122148 Return 0 on success, -1 on errors. */
123149extern int getitimer (__itimer_which_t __which,
......@@ -136,21 +162,66 @@ extern int setitimer (__itimer_which_t __which,
136162extern int utimes (const char *__file, const struct timeval __tvp[2])
137163 __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
139186#ifdef __USE_MISC
187# ifndef __USE_TIME_BITS64
140188/* Same as `utimes', but does not follow symbolic links. */
141189extern int lutimes (const char *__file, const struct timeval __tvp[2])
142190 __THROW __nonnull ((1));
143191
144192/* Same as `utimes', but takes an open file descriptor instead of a name. */
145193extern 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
146207#endif
147208
148209#ifdef __USE_GNU
210# ifndef __USE_TIME_BITS64
149211/* Change the access time of FILE relative to FD to TVP[0] and the
150212 modification time of FILE to TVP[1]. If TVP is a null pointer, use
151213 the current time instead. Returns 0 on success, -1 on errors. */
152214extern int futimesat (int __fd, const char *__file,
153215 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
154225#endif
155226
156227
lib/libc/include/generic-glibc/sys/timerfd.h+22
......@@ -47,9 +47,31 @@ extern int timerfd_settime (int __ufd, int __flags,
4747 const struct itimerspec *__utmr,
4848 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
5062/* Return the next expiration time of UFD. */
5163extern 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
5375__END_DECLS
5476
5577#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
5454
5555__BEGIN_DECLS
5656
57extern int __adjtimex (struct timex *__ntx) __THROW;
57#ifndef __USE_TIME_BITS64
5858extern int adjtimex (struct timex *__ntx) __THROW;
59extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
5960
60#ifdef __REDIRECT_NTH
61# ifdef __REDIRECT_NTH
6162extern 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;
6368#else
64extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
65# define ntp_gettime ntp_gettimex
69# ifdef __REDIRECT_NTH
70extern 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
6684#endif
67extern int ntp_adjtime (struct timex *__tntx) __THROW;
6885
6986__END_DECLS
7087
lib/libc/include/generic-glibc/sys/uio.h+24-13
......@@ -39,7 +39,7 @@ __BEGIN_DECLS
3939 This function is a cancellation point and therefore not marked with
4040 __THROW. */
4141extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
42 __wur;
42 __wur __attr_access ((__read_only__, 2, 3));
4343
4444/* Write data pointed by the buffers described by IOVEC, which
4545 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)
5050 This function is a cancellation point and therefore not marked with
5151 __THROW. */
5252extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
53 __wur;
53 __wur __attr_access ((__read_only__, 2, 3));
5454
5555
5656#ifdef __USE_MISC
......@@ -65,7 +65,8 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
6565 This function is a cancellation point and therefore not marked with
6666 __THROW. */
6767extern 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
7071/* Write data pointed by the buffers described by IOVEC, which is a
7172 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,
7778 This function is a cancellation point and therefore not marked with
7879 __THROW. */
7980extern 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
8284# else
8385# ifdef __REDIRECT
8486extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
8587 int __count, __off64_t __offset),
86 preadv64) __wur;
88 preadv64)
89 __wur __attr_access ((__read_only__, 2, 3));
8790extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
8891 int __count, __off64_t __offset),
89 pwritev64) __wur;
92 pwritev64)
93 __wur __attr_access ((__read_only__, 2, 3));
9094# else
9195# define preadv preadv64
9296# define pwritev pwritev64
......@@ -104,7 +108,8 @@ extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
104108 This function is a cancellation point and therefore not marked with
105109 __THROW. */
106110extern 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
109114/* Write data pointed by the buffers described by IOVEC, which is a
110115 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,
116121 This function is a cancellation point and therefore not marked with
117122 __THROW. */
118123extern 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));
120126# endif
121127#endif /* Use misc. */
122128
......@@ -125,7 +131,8 @@ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
125131# ifndef __USE_FILE_OFFSET64
126132/* Same as preadv but with an additional flag argumenti defined at uio.h. */
127133extern 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
130137/* Same as preadv but with an additional flag argument defined at uio.h. */
131138extern 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,
136143extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
137144 int __count, __off64_t __offset,
138145 int __flags),
139 pwritev64v2) __wur;
146 pwritev64v2)
147 __wur __attr_access ((__read_only__, 2, 3));
140148extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
141149 int __count, __off64_t __offset,
142150 int __flags),
143 preadv64v2) __wur;
151 preadv64v2)
152 __wur __attr_access ((__read_only__, 2, 3));
144153# else
145154# define preadv2 preadv64v2
146155# define pwritev2 pwritev64v2
......@@ -151,12 +160,14 @@ extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
151160/* Same as preadv but with an additional flag argumenti defined at uio.h. */
152161extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,
153162 int __count, __off64_t __offset,
154 int ___flags) __wur;
163 int ___flags)
164 __wur __attr_access ((__read_only__, 2, 3));
155165
156166/* Same as preadv but with an additional flag argument defined at uio.h. */
157167extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,
158168 int __count, __off64_t __offset,
159 int __flags) __wur;
169 int __flags)
170 __wur __attr_access ((__read_only__, 2, 3));
160171# endif
161172#endif /* Use GNU. */
162173
lib/libc/include/generic-glibc/sys/wait.h+20
......@@ -144,14 +144,34 @@ struct rusage;
144144 nil, store information about the child's resource usage there. If the
145145 WUNTRACED bit is set in OPTIONS, return status for stopped children;
146146 otherwise don't. */
147# ifndef __USE_TIME_BITS64
147148extern __pid_t wait3 (int *__stat_loc, int __options,
148149 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
149159#endif
150160
151161#ifdef __USE_MISC
162# ifndef __USE_TIME_BITS64
152163/* PID is like waitpid. Other args are like wait3. */
153164extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
154165 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
155175#endif /* Use misc. */
156176
157177
lib/libc/include/generic-glibc/threads.h+33
......@@ -88,8 +88,18 @@ extern thrd_t thrd_current (void);
8888 __TIME_POINT. The current thread may resume if receives a signal. In
8989 that case, if __REMAINING is not NULL, the remaining time is stored in
9090 the object pointed by it. */
91#ifndef __USE_TIME_BITS64
9192extern int thrd_sleep (const struct timespec *__time_point,
9293 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
94104/* Terminate current thread execution, cleaning up any thread local
95105 storage and freeing resources. Returns the value specified in __RES. */
......@@ -131,8 +141,19 @@ extern int mtx_lock (mtx_t *__mutex);
131141/* Block the current thread until the mutex pointed by __MUTEX is unlocked
132142 or time pointed by __TIME_POINT is reached. In case the mutex is unlock,
133143 the current thread will not be blocked. */
144#ifndef __USE_TIME_BITS64
134145extern int mtx_timedlock (mtx_t *__restrict __mutex,
135146 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
137158/* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex
138159 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);
171192/* Block current thread on the condition variable until condition variable
172193 pointed by __COND is signaled or time pointed by __TIME_POINT is
173194 reached. */
195#ifndef __USE_TIME_BITS64
174196extern int cnd_timedwait (cnd_t *__restrict __cond,
175197 mtx_t *__restrict __mutex,
176198 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
178211/* Destroy condition variable pointed by __cond and free all of its
179212 resources. */
lib/libc/include/generic-glibc/time.h+144-5
......@@ -71,6 +71,7 @@ __BEGIN_DECLS
7171 The result / CLOCKS_PER_SEC is program time in seconds. */
7272extern clock_t clock (void) __THROW;
7373
74#ifndef __USE_TIME_BITS64
7475/* Return the current time and put it in *TIMER if TIMER is not NULL. */
7576extern time_t time (time_t *__timer) __THROW;
7677
......@@ -80,7 +81,18 @@ extern double difftime (time_t __time1, time_t __time0)
8081
8182/* Return the `time_t' representation of TP and normalize TP. */
8283extern time_t mktime (struct tm *__tp) __THROW;
83
84#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
8597/* Format TP into S according to FORMAT.
8698 Write no more than MAXSIZE characters and return the number
......@@ -114,6 +126,7 @@ extern char *strptime_l (const char *__restrict __s,
114126#endif
115127
116128
129#ifndef __USE_TIME_BITS64
117130/* Return the `struct tm' representation of *TIMER
118131 in Universal Coordinated Time (aka Greenwich Mean Time). */
119132extern struct tm *gmtime (const time_t *__timer) __THROW;
......@@ -122,7 +135,20 @@ extern struct tm *gmtime (const time_t *__timer) __THROW;
122135 of *TIMER in the local timezone. */
123136extern 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
125150#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
151# ifndef __USE_TIME_BITS64
126152/* Return the `struct tm' representation of *TIMER in UTC,
127153 using *TP to store the result. */
128154extern struct tm *gmtime_r (const time_t *__restrict __timer,
......@@ -132,6 +158,20 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer,
132158 using *TP to store the result. */
133159extern struct tm *localtime_r (const time_t *__restrict __timer,
134160 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
135175#endif /* POSIX || C2X */
136176
137177/* 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,
139179extern char *asctime (const struct tm *__tp) __THROW;
140180
141181/* Equivalent to `asctime (localtime (timer))'. */
182#ifndef __USE_TIME_BITS64
142183extern 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
145193/* Reentrant versions of the above functions. */
146194
147195/* 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,
150198 char *__restrict __buf) __THROW;
151199
152200/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
201#ifndef __USE_TIME_BITS64
153202extern char *ctime_r (const time_t *__restrict __timer,
154203 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
158216/* Defined in localtime.c. */
......@@ -186,11 +244,19 @@ extern long int timezone;
186244/* Miscellaneous functions many Unices inherited from the public domain
187245 localtime package. These are included only for compatibility. */
188246
247#ifndef __USE_TIME_BITS64
189248/* Like `mktime', but for TP represents Universal Time, not local time. */
190249extern time_t timegm (struct tm *__tp) __THROW;
191
192250/* Another name for `mktime'. */
193251extern 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
195261/* Return the number of days in YEAR. */
196262extern int dysize (int __year) __THROW __attribute__ ((__const__));
......@@ -198,6 +264,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
198264
199265
200266#ifdef __USE_POSIX199309
267# ifndef __USE_TIME_BITS64
201268/* Pause execution for a number of nanoseconds.
202269
203270 This function is a cancellation point and therefore not marked with
......@@ -205,7 +272,6 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
205272extern int nanosleep (const struct timespec *__requested_time,
206273 struct timespec *__remaining);
207274
208
209275/* Get resolution of clock CLOCK_ID. */
210276extern 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;
215281/* Set clock CLOCK_ID to value TP. */
216282extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
217283 __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
219305# ifdef __USE_XOPEN2K
220306/* High-resolution sleep with the specified clock.
221307
222308 This function is a cancellation point and therefore not marked with
223309 __THROW. */
310# ifndef __USE_TIME_BITS64
224311extern int clock_nanosleep (clockid_t __clock_id, int __flags,
225312 const struct timespec *__req,
226313 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
228325/* Return clock ID for CPU-time clock. */
229326extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
......@@ -239,6 +336,7 @@ extern int timer_create (clockid_t __clock_id,
239336extern int timer_delete (timer_t __timerid) __THROW;
240337
241338/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
339# ifndef __USE_TIME_BITS64
242340extern int timer_settime (timer_t __timerid, int __flags,
243341 const struct itimerspec *__restrict __value,
244342 struct itimerspec *__restrict __ovalue) __THROW;
......@@ -246,6 +344,21 @@ extern int timer_settime (timer_t __timerid, int __flags,
246344/* Get current value of timer TIMERID and store it in VALUE. */
247345extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
248346 __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
250363/* Get expiration overrun for timer TIMERID. */
251364extern int timer_getoverrun (timer_t __timerid) __THROW;
......@@ -253,9 +366,35 @@ extern int timer_getoverrun (timer_t __timerid) __THROW;
253366
254367
255368#ifdef __USE_ISOC11
369# ifndef __USE_TIME_BITS64
256370/* Set TS to calendar time based in time base BASE. */
257371extern int timespec_get (struct timespec *__ts, int __base)
258372 __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
259398#endif
260399
261400
lib/libc/include/generic-glibc/unistd.h+18
......@@ -295,6 +295,11 @@ extern int euidaccess (const char *__name, int __type)
295295/* An alias for `euidaccess', used by some other systems. */
296296extern int eaccess (const char *__name, int __type)
297297 __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));
298303#endif
299304
300305#ifdef __USE_ATFILE
......@@ -352,6 +357,12 @@ extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
352357 __THROW. */
353358extern 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
355366/* Read NBYTES into BUF from FD. Return the
356367 number read, -1 for errors or 0 for EOF.
357368
......@@ -776,6 +787,13 @@ extern __pid_t fork (void) __THROWNL;
776787extern __pid_t vfork (void) __THROW;
777788#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
780798/* Return the pathname of the terminal FD is open on, or NULL on errors.
781799 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
3535/* Structure describing file times. */
3636struct utimbuf
3737 {
38#ifdef __USE_TIME_BITS64
39 __time64_t actime; /* Access time. */
40 __time64_t modtime; /* Modification time. */
41#else
3842 __time_t actime; /* Access time. */
3943 __time_t modtime; /* Modification time. */
44#endif
4045 };
4146
4247/* Set the access and modification times of FILE to those given in
4348 *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
49#ifndef __USE_TIME_BITS64
4450extern int utime (const char *__file,
4551 const struct utimbuf *__file_times)
4652 __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
4864__END_DECLS
4965
5066#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,
151151 size_t __n, locale_t __loc) __THROW;
152152
153153/* 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;
155156#endif
156157
157158/* Find the first occurrence of WC in WCS. */
......@@ -562,9 +563,23 @@ extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
562563/* Wide character I/O functions. */
563564
564565#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
565579/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
566580 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;
568583#endif
569584
570585#if defined __USE_ISOC95 || defined __USE_UNIX98
lib/libc/include/i386-linux-gnu/bits/struct_stat.h+49-41
......@@ -25,43 +25,46 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
2831 __dev_t st_dev; /* Device. */
29#ifndef __x86_64__
32# ifndef __x86_64__
3033 unsigned short int __pad1;
31#endif
32#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
34# endif
35# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
3336 __ino_t st_ino; /* File serial number. */
34#else
37# else
3538 __ino_t __st_ino; /* 32bit file serial number. */
36#endif
37#ifndef __x86_64__
39# endif
40# ifndef __x86_64__
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
40#else
43# else
4144 __nlink_t st_nlink; /* Link count. */
4245 __mode_t st_mode; /* File mode. */
43#endif
46# endif
4447 __uid_t st_uid; /* User ID of the file's owner. */
4548 __gid_t st_gid; /* Group ID of the file's group.*/
46#ifdef __x86_64__
49# ifdef __x86_64__
4750 int __pad0;
48#endif
51# endif
4952 __dev_t st_rdev; /* Device number, if device. */
50#ifndef __x86_64__
53# ifndef __x86_64__
5154 unsigned short int __pad2;
52#endif
53#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
55# endif
56# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
5457 __off_t st_size; /* Size of file, in bytes. */
55#else
58# else
5659 __off64_t st_size; /* Size of file, in bytes. */
57#endif
60# endif
5861 __blksize_t st_blksize; /* Optimal block size for I/O. */
59#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
62# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
6063 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else
64# else
6265 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63#endif
64#ifdef __USE_XOPEN2K8
66# endif
67# ifdef __USE_XOPEN2K8
6568 /* Nanosecond resolution timestamps are stored in a format
6669 equivalent to 'struct timespec'. This is the type used
6770 whenever possible but the Unix namespace rules do not allow the
......@@ -71,58 +74,62 @@ struct stat
7174 struct timespec st_atim; /* Time of last access. */
7275 struct timespec st_mtim; /* Time of last modification. */
7376 struct timespec st_ctim; /* Time of last status change. */
74# define st_atime st_atim.tv_sec /* Backward compatibility. */
75# define st_mtime st_mtim.tv_sec
76# define st_ctime st_ctim.tv_sec
77#else
77# define st_atime st_atim.tv_sec /* Backward compatibility. */
78# define st_mtime st_mtim.tv_sec
79# define st_ctime st_ctim.tv_sec
80# else
7881 __time_t st_atime; /* Time of last access. */
7982 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
8083 __time_t st_mtime; /* Time of last modification. */
8184 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
8285 __time_t st_ctime; /* Time of last status change. */
8386 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
84#endif
85#ifdef __x86_64__
87# endif
88# ifdef __x86_64__
8689 __syscall_slong_t __glibc_reserved[3];
87#else
88# ifndef __USE_FILE_OFFSET64
90# else
91# ifndef __USE_FILE_OFFSET64
8992 unsigned long int __glibc_reserved4;
9093 unsigned long int __glibc_reserved5;
91# else
94# else
9295 __ino64_t st_ino; /* File serial number. */
96# endif
9397# endif
94#endif
98#endif /* __USE_TIME_BITS64 */
9599 };
96100
97101#ifdef __USE_LARGEFILE64
98102/* Note stat64 has the same shape as stat for x86-64. */
99103struct stat64
100104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
101108 __dev_t st_dev; /* Device. */
102# ifdef __x86_64__
109# ifdef __x86_64__
103110 __ino64_t st_ino; /* File serial number. */
104111 __nlink_t st_nlink; /* Link count. */
105112 __mode_t st_mode; /* File mode. */
106# else
113# else
107114 unsigned int __pad1;
108115 __ino_t __st_ino; /* 32bit file serial number. */
109116 __mode_t st_mode; /* File mode. */
110117 __nlink_t st_nlink; /* Link count. */
111# endif
118# endif
112119 __uid_t st_uid; /* User ID of the file's owner. */
113120 __gid_t st_gid; /* Group ID of the file's group.*/
114# ifdef __x86_64__
121# ifdef __x86_64__
115122 int __pad0;
116123 __dev_t st_rdev; /* Device number, if device. */
117124 __off_t st_size; /* Size of file, in bytes. */
118# else
125# else
119126 __dev_t st_rdev; /* Device number, if device. */
120127 unsigned int __pad2;
121128 __off64_t st_size; /* Size of file, in bytes. */
122# endif
129# endif
123130 __blksize_t st_blksize; /* Optimal block size for I/O. */
124131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
125# ifdef __USE_XOPEN2K8
132# ifdef __USE_XOPEN2K8
126133 /* Nanosecond resolution timestamps are stored in a format
127134 equivalent to 'struct timespec'. This is the type used
128135 whenever possible but the Unix namespace rules do not allow the
......@@ -132,19 +139,20 @@ struct stat64
132139 struct timespec st_atim; /* Time of last access. */
133140 struct timespec st_mtim; /* Time of last modification. */
134141 struct timespec st_ctim; /* Time of last status change. */
135# else
142# else
136143 __time_t st_atime; /* Time of last access. */
137144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
138145 __time_t st_mtime; /* Time of last modification. */
139146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
140147 __time_t st_ctime; /* Time of last status change. */
141148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
142# endif
143# ifdef __x86_64__
149# endif
150# ifdef __x86_64__
144151 __syscall_slong_t __glibc_reserved[3];
145# else
152# else
146153 __ino64_t st_ino; /* File serial number. */
147# endif
154# endif
155# endif /* __USE_TIME_BITS64 */
148156 };
149157#endif
150158
lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h+4
......@@ -23,6 +23,9 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __syscall_ulong_t __sem_otime_high;
......@@ -31,4 +34,5 @@ struct semid_ds
3134 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3235 __syscall_ulong_t __glibc_reserved3;
3336 __syscall_ulong_t __glibc_reserved4;
37#endif
3438};
\ No newline at end of file
lib/libc/include/m68k-linux-gnu/bits/struct_stat.h+29-21
......@@ -25,32 +25,35 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
2831 __dev_t st_dev; /* Device. */
2932 unsigned short int __pad1;
30#ifndef __USE_FILE_OFFSET64
33# ifndef __USE_FILE_OFFSET64
3134 __ino_t st_ino; /* File serial number. */
32#else
35# else
3336 __ino_t __st_ino; /* 32bit file serial number. */
34#endif
37# endif
3538 __mode_t st_mode; /* File mode. */
3639 __nlink_t st_nlink; /* Link count. */
3740 __uid_t st_uid; /* User ID of the file's owner. */
3841 __gid_t st_gid; /* Group ID of the file's group.*/
3942 __dev_t st_rdev; /* Device number, if device. */
4043 unsigned short int __pad2;
41#ifndef __USE_FILE_OFFSET64
44# ifndef __USE_FILE_OFFSET64
4245 __off_t st_size; /* Size of file, in bytes. */
43#else
46# else
4447 __off64_t st_size; /* Size of file, in bytes. */
45#endif
48# endif
4649 __blksize_t st_blksize; /* Optimal block size for I/O. */
4750
48#ifndef __USE_FILE_OFFSET64
51# ifndef __USE_FILE_OFFSET64
4952 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
50#else
53# else
5154 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
52#endif
53#ifdef __USE_XOPEN2K8
55# endif
56# ifdef __USE_XOPEN2K8
5457 /* Nanosecond resolution timestamps are stored in a format
5558 equivalent to 'struct timespec'. This is the type used
5659 whenever possible but the Unix namespace rules do not allow the
......@@ -60,28 +63,32 @@ struct stat
6063 struct timespec st_atim; /* Time of last access. */
6164 struct timespec st_mtim; /* Time of last modification. */
6265 struct timespec st_ctim; /* Time of last status change. */
63# define st_atime st_atim.tv_sec /* Backward compatibility. */
64# define st_mtime st_mtim.tv_sec
65# define st_ctime st_ctim.tv_sec
66#else
66# define st_atime st_atim.tv_sec /* Backward compatibility. */
67# define st_mtime st_mtim.tv_sec
68# define st_ctime st_ctim.tv_sec
69# else
6770 __time_t st_atime; /* Time of last access. */
6871 unsigned long int st_atimensec; /* Nscecs of last access. */
6972 __time_t st_mtime; /* Time of last modification. */
7073 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7174 __time_t st_ctime; /* Time of last status change. */
7275 unsigned long int st_ctimensec; /* Nsecs of last status change. */
73#endif
74#ifndef __USE_FILE_OFFSET64
76# endif
77# ifndef __USE_FILE_OFFSET64
7578 unsigned long int __glibc_reserved4;
7679 unsigned long int __glibc_reserved5;
77#else
80# else
7881 __ino64_t st_ino; /* File serial number. */
79#endif
82# endif
83#endif /* __USE_TIME_BITS64 */
8084 };
8185
8286#ifdef __USE_LARGEFILE64
8387struct stat64
8488 {
89# ifdef __USE_TIME_BITS64
90# include <bits/struct_stat_time64_helper.h>
91# else
8592 __dev_t st_dev; /* Device. */
8693 unsigned short int __pad1;
8794
......@@ -96,7 +103,7 @@ struct stat64
96103 __blksize_t st_blksize; /* Optimal block size for I/O. */
97104
98105 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
99# ifdef __USE_XOPEN2K8
106# ifdef __USE_XOPEN2K8
100107 /* Nanosecond resolution timestamps are stored in a format
101108 equivalent to 'struct timespec'. This is the type used
102109 whenever possible but the Unix namespace rules do not allow the
......@@ -106,15 +113,16 @@ struct stat64
106113 struct timespec st_atim; /* Time of last access. */
107114 struct timespec st_mtim; /* Time of last modification. */
108115 struct timespec st_ctim; /* Time of last status change. */
109# else
116# else
110117 __time_t st_atime; /* Time of last access. */
111118 unsigned long int st_atimensec; /* Nscecs of last access. */
112119 __time_t st_mtime; /* Time of last modification. */
113120 unsigned long int st_mtimensec; /* Nsecs of last modification. */
114121 __time_t st_ctime; /* Time of last status change. */
115122 unsigned long int st_ctimensec; /* Nsecs of last status change. */
116# endif
123# endif
117124 __ino64_t st_ino; /* File serial number. */
125# endif /* __USE_TIME_BITS64 */
118126 };
119127#endif
120128
lib/libc/include/m68k-linux-gnu/gnu/lib-names.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
29# ifdef __MIPSEL__
33# if __TIMESIZE == 32
34# ifdef __MIPSEL__
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_stime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_rtime_high;
3439 __time_t msg_ctime; /* time of last change */
3540 unsigned long int __msg_ctime_high;
36# else
41# else
3742 unsigned long int __msg_stime_high;
3843 __time_t msg_stime; /* time of last msgsnd command */
3944 unsigned long int __msg_rtime_high;
4045 __time_t msg_rtime; /* time of last msgsnd command */
4146 unsigned long int __msg_ctime_high;
4247 __time_t msg_ctime; /* time of last change */
43# endif
44#else
48# endif
49# else
4550 __time_t msg_stime; /* time of last msgsnd command */
4651 __time_t msg_rtime; /* time of last msgsnd command */
4752 __time_t msg_ctime; /* time of last change */
48#endif
53# endif
4954 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
5055 msgqnum_t msg_qnum; /* number of messages currently on queue */
5156 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -53,4 +58,5 @@ struct msqid_ds
5358 __pid_t msg_lrpid; /* pid of last msgrcv() */
5459 __syscall_ulong_t __glibc_reserved4;
5560 __syscall_ulong_t __glibc_reserved5;
61#endif
5662};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h+4
......@@ -23,10 +23,14 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __time_t sem_ctime; /* last time changed by semctl() */
2932 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3033 __syscall_ulong_t __sem_otime_high;
3134 __syscall_ulong_t __sem_ctime_high;
35#endif
3236};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h+9-5
......@@ -23,27 +23,31 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 __time_t shm_dtime; /* time of last shmdt() */
3134 __time_t shm_ctime; /* time of last change by shmctl() */
32#else
35# else
3336 __time_t shm_atime; /* time of last shmat() */
3437 __time_t shm_dtime; /* time of last shmdt() */
3538 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif
39# endif
3740 __pid_t shm_cpid; /* pid of creator */
3841 __pid_t shm_lpid; /* pid of last shmop */
3942 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 32
43# if __TIMESIZE == 32
4144 unsigned short int __shm_atime_high;
4245 unsigned short int __shm_dtime_high;
4346 unsigned short int __shm_ctime_high;
4447 unsigned short int __glibc_reserved4;
45#else
48# else
4649 __syscall_ulong_t __glibc_reserved5;
4750 __syscall_ulong_t __glibc_reserved6;
51# endif
4852#endif
4953 };
\ 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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
29# ifdef __MIPSEL__
33# if __TIMESIZE == 32
34# ifdef __MIPSEL__
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_stime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_rtime_high;
3439 __time_t msg_ctime; /* time of last change */
3540 unsigned long int __msg_ctime_high;
36# else
41# else
3742 unsigned long int __msg_stime_high;
3843 __time_t msg_stime; /* time of last msgsnd command */
3944 unsigned long int __msg_rtime_high;
4045 __time_t msg_rtime; /* time of last msgsnd command */
4146 unsigned long int __msg_ctime_high;
4247 __time_t msg_ctime; /* time of last change */
43# endif
44#else
48# endif
49# else
4550 __time_t msg_stime; /* time of last msgsnd command */
4651 __time_t msg_rtime; /* time of last msgsnd command */
4752 __time_t msg_ctime; /* time of last change */
48#endif
53# endif
4954 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
5055 msgqnum_t msg_qnum; /* number of messages currently on queue */
5156 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -53,4 +58,5 @@ struct msqid_ds
5358 __pid_t msg_lrpid; /* pid of last msgrcv() */
5459 __syscall_ulong_t __glibc_reserved4;
5560 __syscall_ulong_t __glibc_reserved5;
61#endif
5662};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h+4
......@@ -23,10 +23,14 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __time_t sem_ctime; /* last time changed by semctl() */
2932 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3033 __syscall_ulong_t __sem_otime_high;
3134 __syscall_ulong_t __sem_ctime_high;
35#endif
3236};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h+9-5
......@@ -23,27 +23,31 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 __time_t shm_dtime; /* time of last shmdt() */
3134 __time_t shm_ctime; /* time of last change by shmctl() */
32#else
35# else
3336 __time_t shm_atime; /* time of last shmat() */
3437 __time_t shm_dtime; /* time of last shmdt() */
3538 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif
39# endif
3740 __pid_t shm_cpid; /* pid of creator */
3841 __pid_t shm_lpid; /* pid of last shmop */
3942 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 32
43# if __TIMESIZE == 32
4144 unsigned short int __shm_atime_high;
4245 unsigned short int __shm_dtime_high;
4346 unsigned short int __shm_ctime_high;
4447 unsigned short int __glibc_reserved4;
45#else
48# else
4649 __syscall_ulong_t __glibc_reserved5;
4750 __syscall_ulong_t __glibc_reserved6;
51# endif
4852#endif
4953 };
\ 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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
29# ifdef __MIPSEL__
33# if __TIMESIZE == 32
34# ifdef __MIPSEL__
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_stime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_rtime_high;
3439 __time_t msg_ctime; /* time of last change */
3540 unsigned long int __msg_ctime_high;
36# else
41# else
3742 unsigned long int __msg_stime_high;
3843 __time_t msg_stime; /* time of last msgsnd command */
3944 unsigned long int __msg_rtime_high;
4045 __time_t msg_rtime; /* time of last msgsnd command */
4146 unsigned long int __msg_ctime_high;
4247 __time_t msg_ctime; /* time of last change */
43# endif
44#else
48# endif
49# else
4550 __time_t msg_stime; /* time of last msgsnd command */
4651 __time_t msg_rtime; /* time of last msgsnd command */
4752 __time_t msg_ctime; /* time of last change */
48#endif
53# endif
4954 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
5055 msgqnum_t msg_qnum; /* number of messages currently on queue */
5156 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -53,4 +58,5 @@ struct msqid_ds
5358 __pid_t msg_lrpid; /* pid of last msgrcv() */
5459 __syscall_ulong_t __glibc_reserved4;
5560 __syscall_ulong_t __glibc_reserved5;
61#endif
5662};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h+4
......@@ -23,10 +23,14 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __time_t sem_ctime; /* last time changed by semctl() */
2932 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3033 __syscall_ulong_t __sem_otime_high;
3134 __syscall_ulong_t __sem_ctime_high;
35#endif
3236};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h+9-5
......@@ -23,27 +23,31 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 __time_t shm_dtime; /* time of last shmdt() */
3134 __time_t shm_ctime; /* time of last change by shmctl() */
32#else
35# else
3336 __time_t shm_atime; /* time of last shmat() */
3437 __time_t shm_dtime; /* time of last shmdt() */
3538 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif
39# endif
3740 __pid_t shm_cpid; /* pid of creator */
3841 __pid_t shm_lpid; /* pid of last shmop */
3942 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 32
43# if __TIMESIZE == 32
4144 unsigned short int __shm_atime_high;
4245 unsigned short int __shm_dtime_high;
4346 unsigned short int __shm_ctime_high;
4447 unsigned short int __glibc_reserved4;
45#else
48# else
4649 __syscall_ulong_t __glibc_reserved5;
4750 __syscall_ulong_t __glibc_reserved6;
51# endif
4852#endif
4953 };
\ 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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
29# ifdef __MIPSEL__
33# if __TIMESIZE == 32
34# ifdef __MIPSEL__
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_stime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_rtime_high;
3439 __time_t msg_ctime; /* time of last change */
3540 unsigned long int __msg_ctime_high;
36# else
41# else
3742 unsigned long int __msg_stime_high;
3843 __time_t msg_stime; /* time of last msgsnd command */
3944 unsigned long int __msg_rtime_high;
4045 __time_t msg_rtime; /* time of last msgsnd command */
4146 unsigned long int __msg_ctime_high;
4247 __time_t msg_ctime; /* time of last change */
43# endif
44#else
48# endif
49# else
4550 __time_t msg_stime; /* time of last msgsnd command */
4651 __time_t msg_rtime; /* time of last msgsnd command */
4752 __time_t msg_ctime; /* time of last change */
48#endif
53# endif
4954 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
5055 msgqnum_t msg_qnum; /* number of messages currently on queue */
5156 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -53,4 +58,5 @@ struct msqid_ds
5358 __pid_t msg_lrpid; /* pid of last msgrcv() */
5459 __syscall_ulong_t __glibc_reserved4;
5560 __syscall_ulong_t __glibc_reserved5;
61#endif
5662};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h+4
......@@ -23,10 +23,14 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __time_t sem_ctime; /* last time changed by semctl() */
2932 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3033 __syscall_ulong_t __sem_otime_high;
3134 __syscall_ulong_t __sem_ctime_high;
35#endif
3236};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h+9-5
......@@ -23,27 +23,31 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 __time_t shm_dtime; /* time of last shmdt() */
3134 __time_t shm_ctime; /* time of last change by shmctl() */
32#else
35# else
3336 __time_t shm_atime; /* time of last shmat() */
3437 __time_t shm_dtime; /* time of last shmdt() */
3538 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif
39# endif
3740 __pid_t shm_cpid; /* pid of creator */
3841 __pid_t shm_lpid; /* pid of last shmop */
3942 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 32
43# if __TIMESIZE == 32
4144 unsigned short int __shm_atime_high;
4245 unsigned short int __shm_dtime_high;
4346 unsigned short int __shm_ctime_high;
4447 unsigned short int __glibc_reserved4;
45#else
48# else
4649 __syscall_ulong_t __glibc_reserved5;
4750 __syscall_ulong_t __glibc_reserved6;
51# endif
4852#endif
4953 };
\ 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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
29# ifdef __MIPSEL__
33# if __TIMESIZE == 32
34# ifdef __MIPSEL__
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_stime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_rtime_high;
3439 __time_t msg_ctime; /* time of last change */
3540 unsigned long int __msg_ctime_high;
36# else
41# else
3742 unsigned long int __msg_stime_high;
3843 __time_t msg_stime; /* time of last msgsnd command */
3944 unsigned long int __msg_rtime_high;
4045 __time_t msg_rtime; /* time of last msgsnd command */
4146 unsigned long int __msg_ctime_high;
4247 __time_t msg_ctime; /* time of last change */
43# endif
44#else
48# endif
49# else
4550 __time_t msg_stime; /* time of last msgsnd command */
4651 __time_t msg_rtime; /* time of last msgsnd command */
4752 __time_t msg_ctime; /* time of last change */
48#endif
53# endif
4954 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
5055 msgqnum_t msg_qnum; /* number of messages currently on queue */
5156 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -53,4 +58,5 @@ struct msqid_ds
5358 __pid_t msg_lrpid; /* pid of last msgrcv() */
5459 __syscall_ulong_t __glibc_reserved4;
5560 __syscall_ulong_t __glibc_reserved5;
61#endif
5662};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h+4
......@@ -23,10 +23,14 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __time_t sem_ctime; /* last time changed by semctl() */
2932 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3033 __syscall_ulong_t __sem_otime_high;
3134 __syscall_ulong_t __sem_ctime_high;
35#endif
3236};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h+9-5
......@@ -23,27 +23,31 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 __time_t shm_dtime; /* time of last shmdt() */
3134 __time_t shm_ctime; /* time of last change by shmctl() */
32#else
35# else
3336 __time_t shm_atime; /* time of last shmat() */
3437 __time_t shm_dtime; /* time of last shmdt() */
3538 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif
39# endif
3740 __pid_t shm_cpid; /* pid of creator */
3841 __pid_t shm_lpid; /* pid of last shmop */
3942 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 32
43# if __TIMESIZE == 32
4144 unsigned short int __shm_atime_high;
4245 unsigned short int __shm_dtime_high;
4346 unsigned short int __shm_ctime_high;
4447 unsigned short int __glibc_reserved4;
45#else
48# else
4649 __syscall_ulong_t __glibc_reserved5;
4750 __syscall_ulong_t __glibc_reserved6;
51# endif
4852#endif
4953 };
\ 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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 4100
33#define SO_RCVTIMEO 4102
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
29# ifdef __MIPSEL__
33# if __TIMESIZE == 32
34# ifdef __MIPSEL__
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_stime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_rtime_high;
3439 __time_t msg_ctime; /* time of last change */
3540 unsigned long int __msg_ctime_high;
36# else
41# else
3742 unsigned long int __msg_stime_high;
3843 __time_t msg_stime; /* time of last msgsnd command */
3944 unsigned long int __msg_rtime_high;
4045 __time_t msg_rtime; /* time of last msgsnd command */
4146 unsigned long int __msg_ctime_high;
4247 __time_t msg_ctime; /* time of last change */
43# endif
44#else
48# endif
49# else
4550 __time_t msg_stime; /* time of last msgsnd command */
4651 __time_t msg_rtime; /* time of last msgsnd command */
4752 __time_t msg_ctime; /* time of last change */
48#endif
53# endif
4954 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
5055 msgqnum_t msg_qnum; /* number of messages currently on queue */
5156 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -53,4 +58,5 @@ struct msqid_ds
5358 __pid_t msg_lrpid; /* pid of last msgrcv() */
5459 __syscall_ulong_t __glibc_reserved4;
5560 __syscall_ulong_t __glibc_reserved5;
61#endif
5662};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h+4
......@@ -23,10 +23,14 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __time_t sem_ctime; /* last time changed by semctl() */
2932 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3033 __syscall_ulong_t __sem_otime_high;
3134 __syscall_ulong_t __sem_ctime_high;
35#endif
3236};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h+9-5
......@@ -23,27 +23,31 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
2730 size_t shm_segsz; /* size of segment in bytes */
28#if __TIMESIZE == 32
31# if __TIMESIZE == 32
2932 __time_t shm_atime; /* time of last shmat() */
3033 __time_t shm_dtime; /* time of last shmdt() */
3134 __time_t shm_ctime; /* time of last change by shmctl() */
32#else
35# else
3336 __time_t shm_atime; /* time of last shmat() */
3437 __time_t shm_dtime; /* time of last shmdt() */
3538 __time_t shm_ctime; /* time of last change by shmctl() */
36#endif
39# endif
3740 __pid_t shm_cpid; /* pid of creator */
3841 __pid_t shm_lpid; /* pid of last shmop */
3942 shmatt_t shm_nattch; /* number of current attaches */
40#if __TIMESIZE == 32
43# if __TIMESIZE == 32
4144 unsigned short int __shm_atime_high;
4245 unsigned short int __shm_dtime_high;
4346 unsigned short int __shm_ctime_high;
4447 unsigned short int __glibc_reserved4;
45#else
48# else
4649 __syscall_ulong_t __glibc_reserved5;
4750 __syscall_ulong_t __glibc_reserved6;
51# endif
4852#endif
4953 };
\ 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 @@
3030#define SO_OOBINLINE 10
3131#define SO_RCVBUF 8
3232#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
3433#define SO_REUSEADDR 2
3534#define SO_SNDBUF 7
3635#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 @@
2626#include <bits/wordsize.h>
2727
2828#if __WORDSIZE == 32
29
3029struct stat
3130 {
31# ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33# else
3234 __dev_t st_dev; /* Device. */
33# ifndef __USE_FILE_OFFSET64
35# ifndef __USE_FILE_OFFSET64
3436 unsigned short int __pad1;
3537 __ino_t st_ino; /* File serial number. */
36# else
38# else
3739 __ino64_t st_ino; /* File serial number. */
38# endif
40# endif
3941 __mode_t st_mode; /* File mode. */
4042 __nlink_t st_nlink; /* Link count. */
4143 __uid_t st_uid; /* User ID of the file's owner. */
4244 __gid_t st_gid; /* Group ID of the file's group.*/
4345 __dev_t st_rdev; /* Device number, if device. */
4446 unsigned short int __pad2;
45# ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4648 __off_t st_size; /* Size of file, in bytes. */
47# else
49# else
4850 __off64_t st_size; /* Size of file, in bytes. */
49# endif
51# endif
5052 __blksize_t st_blksize; /* Optimal block size for I/O. */
5153
52# ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5355 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
54# else
56# else
5557 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
56# endif
57# ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5860 /* Nanosecond resolution timestamps are stored in a format
5961 equivalent to 'struct timespec'. This is the type used
6062 whenever possible but the Unix namespace rules do not allow the
......@@ -64,25 +66,28 @@ struct stat
6466 struct timespec st_atim; /* Time of last access. */
6567 struct timespec st_mtim; /* Time of last modification. */
6668 struct timespec st_ctim; /* Time of last status change. */
67# define st_atime st_atim.tv_sec /* Backward compatibility. */
68# define st_mtime st_mtim.tv_sec
69# define st_ctime st_ctim.tv_sec
70# else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7173 __time_t st_atime; /* Time of last access. */
7274 unsigned long int st_atimensec; /* Nscecs of last access. */
7375 __time_t st_mtime; /* Time of last modification. */
7476 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7577 __time_t st_ctime; /* Time of last status change. */
7678 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77# endif
79# endif
7880 unsigned long int __glibc_reserved4;
7981 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
8083 };
8184
82
8385# ifdef __USE_LARGEFILE64
8486struct stat64
8587 {
88# ifdef __USE_TIME_BITS64
89# include <bits/struct_stat_time64_helper.h>
90# else
8691 __dev_t st_dev; /* Device. */
8792 __ino64_t st_ino; /* File serial number. */
8893 __mode_t st_mode; /* File mode. */
......@@ -94,7 +99,7 @@ struct stat64
9499 __off64_t st_size; /* Size of file, in bytes. */
95100 __blksize_t st_blksize; /* Optimal block size for I/O. */
96101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
97# ifdef __USE_XOPEN2K8
102# ifdef __USE_XOPEN2K8
98103 /* Nanosecond resolution timestamps are stored in a format
99104 equivalent to 'struct timespec'. This is the type used
100105 whenever possible but the Unix namespace rules do not allow the
......@@ -104,19 +109,20 @@ struct stat64
104109 struct timespec st_atim; /* Time of last access. */
105110 struct timespec st_mtim; /* Time of last modification. */
106111 struct timespec st_ctim; /* Time of last status change. */
107# define st_atime st_atim.tv_sec /* Backward compatibility. */
108# define st_mtime st_mtim.tv_sec
109# define st_ctime st_ctim.tv_sec
110# else
112# define st_atime st_atim.tv_sec /* Backward compatibility. */
113# define st_mtime st_mtim.tv_sec
114# define st_ctime st_ctim.tv_sec
115# else
111116 __time_t st_atime; /* Time of last access. */
112117 unsigned long int st_atimensec; /* Nscecs of last access. */
113118 __time_t st_mtime; /* Time of last modification. */
114119 unsigned long int st_mtimensec; /* Nsecs of last modification. */
115120 __time_t st_ctime; /* Time of last status change. */
116121 unsigned long int st_ctimensec; /* Nsecs of last status change. */
117# endif
122# endif
118123 unsigned long int __glibc_reserved4;
119124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
120126 };
121127# endif /* __USE_LARGEFILE64 */
122128
lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h+9-3
......@@ -20,23 +20,28 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
33# if __TIMESIZE == 32
2934 unsigned long int __msg_stime_high;
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_rtime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_ctime_high;
3439 __time_t msg_ctime; /* time of last change */
35#else
40# else
3641 __time_t msg_stime; /* time of last msgsnd command */
3742 __time_t msg_rtime; /* time of last msgsnd command */
3843 __time_t msg_ctime; /* time of last change */
39#endif
44# endif
4045 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
4146 msgqnum_t msg_qnum; /* number of messages currently on queue */
4247 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -44,4 +49,5 @@ struct msqid_ds
4449 __pid_t msg_lrpid; /* pid of last msgrcv() */
4550 __syscall_ulong_t __glibc_reserved4;
4651 __syscall_ulong_t __glibc_reserved5;
52#endif
4753};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h+7-3
......@@ -23,17 +23,21 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 __syscall_ulong_t __sem_otime_high;
2932 __time_t sem_otime; /* last semop() time */
3033 __syscall_ulong_t __sem_ctime_high;
3134 __time_t sem_ctime; /* last time changed by semctl() */
32#else
35# else
3336 __time_t sem_otime; /* last semop() time */
3437 __time_t sem_ctime; /* last time changed by semctl() */
35#endif
38# endif
3639 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3740 __syscall_ulong_t __glibc_reserved3;
3841 __syscall_ulong_t __glibc_reserved4;
42#endif
3943};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h+7-3
......@@ -23,8 +23,11 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 unsigned long int __shm_atime_high;
2932 __time_t shm_atime; /* time of last shmat() */
3033 unsigned long int __shm_dtime_high;
......@@ -32,15 +35,16 @@ struct shmid_ds
3235 unsigned long int __shm_ctime_high;
3336 __time_t shm_ctime; /* time of last change by shmctl() */
3437 unsigned long int __glibc_reserved4;
35#else
38# else
3639 __time_t shm_atime; /* time of last shmat() */
3740 __time_t shm_dtime; /* time of last shmdt() */
3841 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif
42# endif
4043 size_t shm_segsz; /* size of segment in bytes */
4144 __pid_t shm_cpid; /* pid of creator */
4245 __pid_t shm_lpid; /* pid of last shmop */
4346 shmatt_t shm_nattch; /* number of current attaches */
4447 __syscall_ulong_t __glibc_reserved5;
4548 __syscall_ulong_t __glibc_reserved6;
49#endif
4650 };
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h+1
......@@ -7,6 +7,7 @@
77#define LIBANL_SO "libanl.so.1"
88#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
99#define LIBCRYPT_SO "libcrypt.so.1"
10#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1011#define LIBC_SO "libc.so.6"
1112#define LIBDL_SO "libdl.so.2"
1213#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc-linux-gnu/sys/ptrace.h+10
......@@ -70,6 +70,8 @@ __BEGIN_DECLS
7070# undef PTRACE_SYSCALL_INFO_ENTRY
7171# undef PTRACE_SYSCALL_INFO_EXIT
7272# undef PTRACE_SYSCALL_INFO_SECCOMP
73# undef PTRACE_SYSEMU
74# undef PTRACE_SYSEMU_SINGLESTEP
7375# undef PTRACE_TRACEME
7476#endif
7577
......@@ -188,6 +190,14 @@ enum __ptrace_request
188190 PTRACE_SETVSRREGS = 28,
189191#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
191201 /* Execute process until next taken branch. */
192202 PTRACE_SINGLEBLOCK = 256,
193203#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 @@
3030#define SO_OOBINLINE 10
3131#define SO_RCVBUF 8
3232#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
3433#define SO_REUSEADDR 2
3534#define SO_SNDBUF 7
3635#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 @@
2626#include <bits/wordsize.h>
2727
2828#if __WORDSIZE == 32
29
3029struct stat
3130 {
31# ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33# else
3234 __dev_t st_dev; /* Device. */
33# ifndef __USE_FILE_OFFSET64
35# ifndef __USE_FILE_OFFSET64
3436 unsigned short int __pad1;
3537 __ino_t st_ino; /* File serial number. */
36# else
38# else
3739 __ino64_t st_ino; /* File serial number. */
38# endif
40# endif
3941 __mode_t st_mode; /* File mode. */
4042 __nlink_t st_nlink; /* Link count. */
4143 __uid_t st_uid; /* User ID of the file's owner. */
4244 __gid_t st_gid; /* Group ID of the file's group.*/
4345 __dev_t st_rdev; /* Device number, if device. */
4446 unsigned short int __pad2;
45# ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4648 __off_t st_size; /* Size of file, in bytes. */
47# else
49# else
4850 __off64_t st_size; /* Size of file, in bytes. */
49# endif
51# endif
5052 __blksize_t st_blksize; /* Optimal block size for I/O. */
5153
52# ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5355 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
54# else
56# else
5557 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
56# endif
57# ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5860 /* Nanosecond resolution timestamps are stored in a format
5961 equivalent to 'struct timespec'. This is the type used
6062 whenever possible but the Unix namespace rules do not allow the
......@@ -64,25 +66,28 @@ struct stat
6466 struct timespec st_atim; /* Time of last access. */
6567 struct timespec st_mtim; /* Time of last modification. */
6668 struct timespec st_ctim; /* Time of last status change. */
67# define st_atime st_atim.tv_sec /* Backward compatibility. */
68# define st_mtime st_mtim.tv_sec
69# define st_ctime st_ctim.tv_sec
70# else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7173 __time_t st_atime; /* Time of last access. */
7274 unsigned long int st_atimensec; /* Nscecs of last access. */
7375 __time_t st_mtime; /* Time of last modification. */
7476 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7577 __time_t st_ctime; /* Time of last status change. */
7678 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77# endif
79# endif
7880 unsigned long int __glibc_reserved4;
7981 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
8083 };
8184
82
8385# ifdef __USE_LARGEFILE64
8486struct stat64
8587 {
88# ifdef __USE_TIME_BITS64
89# include <bits/struct_stat_time64_helper.h>
90# else
8691 __dev_t st_dev; /* Device. */
8792 __ino64_t st_ino; /* File serial number. */
8893 __mode_t st_mode; /* File mode. */
......@@ -94,7 +99,7 @@ struct stat64
9499 __off64_t st_size; /* Size of file, in bytes. */
95100 __blksize_t st_blksize; /* Optimal block size for I/O. */
96101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
97# ifdef __USE_XOPEN2K8
102# ifdef __USE_XOPEN2K8
98103 /* Nanosecond resolution timestamps are stored in a format
99104 equivalent to 'struct timespec'. This is the type used
100105 whenever possible but the Unix namespace rules do not allow the
......@@ -104,19 +109,20 @@ struct stat64
104109 struct timespec st_atim; /* Time of last access. */
105110 struct timespec st_mtim; /* Time of last modification. */
106111 struct timespec st_ctim; /* Time of last status change. */
107# define st_atime st_atim.tv_sec /* Backward compatibility. */
108# define st_mtime st_mtim.tv_sec
109# define st_ctime st_ctim.tv_sec
110# else
112# define st_atime st_atim.tv_sec /* Backward compatibility. */
113# define st_mtime st_mtim.tv_sec
114# define st_ctime st_ctim.tv_sec
115# else
111116 __time_t st_atime; /* Time of last access. */
112117 unsigned long int st_atimensec; /* Nscecs of last access. */
113118 __time_t st_mtime; /* Time of last modification. */
114119 unsigned long int st_mtimensec; /* Nsecs of last modification. */
115120 __time_t st_ctime; /* Time of last status change. */
116121 unsigned long int st_ctimensec; /* Nsecs of last status change. */
117# endif
122# endif
118123 unsigned long int __glibc_reserved4;
119124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
120126 };
121127# endif /* __USE_LARGEFILE64 */
122128
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h+9-3
......@@ -20,23 +20,28 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
33# if __TIMESIZE == 32
2934 unsigned long int __msg_stime_high;
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_rtime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_ctime_high;
3439 __time_t msg_ctime; /* time of last change */
35#else
40# else
3641 __time_t msg_stime; /* time of last msgsnd command */
3742 __time_t msg_rtime; /* time of last msgsnd command */
3843 __time_t msg_ctime; /* time of last change */
39#endif
44# endif
4045 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
4146 msgqnum_t msg_qnum; /* number of messages currently on queue */
4247 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -44,4 +49,5 @@ struct msqid_ds
4449 __pid_t msg_lrpid; /* pid of last msgrcv() */
4550 __syscall_ulong_t __glibc_reserved4;
4651 __syscall_ulong_t __glibc_reserved5;
52#endif
4753};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h+7-3
......@@ -23,17 +23,21 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 __syscall_ulong_t __sem_otime_high;
2932 __time_t sem_otime; /* last semop() time */
3033 __syscall_ulong_t __sem_ctime_high;
3134 __time_t sem_ctime; /* last time changed by semctl() */
32#else
35# else
3336 __time_t sem_otime; /* last semop() time */
3437 __time_t sem_ctime; /* last time changed by semctl() */
35#endif
38# endif
3639 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3740 __syscall_ulong_t __glibc_reserved3;
3841 __syscall_ulong_t __glibc_reserved4;
42#endif
3943};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h+7-3
......@@ -23,8 +23,11 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 unsigned long int __shm_atime_high;
2932 __time_t shm_atime; /* time of last shmat() */
3033 unsigned long int __shm_dtime_high;
......@@ -32,15 +35,16 @@ struct shmid_ds
3235 unsigned long int __shm_ctime_high;
3336 __time_t shm_ctime; /* time of last change by shmctl() */
3437 unsigned long int __glibc_reserved4;
35#else
38# else
3639 __time_t shm_atime; /* time of last shmat() */
3740 __time_t shm_dtime; /* time of last shmdt() */
3841 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif
42# endif
4043 size_t shm_segsz; /* size of segment in bytes */
4144 __pid_t shm_cpid; /* pid of creator */
4245 __pid_t shm_lpid; /* pid of last shmop */
4346 shmatt_t shm_nattch; /* number of current attaches */
4447 __syscall_ulong_t __glibc_reserved5;
4548 __syscall_ulong_t __glibc_reserved6;
49#endif
4650 };
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h+10
......@@ -70,6 +70,8 @@ __BEGIN_DECLS
7070# undef PTRACE_SYSCALL_INFO_ENTRY
7171# undef PTRACE_SYSCALL_INFO_EXIT
7272# undef PTRACE_SYSCALL_INFO_SECCOMP
73# undef PTRACE_SYSEMU
74# undef PTRACE_SYSEMU_SINGLESTEP
7375# undef PTRACE_TRACEME
7476#endif
7577
......@@ -188,6 +190,14 @@ enum __ptrace_request
188190 PTRACE_SETVSRREGS = 28,
189191#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
191201 /* Execute process until next taken branch. */
192202 PTRACE_SINGLEBLOCK = 256,
193203#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 @@
3030#define SO_OOBINLINE 10
3131#define SO_RCVBUF 8
3232#define SO_RCVLOWAT 16
33#define SO_RCVTIMEO 18
3433#define SO_REUSEADDR 2
3534#define SO_SNDBUF 7
3635#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 @@
2626#include <bits/wordsize.h>
2727
2828#if __WORDSIZE == 32
29
3029struct stat
3130 {
31# ifdef __USE_TIME_BITS64
32# include <bits/struct_stat_time64_helper.h>
33# else
3234 __dev_t st_dev; /* Device. */
33# ifndef __USE_FILE_OFFSET64
35# ifndef __USE_FILE_OFFSET64
3436 unsigned short int __pad1;
3537 __ino_t st_ino; /* File serial number. */
36# else
38# else
3739 __ino64_t st_ino; /* File serial number. */
38# endif
40# endif
3941 __mode_t st_mode; /* File mode. */
4042 __nlink_t st_nlink; /* Link count. */
4143 __uid_t st_uid; /* User ID of the file's owner. */
4244 __gid_t st_gid; /* Group ID of the file's group.*/
4345 __dev_t st_rdev; /* Device number, if device. */
4446 unsigned short int __pad2;
45# ifndef __USE_FILE_OFFSET64
47# ifndef __USE_FILE_OFFSET64
4648 __off_t st_size; /* Size of file, in bytes. */
47# else
49# else
4850 __off64_t st_size; /* Size of file, in bytes. */
49# endif
51# endif
5052 __blksize_t st_blksize; /* Optimal block size for I/O. */
5153
52# ifndef __USE_FILE_OFFSET64
54# ifndef __USE_FILE_OFFSET64
5355 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
54# else
56# else
5557 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
56# endif
57# ifdef __USE_XOPEN2K8
58# endif
59# ifdef __USE_XOPEN2K8
5860 /* Nanosecond resolution timestamps are stored in a format
5961 equivalent to 'struct timespec'. This is the type used
6062 whenever possible but the Unix namespace rules do not allow the
......@@ -64,25 +66,28 @@ struct stat
6466 struct timespec st_atim; /* Time of last access. */
6567 struct timespec st_mtim; /* Time of last modification. */
6668 struct timespec st_ctim; /* Time of last status change. */
67# define st_atime st_atim.tv_sec /* Backward compatibility. */
68# define st_mtime st_mtim.tv_sec
69# define st_ctime st_ctim.tv_sec
70# else
69# define st_atime st_atim.tv_sec /* Backward compatibility. */
70# define st_mtime st_mtim.tv_sec
71# define st_ctime st_ctim.tv_sec
72# else
7173 __time_t st_atime; /* Time of last access. */
7274 unsigned long int st_atimensec; /* Nscecs of last access. */
7375 __time_t st_mtime; /* Time of last modification. */
7476 unsigned long int st_mtimensec; /* Nsecs of last modification. */
7577 __time_t st_ctime; /* Time of last status change. */
7678 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77# endif
79# endif
7880 unsigned long int __glibc_reserved4;
7981 unsigned long int __glibc_reserved5;
82# endif /* __USE_TIME_BITS64 */
8083 };
8184
82
8385# ifdef __USE_LARGEFILE64
8486struct stat64
8587 {
88# ifdef __USE_TIME_BITS64
89# include <bits/struct_stat_time64_helper.h>
90# else
8691 __dev_t st_dev; /* Device. */
8792 __ino64_t st_ino; /* File serial number. */
8893 __mode_t st_mode; /* File mode. */
......@@ -94,7 +99,7 @@ struct stat64
9499 __off64_t st_size; /* Size of file, in bytes. */
95100 __blksize_t st_blksize; /* Optimal block size for I/O. */
96101 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
97# ifdef __USE_XOPEN2K8
102# ifdef __USE_XOPEN2K8
98103 /* Nanosecond resolution timestamps are stored in a format
99104 equivalent to 'struct timespec'. This is the type used
100105 whenever possible but the Unix namespace rules do not allow the
......@@ -104,19 +109,20 @@ struct stat64
104109 struct timespec st_atim; /* Time of last access. */
105110 struct timespec st_mtim; /* Time of last modification. */
106111 struct timespec st_ctim; /* Time of last status change. */
107# define st_atime st_atim.tv_sec /* Backward compatibility. */
108# define st_mtime st_mtim.tv_sec
109# define st_ctime st_ctim.tv_sec
110# else
112# define st_atime st_atim.tv_sec /* Backward compatibility. */
113# define st_mtime st_mtim.tv_sec
114# define st_ctime st_ctim.tv_sec
115# else
111116 __time_t st_atime; /* Time of last access. */
112117 unsigned long int st_atimensec; /* Nscecs of last access. */
113118 __time_t st_mtime; /* Time of last modification. */
114119 unsigned long int st_mtimensec; /* Nsecs of last modification. */
115120 __time_t st_ctime; /* Time of last status change. */
116121 unsigned long int st_ctimensec; /* Nsecs of last status change. */
117# endif
122# endif
118123 unsigned long int __glibc_reserved4;
119124 unsigned long int __glibc_reserved5;
125# endif /* __USE_TIME_BITS64 */
120126 };
121127# endif /* __USE_LARGEFILE64 */
122128
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h+9-3
......@@ -20,23 +20,28 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
33# if __TIMESIZE == 32
2934 unsigned long int __msg_stime_high;
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_rtime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_ctime_high;
3439 __time_t msg_ctime; /* time of last change */
35#else
40# else
3641 __time_t msg_stime; /* time of last msgsnd command */
3742 __time_t msg_rtime; /* time of last msgsnd command */
3843 __time_t msg_ctime; /* time of last change */
39#endif
44# endif
4045 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
4146 msgqnum_t msg_qnum; /* number of messages currently on queue */
4247 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -44,4 +49,5 @@ struct msqid_ds
4449 __pid_t msg_lrpid; /* pid of last msgrcv() */
4550 __syscall_ulong_t __glibc_reserved4;
4651 __syscall_ulong_t __glibc_reserved5;
52#endif
4753};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h+7-3
......@@ -23,17 +23,21 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 __syscall_ulong_t __sem_otime_high;
2932 __time_t sem_otime; /* last semop() time */
3033 __syscall_ulong_t __sem_ctime_high;
3134 __time_t sem_ctime; /* last time changed by semctl() */
32#else
35# else
3336 __time_t sem_otime; /* last semop() time */
3437 __time_t sem_ctime; /* last time changed by semctl() */
35#endif
38# endif
3639 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3740 __syscall_ulong_t __glibc_reserved3;
3841 __syscall_ulong_t __glibc_reserved4;
42#endif
3943};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h+7-3
......@@ -23,8 +23,11 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 unsigned long int __shm_atime_high;
2932 __time_t shm_atime; /* time of last shmat() */
3033 unsigned long int __shm_dtime_high;
......@@ -32,15 +35,16 @@ struct shmid_ds
3235 unsigned long int __shm_ctime_high;
3336 __time_t shm_ctime; /* time of last change by shmctl() */
3437 unsigned long int __glibc_reserved4;
35#else
38# else
3639 __time_t shm_atime; /* time of last shmat() */
3740 __time_t shm_dtime; /* time of last shmdt() */
3841 __time_t shm_ctime; /* time of last change by shmctl() */
39#endif
42# endif
4043 size_t shm_segsz; /* size of segment in bytes */
4144 __pid_t shm_cpid; /* pid of creator */
4245 __pid_t shm_lpid; /* pid of last shmop */
4346 shmatt_t shm_nattch; /* number of current attaches */
4447 __syscall_ulong_t __glibc_reserved5;
4548 __syscall_ulong_t __glibc_reserved6;
49#endif
4650 };
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h+10
......@@ -70,6 +70,8 @@ __BEGIN_DECLS
7070# undef PTRACE_SYSCALL_INFO_ENTRY
7171# undef PTRACE_SYSCALL_INFO_EXIT
7272# undef PTRACE_SYSCALL_INFO_SECCOMP
73# undef PTRACE_SYSEMU
74# undef PTRACE_SYSEMU_SINGLESTEP
7375# undef PTRACE_TRACEME
7476#endif
7577
......@@ -188,6 +190,14 @@ enum __ptrace_request
188190 PTRACE_SETVSRREGS = 28,
189191#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
191201 /* Execute process until next taken branch. */
192202 PTRACE_SINGLEBLOCK = 256,
193203#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 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/s390x-linux-gnu/bits/hwcap.h+3-1
......@@ -45,4 +45,6 @@
4545#define HWCAP_S390_VXRS_EXT2 32768
4646#define HWCAP_S390_VXRS_PDE 65536
4747#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
6565#else
6666struct stat
6767 {
68# ifdef __USE_TIME_BITS64
69# include <bits/struct_stat_time64_helper.h>
70# else
6871 __dev_t st_dev; /* Device. */
6972 unsigned int __pad1;
70# ifndef __USE_FILE_OFFSET64
73# ifndef __USE_FILE_OFFSET64
7174 __ino_t st_ino; /* File serial number. */
72# else
75# else
7376 __ino_t __st_ino; /* 32bit file serial number. */
74# endif
77# endif
7578 __mode_t st_mode; /* File mode. */
7679 __nlink_t st_nlink; /* Link count. */
7780 __uid_t st_uid; /* User ID of the file's owner. */
7881 __gid_t st_gid; /* Group ID of the file's group.*/
7982 __dev_t st_rdev; /* Device number, if device. */
8083 unsigned int __pad2;
81# ifndef __USE_FILE_OFFSET64
84# ifndef __USE_FILE_OFFSET64
8285 __off_t st_size; /* Size of file, in bytes. */
83# else
86# else
8487 __off64_t st_size; /* Size of file, in bytes. */
85# endif
88# endif
8689 __blksize_t st_blksize; /* Optimal block size for I/O. */
8790
88# ifndef __USE_FILE_OFFSET64
91# ifndef __USE_FILE_OFFSET64
8992 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
90# else
93# else
9194 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
92# endif
93# ifdef __USE_XOPEN2K8
95# endif
96# ifdef __USE_XOPEN2K8
9497 /* Nanosecond resolution timestamps are stored in a format
9598 equivalent to 'struct timespec'. This is the type used
9699 whenever possible but the Unix namespace rules do not allow the
......@@ -100,25 +103,26 @@ struct stat
100103 struct timespec st_atim; /* Time of last access. */
101104 struct timespec st_mtim; /* Time of last modification. */
102105 struct timespec st_ctim; /* Time of last status change. */
103# define st_atime st_atim.tv_sec /* Backward compatibility. */
104# define st_mtime st_mtim.tv_sec
105# define st_ctime st_ctim.tv_sec
106# else
106# define st_atime st_atim.tv_sec /* Backward compatibility. */
107# define st_mtime st_mtim.tv_sec
108# define st_ctime st_ctim.tv_sec
109# else
107110 __time_t st_atime; /* Time of last access. */
108111 unsigned long int st_atimensec; /* Nscecs of last access. */
109112 __time_t st_mtime; /* Time of last modification. */
110113 unsigned long int st_mtimensec; /* Nsecs of last modification. */
111114 __time_t st_ctime; /* Time of last status change. */
112115 unsigned long int st_ctimensec; /* Nsecs of last status change. */
113# endif
114# ifndef __USE_FILE_OFFSET64
116# endif
117# ifndef __USE_FILE_OFFSET64
115118 unsigned long int __glibc_reserved4;
116119 unsigned long int __glibc_reserved5;
117# else
120# else
118121 __ino64_t st_ino; /* File serial number. */
122# endif
119123# endif
120124 };
121#endif
125# endif
122126
123127#ifdef __USE_LARGEFILE64
124128# if __WORDSIZE == 64
......@@ -162,6 +166,9 @@ struct stat64
162166# else
163167struct stat64
164168 {
169# ifdef __USE_TIME_BITS64
170# include <bits/struct_stat_time64_helper.h>
171# else
165172 __dev_t st_dev; /* Device. */
166173 unsigned int __pad1;
167174
......@@ -176,7 +183,7 @@ struct stat64
176183 __blksize_t st_blksize; /* Optimal block size for I/O. */
177184
178185 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
179# ifdef __USE_XOPEN2K8
186# ifdef __USE_XOPEN2K8
180187 /* Nanosecond resolution timestamps are stored in a format
181188 equivalent to 'struct timespec'. This is the type used
182189 whenever possible but the Unix namespace rules do not allow the
......@@ -186,18 +193,19 @@ struct stat64
186193 struct timespec st_atim; /* Time of last access. */
187194 struct timespec st_mtim; /* Time of last modification. */
188195 struct timespec st_ctim; /* Time of last status change. */
189# define st_atime st_atim.tv_sec /* Backward compatibility. */
190# define st_mtime st_mtim.tv_sec
191# define st_ctime st_ctim.tv_sec
192# else
196# define st_atime st_atim.tv_sec /* Backward compatibility. */
197# define st_mtime st_mtim.tv_sec
198# define st_ctime st_ctim.tv_sec
199# else
193200 __time_t st_atime; /* Time of last access. */
194201 unsigned long int st_atimensec; /* Nscecs of last access. */
195202 __time_t st_mtime; /* Time of last modification. */
196203 unsigned long int st_mtimensec; /* Nsecs of last modification. */
197204 __time_t st_ctime; /* Time of last status change. */
198205 unsigned long int st_ctimensec; /* Nsecs of last status change. */
199# endif
206# endif
200207 __ino64_t st_ino; /* File serial number. */
208# endif
201209 };
202210# endif
203211#endif
lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/s390x-linux-gnu/sys/ptrace.h+10
......@@ -39,6 +39,8 @@ __BEGIN_DECLS
3939# undef PTRACE_ATTACH
4040# undef PTRACE_DETACH
4141# undef PTRACE_SYSCALL
42# undef PTRACE_SYSEMU
43# undef PTRACE_SYSEMU_SINGLESTEP
4244# undef PTRACE_SETOPTIONS
4345# undef PTRACE_GETEVENTMSG
4446# undef PTRACE_GETSIGINFO
......@@ -146,6 +148,14 @@ enum __ptrace_request
146148 PTRACE_SYSCALL = 24,
147149#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
149159 /* Set ptrace filter options. */
150160 PTRACE_SETOPTIONS = 0x4200,
151161#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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 2048
33#define SO_RCVTIMEO 8192
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
33# if __TIMESIZE == 32
2934 unsigned long int __msg_stime_high;
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_rtime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_ctime_high;
3439 __time_t msg_ctime; /* time of last change */
35#else
40# else
3641 __time_t msg_stime; /* time of last msgsnd command */
3742 __time_t msg_rtime; /* time of last msgsnd command */
3843 __time_t msg_ctime; /* time of last change */
39#endif
44# endif
4045 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
4146 msgqnum_t msg_qnum; /* number of messages currently on queue */
4247 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -44,4 +49,5 @@ struct msqid_ds
4449 __pid_t msg_lrpid; /* pid of last msgrcv() */
4550 __syscall_ulong_t __glibc_reserved4;
4651 __syscall_ulong_t __glibc_reserved5;
52#endif
4753};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h+7-3
......@@ -23,17 +23,21 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 __syscall_ulong_t __sem_otime_high;
2932 __time_t sem_otime; /* last semop() time */
3033 __syscall_ulong_t __sem_ctime_high;
3134 __time_t sem_ctime; /* last time changed by semctl() */
32#else
35# else
3336 __time_t sem_otime; /* last semop() time */
3437 __time_t sem_ctime; /* last time changed by semctl() */
35#endif
38# endif
3639 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3740 __syscall_ulong_t __glibc_reserved3;
3841 __syscall_ulong_t __glibc_reserved4;
42#endif
3943};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h+7-3
......@@ -23,23 +23,27 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 unsigned long int __shm_atime_high;
2932 __time_t shm_atime; /* time of last shmat() */
3033 unsigned long int __shm_dtime_high;
3134 __time_t shm_dtime; /* time of last shmdt() */
3235 unsigned long int __shm_ctime_high;
3336 __time_t shm_ctime; /* time of last change by shmctl() */
34#else
37# else
3538 __time_t shm_atime; /* time of last shmat() */
3639 __time_t shm_dtime; /* time of last shmdt() */
3740 __time_t shm_ctime; /* time of last change by shmctl() */
38#endif
41# endif
3942 size_t shm_segsz; /* size of segment in bytes */
4043 __pid_t shm_cpid; /* pid of creator */
4144 __pid_t shm_lpid; /* pid of last shmop */
4245 shmatt_t shm_nattch; /* number of current attaches */
4346 __syscall_ulong_t __glibc_reserved5;
4447 __syscall_ulong_t __glibc_reserved6;
48#endif
4549 };
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#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 @@
3030#define SO_OOBINLINE 256
3131#define SO_RCVBUF 4098
3232#define SO_RCVLOWAT 2048
33#define SO_RCVTIMEO 8192
3433#define SO_REUSEADDR 4
3534#define SO_SNDBUF 4097
3635#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 @@
2020# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
2121#endif
2222
23#include <bits/types/time_t.h>
24
2325/* Structure of record for one message inside the kernel.
2426 The type `struct msg' is opaque. */
2527struct msqid_ds
2628{
29#ifdef __USE_TIME_BITS64
30# include <bits/types/struct_msqid64_ds_helper.h>
31#else
2732 struct ipc_perm msg_perm; /* structure describing operation permission */
28#if __TIMESIZE == 32
33# if __TIMESIZE == 32
2934 unsigned long int __msg_stime_high;
3035 __time_t msg_stime; /* time of last msgsnd command */
3136 unsigned long int __msg_rtime_high;
3237 __time_t msg_rtime; /* time of last msgsnd command */
3338 unsigned long int __msg_ctime_high;
3439 __time_t msg_ctime; /* time of last change */
35#else
40# else
3641 __time_t msg_stime; /* time of last msgsnd command */
3742 __time_t msg_rtime; /* time of last msgsnd command */
3843 __time_t msg_ctime; /* time of last change */
39#endif
44# endif
4045 __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
4146 msgqnum_t msg_qnum; /* number of messages currently on queue */
4247 msglen_t msg_qbytes; /* max number of bytes allowed on queue */
......@@ -44,4 +49,5 @@ struct msqid_ds
4449 __pid_t msg_lrpid; /* pid of last msgrcv() */
4550 __syscall_ulong_t __glibc_reserved4;
4651 __syscall_ulong_t __glibc_reserved5;
52#endif
4753};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h+7-3
......@@ -23,17 +23,21 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 __syscall_ulong_t __sem_otime_high;
2932 __time_t sem_otime; /* last semop() time */
3033 __syscall_ulong_t __sem_ctime_high;
3134 __time_t sem_ctime; /* last time changed by semctl() */
32#else
35# else
3336 __time_t sem_otime; /* last semop() time */
3437 __time_t sem_ctime; /* last time changed by semctl() */
35#endif
38# endif
3639 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3740 __syscall_ulong_t __glibc_reserved3;
3841 __syscall_ulong_t __glibc_reserved4;
42#endif
3943};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h+7-3
......@@ -23,23 +23,27 @@
2323/* Data structure describing a shared memory segment. */
2424struct shmid_ds
2525 {
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_shmid64_ds_helper.h>
28#else
2629 struct ipc_perm shm_perm; /* operation permission struct */
27#if __TIMESIZE == 32
30# if __TIMESIZE == 32
2831 unsigned long int __shm_atime_high;
2932 __time_t shm_atime; /* time of last shmat() */
3033 unsigned long int __shm_dtime_high;
3134 __time_t shm_dtime; /* time of last shmdt() */
3235 unsigned long int __shm_ctime_high;
3336 __time_t shm_ctime; /* time of last change by shmctl() */
34#else
37# else
3538 __time_t shm_atime; /* time of last shmat() */
3639 __time_t shm_dtime; /* time of last shmdt() */
3740 __time_t shm_ctime; /* time of last change by shmctl() */
38#endif
41# endif
3942 size_t shm_segsz; /* size of segment in bytes */
4043 __pid_t shm_cpid; /* pid of creator */
4144 __pid_t shm_lpid; /* pid of last shmop */
4245 shmatt_t shm_nattch; /* number of current attaches */
4346 __syscall_ulong_t __glibc_reserved5;
4447 __syscall_ulong_t __glibc_reserved6;
48#endif
4549 };
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h+49-41
......@@ -25,43 +25,46 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
2831 __dev_t st_dev; /* Device. */
29#ifndef __x86_64__
32# ifndef __x86_64__
3033 unsigned short int __pad1;
31#endif
32#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
34# endif
35# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
3336 __ino_t st_ino; /* File serial number. */
34#else
37# else
3538 __ino_t __st_ino; /* 32bit file serial number. */
36#endif
37#ifndef __x86_64__
39# endif
40# ifndef __x86_64__
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
40#else
43# else
4144 __nlink_t st_nlink; /* Link count. */
4245 __mode_t st_mode; /* File mode. */
43#endif
46# endif
4447 __uid_t st_uid; /* User ID of the file's owner. */
4548 __gid_t st_gid; /* Group ID of the file's group.*/
46#ifdef __x86_64__
49# ifdef __x86_64__
4750 int __pad0;
48#endif
51# endif
4952 __dev_t st_rdev; /* Device number, if device. */
50#ifndef __x86_64__
53# ifndef __x86_64__
5154 unsigned short int __pad2;
52#endif
53#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
55# endif
56# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
5457 __off_t st_size; /* Size of file, in bytes. */
55#else
58# else
5659 __off64_t st_size; /* Size of file, in bytes. */
57#endif
60# endif
5861 __blksize_t st_blksize; /* Optimal block size for I/O. */
59#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
62# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
6063 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else
64# else
6265 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63#endif
64#ifdef __USE_XOPEN2K8
66# endif
67# ifdef __USE_XOPEN2K8
6568 /* Nanosecond resolution timestamps are stored in a format
6669 equivalent to 'struct timespec'. This is the type used
6770 whenever possible but the Unix namespace rules do not allow the
......@@ -71,58 +74,62 @@ struct stat
7174 struct timespec st_atim; /* Time of last access. */
7275 struct timespec st_mtim; /* Time of last modification. */
7376 struct timespec st_ctim; /* Time of last status change. */
74# define st_atime st_atim.tv_sec /* Backward compatibility. */
75# define st_mtime st_mtim.tv_sec
76# define st_ctime st_ctim.tv_sec
77#else
77# define st_atime st_atim.tv_sec /* Backward compatibility. */
78# define st_mtime st_mtim.tv_sec
79# define st_ctime st_ctim.tv_sec
80# else
7881 __time_t st_atime; /* Time of last access. */
7982 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
8083 __time_t st_mtime; /* Time of last modification. */
8184 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
8285 __time_t st_ctime; /* Time of last status change. */
8386 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
84#endif
85#ifdef __x86_64__
87# endif
88# ifdef __x86_64__
8689 __syscall_slong_t __glibc_reserved[3];
87#else
88# ifndef __USE_FILE_OFFSET64
90# else
91# ifndef __USE_FILE_OFFSET64
8992 unsigned long int __glibc_reserved4;
9093 unsigned long int __glibc_reserved5;
91# else
94# else
9295 __ino64_t st_ino; /* File serial number. */
96# endif
9397# endif
94#endif
98#endif /* __USE_TIME_BITS64 */
9599 };
96100
97101#ifdef __USE_LARGEFILE64
98102/* Note stat64 has the same shape as stat for x86-64. */
99103struct stat64
100104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
101108 __dev_t st_dev; /* Device. */
102# ifdef __x86_64__
109# ifdef __x86_64__
103110 __ino64_t st_ino; /* File serial number. */
104111 __nlink_t st_nlink; /* Link count. */
105112 __mode_t st_mode; /* File mode. */
106# else
113# else
107114 unsigned int __pad1;
108115 __ino_t __st_ino; /* 32bit file serial number. */
109116 __mode_t st_mode; /* File mode. */
110117 __nlink_t st_nlink; /* Link count. */
111# endif
118# endif
112119 __uid_t st_uid; /* User ID of the file's owner. */
113120 __gid_t st_gid; /* Group ID of the file's group.*/
114# ifdef __x86_64__
121# ifdef __x86_64__
115122 int __pad0;
116123 __dev_t st_rdev; /* Device number, if device. */
117124 __off_t st_size; /* Size of file, in bytes. */
118# else
125# else
119126 __dev_t st_rdev; /* Device number, if device. */
120127 unsigned int __pad2;
121128 __off64_t st_size; /* Size of file, in bytes. */
122# endif
129# endif
123130 __blksize_t st_blksize; /* Optimal block size for I/O. */
124131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
125# ifdef __USE_XOPEN2K8
132# ifdef __USE_XOPEN2K8
126133 /* Nanosecond resolution timestamps are stored in a format
127134 equivalent to 'struct timespec'. This is the type used
128135 whenever possible but the Unix namespace rules do not allow the
......@@ -132,19 +139,20 @@ struct stat64
132139 struct timespec st_atim; /* Time of last access. */
133140 struct timespec st_mtim; /* Time of last modification. */
134141 struct timespec st_ctim; /* Time of last status change. */
135# else
142# else
136143 __time_t st_atime; /* Time of last access. */
137144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
138145 __time_t st_mtime; /* Time of last modification. */
139146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
140147 __time_t st_ctime; /* Time of last status change. */
141148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
142# endif
143# ifdef __x86_64__
149# endif
150# ifdef __x86_64__
144151 __syscall_slong_t __glibc_reserved[3];
145# else
152# else
146153 __ino64_t st_ino; /* File serial number. */
147# endif
154# endif
155# endif /* __USE_TIME_BITS64 */
148156 };
149157#endif
150158
lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h+4
......@@ -23,6 +23,9 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __syscall_ulong_t __sem_otime_high;
......@@ -31,4 +34,5 @@ struct semid_ds
3134 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3235 __syscall_ulong_t __glibc_reserved3;
3336 __syscall_ulong_t __glibc_reserved4;
37#endif
3438};
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#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 @@
2525
2626struct stat
2727 {
28#ifdef __USE_TIME_BITS64
29# include <bits/struct_stat_time64_helper.h>
30#else
2831 __dev_t st_dev; /* Device. */
29#ifndef __x86_64__
32# ifndef __x86_64__
3033 unsigned short int __pad1;
31#endif
32#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
34# endif
35# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
3336 __ino_t st_ino; /* File serial number. */
34#else
37# else
3538 __ino_t __st_ino; /* 32bit file serial number. */
36#endif
37#ifndef __x86_64__
39# endif
40# ifndef __x86_64__
3841 __mode_t st_mode; /* File mode. */
3942 __nlink_t st_nlink; /* Link count. */
40#else
43# else
4144 __nlink_t st_nlink; /* Link count. */
4245 __mode_t st_mode; /* File mode. */
43#endif
46# endif
4447 __uid_t st_uid; /* User ID of the file's owner. */
4548 __gid_t st_gid; /* Group ID of the file's group.*/
46#ifdef __x86_64__
49# ifdef __x86_64__
4750 int __pad0;
48#endif
51# endif
4952 __dev_t st_rdev; /* Device number, if device. */
50#ifndef __x86_64__
53# ifndef __x86_64__
5154 unsigned short int __pad2;
52#endif
53#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
55# endif
56# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
5457 __off_t st_size; /* Size of file, in bytes. */
55#else
58# else
5659 __off64_t st_size; /* Size of file, in bytes. */
57#endif
60# endif
5861 __blksize_t st_blksize; /* Optimal block size for I/O. */
59#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
62# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
6063 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
61#else
64# else
6265 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
63#endif
64#ifdef __USE_XOPEN2K8
66# endif
67# ifdef __USE_XOPEN2K8
6568 /* Nanosecond resolution timestamps are stored in a format
6669 equivalent to 'struct timespec'. This is the type used
6770 whenever possible but the Unix namespace rules do not allow the
......@@ -71,58 +74,62 @@ struct stat
7174 struct timespec st_atim; /* Time of last access. */
7275 struct timespec st_mtim; /* Time of last modification. */
7376 struct timespec st_ctim; /* Time of last status change. */
74# define st_atime st_atim.tv_sec /* Backward compatibility. */
75# define st_mtime st_mtim.tv_sec
76# define st_ctime st_ctim.tv_sec
77#else
77# define st_atime st_atim.tv_sec /* Backward compatibility. */
78# define st_mtime st_mtim.tv_sec
79# define st_ctime st_ctim.tv_sec
80# else
7881 __time_t st_atime; /* Time of last access. */
7982 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
8083 __time_t st_mtime; /* Time of last modification. */
8184 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
8285 __time_t st_ctime; /* Time of last status change. */
8386 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
84#endif
85#ifdef __x86_64__
87# endif
88# ifdef __x86_64__
8689 __syscall_slong_t __glibc_reserved[3];
87#else
88# ifndef __USE_FILE_OFFSET64
90# else
91# ifndef __USE_FILE_OFFSET64
8992 unsigned long int __glibc_reserved4;
9093 unsigned long int __glibc_reserved5;
91# else
94# else
9295 __ino64_t st_ino; /* File serial number. */
96# endif
9397# endif
94#endif
98#endif /* __USE_TIME_BITS64 */
9599 };
96100
97101#ifdef __USE_LARGEFILE64
98102/* Note stat64 has the same shape as stat for x86-64. */
99103struct stat64
100104 {
105# ifdef __USE_TIME_BITS64
106# include <bits/struct_stat_time64_helper.h>
107# else
101108 __dev_t st_dev; /* Device. */
102# ifdef __x86_64__
109# ifdef __x86_64__
103110 __ino64_t st_ino; /* File serial number. */
104111 __nlink_t st_nlink; /* Link count. */
105112 __mode_t st_mode; /* File mode. */
106# else
113# else
107114 unsigned int __pad1;
108115 __ino_t __st_ino; /* 32bit file serial number. */
109116 __mode_t st_mode; /* File mode. */
110117 __nlink_t st_nlink; /* Link count. */
111# endif
118# endif
112119 __uid_t st_uid; /* User ID of the file's owner. */
113120 __gid_t st_gid; /* Group ID of the file's group.*/
114# ifdef __x86_64__
121# ifdef __x86_64__
115122 int __pad0;
116123 __dev_t st_rdev; /* Device number, if device. */
117124 __off_t st_size; /* Size of file, in bytes. */
118# else
125# else
119126 __dev_t st_rdev; /* Device number, if device. */
120127 unsigned int __pad2;
121128 __off64_t st_size; /* Size of file, in bytes. */
122# endif
129# endif
123130 __blksize_t st_blksize; /* Optimal block size for I/O. */
124131 __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
125# ifdef __USE_XOPEN2K8
132# ifdef __USE_XOPEN2K8
126133 /* Nanosecond resolution timestamps are stored in a format
127134 equivalent to 'struct timespec'. This is the type used
128135 whenever possible but the Unix namespace rules do not allow the
......@@ -132,19 +139,20 @@ struct stat64
132139 struct timespec st_atim; /* Time of last access. */
133140 struct timespec st_mtim; /* Time of last modification. */
134141 struct timespec st_ctim; /* Time of last status change. */
135# else
142# else
136143 __time_t st_atime; /* Time of last access. */
137144 __syscall_ulong_t st_atimensec; /* Nscecs of last access. */
138145 __time_t st_mtime; /* Time of last modification. */
139146 __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
140147 __time_t st_ctime; /* Time of last status change. */
141148 __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
142# endif
143# ifdef __x86_64__
149# endif
150# ifdef __x86_64__
144151 __syscall_slong_t __glibc_reserved[3];
145# else
152# else
146153 __ino64_t st_ino; /* File serial number. */
147# endif
154# endif
155# endif /* __USE_TIME_BITS64 */
148156 };
149157#endif
150158
lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h+4
......@@ -23,6 +23,9 @@
2323/* Data structure describing a set of semaphores. */
2424struct semid_ds
2525{
26#ifdef __USE_TIME_BITS64
27# include <bits/types/struct_semid64_ds_helper.h>
28#else
2629 struct ipc_perm sem_perm; /* operation permission struct */
2730 __time_t sem_otime; /* last semop() time */
2831 __syscall_ulong_t __sem_otime_high;
......@@ -31,4 +34,5 @@ struct semid_ds
3134 __syscall_ulong_t sem_nsems; /* number of semaphores in set */
3235 __syscall_ulong_t __glibc_reserved3;
3336 __syscall_ulong_t __glibc_reserved4;
37#endif
3438};
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h+1
......@@ -8,6 +8,7 @@
88#define LIBANL_SO "libanl.so.1"
99#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
1010#define LIBCRYPT_SO "libcrypt.so.1"
11#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
1112#define LIBC_SO "libc.so.6"
1213#define LIBDL_SO "libdl.so.2"
1314#define LIBGCC_S_SO "libgcc_s.so.1"