Commit 1edf8efa42
Changed files (200)
lib
libc
include
aarch64-linux-gnu
aarch64_be-linux-gnu
arm-linux-gnueabi
bits
arm-linux-gnueabihf
bits
armeb-linux-gnueabi
bits
armeb-linux-gnueabihf
bits
csky-linux-gnueabi
bits
gnu
csky-linux-gnueabihf
bits
gnu
generic-glibc
bits
platform
types
gnu
net
sys
i386-linux-gnu
bits
m68k-linux-gnu
bits
gnu
mips-linux-gnu
mips64-linux-gnuabi64
mips64-linux-gnuabin32
mips64el-linux-gnuabi64
mips64el-linux-gnuabin32
mipsel-linux-gnu
powerpc-linux-gnu
powerpc64-linux-gnu
powerpc64le-linux-gnu
riscv64-linux-gnu
bits
s390x-linux-gnu
sparc-linux-gnu
sparcv9-linux-gnu
x86_64-linux-gnu
bits
x86_64-linux-gnux32
bits
lib/libc/include/aarch64-linux-gnu/bits/local_lim.h
@@ -1,101 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,22 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/bits/statfs.h
@@ -1,86 +0,0 @@
-/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/endian.h>
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
-#if defined __USE_FILE_OFFSET64
-# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define __field64(type, type64, name) \
- type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
-#else
-# define __field64(type, type64, name) \
- int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
-#endif
-
-struct statfs
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-
-#undef __field64
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATFS_F_NAMELEN
-#define _STATFS_F_FRSIZE
-#define _STATFS_F_FLAGS
\ No newline at end of file
lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
@@ -25,6 +25,40 @@
__BEGIN_DECLS
+/* Avoid collision if the linux ptrace header is already included. */
+#undef PTRACE_TRACEME
+#undef PTRACE_PEEKTEXT
+#undef PTRACE_PEEKDATA
+#undef PTRACE_PEEKUSER
+#undef PTRACE_POKETEXT
+#undef PTRACE_POKEDATA
+#undef PTRACE_POKEUSER
+#undef PTRACE_CONT
+#undef PTRACE_KILL
+#undef PTRACE_SINGLESTEP
+#undef PTRACE_ATTACH
+#undef PTRACE_DETACH
+#undef PTRACE_SYSCALL
+#undef PTRACE_SYSEMU
+#undef PTRACE_SYSEMU_SINGLESTEP
+#undef PTRACE_PEEKMTETAGS
+#undef PTRACE_POKEMTETAGS
+#undef PTRACE_SETOPTIONS
+#undef PTRACE_GETEVENTMSG
+#undef PTRACE_GETSIGINFO
+#undef PTRACE_SETSIGINFO
+#undef PTRACE_GETREGSET
+#undef PTRACE_SETREGSET
+#undef PTRACE_SEIZE
+#undef PTRACE_INTERRUPT
+#undef PTRACE_LISTEN
+#undef PTRACE_PEEKSIGINFO
+#undef PTRACE_GETSIGMASK
+#undef PTRACE_SETSIGMASK
+#undef PTRACE_SECCOMP_GET_FILTER
+#undef PTRACE_SECCOMP_GET_METADATA
+#undef PTRACE_GET_SYSCALL_INFO
+
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
@@ -82,6 +116,22 @@ enum __ptrace_request
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 31,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 32,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
+ /* Read MTE tags. */
+ PTRACE_PEEKMTETAGS = 33,
+#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
+
+ /* Write MTE tags. */
+ PTRACE_POKEMTETAGS = 34,
+#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
+
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h
@@ -1,101 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,22 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h
@@ -1,86 +0,0 @@
-/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/endian.h>
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
-#if defined __USE_FILE_OFFSET64
-# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define __field64(type, type64, name) \
- type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
-#else
-# define __field64(type, type64, name) \
- int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
-#endif
-
-struct statfs
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-
-#undef __field64
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATFS_F_NAMELEN
-#define _STATFS_F_FRSIZE
-#define _STATFS_F_FLAGS
\ No newline at end of file
lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h
@@ -25,6 +25,40 @@
__BEGIN_DECLS
+/* Avoid collision if the linux ptrace header is already included. */
+#undef PTRACE_TRACEME
+#undef PTRACE_PEEKTEXT
+#undef PTRACE_PEEKDATA
+#undef PTRACE_PEEKUSER
+#undef PTRACE_POKETEXT
+#undef PTRACE_POKEDATA
+#undef PTRACE_POKEUSER
+#undef PTRACE_CONT
+#undef PTRACE_KILL
+#undef PTRACE_SINGLESTEP
+#undef PTRACE_ATTACH
+#undef PTRACE_DETACH
+#undef PTRACE_SYSCALL
+#undef PTRACE_SYSEMU
+#undef PTRACE_SYSEMU_SINGLESTEP
+#undef PTRACE_PEEKMTETAGS
+#undef PTRACE_POKEMTETAGS
+#undef PTRACE_SETOPTIONS
+#undef PTRACE_GETEVENTMSG
+#undef PTRACE_GETSIGINFO
+#undef PTRACE_SETSIGINFO
+#undef PTRACE_GETREGSET
+#undef PTRACE_SETREGSET
+#undef PTRACE_SEIZE
+#undef PTRACE_INTERRUPT
+#undef PTRACE_LISTEN
+#undef PTRACE_PEEKSIGINFO
+#undef PTRACE_GETSIGMASK
+#undef PTRACE_SETSIGMASK
+#undef PTRACE_SECCOMP_GET_FILTER
+#undef PTRACE_SECCOMP_GET_METADATA
+#undef PTRACE_GET_SYSCALL_INFO
+
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
@@ -82,6 +116,22 @@ enum __ptrace_request
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 31,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 32,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
+ /* Read MTE tags. */
+ PTRACE_PEEKMTETAGS = 33,
+#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
+
+ /* Write MTE tags. */
+ PTRACE_POKEMTETAGS = 34,
+#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
+
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/csky-linux-gnueabi/bits/statfs.h
@@ -1,6 +1,5 @@
/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -24,18 +23,8 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
#elif __BYTE_ORDER == __LITTLE_ENDIAN
# define __field64(type, type64, name) \
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h
@@ -9,6 +9,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/csky-linux-gnueabihf/bits/statfs.h
@@ -1,6 +1,5 @@
/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -24,18 +23,8 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
#elif __BYTE_ORDER == __LITTLE_ENDIAN
# define __field64(type, type64, name) \
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h
@@ -9,6 +9,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/arpa/inet.h
@@ -74,7 +74,8 @@ extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
-extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
+extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW
+ __attribute_deprecated_msg__ ("Use inet_ntop instead");
/* Convert network number for interface type AF in buffer starting at
CP to presentation format. The result will specifiy BITS bits of
lib/libc/include/generic-glibc/arpa/nameser.h
@@ -52,6 +52,12 @@
#include <sys/types.h>
#include <stdint.h>
+#ifdef _LIBC
+# define __NAMESER_DEPRECATED
+#else
+# define __NAMESER_DEPRECATED __attribute_deprecated__
+#endif
+
/*
* Define constants based on RFC 883, RFC 1034, RFC 1035
*/
@@ -401,14 +407,18 @@ int ns_skiprr (const unsigned char *, const unsigned char *,
int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
int ns_sprintrr (const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t)
- __THROW;
+ __THROW __NAMESER_DEPRECATED;
int ns_sprintrrf (const unsigned char *, size_t, const char *,
ns_class, ns_type, unsigned long,
const unsigned char *, size_t, const char *,
- const char *, char *, size_t) __THROW;
-int ns_format_ttl (unsigned long, char *, size_t) __THROW;
-int ns_parse_ttl (const char *, unsigned long *) __THROW;
-uint32_t ns_datetosecs (const char *, int *) __THROW;
+ const char *, char *, size_t)
+ __THROW __NAMESER_DEPRECATED;
+int ns_format_ttl (unsigned long, char *, size_t)
+ __THROW __NAMESER_DEPRECATED;
+int ns_parse_ttl (const char *, unsigned long *)
+ __THROW __NAMESER_DEPRECATED;
+uint32_t ns_datetosecs (const char *, int *)
+ __THROW __NAMESER_DEPRECATED;
int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
__THROW;
int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
@@ -431,10 +441,15 @@ int ns_name_skip (const unsigned char **, const unsigned char *)
void ns_name_rollback (const unsigned char *,
const unsigned char **,
const unsigned char **) __THROW;
-int ns_samedomain (const char *, const char *) __THROW;
-int ns_subdomain (const char *, const char *) __THROW;
-int ns_makecanon (const char *, char *, size_t) __THROW;
-int ns_samename (const char *, const char *) __THROW;
+
+int ns_samedomain (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
+int ns_subdomain (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
+int ns_makecanon (const char *, char *, size_t) __THROW
+ __NAMESER_DEPRECATED;
+int ns_samename (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
__END_DECLS
#include <arpa/nameser_compat.h>
lib/libc/include/generic-glibc/bits/platform/x86.h
@@ -0,0 +1,311 @@
+/* Constants and data structures for x86 CPU features.
+ This file is part of the GNU C Library.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PLATFORM_X86_H
+# error "Never include <bits/platform/x86.h> directly; use <sys/platform/x86.h> instead."
+#endif
+
+enum
+{
+ CPUID_INDEX_1 = 0,
+ CPUID_INDEX_7,
+ CPUID_INDEX_80000001,
+ CPUID_INDEX_D_ECX_1,
+ CPUID_INDEX_80000007,
+ CPUID_INDEX_80000008,
+ CPUID_INDEX_7_ECX_1,
+ CPUID_INDEX_19,
+ CPUID_INDEX_14_ECX_0
+};
+
+struct cpuid_feature
+{
+ unsigned int cpuid_array[4];
+ unsigned int active_array[4];
+};
+
+enum cpuid_register_index
+{
+ cpuid_register_index_eax = 0,
+ cpuid_register_index_ebx,
+ cpuid_register_index_ecx,
+ cpuid_register_index_edx
+};
+
+/* CPU features. */
+
+enum
+{
+ x86_cpu_index_1_ecx
+ = (CPUID_INDEX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_SSE3 = x86_cpu_index_1_ecx,
+ x86_cpu_PCLMULQDQ = x86_cpu_index_1_ecx + 1,
+ x86_cpu_DTES64 = x86_cpu_index_1_ecx + 2,
+ x86_cpu_MONITOR = x86_cpu_index_1_ecx + 3,
+ x86_cpu_DS_CPL = x86_cpu_index_1_ecx + 4,
+ x86_cpu_VMX = x86_cpu_index_1_ecx + 5,
+ x86_cpu_SMX = x86_cpu_index_1_ecx + 6,
+ x86_cpu_EIST = x86_cpu_index_1_ecx + 7,
+ x86_cpu_TM2 = x86_cpu_index_1_ecx + 8,
+ x86_cpu_SSSE3 = x86_cpu_index_1_ecx + 9,
+ x86_cpu_CNXT_ID = x86_cpu_index_1_ecx + 10,
+ x86_cpu_SDBG = x86_cpu_index_1_ecx + 11,
+ x86_cpu_FMA = x86_cpu_index_1_ecx + 12,
+ x86_cpu_CMPXCHG16B = x86_cpu_index_1_ecx + 13,
+ x86_cpu_XTPRUPDCTRL = x86_cpu_index_1_ecx + 14,
+ x86_cpu_PDCM = x86_cpu_index_1_ecx + 15,
+ x86_cpu_INDEX_1_ECX_16 = x86_cpu_index_1_ecx + 16,
+ x86_cpu_PCID = x86_cpu_index_1_ecx + 17,
+ x86_cpu_DCA = x86_cpu_index_1_ecx + 18,
+ x86_cpu_SSE4_1 = x86_cpu_index_1_ecx + 19,
+ x86_cpu_SSE4_2 = x86_cpu_index_1_ecx + 20,
+ x86_cpu_X2APIC = x86_cpu_index_1_ecx + 21,
+ x86_cpu_MOVBE = x86_cpu_index_1_ecx + 22,
+ x86_cpu_POPCNT = x86_cpu_index_1_ecx + 23,
+ x86_cpu_TSC_DEADLINE = x86_cpu_index_1_ecx + 24,
+ x86_cpu_AES = x86_cpu_index_1_ecx + 25,
+ x86_cpu_XSAVE = x86_cpu_index_1_ecx + 26,
+ x86_cpu_OSXSAVE = x86_cpu_index_1_ecx + 27,
+ x86_cpu_AVX = x86_cpu_index_1_ecx + 28,
+ x86_cpu_F16C = x86_cpu_index_1_ecx + 29,
+ x86_cpu_RDRAND = x86_cpu_index_1_ecx + 30,
+ x86_cpu_INDEX_1_ECX_31 = x86_cpu_index_1_ecx + 31,
+
+ x86_cpu_index_1_edx
+ = (CPUID_INDEX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_FPU = x86_cpu_index_1_edx,
+ x86_cpu_VME = x86_cpu_index_1_edx + 1,
+ x86_cpu_DE = x86_cpu_index_1_edx + 2,
+ x86_cpu_PSE = x86_cpu_index_1_edx + 3,
+ x86_cpu_TSC = x86_cpu_index_1_edx + 4,
+ x86_cpu_MSR = x86_cpu_index_1_edx + 5,
+ x86_cpu_PAE = x86_cpu_index_1_edx + 6,
+ x86_cpu_MCE = x86_cpu_index_1_edx + 7,
+ x86_cpu_CX8 = x86_cpu_index_1_edx + 8,
+ x86_cpu_APIC = x86_cpu_index_1_edx + 9,
+ x86_cpu_INDEX_1_EDX_10 = x86_cpu_index_1_edx + 10,
+ x86_cpu_SEP = x86_cpu_index_1_edx + 11,
+ x86_cpu_MTRR = x86_cpu_index_1_edx + 12,
+ x86_cpu_PGE = x86_cpu_index_1_edx + 13,
+ x86_cpu_MCA = x86_cpu_index_1_edx + 14,
+ x86_cpu_CMOV = x86_cpu_index_1_edx + 15,
+ x86_cpu_PAT = x86_cpu_index_1_edx + 16,
+ x86_cpu_PSE_36 = x86_cpu_index_1_edx + 17,
+ x86_cpu_PSN = x86_cpu_index_1_edx + 18,
+ x86_cpu_CLFSH = x86_cpu_index_1_edx + 19,
+ x86_cpu_INDEX_1_EDX_20 = x86_cpu_index_1_edx + 20,
+ x86_cpu_DS = x86_cpu_index_1_edx + 21,
+ x86_cpu_ACPI = x86_cpu_index_1_edx + 22,
+ x86_cpu_MMX = x86_cpu_index_1_edx + 23,
+ x86_cpu_FXSR = x86_cpu_index_1_edx + 24,
+ x86_cpu_SSE = x86_cpu_index_1_edx + 25,
+ x86_cpu_SSE2 = x86_cpu_index_1_edx + 26,
+ x86_cpu_SS = x86_cpu_index_1_edx + 27,
+ x86_cpu_HTT = x86_cpu_index_1_edx + 28,
+ x86_cpu_TM = x86_cpu_index_1_edx + 29,
+ x86_cpu_INDEX_1_EDX_30 = x86_cpu_index_1_edx + 30,
+ x86_cpu_PBE = x86_cpu_index_1_edx + 31,
+
+ x86_cpu_index_7_ebx
+ = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_FSGSBASE = x86_cpu_index_7_ebx,
+ x86_cpu_TSC_ADJUST = x86_cpu_index_7_ebx + 1,
+ x86_cpu_SGX = x86_cpu_index_7_ebx + 2,
+ x86_cpu_BMI1 = x86_cpu_index_7_ebx + 3,
+ x86_cpu_HLE = x86_cpu_index_7_ebx + 4,
+ x86_cpu_AVX2 = x86_cpu_index_7_ebx + 5,
+ x86_cpu_INDEX_7_EBX_6 = x86_cpu_index_7_ebx + 6,
+ x86_cpu_SMEP = x86_cpu_index_7_ebx + 7,
+ x86_cpu_BMI2 = x86_cpu_index_7_ebx + 8,
+ x86_cpu_ERMS = x86_cpu_index_7_ebx + 9,
+ x86_cpu_INVPCID = x86_cpu_index_7_ebx + 10,
+ x86_cpu_RTM = x86_cpu_index_7_ebx + 11,
+ x86_cpu_RDT_M = x86_cpu_index_7_ebx + 12,
+ x86_cpu_DEPR_FPU_CS_DS = x86_cpu_index_7_ebx + 13,
+ x86_cpu_MPX = x86_cpu_index_7_ebx + 14,
+ x86_cpu_RDT_A = x86_cpu_index_7_ebx + 15,
+ x86_cpu_AVX512F = x86_cpu_index_7_ebx + 16,
+ x86_cpu_AVX512DQ = x86_cpu_index_7_ebx + 17,
+ x86_cpu_RDSEED = x86_cpu_index_7_ebx + 18,
+ x86_cpu_ADX = x86_cpu_index_7_ebx + 19,
+ x86_cpu_SMAP = x86_cpu_index_7_ebx + 20,
+ x86_cpu_AVX512_IFMA = x86_cpu_index_7_ebx + 21,
+ x86_cpu_INDEX_7_EBX_22 = x86_cpu_index_7_ebx + 22,
+ x86_cpu_CLFLUSHOPT = x86_cpu_index_7_ebx + 23,
+ x86_cpu_CLWB = x86_cpu_index_7_ebx + 24,
+ x86_cpu_TRACE = x86_cpu_index_7_ebx + 25,
+ x86_cpu_AVX512PF = x86_cpu_index_7_ebx + 26,
+ x86_cpu_AVX512ER = x86_cpu_index_7_ebx + 27,
+ x86_cpu_AVX512CD = x86_cpu_index_7_ebx + 28,
+ x86_cpu_SHA = x86_cpu_index_7_ebx + 29,
+ x86_cpu_AVX512BW = x86_cpu_index_7_ebx + 30,
+ x86_cpu_AVX512VL = x86_cpu_index_7_ebx + 31,
+
+ x86_cpu_index_7_ecx
+ = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_PREFETCHWT1 = x86_cpu_index_7_ecx,
+ x86_cpu_AVX512_VBMI = x86_cpu_index_7_ecx + 1,
+ x86_cpu_UMIP = x86_cpu_index_7_ecx + 2,
+ x86_cpu_PKU = x86_cpu_index_7_ecx + 3,
+ x86_cpu_OSPKE = x86_cpu_index_7_ecx + 4,
+ x86_cpu_WAITPKG = x86_cpu_index_7_ecx + 5,
+ x86_cpu_AVX512_VBMI2 = x86_cpu_index_7_ecx + 6,
+ x86_cpu_SHSTK = x86_cpu_index_7_ecx + 7,
+ x86_cpu_GFNI = x86_cpu_index_7_ecx + 8,
+ x86_cpu_VAES = x86_cpu_index_7_ecx + 9,
+ x86_cpu_VPCLMULQDQ = x86_cpu_index_7_ecx + 10,
+ x86_cpu_AVX512_VNNI = x86_cpu_index_7_ecx + 11,
+ x86_cpu_AVX512_BITALG = x86_cpu_index_7_ecx + 12,
+ x86_cpu_INDEX_7_ECX_13 = x86_cpu_index_7_ecx + 13,
+ x86_cpu_AVX512_VPOPCNTDQ = x86_cpu_index_7_ecx + 14,
+ x86_cpu_INDEX_7_ECX_1 = x86_cpu_index_7_ecx + 15,
+ x86_cpu_INDEX_7_ECX_16 = x86_cpu_index_7_ecx + 16,
+/* Note: Bits 17-21: The value of MAWAU used by the BNDLDX and BNDSTX
+ instructions in 64-bit mode. */
+ x86_cpu_RDPID = x86_cpu_index_7_ecx + 22,
+ x86_cpu_KL = x86_cpu_index_7_ecx + 23,
+ x86_cpu_INDEX_7_ECX_24 = x86_cpu_index_7_ecx + 24,
+ x86_cpu_CLDEMOTE = x86_cpu_index_7_ecx + 25,
+ x86_cpu_INDEX_7_ECX_26 = x86_cpu_index_7_ecx + 26,
+ x86_cpu_MOVDIRI = x86_cpu_index_7_ecx + 27,
+ x86_cpu_MOVDIR64B = x86_cpu_index_7_ecx + 28,
+ x86_cpu_ENQCMD = x86_cpu_index_7_ecx + 29,
+ x86_cpu_SGX_LC = x86_cpu_index_7_ecx + 30,
+ x86_cpu_PKS = x86_cpu_index_7_ecx + 31,
+
+ x86_cpu_index_7_edx
+ = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_INDEX_7_EDX_0 = x86_cpu_index_7_edx,
+ x86_cpu_INDEX_7_EDX_1 = x86_cpu_index_7_edx + 1,
+ x86_cpu_AVX512_4VNNIW = x86_cpu_index_7_edx + 2,
+ x86_cpu_AVX512_4FMAPS = x86_cpu_index_7_edx + 3,
+ x86_cpu_FSRM = x86_cpu_index_7_edx + 4,
+ x86_cpu_UINTR = x86_cpu_index_7_edx + 5,
+ x86_cpu_INDEX_7_EDX_6 = x86_cpu_index_7_edx + 6,
+ x86_cpu_INDEX_7_EDX_7 = x86_cpu_index_7_edx + 7,
+ x86_cpu_AVX512_VP2INTERSECT = x86_cpu_index_7_edx + 8,
+ x86_cpu_INDEX_7_EDX_9 = x86_cpu_index_7_edx + 9,
+ x86_cpu_MD_CLEAR = x86_cpu_index_7_edx + 10,
+ x86_cpu_RTM_ALWAYS_ABORT = x86_cpu_index_7_edx + 11,
+ x86_cpu_INDEX_7_EDX_12 = x86_cpu_index_7_edx + 12,
+ x86_cpu_INDEX_7_EDX_13 = x86_cpu_index_7_edx + 13,
+ x86_cpu_SERIALIZE = x86_cpu_index_7_edx + 14,
+ x86_cpu_HYBRID = x86_cpu_index_7_edx + 15,
+ x86_cpu_TSXLDTRK = x86_cpu_index_7_edx + 16,
+ x86_cpu_INDEX_7_EDX_17 = x86_cpu_index_7_edx + 17,
+ x86_cpu_PCONFIG = x86_cpu_index_7_edx + 18,
+ x86_cpu_INDEX_7_EDX_19 = x86_cpu_index_7_edx + 19,
+ x86_cpu_IBT = x86_cpu_index_7_edx + 20,
+ x86_cpu_INDEX_7_EDX_21 = x86_cpu_index_7_edx + 21,
+ x86_cpu_AMX_BF16 = x86_cpu_index_7_edx + 22,
+ x86_cpu_AVX512_FP16 = x86_cpu_index_7_edx + 23,
+ x86_cpu_AMX_TILE = x86_cpu_index_7_edx + 24,
+ x86_cpu_AMX_INT8 = x86_cpu_index_7_edx + 25,
+ x86_cpu_IBRS_IBPB = x86_cpu_index_7_edx + 26,
+ x86_cpu_STIBP = x86_cpu_index_7_edx + 27,
+ x86_cpu_L1D_FLUSH = x86_cpu_index_7_edx + 28,
+ x86_cpu_ARCH_CAPABILITIES = x86_cpu_index_7_edx + 29,
+ x86_cpu_CORE_CAPABILITIES = x86_cpu_index_7_edx + 30,
+ x86_cpu_SSBD = x86_cpu_index_7_edx + 31,
+
+ x86_cpu_index_80000001_ecx
+ = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_LAHF64_SAHF64 = x86_cpu_index_80000001_ecx,
+ x86_cpu_SVM = x86_cpu_index_80000001_ecx + 2,
+ x86_cpu_LZCNT = x86_cpu_index_80000001_ecx + 5,
+ x86_cpu_SSE4A = x86_cpu_index_80000001_ecx + 6,
+ x86_cpu_PREFETCHW = x86_cpu_index_80000001_ecx + 8,
+ x86_cpu_XOP = x86_cpu_index_80000001_ecx + 11,
+ x86_cpu_LWP = x86_cpu_index_80000001_ecx + 15,
+ x86_cpu_FMA4 = x86_cpu_index_80000001_ecx + 16,
+ x86_cpu_TBM = x86_cpu_index_80000001_ecx + 21,
+
+ x86_cpu_index_80000001_edx
+ = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_SYSCALL_SYSRET = x86_cpu_index_80000001_edx + 11,
+ x86_cpu_NX = x86_cpu_index_80000001_edx + 20,
+ x86_cpu_PAGE1GB = x86_cpu_index_80000001_edx + 26,
+ x86_cpu_RDTSCP = x86_cpu_index_80000001_edx + 27,
+ x86_cpu_LM = x86_cpu_index_80000001_edx + 29,
+
+ x86_cpu_index_d_ecx_1_eax
+ = (CPUID_INDEX_D_ECX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
+
+ x86_cpu_XSAVEOPT = x86_cpu_index_d_ecx_1_eax,
+ x86_cpu_XSAVEC = x86_cpu_index_d_ecx_1_eax + 1,
+ x86_cpu_XGETBV_ECX_1 = x86_cpu_index_d_ecx_1_eax + 2,
+ x86_cpu_XSAVES = x86_cpu_index_d_ecx_1_eax + 3,
+ x86_cpu_XFD = x86_cpu_index_d_ecx_1_eax + 4,
+
+ x86_cpu_index_80000007_edx
+ = (CPUID_INDEX_80000007 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_INVARIANT_TSC = x86_cpu_index_80000007_edx + 8,
+
+ x86_cpu_index_80000008_ebx
+ = (CPUID_INDEX_80000008 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_WBNOINVD = x86_cpu_index_80000008_ebx + 9,
+ x86_cpu_AMD_IBPB = x86_cpu_index_80000008_ebx + 12,
+ x86_cpu_AMD_IBRS = x86_cpu_index_80000008_ebx + 14,
+ x86_cpu_AMD_STIBP = x86_cpu_index_80000008_ebx + 15,
+ x86_cpu_AMD_SSBD = x86_cpu_index_80000008_ebx + 24,
+ x86_cpu_AMD_VIRT_SSBD = x86_cpu_index_80000008_ebx + 25,
+
+ x86_cpu_index_7_ecx_1_eax
+ = (CPUID_INDEX_7_ECX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
+
+ x86_cpu_AVX_VNNI = x86_cpu_index_7_ecx_1_eax + 4,
+ x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5,
+ x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10,
+ x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11,
+ x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12,
+ x86_cpu_HRESET = x86_cpu_index_7_ecx_1_eax + 22,
+ x86_cpu_LAM = x86_cpu_index_7_ecx_1_eax + 26,
+
+ x86_cpu_index_19_ebx
+ = (CPUID_INDEX_19 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_AESKLE = x86_cpu_index_19_ebx,
+ x86_cpu_WIDE_KL = x86_cpu_index_19_ebx + 2,
+
+ x86_cpu_index_14_ecx_0_ebx
+ = (CPUID_INDEX_14_ECX_0 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_PTWRITE = x86_cpu_index_14_ecx_0_ebx + 4
+};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the SysV message struct msqid64_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#if __TIMESIZE == 64
+# define __msqid64_ds msqid_ds
+#else
+struct __msqid64_ds
+{
+# include <bits/types/struct_msqid64_ds_helper.h>
+};
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h
@@ -0,0 +1,30 @@
+/* Common definitions for struct msqid_ds with 64-bit time.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+ /* Content of internal __msqid64_ds. */
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __time64_t msg_stime; /* time of last msgsnd command */
+ __time64_t msg_rtime; /* time of last msgsnd command */
+ __time64_t msg_ctime; /* time of last change */
+ __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-#else
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the semaphore struct semid64_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
+#endif
+
+#if __TIMESIZE == 64
+# define __semid64_ds semid_ds
+#else
+struct __semid64_ds
+{
+# include <bits/types/struct_semid64_ds_helper.h>
+};
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h
@@ -0,0 +1,25 @@
+/* Common definitions for struct semid_ds with 64-bit time.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+ /* Content of internal __semid64_ds. */
+ struct ipc_perm sem_perm; /* operation permission struct */
+ __time64_t sem_otime; /* last semop() time */
+ __time64_t sem_ctime; /* last time changed by semctl() */
+ __syscall_ulong_t sem_nsems; /* number of semaphores in set */
+ unsigned long int __glibc_reserved3;
+ unsigned long int __glibc_reserved4;
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t __sem_ctime_high;
-#else
+# else
__time_t sem_otime;
__time_t sem_ctime;
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the shared memory struct shmid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
+#endif
+
+#if __TIMESIZE == 64
+# define __shmid64_ds shmid_ds
+#else
+struct __shmid64_ds
+{
+# include <bits/types/struct_shmid64_ds_helper.h>
+};
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h
@@ -0,0 +1,28 @@
+/* Common definitions for struct semid_ds with 64-bit time.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+ struct ipc_perm shm_perm; /* operation permission struct */
+ size_t shm_segsz; /* size of segment in bytes */
+ __time64_t shm_atime; /* time of last shmat() */
+ __time64_t shm_dtime; /* time of last shmdt() */
+ __time64_t shm_ctime; /* time of last change by shmctl() */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+ unsigned long int __glibc_reserved5;
+ unsigned long int __glibc_reserved6;
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h
@@ -23,23 +23,27 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_atime_high;
__time_t shm_dtime; /* time of last shmdt() */
unsigned long int __shm_dtime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __shm_ctime_high;
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+#endif
};
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/struct_timespec.h
@@ -4,15 +4,20 @@
#include <bits/types.h>
#include <bits/endian.h>
+#include <bits/types/time_t.h>
/* POSIX.1b structure for a time value. This is like a `struct timeval' but
has nanoseconds instead of microseconds. */
struct timespec
{
+#ifdef __USE_TIME_BITS64
+ __time64_t tv_sec; /* Seconds. */
+#else
__time_t tv_sec; /* Seconds. */
+#endif
#if __WORDSIZE == 64 \
|| (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
- || __TIMESIZE == 32
+ || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
__syscall_slong_t tv_nsec; /* Nanoseconds. */
#else
# if __BYTE_ORDER == __BIG_ENDIAN
lib/libc/include/generic-glibc/bits/types/struct_timeval.h
@@ -7,7 +7,12 @@
microsecond but also has a range of years. */
struct timeval
{
+#ifdef __USE_TIME_BITS64
+ __time64_t tv_sec; /* Seconds. */
+ __suseconds64_t tv_usec; /* Microseconds. */
+#else
__time_t tv_sec; /* Seconds. */
__suseconds_t tv_usec; /* Microseconds. */
+#endif
};
#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/types/time_t.h
@@ -4,6 +4,10 @@
#include <bits/types.h>
/* Returned by `time'. */
+#ifdef __USE_TIME_BITS64
+typedef __time64_t time_t;
+#else
typedef __time_t time_t;
+#endif
#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/confname.h
@@ -525,8 +525,14 @@ enum
_SC_THREAD_ROBUST_PRIO_INHERIT,
#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
- _SC_THREAD_ROBUST_PRIO_PROTECT
+ _SC_THREAD_ROBUST_PRIO_PROTECT,
#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
+
+ _SC_MINSIGSTKSZ,
+#define _SC_MINSIGSTKSZ _SC_MINSIGSTKSZ
+
+ _SC_SIGSTKSZ
+#define _SC_SIGSTKSZ _SC_SIGSTKSZ
};
/* Values for the NAME argument to `confstr'. */
lib/libc/include/generic-glibc/bits/libc-header-start.h
@@ -44,8 +44,26 @@
/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
macro. Most but not all symbols enabled by that macro in TS
- 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
- still require that macro in C2X. */
+ 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
+ Annex F still require a new feature test macro
+ __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
+ __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
+ 18661-1 are not included in C2X (and thus should depend on
+ __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
+ enabled).
+
+ __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
+ 18661-1 not included in C2X.
+
+ __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
+ 18661-1 that are also included in C2X (with no feature test macro
+ required in C2X).
+
+ __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
+ that are included in C2X but conditional on
+ __STDC_WANT_IEC_60559_EXT__. (There are currently no features
+ conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
+ 18661-1.) */
#undef __GLIBC_USE_IEC_60559_BFP_EXT
#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
# define __GLIBC_USE_IEC_60559_BFP_EXT 1
@@ -58,6 +76,12 @@
#else
# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
#endif
+#undef __GLIBC_USE_IEC_60559_EXT
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
+# define __GLIBC_USE_IEC_60559_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_EXT 0
+#endif
/* ISO/IEC TS 18661-4:2015 defines the
__STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
lib/libc/include/generic-glibc/bits/local_lim.h
@@ -77,8 +77,8 @@
priority level. */
#define AIO_PRIO_DELTA_MAX 20
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 16384
+/* Arrange for the definition of PTHREAD_STACK_MIN. */
+#include <bits/pthread_stack_min-dynamic.h>
/* Maximum number of timer expiration overruns. */
#define DELAYTIMER_MAX 2147483647
lib/libc/include/generic-glibc/bits/mathcalls.h
@@ -364,17 +364,21 @@ __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round,
__MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
unsigned int __width));
+/* Canonicalize floating-point representation. */
+__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
+#endif
+
+#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
+ || (__MATH_DECLARING_FLOATN \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X))))
/* Return value with maximum magnitude. */
__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
/* Return value with minimum magnitude. */
__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-
-/* Canonicalize floating-point representation. */
-__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
+#if __GLIBC_USE (IEC_60559_EXT) || __MATH_DECLARING_FLOATN
/* Total order operation. */
__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,
const _Mdouble_ *__y))
lib/libc/include/generic-glibc/bits/msq.h
@@ -26,6 +26,7 @@ typedef __syscall_ulong_t msgqnum_t;
typedef __syscall_ulong_t msglen_t;
#include <bits/types/struct_msqid_ds.h>
+#include <bits/types/struct_msqid64_ds.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
lib/libc/include/generic-glibc/bits/poll2.h
@@ -26,13 +26,14 @@ __BEGIN_DECLS
extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,
int __timeout), poll);
extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
- __SIZE_TYPE__ __fdslen);
+ __SIZE_TYPE__ __fdslen)
+ __attr_access ((__write_only__, 1, 2));
extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
int __timeout, __SIZE_TYPE__ __fdslen),
__poll_chk)
__warnattr ("poll called with fds buffer too small file nfds entries");
-__fortify_function int
+__fortify_function __attr_access ((__write_only__, 1, 2)) int
poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
{
if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)
@@ -54,7 +55,8 @@ extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
const __sigset_t *__ss), ppoll);
extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
- const __sigset_t *__ss, __SIZE_TYPE__ __fdslen);
+ const __sigset_t *__ss, __SIZE_TYPE__ __fdslen)
+ __attr_access ((__write_only__, 1, 2));
extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
const __sigset_t *__ss,
@@ -62,7 +64,7 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
__ppoll_chk)
__warnattr ("ppoll called with fds buffer too small file nfds entries");
-__fortify_function int
+__fortify_function __attr_access ((__write_only__, 1, 2)) int
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
const __sigset_t *__ss)
{
lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h
@@ -0,0 +1,31 @@
+/* Definition of PTHREAD_STACK_MIN, possibly dynamic.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef PTHREAD_STACK_MIN
+# if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE
+# ifndef __ASSEMBLER__
+# define __SC_THREAD_STACK_MIN_VALUE 75
+__BEGIN_DECLS
+extern long int __sysconf (int __name) __THROW;
+__END_DECLS
+# define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
+# endif
+# else
+# include <bits/pthread_stack_min.h>
+# endif
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 16384
\ No newline at end of file
lib/libc/include/generic-glibc/bits/sem.h
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <bits/timesize.h>
#include <bits/types/struct_semid_ds.h>
+#include <bits/types/struct_semid64_ds.h>
/* Flags for `semop'. */
#define SEM_UNDO 0x1000 /* undo the operation on exit */
lib/libc/include/generic-glibc/bits/shm.h
@@ -43,6 +43,7 @@ __BEGIN_DECLS
typedef __syscall_ulong_t shmatt_t;
#include <bits/types/struct_shmid_ds.h>
+#include <bits/types/struct_shmid64_ds.h>
#ifdef __USE_MISC
lib/libc/include/generic-glibc/bits/sigstksz.h
@@ -0,0 +1,33 @@
+/* Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version.
+ Copyright (C) 2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigstksz.h> directly; use <signal.h> instead."
+#endif
+
+#if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE
+# include <unistd.h>
+
+/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */
+# undef SIGSTKSZ
+# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
+
+/* Minimum stack size for a signal handler: SIGSTKSZ. */
+# undef MINSIGSTKSZ
+# define MINSIGSTKSZ SIGSTKSZ
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/socket-constants.h
@@ -32,19 +32,50 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 18
-#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
- && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
-# define SO_RCVTIMEO 66
-#else
-# define SO_RCVTIMEO 20
-#endif
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 19
+#define SO_TYPE 3
+
#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
&& (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
+# define SO_RCVTIMEO 66
# define SO_SNDTIMEO 67
+# define SO_TIMESTAMP 63
+# define SO_TIMESTAMPNS 64
+# define SO_TIMESTAMPING 65
#else
-# define SO_SNDTIMEO 21
-#endif
-#define SO_TYPE 3
\ No newline at end of file
+# if __TIMESIZE == 64
+# define SO_RCVTIMEO 20
+# define SO_SNDTIMEO 21
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+# else
+# define SO_RCVTIMEO_OLD 20
+# define SO_SNDTIMEO_OLD 21
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+# endif
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/struct_stat.h
@@ -29,28 +29,31 @@
/* Structure describing file characteristics. */
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
unsigned long int st_dev;
long int st_pad1[3];
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
unsigned long int st_rdev; /* Device number, if device. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
long int st_pad2[2];
__off_t st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
long int st_pad3;
-#else
+# else
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -60,30 +63,34 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
-#else
+# else
long int st_pad4;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
-#endif
+# endif
long int st_pad5[14];
+# endif /* __USE_TIME_BITS64 */
};
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
unsigned long int st_dev;
long int st_pad1[3];
__ino64_t st_ino; /* File serial number. */
@@ -94,7 +101,7 @@ struct stat64
unsigned long int st_rdev; /* Device number, if device. */
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,44 +111,47 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
long int st_pad3;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
long int st_pad4[14];
+# endif /* __USE_TIME_BITS64 */
};
-#endif
-#else
+# endif /* __USE_LARGEFILE64 */
+
+#else /* _MIPS_SIM != _ABIO32 */
+
struct stat
{
__dev_t st_dev;
int st_pad1[3]; /* Reserved for st_dev expansion */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino;
-#else
+# else
__ino64_t st_ino;
-#endif
+# endif
__mode_t st_mode;
__nlink_t st_nlink;
__uid_t st_uid;
__gid_t st_gid;
__dev_t st_rdev;
-#if !defined __USE_FILE_OFFSET64
+# if !defined __USE_FILE_OFFSET64
unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
__off_t st_size;
int st_pad3;
-#else
+# else
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -151,24 +161,24 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
__blksize_t st_blksize;
unsigned int st_pad4;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks;
-#else
+# else
__blkcnt64_t st_blocks;
-#endif
+# endif
int st_pad5[14];
};
@@ -185,7 +195,7 @@ struct stat64
__dev_t st_rdev;
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -195,20 +205,21 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__blksize_t st_blksize;
unsigned int st_pad3;
__blkcnt64_t st_blocks;
int st_pad4[14];
};
#endif
+
#endif
/* Tell code we have these members. */
lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h
@@ -0,0 +1,66 @@
+/* Definition for helper to define struct stat with 64-bit time.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+ /* Content of internal __stat64_t64 struct. */
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* file serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group. */
+ __dev_t st_rdev; /* Device number, if device. */
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#ifdef __USE_XOPEN2K8
+# ifndef __struct_timespec
+# define __struct_timespec struct timespec
+# endif
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ __struct_timespec st_atim;
+ __struct_timespec st_mtim;
+ __struct_timespec st_ctim;
+# define st_atime st_atim.tv_sec
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# undef __struct_timespec
+#else
+/* The definition should be equal to the 'struct __timespec64' internal
+ layout. */
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __fieldts64(name) \
+ __time64_t name; __int32_t :32; __int32_t name ## nsec
+# else
+# define __fieldts64(name) \
+ __time64_t name; __int32_t name ## nsec; __int32_t :32
+# endif
+
+ __fieldts64 (st_atime);
+ __fieldts64 (st_mtime);
+ __fieldts64 (st_ctime);
+
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+
+# undef __fieldts64
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/bits/syscall.h
@@ -1,11 +1,11 @@
/* Generated at libc build time from syscall list. */
-/* The system call list corresponds to kernel 5.10. */
+/* The system call list corresponds to kernel 5.13. */
#ifndef _SYSCALL_H
# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
#endif
-#define __GLIBC_LINUX_VERSION_CODE 330240
+#define __GLIBC_LINUX_VERSION_CODE 331008
#ifdef __NR_FAST_atomic_update
# define SYS_FAST_atomic_update __NR_FAST_atomic_update
@@ -291,6 +291,10 @@
# define SYS_epoll_pwait __NR_epoll_pwait
#endif
+#ifdef __NR_epoll_pwait2
+# define SYS_epoll_pwait2 __NR_epoll_pwait2
+#endif
+
#ifdef __NR_epoll_wait
# define SYS_epoll_wait __NR_epoll_wait
#endif
@@ -803,6 +807,18 @@
# define SYS_kill __NR_kill
#endif
+#ifdef __NR_landlock_add_rule
+# define SYS_landlock_add_rule __NR_landlock_add_rule
+#endif
+
+#ifdef __NR_landlock_create_ruleset
+# define SYS_landlock_create_ruleset __NR_landlock_create_ruleset
+#endif
+
+#ifdef __NR_landlock_restrict_self
+# define SYS_landlock_restrict_self __NR_landlock_restrict_self
+#endif
+
#ifdef __NR_lchown
# define SYS_lchown __NR_lchown
#endif
@@ -939,6 +955,10 @@
# define SYS_mount __NR_mount
#endif
+#ifdef __NR_mount_setattr
+# define SYS_mount_setattr __NR_mount_setattr
+#endif
+
#ifdef __NR_move_mount
# define SYS_move_mount __NR_move_mount
#endif
lib/libc/include/generic-glibc/bits/time.h
@@ -77,6 +77,16 @@ __BEGIN_DECLS
/* Tune a POSIX clock. */
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id,
+ struct timex *__utx),
+ __clock_adjtime64);
+# else
+# define clock_adjtime __clock_adjtime64
+# endif
+#endif
+
__END_DECLS
#endif /* use GNU */
lib/libc/include/generic-glibc/bits/timex.h
@@ -25,6 +25,36 @@
struct timex
{
+# ifdef __USE_TIME_BITS64
+ unsigned int modes; /* mode selector */
+ int :32; /* pad */
+ long long offset; /* time offset (usec) */
+ long long freq; /* frequency offset (scaled ppm) */
+ long long maxerror; /* maximum error (usec) */
+ long long esterror; /* estimated error (usec) */
+ int status; /* clock command/status */
+ int :32; /* pad */
+ long long constant; /* pll time constant */
+ long long precision; /* clock precision (usec) (read only) */
+ long long tolerance; /* clock frequency tolerance (ppm) (ro) */
+ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */
+ long long tick; /* (modified) usecs between clock ticks */
+ long long ppsfreq; /* pps frequency (scaled ppm) (ro) */
+ long long jitter; /* pps jitter (us) (ro) */
+ int shift; /* interval duration (s) (shift) (ro) */
+ int :32; /* pad */
+ long long stabil; /* pps stability (scaled ppm) (ro) */
+ long long jitcnt; /* jitter limit exceeded (ro) */
+ long long calcnt; /* calibration intervals (ro) */
+ long long errcnt; /* calibration errors (ro) */
+ long long stbcnt; /* stability limit exceeded (ro) */
+
+ int tai; /* TAI offset (ro) */
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32;
+# else
unsigned int modes; /* mode selector */
__syscall_slong_t offset; /* time offset (usec) */
__syscall_slong_t freq; /* frequency offset (scaled ppm) */
@@ -51,6 +81,7 @@ struct timex
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32;
+# endif
};
/* Mode codes (timex.mode) */
lib/libc/include/generic-glibc/bits/unistd_ext.h
@@ -33,4 +33,27 @@
not detached and has not been joined. */
extern __pid_t gettid (void) __THROW;
-#endif
\ No newline at end of file
+#ifdef __has_include
+# if __has_include ("linux/close_range.h")
+# include "linux/close_range.h"
+# endif
+#endif
+/* Unshare the file descriptor table before closing file descriptors. */
+#ifndef CLOSE_RANGE_UNSHARE
+# define CLOSE_RANGE_UNSHARE (1U << 1)
+#endif
+/* Set the FD_CLOEXEC bit instead of closing the file descriptor. */
+#ifndef CLOSE_RANGE_CLOEXEC
+# define CLOSE_RANGE_CLOEXEC (1U << 2)
+#endif
+
+/* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS
+ are define by the CLOSE_RANGE prefix. This function behaves like close
+ on the range, but in a fail-safe where it will either fail and not close
+ any file descriptor or close all of them. Gaps where the file descriptor
+ is invalid are ignored. Returns 0 on successor or -1 for failure (and
+ sets errno accordingly). */
+extern int close_range (unsigned int __fd, unsigned int __max_fd,
+ int __flags) __THROW;
+
+#endif /* __USE_GNU */
\ No newline at end of file
lib/libc/include/generic-glibc/gnu/lib-names-32.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-hard.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/gnu/lib-names-soft.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/generic-glibc/net/if.h
@@ -191,7 +191,9 @@ __BEGIN_DECLS
/* Convert an interface name to an index, and vice versa. */
extern unsigned int if_nametoindex (const char *__ifname) __THROW;
-extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
+extern char *if_indextoname (unsigned int __ifindex,
+ char __ifname[IF_NAMESIZE]) __THROW
+ __attr_access ((__write_only__, 2));
/* Return a list of all interfaces and their indices. */
extern struct if_nameindex *if_nameindex (void) __THROW;
lib/libc/include/generic-glibc/netinet/icmp6.h
@@ -69,6 +69,8 @@ struct icmp6_hdr
#define MLD_LISTENER_QUERY 130
#define MLD_LISTENER_REPORT 131
#define MLD_LISTENER_REDUCTION 132
+#define ICMPV6_EXT_ECHO_REQUEST 160
+#define ICMPV6_EXT_ECHO_REPLY 161
#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */
lib/libc/include/generic-glibc/netinet/ip_icmp.h
@@ -89,6 +89,24 @@ struct icmphdr
#define ICMP_EXC_TTL 0 /* TTL count exceeded */
#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
+/* Codes for ICMP_EXT_ECHO (PROBE) */
+#define ICMP_EXT_ECHO 42
+#define ICMP_EXT_ECHOREPLY 43
+#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */
+#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */
+#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No table entry */
+#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */
+
+/* Constants for EXT_ECHO (PROBE) */
+#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply */
+#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply */
+#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply */
+#define ICMP_EXT_ECHO_CTYPE_NAME 1
+#define ICMP_EXT_ECHO_CTYPE_INDEX 2
+#define ICMP_EXT_ECHO_CTYPE_ADDR 3
+#define ICMP_AFI_IP 1 /* Address Family Identifier for IPV4 */
+#define ICMP_AFI_IP6 2 /* Address Family Identifier for IPV6 */
+
#ifdef __USE_MISC
/*
lib/libc/include/generic-glibc/sys/platform/x86.h
@@ -30,7 +30,7 @@ extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)
__attribute__ ((pure));
static __inline__ _Bool
-x86_cpu_has_feature (unsigned int __index)
+x86_cpu_present (unsigned int __index)
{
const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
(__index / (8 * sizeof (unsigned int) * 4));
@@ -43,7 +43,7 @@ x86_cpu_has_feature (unsigned int __index)
}
static __inline__ _Bool
-x86_cpu_is_usable (unsigned int __index)
+x86_cpu_active (unsigned int __index)
{
const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
(__index / (8 * sizeof (unsigned int) * 4));
@@ -52,13 +52,13 @@ x86_cpu_is_usable (unsigned int __index)
unsigned int __bit = __reg & (8 * sizeof (unsigned int) - 1);
__reg /= 8 * sizeof (unsigned int);
- return __ptr->usable_array[__reg] & (1 << __bit);
+ return __ptr->active_array[__reg] & (1 << __bit);
}
-/* HAS_CPU_FEATURE evaluates to true if CPU supports the feature. */
-#define HAS_CPU_FEATURE(name) x86_cpu_has_feature (x86_cpu_##name)
-/* CPU_FEATURE_USABLE evaluates to true if the feature is usable. */
-#define CPU_FEATURE_USABLE(name) x86_cpu_is_usable (x86_cpu_##name)
+/* CPU_FEATURE_PRESENT evaluates to true if CPU supports the feature. */
+#define CPU_FEATURE_PRESENT(name) x86_cpu_present (x86_cpu_##name)
+/* CPU_FEATURE_ACTIVE evaluates to true if the feature is active. */
+#define CPU_FEATURE_ACTIVE(name) x86_cpu_active (x86_cpu_##name)
__END_DECLS
lib/libc/include/generic-glibc/sys/cdefs.h
@@ -34,7 +34,29 @@
#undef __P
#undef __PMT
-#ifdef __GNUC__
+/* Compilers that lack __has_attribute may object to
+ #if defined __has_attribute && __has_attribute (...)
+ even though they do not need to evaluate the right-hand side of the &&.
+ Similarly for __has_builtin, etc. */
+#if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+#ifdef __has_builtin
+# define __glibc_has_builtin(name) __has_builtin (name)
+#else
+# define __glibc_has_builtin(name) 0
+#endif
+#ifdef __has_extension
+# define __glibc_has_extension(ext) __has_extension (ext)
+#else
+# define __glibc_has_extension(ext) 0
+#endif
+
+#if defined __GNUC__ || defined __clang__
/* All functions, except those with callbacks or those that
synchronize memory, are leaf functions. */
@@ -48,16 +70,17 @@
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this only works with
- gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+ gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
-# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+# if !defined __cplusplus \
+ && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
# define __THROW __attribute__ ((__nothrow__ __LEAF))
# define __THROWNL __attribute__ ((__nothrow__))
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
# else
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
# if __cplusplus >= 201103L
# define __THROW noexcept (true)
# else
@@ -74,7 +97,7 @@
# endif
# endif
-#else /* Not GCC. */
+#else /* Not GCC or clang. */
# if (defined __cplusplus \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
@@ -87,16 +110,7 @@
# define __THROWNL
# define __NTH(fct) fct
-#endif /* GCC. */
-
-/* Compilers that are not clang may object to
- #if defined __clang__ && __has_extension(...)
- even though they do not need to evaluate the right-hand side of the &&. */
-#if defined __clang__ && defined __has_extension
-# define __glibc_clang_has_extension(ext) __has_extension (ext)
-#else
-# define __glibc_clang_has_extension(ext) 0
-#endif
+#endif /* GCC || clang. */
/* These two macros are not used in glibc anymore. They are kept here
only because some other projects expect the macros to be defined. */
@@ -149,11 +163,11 @@
Headers that should use flexible arrays only if they're "real"
(e.g. only if they won't affect sizeof()) should test
#if __glibc_c99_flexarr_available. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
# define __flexarr []
# define __glibc_c99_flexarr_available 1
-#elif __GNUC_PREREQ (2,97)
-/* GCC 2.97 supports C99 flexible array members as an extension,
+#elif __GNUC_PREREQ (2,97) || defined __clang__
+/* GCC 2.97 and clang support C99 flexible array members as an extension,
even when in C89 mode or compiling C++ (any version). */
# define __flexarr []
# define __glibc_c99_flexarr_available 1
@@ -179,7 +193,7 @@
Example:
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
-#if defined __GNUC__ && __GNUC__ >= 2
+#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
# ifdef __cplusplus
@@ -204,17 +218,17 @@
*/
#endif
-/* GCC has various useful declarations that can be made with the
- `__attribute__' syntax. All of the ways we use this do fine if
- they are omitted for compilers that don't understand it. */
-#if !defined __GNUC__ || __GNUC__ < 2
+/* GCC and clang have various useful declarations that can be made with
+ the '__attribute__' syntax. All of the ways we use this do fine if
+ they are omitted for compilers that don't understand it. */
+#if !(defined __GNUC__ || defined __clang__)
# define __attribute__(xyz) /* Ignore */
#endif
/* At some point during the gcc 2.96 development the `malloc' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
# define __attribute_malloc__ __attribute__ ((__malloc__))
#else
# define __attribute_malloc__ /* Ignore */
@@ -232,23 +246,29 @@
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
# define __attribute_pure__ __attribute__ ((__pure__))
#else
# define __attribute_pure__ /* Ignore */
#endif
/* This declaration tells the compiler that the value is constant. */
-#if __GNUC_PREREQ (2,5)
+#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
# define __attribute_const__ __attribute__ ((__const__))
#else
# define __attribute_const__ /* Ignore */
#endif
+#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
+# define __attribute_maybe_unused__ __attribute__ ((__unused__))
+#else
+# define __attribute_maybe_unused__ /* Ignore */
+#endif
+
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (3,1)
+#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
# define __attribute_used__ __attribute__ ((__used__))
# define __attribute_noinline__ __attribute__ ((__noinline__))
#else
@@ -257,7 +277,7 @@
#endif
/* Since version 3.2, gcc allows marking deprecated functions. */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
#else
# define __attribute_deprecated__ /* Ignore */
@@ -267,7 +287,7 @@
when a deprecated function is used. clang claims to be gcc 4.2, but
may also support this feature. */
#if __GNUC_PREREQ (4,5) \
- || __glibc_clang_has_extension (__attribute_deprecated_with_message__)
+ || __glibc_has_extension (__attribute_deprecated_with_message__)
# define __attribute_deprecated_msg__(msg) \
__attribute__ ((__deprecated__ (msg)))
#else
@@ -280,7 +300,7 @@
If several `format_arg' attributes are given for the same function, in
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
all designated arguments are considered. */
-#if __GNUC_PREREQ (2,8)
+#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
#else
# define __attribute_format_arg__(x) /* Ignore */
@@ -290,27 +310,42 @@
attribute for functions was introduced. We don't want to use it
unconditionally (although this would be possible) since it
generates warnings. */
-#if __GNUC_PREREQ (2,97)
+#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
# define __attribute_format_strfmon__(a,b) \
__attribute__ ((__format__ (__strfmon__, a, b)))
#else
# define __attribute_format_strfmon__(a,b) /* Ignore */
#endif
-/* The nonull function attribute allows to mark pointer parameters which
+/* The nonnull function attribute marks pointer parameters that
must not be NULL. */
-#if __GNUC_PREREQ (3,3)
-# define __nonnull(params) __attribute__ ((__nonnull__ params))
-#else
-# define __nonnull(params)
+#ifndef __nonnull
+# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
+# define __nonnull(params) __attribute__ ((__nonnull__ params))
+# else
+# define __nonnull(params)
+# endif
+#elif !defined __GLIBC__
+# undef __nonnull
+# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params)
+#endif
+
+/* The returns_nonnull function attribute marks the return type of the function
+ as always being non-null. */
+#ifndef __returns_nonnull
+# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__)
+# define __returns_nonnull __attribute__ ((__returns_nonnull__))
+# else
+# define __returns_nonnull
+# endif
#endif
/* If fortification mode, we warn about unused results of certain
function calls which can lead to problems. */
-#if __GNUC_PREREQ (3,4)
+#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
# define __attribute_warn_unused_result__ \
__attribute__ ((__warn_unused_result__))
-# if __USE_FORTIFY_LEVEL > 0
+# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
# define __wur __attribute_warn_unused_result__
# endif
#else
@@ -321,7 +356,7 @@
#endif
/* Forces a function to be always inlined. */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
it conflicts with this definition. Therefore undefine it first to
allow either header to be included first. */
@@ -334,7 +369,7 @@
/* Associate error messages with the source location of the call site rather
than with the source location inside the function. */
-#if __GNUC_PREREQ (4,3)
+#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
# define __attribute_artificial__ __attribute__ ((__artificial__))
#else
# define __attribute_artificial__ /* Ignore */
@@ -377,12 +412,14 @@
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
version 2.8. */
-#if !__GNUC_PREREQ (2,8)
+#if !(__GNUC_PREREQ (2,8) || defined __clang__)
# define __extension__ /* Ignore */
#endif
-/* __restrict is known in EGCS 1.2 and above. */
-#if !__GNUC_PREREQ (2,92)
+/* __restrict is known in EGCS 1.2 and above, and in clang.
+ It works also in C++ mode (outside of arrays), but only when spelled
+ as '__restrict', not 'restrict'. */
+#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __restrict restrict
# else
@@ -392,8 +429,9 @@
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
- GCC 3.1 supports this. */
-#if __GNUC_PREREQ (3,1) && !defined __GNUG__
+ GCC 3.1 and clang support this.
+ This syntax is not usable in C++ mode. */
+#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
# define __restrict_arr __restrict
#else
# ifdef __GNUC__
@@ -408,7 +446,7 @@
# endif
#endif
-#if __GNUC__ >= 3
+#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
# define __glibc_likely(cond) __builtin_expect ((cond), 1)
#else
@@ -416,15 +454,10 @@
# define __glibc_likely(cond) (cond)
#endif
-#ifdef __has_attribute
-# define __glibc_has_attribute(attr) __has_attribute (attr)
-#else
-# define __glibc_has_attribute(attr) 0
-#endif
-
#if (!defined _Noreturn \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
- && !__GNUC_PREREQ (4,7))
+ && !(__GNUC_PREREQ (4,7) \
+ || (3 < __clang_major__ + (5 <= __clang_minor__))))
# if __GNUC_PREREQ (2,8)
# define _Noreturn __attribute__ ((__noreturn__))
# else
@@ -453,14 +486,19 @@
#if (!defined _Static_assert && !defined __cplusplus \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
- && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+ && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
+ || defined __STRICT_ANSI__))
# define _Static_assert(expr, diagnostic) \
extern int (*__Static_assert_function (void)) \
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
#endif
-#include <bits/wordsize.h>
-#include <bits/long-double.h>
+/* The #ifndef lets Gnulib avoid including these on non-glibc
+ platforms, where the includes typically do not exist. */
+#ifdef __GLIBC__
+# include <bits/wordsize.h>
+# include <bits/long-double.h>
+#endif
#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
# ifdef __REDIRECT
@@ -550,7 +588,7 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
check is required to enable the use of generic selection. */
#if !defined __cplusplus \
&& (__GNUC_PREREQ (4, 9) \
- || __glibc_clang_has_extension (c_generic_selections) \
+ || __glibc_has_extension (c_generic_selections) \
|| (!defined __GNUC__ && defined __STDC_VERSION__ \
&& __STDC_VERSION__ >= 201112L))
# define __HAVE_GENERIC_SELECTION 1
@@ -564,9 +602,26 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
array according to access mode, or at least one element when
size-index is not provided:
access (access-mode, <ref-index> [, <size-index>]) */
-#define __attr_access(x) __attribute__ ((__access__ x))
+# define __attr_access(x) __attribute__ ((__access__ x))
+# if __GNUC_PREREQ (11, 0)
+# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
+# else
+# define __attr_access_none(argno)
+# endif
#else
# define __attr_access(x)
+# define __attr_access_none(argno)
+#endif
+
+#if __GNUC_PREREQ (11, 0)
+/* Designates dealloc as a function to call to deallocate objects
+ allocated by the declared function. */
+# define __attr_dealloc(dealloc, argno) \
+ __attribute__ ((__malloc__ (dealloc, argno)))
+# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
+#else
+# define __attr_dealloc(dealloc, argno)
+# define __attr_dealloc_free
#endif
/* Specify that a function such as setjmp or vfork may return
lib/libc/include/generic-glibc/sys/ioctl.h
@@ -38,7 +38,17 @@ __BEGIN_DECLS
/* Perform the I/O control operation specified by REQUEST on FD.
One argument may follow; its presence and type depend on REQUEST.
Return value depends on REQUEST. Usually -1 indicates error. */
+#ifndef __USE_TIME_BITS64
extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
+ __ioctl_time64) __THROW;
+# else
+extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
+# define ioctl __ioctl_time64
+# endif
+#endif
__END_DECLS
lib/libc/include/generic-glibc/sys/mount.h
@@ -48,6 +48,8 @@ enum
#define MS_MANDLOCK MS_MANDLOCK
MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
#define MS_DIRSYNC MS_DIRSYNC
+ MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
+#define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
MS_NOATIME = 1024, /* Do not update access times. */
#define MS_NOATIME MS_NOATIME
MS_NODIRATIME = 2048, /* Do not update directory access times. */
lib/libc/include/generic-glibc/sys/msg.h
@@ -58,7 +58,17 @@ struct msgbuf
__BEGIN_DECLS
/* Message queue control operation. */
+#ifndef __USE_TIME_BITS64
extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (msgctl,
+ (int __msqid, int __cmd, struct msqid_ds *__buf),
+ __msgctl64);
+# else
+# define msgctl __msgctl64
+# endif
+#endif
/* Get messages queue. */
extern int msgget (key_t __key, int __msgflg) __THROW;
lib/libc/include/generic-glibc/sys/poll.h
@@ -51,7 +51,8 @@ __BEGIN_DECLS
This function is a cancellation point and therefore not marked with
__THROW. */
-extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
+extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
+ __attr_access ((__write_only__, 1, 2));
#ifdef __USE_GNU
/* 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);
__THROW. */
extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
- const __sigset_t *__ss);
+ const __sigset_t *__ss)
+ __attr_access ((__write_only__, 1, 2));
+
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT
+extern int __REDIRECT (ppoll, (struct pollfd *__fds, nfds_t __nfds,
+ const struct timespec *__timeout,
+ const __sigset_t *__ss),
+ __ppoll64)
+ __attr_access ((__write_only__, 1, 2));
+# else
+# define ppoll __ppoll64
+# endif
+# endif
#endif
__END_DECLS
lib/libc/include/generic-glibc/sys/prctl.h
@@ -25,10 +25,6 @@
we're picking up... */
/* Memory tagging control operations (for AArch64). */
-#ifndef PR_TAGGED_ADDR_ENABLE
-# define PR_TAGGED_ADDR_ENABLE (1UL << 8)
-#endif
-
#ifndef PR_MTE_TCF_SHIFT
# define PR_MTE_TCF_SHIFT 1
# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
@@ -42,7 +38,17 @@
__BEGIN_DECLS
/* Control process execution. */
+#ifndef __USE_TIME_BITS64
extern int prctl (int __option, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
+# else
+extern int __prctl_time64 (int __option,d ...) __THROW;
+# define ioctl __prctl_time64
+# endif
+#endif
+
__END_DECLS
lib/libc/include/generic-glibc/sys/resource.h
@@ -48,18 +48,19 @@ typedef int __priority_which_t;
Returns 0 if successful, -1 if not (and sets errno). */
#ifndef __USE_FILE_OFFSET64
extern int getrlimit (__rlimit_resource_t __resource,
- struct rlimit *__rlimits) __THROW;
+ struct rlimit *__rlimits) __THROW __nonnull ((2));
#else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
- struct rlimit *__rlimits), getrlimit64);
+ struct rlimit *__rlimits), getrlimit64)
+ __nonnull ((2));
# else
# define getrlimit getrlimit64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int getrlimit64 (__rlimit_resource_t __resource,
- struct rlimit64 *__rlimits) __THROW;
+ struct rlimit64 *__rlimits) __THROW __nonnull ((2));
#endif
/* Set the soft and hard limits for RESOURCE to *RLIMITS.
@@ -67,25 +68,36 @@ extern int getrlimit64 (__rlimit_resource_t __resource,
Return 0 if successful, -1 if not (and sets errno). */
#ifndef __USE_FILE_OFFSET64
extern int setrlimit (__rlimit_resource_t __resource,
- const struct rlimit *__rlimits) __THROW;
+ const struct rlimit *__rlimits) __THROW __nonnull ((2));
#else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
const struct rlimit *__rlimits),
- setrlimit64);
+ setrlimit64) __nonnull ((2));
# else
# define setrlimit setrlimit64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int setrlimit64 (__rlimit_resource_t __resource,
- const struct rlimit64 *__rlimits) __THROW;
+ const struct rlimit64 *__rlimits) __THROW
+ __nonnull ((2));
#endif
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (getrusage, (__rusage_who_t __who,
+ struct rusage *__usage),
+ __getrusage64);
+# else
+# define getrusage __getrusage64
+# endif
+#endif
+
/* Return the highest priority of any process specified by WHICH and WHO
(see above); if WHO is zero, the current process, process group, or user
(as specified by WHO) is used. A lower priority number means higher
lib/libc/include/generic-glibc/sys/select.h
@@ -98,10 +98,23 @@ __BEGIN_DECLS
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifndef __USE_TIME_BITS64
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (select,
+ (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ struct timeval *__restrict __timeout),
+ __select64);
+# else
+# define select __select64
+# endif
+#endif
#ifdef __USE_XOPEN2K
/* 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,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pselect,
+ (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ const struct timespec *__restrict __timeout,
+ const __sigset_t *__restrict __sigmask),
+ __pselect64);
+# else
+# define pselect __pselect64
+# endif
+# endif
#endif
lib/libc/include/generic-glibc/sys/sem.h
@@ -48,7 +48,17 @@ struct sembuf
__BEGIN_DECLS
/* Semaphore control operation. */
+#ifndef __USE_TIME_BITS64
extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (semctl,
+ (int __semid, int __semnum, int __cmd, ...),
+ __semctl64);
+# else
+# define semctl __semctl64
+# endif
+#endif
/* Get semaphore. */
extern 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;
#ifdef __USE_GNU
/* Operate on semaphore with timeout. */
+# ifndef __USE_TIME_BITS64
extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
const struct timespec *__timeout) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (semtimedop, (int __semid, struct sembuf *__sops,
+ size_t __nsops,
+ const struct timespec *__timeout),
+ __semtimedop64);
+# else
+# define semtimedop __semtimedop64
+# endif
+# endif
#endif
__END_DECLS
lib/libc/include/generic-glibc/sys/shm.h
@@ -46,7 +46,17 @@ __BEGIN_DECLS
facility. The definition is found in XPG4.2. */
/* Shared memory control operation. */
+#ifndef __USE_TIME_BITS64
extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (shmctl,
+ (int __shmid, int __cmd, struct shmid_ds *__buf),
+ __shmctl64);
+# else
+# define shmctl __shmctl64
+# endif
+#endif
/* Get shared memory segment. */
extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
lib/libc/include/generic-glibc/sys/socket.h
@@ -170,8 +170,20 @@ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifndef __USE_TIME_BITS64
extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
int __flags);
+#else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (sendmsg, (int __fd, const struct msghdr *__message,
+ int __flags),
+ __sendmsg64);
+# else
+extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
+ int __flags);
+# defien sendmsg __sendmsg64
+# endif
+#endif
#ifdef __USE_GNU
/* 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,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
-#endif
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sendmmsg, (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags),
+ __sendmmsg64);
+# else
+extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags);
+# define sendmmsg __sendmmsg64
+# endif
+# endif /* __USE_TIME_BITS64 */
+#endif /* __USE_GNU */
/* Receive a message as described by MESSAGE from socket FD.
Returns the number of bytes read or -1 for errors.
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifndef __USE_TIME_BITS64
extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
+#else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (recvmsg,
+ (int __fd, struct msghdr *__message, int __flags),
+ __recvmsg64);
+# else
+extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, int __flags);
+# define recvmsg __recvmsg64
+# endif
+#endif
#ifdef __USE_GNU
/* 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);
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
struct timespec *__tmo);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags,
+ struct timespec *__tmo),
+ __recvmmsg64);
+# else
+# define recvmmsg __recvmmsg64
+# endif
+# endif
#endif
/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
actual length. Returns 0 on success, -1 for errors. */
+#ifndef __USE_TIME_BITS64
extern int getsockopt (int __fd, int __level, int __optname,
void *__restrict __optval,
socklen_t *__restrict __optlen) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT_NTH (getsockopt,
+ (int __fd, int __level, int __optname,
+ void *__restrict __optval,
+ socklen_t *__restrict __optlen),
+ __getsockopt64);
+# else
+extern int __getsockopt64 (int __fd, int __level, int __optname,
+ void *__restrict __optval,
+ socklen_t *__restrict __optlen) __THROW;
+# define getsockopt __getsockopt64
+# endif
+#endif
/* Set socket FD's option OPTNAME at protocol level LEVEL
to *OPTVAL (which is OPTLEN bytes long).
Returns 0 on success, -1 for errors. */
+#ifndef __USE_TIME_BITS64
extern int setsockopt (int __fd, int __level, int __optname,
const void *__optval, socklen_t __optlen) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT_NTH (setsockopt,
+ (int __fd, int __level, int __optname,
+ const void *__optval, socklen_t __optlen),
+ __setsockopt64);
+# else
+extern int __setsockopt64 (int __fd, int __level, int __optname,
+ const void *__optval, socklen_t __optlen) __THROW;
+# define setsockopt __setsockopt64
+# endif
+#endif
/* Prepare to accept connections on socket FD.
lib/libc/include/generic-glibc/sys/stat.h
@@ -209,21 +209,51 @@ extern int stat (const char *__restrict __file,
that file descriptor FD is open on and put them in BUF. */
extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
#else
-# ifdef __REDIRECT_NTH
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
+ struct stat *__restrict __buf),
+ __stat64_time64)
+ __nonnull ((1, 2));
+extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf),
+ __fstat64_time64)
+ __nonnull ((2));
+# else
+# define stat __stat64_time64
+# define fstat __fstat64_time64
+# endif
+# else
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
struct stat *__restrict __buf), stat64)
__nonnull ((1, 2));
extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
__nonnull ((2));
-# else
-# define stat stat64
-# define fstat fstat64
+# else
+# define stat stat64
+# define fstat fstat64
+# endif
# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int stat64 (const char *__restrict __file,
struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (stat64, (const char *__restrict __file,
+ struct stat64 *__restrict __buf),
+ __stat64_time64)
+ __nonnull ((1, 2));
+extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),
+ __fstat64_time64)
+ __nonnull ((2));
+# else
+# define stat64 __stat64_time64
+# define fstat64 __fstat64_time
+# endif
+# endif
#endif
#ifdef __USE_ATFILE
@@ -235,20 +265,44 @@ extern int fstatat (int __fd, const char *__restrict __file,
struct stat *__restrict __buf, int __flag)
__THROW __nonnull ((2, 3));
# else
-# ifdef __REDIRECT_NTH
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
struct stat *__restrict __buf,
int __flag),
- fstatat64) __nonnull ((2, 3));
+ __fstatat64_time64) __nonnull ((2, 3));
+# else
+# define fstatat __fstatat64_time64
+# endif
# else
-# define fstatat fstatat64
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
+ struct stat *__restrict __buf,
+ int __flag),
+ fstatat64) __nonnull ((2, 3));
+# else
+# define fstatat fstatat64
+# endif
# endif
# endif
# ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int fstatat64 (int __fd, const char *__restrict __file,
struct stat64 *__restrict __buf, int __flag)
__THROW __nonnull ((2, 3));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatat64, (int __fd,
+ const char *__restrict __file,
+ struct stat64 *__restrict __buf,
+ int __flag),
+ __fstatat64_time64)
+ __nonnull ((2, 3));
+# else
+# define fstatat64 __fstatat64_time64
+# endif
+# endif
# endif
#endif
@@ -259,19 +313,37 @@ extern int fstatat64 (int __fd, const char *__restrict __file,
extern int lstat (const char *__restrict __file,
struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
# else
-# ifdef __REDIRECT_NTH
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (lstat,
(const char *__restrict __file,
- struct stat *__restrict __buf), lstat64)
+ struct stat *__restrict __buf), __lstat64_time64)
__nonnull ((1, 2));
+# else
+# define lstat __lstat64_time64
+# endif
# else
-# define lstat lstat64
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (lstat,
+ (const char *__restrict __file,
+ struct stat *__restrict __buf), lstat64)
+ __nonnull ((1, 2));
+# else
+# define lstat lstat64
+# endif
# endif
# endif
# ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int lstat64 (const char *__restrict __file,
struct stat64 *__restrict __buf)
__THROW __nonnull ((1, 2));
+# else
+extern int __REDIRECT_NTH (lstat64, (const char *__restrict __file,
+ struct stat64 *__restrict __buf),
+ __lstat64_time64)
+ __nonnull ((1, 2));
+# endif
# endif
#endif
@@ -355,17 +427,38 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
#endif
#ifdef __USE_ATFILE
+# ifndef __USE_TIME_BITS64
/* Set file access and modification times relative to directory file
descriptor. */
extern int utimensat (int __fd, const char *__path,
const struct timespec __times[2],
int __flags)
__THROW __nonnull ((2));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path,
+ const struct timespec __times[2],
+ int flags),
+ __utimensat64) __nonnull ((2));
+# else
+# define utimensat __utimensat64
+# endif
+# endif
#endif
#ifdef __USE_XOPEN2K8
+# ifndef __USE_TIME_BITS64
/* Set file access and modification times of the file associated with FD. */
extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
+
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (futimens, (int fd, const struct timespec __times[2]),
+ __futimens64);
+# else
+# define futimens __futimens64
+# endif
+# endif
#endif
#ifdef __USE_GNU
lib/libc/include/generic-glibc/sys/statvfs.h
@@ -21,7 +21,7 @@
#include <features.h>
-/* Get the system-specific definition of `struct statfs'. */
+/* Get the system-specific definition of `struct statvfs'. */
#include <bits/statvfs.h>
#ifndef __USE_FILE_OFFSET64
lib/libc/include/generic-glibc/sys/time.h
@@ -63,10 +63,21 @@ struct timezone
use localtime etc. instead.
This function itself is semi-obsolete;
most callers should use time or clock_gettime instead. */
+#ifndef __USE_TIME_BITS64
extern int gettimeofday (struct timeval *__restrict __tv,
void *__restrict __tz) __THROW __nonnull ((1));
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (gettimeofday, (struct timeval *__restrict __tv,
+ void *__restrict __tz),
+ __gettimeofday64) __nonnull ((1));
+# else
+# define gettimeofday __gettimeofday64
+# endif
+#endif
#ifdef __USE_MISC
+# ifndef __USE_TIME_BITS64
/* Set the current time of day and timezone information.
This call is restricted to the super-user.
Setting the timezone in this way is obsolete, but we don't yet
@@ -82,6 +93,20 @@ extern int settimeofday (const struct timeval *__tv,
This call is restricted to the super-user. */
extern int adjtime (const struct timeval *__delta,
struct timeval *__olddelta) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (settimeofday, (const struct timeval *__tv,
+ const struct timezone *__tz),
+ __settimeofday64);
+
+extern int __REDIRECT_NTH (adjtime, (const struct timeval *__delta,
+ struct timeval *__olddelta),
+ __adjtime64);
+# else
+# define settimeofday __settimeofday64
+# define adjtime __adjtime64
+# endif
+# endif
#endif
@@ -118,6 +143,7 @@ typedef enum __itimer_which __itimer_which_t;
typedef int __itimer_which_t;
#endif
+#ifndef __USE_TIME_BITS64
/* Set *VALUE to the current setting of timer WHICH.
Return 0 on success, -1 on errors. */
extern int getitimer (__itimer_which_t __which,
@@ -136,21 +162,66 @@ extern int setitimer (__itimer_which_t __which,
extern int utimes (const char *__file, const struct timeval __tvp[2])
__THROW __nonnull ((1));
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (getitimer, (__itimer_which_t __which,
+ struct itimerval *__value),
+ __getitimer64);
+
+extern int __REDIRECT_NTH (setitimer, (__itimer_which_t __which,
+ const struct itimerval *__restrict __new,
+ struct itimerval *__restrict __old),
+ __setitimer64);
+
+extern int __REDIRECT_NTH (utimes, (const char *__file,
+ const struct timeval __tvp[2]),
+ __utimes64) __nonnull ((1));
+# else
+# define getitimer __getitimer64
+# define setitimer __setitimer64
+# define utimes __utimes64
+# endif
+#endif
+
#ifdef __USE_MISC
+# ifndef __USE_TIME_BITS64
/* Same as `utimes', but does not follow symbolic links. */
extern int lutimes (const char *__file, const struct timeval __tvp[2])
__THROW __nonnull ((1));
/* Same as `utimes', but takes an open file descriptor instead of a name. */
extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (lutimes, (const char *__file,
+ const struct timeval __tvp[2]),
+ __lutimes64) __nonnull ((1));
+
+extern int __REDIRECT_NTH (futimes, (int __fd, const struct timeval __tvp[2]),
+ __futimes64);
+# else
+# define lutimes __lutimes64
+# define futimes __futimes64
+# endif
+# endif
#endif
#ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
/* Change the access time of FILE relative to FD to TVP[0] and the
modification time of FILE to TVP[1]. If TVP is a null pointer, use
the current time instead. Returns 0 on success, -1 on errors. */
extern int futimesat (int __fd, const char *__file,
const struct timeval __tvp[2]) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (futimesat, (int __fd, const char *__file,
+ const struct timeval __tvp[2]),
+ __futimesat64);
+# else
+# define futimesat __futimesat64
+# endif
+# endif
#endif
lib/libc/include/generic-glibc/sys/timerfd.h
@@ -47,9 +47,31 @@ extern int timerfd_settime (int __ufd, int __flags,
const struct itimerspec *__utmr,
struct itimerspec *__otmr) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (timerfd_settime,
+ (int __ufd, int __flags,
+ const struct itimerspec *__restrict __value,
+ struct itimerspec *__restrict __ovalue),
+ __timerfd_settime64);
+# else
+# define timerfd_settime __timerfd_settime64
+# endif
+#endif
+
/* Return the next expiration time of UFD. */
extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (timerfd_gettime, (int __ufd,
+ struct itimerspec *__otmr),
+ __timerfd_gettime64);
+# else
+# define timerfd_gettime __timerfd_gettime64
+# endif
+#endif
+
__END_DECLS
#endif /* sys/timerfd.h */
\ No newline at end of file
lib/libc/include/generic-glibc/sys/timex.h
@@ -54,17 +54,34 @@ struct ntptimeval
__BEGIN_DECLS
-extern int __adjtimex (struct timex *__ntx) __THROW;
+#ifndef __USE_TIME_BITS64
extern int adjtimex (struct timex *__ntx) __THROW;
+extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
-#ifdef __REDIRECT_NTH
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
- ntp_gettimex);
+ ntp_gettimex);
+# else
+# define ntp_gettime ntp_gettimex
+# endif
+extern int ntp_adjtime (struct timex *__tntx) __THROW;
#else
-extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
-# define ntp_gettime ntp_gettimex
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx),
+ ___adjtimex64);
+extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
+ __ntp_gettime64);
+extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv),
+ __ntp_gettimex64);
+extern int __REDIRECT_NTH (ntp_adjtime, (struct timex *__ntx),
+ ___adjtimex64);
+# else
+# define adjtimex ___adjtimex64
+# define ntp_adjtime ___adjtimex64
+# define ntp_gettime __ntp_gettime64
+# define ntp_gettimex __ntp_gettimex64
+# endif
#endif
-extern int ntp_adjtime (struct timex *__tntx) __THROW;
__END_DECLS
lib/libc/include/generic-glibc/sys/uio.h
@@ -39,7 +39,7 @@ __BEGIN_DECLS
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
- __wur;
+ __wur __attr_access ((__read_only__, 2, 3));
/* Write data pointed by the buffers described by IOVEC, which
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)
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
- __wur;
+ __wur __attr_access ((__read_only__, 2, 3));
#ifdef __USE_MISC
@@ -65,7 +65,8 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
- __off_t __offset) __wur;
+ __off_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Write data pointed by the buffers described by IOVEC, which is a
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,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
- __off_t __offset) __wur;
+ __off_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset),
- preadv64) __wur;
+ preadv64)
+ __wur __attr_access ((__read_only__, 2, 3));
extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset),
- pwritev64) __wur;
+ pwritev64)
+ __wur __attr_access ((__read_only__, 2, 3));
# else
# define preadv preadv64
# define pwritev pwritev64
@@ -104,7 +108,8 @@ extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
- __off64_t __offset) __wur;
+ __off64_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Write data pointed by the buffers described by IOVEC, which is a
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,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
- __off64_t __offset) __wur;
+ __off64_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
# endif
#endif /* Use misc. */
@@ -125,7 +131,8 @@ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
# ifndef __USE_FILE_OFFSET64
/* Same as preadv but with an additional flag argumenti defined at uio.h. */
extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count,
- __off_t __offset, int ___flags) __wur;
+ __off_t __offset, int ___flags)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Same as preadv but with an additional flag argument defined at uio.h. */
extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
@@ -136,11 +143,13 @@ extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset,
int __flags),
- pwritev64v2) __wur;
+ pwritev64v2)
+ __wur __attr_access ((__read_only__, 2, 3));
extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset,
int __flags),
- preadv64v2) __wur;
+ preadv64v2)
+ __wur __attr_access ((__read_only__, 2, 3));
# else
# define preadv2 preadv64v2
# define pwritev2 pwritev64v2
@@ -151,12 +160,14 @@ extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
/* Same as preadv but with an additional flag argumenti defined at uio.h. */
extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,
int __count, __off64_t __offset,
- int ___flags) __wur;
+ int ___flags)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Same as preadv but with an additional flag argument defined at uio.h. */
extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,
int __count, __off64_t __offset,
- int __flags) __wur;
+ int __flags)
+ __wur __attr_access ((__read_only__, 2, 3));
# endif
#endif /* Use GNU. */
lib/libc/include/generic-glibc/sys/wait.h
@@ -144,14 +144,34 @@ struct rusage;
nil, store information about the child's resource usage there. If the
WUNTRACED bit is set in OPTIONS, return status for stopped children;
otherwise don't. */
+# ifndef __USE_TIME_BITS64
extern __pid_t wait3 (int *__stat_loc, int __options,
struct rusage * __usage) __THROWNL;
+# else
+# ifdef __REDIRECT_NTHNL
+extern __pid_t __REDIRECT_NTHNL (wait3, (int *__stat_loc, int __options,
+ struct rusage * __usage),
+ __wait3_time64);
+# else
+# define wait3 __wait3_time64
+# endif
+# endif
#endif
#ifdef __USE_MISC
+# ifndef __USE_TIME_BITS64
/* PID is like waitpid. Other args are like wait3. */
extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
struct rusage *__usage) __THROWNL;
+# else
+# ifdef __REDIRECT_NTHNL
+extern __pid_t __REDIRECT_NTHNL (wait4, (__pid_t __pid, int *__stat_loc,
+ int __options, struct rusage *__usage),
+ __wait4_time64);
+# else
+# define wait4 __wait4_time64
+# endif
+# endif
#endif /* Use misc. */
lib/libc/include/generic-glibc/aio.h
@@ -193,12 +193,17 @@ extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
extern int __REDIRECT_NTH (aio_cancel,
(int __fildes, struct aiocb *__aiocbp),
aio_cancel64);
-
+# ifdef __USE_TIME_BITS64
+extern int __REDIRECT_NTH (aio_suspend,
+ (const struct aiocb *const __list[], int __nent,
+ const struct timespec *__restrict __timeout),
+ __aio_suspend_time64) __nonnull ((1));
+# else
extern int __REDIRECT_NTH (aio_suspend,
(const struct aiocb *const __list[], int __nent,
const struct timespec *__restrict __timeout),
aio_suspend64) __nonnull ((1));
-
+# endif
extern int __REDIRECT_NTH (aio_fsync,
(int __operation, struct aiocb *__aiocbp),
aio_fsync64) __nonnull ((2));
@@ -210,7 +215,11 @@ extern int __REDIRECT_NTH (aio_fsync,
# define aio_error aio_error64
# define aio_return aio_return64
# define aio_cancel aio_cancel64
-# define aio_suspend aio_suspend64
+# ifdef __USE_TIME_BITS64
+# define aio_suspend __aio_suspend_time64
+# else
+# define aio_suspend aio_suspend64
+# endif
# define aio_fsync aio_fsync64
# endif
#endif
lib/libc/include/generic-glibc/elf.h
@@ -336,7 +336,8 @@ typedef struct
#define EM_BA2 202 /* Beyond BA2 */
#define EM_XCORE 203 /* XMOS xCORE */
#define EM_MCHP_PIC 204 /* Microchip 8-bit PIC(r) */
- /* reserved 205-209 */
+#define EM_INTELGT 205 /* Intel Graphics Technology */
+ /* reserved 206-209 */
#define EM_KM32 210 /* KM211 KM32 */
#define EM_KMX32 211 /* KM211 KMX32 */
#define EM_EMX16 212 /* KM211 KMX16 */
@@ -813,6 +814,10 @@ typedef struct
address keys. */
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
generic key. */
+#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* AArch64 tagged address
+ control. */
+#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
+ enabled keys. */
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
lib/libc/include/generic-glibc/fcntl.h
@@ -172,17 +172,30 @@ typedef __pid_t pid_t;
This function is a cancellation point and therefore not marked with
__THROW. */
-#ifndef __USE_FILE_OFFSET64
+#ifndef __USE_TIME_BITS64
+# ifndef __USE_FILE_OFFSET64
extern int fcntl (int __fd, int __cmd, ...);
-#else
-# ifdef __REDIRECT
-extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
# else
-# define fcntl fcntl64
+# ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
+# else
+# define fcntl fcntl64
+# endif
# endif
-#endif
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
extern int fcntl64 (int __fd, int __cmd, ...);
+# endif
+#else /* __USE_TIME_BITS64 */
+# ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
+ __fcntl_time64) __THROW;
+extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
+ __fcntl_time64) __THROW;
+# else
+extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
+# define fcntl64 __fcntl_time64
+# define fcntl __fcntl_time64
+# endif
#endif
/* Open FILE and return a new file descriptor for it, or -1 on error.
lib/libc/include/generic-glibc/features-time64.h
@@ -0,0 +1,37 @@
+/* Features part to handle 64-bit time_t support.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* We need to know the word size in order to check the time size. */
+#include <bits/wordsize.h>
+#include <bits/timesize.h>
+
+#if defined _TIME_BITS
+# if _TIME_BITS == 64
+# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
+# error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
+# elif __TIMESIZE == 32
+# define __USE_TIME_BITS64 1
+# endif
+# elif _TIME_BITS == 32
+# if __TIMESIZE > 32
+# error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
+# endif
+# else
+# error Invalid _TIME_BITS value (can only be 32 or 64-bit)
+# endif
+#endif
\ No newline at end of file
lib/libc/include/generic-glibc/features.h
@@ -33,6 +33,8 @@
Extensions to ISO C11 from TS 18661-4:2015.
__STDC_WANT_IEC_60559_TYPES_EXT__
Extensions to ISO C11 from TS 18661-3:2015.
+ __STDC_WANT_IEC_60559_EXT__
+ ISO C2X interfaces defined only in Annex F.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -48,6 +50,8 @@
_LARGEFILE64_SOURCE Additional functionality from LFS for large files.
_FILE_OFFSET_BITS=N Select default filesystem interface.
_ATFILE_SOURCE Additional *at interfaces.
+ _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+ MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
_GNU_SOURCE All of the above, plus GNU extensions.
_DEFAULT_SOURCE The default set of features (taking precedence over
__STRICT_ANSI__).
@@ -94,6 +98,8 @@
__USE_FILE_OFFSET64 Define 64bit interface as default.
__USE_MISC Define things from 4.3BSD or System V Unix.
__USE_ATFILE Define *at interfaces and AT_* constants for them.
+ __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+ MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
__USE_GNU Define GNU extensions.
__USE_FORTIFY_LEVEL Additional security measures used, according to level.
@@ -137,6 +143,7 @@
#undef __USE_FILE_OFFSET64
#undef __USE_MISC
#undef __USE_ATFILE
+#undef __USE_DYNAMIC_STACK_SIZE
#undef __USE_GNU
#undef __USE_FORTIFY_LEVEL
#undef __KERNEL_STRICT_NAMES
@@ -213,6 +220,8 @@
# define _DEFAULT_SOURCE 1
# undef _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
+# undef _DYNAMIC_STACK_SIZE_SOURCE
+# define _DYNAMIC_STACK_SIZE_SOURCE 1
#endif
/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
@@ -380,6 +389,8 @@
# define __USE_FILE_OFFSET64 1
#endif
+#include <features-time64.h>
+
#if defined _DEFAULT_SOURCE
# define __USE_MISC 1
#endif
@@ -388,6 +399,10 @@
# define __USE_ATFILE 1
#endif
+#ifdef _DYNAMIC_STACK_SIZE_SOURCE
+# define __USE_DYNAMIC_STACK_SIZE 1
+#endif
+
#ifdef _GNU_SOURCE
# define __USE_GNU 1
#endif
@@ -462,7 +477,7 @@
/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
#define __GLIBC__ 2
-#define __GLIBC_MINOR__ 33
+#define __GLIBC_MINOR__ 34
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
lib/libc/include/generic-glibc/fts.h
@@ -187,6 +187,7 @@ FTSENT *fts_read (FTS *);
int fts_set (FTS *, FTSENT *, int) __THROW;
#else
# ifdef __REDIRECT
+# ifndef __USE_TIME_BITS64
FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
int __REDIRECT (fts_close, (FTS *), fts64_close);
FTS *__REDIRECT (fts_open, (char * const *, int,
@@ -194,21 +195,53 @@ FTS *__REDIRECT (fts_open, (char * const *, int,
fts64_open);
FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read);
int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), fts64_set);
+# else
+FTSENT *__REDIRECT (fts_children, (FTS *, int), __fts64_children_time64);
+int __REDIRECT (fts_close, (FTS *), __fts64_close_time64);
+FTS *__REDIRECT (fts_open, (char * const *, int,
+ int (*)(const FTSENT **, const FTSENT **)),
+ __fts64_open_time64);
+FTSENT *__REDIRECT (fts_read, (FTS *), __fts64_read_time64);
+int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
+ __fts64_set_time64);
+# endif
# else
-# define fts_children fts64_children
-# define fts_close fts64_close
-# define fts_open fts64_open
-# define fts_read fts64_read
-# define fts_set fts64_set
+# ifndef __USE_TIME_BITS64
+# define fts_children fts64_children
+# define fts_close fts64_close
+# define fts_open fts64_open
+# define fts_read fts64_read
+# define fts_set fts64_set
+# else
+# endif
# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
FTSENT64 *fts64_children (FTS64 *, int);
int fts64_close (FTS64 *);
FTS64 *fts64_open (char * const *, int,
int (*)(const FTSENT64 **, const FTSENT64 **));
FTSENT64 *fts64_read (FTS64 *);
int fts64_set (FTS64 *, FTSENT64 *, int) __THROW;
+# else
+# ifdef __REDIRECT
+FTSENT *__REDIRECT (fts64_children, (FTS64 *, int), __fts64_children_time64);
+int __REDIRECT (fts64_close, (FTS64 *), __fts64_close_time64);
+FTS *__REDIRECT (fts64_open, (char * const *, int,
+ int (*)(const FTSENT64 **, const FTSENT64 **)),
+ __fts64_open_time64);
+FTSENT *__REDIRECT (fts64_read, (FTS64 *), __fts64_read_time64);
+int __REDIRECT_NTH (fts64_set, (FTS64 *, FTSENT64 *, int),
+ __fts64_set_time64);
+# else
+# define fts_children __fts64_children_time64
+# define fts_close __fts64_close_time64
+# define fts_open __fts64_open_time64
+# define fts_read __fts64_read_time64
+# define fts_set __fts64_set_time64
+# endif
+# endif
#endif
__END_DECLS
lib/libc/include/generic-glibc/ftw.h
@@ -137,15 +137,36 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
__nonnull ((1, 2));
#else
# ifdef __REDIRECT
+# ifndef __USE_TIME_BITS64
extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
int __descriptors), ftw64) __nonnull ((1, 2));
+# else
+extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
+ int __descriptors), __ftw64_time64)
+ __nonnull ((1, 2));
+# endif
# else
-# define ftw ftw64
+# ifndef __USE_TIME_BITS64
+# define ftw ftw64
+# else
+# define ftw __ftw64_time64
+# endif
# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int ftw64 (const char *__dir, __ftw64_func_t __func,
int __descriptors) __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (ftw64, (const char *__dir, __ftw64_func_t __func,
+ int __descriptors),
+ __ftw64_time64)
+ __nonnull ((1, 2));
+# else
+# define nftw64 __nftw64_time64
+# endif
+# endif
#endif
#ifdef __USE_XOPEN_EXTENDED
@@ -159,16 +180,37 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
int __flag) __nonnull ((1, 2));
# else
# ifdef __REDIRECT
+# ifndef __USE_TIME_BITS64
extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
int __descriptors, int __flag), nftw64)
__nonnull ((1, 2));
+# else
+extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
+ int __descriptors, int __flag), __nftw64_time64)
+ __nonnull ((1, 2));
+# endif
# else
-# define nftw nftw64
+# ifndef __USE_TIME_BITS64
+# define nftw nftw64
+# else
+# define nftw __nftw64_time64
+# endif
# endif
# endif
# ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int nftw64 (const char *__dir, __nftw64_func_t __func,
int __descriptors, int __flag) __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (nftw64, (const char *__dir, __nftw64_func_t __func,
+ int __descriptors, int __flag),
+ __nftw64_time64)
+ __nonnull ((1, 2));
+# else
+# define nftw64 __nftw64_time64
+# endif
+# endif
# endif
#endif
lib/libc/include/generic-glibc/glob.h
@@ -145,25 +145,47 @@ typedef struct
#if !defined __USE_FILE_OFFSET64
extern int glob (const char *__restrict __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob_t *__restrict __pglob) __THROW;
+ glob_t *__restrict __pglob) __THROWNL;
/* Free storage allocated in PGLOB by a previous `glob' call. */
extern void globfree (glob_t *__pglob) __THROW;
#else
-extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern,
- int __flags,
- int (*__errfunc) (const char *, int),
- glob_t *__restrict __pglob), glob64);
+# ifdef __USE_TIME_BITS64
+extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
+ int __flags,
+ int (*__errfunc) (const char *, int),
+ glob_t *__restrict __pglob),
+ __glob64_time64);
+
+extern void __REDIRECT_NTH (globfree, (glob_t *__pglob),
+ __globfree64_time64);
+# else
+extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
+ int __flags,
+ int (*__errfunc) (const char *, int),
+ glob_t *__restrict __pglob), glob64);
extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
+# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifdef __USE_TIME_BITS64
+extern int __REDIRECT_NTHNL (glob64, (const char *__restrict __pattern,
+ int __flags,
+ int (*__errfunc) (const char *, int),
+ glob64_t *__restrict __pglob),
+ __glob64_time64);
+
+extern void __REDIRECT_NTH (globfree64, (glob64_t *__pglob),
+ __globfree64_time64);
+# else
extern int glob64 (const char *__restrict __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob64_t *__restrict __pglob) __THROW;
+ glob64_t *__restrict __pglob) __THROWNL;
extern void globfree64 (glob64_t *__pglob) __THROW;
+# endif
#endif
lib/libc/include/generic-glibc/malloc.h
@@ -56,30 +56,25 @@ __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
the same pointer that was passed to it, aliasing needs to be allowed
between objects pointed by the old and new pointers. */
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
-__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3));
+ __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3))
+ __attr_dealloc_free;
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free (void *__ptr) __THROW;
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
extern void *memalign (size_t __alignment, size_t __size)
-__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
+ __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur
+ __attr_dealloc_free;
/* Allocate SIZE bytes on a page boundary. */
extern void *valloc (size_t __size) __THROW __attribute_malloc__
- __attribute_alloc_size__ ((1)) __wur;
+ __attribute_alloc_size__ ((1)) __wur __attr_dealloc_free;
/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
__size to nearest pagesize. */
-extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur;
-
-/* Underlying allocation function; successive calls should return
- contiguous pieces of memory. */
-extern void *(*__morecore) (ptrdiff_t __size) __MALLOC_DEPRECATED;
-
-/* Default value of `__morecore'. */
-extern void *__default_morecore (ptrdiff_t __size)
-__THROW __attribute_malloc__ __MALLOC_DEPRECATED;
+extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
+ __wur __attr_dealloc_free;
/* SVID2/XPG mallinfo structure */
@@ -161,24 +156,5 @@ extern void malloc_stats (void) __THROW;
/* Output information about state of allocator to stream FP. */
extern int malloc_info (int __options, FILE *__fp) __THROW;
-/* Hooks for debugging and user-defined versions. */
-extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr,
- const void *)
-__MALLOC_DEPRECATED;
-extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook)(size_t __size,
- const void *)
-__MALLOC_DEPRECATED;
-extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook)(void *__ptr,
- size_t __size,
- const void *)
-__MALLOC_DEPRECATED;
-extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment,
- size_t __size,
- const void *)
-__MALLOC_DEPRECATED;
-extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void)
- __MALLOC_DEPRECATED;
-
-
__END_DECLS
#endif /* malloc.h */
\ No newline at end of file
lib/libc/include/generic-glibc/math.h
@@ -104,7 +104,7 @@ __BEGIN_DECLS
# endif
#endif /* __USE_ISOC99 */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
/* Signaling NaN macros, if supported. */
# if __GNUC_PREREQ (3, 3)
# define SNANF (__builtin_nansf (""))
@@ -112,25 +112,39 @@ __BEGIN_DECLS
# define SNANL (__builtin_nansl (""))
# endif
#endif
-#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT16 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF16 (__builtin_nansf16 (""))
#endif
-#if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT32 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF32 (__builtin_nansf32 (""))
#endif
-#if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT64 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF64 (__builtin_nansf64 (""))
#endif
-#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT128 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF128 (__builtin_nansf128 (""))
#endif
-#if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT32X \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF32X (__builtin_nansf32x (""))
#endif
-#if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT64X \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF64X (__builtin_nansf64x (""))
#endif
-#if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT128X \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF128X (__builtin_nansf128x (""))
#endif
lib/libc/include/generic-glibc/monetary.h
@@ -37,7 +37,8 @@ __BEGIN_DECLS
/* Formatting a monetary value according to the current locale. */
extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
const char *__restrict __format, ...)
- __THROW __attribute_format_strfmon__ (3, 4);
+ __THROW __attribute_format_strfmon__ (3, 4)
+ __attr_access ((__write_only__, 1, 2));
#ifdef __USE_XOPEN2K8
/* POSIX.1-2008 extended locale interface (see locale.h). */
@@ -47,7 +48,8 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
locale_t __loc,
const char *__restrict __format, ...)
- __THROW __attribute_format_strfmon__ (4, 5);
+ __THROW __attribute_format_strfmon__ (4, 5)
+ __attr_access ((__write_only__, 1, 2));
#endif
#include <bits/floatn.h>
lib/libc/include/generic-glibc/mqueue.h
@@ -71,6 +71,7 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
unsigned int __msg_prio) __nonnull ((2));
#ifdef __USE_XOPEN2K
+# ifndef __USE_TIME_BITS64
/* Receive the oldest from highest priority messages in message queue
MQDES, stop waiting if ABS_TIMEOUT expires. */
extern 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,
size_t __msg_len, unsigned int __msg_prio,
const struct timespec *__abs_timeout)
__nonnull ((2, 5));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (mq_timedreceive, (mqd_t __mqdes,
+ char *__restrict __msg_ptr,
+ size_t __msg_len,
+ unsigned int *__restrict __msg_prio,
+ const struct timespec *__restrict __abs_timeout),
+ __mq_timedreceive_time64)
+ __nonnull ((2, 5));
+
+extern int __REDIRECT (mq_timedsend, (mqd_t __mqdes,
+ const char *__msg_ptr, size_t __msg_len,
+ unsigned int __msg_prio,
+ const struct timespec *__abs_timeout),
+ __mq_timedsend_time64)
+ __nonnull ((2, 5));
+# else
+# define mq_timedreceive __mq_timedreceive_time64
+# define mq_timedsend __mq_timedsend_time64
+# endif
+# endif
#endif
/* Define some inlines helping to catch common problems. */
lib/libc/include/generic-glibc/netdb.h
@@ -701,6 +701,17 @@ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
extern int gai_suspend (const struct gaicb *const __list[], int __ent,
const struct timespec *__timeout);
+# ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (gai_suspend, (const struct gaicb *const __list[],
+ int __ent,
+ const struct timespec *__timeout),
+ __gai_suspend_time64);
+# else
+# define gai_suspend __gai_suspend_time64
+# endif
+# endif
+
/* Get the error status of the request REQ. */
extern int gai_error (struct gaicb *__req) __THROW;
lib/libc/include/generic-glibc/nss.h
@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);
extern nss_endgrent _nss_##module##_endgrent; \
extern nss_endhostent _nss_##module##_endhostent; \
extern nss_endnetent _nss_##module##_endnetent; \
- extern nss_endnetgrent _nss_##module##__endnetgrent; \
+ extern nss_endnetgrent _nss_##module##_endnetgrent; \
extern nss_endprotoent _nss_##module##_endprotoent; \
extern nss_endpwent _nss_##module##_endpwent; \
extern nss_endrpcent _nss_##module##_endrpcent; \
lib/libc/include/generic-glibc/pthread.h
@@ -29,7 +29,9 @@
#include <bits/types/struct_timespec.h>
#include <bits/types/__sigset_t.h>
#include <bits/types/struct___jmp_buf_tag.h>
-
+#ifdef __USE_MISC
+# include <bits/pthread_stack_min-dynamic.h>
+#endif
/* Detach state. */
enum
@@ -221,6 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);
the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
+# ifndef __USE_TIME_BITS64
/* Make calling thread wait for termination of the thread TH, but only
until TIMEOUT. The exit status of the thread is stored in
*THREAD_RETURN, if THREAD_RETURN is not NULL.
@@ -240,6 +243,23 @@ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
clockid_t __clockid,
const struct timespec *__abstime);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pthread_timedjoin_np,
+ (pthread_t __th, void **__thread_return,
+ const struct timespec *__abstime),
+ __pthread_timedjoin_np64);
+
+extern int __REDIRECT (pthread_clockjoin_np,
+ (pthread_t __th, void **__thread_return,
+ clockid_t __clockid,
+ const struct timespec *__abstime),
+ __pthread_clockjoin_np64);
+# else
+# define pthread_timedjoin_np __pthread_timedjoin_np64
+# define pthread_clockjoin_np __pthread_clockjoin_np64
+# endif
+# endif
#endif
/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
@@ -454,11 +474,14 @@ extern int pthread_setconcurrency (int __level) __THROW;
#endif
#ifdef __USE_GNU
-/* Yield the processor to another thread or process.
- This function is similar to the POSIX `sched_yield' function but
- might be differently implemented in the case of a m-on-n thread
- implementation. */
extern int pthread_yield (void) __THROW;
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_yield, (void), sched_yield)
+ __attribute_deprecated_msg__ ("\
+pthread_yield is deprecated, use sched_yield instead");
+# else
+# define pthread_yield sched_yield
+# endif
/* Limit specified thread TH to run only on the processors represented
@@ -773,16 +796,39 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
+# ifndef __USE_TIME_BITS64
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_mutex_timedlock,
+ (pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__restrict __abstime),
+ __pthread_mutex_timedlock64) __nonnull ((1, 2));
+# else
+# define pthread_mutex_timedlock __pthread_mutex_timedlock64
+# endif
+# endif
#endif
#ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
clockid_t __clockid,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 3));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_mutex_clocklock,
+ (pthread_mutex_t *__restrict __mutex,
+ clockid_t __clockid,
+ const struct timespec *__restrict __abstime),
+ __pthread_mutex_clocklock64) __nonnull ((1, 3));
+# else
+# define pthread_mutex_clocklock __pthread_mutex_clocklock64
+# endif
+# endif
#endif
/* Unlock a mutex. */
@@ -809,8 +855,14 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
__THROW __nonnull ((1));
# ifdef __USE_GNU
-extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
+ pthread_mutex_consistent) __nonnull ((1))
+ __attribute_deprecated_msg__ ("\
+pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent");
+# else
+# define pthread_mutex_consistent_np pthread_mutex_consistent
+# endif
# endif
#endif
@@ -879,9 +931,15 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
int *__robustness)
__THROW __nonnull ((1, 2));
# ifdef __USE_GNU
-extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
- int *__robustness)
- __THROW __nonnull ((1, 2));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np,
+ (pthread_mutex_t *, int *),
+ pthread_mutexattr_getrobust) __nonnull ((1))
+ __attribute_deprecated_msg__ ("\
+pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust");
+# else
+# define pthread_mutexattr_getrobust_np pthread_mutexattr_getrobust
+# endif
# endif
/* Set the robustness flag of the mutex attribute ATTR. */
@@ -889,13 +947,18 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
int __robustness)
__THROW __nonnull ((1));
# ifdef __USE_GNU
-extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
- int __robustness)
- __THROW __nonnull ((1));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
+ (pthread_mutex_t *, int),
+ pthread_mutexattr_setrobust) __nonnull ((1))
+ __attribute_deprecated_msg__ ("\
+pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust");
+# else
+# define pthread_mutexattr_setrobust_np pthread_mutexattr_setrobust
+# endif
# endif
#endif
-
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Functions for handling read-write locks. */
@@ -919,16 +982,41 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_timedrdlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_timedrdlock64)
+ __nonnull ((1, 2));
+# else
+# define pthread_rwlock_timedrdlock __pthread_rwlock_timedrdlock64
+# endif
+# endif
# endif
# ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
clockid_t __clockid,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 3));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_clockrdlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ clockid_t __clockid,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_clockrdlock64)
+ __nonnull ((1, 3));
+# else
+# define pthread_rwlock_clockrdlock __pthread_rwlock_clockrdlock64
+# endif
+# endif
# endif
/* Acquire write lock for RWLOCK. */
@@ -941,16 +1029,42 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_timedwrlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_timedwrlock64)
+ __nonnull ((1, 2));
+# else
+# define pthread_rwlock_timedwrlock __pthread_rwlock_timedwrlock64
+# endif
+# endif
# endif
# ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
clockid_t __clockid,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 3));
+
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_clockwrlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ clockid_t __clockid,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_clockwrlock64)
+ __nonnull ((1, 3));
+# else
+# define pthread_rwlock_clockwrlock __pthread_rwlock_clockwrlock64
+# endif
+# endif
# endif
/* Unlock RWLOCK. */
@@ -1027,10 +1141,23 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2, 3));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pthread_cond_timedwait,
+ (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__restrict __abstime),
+ __pthread_cond_timedwait64)
+ __nonnull ((1, 2, 3));
+# else
+# define pthread_cond_timedwait __pthread_cond_timedwait64
+# endif
+# endif
# ifdef __USE_GNU
/* 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,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
__clockid_t __clock_id,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2, 4));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pthread_cond_clockwait,
+ (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ __clockid_t __clock_id,
+ const struct timespec *__restrict __abstime),
+ __pthread_cond_clockwait64)
+ __nonnull ((1, 2, 4));
+# else
+# define pthread_cond_clockwait __pthread_cond_clockwait64
+# endif
+# endif
# endif
/* Functions for handling condition variable attributes. */
@@ -1165,7 +1306,8 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;
/* Store POINTER in the thread-specific data slot identified by KEY. */
extern int pthread_setspecific (pthread_key_t __key,
- const void *__pointer) __THROW ;
+ const void *__pointer)
+ __THROW __attr_access_none (2);
#ifdef __USE_XOPEN2K
lib/libc/include/generic-glibc/pwd.h
@@ -139,20 +139,23 @@ extern struct passwd *getpwnam (const char *__name) __nonnull ((1));
extern int getpwent_r (struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((1, 2, 4));
+ __nonnull ((1, 2, 4))
+ __attr_access ((__write_only__, 2, 3));
# endif
extern int getpwuid_r (__uid_t __uid,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((2, 3, 5));
+ __nonnull ((2, 3, 5))
+ __attr_access ((__write_only__, 3, 4));
extern int getpwnam_r (const char *__restrict __name,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((1, 2, 3, 5));
+ __nonnull ((1, 2, 3, 5))
+ __attr_access ((__write_only__, 3, 4));
# ifdef __USE_MISC
@@ -167,7 +170,8 @@ extern int fgetpwent_r (FILE *__restrict __stream,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((1, 2, 3, 5));
+ __nonnull ((1, 2, 3, 5))
+ __attr_access ((__write_only__, 3, 4));
# endif
#endif /* POSIX or reentrant */
lib/libc/include/generic-glibc/regex.h
@@ -536,7 +536,8 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
'regcomp', with a malloc'ed value, or set to NULL before calling
'regfree'. */
extern const char *re_compile_pattern (const char *__pattern, size_t __length,
- struct re_pattern_buffer *__buffer);
+ struct re_pattern_buffer *__buffer)
+ __attr_access ((__read_only__, 1, 2));
/* 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);
extern regoff_t re_search (struct re_pattern_buffer *__buffer,
const char *__String, regoff_t __length,
regoff_t __start, regoff_t __range,
- struct re_registers *__regs);
+ struct re_registers *__regs)
+ __attr_access ((__read_only__, 2, 3));
/* 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,
const char *__string2, regoff_t __length2,
regoff_t __start, regoff_t __range,
struct re_registers *__regs,
- regoff_t __stop);
+ regoff_t __stop)
+ __attr_access ((__read_only__, 2, 3))
+ __attr_access ((__read_only__, 4, 5));
/* Like 're_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
const char *__String, regoff_t __length,
- regoff_t __start, struct re_registers *__regs);
+ regoff_t __start, struct re_registers *__regs)
+ __attr_access ((__read_only__, 2, 3));
/* 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,
const char *__string1, regoff_t __length1,
const char *__string2, regoff_t __length2,
regoff_t __start, struct re_registers *__regs,
- regoff_t __stop);
+ regoff_t __stop)
+ __attr_access ((__read_only__, 2, 3))
+ __attr_access ((__read_only__, 4, 5));
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -648,10 +655,12 @@ extern int regcomp (regex_t *_Restrict_ __preg,
extern int regexec (const regex_t *_Restrict_ __preg,
const char *_Restrict_ __String, size_t __nmatch,
regmatch_t __pmatch[_Restrict_arr_],
- int __eflags);
+ int __eflags)
+ __attr_access ((__write_only__, 4, 3));
extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
- char *_Restrict_ __errbuf, size_t __errbuf_size);
+ char *_Restrict_ __errbuf, size_t __errbuf_size)
+ __attr_access ((__write_only__, 3, 4));
extern void regfree (regex_t *__preg);
lib/libc/include/generic-glibc/resolv.h
@@ -168,20 +168,28 @@ __END_DECLS
#define res_close __res_close
#define res_init __res_init
#define res_isourserver __res_isourserver
-#define res_mkquery __res_mkquery
-#define res_query __res_query
-#define res_querydomain __res_querydomain
-#define res_search __res_search
-#define res_send __res_send
+
+#ifdef _LIBC
+# define __RESOLV_DEPRECATED
+# define __RESOLV_DEPRECATED_MSG(msg)
+#else
+# define __RESOLV_DEPRECATED __attribute_deprecated__
+# define __RESOLV_DEPRECATED_MSG(msg) __attribute_deprecated_msg__ (msg)
+#endif
__BEGIN_DECLS
-void fp_nquery (const unsigned char *, int, FILE *) __THROW;
-void fp_query (const unsigned char *, FILE *) __THROW;
-const char * hostalias (const char *) __THROW;
-void p_query (const unsigned char *) __THROW;
+void fp_nquery (const unsigned char *, int, FILE *) __THROW
+ __RESOLV_DEPRECATED;
+void fp_query (const unsigned char *, FILE *) __THROW
+ __RESOLV_DEPRECATED;
+const char * hostalias (const char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
+void p_query (const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
void res_close (void) __THROW;
int res_init (void) __THROW;
-int res_isourserver (const struct sockaddr_in *) __THROW;
+int res_isourserver (const struct sockaddr_in *) __THROW
+ __RESOLV_DEPRECATED;
int res_mkquery (int, const char *, int, int,
const unsigned char *, int, const unsigned char *,
unsigned char *, int) __THROW;
@@ -197,10 +205,7 @@ __END_DECLS
#define b64_ntop __b64_ntop
#define b64_pton __b64_pton
-#define dn_comp __dn_comp
#define dn_count_labels __dn_count_labels
-#define dn_expand __dn_expand
-#define dn_skipname __dn_skipname
#define fp_resstat __fp_resstat
#define loc_aton __loc_aton
#define loc_ntoa __loc_ntoa
@@ -215,19 +220,10 @@ __END_DECLS
#define p_rcode __p_rcode
#define putlong __putlong
#define putshort __putshort
-#define res_dnok __res_dnok
-#define res_hnok __res_hnok
#define res_hostalias __res_hostalias
-#define res_mailok __res_mailok
#define res_nameinquery __res_nameinquery
#define res_nclose __res_nclose
#define res_ninit __res_ninit
-#define res_nmkquery __res_nmkquery
-#define res_nquery __res_nquery
-#define res_nquerydomain __res_nquerydomain
-#define res_nsearch __res_nsearch
-#define res_nsend __res_nsend
-#define res_ownok __res_ownok
#define res_queriesmatch __res_queriesmatch
#define res_randomid __res_randomid
#define sym_ntop __sym_ntop
@@ -238,50 +234,61 @@ int res_hnok (const char *) __THROW;
int res_ownok (const char *) __THROW;
int res_mailok (const char *) __THROW;
int res_dnok (const char *) __THROW;
-int sym_ston (const struct res_sym *, const char *, int *) __THROW;
-const char * sym_ntos (const struct res_sym *, int, int *) __THROW;
-const char * sym_ntop (const struct res_sym *, int, int *) __THROW;
+int sym_ston (const struct res_sym *, const char *, int *) __THROW
+ __RESOLV_DEPRECATED;
+const char * sym_ntos (const struct res_sym *, int, int *) __THROW
+ __RESOLV_DEPRECATED;
+const char * sym_ntop (const struct res_sym *, int, int *) __THROW
+ __RESOLV_DEPRECATED;
int b64_ntop (const unsigned char *, size_t, char *, size_t)
- __THROW;
+ __THROW;
int b64_pton (char const *, unsigned char *, size_t) __THROW;
-int loc_aton (const char *__ascii, unsigned char *__binary) __THROW;
-const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW;
+int loc_aton (const char *__ascii, unsigned char *__binary) __THROW
+ __RESOLV_DEPRECATED;
+const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW
+ __RESOLV_DEPRECATED;
int dn_skipname (const unsigned char *, const unsigned char *)
- __THROW;
-void putlong (uint32_t, unsigned char *) __THROW;
-void putshort (uint16_t, unsigned char *) __THROW;
-const char * p_class (int) __THROW;
-const char * p_time (uint32_t) __THROW;
-const char * p_type (int) __THROW;
-const char * p_rcode (int) __THROW;
-const unsigned char * p_cdnname (const unsigned char *,
- const unsigned char *, int, FILE *) __THROW;
+ __THROW;
+void putlong (uint32_t, unsigned char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use NS_PUT16 instead");
+void putshort (uint16_t, unsigned char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use NS_PUT32 instead");
+const char * p_class (int) __THROW __RESOLV_DEPRECATED;
+const char * p_time (uint32_t) __THROW __RESOLV_DEPRECATED;
+const char * p_type (int) __THROW __RESOLV_DEPRECATED;
+const char * p_rcode (int) __THROW __RESOLV_DEPRECATED;
+const unsigned char * p_cdnname (const unsigned char *, const unsigned char *,
+ int, FILE *) __THROW __RESOLV_DEPRECATED;
const unsigned char * p_cdname (const unsigned char *, const unsigned char *,
- FILE *) __THROW;
+ FILE *) __THROW __RESOLV_DEPRECATED;
const unsigned char * p_fqnname (const unsigned char *__cp,
const unsigned char *__msg,
- int, char *, int) __THROW;
-const unsigned char * p_fqname (const unsigned char *,
- const unsigned char *, FILE *) __THROW;
-const char * p_option (unsigned long __option) __THROW;
-int dn_count_labels (const char *) __THROW;
+ int, char *, int) __THROW __RESOLV_DEPRECATED;
+const unsigned char * p_fqname (const unsigned char *, const unsigned char *,
+ FILE *) __THROW __RESOLV_DEPRECATED;
+const char * p_option (unsigned long __option) __THROW __RESOLV_DEPRECATED;
+int dn_count_labels (const char *) __THROW __RESOLV_DEPRECATED;
int dn_comp (const char *, unsigned char *, int, unsigned char **,
unsigned char **) __THROW;
int dn_expand (const unsigned char *, const unsigned char *,
const unsigned char *, char *, int) __THROW;
-unsigned int res_randomid (void) __THROW;
+unsigned int res_randomid (void) __THROW
+ __RESOLV_DEPRECATED_MSG ("use getentropy instead");
int res_nameinquery (const char *, int, int,
const unsigned char *,
- const unsigned char *) __THROW;
+ const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
int res_queriesmatch (const unsigned char *,
const unsigned char *,
const unsigned char *,
- const unsigned char *) __THROW;
+ const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
/* Things involving a resolver context. */
int res_ninit (res_state) __THROW;
-void fp_resstat (const res_state, FILE *) __THROW;
+void fp_resstat (const res_state, FILE *) __THROW
+ __RESOLV_DEPRECATED;
const char * res_hostalias (const res_state, const char *, char *, size_t)
- __THROW;
+ __THROW __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
int res_nquery (res_state, const char *, int, int,
unsigned char *, int) __THROW;
int res_nsearch (res_state, const char *, int, int,
lib/libc/include/generic-glibc/sched.h
@@ -74,8 +74,17 @@ extern int sched_get_priority_max (int __algorithm) __THROW;
extern int sched_get_priority_min (int __algorithm) __THROW;
/* Get the SCHED_RR interval for the named process. */
+#ifndef __USE_TIME_BITS64
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
-
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (sched_rr_get_interval,
+ (__pid_t __pid, struct timespec *__t),
+ __sched_rr_get_interval64);
+# else
+# define sched_rr_get_interval __sched_rr_get_interval64
+# endif
+#endif
#ifdef __USE_GNU
/* Access macros for `cpu_set'. */
lib/libc/include/generic-glibc/semaphore.h
@@ -59,16 +59,41 @@ extern int sem_wait (sem_t *__sem) __nonnull ((1));
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int sem_timedwait (sem_t *__restrict __sem,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sem_timedwait,
+ (sem_t *__restrict __sem,
+ const struct timespec *__restrict __abstime),
+ __sem_timedwait64)
+ __nonnull ((1, 2));
+# else
+# define sem_timedwait __sem_timedwait64
+# endif
+# endif
#endif
#ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int sem_clockwait (sem_t *__restrict __sem,
clockid_t clock,
const struct timespec *__restrict __abstime)
__nonnull ((1, 3));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sem_clockwait,
+ (sem_t *__restrict __sem,
+ clockid_t clock,
+ const struct timespec *__restrict __abstime),
+ __sem_clockwait64)
+ __nonnull ((1, 3));
+# else
+# define sem_clockwait __sem_clockwait64
+# endif
+# endif
#endif
/* Test whether SEM is posted. */
lib/libc/include/generic-glibc/signal.h
@@ -269,10 +269,23 @@ extern int sigwaitinfo (const sigset_t *__restrict __set,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int sigtimedwait (const sigset_t *__restrict __set,
siginfo_t *__restrict __info,
const struct timespec *__restrict __timeout)
__nonnull ((1));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sigtimedwait,
+ (const sigset_t *__restrict __set,
+ siginfo_t *__restrict __info,
+ const struct timespec *__restrict __timeout),
+ __sigtimedwait64)
+ __nonnull ((1));
+# else
+# define sigtimedwait __sigtimedwait64
+# endif
+# endif
/* Send signal SIG to the process PID. Associate data in VAL with the
signal. */
@@ -312,6 +325,7 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW
__attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead");
# include <bits/sigstack.h>
+# include <bits/sigstksz.h>
# include <bits/ss_flags.h>
/* Alternate signal handler stack interface.
lib/libc/include/generic-glibc/spawn.h
@@ -213,6 +213,14 @@ extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *,
int __fd)
__THROW __nonnull ((1));
+
+/* Add an action to close all file descriptor greater than or equal to FROM
+ during spawn. This affects the subsequent file actions. */
+extern int
+posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t *,
+ int __from)
+ __THROW __nonnull ((1));
+
#endif
__END_DECLS
lib/libc/include/generic-glibc/stdio.h
@@ -165,31 +165,43 @@ extern int renameat2 (int __oldfd, const char *__old, int __newfd,
const char *__new, unsigned int __flags) __THROW;
#endif
+/* Close STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fclose (FILE *__stream);
+
+#undef __attr_dealloc_fclose
+#define __attr_dealloc_fclose __attr_dealloc (fclose, 1)
+
/* Create a temporary file and open it read/write.
This function is a possible cancellation point and therefore not
marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern FILE *tmpfile (void) __wur;
+extern FILE *tmpfile (void)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#else
# ifdef __REDIRECT
-extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur;
+extern FILE *__REDIRECT (tmpfile, (void), tmpfile64)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
# else
# define tmpfile tmpfile64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern FILE *tmpfile64 (void) __wur;
+extern FILE *tmpfile64 (void)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
/* Generate a temporary filename. */
-extern char *tmpnam (char *__s) __THROW __wur;
+extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
#ifdef __USE_MISC
/* This is the reentrant variant of `tmpnam'. The only difference is
that it does not allow S to be NULL. */
-extern char *tmpnam_r (char *__s) __THROW __wur;
+extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
#endif
@@ -202,15 +214,9 @@ extern char *tmpnam_r (char *__s) __THROW __wur;
P_tmpdir is tried and finally "/tmp". The storage for the filename
is allocated by `malloc'. */
extern char *tempnam (const char *__dir, const char *__pfx)
- __THROW __attribute_malloc__ __wur;
+ __THROW __attribute_malloc__ __wur __attr_dealloc_free;
#endif
-
-/* Close STREAM.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int fclose (FILE *__stream);
/* Flush STREAM, or all streams if STREAM is NULL.
This function is a possible cancellation point and therefore not
@@ -244,7 +250,8 @@ extern int fcloseall (void);
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern FILE *fopen (const char *__restrict __filename,
- const char *__restrict __modes) __wur;
+ const char *__restrict __modes)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
/* Open a file, replacing an existing stream with it.
This function is a possible cancellation point and therefore not
@@ -256,7 +263,7 @@ extern FILE *freopen (const char *__restrict __filename,
# ifdef __REDIRECT
extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
const char *__restrict __modes), fopen64)
- __wur;
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream), freopen64)
@@ -268,7 +275,8 @@ extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
#endif
#ifdef __USE_LARGEFILE64
extern FILE *fopen64 (const char *__restrict __filename,
- const char *__restrict __modes) __wur;
+ const char *__restrict __modes)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
extern FILE *freopen64 (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream) __wur;
@@ -276,7 +284,8 @@ extern FILE *freopen64 (const char *__restrict __filename,
#ifdef __USE_POSIX
/* Create a new stream that refers to an existing system file descriptor. */
-extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
+extern FILE *fdopen (int __fd, const char *__modes) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
#ifdef __USE_GNU
@@ -284,21 +293,30 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
and uses the given functions for input and output. */
extern FILE *fopencookie (void *__restrict __magic_cookie,
const char *__restrict __modes,
- cookie_io_functions_t __io_funcs) __THROW __wur;
+ cookie_io_functions_t __io_funcs) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
/* Create a new stream that refers to a memory buffer. */
extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
- __THROW __wur;
+ __THROW __attribute_malloc__ __attr_dealloc_fclose __wur;
/* Open a stream that writes into a malloc'd buffer that is expanded as
necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
and the number of characters written on fflush or fclose. */
-extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
+extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
+
+#ifdef _WCHAR_H
+/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
+ a wide character string. Declared here only to add attribute malloc
+ and only if <wchar.h> has been previously #included. */
+extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose;
+# endif
#endif
-
/* If BUF is NULL, make STREAM unbuffered.
Else make it use buffer BUF, of size BUFSIZ. */
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
@@ -792,29 +810,33 @@ extern int fileno_unlocked (FILE *__stream) __THROW __wur;
#ifdef __USE_POSIX2
-/* Create a new stream connected to a pipe running the given command.
+/* Close a stream opened by popen and return the status of its child.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern FILE *popen (const char *__command, const char *__modes) __wur;
+extern int pclose (FILE *__stream);
-/* Close a stream opened by popen and return the status of its child.
+/* Create a new stream connected to a pipe running the given command.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern int pclose (FILE *__stream);
+extern FILE *popen (const char *__command, const char *__modes)
+ __attribute_malloc__ __attr_dealloc (pclose, 1) __wur;
+
#endif
#ifdef __USE_POSIX
/* Return the name of the controlling terminal. */
-extern char *ctermid (char *__s) __THROW;
+extern char *ctermid (char *__s) __THROW
+ __attr_access ((__write_only__, 1));
#endif /* Use POSIX. */
#if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU
/* Return the name of the current user. */
-extern char *cuserid (char *__s);
+extern char *cuserid (char *__s)
+ __attr_access ((__write_only__, 1));
#endif /* Use X/Open, but not issue 6. */
lib/libc/include/generic-glibc/stdlib.h
@@ -550,6 +550,9 @@ extern void *calloc (size_t __nmemb, size_t __size)
extern void *realloc (void *__ptr, size_t __size)
__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
+/* Free a block allocated by `malloc', `realloc' or `calloc'. */
+extern void free (void *__ptr) __THROW;
+
#ifdef __USE_MISC
/* Re-allocate the previously allocated block in PTR, making the new
block large enough for NMEMB elements of SIZE bytes each. */
@@ -558,11 +561,13 @@ extern void *realloc (void *__ptr, size_t __size)
between objects pointed by the old and new pointers. */
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
__THROW __attribute_warn_unused_result__
- __attribute_alloc_size__ ((2, 3));
-#endif
+ __attribute_alloc_size__ ((2, 3))
+ __attr_dealloc_free;
-/* Free a block allocated by `malloc', `realloc' or `calloc'. */
-extern void free (void *__ptr) __THROW;
+/* Add reallocarray as its own deallocator. */
+extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
+ __THROW __attr_dealloc (reallocarray, 1);
+#endif
#ifdef __USE_MISC
# include <alloca.h>
@@ -788,7 +793,8 @@ extern int system (const char *__command) __wur;
/* Return a malloc'd string containing the canonical absolute name of the
existing named file. */
extern char *canonicalize_file_name (const char *__name)
- __THROW __nonnull ((1)) __wur;
+ __THROW __nonnull ((1)) __attribute_malloc__
+ __attr_dealloc_free __wur;
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
lib/libc/include/generic-glibc/threads.h
@@ -88,8 +88,18 @@ extern thrd_t thrd_current (void);
__TIME_POINT. The current thread may resume if receives a signal. In
that case, if __REMAINING is not NULL, the remaining time is stored in
the object pointed by it. */
+#ifndef __USE_TIME_BITS64
extern int thrd_sleep (const struct timespec *__time_point,
struct timespec *__remaining);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (thrd_sleep, (const struct timespec *__time_point,
+ struct timespec *__remaining),
+ __thrd_sleep64);
+# else
+# define thrd_sleep __thrd_sleep64
+# endif
+#endif
/* Terminate current thread execution, cleaning up any thread local
storage and freeing resources. Returns the value specified in __RES. */
@@ -131,8 +141,19 @@ extern int mtx_lock (mtx_t *__mutex);
/* Block the current thread until the mutex pointed by __MUTEX is unlocked
or time pointed by __TIME_POINT is reached. In case the mutex is unlock,
the current thread will not be blocked. */
+#ifndef __USE_TIME_BITS64
extern int mtx_timedlock (mtx_t *__restrict __mutex,
const struct timespec *__restrict __time_point);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (mtx_timedlock, (mtx_t *__restrict __mutex,
+ const struct timespec *__restrict
+ __time_point),
+ __mtx_timedlock64);
+# else
+# define mtx_timedlock __mtx_timedlock64
+# endif
+#endif
/* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex
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);
/* Block current thread on the condition variable until condition variable
pointed by __COND is signaled or time pointed by __TIME_POINT is
reached. */
+#ifndef __USE_TIME_BITS64
extern int cnd_timedwait (cnd_t *__restrict __cond,
mtx_t *__restrict __mutex,
const struct timespec *__restrict __time_point);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (cnd_timedwait, (cnd_t *__restrict __cond,
+ mtx_t *__restrict __mutex,
+ const struct timespec *__restrict
+ __time_point),
+ __cnd_timedwait64);
+# else
+# define cnd_timedwait __cnd_timedwait64
+# endif
+#endif
/* Destroy condition variable pointed by __cond and free all of its
resources. */
lib/libc/include/generic-glibc/time.h
@@ -71,6 +71,7 @@ __BEGIN_DECLS
The result / CLOCKS_PER_SEC is program time in seconds. */
extern clock_t clock (void) __THROW;
+#ifndef __USE_TIME_BITS64
/* Return the current time and put it in *TIMER if TIMER is not NULL. */
extern time_t time (time_t *__timer) __THROW;
@@ -80,7 +81,18 @@ extern double difftime (time_t __time1, time_t __time0)
/* Return the `time_t' representation of TP and normalize TP. */
extern time_t mktime (struct tm *__tp) __THROW;
-
+#else
+# ifdef __REDIRECT_NTH
+extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64);
+extern double __REDIRECT_NTH (difftime, (time_t __time1, time_t __time0),
+ __difftime64) __attribute__ ((__const__));
+extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
+# else
+# define time __time64
+# define difftime __difftime64
+# define mktime __mktime64
+# endif
+#endif
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE characters and return the number
@@ -114,6 +126,7 @@ extern char *strptime_l (const char *__restrict __s,
#endif
+#ifndef __USE_TIME_BITS64
/* Return the `struct tm' representation of *TIMER
in Universal Coordinated Time (aka Greenwich Mean Time). */
extern struct tm *gmtime (const time_t *__timer) __THROW;
@@ -122,7 +135,20 @@ extern struct tm *gmtime (const time_t *__timer) __THROW;
of *TIMER in the local timezone. */
extern struct tm *localtime (const time_t *__timer) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern struct tm*__REDIRECT_NTH (gmtime, (const time_t *__timer), __gmtime64);
+extern struct tm *__REDIRECT_NTH (localtime, (const time_t *__timer),
+ __localtime64);
+# else
+# define gmtime __gmtime64
+# define localtime __localtime64
+# endif
+#endif
+
+
#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
+# ifndef __USE_TIME_BITS64
/* Return the `struct tm' representation of *TIMER in UTC,
using *TP to store the result. */
extern struct tm *gmtime_r (const time_t *__restrict __timer,
@@ -132,6 +158,20 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer,
using *TP to store the result. */
extern struct tm *localtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern struct tm*__REDIRECT_NTH (gmtime_r, (const time_t *__restrict __timer,
+ struct tm *__restrict __tp),
+ __gmtime64_r);
+
+extern struct tm*__REDIRECT_NTH (localtime_r, (const time_t *__restrict __t,
+ struct tm *__restrict __tp),
+ __localtime64_r);
+# else
+# define gmtime_r __gmtime64_r
+# define localtime_r __localtime_r
+# endif
+# endif
#endif /* POSIX || C2X */
/* 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,
extern char *asctime (const struct tm *__tp) __THROW;
/* Equivalent to `asctime (localtime (timer))'. */
+#ifndef __USE_TIME_BITS64
extern char *ctime (const time_t *__timer) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern char *__REDIRECT_NTH (ctime, (const time_t *__timer), __ctime64);
+# else
+# define ctime __ctime64
+# endif
+#endif
-#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
+#ifdef __USE_POSIX
/* Reentrant versions of the above functions. */
/* 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,
char *__restrict __buf) __THROW;
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
+#ifndef __USE_TIME_BITS64
extern char *ctime_r (const time_t *__restrict __timer,
char *__restrict __buf) __THROW;
-#endif /* POSIX || C2X */
+#else
+# ifdef __REDIRECT_NTH
+extern char *__REDIRECT_NTH (ctime_r, (const time_t *__restrict __timer,
+ char *__restrict __buf), __ctime64_r);
+# else
+# define ctime_r __ctime64_r
+# endif
+#endif
+
+#endif /* POSIX */
/* Defined in localtime.c. */
@@ -186,11 +244,19 @@ extern long int timezone;
/* Miscellaneous functions many Unices inherited from the public domain
localtime package. These are included only for compatibility. */
+#ifndef __USE_TIME_BITS64
/* Like `mktime', but for TP represents Universal Time, not local time. */
extern time_t timegm (struct tm *__tp) __THROW;
-
/* Another name for `mktime'. */
extern time_t timelocal (struct tm *__tp) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64);
+extern time_t __REDIRECT_NTH (timelocal, (struct tm *__tp), __mktime64);
+# else
+# define timegm __timegm64
+# endif
+#endif
/* Return the number of days in YEAR. */
extern int dysize (int __year) __THROW __attribute__ ((__const__));
@@ -198,6 +264,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
#ifdef __USE_POSIX199309
+# ifndef __USE_TIME_BITS64
/* Pause execution for a number of nanoseconds.
This function is a cancellation point and therefore not marked with
@@ -205,7 +272,6 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
extern int nanosleep (const struct timespec *__requested_time,
struct timespec *__remaining);
-
/* Get resolution of clock CLOCK_ID. */
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
@@ -215,15 +281,46 @@ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
/* Set clock CLOCK_ID to value TP. */
extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
__THROW;
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (nanosleep, (const struct timespec *__requested_time,
+ struct timespec *__remaining),
+ __nanosleep64);
+extern int __REDIRECT_NTH (clock_getres, (clockid_t __clock_id,
+ struct timespec *__res),
+ __clock_getres64);
+extern int __REDIRECT_NTH (clock_gettime, (clockid_t __clock_id, struct
+ timespec *__tp), __clock_gettime64);
+extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct
+ timespec *__tp), __clock_settime64);
+# else
+# define nanosleep __nanosleep64
+# define clock_getres __clock_getres64
+# define clock_gettime __clock_gettime64
+# define clock_settime __clock_settime64
+# endif
+# endif
+
# ifdef __USE_XOPEN2K
/* High-resolution sleep with the specified clock.
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
const struct timespec *__req,
struct timespec *__rem);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (clock_nanosleep, (clockid_t __clock_id, int __flags,
+ const struct timespec *__req,
+ struct timespec *__rem),
+ __clock_nanosleep_time64);
+# else
+# define clock_nanosleep __clock_nanosleep_time64
+# endif
+# endif
/* Return clock ID for CPU-time clock. */
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
@@ -239,6 +336,7 @@ extern int timer_create (clockid_t __clock_id,
extern int timer_delete (timer_t __timerid) __THROW;
/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
+# ifndef __USE_TIME_BITS64
extern int timer_settime (timer_t __timerid, int __flags,
const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) __THROW;
@@ -246,6 +344,21 @@ extern int timer_settime (timer_t __timerid, int __flags,
/* Get current value of timer TIMERID and store it in VALUE. */
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
__THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (timer_settime, (timer_t __timerid, int __flags,
+ const struct itimerspec *__restrict __value,
+ struct itimerspec *__restrict __ovalue),
+ __timer_settime64);
+
+extern int __REDIRECT_NTH (timer_gettime, (timer_t __timerid,
+ struct itimerspec *__value),
+ __timer_gettime64);
+# else
+# define timer_settime __timer_settime64
+# define timer_gettime __timer_gettime64
+# endif
+# endif
/* Get expiration overrun for timer TIMERID. */
extern int timer_getoverrun (timer_t __timerid) __THROW;
@@ -253,9 +366,35 @@ extern int timer_getoverrun (timer_t __timerid) __THROW;
#ifdef __USE_ISOC11
+# ifndef __USE_TIME_BITS64
/* Set TS to calendar time based in time base BASE. */
extern int timespec_get (struct timespec *__ts, int __base)
__THROW __nonnull ((1));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (timespec_get, (struct timespec *__ts, int __base),
+ __timespec_get64) __nonnull ((1));
+# else
+# define timespec_get __timespec_get64
+# endif
+# endif
+#endif
+
+
+#if __GLIBC_USE (ISOC2X)
+# ifndef __USE_TIME_BITS64
+/* Set TS to resolution of time base BASE. */
+extern int timespec_getres (struct timespec *__ts, int __base)
+ __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (timespec_getres, (struct timespec *__ts,
+ int __base),
+ __timespec_getres64);
+# else
+# define timespec_getres __timespec_getres64
+# endif
+# endif
#endif
lib/libc/include/generic-glibc/unistd.h
@@ -295,6 +295,11 @@ extern int euidaccess (const char *__name, int __type)
/* An alias for `euidaccess', used by some other systems. */
extern int eaccess (const char *__name, int __type)
__THROW __nonnull ((1));
+
+/* Execute program relative to a directory file descriptor. */
+extern int execveat (int __fd, const char *__path, char *const __argv[],
+ char *const __envp[], int __flags)
+ __THROW __nonnull ((2, 3));
#endif
#ifdef __USE_ATFILE
@@ -352,6 +357,12 @@ extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
__THROW. */
extern int close (int __fd);
+#ifdef __USE_MISC
+/* Close all open file descriptors greater than or equal to LOWFD.
+ Negative LOWFD is clamped to 0. */
+extern void closefrom (int __lowfd) __THROW;
+#endif
+
/* Read NBYTES into BUF from FD. Return the
number read, -1 for errors or 0 for EOF.
@@ -776,6 +787,13 @@ extern __pid_t fork (void) __THROWNL;
extern __pid_t vfork (void) __THROW;
#endif /* Use misc or XPG < 7. */
+#ifdef __USE_GNU
+/* This is similar to fork, however it does not run the atfork handlers
+ neither reinitialize any internal locks in multithread case.
+ Different than fork, _Fork is async-signal-safe. */
+extern __pid_t _Fork (void) __THROW;
+#endif
+
/* Return the pathname of the terminal FD is open on, or NULL on errors.
The returned storage is good only until the next call to this function. */
lib/libc/include/generic-glibc/utime.h
@@ -35,16 +35,32 @@ __BEGIN_DECLS
/* Structure describing file times. */
struct utimbuf
{
+#ifdef __USE_TIME_BITS64
+ __time64_t actime; /* Access time. */
+ __time64_t modtime; /* Modification time. */
+#else
__time_t actime; /* Access time. */
__time_t modtime; /* Modification time. */
+#endif
};
/* Set the access and modification times of FILE to those given in
*FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
+#ifndef __USE_TIME_BITS64
extern int utime (const char *__file,
const struct utimbuf *__file_times)
__THROW __nonnull ((1));
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (utime, (const char *__file,
+ const struct utimbuf *__file_times),
+ __utime64);
+# else
+# define utime __utime64
+# endif
+#endif
+
__END_DECLS
#endif /* utime.h */
\ No newline at end of file
lib/libc/include/generic-glibc/wchar.h
@@ -151,7 +151,8 @@ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
size_t __n, locale_t __loc) __THROW;
/* Duplicate S, returning an identical malloc'd string. */
-extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;
+extern wchar_t *wcsdup (const wchar_t *__s) __THROW
+ __attribute_malloc__ __attr_dealloc_free;
#endif
/* Find the first occurrence of WC in WCS. */
@@ -562,9 +563,23 @@ extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
/* Wide character I/O functions. */
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
+# ifndef __attr_dealloc_fclose
+# if defined __has_builtin
+# if __has_builtin (__builtin_fclose)
+/* If the attribute macro hasn't been defined yet (by <stdio.h>) and
+ fclose is a built-in, use it. */
+# define __attr_dealloc_fclose __attr_dealloc (__builtin_fclose, 1)
+# endif
+# endif
+# endif
+# ifndef __attr_dealloc_fclose
+# define __attr_dealloc_fclose /* empty */
+# endif
+
/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
a wide character string. */
-extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
+extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose;
#endif
#if defined __USE_ISOC95 || defined __USE_UNIX98
lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,6 +23,9 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
@@ -31,4 +34,5 @@ struct semid_ds
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/i386-linux-gnu/bits/struct_stat.h
@@ -25,43 +25,46 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
-#ifndef __x86_64__
+# endif
+# ifndef __x86_64__
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#else
+# else
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
-#endif
+# endif
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -71,58 +74,62 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-#else
-# ifndef __USE_FILE_OFFSET64
+# else
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
-#endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for x86-64. */
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifdef __x86_64__
+# ifdef __x86_64__
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-# else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-# endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-# ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -132,19 +139,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
@@ -25,32 +25,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -60,28 +63,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
@@ -96,7 +103,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -106,15 +113,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/m68k-linux-gnu/gnu/lib-names.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.2"
lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# if __TIMESIZE == 32
+# ifdef __MIPSEL__
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-# else
+# else
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-# endif
-#else
+# endif
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __sem_otime_high;
__syscall_ulong_t __sem_ctime_high;
+#endif
};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned short int __shm_atime_high;
unsigned short int __shm_dtime_high;
unsigned short int __shm_ctime_high;
unsigned short int __glibc_reserved4;
-#else
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
};
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# if __TIMESIZE == 32
+# ifdef __MIPSEL__
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-# else
+# else
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-# endif
-#else
+# endif
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __sem_otime_high;
__syscall_ulong_t __sem_ctime_high;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned short int __shm_atime_high;
unsigned short int __shm_dtime_high;
unsigned short int __shm_ctime_high;
unsigned short int __glibc_reserved4;
-#else
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# if __TIMESIZE == 32
+# ifdef __MIPSEL__
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-# else
+# else
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-# endif
-#else
+# endif
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __sem_otime_high;
__syscall_ulong_t __sem_ctime_high;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned short int __shm_atime_high;
unsigned short int __shm_dtime_high;
unsigned short int __shm_ctime_high;
unsigned short int __glibc_reserved4;
-#else
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
};
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# if __TIMESIZE == 32
+# ifdef __MIPSEL__
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-# else
+# else
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-# endif
-#else
+# endif
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __sem_otime_high;
__syscall_ulong_t __sem_ctime_high;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned short int __shm_atime_high;
unsigned short int __shm_dtime_high;
unsigned short int __shm_ctime_high;
unsigned short int __glibc_reserved4;
-#else
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# if __TIMESIZE == 32
+# ifdef __MIPSEL__
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-# else
+# else
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-# endif
-#else
+# endif
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __sem_otime_high;
__syscall_ulong_t __sem_ctime_high;
+#endif
};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned short int __shm_atime_high;
unsigned short int __shm_dtime_high;
unsigned short int __shm_ctime_high;
unsigned short int __glibc_reserved4;
-#else
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
};
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# if __TIMESIZE == 32
+# ifdef __MIPSEL__
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_stime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_ctime_high;
-# else
+# else
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-# endif
-#else
+# endif
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __sem_otime_high;
__syscall_ulong_t __sem_ctime_high;
+#endif
};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned short int __shm_atime_high;
unsigned short int __shm_dtime_high;
unsigned short int __shm_ctime_high;
unsigned short int __glibc_reserved4;
-#else
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
};
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-#else
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__syscall_ulong_t __sem_otime_high;
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_ctime_high;
__time_t sem_ctime; /* last time changed by semctl() */
-#else
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,8 +23,11 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
@@ -32,15 +35,16 @@ struct shmid_ds
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __glibc_reserved4;
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
size_t shm_segsz; /* size of segment in bytes */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/local_lim.h
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 16
-#define SO_RCVTIMEO 18
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 17
-#define SO_SNDTIMEO 19
-#define SO_TYPE 3
\ No newline at end of file
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h
@@ -26,35 +26,37 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -64,25 +66,28 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
-
# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
@@ -94,7 +99,7 @@ struct stat64
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,19 +109,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
# endif /* __USE_LARGEFILE64 */
lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc-linux-gnu/sys/ptrace.h
@@ -70,6 +70,8 @@ __BEGIN_DECLS
# undef PTRACE_SYSCALL_INFO_ENTRY
# undef PTRACE_SYSCALL_INFO_EXIT
# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_TRACEME
#endif
@@ -188,6 +190,14 @@ enum __ptrace_request
PTRACE_SETVSRREGS = 28,
#define PT_SETVSRREGS PTRACE_SETVSRREGS
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Execute process until next taken branch. */
PTRACE_SINGLEBLOCK = 256,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-#else
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__syscall_ulong_t __sem_otime_high;
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_ctime_high;
__time_t sem_ctime; /* last time changed by semctl() */
-#else
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,8 +23,11 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
@@ -32,15 +35,16 @@ struct shmid_ds
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __glibc_reserved4;
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
size_t shm_segsz; /* size of segment in bytes */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 16
-#define SO_RCVTIMEO 18
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 17
-#define SO_SNDTIMEO 19
-#define SO_TYPE 3
\ No newline at end of file
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h
@@ -26,35 +26,37 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -64,25 +66,28 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
-
# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
@@ -94,7 +99,7 @@ struct stat64
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,19 +109,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
# endif /* __USE_LARGEFILE64 */
lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h
@@ -70,6 +70,8 @@ __BEGIN_DECLS
# undef PTRACE_SYSCALL_INFO_ENTRY
# undef PTRACE_SYSCALL_INFO_EXIT
# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_TRACEME
#endif
@@ -188,6 +190,14 @@ enum __ptrace_request
PTRACE_SETVSRREGS = 28,
#define PT_SETVSRREGS PTRACE_SETVSRREGS
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Execute process until next taken branch. */
PTRACE_SINGLEBLOCK = 256,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-#else
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__syscall_ulong_t __sem_otime_high;
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_ctime_high;
__time_t sem_ctime; /* last time changed by semctl() */
-#else
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,8 +23,11 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
@@ -32,15 +35,16 @@ struct shmid_ds
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __glibc_reserved4;
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
size_t shm_segsz; /* size of segment in bytes */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+#endif
};
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 16
-#define SO_RCVTIMEO 18
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 17
-#define SO_SNDTIMEO 19
-#define SO_TYPE 3
\ No newline at end of file
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h
@@ -26,35 +26,37 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -64,25 +66,28 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
-
# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
@@ -94,7 +99,7 @@ struct stat64
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,19 +109,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
# endif /* __USE_LARGEFILE64 */
lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h
@@ -70,6 +70,8 @@ __BEGIN_DECLS
# undef PTRACE_SYSCALL_INFO_ENTRY
# undef PTRACE_SYSCALL_INFO_EXIT
# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_TRACEME
#endif
@@ -188,6 +190,14 @@ enum __ptrace_request
PTRACE_SETVSRREGS = 28,
#define PT_SETVSRREGS PTRACE_SETVSRREGS
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Execute process until next taken branch. */
PTRACE_SINGLEBLOCK = 256,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
lib/libc/include/riscv64-linux-gnu/bits/statfs.h
@@ -1,86 +0,0 @@
-/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/endian.h>
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
-#if defined __USE_FILE_OFFSET64
-# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define __field64(type, type64, name) \
- type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
-#else
-# define __field64(type, type64, name) \
- int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
-#endif
-
-struct statfs
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-
-#undef __field64
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATFS_F_NAMELEN
-#define _STATFS_F_FRSIZE
-#define _STATFS_F_FLAGS
\ No newline at end of file
lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/s390x-linux-gnu/bits/hwcap.h
@@ -45,4 +45,6 @@
#define HWCAP_S390_VXRS_EXT2 32768
#define HWCAP_S390_VXRS_PDE 65536
#define HWCAP_S390_SORT 131072
-#define HWCAP_S390_DFLT 262144
\ No newline at end of file
+#define HWCAP_S390_DFLT 262144
+#define HWCAP_S390_VXRS_PDE2 524288
+#define HWCAP_S390_NNPA 1048576
\ No newline at end of file
lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
@@ -65,32 +65,35 @@ struct stat
#else
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -100,25 +103,26 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
};
-#endif
+# endif
#ifdef __USE_LARGEFILE64
# if __WORDSIZE == 64
@@ -162,6 +166,9 @@ struct stat64
# else
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -176,7 +183,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -186,18 +193,19 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif
};
# endif
#endif
lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/s390x-linux-gnu/sys/ptrace.h
@@ -39,6 +39,8 @@ __BEGIN_DECLS
# undef PTRACE_ATTACH
# undef PTRACE_DETACH
# undef PTRACE_SYSCALL
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_SETOPTIONS
# undef PTRACE_GETEVENTMSG
# undef PTRACE_GETSIGINFO
@@ -146,6 +148,14 @@ enum __ptrace_request
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 31,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 32,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-#else
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__syscall_ulong_t __sem_otime_high;
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_ctime_high;
__time_t sem_ctime; /* last time changed by semctl() */
-#else
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,23 +23,27 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
__time_t shm_dtime; /* time of last shmdt() */
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
size_t shm_segsz; /* size of segment in bytes */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+#endif
};
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 24576
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 24576
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 2048
-#define SO_RCVTIMEO 8192
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4096
-#define SO_SNDTIMEO 16384
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 8192
+# define SO_SNDTIMEO 16384
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 33
+# define SO_TIMESTAMPING 35
+#else
+# define SO_RCVTIMEO_OLD 8192
+# define SO_SNDTIMEO_OLD 16384
+# define SO_RCVTIMEO_NEW 68
+# define SO_SNDTIMEO_NEW 69
+
+# define SO_TIMESTAMP_OLD 0x001d
+# define SO_TIMESTAMPNS_OLD 0x0021
+# define SO_TIMESTAMPING_OLD 0x0023
+# define SO_TIMESTAMP_NEW 0x0046
+# define SO_TIMESTAMPNS_NEW 0x0042
+# define SO_TIMESTAMPING_NEW 0x0043
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __msg_stime_high;
__time_t msg_stime; /* time of last msgsnd command */
unsigned long int __msg_rtime_high;
__time_t msg_rtime; /* time of last msgsnd command */
unsigned long int __msg_ctime_high;
__time_t msg_ctime; /* time of last change */
-#else
+# else
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgsnd command */
__time_t msg_ctime; /* time of last change */
-#endif
+# endif
__syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
__syscall_ulong_t __sem_otime_high;
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_ctime_high;
__time_t sem_ctime; /* last time changed by semctl() */
-#else
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h
@@ -23,23 +23,27 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
__time_t shm_dtime; /* time of last shmdt() */
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
-#else
+# else
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
-#endif
+# endif
size_t shm_segsz; /* size of segment in bytes */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+#endif
};
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 24576
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 24576
\ No newline at end of file
lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 2048
-#define SO_RCVTIMEO 8192
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4096
-#define SO_SNDTIMEO 16384
-#define SO_TYPE 4104
\ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 8192
+# define SO_SNDTIMEO 16384
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 33
+# define SO_TIMESTAMPING 35
+#else
+# define SO_RCVTIMEO_OLD 8192
+# define SO_SNDTIMEO_OLD 16384
+# define SO_RCVTIMEO_NEW 68
+# define SO_SNDTIMEO_NEW 69
+
+# define SO_TIMESTAMP_OLD 0x001d
+# define SO_TIMESTAMPNS_OLD 0x0021
+# define SO_TIMESTAMPING_OLD 0x0023
+# define SO_TIMESTAMP_NEW 0x0046
+# define SO_TIMESTAMPNS_NEW 0x0042
+# define SO_TIMESTAMPING_NEW 0x0043
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h
@@ -23,6 +23,9 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
@@ -31,4 +34,5 @@ struct semid_ds
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h
@@ -25,43 +25,46 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
-#ifndef __x86_64__
+# endif
+# ifndef __x86_64__
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#else
+# else
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
-#endif
+# endif
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -71,58 +74,62 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-#else
-# ifndef __USE_FILE_OFFSET64
+# else
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
-#endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for x86-64. */
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifdef __x86_64__
+# ifdef __x86_64__
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-# else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-# endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-# ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -132,19 +139,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h
@@ -23,6 +23,9 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
@@ -31,4 +34,5 @@ struct semid_ds
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
};
\ No newline at end of file
lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h
@@ -25,43 +25,46 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
-#ifndef __x86_64__
+# endif
+# ifndef __x86_64__
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#else
+# else
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
-#endif
+# endif
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -71,58 +74,62 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-#else
-# ifndef __USE_FILE_OFFSET64
+# else
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
-#endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for x86-64. */
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifdef __x86_64__
+# ifdef __x86_64__
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-# else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-# endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-# ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -132,19 +139,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
+# endif /* __USE_TIME_BITS64 */
};
#endif
lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"