diff --git a/README.md b/README.md index 38b832c9..92089de5 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This gives us the following advantages: This repository contains some blobs like `libc.so`. The source: -- for `x86_64` they are from Ubuntu 20.04 image; +- for `x86_64` they are from Ubuntu 24.04 image; - for `aarch64` they are from [developer.arm.com](https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz?revision=2e88a73f-d233-4f96-b1f4-d8b36e9bb0b9&la=en) - for `s390x` it is extracted from Docker image: diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib/ld-linux-x86-64.so.2 b/linux-x86_64/x86_64-linux-gnu/libc/lib/ld-linux-x86-64.so.2 deleted file mode 100755 index 8b001f0b..00000000 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib/ld-linux-x86-64.so.2 and /dev/null differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib/x86_64-linux-gnu/libc.so.6 b/linux-x86_64/x86_64-linux-gnu/libc/lib/x86_64-linux-gnu/libc.so.6 new file mode 100755 index 00000000..72958060 Binary files /dev/null and b/linux-x86_64/x86_64-linux-gnu/libc/lib/x86_64-linux-gnu/libc.so.6 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/Scrt1.o b/linux-x86_64/x86_64-linux-gnu/libc/lib64/Scrt1.o old mode 100755 new mode 100644 index d820fade..b00b54e9 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/Scrt1.o and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/Scrt1.o differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/ld-linux-x86-64.so.2 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/ld-linux-x86-64.so.2 new file mode 100755 index 00000000..09d67ac6 Binary files /dev/null and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/ld-linux-x86-64.so.2 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libc.so.6 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libc.so.6 deleted file mode 100755 index 09f6c6c4..00000000 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libc.so.6 and /dev/null differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libdl.so.2 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libdl.so.2 old mode 100755 new mode 100644 index 402c68a7..981c3c93 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libdl.so.2 and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libdl.so.2 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libm.so.6 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libm.so.6 old mode 100755 new mode 100644 index 6a805e22..af23025b Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libm.so.6 and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libm.so.6 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libpthread.so.0 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libpthread.so.0 old mode 100755 new mode 100644 index 2801ffb1..9c4bb52c Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libpthread.so.0 and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libpthread.so.0 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libresolv.so.2 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libresolv.so.2 old mode 100755 new mode 100644 index 8a9f4365..f85f5717 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/libresolv.so.2 and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/libresolv.so.2 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/lib64/librt.so.1 b/linux-x86_64/x86_64-linux-gnu/libc/lib64/librt.so.1 old mode 100755 new mode 100644 index edfb3ad2..76733fbd Binary files a/linux-x86_64/x86_64-linux-gnu/libc/lib64/librt.so.1 and b/linux-x86_64/x86_64-linux-gnu/libc/lib64/librt.so.1 differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/alloca.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/alloca.h index c195adc9..bead9539 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/alloca.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/alloca.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ALLOCA_H #define _ALLOCA_H 1 @@ -25,7 +25,7 @@ __BEGIN_DECLS -/* Remove any previous definitions. */ +/* Remove any previous definition. */ #undef alloca /* Allocate a block that will be freed when the calling function exits. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/argz.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/argz.h index 9c496f5e..49e85a09 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/argz.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/argz.h @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ARGZ_H #define _ARGZ_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/inet.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/inet.h index 731f1c5d..c005340a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/inet.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/inet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ARPA_INET_H #define _ARPA_INET_H 1 @@ -74,10 +74,11 @@ 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 + CP to presentation format. The result will specify BITS bits of the number. */ extern char *inet_net_ntop (int __af, const void *__cp, int __bits, char *__buf, size_t __len) __THROW; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser.h index a99d5ec5..017d7b19 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser.h @@ -52,6 +52,12 @@ #include #include +#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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser_compat.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser_compat.h index f1c390f3..f9296612 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser_compat.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/arpa/nameser_compat.h @@ -44,7 +44,7 @@ typedef struct { /* fields in third byte */ unsigned qr: 1; /*%< response flag */ unsigned opcode: 4; /*%< purpose of message */ - unsigned aa: 1; /*%< authoritive answer */ + unsigned aa: 1; /*%< authoritative answer */ unsigned tc: 1; /*%< truncated message */ unsigned rd: 1; /*%< recursion desired */ /* fields in fourth byte */ @@ -58,7 +58,7 @@ typedef struct { /* fields in third byte */ unsigned rd :1; /*%< recursion desired */ unsigned tc :1; /*%< truncated message */ - unsigned aa :1; /*%< authoritive answer */ + unsigned aa :1; /*%< authoritative answer */ unsigned opcode :4; /*%< purpose of message */ unsigned qr :1; /*%< response flag */ /* fields in fourth byte */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/bitsperlong.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/bitsperlong.h index 0aac245b..75f320fa 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/bitsperlong.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/bitsperlong.h @@ -2,6 +2,17 @@ #ifndef __ASM_GENERIC_BITS_PER_LONG #define __ASM_GENERIC_BITS_PER_LONG +#ifndef __BITS_PER_LONG +/* + * In order to keep safe and avoid regression, only unify uapi + * bitsperlong.h for some archs which are using newer toolchains + * that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__. + * See the following link for more info: + * https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/ + */ +#if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__) +#define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) +#else /* * There seems to be no way of detecting this automatically from user * space, so 64 bit architectures should override this in their @@ -9,8 +20,8 @@ * both 32 and 64 bit user space must not rely on CONFIG_64BIT * to decide it, but rather check a compiler provided macro. */ -#ifndef __BITS_PER_LONG #define __BITS_PER_LONG 32 #endif +#endif #endif /* __ASM_GENERIC_BITS_PER_LONG */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/hugetlb_encode.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/hugetlb_encode.h index e4732d3c..de687009 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/hugetlb_encode.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/hugetlb_encode.h @@ -20,15 +20,18 @@ #define HUGETLB_FLAG_ENCODE_SHIFT 26 #define HUGETLB_FLAG_ENCODE_MASK 0x3f -#define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) -#define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_16KB (14U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_64KB (16U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_512KB (19U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_1MB (20U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_2MB (21U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_8MB (23U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_16MB (24U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_32MB (25U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_256MB (28U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_512MB (29U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_1GB (30U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_2GB (31U << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_16GB (34U << HUGETLB_FLAG_ENCODE_SHIFT) #endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/ioctls.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/ioctls.h index 03368257..ab5479ad 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/ioctls.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/ioctls.h @@ -79,6 +79,8 @@ #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ +#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) +#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) #define FIONCLEX 0x5450 #define FIOCLEX 0x5451 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman-common.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman-common.h index ade7fc3f..6ce1f1ce 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman-common.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman-common.h @@ -11,21 +11,27 @@ #define PROT_WRITE 0x2 /* page can be written */ #define PROT_EXEC 0x4 /* page can be executed */ #define PROT_SEM 0x8 /* page may be used for atomic ops */ +/* 0x10 reserved for arch-specific use */ +/* 0x20 reserved for arch-specific use */ #define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ -#define MAP_SHARED 0x01 /* Share changes */ -#define MAP_PRIVATE 0x02 /* Changes are private */ -#define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ +/* 0x01 - 0x03 are defined in linux/mman.h */ #define MAP_TYPE 0x0f /* Mask for type of mapping */ #define MAP_FIXED 0x10 /* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20 /* don't use a file */ -#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED -# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ -#else -# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ -#endif + +/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ +#define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x010000 /* do not block on IO */ +#define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ +#define MAP_HUGETLB 0x040000 /* create a huge page mapping */ +#define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ + +#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be + * uninitialized */ /* * Flags for mlock @@ -69,6 +75,10 @@ #define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */ #define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */ +#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */ + +#define MADV_COLLAPSE 25 /* Synchronous hugepage collapse */ + /* compatibility flags */ #define MAP_FILE 0 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman.h index 653687d9..57e8195d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/mman.h @@ -9,13 +9,11 @@ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ #define MAP_LOCKED 0x2000 /* pages are locked */ #define MAP_NORESERVE 0x4000 /* don't check for reservations */ -#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x10000 /* do not block on IO */ -#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ -#define MAP_HUGETLB 0x40000 /* create a huge page mapping */ -#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */ -/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ +/* + * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h + * for MAP_HUGETLB usage + */ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/posix_types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/posix_types.h index 5e6ea22b..2f9c8059 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/posix_types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/posix_types.h @@ -86,7 +86,9 @@ typedef struct { */ typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; +typedef __kernel_long_t __kernel_old_time_t; typedef __kernel_long_t __kernel_time_t; +typedef long long __kernel_time64_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/socket.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/socket.h index 0ae758c9..70bd5506 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/socket.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/socket.h @@ -2,6 +2,7 @@ #ifndef __ASM_GENERIC_SOCKET_H #define __ASM_GENERIC_SOCKET_H +#include #include /* For setsockopt(2) */ @@ -29,8 +30,8 @@ #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 #define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 +#define SO_RCVTIMEO_OLD 20 +#define SO_SNDTIMEO_OLD 21 #endif /* Security levels - as per NRL IPv6 - don't actually do anything */ @@ -46,21 +47,14 @@ #define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 #define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS #define SO_MARK 36 -#define SO_TIMESTAMPING 37 -#define SCM_TIMESTAMPING SO_TIMESTAMPING - #define SO_PROTOCOL 38 #define SO_DOMAIN 39 @@ -107,4 +101,61 @@ #define SO_ZEROCOPY 60 +#define SO_TXTIME 61 +#define SCM_TXTIME SO_TXTIME + +#define SO_BINDTOIFINDEX 62 + +#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 + +#define SO_RCVTIMEO_NEW 66 +#define SO_SNDTIMEO_NEW 67 + +#define SO_DETACH_REUSEPORT_BPF 68 + +#define SO_PREFER_BUSY_POLL 69 +#define SO_BUSY_POLL_BUDGET 70 + +#define SO_NETNS_COOKIE 71 + +#define SO_BUF_LOCK 72 + +#define SO_RESERVE_MEM 73 + +#define SO_TXREHASH 74 + +#define SO_RCVMARK 75 + +#define SO_PASSPIDFD 76 +#define SO_PEERPIDFD 77 + + +#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) +/* on 64-bit and x32, avoid the ?: operator */ +#define SO_TIMESTAMP SO_TIMESTAMP_OLD +#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD +#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD + +#define SO_RCVTIMEO SO_RCVTIMEO_OLD +#define SO_SNDTIMEO SO_SNDTIMEO_OLD +#else +#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) +#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) +#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) + +#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) +#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) +#endif + +#define SCM_TIMESTAMP SO_TIMESTAMP +#define SCM_TIMESTAMPNS SO_TIMESTAMPNS +#define SCM_TIMESTAMPING SO_TIMESTAMPING + + #endif /* __ASM_GENERIC_SOCKET_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/sockios.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/sockios.h index 64f658c7..44fa3ed7 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/sockios.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/asm-generic/sockios.h @@ -8,7 +8,7 @@ #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ +#define SIOCGSTAMP_OLD 0x8906 /* Get stamp (timeval) */ +#define SIOCGSTAMPNS_OLD 0x8907 /* Get stamp (timespec) */ #endif /* __ASM_GENERIC_SOCKIOS_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/assert.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/assert.h index 3f54da62..8c1cb5fd 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/assert.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/assert.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.2 Diagnostics @@ -89,10 +89,21 @@ __END_DECLS parentheses around EXPR. Otherwise, those added parentheses would suppress warnings we'd expect to be detected by gcc's -Wparentheses. */ # if defined __cplusplus +# if defined __has_builtin +# if __has_builtin (__builtin_FILE) +# define __ASSERT_FILE __builtin_FILE () +# define __ASSERT_LINE __builtin_LINE () +# endif +# endif +# if !defined __ASSERT_FILE +# define __ASSERT_FILE __FILE__ +# define __ASSERT_LINE __LINE__ +# endif # define assert(expr) \ (static_cast (expr) \ ? void (0) \ - : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) + : __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \ + __ASSERT_FUNCTION)) # elif !defined __GNUC__ || defined __STRICT_ANSI__ # define assert(expr) \ ((expr) \ @@ -138,7 +149,11 @@ __END_DECLS #endif /* NDEBUG. */ -#if defined __USE_ISOC11 && !defined __cplusplus +#if (defined __USE_ISOC11 \ + && (!defined __STDC_VERSION__ \ + || __STDC_VERSION__ <= 201710L \ + || !__GNUC_PREREQ (13, 0)) \ + && !defined __cplusplus) # undef static_assert # define static_assert _Static_assert #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/byteswap.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/byteswap.h index a45b3e20..66efb8fc 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/byteswap.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/byteswap.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Swap byte order for 16, 32 and 64 bit values + Copyright (C) 1997-2024 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 @@ -13,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BYTESWAP_H #define _BYTESWAP_H 1 @@ -24,10 +25,10 @@ #include -/* The following definitions must all be macros since otherwise some +/* The following definitions must all be macros, otherwise some of the possible optimizations are not possible. */ -/* Return a value with all bytes in the 16 bit argument swapped. */ +/* Return a value with both bytes in the 16 bit argument swapped. */ #define bswap_16(x) __bswap_16 (x) /* Return a value with all bytes in the 32 bit argument swapped. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ctype.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ctype.h index 0e0936ac..33610ad8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ctype.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ctype.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard 7.4: Character handling @@ -36,7 +36,7 @@ __BEGIN_DECLS endian). We define the bit value interpretations here dependent on the machine's byte order. */ -# include +# include # if __BYTE_ORDER == __BIG_ENDIAN # define _ISbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dirent.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dirent.h index 03018b23..b33d6296 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dirent.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dirent.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 5.1.2 Directory Operations @@ -86,8 +86,8 @@ typedef __ino64_t ino64_t; # ifdef _DIRENT_HAVE_D_RECLEN # define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0]) # else -# define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \ - _D_EXACT_NAMLEN (d) + 1) +# define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name \ + : _D_EXACT_NAMLEN (d) + 1) # endif #endif @@ -126,28 +126,30 @@ enum The actual structure is opaque to users. */ typedef struct __dirstream DIR; +/* Close the directory stream DIRP. + Return 0 if successful, -1 if not. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int closedir (DIR *__dirp) __nonnull ((1)); + /* Open a directory stream on NAME. Return a DIR stream on the directory, or NULL if it could not be opened. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern DIR *opendir (const char *__name) __nonnull ((1)); +extern DIR *opendir (const char *__name) __nonnull ((1)) + __attribute_malloc__ __attr_dealloc (closedir, 1); #ifdef __USE_XOPEN2K8 /* Same as opendir, but open the stream on the file descriptor FD. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern DIR *fdopendir (int __fd); +extern DIR *fdopendir (int __fd) + __attribute_malloc__ __attr_dealloc (closedir, 1); #endif -/* Close the directory stream DIRP. - Return 0 if successful, -1 if not. - - This function is a possible cancellation point and therefore not - marked with __THROW. */ -extern int closedir (DIR *__dirp) __nonnull ((1)); - /* Read a directory entry from DIRP. Return a pointer to a `struct dirent' describing the entry, or NULL for EOF or error. The storage returned may be overwritten by a later readdir call on the @@ -401,4 +403,6 @@ extern int versionsort64 (const struct dirent64 **__e1, __END_DECLS +#include + #endif /* dirent.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dlfcn.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dlfcn.h index 0921fd72..57479626 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dlfcn.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/dlfcn.h @@ -1,5 +1,5 @@ /* User functions for run-time dynamic loading. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _DLFCN_H #define _DLFCN_H 1 @@ -28,19 +28,9 @@ #ifdef __USE_GNU -/* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT - the run-time address of the symbol called NAME in the next shared - object is returned. The "next" relation is defined by the order - the shared objects were loaded. */ -# define RTLD_NEXT ((void *) -1l) - -/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT - the run-time address of the symbol called NAME in the global scope - is returned. */ -# define RTLD_DEFAULT ((void *) 0) - +#include -/* Type for namespace indeces. */ +/* Type for namespace indices. */ typedef long int Lmid_t; /* Special namespace ID values. */ @@ -48,6 +38,16 @@ typedef long int Lmid_t; # define LM_ID_NEWLM -1 /* For dlmopen: request new namespace. */ #endif +/* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT + the run-time address of the symbol called NAME in the next shared + object is returned. The "next" relation is defined by the order + the shared objects were loaded. */ +#define RTLD_NEXT ((void *) -1l) + +/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT + the run-time address of the symbol called NAME in the global scope + is returned. */ +#define RTLD_DEFAULT ((void *) 0) __BEGIN_DECLS @@ -162,7 +162,12 @@ enum segment, or if the calling thread has not allocated a block for it. */ RTLD_DI_TLS_DATA = 10, - RTLD_DI_MAX = 10 + /* Treat ARG as const ElfW(Phdr) **, and store the address of the + program header array at that location. The dlinfo call returns + the number of program headers in the array. */ + RTLD_DI_PHDR = 11, + + RTLD_DI_MAX = 11 }; @@ -180,8 +185,45 @@ typedef struct { size_t dls_size; /* Size in bytes of the whole buffer. */ unsigned int dls_cnt; /* Number of elements in `dls_serpath'. */ +# if __GNUC_PREREQ (3, 0) + /* The zero-length array avoids an unwanted array subscript check by + the compiler, while the surrounding anonymous union preserves the + historic size of the type. At the time of writing, GNU C does + not support structs with flexible array members in unions. */ + __extension__ union + { + Dl_serpath dls_serpath[0]; /* Actually longer, dls_cnt elements. */ + Dl_serpath __dls_serpath_pad[1]; + }; +# else Dl_serpath dls_serpath[1]; /* Actually longer, dls_cnt elements. */ +# endif } Dl_serinfo; + +struct dl_find_object +{ + __extension__ unsigned long long int dlfo_flags; + void *dlfo_map_start; /* Beginning of mapping containing address. */ + void *dlfo_map_end; /* End of mapping. */ + struct link_map *dlfo_link_map; + void *dlfo_eh_frame; /* Exception handling data of the object. */ +# if DLFO_STRUCT_HAS_EH_DBASE + void *dlfo_eh_dbase; /* Base address for DW_EH_PE_datarel. */ +# if __WORDSIZE == 32 + unsigned int __dlfo_eh_dbase_pad; +# endif +# endif +# if DLFO_STRUCT_HAS_EH_COUNT + int dlfo_eh_count; /* Number of exception handling entries. */ + unsigned int __dlfo_eh_count_pad; +# endif + __extension__ unsigned long long int __dflo_reserved[7]; +}; + +/* If ADDRESS is found in an object, fill in *RESULT and return 0. + Otherwise, return -1. */ +int _dl_find_object (void *__address, struct dl_find_object *__result) __THROW; + #endif /* __USE_GNU */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/elf.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/elf.h index 160cf154..1c394c64 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/elf.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/elf.h @@ -1,5 +1,5 @@ /* This file defines standard ELF types, structures, and macros. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,15 +14,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ELF_H #define _ELF_H 1 -#include - -__BEGIN_DECLS - /* Standard ELF types. */ #include @@ -214,7 +210,7 @@ typedef struct #define EM_68HC12 53 /* Motorola M68HC12 */ #define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator */ #define EM_PCP 55 /* Siemens PCP */ -#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ +#define EM_NCPU 56 /* Sony nCPU embedded RISC */ #define EM_NDR1 57 /* Denso NDR1 microprocessor */ #define EM_STARCORE 58 /* Motorola Start*Core processor */ #define EM_ME16 59 /* Toyota ME16 processor */ @@ -322,7 +318,7 @@ typedef struct /* reserved 184 */ #define EM_AVR32 185 /* Amtel 32-bit microprocessor */ #define EM_STM8 186 /* STMicroelectronics STM8 */ -#define EM_TILE64 187 /* Tileta TILE64 */ +#define EM_TILE64 187 /* Tilera TILE64 */ #define EM_TILEPRO 188 /* Tilera TILEPro */ #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ #define EM_CUDA 190 /* NVIDIA CUDA */ @@ -330,7 +326,7 @@ typedef struct #define EM_CLOUDSHIELD 192 /* CloudShield */ #define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */ #define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */ -#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */ +#define EM_ARCV2 195 /* Synopsys ARCv2 ISA. */ #define EM_OPEN8 196 /* Open8 RISC */ #define EM_RL78 197 /* Renesas RL78 */ #define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */ @@ -340,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 */ @@ -360,8 +357,10 @@ typedef struct #define EM_RISCV 243 /* RISC-V */ #define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */ +#define EM_CSKY 252 /* C-SKY */ +#define EM_LOONGARCH 258 /* LoongArch */ -#define EM_NUM 248 +#define EM_NUM 259 /* Old spellings/synonyms. */ @@ -444,8 +443,9 @@ typedef struct #define SHT_FINI_ARRAY 15 /* Array of destructors */ #define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ #define SHT_GROUP 17 /* Section group */ -#define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ -#define SHT_NUM 19 /* Number of defined types. */ +#define SHT_SYMTAB_SHNDX 18 /* Extended section indices */ +#define SHT_RELR 19 /* RELR relative relocations */ +#define SHT_NUM 20 /* Number of defined types. */ #define SHT_LOOS 0x60000000 /* Start OS-specific. */ #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */ #define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */ @@ -481,6 +481,7 @@ typedef struct #define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ #define SHF_MASKOS 0x0ff00000 /* OS-specific. */ #define SHF_MASKPROC 0xf0000000 /* Processor-specific */ +#define SHF_GNU_RETAIN (1 << 21) /* Not to be GCed by linker. */ #define SHF_ORDERED (1 << 30) /* Special ordering requirement (Solaris). */ #define SHF_EXCLUDE (1U << 31) /* Section is excluded unless @@ -505,6 +506,7 @@ typedef struct /* Legal values for ch_type (compression algorithm). */ #define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */ +#define ELFCOMPRESS_ZSTD 2 /* Zstandard algorithm. */ #define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */ #define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */ #define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */ @@ -557,7 +559,7 @@ typedef struct /* Possible bitmasks for si_flags. */ #define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ -#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ +#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-through symbol for translator */ #define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ #define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */ @@ -663,6 +665,11 @@ typedef struct Elf64_Sxword r_addend; /* Addend */ } Elf64_Rela; +/* RELR relocation table entry */ + +typedef Elf32_Word Elf32_Relr; +typedef Elf64_Xword Elf64_Relr; + /* How to extract and insert information held in the r_info field. */ #define ELF32_R_SYM(val) ((val) >> 8) @@ -720,6 +727,8 @@ typedef struct #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ +#define PT_GNU_PROPERTY 0x6474e553 /* GNU property */ +#define PT_GNU_SFRAME 0x6474e554 /* SFrame segment. */ #define PT_LOSUNW 0x6ffffffa #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ @@ -739,6 +748,8 @@ typedef struct /* Legal values for note segment descriptor types for core files. */ #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ +#define NT_PRFPREG 2 /* Contains copy of fpregset + struct. */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ #define NT_PRXREG 4 /* Contains copy of prxregset struct */ @@ -778,9 +789,14 @@ typedef struct Register */ #define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control Register */ +#define NT_PPC_PKEY 0x110 /* Memory Protection Keys + registers. */ +#define NT_PPC_DEXCR 0x111 /* PowerPC DEXCR registers. */ +#define NT_PPC_HASHKEYR 0x112 /* PowerPC HASHKEYR register. */ #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ +#define NT_X86_SHSTK 0x204 /* x86 SHSTK state */ #define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ #define NT_S390_TIMER 0x301 /* s390 timer register */ #define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ @@ -790,6 +806,14 @@ typedef struct #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ +#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 + upper half. */ +#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31. */ +#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers. */ +#define NT_S390_GS_BC 0x30c /* s390 guarded storage + broadcast control block. */ +#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */ +#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data. */ #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ #define NT_ARM_TLS 0x401 /* ARM TLS register */ #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ @@ -797,6 +821,33 @@ typedef struct #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ #define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ +#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication + code masks. */ +#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication + 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. */ +#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */ +#define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */ +#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */ +#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */ +#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and + status registers. */ +#define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD + Extension registers. */ +#define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced + SIMD Extension registers. */ +#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary + Translation registers. */ +#define NT_LOONGARCH_HW_BREAK 0xa05 /* LoongArch hardware breakpoint registers */ +#define NT_LOONGARCH_HW_WATCH 0xa06 /* LoongArch hardware watchpoint registers */ /* Legal values for the note segment descriptor types for object files. */ @@ -861,7 +912,11 @@ typedef struct #define DT_ENCODING 32 /* Start of encoded range */ #define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ #define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ -#define DT_NUM 34 /* Number used */ +#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */ +#define DT_RELRSZ 35 /* Total size of RELR relative relocations */ +#define DT_RELR 36 /* Address of RELR relative relocations */ +#define DT_RELRENT 37 /* Size of one RELR relative relocaction */ +#define DT_NUM 38 /* Number used */ #define DT_LOOS 0x6000000d /* Start of OS-specific */ #define DT_HIOS 0x6ffff000 /* End of OS-specific */ #define DT_LOPROC 0x70000000 /* Start of processor-specific */ @@ -971,6 +1026,9 @@ typedef struct #define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */ #define DF_1_STUB 0x04000000 #define DF_1_PIE 0x08000000 +#define DF_1_KMOD 0x10000000 +#define DF_1_WEAKFILTER 0x20000000 +#define DF_1_NOCOMMON 0x40000000 /* Flags for the feature selection in DT_FEATURE_1. */ #define DTF_1_PARINIT 0x00000001 @@ -1015,7 +1073,8 @@ typedef struct /* Legal values for vd_flags (version information flags). */ #define VER_FLG_BASE 0x1 /* Version definition of file itself */ -#define VER_FLG_WEAK 0x2 /* Weak version identifier */ +#define VER_FLG_WEAK 0x2 /* Weak version identifier. Also + used by vna_flags below. */ /* Versym symbol index values. */ #define VER_NDX_LOCAL 0 /* Symbol is local. */ @@ -1023,7 +1082,7 @@ typedef struct #define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */ #define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */ -/* Auxialiary version information. */ +/* Auxiliary version information. */ typedef struct { @@ -1093,10 +1152,6 @@ typedef struct } Elf64_Vernaux; -/* Legal values for vna_flags. */ -#define VER_FLG_WEAK 0x2 /* Weak version identifier */ - - /* Auxiliary vector. */ /* This vector is normally only used by the program interpreter. The @@ -1130,7 +1185,87 @@ typedef struct } a_un; } Elf64_auxv_t; -#include +/* Legal values for a_type (entry type). */ + +#define AT_NULL 0 /* End of vector */ +#define AT_IGNORE 1 /* Entry should be ignored */ +#define AT_EXECFD 2 /* File descriptor of program */ +#define AT_PHDR 3 /* Program headers for program */ +#define AT_PHENT 4 /* Size of program header entry */ +#define AT_PHNUM 5 /* Number of program headers */ +#define AT_PAGESZ 6 /* System page size */ +#define AT_BASE 7 /* Base address of interpreter */ +#define AT_FLAGS 8 /* Flags */ +#define AT_ENTRY 9 /* Entry point of program */ +#define AT_NOTELF 10 /* Program is not ELF */ +#define AT_UID 11 /* Real uid */ +#define AT_EUID 12 /* Effective uid */ +#define AT_GID 13 /* Real gid */ +#define AT_EGID 14 /* Effective gid */ +#define AT_CLKTCK 17 /* Frequency of times() */ + +/* Some more special a_type values describing the hardware. */ +#define AT_PLATFORM 15 /* String identifying platform. */ +#define AT_HWCAP 16 /* Machine-dependent hints about + processor capabilities. */ + +/* This entry gives some information about the FPU initialization + performed by the kernel. */ +#define AT_FPUCW 18 /* Used FPU control word. */ + +/* Cache block sizes. */ +#define AT_DCACHEBSIZE 19 /* Data cache block size. */ +#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ +#define AT_UCACHEBSIZE 21 /* Unified cache block size. */ + +/* A special ignored value for PPC, used by the kernel to control the + interpretation of the AUXV. Must be > 16. */ +#define AT_IGNOREPPC 22 /* Entry should be ignored. */ + +#define AT_SECURE 23 /* Boolean, was exec setuid-like? */ + +#define AT_BASE_PLATFORM 24 /* String identifying real platforms.*/ + +#define AT_RANDOM 25 /* Address of 16 random bytes. */ + +#define AT_HWCAP2 26 /* More machine-dependent hints about + processor capabilities. */ + +#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */ +#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */ + +/* More machine-dependent hints about processor capabilities. */ +#define AT_HWCAP3 29 /* extension of AT_HWCAP. */ +#define AT_HWCAP4 30 /* extension of AT_HWCAP. */ + +#define AT_EXECFN 31 /* Filename of executable. */ + +/* Pointer to the global system page used for system calls and other + nice things. */ +#define AT_SYSINFO 32 +#define AT_SYSINFO_EHDR 33 + +/* Shapes of the caches. Bits 0-3 contains associativity; bits 4-7 contains + log2 of line size; mask those to get cache size. */ +#define AT_L1I_CACHESHAPE 34 +#define AT_L1D_CACHESHAPE 35 +#define AT_L2_CACHESHAPE 36 +#define AT_L3_CACHESHAPE 37 + +/* Shapes of the caches, with more room to describe them. + *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits + and the cache associativity in the next 16 bits. */ +#define AT_L1I_CACHESIZE 40 +#define AT_L1I_CACHEGEOMETRY 41 +#define AT_L1D_CACHESIZE 42 +#define AT_L1D_CACHEGEOMETRY 43 +#define AT_L2_CACHESIZE 44 +#define AT_L2_CACHEGEOMETRY 45 +#define AT_L3_CACHESIZE 46 +#define AT_L3_CACHEGEOMETRY 47 + +#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery */ + /* Note section contents. Each entry in the note section begins with a header of a fixed form. */ @@ -1156,6 +1291,8 @@ typedef struct /* Note entries for GNU systems have this name. */ #define ELF_NOTE_GNU "GNU" +/* Note entries for freedesktop.org have this name. */ +#define ELF_NOTE_FDO "FDO" /* Defined types of notes for Solaris. */ @@ -1199,6 +1336,10 @@ typedef struct /* Program property. */ #define NT_GNU_PROPERTY_TYPE_0 5 +/* Packaging metadata as defined on + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */ +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e + /* Note section name of program property. */ #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" @@ -1209,6 +1350,23 @@ typedef struct /* No copy relocation on protected data symbol. */ #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 +/* A 4-byte unsigned integer property: A bit is set if it is set in all + relocatable inputs. */ +#define GNU_PROPERTY_UINT32_AND_LO 0xb0000000 +#define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff + +/* A 4-byte unsigned integer property: A bit is set if it is set in any + relocatable inputs. */ +#define GNU_PROPERTY_UINT32_OR_LO 0xb0008000 +#define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff + +/* The needed properties by the object file. */ +#define GNU_PROPERTY_1_NEEDED GNU_PROPERTY_UINT32_OR_LO + +/* Set if the object file requires canonical function pointers and + cannot be used with copy relocation. */ +#define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS (1U << 0) + /* Processor-specific semantics, lo */ #define GNU_PROPERTY_LOPROC 0xc0000000 /* Processor-specific semantics, hi */ @@ -1218,33 +1376,34 @@ typedef struct /* Application-specific semantics, hi */ #define GNU_PROPERTY_HIUSER 0xffffffff +/* AArch64 specific GNU properties. */ +#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000 + +#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0) +#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1) + /* The x86 instruction sets indicated by the corresponding bits are used in program. Their support in the hardware is optional. */ -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 /* The x86 instruction sets indicated by the corresponding bits are used in program and they must be supported by the hardware. */ -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 /* X86 processor-specific features used in program. */ #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 -#define GNU_PROPERTY_X86_ISA_1_486 (1U << 0) -#define GNU_PROPERTY_X86_ISA_1_586 (1U << 1) -#define GNU_PROPERTY_X86_ISA_1_686 (1U << 2) -#define GNU_PROPERTY_X86_ISA_1_SSE (1U << 3) -#define GNU_PROPERTY_X86_ISA_1_SSE2 (1U << 4) -#define GNU_PROPERTY_X86_ISA_1_SSE3 (1U << 5) -#define GNU_PROPERTY_X86_ISA_1_SSSE3 (1U << 6) -#define GNU_PROPERTY_X86_ISA_1_SSE4_1 (1U << 7) -#define GNU_PROPERTY_X86_ISA_1_SSE4_2 (1U << 8) -#define GNU_PROPERTY_X86_ISA_1_AVX (1U << 9) -#define GNU_PROPERTY_X86_ISA_1_AVX2 (1U << 10) -#define GNU_PROPERTY_X86_ISA_1_AVX512F (1U << 11) -#define GNU_PROPERTY_X86_ISA_1_AVX512CD (1U << 12) -#define GNU_PROPERTY_X86_ISA_1_AVX512ER (1U << 13) -#define GNU_PROPERTY_X86_ISA_1_AVX512PF (1U << 14) -#define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15) -#define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16) -#define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17) +/* GNU_PROPERTY_X86_ISA_1_BASELINE: CMOV, CX8 (cmpxchg8b), FPU (fld), + MMX, OSFXSR (fxsave), SCE (syscall), SSE and SSE2. */ +#define GNU_PROPERTY_X86_ISA_1_BASELINE (1U << 0) +/* GNU_PROPERTY_X86_ISA_1_V2: GNU_PROPERTY_X86_ISA_1_BASELINE, + CMPXCHG16B (cmpxchg16b), LAHF-SAHF (lahf), POPCNT (popcnt), SSE3, + SSSE3, SSE4.1 and SSE4.2. */ +#define GNU_PROPERTY_X86_ISA_1_V2 (1U << 1) +/* GNU_PROPERTY_X86_ISA_1_V3: GNU_PROPERTY_X86_ISA_1_V2, AVX, AVX2, BMI1, + BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE. */ +#define GNU_PROPERTY_X86_ISA_1_V3 (1U << 2) +/* GNU_PROPERTY_X86_ISA_1_V4: GNU_PROPERTY_X86_ISA_1_V3, AVX512F, + AVX512BW, AVX512CD, AVX512DQ and AVX512VL. */ +#define GNU_PROPERTY_X86_ISA_1_V4 (1U << 3) /* This indicates that all executable sections are compatible with IBT. */ @@ -1537,11 +1696,25 @@ typedef struct #define EF_MIPS_PIC 2 /* Contains PIC code. */ #define EF_MIPS_CPIC 4 /* Uses PIC calling sequence. */ #define EF_MIPS_XGOT 8 -#define EF_MIPS_64BIT_WHIRL 16 +#define EF_MIPS_UCODE 16 #define EF_MIPS_ABI2 32 #define EF_MIPS_ABI_ON32 64 +#define EF_MIPS_OPTIONS_FIRST 0x00000080 /* Process the .MIPS.options + section first by ld. */ +#define EF_MIPS_32BITMODE 0x00000100 /* Indicates code compiled for + a 64-bit machine in 32-bit + mode (regs are 32-bits + wide). */ #define EF_MIPS_FP64 512 /* Uses FP64 (12 callee-saved). */ #define EF_MIPS_NAN2008 1024 /* Uses IEEE 754-2008 NaN encoding. */ +#define EF_MIPS_ARCH_ASE 0x0f000000 /* Architectural Extensions + used by this file. */ +#define EF_MIPS_ARCH_ASE_MDMX 0x08000000 /* Use MDMX multimedia + extensions. */ +#define EF_MIPS_ARCH_ASE_M16 0x04000000 /* Use MIPS-16 ISA + extensions. */ +#define EF_MIPS_ARCH_ASE_MICROMIPS 0x02000000 /* Use MICROMIPS ISA + extensions. */ #define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level. */ /* Legal values for MIPS architecture level. */ @@ -1555,6 +1728,38 @@ typedef struct #define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */ #define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32r2 code. */ #define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64r2 code. */ +#define EF_MIPS_ARCH_32R6 0x90000000 /* MIPS32r6 code. */ +#define EF_MIPS_ARCH_64R6 0xa0000000 /* MIPS64r6 code. */ +#define EF_MIPS_ABI 0x0000F000 /* The ABI of the file. Also + see EF_MIPS_ABI2 above. */ +#define EF_MIPS_ABI_O32 0x00001000 /* The original o32 abi. */ +#define EF_MIPS_ABI_O64 0x00002000 /* O32 extended to work on + 64 bit architectures. */ +#define EF_MIPS_ABI_EABI32 0x00003000 /* EABI in 32 bit mode. */ +#define EF_MIPS_ABI_EABI64 0x00004000 /* EABI in 64 bit mode. */ +#define EF_MIPS_MACH 0x00FF0000 +#define EF_MIPS_MACH_3900 0x00810000 +#define EF_MIPS_MACH_4010 0x00820000 +#define EF_MIPS_MACH_4100 0x00830000 +#define EF_MIPS_MACH_ALLEGREX 0x00840000 +#define EF_MIPS_MACH_4650 0x00850000 +#define EF_MIPS_MACH_4120 0x00870000 +#define EF_MIPS_MACH_4111 0x00880000 +#define EF_MIPS_MACH_SB1 0x008a0000 +#define EF_MIPS_MACH_OCTEON 0x008b0000 +#define EF_MIPS_MACH_XLR 0x008c0000 +#define EF_MIPS_MACH_OCTEON2 0x008d0000 +#define EF_MIPS_MACH_OCTEON3 0x008e0000 +#define EF_MIPS_MACH_5400 0x00910000 +#define EF_MIPS_MACH_5900 0x00920000 +#define EF_MIPS_MACH_IAMR2 0x00930000 +#define EF_MIPS_MACH_5500 0x00980000 +#define EF_MIPS_MACH_9000 0x00990000 +#define EF_MIPS_MACH_LS2E 0x00A00000 +#define EF_MIPS_MACH_LS2F 0x00A10000 +#define EF_MIPS_MACH_GS464 0x00A20000 +#define EF_MIPS_MACH_GS464E 0x00A30000 +#define EF_MIPS_MACH_GS264E 0x00A40000 /* The following are unofficial names and should not be used. */ @@ -1615,6 +1820,8 @@ typedef struct #define SHT_MIPS_EH_REGION 0x70000027 #define SHT_MIPS_XLATE_OLD 0x70000028 #define SHT_MIPS_PDR_EXCEPTION 0x70000029 +#define SHT_MIPS_ABIFLAGS 0x7000002a +#define SHT_MIPS_XHASH 0x7000002b /* Legal values for sh_flags field of Elf32_Shdr. */ @@ -1782,10 +1989,68 @@ typedef struct #define R_MIPS_TLS_TPREL_HI16 49 /* TP-relative offset, high 16 bits */ #define R_MIPS_TLS_TPREL_LO16 50 /* TP-relative offset, low 16 bits */ #define R_MIPS_GLOB_DAT 51 +#define R_MIPS_PC21_S2 60 +#define R_MIPS_PC26_S2 61 +#define R_MIPS_PC18_S3 62 +#define R_MIPS_PC19_S2 63 +#define R_MIPS_PCHI16 64 +#define R_MIPS_PCLO16 65 +#define R_MIPS16_26 100 +#define R_MIPS16_GPREL 101 +#define R_MIPS16_GOT16 102 +#define R_MIPS16_CALL16 103 +#define R_MIPS16_HI16 104 +#define R_MIPS16_LO16 105 +#define R_MIPS16_TLS_GD 106 +#define R_MIPS16_TLS_LDM 107 +#define R_MIPS16_TLS_DTPREL_HI16 108 +#define R_MIPS16_TLS_DTPREL_LO16 109 +#define R_MIPS16_TLS_GOTTPREL 110 +#define R_MIPS16_TLS_TPREL_HI16 111 +#define R_MIPS16_TLS_TPREL_LO16 112 +#define R_MIPS16_PC16_S1 113 #define R_MIPS_COPY 126 #define R_MIPS_JUMP_SLOT 127 +#define R_MIPS_RELATIVE 128 +#define R_MICROMIPS_26_S1 133 +#define R_MICROMIPS_HI16 134 +#define R_MICROMIPS_LO16 135 +#define R_MICROMIPS_GPREL16 136 +#define R_MICROMIPS_LITERAL 137 +#define R_MICROMIPS_GOT16 138 +#define R_MICROMIPS_PC7_S1 139 +#define R_MICROMIPS_PC10_S1 140 +#define R_MICROMIPS_PC16_S1 141 +#define R_MICROMIPS_CALL16 142 +#define R_MICROMIPS_GOT_DISP 145 +#define R_MICROMIPS_GOT_PAGE 146 +#define R_MICROMIPS_GOT_OFST 147 +#define R_MICROMIPS_GOT_HI16 148 +#define R_MICROMIPS_GOT_LO16 149 +#define R_MICROMIPS_SUB 150 +#define R_MICROMIPS_HIGHER 151 +#define R_MICROMIPS_HIGHEST 152 +#define R_MICROMIPS_CALL_HI16 153 +#define R_MICROMIPS_CALL_LO16 154 +#define R_MICROMIPS_SCN_DISP 155 +#define R_MICROMIPS_JALR 156 +#define R_MICROMIPS_HI0_LO16 157 +#define R_MICROMIPS_TLS_GD 162 +#define R_MICROMIPS_TLS_LDM 163 +#define R_MICROMIPS_TLS_DTPREL_HI16 164 +#define R_MICROMIPS_TLS_DTPREL_LO16 165 +#define R_MICROMIPS_TLS_GOTTPREL 166 +#define R_MICROMIPS_TLS_TPREL_HI16 169 +#define R_MICROMIPS_TLS_TPREL_LO16 170 +#define R_MICROMIPS_GPREL7_S2 172 +#define R_MICROMIPS_PC23_S2 173 +#define R_MIPS_PC32 248 +#define R_MIPS_EH 249 +#define R_MIPS_GNU_REL16_S2 250 +#define R_MIPS_GNU_VTINHERIT 253 +#define R_MIPS_GNU_VTENTRY 254 /* Keep this the last entry. */ -#define R_MIPS_NUM 128 +#define R_MIPS_NUM 255 /* Legal values for p_type field of Elf32_Phdr. */ @@ -1862,7 +2127,9 @@ typedef struct in a PIE as it stores a relative offset from the address of the tag rather than an absolute address. */ #define DT_MIPS_RLD_MAP_REL 0x70000035 -#define DT_MIPS_NUM 0x36 +/* GNU-style hash table with xlat. */ +#define DT_MIPS_XHASH 0x70000036 +#define DT_MIPS_NUM 0x37 /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */ @@ -2033,9 +2300,9 @@ enum #define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */ #define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */ -/* Additional section indeces. */ +/* Additional section indices. */ -#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared +#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tentatively declared symbols in ANSI C. */ #define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */ @@ -2764,6 +3031,18 @@ enum #define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */ #define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */ +/* MTE memory tag segment type. */ +#define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 2) + +/* AArch64 specific values for the Dyn d_tag field. */ +#define DT_AARCH64_BTI_PLT (DT_LOPROC + 1) +#define DT_AARCH64_PAC_PLT (DT_LOPROC + 3) +#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5) +#define DT_AARCH64_NUM 6 + +/* AArch64 specific values for the st_other field. */ +#define STO_AARCH64_VARIANT_PCS 0x80 + /* ARM relocs. */ #define R_ARM_NONE 0 /* No reloc */ @@ -2932,6 +3211,81 @@ enum /* Keep this the last entry. */ #define R_ARM_NUM 256 +/* C-SKY */ +#define R_CKCORE_NONE 0 /* no reloc */ +#define R_CKCORE_ADDR32 1 /* direct 32 bit (S + A) */ +#define R_CKCORE_PCRELIMM8BY4 2 /* disp ((S + A - P) >> 2) & 0xff */ +#define R_CKCORE_PCRELIMM11BY2 3 /* disp ((S + A - P) >> 1) & 0x7ff */ +#define R_CKCORE_PCREL32 5 /* 32-bit rel (S + A - P) */ +#define R_CKCORE_PCRELJSR_IMM11BY2 6 /* disp ((S + A - P) >>1) & 0x7ff */ +#define R_CKCORE_RELATIVE 9 /* 32 bit adjust program base(B + A)*/ +#define R_CKCORE_COPY 10 /* 32 bit adjust by program base */ +#define R_CKCORE_GLOB_DAT 11 /* off between got and sym (S) */ +#define R_CKCORE_JUMP_SLOT 12 /* PLT entry (S) */ +#define R_CKCORE_GOTOFF 13 /* offset to GOT (S + A - GOT) */ +#define R_CKCORE_GOTPC 14 /* PC offset to GOT (GOT + A - P) */ +#define R_CKCORE_GOT32 15 /* 32 bit GOT entry (G) */ +#define R_CKCORE_PLT32 16 /* 32 bit PLT entry (G) */ +#define R_CKCORE_ADDRGOT 17 /* GOT entry in GLOB_DAT (GOT + G) */ +#define R_CKCORE_ADDRPLT 18 /* PLT entry in GLOB_DAT (GOT + G) */ +#define R_CKCORE_PCREL_IMM26BY2 19 /* ((S + A - P) >> 1) & 0x3ffffff */ +#define R_CKCORE_PCREL_IMM16BY2 20 /* disp ((S + A - P) >> 1) & 0xffff */ +#define R_CKCORE_PCREL_IMM16BY4 21 /* disp ((S + A - P) >> 2) & 0xffff */ +#define R_CKCORE_PCREL_IMM10BY2 22 /* disp ((S + A - P) >> 1) & 0x3ff */ +#define R_CKCORE_PCREL_IMM10BY4 23 /* disp ((S + A - P) >> 2) & 0x3ff */ +#define R_CKCORE_ADDR_HI16 24 /* high & low 16 bit ADDR */ + /* ((S + A) >> 16) & 0xffff */ +#define R_CKCORE_ADDR_LO16 25 /* (S + A) & 0xffff */ +#define R_CKCORE_GOTPC_HI16 26 /* high & low 16 bit GOTPC */ + /* ((GOT + A - P) >> 16) & 0xffff */ +#define R_CKCORE_GOTPC_LO16 27 /* (GOT + A - P) & 0xffff */ +#define R_CKCORE_GOTOFF_HI16 28 /* high & low 16 bit GOTOFF */ + /* ((S + A - GOT) >> 16) & 0xffff */ +#define R_CKCORE_GOTOFF_LO16 29 /* (S + A - GOT) & 0xffff */ +#define R_CKCORE_GOT12 30 /* 12 bit disp GOT entry (G) */ +#define R_CKCORE_GOT_HI16 31 /* high & low 16 bit GOT */ + /* (G >> 16) & 0xffff */ +#define R_CKCORE_GOT_LO16 32 /* (G & 0xffff) */ +#define R_CKCORE_PLT12 33 /* 12 bit disp PLT entry (G) */ +#define R_CKCORE_PLT_HI16 34 /* high & low 16 bit PLT */ + /* (G >> 16) & 0xffff */ +#define R_CKCORE_PLT_LO16 35 /* G & 0xffff */ +#define R_CKCORE_ADDRGOT_HI16 36 /* high & low 16 bit ADDRGOT */ + /* (GOT + G * 4) & 0xffff */ +#define R_CKCORE_ADDRGOT_LO16 37 /* (GOT + G * 4) & 0xffff */ +#define R_CKCORE_ADDRPLT_HI16 38 /* high & low 16 bit ADDRPLT */ + /* ((GOT + G * 4) >> 16) & 0xFFFF */ +#define R_CKCORE_ADDRPLT_LO16 39 /* (GOT+G*4) & 0xffff */ +#define R_CKCORE_PCREL_JSR_IMM26BY2 40 /* disp ((S+A-P) >>1) & x3ffffff */ +#define R_CKCORE_TOFFSET_LO16 41 /* (S+A-BTEXT) & 0xffff */ +#define R_CKCORE_DOFFSET_LO16 42 /* (S+A-BTEXT) & 0xffff */ +#define R_CKCORE_PCREL_IMM18BY2 43 /* disp ((S+A-P) >>1) & 0x3ffff */ +#define R_CKCORE_DOFFSET_IMM18 44 /* disp (S+A-BDATA) & 0x3ffff */ +#define R_CKCORE_DOFFSET_IMM18BY2 45 /* disp ((S+A-BDATA)>>1) & 0x3ffff */ +#define R_CKCORE_DOFFSET_IMM18BY4 46 /* disp ((S+A-BDATA)>>2) & 0x3ffff */ +#define R_CKCORE_GOT_IMM18BY4 48 /* disp (G >> 2) */ +#define R_CKCORE_PLT_IMM18BY4 49 /* disp (G >> 2) */ +#define R_CKCORE_PCREL_IMM7BY4 50 /* disp ((S+A-P) >>2) & 0x7f */ +#define R_CKCORE_TLS_LE32 51 /* 32 bit offset to TLS block */ +#define R_CKCORE_TLS_IE32 52 +#define R_CKCORE_TLS_GD32 53 +#define R_CKCORE_TLS_LDM32 54 +#define R_CKCORE_TLS_LDO32 55 +#define R_CKCORE_TLS_DTPMOD32 56 +#define R_CKCORE_TLS_DTPOFF32 57 +#define R_CKCORE_TLS_TPOFF32 58 + +/* C-SKY elf header definition. */ +#define EF_CSKY_ABIMASK 0XF0000000 +#define EF_CSKY_OTHER 0X0FFF0000 +#define EF_CSKY_PROCESSOR 0X0000FFFF + +#define EF_CSKY_ABIV1 0X10000000 +#define EF_CSKY_ABIV2 0X20000000 + +/* C-SKY attributes section. */ +#define SHT_CSKY_ATTRIBUTES (SHT_LOPROC + 1) + /* IA-64 specific declarations. */ /* Processor specific flags for the Ehdr e_flags field. */ @@ -3286,6 +3640,14 @@ enum relaxable. */ #define R_X86_64_NUM 43 +/* x86-64 sh_type values. */ +#define SHT_X86_64_UNWIND 0x70000001 /* Unwind information. */ + +/* x86-64 d_tag values. */ +#define DT_X86_64_PLT (DT_LOPROC + 0) +#define DT_X86_64_PLTSZ (DT_LOPROC + 1) +#define DT_X86_64_PLTENT (DT_LOPROC + 3) +#define DT_X86_64_NUM 4 /* AM33 relocations. */ #define R_MN10300_NONE 0 /* No reloc. */ @@ -3702,25 +4064,89 @@ enum #define EF_RISCV_FLOAT_ABI_SINGLE 0x0002 #define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004 #define EF_RISCV_FLOAT_ABI_QUAD 0x0006 +#define EF_RISCV_RVE 0x0008 +#define EF_RISCV_TSO 0x0010 /* RISC-V relocations. */ -#define R_RISCV_NONE 0 -#define R_RISCV_32 1 -#define R_RISCV_64 2 -#define R_RISCV_RELATIVE 3 -#define R_RISCV_COPY 4 -#define R_RISCV_JUMP_SLOT 5 -#define R_RISCV_TLS_DTPMOD32 6 -#define R_RISCV_TLS_DTPMOD64 7 -#define R_RISCV_TLS_DTPREL32 8 -#define R_RISCV_TLS_DTPREL64 9 -#define R_RISCV_TLS_TPREL32 10 -#define R_RISCV_TLS_TPREL64 11 +#define R_RISCV_NONE 0 +#define R_RISCV_32 1 +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 +#define R_RISCV_COPY 4 +#define R_RISCV_JUMP_SLOT 5 +#define R_RISCV_TLS_DTPMOD32 6 +#define R_RISCV_TLS_DTPMOD64 7 +#define R_RISCV_TLS_DTPREL32 8 +#define R_RISCV_TLS_DTPREL64 9 +#define R_RISCV_TLS_TPREL32 10 +#define R_RISCV_TLS_TPREL64 11 +#define R_RISCV_BRANCH 16 +#define R_RISCV_JAL 17 +#define R_RISCV_CALL 18 +#define R_RISCV_CALL_PLT 19 +#define R_RISCV_GOT_HI20 20 +#define R_RISCV_TLS_GOT_HI20 21 +#define R_RISCV_TLS_GD_HI20 22 +#define R_RISCV_PCREL_HI20 23 +#define R_RISCV_PCREL_LO12_I 24 +#define R_RISCV_PCREL_LO12_S 25 +#define R_RISCV_HI20 26 +#define R_RISCV_LO12_I 27 +#define R_RISCV_LO12_S 28 +#define R_RISCV_TPREL_HI20 29 +#define R_RISCV_TPREL_LO12_I 30 +#define R_RISCV_TPREL_LO12_S 31 +#define R_RISCV_TPREL_ADD 32 +#define R_RISCV_ADD8 33 +#define R_RISCV_ADD16 34 +#define R_RISCV_ADD32 35 +#define R_RISCV_ADD64 36 +#define R_RISCV_SUB8 37 +#define R_RISCV_SUB16 38 +#define R_RISCV_SUB32 39 +#define R_RISCV_SUB64 40 +#define R_RISCV_GNU_VTINHERIT 41 +#define R_RISCV_GNU_VTENTRY 42 +#define R_RISCV_ALIGN 43 +#define R_RISCV_RVC_BRANCH 44 +#define R_RISCV_RVC_JUMP 45 +#define R_RISCV_RVC_LUI 46 +#define R_RISCV_GPREL_I 47 +#define R_RISCV_GPREL_S 48 +#define R_RISCV_TPREL_I 49 +#define R_RISCV_TPREL_S 50 +#define R_RISCV_RELAX 51 +#define R_RISCV_SUB6 52 +#define R_RISCV_SET6 53 +#define R_RISCV_SET8 54 +#define R_RISCV_SET16 55 +#define R_RISCV_SET32 56 +#define R_RISCV_32_PCREL 57 +#define R_RISCV_IRELATIVE 58 +#define R_RISCV_PLT32 59 +#define R_RISCV_SET_ULEB128 60 +#define R_RISCV_SUB_ULEB128 61 + +#define R_RISCV_NUM 62 + +/* RISC-V specific values for the st_other field. */ +#define STO_RISCV_VARIANT_CC 0x80 /* Function uses variant calling + convention */ + +/* RISC-V specific values for the sh_type field. */ +#define SHT_RISCV_ATTRIBUTES (SHT_LOPROC + 3) + +/* RISC-V specific values for the p_type field. */ +#define PT_RISCV_ATTRIBUTES (PT_LOPROC + 3) + +/* RISC-V specific values for the d_tag field. */ +#define DT_RISCV_VARIANT_CC (DT_LOPROC + 1) /* BPF specific declarations. */ #define R_BPF_NONE 0 /* No reloc */ -#define R_BPF_MAP_FD 1 /* Map fd to pointer */ +#define R_BPF_64_64 1 +#define R_BPF_64_32 10 /* Imagination Meta specific relocations. */ @@ -3731,7 +4157,7 @@ enum #define R_METAG_RELBRANCH 4 #define R_METAG_GETSETOFF 5 -/* Backward compatability */ +/* Backward compatibility */ #define R_METAG_REG32OP1 6 #define R_METAG_REG32OP2 7 #define R_METAG_REG32OP3 8 @@ -3784,6 +4210,255 @@ enum #define R_METAG_TLS_LE_HI16 60 #define R_METAG_TLS_LE_LO16 61 -__END_DECLS +/* NDS32 relocations. */ +#define R_NDS32_NONE 0 +#define R_NDS32_32_RELA 20 +#define R_NDS32_COPY 39 +#define R_NDS32_GLOB_DAT 40 +#define R_NDS32_JMP_SLOT 41 +#define R_NDS32_RELATIVE 42 +#define R_NDS32_TLS_TPOFF 102 +#define R_NDS32_TLS_DESC 119 + +/* LoongArch ELF Flags */ +#define EF_LARCH_ABI_MODIFIER_MASK 0x07 +#define EF_LARCH_ABI_SOFT_FLOAT 0x01 +#define EF_LARCH_ABI_SINGLE_FLOAT 0x02 +#define EF_LARCH_ABI_DOUBLE_FLOAT 0x03 +#define EF_LARCH_OBJABI_V1 0x40 + +/* LoongArch specific dynamic relocations */ +#define R_LARCH_NONE 0 +#define R_LARCH_32 1 +#define R_LARCH_64 2 +#define R_LARCH_RELATIVE 3 +#define R_LARCH_COPY 4 +#define R_LARCH_JUMP_SLOT 5 +#define R_LARCH_TLS_DTPMOD32 6 +#define R_LARCH_TLS_DTPMOD64 7 +#define R_LARCH_TLS_DTPREL32 8 +#define R_LARCH_TLS_DTPREL64 9 +#define R_LARCH_TLS_TPREL32 10 +#define R_LARCH_TLS_TPREL64 11 +#define R_LARCH_IRELATIVE 12 + +/* Reserved for future relocs that the dynamic linker must understand. */ + +/* used by the static linker for relocating .text. */ +#define R_LARCH_MARK_LA 20 +#define R_LARCH_MARK_PCREL 21 +#define R_LARCH_SOP_PUSH_PCREL 22 +#define R_LARCH_SOP_PUSH_ABSOLUTE 23 +#define R_LARCH_SOP_PUSH_DUP 24 +#define R_LARCH_SOP_PUSH_GPREL 25 +#define R_LARCH_SOP_PUSH_TLS_TPREL 26 +#define R_LARCH_SOP_PUSH_TLS_GOT 27 +#define R_LARCH_SOP_PUSH_TLS_GD 28 +#define R_LARCH_SOP_PUSH_PLT_PCREL 29 +#define R_LARCH_SOP_ASSERT 30 +#define R_LARCH_SOP_NOT 31 +#define R_LARCH_SOP_SUB 32 +#define R_LARCH_SOP_SL 33 +#define R_LARCH_SOP_SR 34 +#define R_LARCH_SOP_ADD 35 +#define R_LARCH_SOP_AND 36 +#define R_LARCH_SOP_IF_ELSE 37 +#define R_LARCH_SOP_POP_32_S_10_5 38 +#define R_LARCH_SOP_POP_32_U_10_12 39 +#define R_LARCH_SOP_POP_32_S_10_12 40 +#define R_LARCH_SOP_POP_32_S_10_16 41 +#define R_LARCH_SOP_POP_32_S_10_16_S2 42 +#define R_LARCH_SOP_POP_32_S_5_20 43 +#define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44 +#define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45 +#define R_LARCH_SOP_POP_32_U 46 + +/* used by the static linker for relocating non .text. */ +#define R_LARCH_ADD8 47 +#define R_LARCH_ADD16 48 +#define R_LARCH_ADD24 49 +#define R_LARCH_ADD32 50 +#define R_LARCH_ADD64 51 +#define R_LARCH_SUB8 52 +#define R_LARCH_SUB16 53 +#define R_LARCH_SUB24 54 +#define R_LARCH_SUB32 55 +#define R_LARCH_SUB64 56 +#define R_LARCH_GNU_VTINHERIT 57 +#define R_LARCH_GNU_VTENTRY 58 + +/* reserved 59-63 */ + +#define R_LARCH_B16 64 +#define R_LARCH_B21 65 +#define R_LARCH_B26 66 +#define R_LARCH_ABS_HI20 67 +#define R_LARCH_ABS_LO12 68 +#define R_LARCH_ABS64_LO20 69 +#define R_LARCH_ABS64_HI12 70 +#define R_LARCH_PCALA_HI20 71 +#define R_LARCH_PCALA_LO12 72 +#define R_LARCH_PCALA64_LO20 73 +#define R_LARCH_PCALA64_HI12 74 +#define R_LARCH_GOT_PC_HI20 75 +#define R_LARCH_GOT_PC_LO12 76 +#define R_LARCH_GOT64_PC_LO20 77 +#define R_LARCH_GOT64_PC_HI12 78 +#define R_LARCH_GOT_HI20 79 +#define R_LARCH_GOT_LO12 80 +#define R_LARCH_GOT64_LO20 81 +#define R_LARCH_GOT64_HI12 82 +#define R_LARCH_TLS_LE_HI20 83 +#define R_LARCH_TLS_LE_LO12 84 +#define R_LARCH_TLS_LE64_LO20 85 +#define R_LARCH_TLS_LE64_HI12 86 +#define R_LARCH_TLS_IE_PC_HI20 87 +#define R_LARCH_TLS_IE_PC_LO12 88 +#define R_LARCH_TLS_IE64_PC_LO20 89 +#define R_LARCH_TLS_IE64_PC_HI12 90 +#define R_LARCH_TLS_IE_HI20 91 +#define R_LARCH_TLS_IE_LO12 92 +#define R_LARCH_TLS_IE64_LO20 93 +#define R_LARCH_TLS_IE64_HI12 94 +#define R_LARCH_TLS_LD_PC_HI20 95 +#define R_LARCH_TLS_LD_HI20 96 +#define R_LARCH_TLS_GD_PC_HI20 97 +#define R_LARCH_TLS_GD_HI20 98 +#define R_LARCH_32_PCREL 99 +#define R_LARCH_RELAX 100 +#define R_LARCH_DELETE 101 +#define R_LARCH_ALIGN 102 +#define R_LARCH_PCREL20_S2 103 +#define R_LARCH_CFA 104 +#define R_LARCH_ADD6 105 +#define R_LARCH_SUB6 106 +#define R_LARCH_ADD_ULEB128 107 +#define R_LARCH_SUB_ULEB128 108 +#define R_LARCH_64_PCREL 109 + +/* ARC specific declarations. */ + +/* Processor specific flags for the Ehdr e_flags field. */ +#define EF_ARC_MACH_MSK 0x000000ff +#define EF_ARC_OSABI_MSK 0x00000f00 +#define EF_ARC_ALL_MSK (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK) + +/* Processor specific values for the Shdr sh_type field. */ +#define SHT_ARC_ATTRIBUTES (SHT_LOPROC + 1) /* ARC attributes section. */ + +/* ARCompact/ARCv2 specific relocs. */ +#define R_ARC_NONE 0x0 +#define R_ARC_8 0x1 +#define R_ARC_16 0x2 +#define R_ARC_24 0x3 +#define R_ARC_32 0x4 + +#define R_ARC_B22_PCREL 0x6 +#define R_ARC_H30 0x7 +#define R_ARC_N8 0x8 +#define R_ARC_N16 0x9 +#define R_ARC_N24 0xA +#define R_ARC_N32 0xB +#define R_ARC_SDA 0xC +#define R_ARC_SECTOFF 0xD +#define R_ARC_S21H_PCREL 0xE +#define R_ARC_S21W_PCREL 0xF +#define R_ARC_S25H_PCREL 0x10 +#define R_ARC_S25W_PCREL 0x11 +#define R_ARC_SDA32 0x12 +#define R_ARC_SDA_LDST 0x13 +#define R_ARC_SDA_LDST1 0x14 +#define R_ARC_SDA_LDST2 0x15 +#define R_ARC_SDA16_LD 0x16 +#define R_ARC_SDA16_LD1 0x17 +#define R_ARC_SDA16_LD2 0x18 +#define R_ARC_S13_PCREL 0x19 +#define R_ARC_W 0x1A +#define R_ARC_32_ME 0x1B +#define R_ARC_N32_ME 0x1C +#define R_ARC_SECTOFF_ME 0x1D +#define R_ARC_SDA32_ME 0x1E +#define R_ARC_W_ME 0x1F +#define R_ARC_H30_ME 0x20 +#define R_ARC_SECTOFF_U8 0x21 +#define R_ARC_SECTOFF_S9 0x22 +#define R_AC_SECTOFF_U8 0x23 +#define R_AC_SECTOFF_U8_1 0x24 +#define R_AC_SECTOFF_U8_2 0x25 +#define R_AC_SECTOFF_S9 0x26 +#define R_AC_SECTOFF_S9_1 0x27 +#define R_AC_SECTOFF_S9_2 0x28 +#define R_ARC_SECTOFF_ME_1 0x29 +#define R_ARC_SECTOFF_ME_2 0x2A +#define R_ARC_SECTOFF_1 0x2B +#define R_ARC_SECTOFF_2 0x2C +#define R_ARC_SDA_12 0x2D +#define R_ARC_SDA16_ST2 0x30 +#define R_ARC_32_PCREL 0x31 +#define R_ARC_PC32 0x32 +#define R_ARC_GOTPC32 0x33 +#define R_ARC_PLT32 0x34 +#define R_ARC_COPY 0x35 +#define R_ARC_GLOB_DAT 0x36 +#define R_ARC_JMP_SLOT 0x37 +#define R_ARC_RELATIVE 0x38 +#define R_ARC_GOTOFF 0x39 +#define R_ARC_GOTPC 0x3A +#define R_ARC_GOT32 0x3B +#define R_ARC_S21W_PCREL_PLT 0x3C +#define R_ARC_S25H_PCREL_PLT 0x3D + +#define R_ARC_JLI_SECTOFF 0x3F + +#define R_ARC_TLS_DTPMOD 0x42 +#define R_ARC_TLS_DTPOFF 0x43 +#define R_ARC_TLS_TPOFF 0x44 +#define R_ARC_TLS_GD_GOT 0x45 +#define R_ARC_TLS_GD_LD 0x46 +#define R_ARC_TLS_GD_CALL 0x47 +#define R_ARC_TLS_IE_GOT 0x48 +#define R_ARC_TLS_DTPOFF_S9 0x49 +#define R_ARC_TLS_LE_S9 0x4A +#define R_ARC_TLS_LE_32 0x4B +#define R_ARC_S25W_PCREL_PLT 0x4C +#define R_ARC_S21H_PCREL_PLT 0x4D +#define R_ARC_NPS_CMEM16 0x4E + +/* OpenRISC 1000 specific relocs. */ +#define R_OR1K_NONE 0 +#define R_OR1K_32 1 +#define R_OR1K_16 2 +#define R_OR1K_8 3 +#define R_OR1K_LO_16_IN_INSN 4 +#define R_OR1K_HI_16_IN_INSN 5 +#define R_OR1K_INSN_REL_26 6 +#define R_OR1K_GNU_VTENTRY 7 +#define R_OR1K_GNU_VTINHERIT 8 +#define R_OR1K_32_PCREL 9 +#define R_OR1K_16_PCREL 10 +#define R_OR1K_8_PCREL 11 +#define R_OR1K_GOTPC_HI16 12 +#define R_OR1K_GOTPC_LO16 13 +#define R_OR1K_GOT16 14 +#define R_OR1K_PLT26 15 +#define R_OR1K_GOTOFF_HI16 16 +#define R_OR1K_GOTOFF_LO16 17 +#define R_OR1K_COPY 18 +#define R_OR1K_GLOB_DAT 19 +#define R_OR1K_JMP_SLOT 20 +#define R_OR1K_RELATIVE 21 +#define R_OR1K_TLS_GD_HI16 22 +#define R_OR1K_TLS_GD_LO16 23 +#define R_OR1K_TLS_LDM_HI16 24 +#define R_OR1K_TLS_LDM_LO16 25 +#define R_OR1K_TLS_LDO_HI16 26 +#define R_OR1K_TLS_LDO_LO16 27 +#define R_OR1K_TLS_IE_HI16 28 +#define R_OR1K_TLS_IE_LO16 29 +#define R_OR1K_TLS_LE_HI16 30 +#define R_OR1K_TLS_LE_LO16 31 +#define R_OR1K_TLS_TPOFF 32 +#define R_OR1K_TLS_DTPOFF 33 +#define R_OR1K_TLS_DTPMOD 34 #endif /* elf.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/endian.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/endian.h index 9c9ec17f..fd20a2b1 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/endian.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/endian.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2024 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 @@ -13,48 +13,23 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #include -/* Definitions for byte order, according to significance of bytes, - from low addresses to high addresses. The value is what you get by - putting '4' in the most significant byte, '3' in the second most - significant byte, '2' in the second least significant byte, and '1' - in the least significant byte, and then writing down one digit for - each byte, starting with the byte at the lowest address at the left, - and proceeding to the byte with the highest address at the right. */ - -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 -#define __PDP_ENDIAN 3412 - -/* This file defines `__BYTE_ORDER' for the particular machine. */ +/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */ #include -/* Some machines may need to use a different endianness for floating point - values. */ -#ifndef __FLOAT_WORD_ORDER -# define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __USE_MISC +#ifdef __USE_MISC # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) LO, HI -#elif __BYTE_ORDER == __BIG_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) HI, LO -#endif - - #if defined __USE_MISC && !defined __ASSEMBLER__ /* Conversion interfaces. */ # include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/errno.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/errno.h index e12fed60..e50380f0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/errno.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/errno.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.5 Errors @@ -45,12 +45,7 @@ extern int *__errno_location (void) __THROW __attribute_const__; extern char *program_invocation_name; extern char *program_invocation_short_name; -/* bits/errno.h may have defined this type. If it didn't, provide a - fallback definition. */ -# ifndef __error_t_defined -# define __error_t_defined 1 -typedef int error_t; -# endif +#include # endif /* __USE_GNU */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/execinfo.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/execinfo.h index 40a43325..6e3ebc8b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/execinfo.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/execinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2018 Free Software Foundation, Inc. +/* Copyright (C) 1998-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _EXECINFO_H #define _EXECINFO_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fcntl.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fcntl.h index 3579d295..9cee0b59 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fcntl.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fcntl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 6.5 File Control Operations @@ -139,12 +139,64 @@ typedef __pid_t pid_t; # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ +/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS + is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to + unlinkat. The two functions do completely different things and therefore, + the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to + faccessat would be undefined behavior and thus treating it equivalent to + AT_EACCESS is valid undefined behavior. */ +#ifdef __USE_ATFILE +# define AT_FDCWD -100 /* Special value used to indicate + the *at functions should use the + current working directory. */ +# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ +# define AT_REMOVEDIR 0x200 /* Remove directory instead of + unlinking file. */ +# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ +# ifdef __USE_GNU +# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount + traversal. */ +# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ +# define AT_STATX_SYNC_TYPE 0x6000 +# define AT_STATX_SYNC_AS_STAT 0x0000 +# define AT_STATX_FORCE_SYNC 0x2000 +# define AT_STATX_DONT_SYNC 0x4000 +# define AT_RECURSIVE 0x8000 /* Apply to the entire subtree. */ +# endif +# define AT_EACCESS 0x200 /* Test access permitted for + effective IDs, not real IDs. */ +#endif + /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. This function is a cancellation point and therefore not marked with __THROW. */ +#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 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int fcntl64 (int __fd, int __cmd, ...); +# endif +#else /* __USE_TIME_BITS64 */ +# ifdef __REDIRECT +extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...), + __fcntl_time64); +extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...), + __fcntl_time64); +# 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. OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features-time64.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features-time64.h new file mode 100644 index 00000000..dd3442c2 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features-time64.h @@ -0,0 +1,37 @@ +/* Features part to handle 64-bit time_t support. + Copyright (C) 2021-2024 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 + . */ + +/* We need to know the word size in order to check the time size. */ +#include +#include + +#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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features.h index 9194ddf1..19b46d4f 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/features.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _FEATURES_H #define _FEATURES_H 1 @@ -24,6 +24,7 @@ __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. + _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ @@ -32,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; @@ -47,12 +50,15 @@ _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__). _FORTIFY_SOURCE Add security hardening to many library functions. - Set to 1 or 2; 2 performs stricter checks than 1. + Set to 1, 2 or 3; 3 performs stricter checks than 2, which + performs stricter checks than 1. _REENTRANT, _THREAD_SAFE Obsolete; equivalent to _POSIX_C_SOURCE=199506L. @@ -93,6 +99,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. @@ -136,10 +144,14 @@ #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 +#undef __GLIBC_USE_ISOC2X #undef __GLIBC_USE_DEPRECATED_GETS +#undef __GLIBC_USE_DEPRECATED_SCANF +#undef __GLIBC_USE_C2X_STRTOL /* Suppress kernel-name space pollution unless user expressedly asks for it. */ @@ -194,6 +206,8 @@ # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 +# undef _ISOC2X_SOURCE +# define _ISOC2X_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE @@ -208,33 +222,46 @@ # 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, define _DEFAULT_SOURCE. */ #if (defined _DEFAULT_SOURCE \ || (!defined __STRICT_ANSI__ \ - && !defined _ISOC99_SOURCE \ + && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \ + && !defined _ISOC2X_SOURCE \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \ && !defined _XOPEN_SOURCE)) # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif +/* This is to enable the ISO C2X extension. */ +#if (defined _ISOC2X_SOURCE \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)) +# define __GLIBC_USE_ISOC2X 1 +#else +# define __GLIBC_USE_ISOC2X 0 +#endif + /* This is to enable the ISO C11 extension. */ -#if (defined _ISOC11_SOURCE \ +#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) # define __USE_ISOC11 1 #endif /* This is to enable the ISO C99 extension. */ -#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ +#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) # define __USE_ISOC99 1 #endif /* This is to enable the ISO C90 Amendment 1:1995 extension. */ -#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ +#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ + || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) # define __USE_ISOC95 1 #endif @@ -364,6 +391,8 @@ # define __USE_FILE_OFFSET64 1 #endif +#include + #if defined _DEFAULT_SOURCE # define __USE_MISC 1 #endif @@ -372,18 +401,35 @@ # 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 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ - && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 -# if _FORTIFY_SOURCE > 1 + && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 +# if !__GNUC_PREREQ (4, 1) +# warning _FORTIFY_SOURCE requires GCC 4.1 or later +# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \ + || __GNUC_PREREQ (12, 0)) + +# if _FORTIFY_SOURCE > 3 +# warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform +# endif +# define __USE_FORTIFY_LEVEL 3 +# elif _FORTIFY_SOURCE > 1 +# if _FORTIFY_SOURCE > 2 +# warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform +# endif # define __USE_FORTIFY_LEVEL 2 # else # define __USE_FORTIFY_LEVEL 1 # endif -#else +#endif +#ifndef __USE_FORTIFY_LEVEL # define __USE_FORTIFY_LEVEL 0 #endif @@ -397,6 +443,38 @@ # define __GLIBC_USE_DEPRECATED_GETS 1 #endif +/* GNU formerly extended the scanf functions with modified format + specifiers %as, %aS, and %a[...] that allocate a buffer for the + input using malloc. This extension conflicts with ISO C99, which + defines %a as a standalone format specifier that reads a floating- + point number; moreover, POSIX.1-2008 provides the same feature + using the modifier letter 'm' instead (%ms, %mS, %m[...]). + + We now follow C99 unless GNU extensions are active and the compiler + is specifically in C89 or C++98 mode (strict or not). For + instance, with GCC, -std=gnu11 will have C99-compliant scanf with + or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the + old extension. */ +#if (defined __USE_GNU \ + && (defined __cplusplus \ + ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \ + : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L))) +# define __GLIBC_USE_DEPRECATED_SCANF 1 +#else +# define __GLIBC_USE_DEPRECATED_SCANF 0 +#endif + +/* ISO C2X added support for a 0b or 0B prefix on binary constants as + inputs to strtol-family functions (base 0 or 2). This macro is + used to condition redirection in headers to allow that redirection + to be disabled when building those functions, despite _GNU_SOURCE + being defined. */ +#if __GLIBC_USE (ISOC2X) +# define __GLIBC_USE_C2X_STRTOL 1 +#else +# define __GLIBC_USE_C2X_STRTOL 0 +#endif + /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ #include @@ -413,7 +491,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__ 27 +#define __GLIBC_MINOR__ 39 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fenv.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fenv.h index 7b1283ec..33548fa9 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fenv.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 7.6: Floating-point environment @@ -25,7 +25,7 @@ #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include -/* Get the architecture dependend definitions. The following definitions +/* Get the architecture dependent definitions. The following definitions are expected to be done: fenv_t type for object representing an entire floating-point @@ -77,7 +77,7 @@ extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW; /* Raise the supported exceptions represented by EXCEPTS. */ extern int feraiseexcept (int __excepts) __THROW; -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Set the supported exception flags represented by EXCEPTS, without causing enabled traps to be taken. */ extern int fesetexcept (int __excepts) __THROW; @@ -91,7 +91,7 @@ extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; currently set. */ extern int fetestexcept (int __excepts) __THROW; -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Determine which of subset of the exceptions specified by EXCEPTS are set in *FLAGP. */ extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; @@ -130,7 +130,7 @@ extern int feupdateenv (const fenv_t *__envp) __THROW; /* Control modes. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Store the current floating-point control modes in the object pointed to by MODEP. */ extern int fegetmode (femode_t *__modep) __THROW; @@ -140,14 +140,10 @@ extern int fegetmode (femode_t *__modep) __THROW; extern int fesetmode (const femode_t *__modep) __THROW; #endif -/* Include optimization. */ -#ifdef __OPTIMIZE__ -# include -#endif /* NaN support. */ -#if (__GLIBC_USE (IEC_60559_BFP_EXT) \ +#if (__GLIBC_USE (IEC_60559_BFP_EXT_C2X) \ && defined FE_INVALID \ && defined __SUPPORT_SNAN__) # define FE_SNANS_ALWAYS_SIGNAL 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fnmatch.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fnmatch.h index 9f03eafb..5bf5dfc2 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fnmatch.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/fnmatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/getopt.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/getopt.h index 99f6794c..a3cb935b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/getopt.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/getopt.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-2020 Free Software Foundation, Inc. + Copyright (C) 1989-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib; gnulib also has a getopt.h but it is different. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/glob.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/glob.h index b0d034b7..34066628 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/glob.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/glob.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _GLOB_H #define _GLOB_H 1 @@ -54,14 +54,14 @@ typedef __SIZE_TYPE__ size_t; # define GLOB_ONLYDIR (1 << 13)/* Match only directories. */ # define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error if the user name is not available. */ -# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ - GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ - GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) +# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS \ + |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND \ + |GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE \ + |GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) #else -# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ - GLOB_PERIOD) +# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS \ + |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND \ + |GLOB_PERIOD) #endif /* Error returns from `glob'. */ @@ -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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/grp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/grp.h index 396ef058..df7badfb 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/grp.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/grp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2020 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -130,7 +130,8 @@ extern struct group *getgrnam (const char *__name); # ifdef __USE_GNU extern int getgrent_r (struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result); + struct group **__restrict __result) + __attr_access ((__write_only__, 2, 3)); # endif /* Search for an entry with a matching group ID. @@ -139,7 +140,8 @@ extern int getgrent_r (struct group *__restrict __resultbuf, marked with __THROW. */ extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result); + struct group **__restrict __result) + __attr_access ((__write_only__, 3, 4)); /* Search for an entry with a matching group name. @@ -148,7 +150,8 @@ extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf, extern int getgrnam_r (const char *__restrict __name, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result); + struct group **__restrict __result) + __attr_access ((__write_only__, 3, 4)); # ifdef __USE_MISC /* Read a group entry from STREAM. This function is not standardized @@ -161,7 +164,8 @@ extern int getgrnam_r (const char *__restrict __name, extern int fgetgrent_r (FILE *__restrict __stream, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result); + struct group **__restrict __result) + __attr_access ((__write_only__, 3, 4)); # endif #endif /* POSIX or reentrant */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/iconv.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/iconv.h index 63d78336..db344949 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/iconv.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/iconv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _ICONV_H #define _ICONV_H 1 @@ -29,12 +29,19 @@ __BEGIN_DECLS typedef void *iconv_t; +/* Free resources allocated for descriptor CD for code conversion. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int iconv_close (iconv_t __cd); + /* Allocate descriptor for code conversion from codeset FROMCODE to codeset TOCODE. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern iconv_t iconv_open (const char *__tocode, const char *__fromcode); +extern iconv_t iconv_open (const char *__tocode, const char *__fromcode) + __attribute_malloc__ __attr_dealloc (iconv_close, 1); /* Convert at most *INBYTESLEFT bytes from *INBUF according to the code conversion algorithm specified by CD and place up to @@ -44,12 +51,6 @@ extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, char **__restrict __outbuf, size_t *__restrict __outbytesleft); -/* Free resources allocated for descriptor CD for code conversion. - - This function is a possible cancellation point and therefore not - marked with __THROW. */ -extern int iconv_close (iconv_t __cd); - __END_DECLS #endif /* iconv.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ifaddrs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ifaddrs.h index 799bf092..7d3e20d3 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ifaddrs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ifaddrs.h @@ -1,5 +1,5 @@ /* ifaddrs.h -- declarations for getting network interface addresses - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _IFADDRS_H #define _IFADDRS_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/inttypes.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/inttypes.h index 69f8cb17..2ab40635 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/inttypes.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/inttypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99: 7.8 Format conversion of integer types @@ -164,6 +164,45 @@ typedef wchar_t __gwchar_t; # define PRIxPTR __PRIPTR_PREFIX "x" # define PRIXPTR __PRIPTR_PREFIX "X" +/* Binary notation. */ +# if __GLIBC_USE (ISOC2X) +# define PRIb8 "b" +# define PRIb16 "b" +# define PRIb32 "b" +# define PRIb64 __PRI64_PREFIX "b" + +# define PRIbLEAST8 "b" +# define PRIbLEAST16 "b" +# define PRIbLEAST32 "b" +# define PRIbLEAST64 __PRI64_PREFIX "b" + +# define PRIbFAST8 "b" +# define PRIbFAST16 __PRIPTR_PREFIX "b" +# define PRIbFAST32 __PRIPTR_PREFIX "b" +# define PRIbFAST64 __PRI64_PREFIX "b" + +# define PRIbMAX __PRI64_PREFIX "b" +# define PRIbPTR __PRIPTR_PREFIX "b" + +# define PRIB8 "B" +# define PRIB16 "B" +# define PRIB32 "B" +# define PRIB64 __PRI64_PREFIX "B" + +# define PRIBLEAST8 "B" +# define PRIBLEAST16 "B" +# define PRIBLEAST32 "B" +# define PRIBLEAST64 __PRI64_PREFIX "B" + +# define PRIBFAST8 "B" +# define PRIBFAST16 __PRIPTR_PREFIX "B" +# define PRIBFAST32 __PRIPTR_PREFIX "B" +# define PRIBFAST64 __PRI64_PREFIX "B" + +# define PRIBMAX __PRI64_PREFIX "B" +# define PRIBPTR __PRIPTR_PREFIX "B" +# endif + /* Macros for scanning format specifiers. */ @@ -255,7 +294,7 @@ typedef wchar_t __gwchar_t; # define SCNuMAX __PRI64_PREFIX "u" # define SCNxMAX __PRI64_PREFIX "x" -/* Macros for scaning `intptr_t' and `uintptr_t'. */ +/* Macros for scanning `intptr_t' and `uintptr_t'. */ # define SCNdPTR __PRIPTR_PREFIX "d" # define SCNiPTR __PRIPTR_PREFIX "i" # define SCNoPTR __PRIPTR_PREFIX "o" @@ -263,6 +302,28 @@ typedef wchar_t __gwchar_t; # define SCNxPTR __PRIPTR_PREFIX "x" +/* Binary notation. */ +# if __GLIBC_USE (ISOC2X) +# define SCNb8 "hhb" +# define SCNb16 "hb" +# define SCNb32 "b" +# define SCNb64 __PRI64_PREFIX "b" + +# define SCNbLEAST8 "hhb" +# define SCNbLEAST16 "hb" +# define SCNbLEAST32 "b" +# define SCNbLEAST64 __PRI64_PREFIX "b" + +# define SCNbFAST8 "hhb" +# define SCNbFAST16 __PRIPTR_PREFIX "b" +# define SCNbFAST32 __PRIPTR_PREFIX "b" +# define SCNbFAST64 __PRI64_PREFIX "b" + +# define SCNbMAX __PRI64_PREFIX "b" +# define SCNbPTR __PRIPTR_PREFIX "b" +# endif + + __BEGIN_DECLS #if __WORDSIZE == 64 @@ -311,123 +372,45 @@ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __THROW; -#ifdef __USE_EXTERN_INLINES - -# if __WORDSIZE == 64 - -extern long int __strtol_internal (const char *__restrict __nptr, - char **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, - int base)) -{ - return __strtol_internal (nptr, endptr, base, 0); -} - -extern unsigned long int __strtoul_internal (const char *__restrict __nptr, - char ** __restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, - int base)) -{ - return __strtoul_internal (nptr, endptr, base, 0); -} - -extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, - __gwchar_t **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (wcstoimax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) -{ - return __wcstol_internal (nptr, endptr, base, 0); -} - -extern unsigned long int __wcstoul_internal (const __gwchar_t * - __restrict __nptr, - __gwchar_t ** - __restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (wcstoumax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) -{ - return __wcstoul_internal (nptr, endptr, base, 0); -} - -# else /* __WORDSIZE == 32 */ - -__extension__ -extern long long int __strtoll_internal (const char *__restrict __nptr, - char **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, - int base)) -{ - return __strtoll_internal (nptr, endptr, base, 0); -} - -__extension__ -extern unsigned long long int __strtoull_internal (const char * - __restrict __nptr, - char ** - __restrict __endptr, - int __base, - int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, - int base)) -{ - return __strtoull_internal (nptr, endptr, base, 0); -} - -__extension__ -extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (wcstoimax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) -{ - return __wcstoll_internal (nptr, endptr, base, 0); -} - - -__extension__ -extern unsigned long long int __wcstoull_internal (const __gwchar_t * - __restrict __nptr, - __gwchar_t ** - __restrict __endptr, - int __base, - int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (wcstoumax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) -{ - return __wcstoull_internal (nptr, endptr, base, 0); -} - -# endif /* __WORDSIZE == 32 */ -#endif /* Use extern inlines. */ +/* Versions of the above functions that handle '0b' and '0B' prefixes + in base 0 or 2. */ +#if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern intmax_t __REDIRECT_NTH (strtoimax, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoimax); +extern uintmax_t __REDIRECT_NTH (strtoumax, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoumax); +extern intmax_t __REDIRECT_NTH (wcstoimax, + (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base), + __isoc23_wcstoimax); +extern uintmax_t __REDIRECT_NTH (wcstoumax, + (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base), + __isoc23_wcstoumax); +# else +extern intmax_t __isoc23_strtoimax (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW; +extern uintmax_t __isoc23_strtoumax (const char *__restrict __nptr, + char ** __restrict __endptr, int __base) + __THROW; +extern intmax_t __isoc23_wcstoimax (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base) + __THROW; +extern uintmax_t __isoc23_wcstoumax (const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, + int __base) + __THROW; +# define strtoimax __isoc23_strtoimax +# define strtoumax __isoc23_strtoumax +# define wcstoimax __isoc23_wcstoimax +# define wcstoumax __isoc23_wcstoumax +# endif +#endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/langinfo.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/langinfo.h index a50cc9b5..0ee22913 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/langinfo.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/langinfo.h @@ -1,5 +1,5 @@ /* Access to locale-dependent parameters. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LANGINFO_H #define _LANGINFO_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libgen.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libgen.h index f1d7b28e..5260a53c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libgen.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libgen.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBGEN_H #define _LIBGEN_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libintl.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libintl.h index c1a4ae2e..aaafb2cb 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libintl.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/libintl.h @@ -1,5 +1,5 @@ /* Message catalogs for internationalization. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. This file is derived from the file libgettext.h in the GNU gettext package. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/limits.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/limits.h index 8195da78..87796f21 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/limits.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/limits.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2020 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -178,6 +178,18 @@ # endif #endif /* Use IEC_60559_BFP_EXT. */ +/* The macros for _Bool are not defined by GCC's before GCC + 11, or if _GNU_SOURCE is defined rather than enabling C2x support + with -std. */ +#if __GLIBC_USE (ISOC2X) +# ifndef BOOL_MAX +# define BOOL_MAX 1 +# endif +# ifndef BOOL_WIDTH +# define BOOL_WIDTH 1 +# endif +#endif + #ifdef __USE_POSIX /* POSIX adds things to . */ # include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/link.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/link.h index c67a50dd..367d694d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/link.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/link.h @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINK_H #define _LINK_H 1 @@ -34,14 +34,13 @@ #include /* Defines __ELF_NATIVE_CLASS. */ #include -/* Rendezvous structure used by the run-time dynamic linker to communicate - details of shared object loading to the debugger. If the executable's - dynamic section has a DT_DEBUG element, the run-time linker sets that - element's value to the address where this structure can be found. */ +/* The legacy rendezvous structure used by the run-time dynamic linker to + communicate details of shared object loading to the debugger. */ struct r_debug { - int r_version; /* Version number for this protocol. */ + /* Version number for this protocol. It should be greater than 0. */ + int r_version; struct link_map *r_map; /* Head of the chain of loaded objects. */ @@ -63,16 +62,34 @@ struct r_debug ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */ }; -/* This is the instance of that structure used by the dynamic linker. */ +/* This is the symbol of that structure provided by the dynamic linker. */ extern struct r_debug _r_debug; +/* The extended rendezvous structure used by the run-time dynamic linker + to communicate details of shared object loading to the debugger. If + the executable's dynamic section has a DT_DEBUG element, the run-time + linker sets that element's value to the address where this structure + can be found. */ + +struct r_debug_extended + { + struct r_debug base; + + /* The following field is added by r_version == 2. */ + + /* Link to the next r_debug_extended structure. Each r_debug_extended + structure represents a different namespace. The first + r_debug_extended structure is for the default namespace. */ + struct r_debug_extended *r_next; + }; + /* This symbol refers to the "dynamic structure" in the `.dynamic' section of whatever module refers to `_DYNAMIC'. So, to find its own - `struct r_debug', a program could do: + `struct r_debug_extended', a program could do: for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) if (dyn->d_tag == DT_DEBUG) - r_debug = (struct r_debug *) dyn->d_un.d_ptr; - */ + r_debug_extended = (struct r_debug_extended *) dyn->d_un.d_ptr; + */ extern ElfW(Dyn) _DYNAMIC[]; /* Structure describing a loaded shared object. The `l_next' and `l_prev' @@ -96,7 +113,7 @@ struct link_map #ifdef __USE_GNU /* Version numbers for la_version handshake interface. */ -#define LAV_CURRENT 1 +#include /* Activity types signaled through la_activity. */ enum diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/aio_abi.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/aio_abi.h index a04adbc7..8387e0af 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/aio_abi.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/aio_abi.h @@ -38,10 +38,8 @@ enum { IOCB_CMD_PWRITE = 1, IOCB_CMD_FSYNC = 2, IOCB_CMD_FDSYNC = 3, - /* These two are experimental. - * IOCB_CMD_PREADX = 4, - * IOCB_CMD_POLL = 5, - */ + /* 4 was the experimental IOCB_CMD_PREADX */ + IOCB_CMD_POLL = 5, IOCB_CMD_NOOP = 6, IOCB_CMD_PREADV = 7, IOCB_CMD_PWRITEV = 8, @@ -52,8 +50,11 @@ enum { * * IOCB_FLAG_RESFD - Set if the "aio_resfd" member of the "struct iocb" * is valid. + * IOCB_FLAG_IOPRIO - Set if the "aio_reqprio" member of the "struct iocb" + * is valid. */ #define IOCB_FLAG_RESFD (1 << 0) +#define IOCB_FLAG_IOPRIO (1 << 1) /* read() from /dev/aio returns these structures. */ struct io_event { diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/byteorder/little_endian.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/byteorder/little_endian.h index 6be60ff6..ba6c199c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/byteorder/little_endian.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/byteorder/little_endian.h @@ -9,6 +9,7 @@ #define __LITTLE_ENDIAN_BITFIELD #endif +#include #include #include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/capability.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/capability.h index 3a18761f..e48f039e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/capability.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/capability.h @@ -41,11 +41,12 @@ typedef struct __user_cap_header_struct { int pid; } *cap_user_header_t; -typedef struct __user_cap_data_struct { +struct __user_cap_data_struct { __u32 effective; __u32 permitted; __u32 inheritable; -} *cap_user_data_t; +}; +typedef struct __user_cap_data_struct *cap_user_data_t; #define VFS_CAP_REVISION_MASK 0xFF000000 @@ -241,7 +242,6 @@ struct vfs_ns_cap_data { /* Allow examination and configuration of disk quotas */ /* Allow setting the domainname */ /* Allow setting the hostname */ -/* Allow calling bdflush() */ /* Allow mount() and umount(), setting up new smb connection */ /* Allow some autofs root ioctls */ /* Allow nfsservctl */ @@ -272,6 +272,7 @@ struct vfs_ns_cap_data { arbitrary SCSI commands */ /* Allow setting encryption key on loopback filesystem */ /* Allow setting zone reclaim policy */ +/* Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility */ #define CAP_SYS_ADMIN 21 @@ -285,6 +286,8 @@ struct vfs_ns_cap_data { processes and setting the scheduling algorithm used by another process. */ /* Allow setting cpu affinity on other processes */ +/* Allow setting realtime ioprio class */ +/* Allow setting ioprio class on other processes */ #define CAP_SYS_NICE 23 @@ -299,6 +302,7 @@ struct vfs_ns_cap_data { /* Allow more than 64hz interrupts from the real-time clock */ /* Override max number of consoles on console allocation */ /* Override max number of keymaps */ +/* Control memory reclaim behavior */ #define CAP_SYS_RESOURCE 24 @@ -329,6 +333,9 @@ struct vfs_ns_cap_data { #define CAP_AUDIT_CONTROL 30 +/* Set or remove capabilities on files. + Map uid=0 into a child user namespace. */ + #define CAP_SETFCAP 31 /* Override MAC access. @@ -364,8 +371,52 @@ struct vfs_ns_cap_data { #define CAP_AUDIT_READ 37 +/* + * Allow system performance and observability privileged operations + * using perf_events, i915_perf and other kernel subsystems + */ + +#define CAP_PERFMON 38 + +/* + * CAP_BPF allows the following BPF operations: + * - Creating all types of BPF maps + * - Advanced verifier features + * - Indirect variable access + * - Bounded loops + * - BPF to BPF function calls + * - Scalar precision tracking + * - Larger complexity limits + * - Dead code elimination + * - And potentially other features + * - Loading BPF Type Format (BTF) data + * - Retrieve xlated and JITed code of BPF programs + * - Use bpf_spin_lock() helper + * + * CAP_PERFMON relaxes the verifier checks further: + * - BPF progs can use of pointer-to-integer conversions + * - speculation attack hardening measures are bypassed + * - bpf_probe_read to read arbitrary kernel memory is allowed + * - bpf_trace_printk to print kernel memory is allowed + * + * CAP_SYS_ADMIN is required to use bpf_probe_write_user. + * + * CAP_SYS_ADMIN is required to iterate system wide loaded + * programs, maps, links, BTFs and convert their IDs to file descriptors. + * + * CAP_PERFMON and CAP_BPF are required to load tracing programs. + * CAP_NET_ADMIN and CAP_BPF are required to load networking programs. + */ +#define CAP_BPF 39 + + +/* Allow checkpoint/restore related operations */ +/* Allow PID selection during clone3() */ +/* Allow writing to ns_last_pid */ + +#define CAP_CHECKPOINT_RESTORE 40 -#define CAP_LAST_CAP CAP_AUDIT_READ +#define CAP_LAST_CAP CAP_CHECKPOINT_RESTORE #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) @@ -374,7 +425,7 @@ struct vfs_ns_cap_data { */ #define CAP_TO_INDEX(x) ((x) >> 5) /* 1 << 5 == bits in __u32 */ -#define CAP_TO_MASK(x) (1 << ((x) & 31)) /* mask for indexed __u32 */ +#define CAP_TO_MASK(x) (1U << ((x) & 31)) /* mask for indexed __u32 */ #endif /* _LINUX_CAPABILITY_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/const.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/const.h new file mode 100644 index 00000000..1eb84b50 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/const.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* const.h: Macros for dealing with constants. */ + +#ifndef _LINUX_CONST_H +#define _LINUX_CONST_H + +/* Some constant macros are used in both assembler and + * C code. Therefore we cannot annotate them always with + * 'UL' and other type specifiers unilaterally. We + * use the following macros to deal with this. + * + * Similarly, _AT() will cast an expression with a type in C, but + * leave it unchanged in asm. + */ + +#ifdef __ASSEMBLY__ +#define _AC(X,Y) X +#define _AT(T,X) X +#else +#define __AC(X,Y) (X##Y) +#define _AC(X,Y) __AC(X,Y) +#define _AT(T,X) ((T)(X)) +#endif + +#define _UL(x) (_AC(x, UL)) +#define _ULL(x) (_AC(x, ULL)) + +#define _BITUL(x) (_UL(1) << (x)) +#define _BITULL(x) (_ULL(1) << (x)) + +#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1) +#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) + +#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) + +#endif /* _LINUX_CONST_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/errqueue.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/errqueue.h index 3ec174e6..d6f48a2e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/errqueue.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/errqueue.h @@ -3,6 +3,14 @@ #define _LINUX_ERRQUEUE_H #include +#include + +/* RFC 4884: return offset to extension struct + validation */ +struct sock_ee_data_rfc4884 { + __u16 len; + __u8 flags; + __u8 reserved; +}; struct sock_extended_err { __u32 ee_errno; @@ -11,7 +19,10 @@ struct sock_extended_err { __u8 ee_code; __u8 ee_pad; __u32 ee_info; - __u32 ee_data; + union { + __u32 ee_data; + struct sock_ee_data_rfc4884 ee_rfc4884; + }; }; #define SO_EE_ORIGIN_NONE 0 @@ -20,23 +31,36 @@ struct sock_extended_err { #define SO_EE_ORIGIN_ICMP6 3 #define SO_EE_ORIGIN_TXSTATUS 4 #define SO_EE_ORIGIN_ZEROCOPY 5 +#define SO_EE_ORIGIN_TXTIME 6 #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) #define SO_EE_CODE_ZEROCOPY_COPIED 1 +#define SO_EE_CODE_TXTIME_INVALID_PARAM 1 +#define SO_EE_CODE_TXTIME_MISSED 2 + +#define SO_EE_RFC4884_FLAG_INVALID 1 + /** * struct scm_timestamping - timestamps exposed through cmsg * * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_* * communicate network timestamps by passing this struct in a cmsg with - * recvmsg(). See Documentation/networking/timestamping.txt for details. + * recvmsg(). See Documentation/networking/timestamping.rst for details. + * User space sees a timespec definition that matches either + * __kernel_timespec or __kernel_old_timespec, in the kernel we + * require two structure definitions to provide both. */ struct scm_timestamping { struct timespec ts[3]; }; +struct scm_timestamping64 { + struct __kernel_timespec ts[3]; +}; + /* The type of scm_timestamping, passed in sock_extended_err ee_info. * This defines the type of ts[0]. For SCM_TSTAMP_SND only, if ts[0] * is zero, then this is a hardware timestamp and recorded in ts[2]. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fs.h index b539139e..9a3f60f2 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fs.h @@ -13,6 +13,10 @@ #include #include #include +#include + +/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */ +#include /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change @@ -82,7 +86,7 @@ struct file_dedupe_range { __u16 dest_count; /* in - total elements in info array */ __u16 reserved1; /* must be zero */ __u32 reserved2; /* must be zero */ - struct file_dedupe_range_info info[0]; + struct file_dedupe_range_info info[]; }; /* And dynamically-tunable limits and defaults: */ @@ -101,57 +105,6 @@ struct inodes_stat_t { #define NR_FILE 8192 /* this can well be larger on a larger system */ - -/* - * These are the fs-independent mount-flags: up to 32 flags are supported - */ -#define MS_RDONLY 1 /* Mount read-only */ -#define MS_NOSUID 2 /* Ignore suid and sgid bits */ -#define MS_NODEV 4 /* Disallow access to device special files */ -#define MS_NOEXEC 8 /* Disallow program execution */ -#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ -#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ -#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ -#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ -#define MS_NOATIME 1024 /* Do not update access times. */ -#define MS_NODIRATIME 2048 /* Do not update directory access times */ -#define MS_BIND 4096 -#define MS_MOVE 8192 -#define MS_REC 16384 -#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence. - MS_VERBOSE is deprecated. */ -#define MS_SILENT 32768 -#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ -#define MS_UNBINDABLE (1<<17) /* change to unbindable */ -#define MS_PRIVATE (1<<18) /* change to private */ -#define MS_SLAVE (1<<19) /* change to slave */ -#define MS_SHARED (1<<20) /* change to shared */ -#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ -#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ -#define MS_I_VERSION (1<<23) /* Update inode I_version field */ -#define MS_STRICTATIME (1<<24) /* Always perform atime updates */ -#define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ - -/* These sb flags are internal to the kernel */ -#define MS_SUBMOUNT (1<<26) -#define MS_NOREMOTELOCK (1<<27) -#define MS_NOSEC (1<<28) -#define MS_BORN (1<<29) -#define MS_ACTIVE (1<<30) -#define MS_NOUSER (1<<31) - -/* - * Superblock flags that can be altered by MS_REMOUNT - */ -#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\ - MS_LAZYTIME) - -/* - * Old magic mount flag and mask - */ -#define MS_MGC_VAL 0xC0ED0000 -#define MS_MGC_MSK 0xffff0000 - /* * Structure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR. */ @@ -227,8 +180,9 @@ struct fsxattr { #define BLKSECDISCARD _IO(0x12,125) #define BLKROTATIONAL _IO(0x12,126) #define BLKZEROOUT _IO(0x12,127) +#define BLKGETDISKSEQ _IOR(0x12,128,__u64) /* - * A jump here: 130-131 are reserved for zoned block devices + * A jump here: 130-136 are reserved for zoned block devices * (see uapi/linux/blkzoned.h) */ @@ -242,6 +196,8 @@ struct fsxattr { #define FICLONERANGE _IOW(0x94, 13, struct file_clone_range) #define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +#define FSLABEL_MAX 256 /* Max chars for the interface; each fs may differ */ + #define FS_IOC_GETFLAGS _IOR('f', 1, long) #define FS_IOC_SETFLAGS _IOW('f', 2, long) #define FS_IOC_GETVERSION _IOR('v', 1, long) @@ -251,55 +207,10 @@ struct fsxattr { #define FS_IOC32_SETFLAGS _IOW('f', 2, int) #define FS_IOC32_GETVERSION _IOR('v', 1, int) #define FS_IOC32_SETVERSION _IOW('v', 2, int) -#define FS_IOC_FSGETXATTR _IOR ('X', 31, struct fsxattr) -#define FS_IOC_FSSETXATTR _IOW ('X', 32, struct fsxattr) - -/* - * File system encryption support - */ -/* Policy provided via an ioctl on the topmost directory */ -#define FS_KEY_DESCRIPTOR_SIZE 8 - -#define FS_POLICY_FLAGS_PAD_4 0x00 -#define FS_POLICY_FLAGS_PAD_8 0x01 -#define FS_POLICY_FLAGS_PAD_16 0x02 -#define FS_POLICY_FLAGS_PAD_32 0x03 -#define FS_POLICY_FLAGS_PAD_MASK 0x03 -#define FS_POLICY_FLAGS_VALID 0x03 - -/* Encryption algorithms */ -#define FS_ENCRYPTION_MODE_INVALID 0 -#define FS_ENCRYPTION_MODE_AES_256_XTS 1 -#define FS_ENCRYPTION_MODE_AES_256_GCM 2 -#define FS_ENCRYPTION_MODE_AES_256_CBC 3 -#define FS_ENCRYPTION_MODE_AES_256_CTS 4 -#define FS_ENCRYPTION_MODE_AES_128_CBC 5 -#define FS_ENCRYPTION_MODE_AES_128_CTS 6 - -struct fscrypt_policy { - __u8 version; - __u8 contents_encryption_mode; - __u8 filenames_encryption_mode; - __u8 flags; - __u8 master_key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; -}; - -#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy) -#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) -#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy) - -/* Parameters for passing an encryption key into the kernel keyring */ -#define FS_KEY_DESC_PREFIX "fscrypt:" -#define FS_KEY_DESC_PREFIX_SIZE 8 - -/* Structure that userspace passes to the kernel keyring */ -#define FS_MAX_KEY_SIZE 64 - -struct fscrypt_key { - __u32 mode; - __u8 raw[FS_MAX_KEY_SIZE]; - __u32 size; -}; +#define FS_IOC_FSGETXATTR _IOR('X', 31, struct fsxattr) +#define FS_IOC_FSSETXATTR _IOW('X', 32, struct fsxattr) +#define FS_IOC_GETFSLABEL _IOR(0x94, 49, char[FSLABEL_MAX]) +#define FS_IOC_SETFSLABEL _IOW(0x94, 50, char[FSLABEL_MAX]) /* * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) @@ -344,11 +255,14 @@ struct fscrypt_key { #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ #define FS_HUGE_FILE_FL 0x00040000 /* Reserved for ext4 */ #define FS_EXTENT_FL 0x00080000 /* Extents */ +#define FS_VERITY_FL 0x00100000 /* Verity protected inode */ #define FS_EA_INODE_FL 0x00200000 /* Inode used for large EA */ #define FS_EOFBLOCKS_FL 0x00400000 /* Reserved for ext4 */ #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ +#define FS_DAX_FL 0x02000000 /* Inode is DAX */ #define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */ #define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ +#define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */ #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ @@ -358,6 +272,9 @@ struct fscrypt_key { #define SYNC_FILE_RANGE_WAIT_BEFORE 1 #define SYNC_FILE_RANGE_WRITE 2 #define SYNC_FILE_RANGE_WAIT_AFTER 4 +#define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE | \ + SYNC_FILE_RANGE_WAIT_BEFORE | \ + SYNC_FILE_RANGE_WAIT_AFTER) /* * Flags for preadv2/pwritev2: @@ -377,7 +294,71 @@ typedef int __bitwise __kernel_rwf_t; /* per-IO, return -EAGAIN if operation would block */ #define RWF_NOWAIT ((__kernel_rwf_t)0x00000008) +/* per-IO O_APPEND */ +#define RWF_APPEND ((__kernel_rwf_t)0x00000010) + /* mask of flags supported by the kernel */ -#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT) +#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\ + RWF_APPEND) + +/* Pagemap ioctl */ +#define PAGEMAP_SCAN _IOWR('f', 16, struct pm_scan_arg) + +/* Bitmasks provided in pm_scan_args masks and reported in page_region.categories. */ +#define PAGE_IS_WPALLOWED (1 << 0) +#define PAGE_IS_WRITTEN (1 << 1) +#define PAGE_IS_FILE (1 << 2) +#define PAGE_IS_PRESENT (1 << 3) +#define PAGE_IS_SWAPPED (1 << 4) +#define PAGE_IS_PFNZERO (1 << 5) +#define PAGE_IS_HUGE (1 << 6) +#define PAGE_IS_SOFT_DIRTY (1 << 7) + +/* + * struct page_region - Page region with flags + * @start: Start of the region + * @end: End of the region (exclusive) + * @categories: PAGE_IS_* category bitmask for the region + */ +struct page_region { + __u64 start; + __u64 end; + __u64 categories; +}; + +/* Flags for PAGEMAP_SCAN ioctl */ +#define PM_SCAN_WP_MATCHING (1 << 0) /* Write protect the pages matched. */ +#define PM_SCAN_CHECK_WPASYNC (1 << 1) /* Abort the scan when a non-WP-enabled page is found. */ + +/* + * struct pm_scan_arg - Pagemap ioctl argument + * @size: Size of the structure + * @flags: Flags for the IOCTL + * @start: Starting address of the region + * @end: Ending address of the region + * @walk_end Address where the scan stopped (written by kernel). + * walk_end == end (address tags cleared) informs that the scan completed on entire range. + * @vec: Address of page_region struct array for output + * @vec_len: Length of the page_region struct array + * @max_pages: Optional limit for number of returned pages (0 = disabled) + * @category_inverted: PAGE_IS_* categories which values match if 0 instead of 1 + * @category_mask: Skip pages for which any category doesn't match + * @category_anyof_mask: Skip pages for which no category matches + * @return_mask: PAGE_IS_* categories that are to be reported in `page_region`s returned + */ +struct pm_scan_arg { + __u64 size; + __u64 flags; + __u64 start; + __u64 end; + __u64 walk_end; + __u64 vec; + __u64 vec_len; + __u64 max_pages; + __u64 category_inverted; + __u64 category_mask; + __u64 category_anyof_mask; + __u64 return_mask; +}; #endif /* _LINUX_FS_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fscrypt.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fscrypt.h new file mode 100644 index 00000000..76badefb --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/fscrypt.h @@ -0,0 +1,195 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * fscrypt user API + * + * These ioctls can be used on filesystems that support fscrypt. See the + * "User API" section of Documentation/filesystems/fscrypt.rst. + */ +#ifndef _LINUX_FSCRYPT_H +#define _LINUX_FSCRYPT_H + +#include +#include + +/* Encryption policy flags */ +#define FSCRYPT_POLICY_FLAGS_PAD_4 0x00 +#define FSCRYPT_POLICY_FLAGS_PAD_8 0x01 +#define FSCRYPT_POLICY_FLAGS_PAD_16 0x02 +#define FSCRYPT_POLICY_FLAGS_PAD_32 0x03 +#define FSCRYPT_POLICY_FLAGS_PAD_MASK 0x03 +#define FSCRYPT_POLICY_FLAG_DIRECT_KEY 0x04 +#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 0x08 +#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 0x10 + +/* Encryption algorithms */ +#define FSCRYPT_MODE_AES_256_XTS 1 +#define FSCRYPT_MODE_AES_256_CTS 4 +#define FSCRYPT_MODE_AES_128_CBC 5 +#define FSCRYPT_MODE_AES_128_CTS 6 +#define FSCRYPT_MODE_SM4_XTS 7 +#define FSCRYPT_MODE_SM4_CTS 8 +#define FSCRYPT_MODE_ADIANTUM 9 +#define FSCRYPT_MODE_AES_256_HCTR2 10 +/* If adding a mode number > 10, update FSCRYPT_MODE_MAX in fscrypt_private.h */ + +/* + * Legacy policy version; ad-hoc KDF and no key verification. + * For new encrypted directories, use fscrypt_policy_v2 instead. + * + * Careful: the .version field for this is actually 0, not 1. + */ +#define FSCRYPT_POLICY_V1 0 +#define FSCRYPT_KEY_DESCRIPTOR_SIZE 8 +struct fscrypt_policy_v1 { + __u8 version; + __u8 contents_encryption_mode; + __u8 filenames_encryption_mode; + __u8 flags; + __u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE]; +}; + +/* + * Process-subscribed "logon" key description prefix and payload format. + * Deprecated; prefer FS_IOC_ADD_ENCRYPTION_KEY instead. + */ +#define FSCRYPT_KEY_DESC_PREFIX "fscrypt:" +#define FSCRYPT_KEY_DESC_PREFIX_SIZE 8 +#define FSCRYPT_MAX_KEY_SIZE 64 +struct fscrypt_key { + __u32 mode; + __u8 raw[FSCRYPT_MAX_KEY_SIZE]; + __u32 size; +}; + +/* + * New policy version with HKDF and key verification (recommended). + */ +#define FSCRYPT_POLICY_V2 2 +#define FSCRYPT_KEY_IDENTIFIER_SIZE 16 +struct fscrypt_policy_v2 { + __u8 version; + __u8 contents_encryption_mode; + __u8 filenames_encryption_mode; + __u8 flags; + __u8 log2_data_unit_size; + __u8 __reserved[3]; + __u8 master_key_identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; +}; + +/* Struct passed to FS_IOC_GET_ENCRYPTION_POLICY_EX */ +struct fscrypt_get_policy_ex_arg { + __u64 policy_size; /* input/output */ + union { + __u8 version; + struct fscrypt_policy_v1 v1; + struct fscrypt_policy_v2 v2; + } policy; /* output */ +}; + +/* + * v1 policy keys are specified by an arbitrary 8-byte key "descriptor", + * matching fscrypt_policy_v1::master_key_descriptor. + */ +#define FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR 1 + +/* + * v2 policy keys are specified by a 16-byte key "identifier" which the kernel + * calculates as a cryptographic hash of the key itself, + * matching fscrypt_policy_v2::master_key_identifier. + */ +#define FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER 2 + +/* + * Specifies a key, either for v1 or v2 policies. This doesn't contain the + * actual key itself; this is just the "name" of the key. + */ +struct fscrypt_key_specifier { + __u32 type; /* one of FSCRYPT_KEY_SPEC_TYPE_* */ + __u32 __reserved; + union { + __u8 __reserved[32]; /* reserve some extra space */ + __u8 descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE]; + __u8 identifier[FSCRYPT_KEY_IDENTIFIER_SIZE]; + } u; +}; + +/* + * Payload of Linux keyring key of type "fscrypt-provisioning", referenced by + * fscrypt_add_key_arg::key_id as an alternative to fscrypt_add_key_arg::raw. + */ +struct fscrypt_provisioning_key_payload { + __u32 type; + __u32 __reserved; + __u8 raw[]; +}; + +/* Struct passed to FS_IOC_ADD_ENCRYPTION_KEY */ +struct fscrypt_add_key_arg { + struct fscrypt_key_specifier key_spec; + __u32 raw_size; + __u32 key_id; + __u32 __reserved[8]; + __u8 raw[]; +}; + +/* Struct passed to FS_IOC_REMOVE_ENCRYPTION_KEY */ +struct fscrypt_remove_key_arg { + struct fscrypt_key_specifier key_spec; +#define FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY 0x00000001 +#define FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS 0x00000002 + __u32 removal_status_flags; /* output */ + __u32 __reserved[5]; +}; + +/* Struct passed to FS_IOC_GET_ENCRYPTION_KEY_STATUS */ +struct fscrypt_get_key_status_arg { + /* input */ + struct fscrypt_key_specifier key_spec; + __u32 __reserved[6]; + + /* output */ +#define FSCRYPT_KEY_STATUS_ABSENT 1 +#define FSCRYPT_KEY_STATUS_PRESENT 2 +#define FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED 3 + __u32 status; +#define FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF 0x00000001 + __u32 status_flags; + __u32 user_count; + __u32 __out_reserved[13]; +}; + +#define FS_IOC_SET_ENCRYPTION_POLICY _IOR('f', 19, struct fscrypt_policy_v1) +#define FS_IOC_GET_ENCRYPTION_PWSALT _IOW('f', 20, __u8[16]) +#define FS_IOC_GET_ENCRYPTION_POLICY _IOW('f', 21, struct fscrypt_policy_v1) +#define FS_IOC_GET_ENCRYPTION_POLICY_EX _IOWR('f', 22, __u8[9]) /* size + version */ +#define FS_IOC_ADD_ENCRYPTION_KEY _IOWR('f', 23, struct fscrypt_add_key_arg) +#define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg) +#define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS _IOWR('f', 25, struct fscrypt_remove_key_arg) +#define FS_IOC_GET_ENCRYPTION_KEY_STATUS _IOWR('f', 26, struct fscrypt_get_key_status_arg) +#define FS_IOC_GET_ENCRYPTION_NONCE _IOR('f', 27, __u8[16]) + +/**********************************************************************/ + +/* old names; don't add anything new here! */ +#define fscrypt_policy fscrypt_policy_v1 +#define FS_KEY_DESCRIPTOR_SIZE FSCRYPT_KEY_DESCRIPTOR_SIZE +#define FS_POLICY_FLAGS_PAD_4 FSCRYPT_POLICY_FLAGS_PAD_4 +#define FS_POLICY_FLAGS_PAD_8 FSCRYPT_POLICY_FLAGS_PAD_8 +#define FS_POLICY_FLAGS_PAD_16 FSCRYPT_POLICY_FLAGS_PAD_16 +#define FS_POLICY_FLAGS_PAD_32 FSCRYPT_POLICY_FLAGS_PAD_32 +#define FS_POLICY_FLAGS_PAD_MASK FSCRYPT_POLICY_FLAGS_PAD_MASK +#define FS_POLICY_FLAG_DIRECT_KEY FSCRYPT_POLICY_FLAG_DIRECT_KEY +#define FS_POLICY_FLAGS_VALID 0x07 /* contains old flags only */ +#define FS_ENCRYPTION_MODE_INVALID 0 /* never used */ +#define FS_ENCRYPTION_MODE_AES_256_XTS FSCRYPT_MODE_AES_256_XTS +#define FS_ENCRYPTION_MODE_AES_256_GCM 2 /* never used */ +#define FS_ENCRYPTION_MODE_AES_256_CBC 3 /* never used */ +#define FS_ENCRYPTION_MODE_AES_256_CTS FSCRYPT_MODE_AES_256_CTS +#define FS_ENCRYPTION_MODE_AES_128_CBC FSCRYPT_MODE_AES_128_CBC +#define FS_ENCRYPTION_MODE_AES_128_CTS FSCRYPT_MODE_AES_128_CTS +#define FS_ENCRYPTION_MODE_ADIANTUM FSCRYPT_MODE_ADIANTUM +#define FS_KEY_DESC_PREFIX FSCRYPT_KEY_DESC_PREFIX +#define FS_KEY_DESC_PREFIX_SIZE FSCRYPT_KEY_DESC_PREFIX_SIZE +#define FS_MAX_KEY_SIZE FSCRYPT_MAX_KEY_SIZE + +#endif /* _LINUX_FSCRYPT_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/futex.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/futex.h index c5df51e9..1d799984 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/futex.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/futex.h @@ -21,6 +21,7 @@ #define FUTEX_WAKE_BITSET 10 #define FUTEX_WAIT_REQUEUE_PI 11 #define FUTEX_CMP_REQUEUE_PI 12 +#define FUTEX_LOCK_PI2 13 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -32,6 +33,7 @@ #define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG) #define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG) #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) +#define FUTEX_LOCK_PI2_PRIVATE (FUTEX_LOCK_PI2 | FUTEX_PRIVATE_FLAG) #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG) @@ -41,6 +43,56 @@ #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ FUTEX_PRIVATE_FLAG) +/* + * Flags for futex2 syscalls. + * + * NOTE: these are not pure flags, they can also be seen as: + * + * union { + * u32 flags; + * struct { + * u32 size : 2, + * numa : 1, + * : 4, + * private : 1; + * }; + * }; + */ +#define FUTEX2_SIZE_U8 0x00 +#define FUTEX2_SIZE_U16 0x01 +#define FUTEX2_SIZE_U32 0x02 +#define FUTEX2_SIZE_U64 0x03 +#define FUTEX2_NUMA 0x04 + /* 0x08 */ + /* 0x10 */ + /* 0x20 */ + /* 0x40 */ +#define FUTEX2_PRIVATE FUTEX_PRIVATE_FLAG + +#define FUTEX2_SIZE_MASK 0x03 + +/* do not use */ +#define FUTEX_32 FUTEX2_SIZE_U32 /* historical accident :-( */ + +/* + * Max numbers of elements in a futex_waitv array + */ +#define FUTEX_WAITV_MAX 128 + +/** + * struct futex_waitv - A waiter for vectorized wait + * @val: Expected value at uaddr + * @uaddr: User address to wait on + * @flags: Flags for this waiter + * @__reserved: Reserved member to preserve data alignment. Should be 0. + */ +struct futex_waitv { + __u64 val; + __u64 uaddr; + __u32 flags; + __u32 __reserved; +}; + /* * Support for robust futexes: the kernel cleans up held futexes at * thread exit time. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/genetlink.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/genetlink.h index 1317119c..e9b8117b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/genetlink.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/genetlink.h @@ -48,6 +48,7 @@ enum { CTRL_CMD_NEWMCAST_GRP, CTRL_CMD_DELMCAST_GRP, CTRL_CMD_GETMCAST_GRP, /* unused */ + CTRL_CMD_GETPOLICY, __CTRL_CMD_MAX, }; @@ -62,6 +63,9 @@ enum { CTRL_ATTR_MAXATTR, CTRL_ATTR_OPS, CTRL_ATTR_MCAST_GROUPS, + CTRL_ATTR_POLICY, + CTRL_ATTR_OP_POLICY, + CTRL_ATTR_OP, __CTRL_ATTR_MAX, }; @@ -85,5 +89,15 @@ enum { #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) +enum { + CTRL_ATTR_POLICY_UNSPEC, + CTRL_ATTR_POLICY_DO, + CTRL_ATTR_POLICY_DUMP, + + __CTRL_ATTR_POLICY_DUMP_MAX, + CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1 +}; + +#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1) #endif /* __LINUX_GENERIC_NETLINK_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_ether.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_ether.h index 728c42df..a1aff8e3 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_ether.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_ether.h @@ -86,18 +86,23 @@ * over Ethernet */ #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ +#define ETH_P_PROFINET 0x8892 /* PROFINET */ +#define ETH_P_REALTEK 0x8899 /* Multiple proprietary protocols */ #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ +#define ETH_P_ETHERCAT 0x88A4 /* EtherCAT */ #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ #define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */ #define ETH_P_TIPC 0x88CA /* TIPC */ #define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */ +#define ETH_P_MRP 0x88E3 /* Media Redundancy Protocol */ #define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */ #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ #define ETH_P_NCSI 0x88F8 /* NCSI protocol */ #define ETH_P_PRP 0x88FB /* IEC 62439-3 PRP/HSRv0 */ +#define ETH_P_CFM 0x8902 /* Connectivity Fault Management */ #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ #define ETH_P_IBOE 0x8915 /* Infiniband over Ethernet */ #define ETH_P_TDLS 0x890D /* TDLS */ @@ -111,10 +116,11 @@ #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_DSA_A5PSW 0xE001 /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value +#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is more than this value * then the frame is Ethernet II. Else it is 802.3 */ /* @@ -132,6 +138,7 @@ #define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ #define ETH_P_CAN 0x000C /* CAN: Controller Area Network */ #define ETH_P_CANFD 0x000D /* CANFD: CAN flexible data rate*/ +#define ETH_P_CANXL 0x000E /* CANXL: eXtended frame Length */ #define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ #define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ #define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ @@ -149,6 +156,9 @@ #define ETH_P_MAP 0x00F9 /* Qualcomm multiplexing and * aggregation protocol */ +#define ETH_P_MCTP 0x00FA /* Management component transport + * protocol packets + */ /* * This is an Ethernet frame header. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_packet.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_packet.h index 67b61d91..9efc4238 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_packet.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/if_packet.h @@ -2,6 +2,7 @@ #ifndef __LINUX_IF_PACKET_H #define __LINUX_IF_PACKET_H +#include #include struct sockaddr_pkt { @@ -57,6 +58,8 @@ struct sockaddr_ll { #define PACKET_QDISC_BYPASS 20 #define PACKET_ROLLOVER_STATS 21 #define PACKET_FANOUT_DATA 22 +#define PACKET_IGNORE_OUTGOING 23 +#define PACKET_VNET_HDR_SZ 24 #define PACKET_FANOUT_HASH 0 #define PACKET_FANOUT_LB 1 @@ -68,6 +71,7 @@ struct sockaddr_ll { #define PACKET_FANOUT_EBPF 7 #define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 #define PACKET_FANOUT_FLAG_UNIQUEID 0x2000 +#define PACKET_FANOUT_FLAG_IGNORE_OUTGOING 0x4000 #define PACKET_FANOUT_FLAG_DEFRAG 0x8000 struct tpacket_stats { @@ -112,6 +116,7 @@ struct tpacket_auxdata { #define TP_STATUS_BLK_TMO (1 << 5) #define TP_STATUS_VLAN_TPID_VALID (1 << 6) /* auxdata has valid tp_vlan_tpid */ #define TP_STATUS_CSUM_VALID (1 << 7) +#define TP_STATUS_GSO_TCP (1 << 8) /* Tx ring - header status */ #define TP_STATUS_AVAILABLE 0 @@ -122,7 +127,7 @@ struct tpacket_auxdata { /* Rx and Tx ring - header status */ #define TP_STATUS_TS_SOFTWARE (1 << 29) #define TP_STATUS_TS_SYS_HARDWARE (1 << 30) /* deprecated, never set */ -#define TP_STATUS_TS_RAW_HARDWARE (1 << 31) +#define TP_STATUS_TS_RAW_HARDWARE (1U << 31) /* Rx ring - feature request bits */ #define TP_FT_REQ_FILL_RXHASH 0x1 @@ -295,6 +300,17 @@ struct packet_mreq { unsigned char mr_address[8]; }; +struct fanout_args { +#if defined(__LITTLE_ENDIAN_BITFIELD) + __u16 id; + __u16 type_flags; +#else + __u16 type_flags; + __u16 id; +#endif + __u32 max_num_members; +}; + #define PACKET_MR_MULTICAST 0 #define PACKET_MR_PROMISC 1 #define PACKET_MR_ALLMULTI 2 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/kernel.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/kernel.h index d99ffa1a..5413a8c5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/kernel.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/kernel.h @@ -3,13 +3,6 @@ #define _LINUX_KERNEL_H #include - -/* - * 'kernel.h' contains some often-used function prototypes etc - */ -#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) -#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) - -#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) +#include #endif /* _LINUX_KERNEL_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/magic.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/magic.h new file mode 100644 index 00000000..6325d1d0 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/magic.h @@ -0,0 +1,105 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __LINUX_MAGIC_H__ +#define __LINUX_MAGIC_H__ + +#define ADFS_SUPER_MAGIC 0xadf5 +#define AFFS_SUPER_MAGIC 0xadff +#define AFS_SUPER_MAGIC 0x5346414F +#define AUTOFS_SUPER_MAGIC 0x0187 +#define CEPH_SUPER_MAGIC 0x00c36400 +#define CODA_SUPER_MAGIC 0x73757245 +#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ +#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */ +#define DEBUGFS_MAGIC 0x64626720 +#define SECURITYFS_MAGIC 0x73636673 +#define SELINUX_MAGIC 0xf97cff8c +#define SMACK_MAGIC 0x43415d53 /* "SMAC" */ +#define RAMFS_MAGIC 0x858458f6 /* some random number */ +#define TMPFS_MAGIC 0x01021994 +#define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ +#define SQUASHFS_MAGIC 0x73717368 +#define ECRYPTFS_SUPER_MAGIC 0xf15f +#define EFS_SUPER_MAGIC 0x414A53 +#define EROFS_SUPER_MAGIC_V1 0xE0F5E1E2 +#define EXT2_SUPER_MAGIC 0xEF53 +#define EXT3_SUPER_MAGIC 0xEF53 +#define XENFS_SUPER_MAGIC 0xabba1974 +#define EXT4_SUPER_MAGIC 0xEF53 +#define BTRFS_SUPER_MAGIC 0x9123683E +#define NILFS_SUPER_MAGIC 0x3434 +#define F2FS_SUPER_MAGIC 0xF2F52010 +#define HPFS_SUPER_MAGIC 0xf995e849 +#define ISOFS_SUPER_MAGIC 0x9660 +#define JFFS2_SUPER_MAGIC 0x72b6 +#define XFS_SUPER_MAGIC 0x58465342 /* "XFSB" */ +#define PSTOREFS_MAGIC 0x6165676C +#define EFIVARFS_MAGIC 0xde5e81e4 +#define HOSTFS_SUPER_MAGIC 0x00c0ffee +#define OVERLAYFS_SUPER_MAGIC 0x794c7630 +#define FUSE_SUPER_MAGIC 0x65735546 + +#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ +#define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */ +#define MINIX2_SUPER_MAGIC 0x2468 /* minix v2 fs, 14 char names */ +#define MINIX2_SUPER_MAGIC2 0x2478 /* minix v2 fs, 30 char names */ +#define MINIX3_SUPER_MAGIC 0x4d5a /* minix v3 fs, 60 char names */ + +#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ +#define EXFAT_SUPER_MAGIC 0x2011BAB0 +#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ +#define NFS_SUPER_MAGIC 0x6969 +#define OCFS2_SUPER_MAGIC 0x7461636f +#define OPENPROM_SUPER_MAGIC 0x9fa1 +#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ +#define QNX6_SUPER_MAGIC 0x68191122 /* qnx6 fs detection */ +#define AFS_FS_MAGIC 0x6B414653 + + +#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */ + /* used by file system utilities that + look at the superblock, etc. */ +#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" +#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" +#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" + +#define SMB_SUPER_MAGIC 0x517B +#define CIFS_SUPER_MAGIC 0xFF534D42 /* the first four bytes of SMB PDUs */ +#define SMB2_SUPER_MAGIC 0xFE534D42 + +#define CGROUP_SUPER_MAGIC 0x27e0eb +#define CGROUP2_SUPER_MAGIC 0x63677270 + +#define RDTGROUP_SUPER_MAGIC 0x7655821 + +#define STACK_END_MAGIC 0x57AC6E9D + +#define TRACEFS_MAGIC 0x74726163 + +#define V9FS_MAGIC 0x01021997 + +#define BDEVFS_MAGIC 0x62646576 +#define DAXFS_MAGIC 0x64646178 +#define BINFMTFS_MAGIC 0x42494e4d +#define DEVPTS_SUPER_MAGIC 0x1cd1 +#define BINDERFS_SUPER_MAGIC 0x6c6f6f70 +#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA +#define PIPEFS_MAGIC 0x50495045 +#define PROC_SUPER_MAGIC 0x9fa0 +#define SOCKFS_MAGIC 0x534F434B +#define SYSFS_MAGIC 0x62656572 +#define USBDEVICE_SUPER_MAGIC 0x9fa2 +#define MTD_INODE_FS_MAGIC 0x11307854 +#define ANON_INODE_FS_MAGIC 0x09041934 +#define BTRFS_TEST_MAGIC 0x73727279 +#define NSFS_MAGIC 0x6e736673 +#define BPF_FS_MAGIC 0xcafe4a11 +#define AAFS_MAGIC 0x5a3c69f0 +#define ZONEFS_MAGIC 0x5a4f4653 + +/* Since UDF 2.01 is ISO 13346 based... */ +#define UDF_SUPER_MAGIC 0x15013346 +#define DMA_BUF_MAGIC 0x444d4142 /* "DMAB" */ +#define DEVMEM_MAGIC 0x454d444d /* "DMEM" */ +#define SECRETMEM_MAGIC 0x5345434d /* "SECM" */ + +#endif /* __LINUX_MAGIC_H__ */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mman.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mman.h index e495f6df..4e8cb607 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mman.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mman.h @@ -4,14 +4,20 @@ #include #include +#include -#define MREMAP_MAYMOVE 1 -#define MREMAP_FIXED 2 +#define MREMAP_MAYMOVE 1 +#define MREMAP_FIXED 2 +#define MREMAP_DONTUNMAP 4 #define OVERCOMMIT_GUESS 0 #define OVERCOMMIT_ALWAYS 1 #define OVERCOMMIT_NEVER 2 +#define MAP_SHARED 0x01 /* Share changes */ +#define MAP_PRIVATE 0x02 /* Changes are private */ +#define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ + /* * Huge page size encoding when MAP_HUGETLB is specified, and a huge page * size other than the default is desired. See hugetlb_encode.h. @@ -22,15 +28,31 @@ #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT #define MAP_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK +#define MAP_HUGE_16KB HUGETLB_FLAG_ENCODE_16KB #define MAP_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB #define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB #define MAP_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB #define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB #define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB #define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB +#define MAP_HUGE_32MB HUGETLB_FLAG_ENCODE_32MB #define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB +#define MAP_HUGE_512MB HUGETLB_FLAG_ENCODE_512MB #define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB #define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB #define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB +struct cachestat_range { + __u64 off; + __u64 len; +}; + +struct cachestat { + __u64 nr_cache; + __u64 nr_dirty; + __u64 nr_writeback; + __u64 nr_evicted; + __u64 nr_recently_evicted; +}; + #endif /* _LINUX_MMAN_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mount.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mount.h new file mode 100644 index 00000000..102ae117 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/mount.h @@ -0,0 +1,211 @@ +#ifndef _LINUX_MOUNT_H +#define _LINUX_MOUNT_H + +#include + +/* + * These are the fs-independent mount-flags: up to 32 flags are supported + * + * Usage of these is restricted within the kernel to core mount(2) code and + * callers of sys_mount() only. Filesystems should be using the SB_* + * equivalent instead. + */ +#define MS_RDONLY 1 /* Mount read-only */ +#define MS_NOSUID 2 /* Ignore suid and sgid bits */ +#define MS_NODEV 4 /* Disallow access to device special files */ +#define MS_NOEXEC 8 /* Disallow program execution */ +#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ +#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ +#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ +#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ +#define MS_NOSYMFOLLOW 256 /* Do not follow symlinks */ +#define MS_NOATIME 1024 /* Do not update access times. */ +#define MS_NODIRATIME 2048 /* Do not update directory access times */ +#define MS_BIND 4096 +#define MS_MOVE 8192 +#define MS_REC 16384 +#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence. + MS_VERBOSE is deprecated. */ +#define MS_SILENT 32768 +#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ +#define MS_UNBINDABLE (1<<17) /* change to unbindable */ +#define MS_PRIVATE (1<<18) /* change to private */ +#define MS_SLAVE (1<<19) /* change to slave */ +#define MS_SHARED (1<<20) /* change to shared */ +#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ +#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ +#define MS_I_VERSION (1<<23) /* Update inode I_version field */ +#define MS_STRICTATIME (1<<24) /* Always perform atime updates */ +#define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ + +/* These sb flags are internal to the kernel */ +#define MS_SUBMOUNT (1<<26) +#define MS_NOREMOTELOCK (1<<27) +#define MS_NOSEC (1<<28) +#define MS_BORN (1<<29) +#define MS_ACTIVE (1<<30) +#define MS_NOUSER (1<<31) + +/* + * Superblock flags that can be altered by MS_REMOUNT + */ +#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\ + MS_LAZYTIME) + +/* + * Old magic mount flag and mask + */ +#define MS_MGC_VAL 0xC0ED0000 +#define MS_MGC_MSK 0xffff0000 + +/* + * open_tree() flags. + */ +#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */ +#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */ + +/* + * move_mount() flags. + */ +#define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */ +#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */ +#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */ +#define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */ +#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */ +#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */ +#define MOVE_MOUNT_SET_GROUP 0x00000100 /* Set sharing group instead */ +#define MOVE_MOUNT_BENEATH 0x00000200 /* Mount beneath top mount */ +#define MOVE_MOUNT__MASK 0x00000377 + +/* + * fsopen() flags. + */ +#define FSOPEN_CLOEXEC 0x00000001 + +/* + * fspick() flags. + */ +#define FSPICK_CLOEXEC 0x00000001 +#define FSPICK_SYMLINK_NOFOLLOW 0x00000002 +#define FSPICK_NO_AUTOMOUNT 0x00000004 +#define FSPICK_EMPTY_PATH 0x00000008 + +/* + * The type of fsconfig() call made. + */ +enum fsconfig_command { + FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ + FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ + FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */ + FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ + FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */ + FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ + FSCONFIG_CMD_CREATE = 6, /* Create new or reuse existing superblock */ + FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ + FSCONFIG_CMD_CREATE_EXCL = 8, /* Create new superblock, fail if reusing existing superblock */ +}; + +/* + * fsmount() flags. + */ +#define FSMOUNT_CLOEXEC 0x00000001 + +/* + * Mount attributes. + */ +#define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ +#define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */ +#define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files */ +#define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */ +#define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */ +#define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */ +#define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */ +#define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */ +#define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times */ +#define MOUNT_ATTR_IDMAP 0x00100000 /* Idmap mount to @userns_fd in struct mount_attr. */ +#define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks */ + +/* + * mount_setattr() + */ +struct mount_attr { + __u64 attr_set; + __u64 attr_clr; + __u64 propagation; + __u64 userns_fd; +}; + +/* List of all mount_attr versions. */ +#define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */ + + +/* + * Structure for getting mount/superblock/filesystem info with statmount(2). + * + * The interface is similar to statx(2): individual fields or groups can be + * selected with the @mask argument of statmount(). Kernel will set the @mask + * field according to the supported fields. + * + * If string fields are selected, then the caller needs to pass a buffer that + * has space after the fixed part of the structure. Nul terminated strings are + * copied there and offsets relative to @str are stored in the relevant fields. + * If the buffer is too small, then EOVERFLOW is returned. The actually used + * size is returned in @size. + */ +struct statmount { + __u32 size; /* Total size, including strings */ + __u32 __spare1; + __u64 mask; /* What results were written */ + __u32 sb_dev_major; /* Device ID */ + __u32 sb_dev_minor; + __u64 sb_magic; /* ..._SUPER_MAGIC */ + __u32 sb_flags; /* SB_{RDONLY,SYNCHRONOUS,DIRSYNC,LAZYTIME} */ + __u32 fs_type; /* [str] Filesystem type */ + __u64 mnt_id; /* Unique ID of mount */ + __u64 mnt_parent_id; /* Unique ID of parent (for root == mnt_id) */ + __u32 mnt_id_old; /* Reused IDs used in proc/.../mountinfo */ + __u32 mnt_parent_id_old; + __u64 mnt_attr; /* MOUNT_ATTR_... */ + __u64 mnt_propagation; /* MS_{SHARED,SLAVE,PRIVATE,UNBINDABLE} */ + __u64 mnt_peer_group; /* ID of shared peer group */ + __u64 mnt_master; /* Mount receives propagation from this ID */ + __u64 propagate_from; /* Propagation from in current namespace */ + __u32 mnt_root; /* [str] Root of mount relative to root of fs */ + __u32 mnt_point; /* [str] Mountpoint relative to current root */ + __u64 __spare2[50]; + char str[]; /* Variable size part containing strings */ +}; + +/* + * Structure for passing mount ID and miscellaneous parameters to statmount(2) + * and listmount(2). + * + * For statmount(2) @param represents the request mask. + * For listmount(2) @param represents the last listed mount id (or zero). + */ +struct mnt_id_req { + __u32 size; + __u32 spare; + __u64 mnt_id; + __u64 param; +}; + +/* List of all mnt_id_req versions. */ +#define MNT_ID_REQ_SIZE_VER0 24 /* sizeof first published struct */ + +/* + * @mask bits for statmount(2) + */ +#define STATMOUNT_SB_BASIC 0x00000001U /* Want/got sb_... */ +#define STATMOUNT_MNT_BASIC 0x00000002U /* Want/got mnt_... */ +#define STATMOUNT_PROPAGATE_FROM 0x00000004U /* Want/got propagate_from */ +#define STATMOUNT_MNT_ROOT 0x00000008U /* Want/got mnt_root */ +#define STATMOUNT_MNT_POINT 0x00000010U /* Want/got mnt_point */ +#define STATMOUNT_FS_TYPE 0x00000020U /* Want/got fs_type */ + +/* + * Special @mnt_id values that can be passed to listmount + */ +#define LSMT_ROOT 0xffffffffffffffff /* root mount */ + +#endif /* _LINUX_MOUNT_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/net_tstamp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/net_tstamp.h index e5b39721..a2c66b3d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/net_tstamp.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/net_tstamp.h @@ -13,7 +13,7 @@ #include #include /* for SO_TIMESTAMPING */ -/* SO_TIMESTAMPING gets an integer bit field comprised of these values */ +/* SO_TIMESTAMPING flags */ enum { SOF_TIMESTAMPING_TX_HARDWARE = (1<<0), SOF_TIMESTAMPING_TX_SOFTWARE = (1<<1), @@ -30,8 +30,10 @@ enum { SOF_TIMESTAMPING_OPT_STATS = (1<<12), SOF_TIMESTAMPING_OPT_PKTINFO = (1<<13), SOF_TIMESTAMPING_OPT_TX_SWHW = (1<<14), + SOF_TIMESTAMPING_BIND_PHC = (1 << 15), + SOF_TIMESTAMPING_OPT_ID_TCP = (1 << 16), - SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_TX_SWHW, + SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_ID_TCP, SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | SOF_TIMESTAMPING_LAST }; @@ -46,10 +48,22 @@ enum { SOF_TIMESTAMPING_TX_SCHED | \ SOF_TIMESTAMPING_TX_ACK) +/** + * struct so_timestamping - SO_TIMESTAMPING parameter + * + * @flags: SO_TIMESTAMPING flags + * @bind_phc: Index of PTP virtual clock bound to sock. This is available + * if flag SOF_TIMESTAMPING_BIND_PHC is set. + */ +struct so_timestamping { + int flags; + int bind_phc; +}; + /** * struct hwtstamp_config - %SIOCGHWTSTAMP and %SIOCSHWTSTAMP parameter * - * @flags: no flags defined right now, must be zero for %SIOCSHWTSTAMP + * @flags: one of HWTSTAMP_FLAG_* * @tx_type: one of HWTSTAMP_TX_* * @rx_filter: one of HWTSTAMP_FILTER_* * @@ -65,6 +79,21 @@ struct hwtstamp_config { int rx_filter; }; +/* possible values for hwtstamp_config->flags */ +enum hwtstamp_flags { + /* + * With this flag, the user could get bond active interface's + * PHC index. Note this PHC index is not stable as when there + * is a failover, the bond active interface will be changed, so + * will be the PHC index. + */ + HWTSTAMP_FLAG_BONDED_PHC_INDEX = (1<<0), +#define HWTSTAMP_FLAG_BONDED_PHC_INDEX HWTSTAMP_FLAG_BONDED_PHC_INDEX + + HWTSTAMP_FLAG_LAST = HWTSTAMP_FLAG_BONDED_PHC_INDEX, + HWTSTAMP_FLAG_MASK = (HWTSTAMP_FLAG_LAST - 1) | HWTSTAMP_FLAG_LAST +}; + /* possible values for hwtstamp_config->tx_type */ enum hwtstamp_tx_types { /* @@ -90,6 +119,17 @@ enum hwtstamp_tx_types { * queue. */ HWTSTAMP_TX_ONESTEP_SYNC, + + /* + * Same as HWTSTAMP_TX_ONESTEP_SYNC, but also enables time + * stamp insertion directly into PDelay_Resp packets. In this + * case, neither transmitted Sync nor PDelay_Resp packets will + * receive a time stamp via the socket error queue. + */ + HWTSTAMP_TX_ONESTEP_P2P, + + /* add new constants above here */ + __HWTSTAMP_TX_CNT }; /* possible values for hwtstamp_config->rx_filter */ @@ -132,6 +172,9 @@ enum hwtstamp_rx_filters { /* NTP, UDP, all versions and packet modes */ HWTSTAMP_FILTER_NTP_ALL, + + /* add new constants above here */ + __HWTSTAMP_FILTER_CNT }; /* SCM_TIMESTAMPING_PKTINFO control message */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/netlink.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/netlink.h index 0b2c29bd..ff64eb18 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/netlink.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/netlink.h @@ -2,7 +2,7 @@ #ifndef __LINUX_NETLINK_H #define __LINUX_NETLINK_H -#include +#include #include /* for __kernel_sa_family_t */ #include @@ -20,7 +20,7 @@ #define NETLINK_CONNECTOR 11 #define NETLINK_NETFILTER 12 /* netfilter subsystem */ #define NETLINK_IP6_FW 13 -#define NETLINK_DNRTMSG 14 /* DECnet routing messages */ +#define NETLINK_DNRTMSG 14 /* DECnet routing messages (obsolete) */ #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ #define NETLINK_GENERIC 16 /* leave room for NETLINK_DM (DM Events) */ @@ -41,12 +41,20 @@ struct sockaddr_nl { __u32 nl_groups; /* multicast groups mask */ }; +/** + * struct nlmsghdr - fixed format metadata header of Netlink messages + * @nlmsg_len: Length of message including header + * @nlmsg_type: Message content type + * @nlmsg_flags: Additional flags + * @nlmsg_seq: Sequence number + * @nlmsg_pid: Sending process port ID + */ struct nlmsghdr { - __u32 nlmsg_len; /* Length of message including header */ - __u16 nlmsg_type; /* Message content */ - __u16 nlmsg_flags; /* Additional flags */ - __u32 nlmsg_seq; /* Sequence number */ - __u32 nlmsg_pid; /* Sending process port ID */ + __u32 nlmsg_len; + __u16 nlmsg_type; + __u16 nlmsg_flags; + __u32 nlmsg_seq; + __u32 nlmsg_pid; }; /* Flags values */ @@ -54,7 +62,7 @@ struct nlmsghdr { #define NLM_F_REQUEST 0x01 /* It is request message. */ #define NLM_F_MULTI 0x02 /* Multipart message, terminated by NLMSG_DONE */ #define NLM_F_ACK 0x04 /* Reply with ack, with zero or error code */ -#define NLM_F_ECHO 0x08 /* Echo this request */ +#define NLM_F_ECHO 0x08 /* Receive resulting notifications */ #define NLM_F_DUMP_INTR 0x10 /* Dump was inconsistent due to sequence change */ #define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */ @@ -72,6 +80,7 @@ struct nlmsghdr { /* Modifiers to DELETE request */ #define NLM_F_NONREC 0x100 /* Do not delete recursively */ +#define NLM_F_BULK 0x200 /* Delete multiple objects */ /* Flags for ACK message */ #define NLM_F_CAPPED 0x100 /* request was capped */ @@ -91,9 +100,10 @@ struct nlmsghdr { #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) #define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN) #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) -#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) +#define NLMSG_DATA(nlh) ((void *)(((char *)nlh) + NLMSG_HDRLEN)) #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ - (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) + (struct nlmsghdr *)(((char *)(nlh)) + \ + NLMSG_ALIGN((nlh)->nlmsg_len))) #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len <= (len)) @@ -129,6 +139,11 @@ struct nlmsgerr { * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to * be used - in the success case - to identify a created * object or operation or similar (binary) + * @NLMSGERR_ATTR_POLICY: policy for a rejected attribute + * @NLMSGERR_ATTR_MISS_TYPE: type of a missing required attribute, + * %NLMSGERR_ATTR_MISS_NEST will not be present if the attribute was + * missing at the message level + * @NLMSGERR_ATTR_MISS_NEST: offset of the nest where attribute was missing * @__NLMSGERR_ATTR_MAX: number of attributes * @NLMSGERR_ATTR_MAX: highest attribute number */ @@ -137,6 +152,9 @@ enum nlmsgerr_attrs { NLMSGERR_ATTR_MSG, NLMSGERR_ATTR_OFFS, NLMSGERR_ATTR_COOKIE, + NLMSGERR_ATTR_POLICY, + NLMSGERR_ATTR_MISS_TYPE, + NLMSGERR_ATTR_MISS_NEST, __NLMSGERR_ATTR_MAX, NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1 @@ -153,6 +171,7 @@ enum nlmsgerr_attrs { #define NETLINK_LIST_MEMBERSHIPS 9 #define NETLINK_CAP_ACK 10 #define NETLINK_EXT_ACK 11 +#define NETLINK_GET_STRICT_CHK 12 struct nl_pktinfo { __u32 group; @@ -244,4 +263,117 @@ struct nla_bitfield32 { __u32 selector; }; +/* + * policy descriptions - it's specific to each family how this is used + * Normally, it should be retrieved via a dump inside another attribute + * specifying where it applies. + */ + +/** + * enum netlink_attribute_type - type of an attribute + * @NL_ATTR_TYPE_INVALID: unused + * @NL_ATTR_TYPE_FLAG: flag attribute (present/not present) + * @NL_ATTR_TYPE_U8: 8-bit unsigned attribute + * @NL_ATTR_TYPE_U16: 16-bit unsigned attribute + * @NL_ATTR_TYPE_U32: 32-bit unsigned attribute + * @NL_ATTR_TYPE_U64: 64-bit unsigned attribute + * @NL_ATTR_TYPE_S8: 8-bit signed attribute + * @NL_ATTR_TYPE_S16: 16-bit signed attribute + * @NL_ATTR_TYPE_S32: 32-bit signed attribute + * @NL_ATTR_TYPE_S64: 64-bit signed attribute + * @NL_ATTR_TYPE_BINARY: binary data, min/max length may be specified + * @NL_ATTR_TYPE_STRING: string, min/max length may be specified + * @NL_ATTR_TYPE_NUL_STRING: NUL-terminated string, + * min/max length may be specified + * @NL_ATTR_TYPE_NESTED: nested, i.e. the content of this attribute + * consists of sub-attributes. The nested policy and maxtype + * inside may be specified. + * @NL_ATTR_TYPE_NESTED_ARRAY: nested array, i.e. the content of this + * attribute contains sub-attributes whose type is irrelevant + * (just used to separate the array entries) and each such array + * entry has attributes again, the policy for those inner ones + * and the corresponding maxtype may be specified. + * @NL_ATTR_TYPE_BITFIELD32: &struct nla_bitfield32 attribute + * @NL_ATTR_TYPE_SINT: 32-bit or 64-bit signed attribute, aligned to 4B + * @NL_ATTR_TYPE_UINT: 32-bit or 64-bit unsigned attribute, aligned to 4B + */ +enum netlink_attribute_type { + NL_ATTR_TYPE_INVALID, + + NL_ATTR_TYPE_FLAG, + + NL_ATTR_TYPE_U8, + NL_ATTR_TYPE_U16, + NL_ATTR_TYPE_U32, + NL_ATTR_TYPE_U64, + + NL_ATTR_TYPE_S8, + NL_ATTR_TYPE_S16, + NL_ATTR_TYPE_S32, + NL_ATTR_TYPE_S64, + + NL_ATTR_TYPE_BINARY, + NL_ATTR_TYPE_STRING, + NL_ATTR_TYPE_NUL_STRING, + + NL_ATTR_TYPE_NESTED, + NL_ATTR_TYPE_NESTED_ARRAY, + + NL_ATTR_TYPE_BITFIELD32, + + NL_ATTR_TYPE_SINT, + NL_ATTR_TYPE_UINT, +}; + +/** + * enum netlink_policy_type_attr - policy type attributes + * @NL_POLICY_TYPE_ATTR_UNSPEC: unused + * @NL_POLICY_TYPE_ATTR_TYPE: type of the attribute, + * &enum netlink_attribute_type (U32) + * @NL_POLICY_TYPE_ATTR_MIN_VALUE_S: minimum value for signed + * integers (S64) + * @NL_POLICY_TYPE_ATTR_MAX_VALUE_S: maximum value for signed + * integers (S64) + * @NL_POLICY_TYPE_ATTR_MIN_VALUE_U: minimum value for unsigned + * integers (U64) + * @NL_POLICY_TYPE_ATTR_MAX_VALUE_U: maximum value for unsigned + * integers (U64) + * @NL_POLICY_TYPE_ATTR_MIN_LENGTH: minimum length for binary + * attributes, no minimum if not given (U32) + * @NL_POLICY_TYPE_ATTR_MAX_LENGTH: maximum length for binary + * attributes, no maximum if not given (U32) + * @NL_POLICY_TYPE_ATTR_POLICY_IDX: sub policy for nested and + * nested array types (U32) + * @NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE: maximum sub policy + * attribute for nested and nested array types, this can + * in theory be < the size of the policy pointed to by + * the index, if limited inside the nesting (U32) + * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the + * bitfield32 type (U32) + * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64) + * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment + * + * @__NL_POLICY_TYPE_ATTR_MAX: number of attributes + * @NL_POLICY_TYPE_ATTR_MAX: highest attribute number + */ +enum netlink_policy_type_attr { + NL_POLICY_TYPE_ATTR_UNSPEC, + NL_POLICY_TYPE_ATTR_TYPE, + NL_POLICY_TYPE_ATTR_MIN_VALUE_S, + NL_POLICY_TYPE_ATTR_MAX_VALUE_S, + NL_POLICY_TYPE_ATTR_MIN_VALUE_U, + NL_POLICY_TYPE_ATTR_MAX_VALUE_U, + NL_POLICY_TYPE_ATTR_MIN_LENGTH, + NL_POLICY_TYPE_ATTR_MAX_LENGTH, + NL_POLICY_TYPE_ATTR_POLICY_IDX, + NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE, + NL_POLICY_TYPE_ATTR_BITFIELD32_MASK, + NL_POLICY_TYPE_ATTR_PAD, + NL_POLICY_TYPE_ATTR_MASK, + + /* keep last */ + __NL_POLICY_TYPE_ATTR_MAX, + NL_POLICY_TYPE_ATTR_MAX = __NL_POLICY_TYPE_ATTR_MAX - 1 +}; + #endif /* __LINUX_NETLINK_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/perf_event.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/perf_event.h index aaa65bbf..57fd087b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/perf_event.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/perf_event.h @@ -37,6 +37,21 @@ enum perf_type_id { PERF_TYPE_MAX, /* non-ABI */ }; +/* + * attr.config layout for type PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE + * PERF_TYPE_HARDWARE: 0xEEEEEEEE000000AA + * AA: hardware event ID + * EEEEEEEE: PMU type ID + * PERF_TYPE_HW_CACHE: 0xEEEEEEEE00DDCCBB + * BB: hardware cache ID + * CC: hardware cache op ID + * DD: hardware cache op result ID + * EEEEEEEE: PMU type ID + * If the PMU type ID is 0, the PERF_TYPE_RAW will be applied. + */ +#define PERF_PMU_TYPE_SHIFT 32 +#define PERF_HW_EVENT_MASK 0xffffffff + /* * Generalized performance event event_id types, used by the * attr.event_id parameter of the sys_perf_event_open() @@ -112,6 +127,7 @@ enum perf_sw_ids { PERF_COUNT_SW_EMULATION_FAULTS = 8, PERF_COUNT_SW_DUMMY = 9, PERF_COUNT_SW_BPF_OUTPUT = 10, + PERF_COUNT_SW_CGROUP_SWITCHES = 11, PERF_COUNT_SW_MAX, /* non-ABI */ }; @@ -141,12 +157,16 @@ enum perf_event_sample_format { PERF_SAMPLE_TRANSACTION = 1U << 17, PERF_SAMPLE_REGS_INTR = 1U << 18, PERF_SAMPLE_PHYS_ADDR = 1U << 19, + PERF_SAMPLE_AUX = 1U << 20, + PERF_SAMPLE_CGROUP = 1U << 21, + PERF_SAMPLE_DATA_PAGE_SIZE = 1U << 22, + PERF_SAMPLE_CODE_PAGE_SIZE = 1U << 23, + PERF_SAMPLE_WEIGHT_STRUCT = 1U << 24, - PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */ - - __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */ + PERF_SAMPLE_MAX = 1U << 25, /* non-ABI */ }; +#define PERF_SAMPLE_WEIGHT_TYPE (PERF_SAMPLE_WEIGHT | PERF_SAMPLE_WEIGHT_STRUCT) /* * values to program into branch_sample_type when PERF_SAMPLE_BRANCH is set * @@ -180,6 +200,12 @@ enum perf_branch_sample_type_shift { PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */ + PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 17, /* save low level index of raw branch records */ + + PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 18, /* save privilege mode */ + + PERF_SAMPLE_BRANCH_COUNTERS_SHIFT = 19, /* save occurrences of events on a branch */ + PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ }; @@ -207,6 +233,12 @@ enum perf_branch_sample_type { PERF_SAMPLE_BRANCH_TYPE_SAVE = 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, + PERF_SAMPLE_BRANCH_HW_INDEX = 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT, + + PERF_SAMPLE_BRANCH_PRIV_SAVE = 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, + + PERF_SAMPLE_BRANCH_COUNTERS = 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, + PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, }; @@ -225,9 +257,50 @@ enum { PERF_BR_SYSRET = 8, /* syscall return */ PERF_BR_COND_CALL = 9, /* conditional function call */ PERF_BR_COND_RET = 10, /* conditional function return */ + PERF_BR_ERET = 11, /* exception return */ + PERF_BR_IRQ = 12, /* irq */ + PERF_BR_SERROR = 13, /* system error */ + PERF_BR_NO_TX = 14, /* not in transaction */ + PERF_BR_EXTEND_ABI = 15, /* extend ABI */ PERF_BR_MAX, }; +/* + * Common branch speculation outcome classification + */ +enum { + PERF_BR_SPEC_NA = 0, /* Not available */ + PERF_BR_SPEC_WRONG_PATH = 1, /* Speculative but on wrong path */ + PERF_BR_NON_SPEC_CORRECT_PATH = 2, /* Non-speculative but on correct path */ + PERF_BR_SPEC_CORRECT_PATH = 3, /* Speculative and on correct path */ + PERF_BR_SPEC_MAX, +}; + +enum { + PERF_BR_NEW_FAULT_ALGN = 0, /* Alignment fault */ + PERF_BR_NEW_FAULT_DATA = 1, /* Data fault */ + PERF_BR_NEW_FAULT_INST = 2, /* Inst fault */ + PERF_BR_NEW_ARCH_1 = 3, /* Architecture specific */ + PERF_BR_NEW_ARCH_2 = 4, /* Architecture specific */ + PERF_BR_NEW_ARCH_3 = 5, /* Architecture specific */ + PERF_BR_NEW_ARCH_4 = 6, /* Architecture specific */ + PERF_BR_NEW_ARCH_5 = 7, /* Architecture specific */ + PERF_BR_NEW_MAX, +}; + +enum { + PERF_BR_PRIV_UNKNOWN = 0, + PERF_BR_PRIV_USER = 1, + PERF_BR_PRIV_KERNEL = 2, + PERF_BR_PRIV_HV = 3, +}; + +#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1 +#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2 +#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3 +#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4 +#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5 + #define PERF_SAMPLE_BRANCH_PLM_ALL \ (PERF_SAMPLE_BRANCH_USER|\ PERF_SAMPLE_BRANCH_KERNEL|\ @@ -273,6 +346,7 @@ enum { * { u64 time_enabled; } && PERF_FORMAT_TOTAL_TIME_ENABLED * { u64 time_running; } && PERF_FORMAT_TOTAL_TIME_RUNNING * { u64 id; } && PERF_FORMAT_ID + * { u64 lost; } && PERF_FORMAT_LOST * } && !PERF_FORMAT_GROUP * * { u64 nr; @@ -280,6 +354,7 @@ enum { * { u64 time_running; } && PERF_FORMAT_TOTAL_TIME_RUNNING * { u64 value; * { u64 id; } && PERF_FORMAT_ID + * { u64 lost; } && PERF_FORMAT_LOST * } cntr[nr]; * } && PERF_FORMAT_GROUP * }; @@ -289,8 +364,9 @@ enum perf_event_read_format { PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, PERF_FORMAT_ID = 1U << 2, PERF_FORMAT_GROUP = 1U << 3, + PERF_FORMAT_LOST = 1U << 4, - PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ + PERF_FORMAT_MAX = 1U << 5, /* non-ABI */ }; #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ @@ -300,6 +376,9 @@ enum perf_event_read_format { /* add: sample_stack_user */ #define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */ #define PERF_ATTR_SIZE_VER5 112 /* add: aux_watermark */ +#define PERF_ATTR_SIZE_VER6 120 /* add: aux_sample_size */ +#define PERF_ATTR_SIZE_VER7 128 /* add: sig_data */ +#define PERF_ATTR_SIZE_VER8 136 /* add: config3 */ /* * Hardware event_id to monitor via a performance monitoring event: @@ -375,7 +454,13 @@ struct perf_event_attr { ksymbol : 1, /* include ksymbol events */ bpf_event : 1, /* include bpf events */ aux_output : 1, /* generate AUX records instead of events */ - __reserved_1 : 32; + cgroup : 1, /* include cgroup events */ + text_poke : 1, /* include text poke events */ + build_id : 1, /* use build id in mmap2 events */ + inherit_thread : 1, /* children only inherit if cloned with CLONE_THREAD */ + remove_on_exec : 1, /* event is removed from task on exec */ + sigtrap : 1, /* send synchronous SIGTRAP on event */ + __reserved_1 : 26; union { __u32 wakeup_events; /* wakeup every n events */ @@ -424,7 +509,19 @@ struct perf_event_attr { */ __u32 aux_watermark; __u16 sample_max_stack; - __u16 __reserved_2; /* align to __u64 */ + __u16 __reserved_2; + __u32 aux_sample_size; + __u32 __reserved_3; + + /* + * User provided data if sigtrap=1, passed back to user via + * siginfo_t::si_perf_data, e.g. to permit user to identify the event. + * Note, siginfo_t::si_perf_data is long-sized, and sig_data will be + * truncated accordingly on 32 bit architectures. + */ + __u64 sig_data; + + __u64 config3; /* extension of config2 */ }; /* @@ -445,7 +542,7 @@ struct perf_event_query_bpf { /* * User provided buffer to store program ids */ - __u32 ids[0]; + __u32 ids[]; }; /* @@ -522,9 +619,10 @@ struct perf_event_mmap_page { cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */ cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */ - cap_user_time : 1, /* The time_* fields are used */ + cap_user_time : 1, /* The time_{shift,mult,offset} fields are used */ cap_user_time_zero : 1, /* The time_zero field is used */ - cap_____res : 59; + cap_user_time_short : 1, /* the time_{cycle,mask} fields are used */ + cap_____res : 58; }; }; @@ -583,13 +681,29 @@ struct perf_event_mmap_page { * ((rem * time_mult) >> time_shift); */ __u64 time_zero; + __u32 size; /* Header size up to __reserved[] fields. */ + __u32 __reserved_1; + + /* + * If cap_usr_time_short, the hardware clock is less than 64bit wide + * and we must compute the 'cyc' value, as used by cap_usr_time, as: + * + * cyc = time_cycles + ((cyc - time_cycles) & time_mask) + * + * NOTE: this form is explicitly chosen such that cap_usr_time_short + * is a correction on top of cap_usr_time, and code that doesn't + * know about cap_usr_time_short still works under the assumption + * the counter doesn't wrap. + */ + __u64 time_cycles; + __u64 time_mask; /* * Hole for extension of the self monitor capabilities */ - __u8 __reserved[118*8+4]; /* align to 1k. */ + __u8 __reserved[116*8]; /* align to 1k. */ /* * Control data for the mmap() data buffer. @@ -629,6 +743,22 @@ struct perf_event_mmap_page { __u64 aux_size; }; +/* + * The current state of perf_event_header::misc bits usage: + * ('|' used bit, '-' unused bit) + * + * 012 CDEF + * |||---------|||| + * + * Where: + * 0-2 CPUMODE_MASK + * + * C PROC_MAP_PARSE_TIMEOUT + * D MMAP_DATA / COMM_EXEC / FORK_EXEC / SWITCH_OUT + * E MMAP_BUILD_ID / EXACT_IP / SCHED_OUT_PREEMPT + * F (reserved) + */ + #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) #define PERF_RECORD_MISC_KERNEL (1 << 0) @@ -660,6 +790,7 @@ struct perf_event_mmap_page { * * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events + * PERF_RECORD_MISC_MMAP_BUILD_ID - PERF_RECORD_MMAP2 event * * * PERF_RECORD_MISC_EXACT_IP: @@ -669,9 +800,13 @@ struct perf_event_mmap_page { * * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: * Indicates that thread was preempted in TASK_RUNNING state. + * + * PERF_RECORD_MISC_MMAP_BUILD_ID: + * Indicates that mmap2 event carries build id data. */ #define PERF_RECORD_MISC_EXACT_IP (1 << 14) #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14) +#define PERF_RECORD_MISC_MMAP_BUILD_ID (1 << 14) /* * Reserve the last bit to indicate some extended misc field */ @@ -849,7 +984,15 @@ enum perf_event_type { * char data[size];}&& PERF_SAMPLE_RAW * * { u64 nr; - * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK + * { u64 hw_idx; } && PERF_SAMPLE_BRANCH_HW_INDEX + * { u64 from, to, flags } lbr[nr]; + * # + * # The format of the counters is decided by the + * # "branch_counter_nr" and "branch_counter_width", + * # which are defined in the ABI. + * # + * { u64 counters; } cntr[nr] && PERF_SAMPLE_BRANCH_COUNTERS + * } && PERF_SAMPLE_BRANCH_STACK * * { u64 abi; # enum perf_sample_regs_abi * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER @@ -858,12 +1001,33 @@ enum perf_event_type { * char data[size]; * u64 dyn_size; } && PERF_SAMPLE_STACK_USER * - * { u64 weight; } && PERF_SAMPLE_WEIGHT + * { union perf_sample_weight + * { + * u64 full; && PERF_SAMPLE_WEIGHT + * #if defined(__LITTLE_ENDIAN_BITFIELD) + * struct { + * u32 var1_dw; + * u16 var2_w; + * u16 var3_w; + * } && PERF_SAMPLE_WEIGHT_STRUCT + * #elif defined(__BIG_ENDIAN_BITFIELD) + * struct { + * u16 var3_w; + * u16 var2_w; + * u32 var1_dw; + * } && PERF_SAMPLE_WEIGHT_STRUCT + * #endif + * } + * } * { u64 data_src; } && PERF_SAMPLE_DATA_SRC * { u64 transaction; } && PERF_SAMPLE_TRANSACTION * { u64 abi; # enum perf_sample_regs_abi * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR * { u64 phys_addr;} && PERF_SAMPLE_PHYS_ADDR + * { u64 size; + * char data[size]; } && PERF_SAMPLE_AUX + * { u64 data_page_size;} && PERF_SAMPLE_DATA_PAGE_SIZE + * { u64 code_page_size;} && PERF_SAMPLE_CODE_PAGE_SIZE * }; */ PERF_RECORD_SAMPLE = 9, @@ -879,10 +1043,20 @@ enum perf_event_type { * u64 addr; * u64 len; * u64 pgoff; - * u32 maj; - * u32 min; - * u64 ino; - * u64 ino_generation; + * union { + * struct { + * u32 maj; + * u32 min; + * u64 ino; + * u64 ino_generation; + * }; + * struct { + * u8 build_id_size; + * u8 __reserved_1; + * u16 __reserved_2; + * u8 build_id[20]; + * }; + * }; * u32 prot, flags; * char filename[]; * struct sample_id sample_id; @@ -1000,12 +1174,60 @@ enum perf_event_type { */ PERF_RECORD_BPF_EVENT = 18, + /* + * struct { + * struct perf_event_header header; + * u64 id; + * char path[]; + * struct sample_id sample_id; + * }; + */ + PERF_RECORD_CGROUP = 19, + + /* + * Records changes to kernel text i.e. self-modified code. 'old_len' is + * the number of old bytes, 'new_len' is the number of new bytes. Either + * 'old_len' or 'new_len' may be zero to indicate, for example, the + * addition or removal of a trampoline. 'bytes' contains the old bytes + * followed immediately by the new bytes. + * + * struct { + * struct perf_event_header header; + * u64 addr; + * u16 old_len; + * u16 new_len; + * u8 bytes[]; + * struct sample_id sample_id; + * }; + */ + PERF_RECORD_TEXT_POKE = 20, + + /* + * Data written to the AUX area by hardware due to aux_output, may need + * to be matched to the event by an architecture-specific hardware ID. + * This records the hardware ID, but requires sample_id to provide the + * event ID. e.g. Intel PT uses this record to disambiguate PEBS-via-PT + * records from multiple events. + * + * struct { + * struct perf_event_header header; + * u64 hw_id; + * struct sample_id sample_id; + * }; + */ + PERF_RECORD_AUX_OUTPUT_HW_ID = 21, + PERF_RECORD_MAX, /* non-ABI */ }; enum perf_record_ksymbol_type { PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0, PERF_RECORD_KSYMBOL_TYPE_BPF = 1, + /* + * Out of line code such as kprobe-replaced instructions or optimized + * kprobes or ftrace trampolines. + */ + PERF_RECORD_KSYMBOL_TYPE_OOL = 2, PERF_RECORD_KSYMBOL_TYPE_MAX /* non-ABI */ }; @@ -1036,10 +1258,15 @@ enum perf_callchain_context { /** * PERF_RECORD_AUX::flags bits */ -#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */ -#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */ -#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */ -#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */ +#define PERF_AUX_FLAG_TRUNCATED 0x01 /* record was truncated to fit */ +#define PERF_AUX_FLAG_OVERWRITE 0x02 /* snapshot from overwrite mode */ +#define PERF_AUX_FLAG_PARTIAL 0x04 /* record contains gaps */ +#define PERF_AUX_FLAG_COLLISION 0x08 /* sample collided with another */ +#define PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK 0xff00 /* PMU specific trace format type */ + +/* CoreSight PMU AUX buffer formats */ +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT 0x0000 /* Default for backward compatibility */ +#define PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW 0x0100 /* Raw format of the source */ #define PERF_FLAG_FD_NO_GROUP (1UL << 0) #define PERF_FLAG_FD_OUTPUT (1UL << 1) @@ -1058,14 +1285,18 @@ union perf_mem_data_src { mem_lvl_num:4, /* memory hierarchy level number */ mem_remote:1, /* remote */ mem_snoopx:2, /* snoop mode, ext */ - mem_rsvd:24; + mem_blk:3, /* access blocked */ + mem_hops:3, /* hop level */ + mem_rsvd:18; }; }; #elif defined(__BIG_ENDIAN_BITFIELD) union perf_mem_data_src { __u64 val; struct { - __u64 mem_rsvd:24, + __u64 mem_rsvd:18, + mem_hops:3, /* hop level */ + mem_blk:3, /* access blocked */ mem_snoopx:2, /* snoop mode, ext */ mem_remote:1, /* remote */ mem_lvl_num:4, /* memory hierarchy level number */ @@ -1088,7 +1319,13 @@ union perf_mem_data_src { #define PERF_MEM_OP_EXEC 0x10 /* code (execution) */ #define PERF_MEM_OP_SHIFT 0 -/* memory hierarchy (memory level, hit or miss) */ +/* + * PERF_MEM_LVL_* namespace being depricated to some extent in the + * favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields. + * Supporting this namespace inorder to not break defined ABIs. + * + * memory hierarchy (memory level, hit or miss) + */ #define PERF_MEM_LVL_NA 0x01 /* not available */ #define PERF_MEM_LVL_HIT 0x02 /* hit level */ #define PERF_MEM_LVL_MISS 0x04 /* miss level */ @@ -1112,7 +1349,10 @@ union perf_mem_data_src { #define PERF_MEM_LVLNUM_L2 0x02 /* L2 */ #define PERF_MEM_LVLNUM_L3 0x03 /* L3 */ #define PERF_MEM_LVLNUM_L4 0x04 /* L4 */ -/* 5-0xa available */ +/* 5-0x7 available */ +#define PERF_MEM_LVLNUM_UNC 0x08 /* Uncached */ +#define PERF_MEM_LVLNUM_CXL 0x09 /* CXL */ +#define PERF_MEM_LVLNUM_IO 0x0a /* I/O */ #define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */ #define PERF_MEM_LVLNUM_LFB 0x0c /* LFB */ #define PERF_MEM_LVLNUM_RAM 0x0d /* RAM */ @@ -1130,7 +1370,7 @@ union perf_mem_data_src { #define PERF_MEM_SNOOP_SHIFT 19 #define PERF_MEM_SNOOPX_FWD 0x01 /* forward */ -/* 1 free */ +#define PERF_MEM_SNOOPX_PEER 0x02 /* xfer from peer */ #define PERF_MEM_SNOOPX_SHIFT 38 /* locked instruction */ @@ -1148,6 +1388,20 @@ union perf_mem_data_src { #define PERF_MEM_TLB_OS 0x40 /* OS fault handler */ #define PERF_MEM_TLB_SHIFT 26 +/* Access blocked */ +#define PERF_MEM_BLK_NA 0x01 /* not available */ +#define PERF_MEM_BLK_DATA 0x02 /* data could not be forwarded */ +#define PERF_MEM_BLK_ADDR 0x04 /* address conflict */ +#define PERF_MEM_BLK_SHIFT 40 + +/* hop level */ +#define PERF_MEM_HOPS_0 0x01 /* remote core, same node */ +#define PERF_MEM_HOPS_1 0x02 /* remote node, same socket */ +#define PERF_MEM_HOPS_2 0x03 /* remote socket, same board */ +#define PERF_MEM_HOPS_3 0x04 /* remote board */ +/* 5-7 available */ +#define PERF_MEM_HOPS_SHIFT 43 + #define PERF_MEM_S(a, s) \ (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) @@ -1166,6 +1420,7 @@ union perf_mem_data_src { * abort: aborting a hardware transaction * cycles: cycles from last branch (or 0 if not supported) * type: branch type + * spec: branch speculation info (or 0 if not supported) */ struct perf_branch_entry { __u64 from; @@ -1176,7 +1431,32 @@ struct perf_branch_entry { abort:1, /* transaction abort */ cycles:16, /* cycle count to last branch */ type:4, /* branch type */ - reserved:40; + spec:2, /* branch speculation info */ + new_type:4, /* additional branch type */ + priv:3, /* privilege level */ + reserved:31; +}; + +/* Size of used info bits in struct perf_branch_entry */ +#define PERF_BRANCH_ENTRY_INFO_BITS_MAX 33 + +union perf_sample_weight { + __u64 full; +#if defined(__LITTLE_ENDIAN_BITFIELD) + struct { + __u32 var1_dw; + __u16 var2_w; + __u16 var3_w; + }; +#elif defined(__BIG_ENDIAN_BITFIELD) + struct { + __u16 var3_w; + __u16 var2_w; + __u32 var1_dw; + }; +#else +#error "Unknown endianness" +#endif }; #endif /* _LINUX_PERF_EVENT_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/prctl.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/prctl.h index aeabb547..370ed14b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/prctl.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/prctl.h @@ -170,7 +170,7 @@ struct prctl_mm_map { * asking selinux for a specific new context (e.g. with runcon) will result * in execve returning -EPERM. * - * See Documentation/prctl/no_new_privs.txt for more details. + * See Documentation/userspace-api/no_new_privs.rst for more details. */ #define PR_SET_NO_NEW_PRIVS 38 #define PR_GET_NO_NEW_PRIVS 39 @@ -181,7 +181,7 @@ struct prctl_mm_map { #define PR_GET_THP_DISABLE 42 /* - * Tell the kernel to start/stop helping userspace manage bounds tables. + * No longer implemented, but left here to ensure the numbers stay reserved: */ #define PR_MPX_ENABLE_MANAGEMENT 43 #define PR_MPX_DISABLE_MANAGEMENT 44 @@ -213,21 +213,97 @@ struct prctl_mm_map { /* Speculation control variants */ # define PR_SPEC_STORE_BYPASS 0 # define PR_SPEC_INDIRECT_BRANCH 1 +# define PR_SPEC_L1D_FLUSH 2 /* Return and control values for PR_SET/GET_SPECULATION_CTRL */ # define PR_SPEC_NOT_AFFECTED 0 # define PR_SPEC_PRCTL (1UL << 0) # define PR_SPEC_ENABLE (1UL << 1) # define PR_SPEC_DISABLE (1UL << 2) # define PR_SPEC_FORCE_DISABLE (1UL << 3) - -/* - * Control the LSM specific peer information - * - * The Ubuntu kernel provides an early preview of LSM Stacking. Use these - * PRCTLs at your own risk. Their values are not guaranteed to be stable in the - * case of colliding with an upstream PRCTL. - */ -#define PR_GET_DISPLAY_LSM 1000000 -#define PR_SET_DISPLAY_LSM 1000001 +# define PR_SPEC_DISABLE_NOEXEC (1UL << 4) + +/* Reset arm64 pointer authentication keys */ +#define PR_PAC_RESET_KEYS 54 +# define PR_PAC_APIAKEY (1UL << 0) +# define PR_PAC_APIBKEY (1UL << 1) +# define PR_PAC_APDAKEY (1UL << 2) +# define PR_PAC_APDBKEY (1UL << 3) +# define PR_PAC_APGAKEY (1UL << 4) + +/* Tagged user address controls for arm64 */ +#define PR_SET_TAGGED_ADDR_CTRL 55 +#define PR_GET_TAGGED_ADDR_CTRL 56 +# define PR_TAGGED_ADDR_ENABLE (1UL << 0) +/* MTE tag check fault modes */ +# define PR_MTE_TCF_NONE 0UL +# define PR_MTE_TCF_SYNC (1UL << 1) +# define PR_MTE_TCF_ASYNC (1UL << 2) +# define PR_MTE_TCF_MASK (PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC) +/* MTE tag inclusion mask */ +# define PR_MTE_TAG_SHIFT 3 +# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) +/* Unused; kept only for source compatibility */ +# define PR_MTE_TCF_SHIFT 1 + +/* Control reclaim behavior when allocating memory */ +#define PR_SET_IO_FLUSHER 57 +#define PR_GET_IO_FLUSHER 58 + +/* Dispatch syscalls to a userspace handler */ +#define PR_SET_SYSCALL_USER_DISPATCH 59 +# define PR_SYS_DISPATCH_OFF 0 +# define PR_SYS_DISPATCH_ON 1 +/* The control values for the user space selector when dispatch is enabled */ +# define SYSCALL_DISPATCH_FILTER_ALLOW 0 +# define SYSCALL_DISPATCH_FILTER_BLOCK 1 + +/* Set/get enabled arm64 pointer authentication keys */ +#define PR_PAC_SET_ENABLED_KEYS 60 +#define PR_PAC_GET_ENABLED_KEYS 61 + +/* Request the scheduler to share a core */ +#define PR_SCHED_CORE 62 +# define PR_SCHED_CORE_GET 0 +# define PR_SCHED_CORE_CREATE 1 /* create unique core_sched cookie */ +# define PR_SCHED_CORE_SHARE_TO 2 /* push core_sched cookie to pid */ +# define PR_SCHED_CORE_SHARE_FROM 3 /* pull core_sched cookie to pid */ +# define PR_SCHED_CORE_MAX 4 +# define PR_SCHED_CORE_SCOPE_THREAD 0 +# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1 +# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2 + +/* arm64 Scalable Matrix Extension controls */ +/* Flag values must be in sync with SVE versions */ +#define PR_SME_SET_VL 63 /* set task vector length */ +# define PR_SME_SET_VL_ONEXEC (1 << 18) /* defer effect until exec */ +#define PR_SME_GET_VL 64 /* get task vector length */ +/* Bits common to PR_SME_SET_VL and PR_SME_GET_VL */ +# define PR_SME_VL_LEN_MASK 0xffff +# define PR_SME_VL_INHERIT (1 << 17) /* inherit across exec */ + +/* Memory deny write / execute */ +#define PR_SET_MDWE 65 +# define PR_MDWE_REFUSE_EXEC_GAIN (1UL << 0) +# define PR_MDWE_NO_INHERIT (1UL << 1) + +#define PR_GET_MDWE 66 + +#define PR_SET_VMA 0x53564d41 +# define PR_SET_VMA_ANON_NAME 0 + +#define PR_GET_AUXV 0x41555856 + +#define PR_SET_MEMORY_MERGE 67 +#define PR_GET_MEMORY_MERGE 68 + +#define PR_RISCV_V_SET_CONTROL 69 +#define PR_RISCV_V_GET_CONTROL 70 +# define PR_RISCV_V_VSTATE_CTRL_DEFAULT 0 +# define PR_RISCV_V_VSTATE_CTRL_OFF 1 +# define PR_RISCV_V_VSTATE_CTRL_ON 2 +# define PR_RISCV_V_VSTATE_CTRL_INHERIT (1 << 4) +# define PR_RISCV_V_VSTATE_CTRL_CUR_MASK 0x3 +# define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK 0xc +# define PR_RISCV_V_VSTATE_CTRL_MASK 0x1f #endif /* _LINUX_PRCTL_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/random.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/random.h index 912ff7bb..cb42c28c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/random.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/random.h @@ -41,16 +41,18 @@ struct rand_pool_info { int entropy_count; int buf_size; - __u32 buf[0]; + __u32 buf[]; }; /* * Flags for getrandom(2) * * GRND_NONBLOCK Don't block and return EAGAIN instead - * GRND_RANDOM Use the /dev/random pool instead of /dev/urandom + * GRND_RANDOM No effect + * GRND_INSECURE Return non-cryptographic random bytes */ #define GRND_NONBLOCK 0x0001 #define GRND_RANDOM 0x0002 +#define GRND_INSECURE 0x0004 #endif /* _LINUX_RANDOM_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/rtnetlink.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/rtnetlink.h new file mode 100644 index 00000000..4e6c8e14 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/rtnetlink.h @@ -0,0 +1,830 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __LINUX_RTNETLINK_H +#define __LINUX_RTNETLINK_H + +#include +#include +#include +#include +#include + +/* rtnetlink families. Values up to 127 are reserved for real address + * families, values above 128 may be used arbitrarily. + */ +#define RTNL_FAMILY_IPMR 128 +#define RTNL_FAMILY_IP6MR 129 +#define RTNL_FAMILY_MAX 129 + +/**** + * Routing/neighbour discovery messages. + ****/ + +/* Types of messages */ + +enum { + RTM_BASE = 16, +#define RTM_BASE RTM_BASE + + RTM_NEWLINK = 16, +#define RTM_NEWLINK RTM_NEWLINK + RTM_DELLINK, +#define RTM_DELLINK RTM_DELLINK + RTM_GETLINK, +#define RTM_GETLINK RTM_GETLINK + RTM_SETLINK, +#define RTM_SETLINK RTM_SETLINK + + RTM_NEWADDR = 20, +#define RTM_NEWADDR RTM_NEWADDR + RTM_DELADDR, +#define RTM_DELADDR RTM_DELADDR + RTM_GETADDR, +#define RTM_GETADDR RTM_GETADDR + + RTM_NEWROUTE = 24, +#define RTM_NEWROUTE RTM_NEWROUTE + RTM_DELROUTE, +#define RTM_DELROUTE RTM_DELROUTE + RTM_GETROUTE, +#define RTM_GETROUTE RTM_GETROUTE + + RTM_NEWNEIGH = 28, +#define RTM_NEWNEIGH RTM_NEWNEIGH + RTM_DELNEIGH, +#define RTM_DELNEIGH RTM_DELNEIGH + RTM_GETNEIGH, +#define RTM_GETNEIGH RTM_GETNEIGH + + RTM_NEWRULE = 32, +#define RTM_NEWRULE RTM_NEWRULE + RTM_DELRULE, +#define RTM_DELRULE RTM_DELRULE + RTM_GETRULE, +#define RTM_GETRULE RTM_GETRULE + + RTM_NEWQDISC = 36, +#define RTM_NEWQDISC RTM_NEWQDISC + RTM_DELQDISC, +#define RTM_DELQDISC RTM_DELQDISC + RTM_GETQDISC, +#define RTM_GETQDISC RTM_GETQDISC + + RTM_NEWTCLASS = 40, +#define RTM_NEWTCLASS RTM_NEWTCLASS + RTM_DELTCLASS, +#define RTM_DELTCLASS RTM_DELTCLASS + RTM_GETTCLASS, +#define RTM_GETTCLASS RTM_GETTCLASS + + RTM_NEWTFILTER = 44, +#define RTM_NEWTFILTER RTM_NEWTFILTER + RTM_DELTFILTER, +#define RTM_DELTFILTER RTM_DELTFILTER + RTM_GETTFILTER, +#define RTM_GETTFILTER RTM_GETTFILTER + + RTM_NEWACTION = 48, +#define RTM_NEWACTION RTM_NEWACTION + RTM_DELACTION, +#define RTM_DELACTION RTM_DELACTION + RTM_GETACTION, +#define RTM_GETACTION RTM_GETACTION + + RTM_NEWPREFIX = 52, +#define RTM_NEWPREFIX RTM_NEWPREFIX + + RTM_GETMULTICAST = 58, +#define RTM_GETMULTICAST RTM_GETMULTICAST + + RTM_GETANYCAST = 62, +#define RTM_GETANYCAST RTM_GETANYCAST + + RTM_NEWNEIGHTBL = 64, +#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL + RTM_GETNEIGHTBL = 66, +#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL + RTM_SETNEIGHTBL, +#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL + + RTM_NEWNDUSEROPT = 68, +#define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT + + RTM_NEWADDRLABEL = 72, +#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL + RTM_DELADDRLABEL, +#define RTM_DELADDRLABEL RTM_DELADDRLABEL + RTM_GETADDRLABEL, +#define RTM_GETADDRLABEL RTM_GETADDRLABEL + + RTM_GETDCB = 78, +#define RTM_GETDCB RTM_GETDCB + RTM_SETDCB, +#define RTM_SETDCB RTM_SETDCB + + RTM_NEWNETCONF = 80, +#define RTM_NEWNETCONF RTM_NEWNETCONF + RTM_DELNETCONF, +#define RTM_DELNETCONF RTM_DELNETCONF + RTM_GETNETCONF = 82, +#define RTM_GETNETCONF RTM_GETNETCONF + + RTM_NEWMDB = 84, +#define RTM_NEWMDB RTM_NEWMDB + RTM_DELMDB = 85, +#define RTM_DELMDB RTM_DELMDB + RTM_GETMDB = 86, +#define RTM_GETMDB RTM_GETMDB + + RTM_NEWNSID = 88, +#define RTM_NEWNSID RTM_NEWNSID + RTM_DELNSID = 89, +#define RTM_DELNSID RTM_DELNSID + RTM_GETNSID = 90, +#define RTM_GETNSID RTM_GETNSID + + RTM_NEWSTATS = 92, +#define RTM_NEWSTATS RTM_NEWSTATS + RTM_GETSTATS = 94, +#define RTM_GETSTATS RTM_GETSTATS + RTM_SETSTATS, +#define RTM_SETSTATS RTM_SETSTATS + + RTM_NEWCACHEREPORT = 96, +#define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT + + RTM_NEWCHAIN = 100, +#define RTM_NEWCHAIN RTM_NEWCHAIN + RTM_DELCHAIN, +#define RTM_DELCHAIN RTM_DELCHAIN + RTM_GETCHAIN, +#define RTM_GETCHAIN RTM_GETCHAIN + + RTM_NEWNEXTHOP = 104, +#define RTM_NEWNEXTHOP RTM_NEWNEXTHOP + RTM_DELNEXTHOP, +#define RTM_DELNEXTHOP RTM_DELNEXTHOP + RTM_GETNEXTHOP, +#define RTM_GETNEXTHOP RTM_GETNEXTHOP + + RTM_NEWLINKPROP = 108, +#define RTM_NEWLINKPROP RTM_NEWLINKPROP + RTM_DELLINKPROP, +#define RTM_DELLINKPROP RTM_DELLINKPROP + RTM_GETLINKPROP, +#define RTM_GETLINKPROP RTM_GETLINKPROP + + RTM_NEWVLAN = 112, +#define RTM_NEWNVLAN RTM_NEWVLAN + RTM_DELVLAN, +#define RTM_DELVLAN RTM_DELVLAN + RTM_GETVLAN, +#define RTM_GETVLAN RTM_GETVLAN + + RTM_NEWNEXTHOPBUCKET = 116, +#define RTM_NEWNEXTHOPBUCKET RTM_NEWNEXTHOPBUCKET + RTM_DELNEXTHOPBUCKET, +#define RTM_DELNEXTHOPBUCKET RTM_DELNEXTHOPBUCKET + RTM_GETNEXTHOPBUCKET, +#define RTM_GETNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET + + RTM_NEWTUNNEL = 120, +#define RTM_NEWTUNNEL RTM_NEWTUNNEL + RTM_DELTUNNEL, +#define RTM_DELTUNNEL RTM_DELTUNNEL + RTM_GETTUNNEL, +#define RTM_GETTUNNEL RTM_GETTUNNEL + + __RTM_MAX, +#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) +}; + +#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE) +#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2) +#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2) + +/* + Generic structure for encapsulation of optional route information. + It is reminiscent of sockaddr, but with sa_family replaced + with attribute type. + */ + +struct rtattr { + unsigned short rta_len; + unsigned short rta_type; +}; + +/* Macros to handle rtattributes */ + +#define RTA_ALIGNTO 4U +#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) +#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ + (rta)->rta_len >= sizeof(struct rtattr) && \ + (rta)->rta_len <= (len)) +#define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ + (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) +#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) +#define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len)) +#define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) +#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) + + + + +/****************************************************************************** + * Definitions used in routing table administration. + ****/ + +struct rtmsg { + unsigned char rtm_family; + unsigned char rtm_dst_len; + unsigned char rtm_src_len; + unsigned char rtm_tos; + + unsigned char rtm_table; /* Routing table id */ + unsigned char rtm_protocol; /* Routing protocol; see below */ + unsigned char rtm_scope; /* See below */ + unsigned char rtm_type; /* See below */ + + unsigned rtm_flags; +}; + +/* rtm_type */ + +enum { + RTN_UNSPEC, + RTN_UNICAST, /* Gateway or direct route */ + RTN_LOCAL, /* Accept locally */ + RTN_BROADCAST, /* Accept locally as broadcast, + send as broadcast */ + RTN_ANYCAST, /* Accept locally as broadcast, + but send as unicast */ + RTN_MULTICAST, /* Multicast route */ + RTN_BLACKHOLE, /* Drop */ + RTN_UNREACHABLE, /* Destination is unreachable */ + RTN_PROHIBIT, /* Administratively prohibited */ + RTN_THROW, /* Not in this table */ + RTN_NAT, /* Translate this address */ + RTN_XRESOLVE, /* Use external resolver */ + __RTN_MAX +}; + +#define RTN_MAX (__RTN_MAX - 1) + + +/* rtm_protocol */ + +#define RTPROT_UNSPEC 0 +#define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects; + not used by current IPv4 */ +#define RTPROT_KERNEL 2 /* Route installed by kernel */ +#define RTPROT_BOOT 3 /* Route installed during boot */ +#define RTPROT_STATIC 4 /* Route installed by administrator */ + +/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel; + they are just passed from user and back as is. + It will be used by hypothetical multiple routing daemons. + Note that protocol values should be standardized in order to + avoid conflicts. + */ + +#define RTPROT_GATED 8 /* Apparently, GateD */ +#define RTPROT_RA 9 /* RDISC/ND router advertisements */ +#define RTPROT_MRT 10 /* Merit MRT */ +#define RTPROT_ZEBRA 11 /* Zebra */ +#define RTPROT_BIRD 12 /* BIRD */ +#define RTPROT_DNROUTED 13 /* DECnet routing daemon */ +#define RTPROT_XORP 14 /* XORP */ +#define RTPROT_NTK 15 /* Netsukuku */ +#define RTPROT_DHCP 16 /* DHCP client */ +#define RTPROT_MROUTED 17 /* Multicast daemon */ +#define RTPROT_KEEPALIVED 18 /* Keepalived daemon */ +#define RTPROT_BABEL 42 /* Babel daemon */ +#define RTPROT_OPENR 99 /* Open Routing (Open/R) Routes */ +#define RTPROT_BGP 186 /* BGP Routes */ +#define RTPROT_ISIS 187 /* ISIS Routes */ +#define RTPROT_OSPF 188 /* OSPF Routes */ +#define RTPROT_RIP 189 /* RIP Routes */ +#define RTPROT_EIGRP 192 /* EIGRP Routes */ + +/* rtm_scope + + Really it is not scope, but sort of distance to the destination. + NOWHERE are reserved for not existing destinations, HOST is our + local addresses, LINK are destinations, located on directly attached + link and UNIVERSE is everywhere in the Universe. + + Intermediate values are also possible f.e. interior routes + could be assigned a value between UNIVERSE and LINK. +*/ + +enum rt_scope_t { + RT_SCOPE_UNIVERSE=0, +/* User defined values */ + RT_SCOPE_SITE=200, + RT_SCOPE_LINK=253, + RT_SCOPE_HOST=254, + RT_SCOPE_NOWHERE=255 +}; + +/* rtm_flags */ + +#define RTM_F_NOTIFY 0x100 /* Notify user of route change */ +#define RTM_F_CLONED 0x200 /* This route is cloned */ +#define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ +#define RTM_F_PREFIX 0x800 /* Prefix addresses */ +#define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */ +#define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */ +#define RTM_F_OFFLOAD 0x4000 /* route is offloaded */ +#define RTM_F_TRAP 0x8000 /* route is trapping packets */ +#define RTM_F_OFFLOAD_FAILED 0x20000000 /* route offload failed, this value + * is chosen to avoid conflicts with + * other flags defined in + * include/uapi/linux/ipv6_route.h + */ + +/* Reserved table identifiers */ + +enum rt_class_t { + RT_TABLE_UNSPEC=0, +/* User defined values */ + RT_TABLE_COMPAT=252, + RT_TABLE_DEFAULT=253, + RT_TABLE_MAIN=254, + RT_TABLE_LOCAL=255, + RT_TABLE_MAX=0xFFFFFFFF +}; + + +/* Routing message attributes */ + +enum rtattr_type_t { + RTA_UNSPEC, + RTA_DST, + RTA_SRC, + RTA_IIF, + RTA_OIF, + RTA_GATEWAY, + RTA_PRIORITY, + RTA_PREFSRC, + RTA_METRICS, + RTA_MULTIPATH, + RTA_PROTOINFO, /* no longer used */ + RTA_FLOW, + RTA_CACHEINFO, + RTA_SESSION, /* no longer used */ + RTA_MP_ALGO, /* no longer used */ + RTA_TABLE, + RTA_MARK, + RTA_MFC_STATS, + RTA_VIA, + RTA_NEWDST, + RTA_PREF, + RTA_ENCAP_TYPE, + RTA_ENCAP, + RTA_EXPIRES, + RTA_PAD, + RTA_UID, + RTA_TTL_PROPAGATE, + RTA_IP_PROTO, + RTA_SPORT, + RTA_DPORT, + RTA_NH_ID, + __RTA_MAX +}; + +#define RTA_MAX (__RTA_MAX - 1) + +#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)))) +#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg)) + +/* RTM_MULTIPATH --- array of struct rtnexthop. + * + * "struct rtnexthop" describes all necessary nexthop information, + * i.e. parameters of path to a destination via this nexthop. + * + * At the moment it is impossible to set different prefsrc, mtu, window + * and rtt for different paths from multipath. + */ + +struct rtnexthop { + unsigned short rtnh_len; + unsigned char rtnh_flags; + unsigned char rtnh_hops; + int rtnh_ifindex; +}; + +/* rtnh_flags */ + +#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ +#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ +#define RTNH_F_ONLINK 4 /* Gateway is forced on link */ +#define RTNH_F_OFFLOAD 8 /* Nexthop is offloaded */ +#define RTNH_F_LINKDOWN 16 /* carrier-down on nexthop */ +#define RTNH_F_UNRESOLVED 32 /* The entry is unresolved (ipmr) */ +#define RTNH_F_TRAP 64 /* Nexthop is trapping packets */ + +#define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | \ + RTNH_F_OFFLOAD | RTNH_F_TRAP) + +/* Macros to handle hexthops */ + +#define RTNH_ALIGNTO 4 +#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) ) +#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ + ((int)(rtnh)->rtnh_len) <= (len)) +#define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) +#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) +#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) +#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) + +/* RTA_VIA */ +struct rtvia { + __kernel_sa_family_t rtvia_family; + __u8 rtvia_addr[]; +}; + +/* RTM_CACHEINFO */ + +struct rta_cacheinfo { + __u32 rta_clntref; + __u32 rta_lastuse; + __s32 rta_expires; + __u32 rta_error; + __u32 rta_used; + +#define RTNETLINK_HAVE_PEERINFO 1 + __u32 rta_id; + __u32 rta_ts; + __u32 rta_tsage; +}; + +/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */ + +enum { + RTAX_UNSPEC, +#define RTAX_UNSPEC RTAX_UNSPEC + RTAX_LOCK, +#define RTAX_LOCK RTAX_LOCK + RTAX_MTU, +#define RTAX_MTU RTAX_MTU + RTAX_WINDOW, +#define RTAX_WINDOW RTAX_WINDOW + RTAX_RTT, +#define RTAX_RTT RTAX_RTT + RTAX_RTTVAR, +#define RTAX_RTTVAR RTAX_RTTVAR + RTAX_SSTHRESH, +#define RTAX_SSTHRESH RTAX_SSTHRESH + RTAX_CWND, +#define RTAX_CWND RTAX_CWND + RTAX_ADVMSS, +#define RTAX_ADVMSS RTAX_ADVMSS + RTAX_REORDERING, +#define RTAX_REORDERING RTAX_REORDERING + RTAX_HOPLIMIT, +#define RTAX_HOPLIMIT RTAX_HOPLIMIT + RTAX_INITCWND, +#define RTAX_INITCWND RTAX_INITCWND + RTAX_FEATURES, +#define RTAX_FEATURES RTAX_FEATURES + RTAX_RTO_MIN, +#define RTAX_RTO_MIN RTAX_RTO_MIN + RTAX_INITRWND, +#define RTAX_INITRWND RTAX_INITRWND + RTAX_QUICKACK, +#define RTAX_QUICKACK RTAX_QUICKACK + RTAX_CC_ALGO, +#define RTAX_CC_ALGO RTAX_CC_ALGO + RTAX_FASTOPEN_NO_COOKIE, +#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE + __RTAX_MAX +}; + +#define RTAX_MAX (__RTAX_MAX - 1) + +#define RTAX_FEATURE_ECN (1 << 0) +#define RTAX_FEATURE_SACK (1 << 1) /* unused */ +#define RTAX_FEATURE_TIMESTAMP (1 << 2) /* unused */ +#define RTAX_FEATURE_ALLFRAG (1 << 3) /* unused */ +#define RTAX_FEATURE_TCP_USEC_TS (1 << 4) + +#define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | \ + RTAX_FEATURE_SACK | \ + RTAX_FEATURE_TIMESTAMP | \ + RTAX_FEATURE_ALLFRAG | \ + RTAX_FEATURE_TCP_USEC_TS) + +struct rta_session { + __u8 proto; + __u8 pad1; + __u16 pad2; + + union { + struct { + __u16 sport; + __u16 dport; + } ports; + + struct { + __u8 type; + __u8 code; + __u16 ident; + } icmpt; + + __u32 spi; + } u; +}; + +struct rta_mfc_stats { + __u64 mfcs_packets; + __u64 mfcs_bytes; + __u64 mfcs_wrong_if; +}; + +/**** + * General form of address family dependent message. + ****/ + +struct rtgenmsg { + unsigned char rtgen_family; +}; + +/***************************************************************** + * Link layer specific messages. + ****/ + +/* struct ifinfomsg + * passes link level specific information, not dependent + * on network protocol. + */ + +struct ifinfomsg { + unsigned char ifi_family; + unsigned char __ifi_pad; + unsigned short ifi_type; /* ARPHRD_* */ + int ifi_index; /* Link index */ + unsigned ifi_flags; /* IFF_* flags */ + unsigned ifi_change; /* IFF_* change mask */ +}; + +/******************************************************************** + * prefix information + ****/ + +struct prefixmsg { + unsigned char prefix_family; + unsigned char prefix_pad1; + unsigned short prefix_pad2; + int prefix_ifindex; + unsigned char prefix_type; + unsigned char prefix_len; + unsigned char prefix_flags; + unsigned char prefix_pad3; +}; + +enum +{ + PREFIX_UNSPEC, + PREFIX_ADDRESS, + PREFIX_CACHEINFO, + __PREFIX_MAX +}; + +#define PREFIX_MAX (__PREFIX_MAX - 1) + +struct prefix_cacheinfo { + __u32 preferred_time; + __u32 valid_time; +}; + + +/***************************************************************** + * Traffic control messages. + ****/ + +struct tcmsg { + unsigned char tcm_family; + unsigned char tcm__pad1; + unsigned short tcm__pad2; + int tcm_ifindex; + __u32 tcm_handle; + __u32 tcm_parent; +/* tcm_block_index is used instead of tcm_parent + * in case tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK + */ +#define tcm_block_index tcm_parent + __u32 tcm_info; +}; + +/* For manipulation of filters in shared block, tcm_ifindex is set to + * TCM_IFINDEX_MAGIC_BLOCK, and tcm_parent is aliased to tcm_block_index + * which is the block index. + */ +#define TCM_IFINDEX_MAGIC_BLOCK (0xFFFFFFFFU) + +enum { + TCA_UNSPEC, + TCA_KIND, + TCA_OPTIONS, + TCA_STATS, + TCA_XSTATS, + TCA_RATE, + TCA_FCNT, + TCA_STATS2, + TCA_STAB, + TCA_PAD, + TCA_DUMP_INVISIBLE, + TCA_CHAIN, + TCA_HW_OFFLOAD, + TCA_INGRESS_BLOCK, + TCA_EGRESS_BLOCK, + TCA_DUMP_FLAGS, + TCA_EXT_WARN_MSG, + __TCA_MAX +}; + +#define TCA_MAX (__TCA_MAX - 1) + +#define TCA_DUMP_FLAGS_TERSE (1 << 0) /* Means that in dump user gets only basic + * data necessary to identify the objects + * (handle, cookie, etc.) and stats. + */ + +#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) +#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) + +/******************************************************************** + * Neighbor Discovery userland options + ****/ + +struct nduseroptmsg { + unsigned char nduseropt_family; + unsigned char nduseropt_pad1; + unsigned short nduseropt_opts_len; /* Total length of options */ + int nduseropt_ifindex; + __u8 nduseropt_icmp_type; + __u8 nduseropt_icmp_code; + unsigned short nduseropt_pad2; + unsigned int nduseropt_pad3; + /* Followed by one or more ND options */ +}; + +enum { + NDUSEROPT_UNSPEC, + NDUSEROPT_SRCADDR, + __NDUSEROPT_MAX +}; + +#define NDUSEROPT_MAX (__NDUSEROPT_MAX - 1) + +/* RTnetlink multicast groups - backwards compatibility for userspace */ +#define RTMGRP_LINK 1 +#define RTMGRP_NOTIFY 2 +#define RTMGRP_NEIGH 4 +#define RTMGRP_TC 8 + +#define RTMGRP_IPV4_IFADDR 0x10 +#define RTMGRP_IPV4_MROUTE 0x20 +#define RTMGRP_IPV4_ROUTE 0x40 +#define RTMGRP_IPV4_RULE 0x80 + +#define RTMGRP_IPV6_IFADDR 0x100 +#define RTMGRP_IPV6_MROUTE 0x200 +#define RTMGRP_IPV6_ROUTE 0x400 +#define RTMGRP_IPV6_IFINFO 0x800 + +#define RTMGRP_DECnet_IFADDR 0x1000 +#define RTMGRP_DECnet_ROUTE 0x4000 + +#define RTMGRP_IPV6_PREFIX 0x20000 + +/* RTnetlink multicast groups */ +enum rtnetlink_groups { + RTNLGRP_NONE, +#define RTNLGRP_NONE RTNLGRP_NONE + RTNLGRP_LINK, +#define RTNLGRP_LINK RTNLGRP_LINK + RTNLGRP_NOTIFY, +#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY + RTNLGRP_NEIGH, +#define RTNLGRP_NEIGH RTNLGRP_NEIGH + RTNLGRP_TC, +#define RTNLGRP_TC RTNLGRP_TC + RTNLGRP_IPV4_IFADDR, +#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR + RTNLGRP_IPV4_MROUTE, +#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE + RTNLGRP_IPV4_ROUTE, +#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE + RTNLGRP_IPV4_RULE, +#define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE + RTNLGRP_IPV6_IFADDR, +#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR + RTNLGRP_IPV6_MROUTE, +#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE + RTNLGRP_IPV6_ROUTE, +#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE + RTNLGRP_IPV6_IFINFO, +#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO + RTNLGRP_DECnet_IFADDR, +#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR + RTNLGRP_NOP2, + RTNLGRP_DECnet_ROUTE, +#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE + RTNLGRP_DECnet_RULE, +#define RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE + RTNLGRP_NOP4, + RTNLGRP_IPV6_PREFIX, +#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX + RTNLGRP_IPV6_RULE, +#define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE + RTNLGRP_ND_USEROPT, +#define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT + RTNLGRP_PHONET_IFADDR, +#define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR + RTNLGRP_PHONET_ROUTE, +#define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE + RTNLGRP_DCB, +#define RTNLGRP_DCB RTNLGRP_DCB + RTNLGRP_IPV4_NETCONF, +#define RTNLGRP_IPV4_NETCONF RTNLGRP_IPV4_NETCONF + RTNLGRP_IPV6_NETCONF, +#define RTNLGRP_IPV6_NETCONF RTNLGRP_IPV6_NETCONF + RTNLGRP_MDB, +#define RTNLGRP_MDB RTNLGRP_MDB + RTNLGRP_MPLS_ROUTE, +#define RTNLGRP_MPLS_ROUTE RTNLGRP_MPLS_ROUTE + RTNLGRP_NSID, +#define RTNLGRP_NSID RTNLGRP_NSID + RTNLGRP_MPLS_NETCONF, +#define RTNLGRP_MPLS_NETCONF RTNLGRP_MPLS_NETCONF + RTNLGRP_IPV4_MROUTE_R, +#define RTNLGRP_IPV4_MROUTE_R RTNLGRP_IPV4_MROUTE_R + RTNLGRP_IPV6_MROUTE_R, +#define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R + RTNLGRP_NEXTHOP, +#define RTNLGRP_NEXTHOP RTNLGRP_NEXTHOP + RTNLGRP_BRVLAN, +#define RTNLGRP_BRVLAN RTNLGRP_BRVLAN + RTNLGRP_MCTP_IFADDR, +#define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR + RTNLGRP_TUNNEL, +#define RTNLGRP_TUNNEL RTNLGRP_TUNNEL + RTNLGRP_STATS, +#define RTNLGRP_STATS RTNLGRP_STATS + __RTNLGRP_MAX +}; +#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) + +/* TC action piece */ +struct tcamsg { + unsigned char tca_family; + unsigned char tca__pad1; + unsigned short tca__pad2; +}; + +enum { + TCA_ROOT_UNSPEC, + TCA_ROOT_TAB, +#define TCA_ACT_TAB TCA_ROOT_TAB +#define TCAA_MAX TCA_ROOT_TAB + TCA_ROOT_FLAGS, + TCA_ROOT_COUNT, + TCA_ROOT_TIME_DELTA, /* in msecs */ + TCA_ROOT_EXT_WARN_MSG, + __TCA_ROOT_MAX, +#define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1) +}; + +#define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) +#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) +/* tcamsg flags stored in attribute TCA_ROOT_FLAGS + * + * TCA_ACT_FLAG_LARGE_DUMP_ON user->kernel to request for larger than + * TCA_ACT_MAX_PRIO actions in a dump. All dump responses will contain the + * number of actions being dumped stored in for user app's consumption in + * TCA_ROOT_COUNT + * + * TCA_ACT_FLAG_TERSE_DUMP user->kernel to request terse (brief) dump that only + * includes essential action info (kind, index, etc.) + * + */ +#define TCA_FLAG_LARGE_DUMP_ON (1 << 0) +#define TCA_ACT_FLAG_LARGE_DUMP_ON TCA_FLAG_LARGE_DUMP_ON +#define TCA_ACT_FLAG_TERSE_DUMP (1 << 1) + +/* New extended info filters for IFLA_EXT_MASK */ +#define RTEXT_FILTER_VF (1 << 0) +#define RTEXT_FILTER_BRVLAN (1 << 1) +#define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2) +#define RTEXT_FILTER_SKIP_STATS (1 << 3) +#define RTEXT_FILTER_MRP (1 << 4) +#define RTEXT_FILTER_CFM_CONFIG (1 << 5) +#define RTEXT_FILTER_CFM_STATUS (1 << 6) +#define RTEXT_FILTER_MST (1 << 7) + +/* End of information exported to user level */ + + + +#endif /* __LINUX_RTNETLINK_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/socket.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/socket.h index 268b9482..89c227f3 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/socket.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/socket.h @@ -6,17 +6,33 @@ * Desired design of maximum size and alignment (see RFC2553) */ #define _K_SS_MAXSIZE 128 /* Implementation specific max size */ -#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) - /* Implementation specific desired alignment */ typedef unsigned short __kernel_sa_family_t; +/* + * The definition uses anonymous union and struct in order to control the + * default alignment. + */ struct __kernel_sockaddr_storage { - __kernel_sa_family_t ss_family; /* address family */ - /* Following field(s) are implementation specific */ - char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; + union { + struct { + __kernel_sa_family_t ss_family; /* address family */ + /* Following field(s) are implementation specific */ + char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; /* space to achieve desired size, */ /* _SS_MAXSIZE value minus size of ss_family */ -} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ + }; + void *__align; /* implementation specific desired alignment */ + }; +}; + +#define SOCK_SNDBUF_LOCK 1 +#define SOCK_RCVBUF_LOCK 2 + +#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK) + +#define SOCK_TXREHASH_DEFAULT 255 +#define SOCK_TXREHASH_DISABLED 0 +#define SOCK_TXREHASH_ENABLED 1 #endif /* _LINUX_SOCKET_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/stddef.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/stddef.h index 23e025fe..bf9749dd 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/stddef.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/stddef.h @@ -1,6 +1,58 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _LINUX_STDDEF_H +#define _LINUX_STDDEF_H + #ifndef __always_inline #define __always_inline __inline__ #endif + +/** + * __struct_group() - Create a mirrored named and anonyomous struct + * + * @TAG: The tag name for the named sub-struct (usually empty) + * @NAME: The identifier name of the mirrored sub-struct + * @ATTRS: Any struct attributes (usually empty) + * @MEMBERS: The member declarations for the mirrored structs + * + * Used to create an anonymous union of two structs with identical layout + * and size: one anonymous and one named. The former's members can be used + * normally without sub-struct naming, and the latter can be used to + * reason about the start, end, and size of the group of struct members. + * The named struct can also be explicitly tagged for layer reuse, as well + * as both having struct attributes appended. + */ +#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \ + union { \ + struct { MEMBERS } ATTRS; \ + struct TAG { MEMBERS } ATTRS NAME; \ + } ATTRS + +#ifdef __cplusplus +/* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */ +#define __DECLARE_FLEX_ARRAY(T, member) \ + T member[0] +#else +/** + * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union + * + * @TYPE: The type of each flexible array element + * @NAME: The name of the flexible array member + * + * In order to have a flexible array member in a union or alone in a + * struct, it needs to be wrapped in an anonymous struct with at least 1 + * named member, but that member can be empty. + */ +#define __DECLARE_FLEX_ARRAY(TYPE, NAME) \ + struct { \ + struct { } __empty_ ## NAME; \ + TYPE NAME[]; \ + } +#endif + +#ifndef __counted_by +#define __counted_by(m) +#endif + +#endif /* _LINUX_STDDEF_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/swab.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/swab.h index afb7eb73..7e3bad56 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/swab.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/swab.h @@ -3,7 +3,8 @@ #define _LINUX_SWAB_H #include - +#include +#include #include /* @@ -101,7 +102,7 @@ static __inline__ __u32 __fswahb32(__u32 val) #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) #else #define __swab16(x) \ - (__builtin_constant_p((__u16)(x)) ? \ + (__u16)(__builtin_constant_p(x) ? \ ___constant_swab16(x) : \ __fswab16(x)) #endif @@ -114,7 +115,7 @@ static __inline__ __u32 __fswahb32(__u32 val) #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) #else #define __swab32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ + (__u32)(__builtin_constant_p(x) ? \ ___constant_swab32(x) : \ __fswab32(x)) #endif @@ -127,11 +128,20 @@ static __inline__ __u32 __fswahb32(__u32 val) #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x)) #else #define __swab64(x) \ - (__builtin_constant_p((__u64)(x)) ? \ + (__u64)(__builtin_constant_p(x) ? \ ___constant_swab64(x) : \ __fswab64(x)) #endif +static __always_inline unsigned long __swab(const unsigned long y) +{ +#if __BITS_PER_LONG == 64 + return __swab64(y); +#else /* __BITS_PER_LONG == 32 */ + return __swab32(y); +#endif +} + /** * __swahw32 - return a word-swapped 32-bit value * @x: value to wordswap diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/taskstats.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/taskstats.h index b7aa7bb2..b50b2eb2 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/taskstats.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/taskstats.h @@ -34,7 +34,7 @@ */ -#define TASKSTATS_VERSION 8 +#define TASKSTATS_VERSION 14 #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN * in linux/sched.h */ @@ -48,7 +48,8 @@ struct taskstats { __u32 ac_exitcode; /* Exit status */ /* The accounting flags of a task as defined in - * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG. + * Defined values are AFORK, ASU, ACOMPAT, ACORE, AXSIG, and AGROUP. + * (AGROUP since version 12). */ __u8 ac_flag; /* Record flags */ __u8 ac_nice; /* task_nice */ @@ -112,6 +113,7 @@ struct taskstats { __u32 ac_gid; /* Group ID */ __u32 ac_pid; /* Process ID */ __u32 ac_ppid; /* Parent process ID */ + /* __u32 range means times from 1970 to 2106 */ __u32 ac_btime; /* Begin time [sec since 1970] */ __u64 ac_etime __attribute__((aligned(8))); /* Elapsed time [usec] */ @@ -164,6 +166,42 @@ struct taskstats { /* Delay waiting for memory reclaim */ __u64 freepages_count; __u64 freepages_delay_total; + + /* Delay waiting for thrashing page */ + __u64 thrashing_count; + __u64 thrashing_delay_total; + + /* v10: 64-bit btime to avoid overflow */ + __u64 ac_btime64; /* 64-bit begin time */ + + /* v11: Delay waiting for memory compact */ + __u64 compact_count; + __u64 compact_delay_total; + + /* v12 begin */ + __u32 ac_tgid; /* thread group ID */ + /* Thread group walltime up to now. This is total process walltime if + * AGROUP flag is set. + */ + __u64 ac_tgetime __attribute__((aligned(8))); + /* Lightweight information to identify process binary files. + * This leaves userspace to match this to a file system path, using + * MAJOR() and MINOR() macros to identify a device and mount point, + * the inode to identify the executable file. This is /proc/self/exe + * at the end, so matching the most recent exec(). Values are zero + * for kernel threads. + */ + __u64 ac_exe_dev; /* program binary device ID */ + __u64 ac_exe_inode; /* program binary inode number */ + /* v12 end */ + + /* v13: Delay waiting for write-protect copy */ + __u64 wpcopy_count; + __u64 wpcopy_delay_total; + + /* v14: Delay waiting for IRQ/SOFTIRQ */ + __u64 irq_count; + __u64 irq_delay_total; }; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/time_types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/time_types.h new file mode 100644 index 00000000..0cddb22e --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/time_types.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _LINUX_TIME_TYPES_H +#define _LINUX_TIME_TYPES_H + +#include + +struct __kernel_timespec { + __kernel_time64_t tv_sec; /* seconds */ + long long tv_nsec; /* nanoseconds */ +}; + +struct __kernel_itimerspec { + struct __kernel_timespec it_interval; /* timer period */ + struct __kernel_timespec it_value; /* timer expiration */ +}; + +/* + * legacy timeval structure, only embedded in structures that + * traditionally used 'timeval' to pass time intervals (not absolute + * times). Do not add new users. If user space fails to compile + * here, this is probably because it is not y2038 safe and needs to + * be changed to use another interface. + */ +#ifndef __kernel_old_timeval +struct __kernel_old_timeval { + __kernel_long_t tv_sec; + __kernel_long_t tv_usec; +}; +#endif + +struct __kernel_old_timespec { + __kernel_old_time_t tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; + +struct __kernel_old_itimerval { + struct __kernel_old_timeval it_interval;/* timer interval */ + struct __kernel_old_timeval it_value; /* current value */ +}; + +struct __kernel_sock_timeval { + __s64 tv_sec; + __s64 tv_usec; +}; + +#endif /* _LINUX_TIME_TYPES_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/types.h index b1c10874..e6700138 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/types.h @@ -8,18 +8,25 @@ #include +#ifdef __SIZEOF_INT128__ +typedef __signed__ __int128 __s128 __attribute__((aligned(16))); +typedef unsigned __int128 __u128 __attribute__((aligned(16))); +#endif /* * Below are truly Linux-specific types that should never collide with * any application/library that wants linux/types.h. */ +/* sparse defines __CHECKER__; see Documentation/dev-tools/sparse.rst */ #ifdef __CHECKER__ -#define __bitwise__ __attribute__((bitwise)) +#define __bitwise __attribute__((bitwise)) #else -#define __bitwise__ +#define __bitwise #endif -#define __bitwise __bitwise__ + +/* The kernel doesn't use this legacy form, but user space does */ +#define __bitwise__ __bitwise typedef __u16 __bitwise __le16; typedef __u16 __bitwise __be16; @@ -44,5 +51,7 @@ typedef __u32 __bitwise __wsum; #define __aligned_be64 __be64 __attribute__((aligned(8))) #define __aligned_le64 __le64 __attribute__((aligned(8))) +typedef unsigned __bitwise __poll_t; + #endif /* __ASSEMBLY__ */ #endif /* _LINUX_TYPES_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/version.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/version.h index 129d23aa..7035da9e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/version.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/linux/version.h @@ -1,2 +1,5 @@ -#define LINUX_VERSION_CODE 266002 -#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +#define LINUX_VERSION_CODE 395272 +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) +#define LINUX_VERSION_MAJOR 6 +#define LINUX_VERSION_PATCHLEVEL 8 +#define LINUX_VERSION_SUBLEVEL 8 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/locale.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/locale.h index 88781df9..65eb2879 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/locale.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/locale.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.11 Localization diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/malloc.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/malloc.h index 3e7c447b..16a5e54d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/malloc.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/malloc.h @@ -1,5 +1,6 @@ /* Prototypes and definition for malloc implementation. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 Free Software Foundation, Inc. + Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MALLOC_H #define _MALLOC_H 1 @@ -35,11 +36,12 @@ __BEGIN_DECLS /* Allocate SIZE bytes of memory. */ -extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur; +extern void *malloc (size_t __size) __THROW __attribute_malloc__ + __attribute_alloc_size__ ((1)) __wur; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) -__THROW __attribute_malloc__ __wur; +__THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur; /* Re-allocate the previously allocated block in __ptr, making the new block SIZE bytes long. */ @@ -47,7 +49,7 @@ __THROW __attribute_malloc__ __wur; the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) -__THROW __attribute_warn_unused_result__; +__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2)); /* Re-allocate the previously allocated block in PTR, making the new block large enough for NMEMB elements of SIZE bytes each. */ @@ -55,29 +57,25 @@ __THROW __attribute_warn_unused_result__; 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__; + __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__ __wur; + __THROW __attribute_malloc__ __attribute_alloc_align__ ((1)) + __attribute_alloc_size__ ((2)) __wur __attr_dealloc_free; /* Allocate SIZE bytes on a page boundary. */ -extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; +extern void *valloc (size_t __size) __THROW __attribute_malloc__ + __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); - -/* Default value of `__morecore'. */ -extern void *__default_morecore (ptrdiff_t __size) -__THROW __attribute_malloc__; +extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ + __wur __attr_dealloc_free; /* SVID2/XPG mallinfo structure */ @@ -95,8 +93,28 @@ struct mallinfo int keepcost; /* top-most, releasable (via malloc_trim) space */ }; +/* SVID2/XPG mallinfo2 structure which can handle allocations + bigger than 4GB. */ + +struct mallinfo2 +{ + size_t arena; /* non-mmapped space allocated from system */ + size_t ordblks; /* number of free chunks */ + size_t smblks; /* number of fastbin blocks */ + size_t hblks; /* number of mmapped regions */ + size_t hblkhd; /* space in mmapped regions */ + size_t usmblks; /* always 0, preserved for backwards compatibility */ + size_t fsmblks; /* space available in freed fastbin blocks */ + size_t uordblks; /* total allocated space */ + size_t fordblks; /* total free space */ + size_t keepcost; /* top-most, releasable (via malloc_trim) space */ +}; + +/* Returns a copy of the updated current mallinfo. */ +extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED; + /* Returns a copy of the updated current mallinfo. */ -extern struct mallinfo mallinfo (void) __THROW; +extern struct mallinfo2 mallinfo2 (void) __THROW; /* SVID2/XPG mallopt options */ #ifndef M_MXFAST @@ -139,26 +157,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); - -/* Activate a standard set of debugging hooks. */ -extern void __malloc_check_init (void) __THROW __MALLOC_DEPRECATED; - - __END_DECLS #endif /* malloc.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/math.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/math.h index 3c515f81..a1631a8c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/math.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/math.h @@ -1,5 +1,5 @@ /* Declarations for math functions. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.12 Mathematics @@ -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 @@ -200,7 +214,7 @@ typedef _Float128x double_t; # define FP_ILOGBNAN 2147483647 # endif #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # if __WORDSIZE == 32 # define __FP_LONG_MAX 0x7fffffffL # else @@ -232,7 +246,7 @@ typedef _Float128x double_t; #include -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Rounding direction macros for fromfp functions. */ enum { @@ -279,8 +293,17 @@ enum #define __MATHDECLX(type, function,suffix, args, attrib) \ __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \ __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) -#define __MATHDECL_1(type, function,suffix, args) \ +#define __MATHDECL_1_IMPL(type, function, suffix, args) \ extern type __MATH_PRECNAME(function,suffix) args __THROW +#define __MATHDECL_1(type, function, suffix, args) \ + __MATHDECL_1_IMPL(type, function, suffix, args) +/* Ignore the alias by default. The alias is only useful with + redirections. */ +#define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ + __MATHDECL_1(type, function, suffix, args) + +#define __MATHREDIR(type, function, suffix, args, to) \ + extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to) #define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) @@ -331,11 +354,37 @@ extern long double __REDIRECT_NTH (nexttowardl, # endif # undef __MATHDECL_1 -# define __MATHDECL_2(type, function,suffix, args, alias) \ - extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \ - args, alias) # define __MATHDECL_1(type, function,suffix, args) \ - __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix)) + __MATHREDIR(type, function, suffix, args, __CONCAT(function,suffix)) + +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# ifdef __REDIRECT_NTH +# ifdef __USE_ISOC99 +extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y), + __nexttowardf_to_ieee128) + __attribute__ ((__const__)); +extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y), + __nexttoward_to_ieee128) + __attribute__ ((__const__)); + +#define __dremieee128 __remainderieee128 +#define __gammaieee128 __lgammaieee128 + +# endif +# endif + +# undef __MATHDECL_1 +# undef __MATHDECL_ALIAS + +# define __REDIRTO(function, suffix) \ + __ ## function ## ieee128 ## suffix +# define __REDIRTO_ALT(function, suffix) \ + __ ## function ## f128 ## suffix + +# define __MATHDECL_1(type, function, suffix, args) \ + __MATHREDIR (type, function, suffix, args, __REDIRTO (function, suffix)) +# define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ + __MATHREDIR (type, function, suffix, args, __REDIRTO_ALT (alias, suffix)) # endif /* Include the file of declarations again, this time using `long double' @@ -348,11 +397,23 @@ extern long double __REDIRECT_NTH (nexttowardl, # define __MATH_DECLARE_LDOUBLE 1 # include # include + # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# undef __REDIRTO +# undef __REDIRTO_ALT +# undef __MATHDECL_1 +# undef __MATHDECL_ALIAS +# define __MATHDECL_1(type, function, suffix, args) \ + __MATHDECL_1_IMPL(type, function, suffix, args) +# define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ + __MATHDECL_1(type, function, suffix, args) +# endif # endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */ #endif /* Use ISO C99. */ @@ -479,10 +540,314 @@ extern long double __REDIRECT_NTH (nexttowardl, # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC). */ +#undef __MATHDECL_1_IMPL #undef __MATHDECL_1 +#undef __MATHDECL_ALIAS #undef __MATHDECL #undef __MATHCALL +/* Declare functions returning a narrower type. */ +#define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x) +#define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y) +#define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z) +#define __MATHCALL_NARROW_NORMAL(func, nargs) \ + extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW +#define __MATHCALL_NARROW_REDIR(func, redir, nargs) \ + extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, \ + redir) +#define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_NORMAL (func, nargs) + +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) + +# define _Mret_ float +# define _Marg_ double +# define __MATHCALL_NAME(name) f ## name +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME + +# define _Mret_ float +# define _Marg_ long double +# define __MATHCALL_NAME(name) f ## name ## l +# ifdef __LDBL_COMPAT +# define __MATHCALL_REDIR_NAME(name) f ## name +# define __MATHCALL_REDIR_NAME2(name) f ## name +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_REDIR (func, redir, nargs) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# define __MATHCALL_REDIR_NAME(name) __ ## f32 ## name ## ieee128 +# define __MATHCALL_REDIR_NAME2(name) __ ## f32 ## name ## ieee128 +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_REDIR (func, redir, nargs) +# endif +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# undef __MATHCALL_REDIR_NAME +# undef __MATHCALL_REDIR_NAME2 +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_NORMAL (func, nargs) +# endif + +# define _Mret_ double +# define _Marg_ long double +# define __MATHCALL_NAME(name) d ## name ## l +# ifdef __LDBL_COMPAT +# define __MATHCALL_REDIR_NAME(name) __nldbl_d ## name ## l +# define __MATHCALL_REDIR_NAME2(name) name +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_REDIR (func, redir, nargs) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# define __MATHCALL_REDIR_NAME(name) __ ## f64 ## name ## ieee128 +# define __MATHCALL_REDIR_NAME2(name) __ ## f64 ## name ## ieee128 +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_REDIR (func, redir, nargs) +# endif +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# undef __MATHCALL_REDIR_NAME +# undef __MATHCALL_REDIR_NAME2 +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_NORMAL (func, nargs) +# endif + +#endif + +#if __GLIBC_USE (IEC_60559_TYPES_EXT) + +# if __HAVE_FLOAT16 && __HAVE_FLOAT32 +# define _Mret_ _Float16 +# define _Marg_ _Float32 +# define __MATHCALL_NAME(name) f16 ## name ## f32 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT16 && __HAVE_FLOAT32X +# define _Mret_ _Float16 +# define _Marg_ _Float32x +# define __MATHCALL_NAME(name) f16 ## name ## f32x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT16 && __HAVE_FLOAT64 +# define _Mret_ _Float16 +# define _Marg_ _Float64 +# define __MATHCALL_NAME(name) f16 ## name ## f64 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT16 && __HAVE_FLOAT64X +# define _Mret_ _Float16 +# define _Marg_ _Float64x +# define __MATHCALL_NAME(name) f16 ## name ## f64x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT16 && __HAVE_FLOAT128 +# define _Mret_ _Float16 +# define _Marg_ _Float128 +# define __MATHCALL_NAME(name) f16 ## name ## f128 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT16 && __HAVE_FLOAT128X +# define _Mret_ _Float16 +# define _Marg_ _Float128x +# define __MATHCALL_NAME(name) f16 ## name ## f128x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32 && __HAVE_FLOAT32X +# define _Mret_ _Float32 +# define _Marg_ _Float32x +# define __MATHCALL_NAME(name) f32 ## name ## f32x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32 && __HAVE_FLOAT64 +# define _Mret_ _Float32 +# define _Marg_ _Float64 +# define __MATHCALL_NAME(name) f32 ## name ## f64 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32 && __HAVE_FLOAT64X +# define _Mret_ _Float32 +# define _Marg_ _Float64x +# define __MATHCALL_NAME(name) f32 ## name ## f64x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32 && __HAVE_FLOAT128 +# define _Mret_ _Float32 +# define _Marg_ _Float128 +# define __MATHCALL_NAME(name) f32 ## name ## f128 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32 && __HAVE_FLOAT128X +# define _Mret_ _Float32 +# define _Marg_ _Float128x +# define __MATHCALL_NAME(name) f32 ## name ## f128x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32X && __HAVE_FLOAT64 +# define _Mret_ _Float32x +# define _Marg_ _Float64 +# define __MATHCALL_NAME(name) f32x ## name ## f64 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32X && __HAVE_FLOAT64X +# define _Mret_ _Float32x +# define _Marg_ _Float64x +# define __MATHCALL_NAME(name) f32x ## name ## f64x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32X && __HAVE_FLOAT128 +# define _Mret_ _Float32x +# define _Marg_ _Float128 +# define __MATHCALL_NAME(name) f32x ## name ## f128 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT32X && __HAVE_FLOAT128X +# define _Mret_ _Float32x +# define _Marg_ _Float128x +# define __MATHCALL_NAME(name) f32x ## name ## f128x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT64 && __HAVE_FLOAT64X +# define _Mret_ _Float64 +# define _Marg_ _Float64x +# define __MATHCALL_NAME(name) f64 ## name ## f64x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT64 && __HAVE_FLOAT128 +# define _Mret_ _Float64 +# define _Marg_ _Float128 +# define __MATHCALL_NAME(name) f64 ## name ## f128 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT64 && __HAVE_FLOAT128X +# define _Mret_ _Float64 +# define _Marg_ _Float128x +# define __MATHCALL_NAME(name) f64 ## name ## f128x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT64X && __HAVE_FLOAT128 +# define _Mret_ _Float64x +# define _Marg_ _Float128 +# define __MATHCALL_NAME(name) f64x ## name ## f128 +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT64X && __HAVE_FLOAT128X +# define _Mret_ _Float64x +# define _Marg_ _Float128x +# define __MATHCALL_NAME(name) f64x ## name ## f128x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +# if __HAVE_FLOAT128 && __HAVE_FLOAT128X +# define _Mret_ _Float128 +# define _Marg_ _Float128x +# define __MATHCALL_NAME(name) f128 ## name ## f128x +# include +# undef _Mret_ +# undef _Marg_ +# undef __MATHCALL_NAME +# endif + +#endif + +#undef __MATHCALL_NARROW_ARGS_1 +#undef __MATHCALL_NARROW_ARGS_2 +#undef __MATHCALL_NARROW_ARGS_3 +#undef __MATHCALL_NARROW_NORMAL +#undef __MATHCALL_NARROW_REDIR +#undef __MATHCALL_NARROW #if defined __USE_MISC || defined __USE_XOPEN /* This variable is used by `gamma' and `lgamma'. */ @@ -590,7 +955,8 @@ enum the __SUPPORT_SNAN__ check may be skipped for those versions. */ /* Return number of classification appropriate for X. */ -# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ \ +# if ((__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ + || __glibc_clang_prereq (2,8)) \ && (!defined __OPTIMIZE_SIZE__ || defined __cplusplus) /* The check for __cplusplus allows the use of the builtin, even when optimization for size is on. This is provided for @@ -605,7 +971,7 @@ enum # endif /* Return nonzero value if sign of X is negative. */ -# if __GNUC_PREREQ (6,0) +# if __GNUC_PREREQ (6,0) || __glibc_clang_prereq (3,3) # define signbit(x) __builtin_signbit (x) # elif defined __cplusplus /* In C++ mode, __MATH_TG cannot be used, because it relies on @@ -623,14 +989,16 @@ enum # endif /* Return nonzero value if X is not +-Inf or NaN. */ -# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ +# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ + || __glibc_clang_prereq (2,8) # define isfinite(x) __builtin_isfinite (x) # else # define isfinite(x) __MATH_TG ((x), __finite, (x)) # endif /* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */ -# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ +# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ + || __glibc_clang_prereq (2,8) # define isnormal(x) __builtin_isnormal (x) # else # define isnormal(x) (fpclassify (x) == FP_NORMAL) @@ -638,7 +1006,8 @@ enum /* Return nonzero value if X is a NaN. We could use `fpclassify' but we already have this functions `__isnan' and it is faster. */ -# if __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ +# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ + || __glibc_clang_prereq (2,8) # define isnan(x) __builtin_isnan (x) # else # define isnan(x) __MATH_TG ((x), __isnan, (x)) @@ -646,7 +1015,8 @@ enum /* Return nonzero value if X is positive or negative infinity. */ # if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \ - && !defined __SUPPORT_SNAN__ && !defined __cplusplus + && !defined __SUPPORT_SNAN__ && !defined __cplusplus \ + && !defined __clang__ /* Since __builtin_isinf_sign is broken for float128 before GCC 7.0, use the helper function, __isinff128, with older compilers. This is only provided for C mode, because in C++ mode, GCC has no support @@ -655,7 +1025,8 @@ enum # define isinf(x) \ (__builtin_types_compatible_p (__typeof (x), _Float128) \ ? __isinff128 (x) : __builtin_isinf_sign (x)) -# elif __GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__ +# elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ + || __glibc_clang_prereq (3,7) # define isinf(x) __builtin_isinf_sign (x) # else # define isinf(x) __MATH_TG ((x), __isinf, (x)) @@ -680,7 +1051,7 @@ enum #endif /* Use ISO C99. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # include /* Return nonzero value if X is a signaling NaN. */ @@ -705,7 +1076,9 @@ issignaling (long double __val) return __issignalingl (__val); # endif } -# if __HAVE_DISTINCT_FLOAT128 +# if __HAVE_FLOAT128_UNLIKE_LDBL +/* When using an IEEE 128-bit long double, _Float128 is defined as long double + in C++. */ inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); } # endif } /* extern C++ */ @@ -743,7 +1116,9 @@ iszero (long double __val) return __fpclassifyl (__val) == FP_ZERO; # endif } -# if __HAVE_DISTINCT_FLOAT128 +# if __HAVE_FLOAT128_UNLIKE_LDBL + /* When using an IEEE 128-bit long double, _Float128 is defined as long double + in C++. */ inline int iszero (_Float128 __val) { @@ -784,6 +1159,23 @@ iszero (__T __val) # define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #endif +/* GNU extension to provide float constants with similar names. */ +#ifdef __USE_GNU +# define M_Ef 2.7182818284590452354f /* e */ +# define M_LOG2Ef 1.4426950408889634074f /* log_2 e */ +# define M_LOG10Ef 0.43429448190325182765f /* log_10 e */ +# define M_LN2f 0.69314718055994530942f /* log_e 2 */ +# define M_LN10f 2.30258509299404568402f /* log_e 10 */ +# define M_PIf 3.14159265358979323846f /* pi */ +# define M_PI_2f 1.57079632679489661923f /* pi/2 */ +# define M_PI_4f 0.78539816339744830962f /* pi/4 */ +# define M_1_PIf 0.31830988618379067154f /* 1/pi */ +# define M_2_PIf 0.63661977236758134308f /* 2/pi */ +# define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */ +# define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */ +# define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */ +#endif + /* The above constants are not adequate for computation using `long double's. Therefore we provide as an extension constants with similar names as a GNU extension. Provide enough digits for the 128-bit IEEE quad. */ @@ -903,13 +1295,6 @@ iszero (__T __val) # error "M_* values needed for _Float128x" #endif -/* When compiling in strict ISO C compatible mode we must not use the - inline functions since they, among other things, do not set the - `errno' variable correctly. */ -#if defined __STRICT_ANSI__ && !defined __NO_MATH_INLINES -# define __NO_MATH_INLINES 1 -#endif - #ifdef __USE_ISOC99 # if __GNUC_PREREQ (3, 1) /* ISO C99 defines some macros to compare number while taking care for @@ -917,7 +1302,7 @@ iszero (__T __val) these operations. Generic support in GCC for these as builtins went in 2.97, but not all cpus added their patterns until 3.1. Therefore we enable the builtins from 3.1 onwards and use a generic implementation - othwerwise. */ + otherwise. */ # define isgreater(x, y) __builtin_isgreater(x, y) # define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) # define isless(x, y) __builtin_isless(x, y) @@ -947,233 +1332,7 @@ iszero (__T __val) # endif #endif -/* Get machine-dependent inline versions (if there are any). */ -#ifdef __USE_EXTERN_INLINES -# include -#endif - -/* Define special entry points to use when the compiler got told to - only expect finite results. */ -#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 - -/* Include bits/math-finite.h for double. */ -# define _Mdouble_ double -# define __MATH_DECLARING_DOUBLE 1 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## reentrant -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X - -/* When __USE_ISOC99 is defined, include math-finite for float and - long double, as well. */ -# ifdef __USE_ISOC99 - -/* Include bits/math-finite.h for float. */ -# define _Mdouble_ float -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## f ## reentrant -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f ## reentrant ## _finite -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X - -/* Include bits/math-finite.h for long double. */ -# ifdef __MATH_DECLARE_LDOUBLE -# define _Mdouble_ long double -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 0 -# define __REDIRFROM_X(function, reentrant) \ - function ## l ## reentrant -# ifdef __NO_LONG_DOUBLE_MATH -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# endif /* __USE_ISOC99. */ - -/* Include bits/math-finite.h for _FloatN and _FloatNx. */ - -# if (__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float16 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f16 ## reentrant -# if __HAVE_DISTINCT_FLOAT16 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f16 ## reentrant ## _finite -# else -# error "non-disinct _Float16" -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float32 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f32 ## reentrant -# if __HAVE_DISTINCT_FLOAT32 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f32 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float64 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f64 ## reentrant -# if __HAVE_DISTINCT_FLOAT64 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f64 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float128 -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f128 ## reentrant -# if __HAVE_DISTINCT_FLOAT128 -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128 ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float32x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f32x ## reentrant -# if __HAVE_DISTINCT_FLOAT32X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f32x ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float64x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f64x ## reentrant -# if __HAVE_DISTINCT_FLOAT64X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f64x ## reentrant ## _finite -# elif __HAVE_FLOAT64X_LONG_DOUBLE -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## l ## reentrant ## _finite -# else -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128 ## reentrant ## _finite -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -# if (__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC)) \ - && __GLIBC_USE (IEC_60559_TYPES_EXT) -# define _Mdouble_ _Float128x -# define __MATH_DECLARING_DOUBLE 0 -# define __MATH_DECLARING_FLOATN 1 -# define __REDIRFROM_X(function, reentrant) \ - function ## f128x ## reentrant -# if __HAVE_DISTINCT_FLOAT128X -# define __REDIRTO_X(function, reentrant) \ - __ ## function ## f128x ## reentrant ## _finite -# else -# error "non-disinct _Float128x" -# endif -# include -# undef _Mdouble_ -# undef __MATH_DECLARING_DOUBLE -# undef __MATH_DECLARING_FLOATN -# undef __REDIRFROM_X -# undef __REDIRTO_X -# endif - -#endif /* __FINITE_MATH_ONLY__ > 0. */ - -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* An expression whose type has the widest of the evaluation formats of X and Y (which are of floating-point types). */ # if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64 @@ -1223,7 +1382,7 @@ template<> struct __iseqsig_type template<> struct __iseqsig_type { - static int __call (double __x, double __y) throw () + static int __call (long double __x, long double __y) throw () { # ifndef __NO_LONG_DOUBLE_MATH return __iseqsigl (__x, __y); @@ -1233,12 +1392,62 @@ template<> struct __iseqsig_type } }; -# if __HAVE_DISTINCT_FLOAT128 +# if __HAVE_FLOAT32 && __GNUC_PREREQ (13, 0) +template<> struct __iseqsig_type<_Float32> +{ + static int __call (_Float32 __x, _Float32 __y) throw () + { + return __iseqsigf (__x, __y); + } +}; +# endif + +# if __HAVE_FLOAT64 && __GNUC_PREREQ (13, 0) +template<> struct __iseqsig_type<_Float64> +{ + static int __call (_Float64 __x, _Float64 __y) throw () + { + return __iseqsig (__x, __y); + } +}; +# endif + +# if __HAVE_FLOAT128_UNLIKE_LDBL || (__HAVE_FLOAT128 && __GNUC_PREREQ (13, 0)) + /* When using an IEEE 128-bit long double, _Float128 is defined as long double + in C++. */ template<> struct __iseqsig_type<_Float128> { static int __call (_Float128 __x, _Float128 __y) throw () { +# if __HAVE_FLOAT128_UNLIKE_LDBL return __iseqsigf128 (__x, __y); +# else + return __iseqsigl (__x, __y); +# endif + } +}; +# endif + +# if __HAVE_FLOAT32X && __GNUC_PREREQ (13, 0) +template<> struct __iseqsig_type<_Float32x> +{ + static int __call (_Float32x __x, _Float32x __y) throw () + { + return __iseqsig (__x, __y); + } +}; +# endif + +# if __HAVE_FLOAT64X && __GNUC_PREREQ (13, 0) +template<> struct __iseqsig_type<_Float64x> +{ + static int __call (_Float64x __x, _Float64x __y) throw () + { +# if __HAVE_FLOAT64X_LONG_DOUBLE + return __iseqsigl (__x, __y); +# else + return __iseqsigf128 (__x, __y); +# endif } }; # endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/memory.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/memory.h index ed67bb9a..774aec67 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/memory.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/memory.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * SVID diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/mntent.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/mntent.h index 9af685fa..5d70fbaa 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/mntent.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/mntent.h @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MNTENT_H #define _MNTENT_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/ethernet.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/ethernet.h index f98c27c0..3f58506a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/ethernet.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/ethernet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2020 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -56,7 +56,6 @@ struct ether_header #define ETHERTYPE_IPV6 0x86dd /* IP protocol version 6 */ #define ETHERTYPE_LOOPBACK 0x9000 /* used to test interfaces */ - #define ETHER_ADDR_LEN ETH_ALEN /* size of ethernet addr */ #define ETHER_TYPE_LEN 2 /* bytes in type field */ #define ETHER_CRC_LEN 4 /* bytes in CRC field */ @@ -64,7 +63,7 @@ struct ether_header #define ETHER_MIN_LEN (ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */ #define ETHER_MAX_LEN (ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */ -/* make sure ethenet length is valid */ +/* make sure ethernet length is valid */ #define ETHER_IS_VALID_LEN(foo) \ ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if.h index 89e55dad..2ce0021a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if.h @@ -1,5 +1,5 @@ /* net/if.h -- declarations for inquiring about network interfaces - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _NET_IF_H #define _NET_IF_H 1 @@ -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; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if_arp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if_arp.h index ef4de77a..e7e194df 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if_arp.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/net/if_arp.h @@ -1,7 +1,6 @@ /* Definitions for Address Resolution Protocol. - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -15,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Based on the 4.4BSD and Linux version of this file. */ @@ -95,6 +94,8 @@ struct arphdr #define ARPHRD_ROSE 270 #define ARPHRD_X25 271 /* CCITT X.25. */ #define ARPHRD_HWX25 272 /* Boards with X.25 in firmware. */ +#define ARPHRD_CAN 280 /* Controller Area Network. */ +#define ARPHRD_MCTP 290 #define ARPHRD_PPP 512 #define ARPHRD_CISCO 513 /* Cisco HDLC. */ #define ARPHRD_HDLC ARPHRD_CISCO diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netdb.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netdb.h index 66a1baaf..14228b0d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netdb.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netdb.h @@ -1,4 +1,4 @@ - /* Copyright (C) 1996-2018 Free Software Foundation, Inc. + /* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* All data returned by the network data base library are supplied in host order and returned in network order (suitable for use in @@ -605,10 +605,10 @@ struct gaicb in the current locale's character set) before looking it up. */ # define AI_CANONIDN 0x0080 /* Translate canonical name from IDN format. */ -# define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode - code points. */ -# define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to - STD3 rules. */ +# define AI_IDN_ALLOW_UNASSIGNED \ + __glibc_macro_warning ("AI_IDN_ALLOW_UNASSIGNED is deprecated") 0x0100 +# define AI_IDN_USE_STD3_ASCII_RULES \ + __glibc_macro_warning ("AI_IDN_USE_STD3_ASCII_RULES is deprecated") 0x0200 # endif # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ @@ -646,10 +646,10 @@ struct gaicb # define NI_DGRAM 16 /* Look up UDP service rather than TCP. */ # ifdef __USE_GNU # define NI_IDN 32 /* Convert name from IDN format. */ -# define NI_IDN_ALLOW_UNASSIGNED 64 /* Don't reject unassigned Unicode - code points. */ -# define NI_IDN_USE_STD3_ASCII_RULES 128 /* Validate strings according to - STD3 rules. */ +# define NI_IDN_ALLOW_UNASSIGNED \ + __glibc_macro_warning ("NI_IDN_ALLOW_UNASSIGNED is deprecated") 64 +# define NI_IDN_USE_STD3_ASCII_RULES \ + __glibc_macro_warning ("NI_IDN_USE_STD3_ASCII_RULES is deprecated") 128 # endif /* Translate name of a service location and/or a service name to set of @@ -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; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in.h index 03a31b63..fa57b610 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _NETINET_IN_H #define _NETINET_IN_H 1 @@ -81,14 +81,20 @@ enum #define IPPROTO_PIM IPPROTO_PIM IPPROTO_COMP = 108, /* Compression Header Protocol. */ #define IPPROTO_COMP IPPROTO_COMP + IPPROTO_L2TP = 115, /* Layer 2 Tunnelling Protocol. */ +#define IPPROTO_L2TP IPPROTO_L2TP IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */ #define IPPROTO_SCTP IPPROTO_SCTP IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */ #define IPPROTO_UDPLITE IPPROTO_UDPLITE IPPROTO_MPLS = 137, /* MPLS in IP. */ #define IPPROTO_MPLS IPPROTO_MPLS + IPPROTO_ETHERNET = 143, /* Ethernet-within-IPv6 Encapsulation. */ +#define IPPROTO_ETHERNET IPPROTO_ETHERNET IPPROTO_RAW = 255, /* Raw IP packets. */ #define IPPROTO_RAW IPPROTO_RAW + IPPROTO_MPTCP = 262, /* Multipath TCP connection. */ +#define IPPROTO_MPTCP IPPROTO_MPTCP IPPROTO_MAX }; @@ -192,6 +198,9 @@ enum #define INADDR_BROADCAST ((in_addr_t) 0xffffffff) /* Address indicating an error return. */ #define INADDR_NONE ((in_addr_t) 0xffffffff) +/* Dummy address for source of ICMPv6 errors converted to IPv4 (RFC + 7600). */ +#define INADDR_DUMMY ((in_addr_t) 0xc0000008) /* Network number for local host loopback. */ #define IN_LOOPBACKNET 127 @@ -204,6 +213,7 @@ enum #define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) /* 224.0.0.0 */ #define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) /* 224.0.0.1 */ #define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */ +#define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) /* 224.0.0.106 */ #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */ #if !__USE_KERNEL_IPV6_DEFS @@ -241,10 +251,10 @@ struct sockaddr_in struct in_addr sin_addr; /* Internet address. */ /* Pad to size of `struct sockaddr'. */ - unsigned char sin_zero[sizeof (struct sockaddr) - - __SOCKADDR_COMMON_SIZE - - sizeof (in_port_t) - - sizeof (struct in_addr)]; + unsigned char sin_zero[sizeof (struct sockaddr) + - __SOCKADDR_COMMON_SIZE + - sizeof (in_port_t) + - sizeof (struct in_addr)]; }; #if !__USE_KERNEL_IPV6_DEFS @@ -270,6 +280,19 @@ struct ip_mreq struct in_addr imr_interface; }; +/* IPv4 multicast request with interface index. */ +struct ip_mreqn + { + /* IP multicast address of group. */ + struct in_addr imr_multiaddr; + + /* Local IP address of interface. */ + struct in_addr imr_address; + + /* Interface index. */ + int imr_ifindex; + }; + struct ip_mreq_source { /* IP multicast address of group. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in_systm.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in_systm.h index 76c11c67..bd0a47ff 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in_systm.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/in_systm.h @@ -1,5 +1,5 @@ /* System specific type definitions for networking code. - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _NETINET_IN_SYSTM_H #define _NETINET_IN_SYSTM_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/ip.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/ip.h index 82134945..261ed42c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/ip.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/ip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __NETINET_IP_H #define __NETINET_IP_H 1 @@ -186,6 +186,16 @@ struct ip_timestamp #define IPTOS_DSCP_AF43 0x98 #define IPTOS_DSCP_EF 0xb8 +/* + * Voice-Admit DSCP code point from RFC-5865, Section 4. + */ +#define IPTOS_DSCP_VA 0xb0 + +/* + * Lower-Effort Per-Hop Behavior DSCP code point from RFC-8622, Section 12. + */ +#define IPTOS_DSCP_LE 0x04 + /* * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume * the old ToS Precedence values. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/tcp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/tcp.h index 75973f09..b2acbb43 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/tcp.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netinet/tcp.h @@ -48,7 +48,7 @@ #define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ #define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ #define TCP_INFO 11 /* Information about this connection. */ -#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ +#define TCP_QUICKACK 12 /* Bock/re-enable quick ACKs. */ #define TCP_CONGESTION 13 /* Congestion control algorithm. */ #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ #define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */ @@ -73,6 +73,17 @@ #define TCP_FASTOPEN_CONNECT 30 /* Attempt FastOpen with connect. */ #define TCP_ULP 31 /* Attach a ULP to a TCP connection. */ #define TCP_MD5SIG_EXT 32 /* TCP MD5 Signature with extensions. */ +#define TCP_FASTOPEN_KEY 33 /* Set the key for Fast Open (cookie). */ +#define TCP_FASTOPEN_NO_COOKIE 34 /* Enable TFO without a TFO cookie. */ +#define TCP_ZEROCOPY_RECEIVE 35 +#define TCP_INQ 36 /* Notify bytes available to read + as a cmsg on read. */ +#define TCP_CM_INQ TCP_INQ +#define TCP_TX_DELAY 37 /* Delay outgoing packets by XX usec. */ + +#define TCP_REPAIR_ON 1 +#define TCP_REPAIR_OFF 0 +#define TCP_REPAIR_OFF_NO_WP -1 #ifdef __USE_MISC # include @@ -198,7 +209,7 @@ enum # define TCPI_OPT_TIMESTAMPS 1 # define TCPI_OPT_SACK 2 # define TCPI_OPT_WSCALE 4 -# define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */ +# define TCPI_OPT_ECN 8 /* ECN was negotiated at TCP session init */ # define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ # define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ @@ -261,6 +272,7 @@ struct tcp_info /* tcp_md5sig extension flags for TCP_MD5SIG_EXT. */ #define TCP_MD5SIG_FLAG_PREFIX 1 /* Address prefix length. */ +#define TCP_MD5SIG_FLAG_IFINDEX 2 /* Ifindex set. */ struct tcp_md5sig { @@ -268,7 +280,7 @@ struct tcp_md5sig uint8_t tcpm_flags; /* Extension flags. */ uint8_t tcpm_prefixlen; /* Address prefix. */ uint16_t tcpm_keylen; /* Key length. */ - uint32_t __tcpm_pad; /* Zero. */ + int tcpm_ifindex; /* Device index for scope. */ uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ }; @@ -296,7 +308,7 @@ enum /* Flags for both getsockopt and setsockopt */ #define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */ #define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies, - * supercedes everything. */ + * supersedes everything. */ /* Flags for getsockopt */ #define TCP_S_DATA_IN (1 << 2) /* Was data received? */ @@ -325,6 +337,14 @@ struct tcp_repair_window uint32_t rcv_wup; }; +/* For use with TCP_ZEROCOPY_RECEIVE. */ +struct tcp_zerocopy_receive +{ + uint64_t address; /* In: address of mapping. */ + uint32_t length; /* In/out: number of bytes to map/mapped. */ + uint32_t recv_skip_hint; /* Out: amount of bytes to skip. */ +}; + #endif /* Misc. */ #endif /* netinet/tcp.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netpacket/packet.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netpacket/packet.h index 59592f00..9ac13312 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netpacket/packet.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/netpacket/packet.h @@ -1,5 +1,5 @@ /* Definitions for use with Linux AF_PACKET sockets. - Copyright (C) 1998-2020 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -64,6 +64,7 @@ struct sockaddr_ll #define PACKET_ROLLOVER_STATS 21 #define PACKET_FANOUT_DATA 22 #define PACKET_IGNORE_OUTGOING 23 +#define PACKET_VNET_HDR_SZ 24 struct packet_mreq { diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/nl_types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/nl_types.h index 41f0c626..92918c05 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/nl_types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/nl_types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _NL_TYPES_H #define _NL_TYPES_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pthread.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pthread.h index df049abf..1607fdf2 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pthread.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 2002-2024 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 @@ -13,21 +13,25 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 #include -#include #include #include +#include #include #include #include #include - +#include +#include +#ifdef __USE_MISC +# include +#endif /* Detach state. */ enum @@ -83,30 +87,15 @@ enum #endif -#if __PTHREAD_MUTEX_HAVE_PREV -# define PTHREAD_MUTEX_INITIALIZER \ - { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } } -# ifdef __USE_GNU -# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } } -# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } } -# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } } - -# endif -#else -# define PTHREAD_MUTEX_INITIALIZER \ - { { 0, 0, 0, 0, 0, { __PTHREAD_SPINS } } } -# ifdef __USE_GNU -# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { __PTHREAD_SPINS } } } -# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { __PTHREAD_SPINS } } } -# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { __PTHREAD_SPINS } } } - -# endif +#define PTHREAD_MUTEX_INITIALIZER \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } } +#ifdef __USE_GNU +# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } } +# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } } +# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ + { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } } #endif @@ -120,34 +109,13 @@ enum PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; -/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t - has the shared field. All 64-bit architectures have the shared field - in pthread_rwlock_t. */ -#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED -# if __WORDSIZE == 64 -# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 -# endif -#endif /* Read-write lock initializers. */ # define PTHREAD_RWLOCK_INITIALIZER \ - { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } } + { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } } # ifdef __USE_GNU -# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, \ - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } -# else -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \ - 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } } -# else -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ - 0 } } -# endif -# endif +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } } # endif #endif /* Unix98 or XOpen2K */ @@ -255,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. @@ -263,6 +232,34 @@ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); + +/* Make calling thread wait for termination of the thread TH, but only + until TIMEOUT measured against the clock specified by CLOCKID. The + exit status of the thread is stored in *THREAD_RETURN, if + THREAD_RETURN is not NULL. + + This function is a cancellation point and therefore not marked with + __THROW. */ +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. @@ -410,6 +407,20 @@ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, extern int pthread_getattr_default_np (pthread_attr_t *__attr) __THROW __nonnull ((1)); +/* Store *SIGMASK as the signal mask for the new thread in *ATTR. */ +extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr, + const __sigset_t *sigmask); + +/* Store the signal mask of *ATTR in *SIGMASK. If there is no signal + mask stored, return PTHREAD_ATTR_NOSIGMASK_NP. Return zero on + success. */ +extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr, + __sigset_t *sigmask); + +/* Special return value from pthread_attr_getsigmask_np if the signal + mask has not been set. */ +#define PTHREAD_ATTR_NO_SIGMASK_NP (-1) + /* Set the default attributes to be used by pthread_create in this process. */ extern int pthread_setattr_default_np (const pthread_attr_t *__attr) @@ -463,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 @@ -502,7 +516,7 @@ extern int pthread_once (pthread_once_t *__once_control, exception in C++ code. If cancellation is implemented by unwinding this is necessary to have the compiler generate the unwind information. */ -/* Set cancelability state of current thread to STATE, returning old +/* Set cancellability state of current thread to STATE, returning old state in *OLDSTATE if OLDSTATE is not NULL. */ extern int pthread_setcancelstate (int __state, int *__oldstate); @@ -521,13 +535,15 @@ extern void pthread_testcancel (void); /* Cancellation handling with integration into exception handling. */ +struct __cancel_jmp_buf_tag +{ + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; +}; + typedef struct { - struct - { - __jmp_buf __cancel_jmp_buf; - int __mask_was_saved; - } __cancel_jmp_buf[1]; + struct __cancel_jmp_buf_tag __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); @@ -667,8 +683,8 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ - int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ - __cancel_buf.__cancel_jmp_buf, 0); \ + int __not_first_call = __sigsetjmp_cancel (__cancel_buf.__cancel_jmp_buf, \ + 0); \ if (__glibc_unlikely (__not_first_call)) \ { \ __cancel_routine (__cancel_arg); \ @@ -702,8 +718,8 @@ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ - int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ - __cancel_buf.__cancel_jmp_buf, 0); \ + int __not_first_call = __sigsetjmp_cancel (__cancel_buf.__cancel_jmp_buf, \ + 0); \ if (__glibc_unlikely (__not_first_call)) \ { \ __cancel_routine (__cancel_arg); \ @@ -739,9 +755,24 @@ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) ; #endif -/* Function used in the macros. */ -struct __jmp_buf_tag; -extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL; +/* Function used in the macros. Calling __sigsetjmp, with its first + argument declared as an array, results in a -Wstringop-overflow + warning from GCC 11 because struct pthread_unwind_buf is smaller + than jmp_buf. The calls from the macros have __SAVEMASK set to 0, + so nothing beyond the common prefix is used and this warning is a + false positive. Use an alias with its first argument declared to + use the type in the macros if possible to avoid this warning. */ +#if __GNUC_PREREQ (11, 0) +extern int __REDIRECT_NTHNL (__sigsetjmp_cancel, + (struct __cancel_jmp_buf_tag __env[1], + int __savemask), + __sigsetjmp) __attribute_returns_twice__; +#else +# define __sigsetjmp_cancel(env, savemask) \ + __sigsetjmp ((struct __jmp_buf_tag *) (void *) (env), (savemask)) +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], + int __savemask) __THROWNL; +#endif /* Mutex handling. */ @@ -765,9 +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. */ @@ -794,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 @@ -864,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_mutexattr_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. */ @@ -874,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_mutexattr_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. */ @@ -903,10 +981,42 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K -/* Try to acquire read lock for RWLOCK or return after specfied time. */ +/* Try to acquire read lock for RWLOCK or return after specified 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. */ @@ -918,10 +1028,43 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K -/* Try to acquire write lock for RWLOCK or return after specfied time. */ +/* Try to acquire write lock for RWLOCK or return after specified 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. */ @@ -998,10 +1141,52 @@ 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 + ABSTIME measured by the specified clock. MUTEX is assumed to be + locked before. CLOCK is the clock to use. ABSTIME is an absolute + time specification against CLOCK's epoch. + + 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. */ @@ -1121,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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pwd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pwd.h index 25c6b975..039d92c1 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pwd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/pwd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 9.2.2 User Database Access @@ -45,11 +45,12 @@ typedef __uid_t uid_t; # endif #endif -/* The passwd structure. */ +/* A record in the user database. */ struct passwd { char *pw_name; /* Username. */ - char *pw_passwd; /* Password. */ + char *pw_passwd; /* Hashed passphrase, if shadow database + not in use (see shadow.h). */ __uid_t pw_uid; /* User ID. */ __gid_t pw_gid; /* Group ID. */ char *pw_gecos; /* Real name. */ @@ -64,19 +65,19 @@ struct passwd #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Rewind the password-file stream. +/* Rewind the user database stream. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setpwent (void); -/* Close the password-file stream. +/* Close the user database stream. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endpwent (void); -/* Read an entry from the password-file stream, opening it if necessary. +/* Read an entry from the user database stream, opening it if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ @@ -84,7 +85,7 @@ extern struct passwd *getpwent (void); #endif #ifdef __USE_MISC -/* Read an entry from STREAM. +/* Read a user database entry from STREAM. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface @@ -92,7 +93,7 @@ extern struct passwd *getpwent (void); therefore not marked with __THROW. */ extern struct passwd *fgetpwent (FILE *__stream) __nonnull ((1)); -/* Write the given entry onto the given stream. +/* Write a given user database entry onto the given stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface @@ -102,13 +103,13 @@ extern int putpwent (const struct passwd *__restrict __p, FILE *__restrict __f); #endif -/* Search for an entry with a matching user ID. +/* Retrieve the user database entry for the given user ID. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct passwd *getpwuid (__uid_t __uid); -/* Search for an entry with a matching username. +/* Retrieve the user database entry for the given username. This function is a possible cancellation point and therefore not marked with __THROW. */ @@ -138,25 +139,28 @@ 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 -/* Read an entry from STREAM. This function is not standardized and - probably never will. +/* Read a user database entry from STREAM. This function is not + standardized and probably never will. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface @@ -166,15 +170,16 @@ 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 */ #ifdef __USE_GNU -/* Re-construct the password-file line for the given uid - in the given buffer. This knows the format that the caller - will expect, but this need not be the format of the password file. +/* Write a traditional /etc/passwd line, based on the user database + entry for the given UID, to BUFFER; space for BUFFER must be + allocated by the caller. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/regex.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/regex.h index e0b89158..ccf40ceb 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/regex.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-2018 Free Software Foundation, Inc. + Copyright (C) 1985, 1989-2024 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _REGEX_H #define _REGEX_H 1 @@ -27,6 +27,36 @@ extern "C" { #endif +/* Define __USE_GNU to declare GNU extensions that violate the + POSIX name space rules. */ +#ifdef _GNU_SOURCE +# define __USE_GNU 1 +#endif + +#ifdef _REGEX_LARGE_OFFSETS + +/* Use types and values that are wide enough to represent signed and + unsigned byte offsets in memory. This currently works only when + the regex code is used outside of the GNU C library; it is not yet + supported within glibc itself, and glibc users should not define + _REGEX_LARGE_OFFSETS. */ + +/* The type of object sizes. */ +typedef size_t __re_size_t; + +/* The type of object sizes, in places where the traditional code + uses unsigned long int. */ +typedef size_t __re_long_size_t; + +#else + +/* The traditional GNU regex implementation mishandles strings longer + than INT_MAX. */ +typedef unsigned int __re_size_t; +typedef unsigned long int __re_long_size_t; + +#endif + /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two @@ -108,9 +138,9 @@ typedef unsigned long int reg_syntax_t; If not set, newline is literal. */ # define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) -/* If this bit is set, then `{...}' defines an interval, and \{ and \} +/* If this bit is set, then '{...}' defines an interval, and \{ and \} are literals. - If not set, then `\{...\}' defines an interval. */ + If not set, then '\{...\}' defines an interval. */ # define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. @@ -165,8 +195,8 @@ typedef unsigned long int reg_syntax_t; whether ^ should be special. */ # define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) -/* If this bit is set, then \{ cannot be first in an bre or - immediately after an alternation or begin-group operator. */ +/* If this bit is set, then \{ cannot be first in a regex or + immediately after an alternation, open-group or \} operator. */ # define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during @@ -185,9 +215,9 @@ extern reg_syntax_t re_syntax_options; (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ -#define RE_SYNTAX_EMACS 0 +# define RE_SYNTAX_EMACS 0 -#define RE_SYNTAX_AWK \ +# define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ @@ -195,52 +225,49 @@ extern reg_syntax_t re_syntax_options; | RE_CHAR_CLASSES \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) -#define RE_SYNTAX_GNU_AWK \ +# define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INVALID_INTERVAL_ORD) \ & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) -#define RE_SYNTAX_POSIX_AWK \ +# define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS \ | RE_INVALID_INTERVAL_ORD) -#define RE_SYNTAX_GREP \ - (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ - | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ - | RE_NEWLINE_ALT) +# define RE_SYNTAX_GREP \ + ((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \ + & ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL)) -#define RE_SYNTAX_EGREP \ - (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ - | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ - | RE_NO_BK_VBAR) +# define RE_SYNTAX_EGREP \ + ((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \ + & ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL)) -#define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ - | RE_INVALID_INTERVAL_ORD) +/* POSIX grep -E behavior is no longer incompatible with GNU. */ +# define RE_SYNTAX_POSIX_EGREP \ + RE_SYNTAX_EGREP /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ -#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC +# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC -#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC +# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ -#define _RE_SYNTAX_POSIX_COMMON \ +# define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) -#define RE_SYNTAX_POSIX_BASIC \ +# define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ -#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ +# define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) -#define RE_SYNTAX_POSIX_EXTENDED \ +# define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ @@ -248,25 +275,35 @@ extern reg_syntax_t re_syntax_options; /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ -#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ +# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ - -/* Maximum number of duplicates an interval can allow. Some systems - (erroneously) define this in other header files, but we want our + +/* Maximum number of duplicates an interval can allow. POSIX-conforming + systems might define this in , but we want our value, so remove any previous define. */ +# ifdef _REGEX_INCLUDE_LIMITS_H +# include +# endif # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif -/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */ + +/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored + the counter as a 2-byte signed integer. This is no longer true, so + RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to + ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined. + However, there would be a huge performance problem if someone + actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains + its historical value. */ # define RE_DUP_MAX (0x7fff) #endif -/* POSIX `cflags' bits (i.e., information for `regcomp'). */ +/* POSIX 'cflags' bits (i.e., information for 'regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ @@ -274,19 +311,19 @@ extern reg_syntax_t re_syntax_options; /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ -#define REG_ICASE (REG_EXTENDED << 1) +#define REG_ICASE (1 << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ -#define REG_NEWLINE (REG_ICASE << 1) +#define REG_NEWLINE (1 << 2) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ -#define REG_NOSUB (REG_NEWLINE << 1) +#define REG_NOSUB (1 << 3) -/* POSIX `eflags' bits (i.e., information for regexec). */ +/* POSIX 'eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the @@ -304,41 +341,60 @@ extern reg_syntax_t re_syntax_options; /* If any error codes are removed, changed, or added, update the - `re_error_msg' table in regex.c. */ + '__re_error_msgid' table in regcomp.c. */ + typedef enum { -#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K - REG_ENOSYS = -1, /* This will never happen for this implementation. */ -#endif - - REG_NOERROR = 0, /* Success. */ - REG_NOMATCH, /* Didn't find a match (for regexec). */ + _REG_ENOSYS = -1, /* This will never happen for this implementation. */ + _REG_NOERROR = 0, /* Success. */ + _REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ - REG_BADPAT, /* Invalid pattern. */ - REG_ECOLLATE, /* Invalid collating element. */ - REG_ECTYPE, /* Invalid character class name. */ - REG_EESCAPE, /* Trailing backslash. */ - REG_ESUBREG, /* Invalid back reference. */ - REG_EBRACK, /* Unmatched left bracket. */ - REG_EPAREN, /* Parenthesis imbalance. */ - REG_EBRACE, /* Unmatched \{. */ - REG_BADBR, /* Invalid contents of \{\}. */ - REG_ERANGE, /* Invalid range end. */ - REG_ESPACE, /* Ran out of memory. */ - REG_BADRPT, /* No preceding re for repetition op. */ + _REG_BADPAT, /* Invalid pattern. */ + _REG_ECOLLATE, /* Invalid collating element. */ + _REG_ECTYPE, /* Invalid character class name. */ + _REG_EESCAPE, /* Trailing backslash. */ + _REG_ESUBREG, /* Invalid back reference. */ + _REG_EBRACK, /* Unmatched left bracket. */ + _REG_EPAREN, /* Parenthesis imbalance. */ + _REG_EBRACE, /* Unmatched \{. */ + _REG_BADBR, /* Invalid contents of \{\}. */ + _REG_ERANGE, /* Invalid range end. */ + _REG_ESPACE, /* Ran out of memory. */ + _REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ - REG_EEND, /* Premature end. */ - REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ - REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ + _REG_EEND, /* Premature end. */ + _REG_ESIZE, /* Too large (e.g., repeat count too large). */ + _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; + +#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K +# define REG_ENOSYS _REG_ENOSYS +#endif +#define REG_NOERROR _REG_NOERROR +#define REG_NOMATCH _REG_NOMATCH +#define REG_BADPAT _REG_BADPAT +#define REG_ECOLLATE _REG_ECOLLATE +#define REG_ECTYPE _REG_ECTYPE +#define REG_EESCAPE _REG_EESCAPE +#define REG_ESUBREG _REG_ESUBREG +#define REG_EBRACK _REG_EBRACK +#define REG_EPAREN _REG_EPAREN +#define REG_EBRACE _REG_EBRACE +#define REG_BADBR _REG_BADBR +#define REG_ERANGE _REG_ERANGE +#define REG_ESPACE _REG_ESPACE +#define REG_BADRPT _REG_BADRPT +#define REG_EEND _REG_EEND +#define REG_ESIZE _REG_ESIZE +#define REG_ERPAREN _REG_ERPAREN /* This data structure represents a compiled pattern. Before calling - the pattern compiler, the fields `buffer', `allocated', `fastmap', - and `translate' can be set. After the pattern has been compiled, - the fields `re_nsub', `not_bol' and `not_eol' are available. All + the pattern compiler, the fields 'buffer', 'allocated', 'fastmap', + and 'translate' can be set. After the pattern has been compiled, + the fields 're_nsub', 'not_bol' and 'not_eol' are available. All other fields are private to the regex routines. */ #ifndef RE_TRANSLATE_TYPE @@ -356,16 +412,15 @@ typedef enum struct re_pattern_buffer { - /* Space that holds the compiled pattern. It is declared as - `unsigned char *' because its elements are sometimes used as - array indexes. */ - unsigned char *__REPB_PREFIX(buffer); + /* Space that holds the compiled pattern. The type + 'struct re_dfa_t' is private and is not declared here. */ + struct re_dfa_t *__REPB_PREFIX(buffer); - /* Number of bytes to which `buffer' points. */ - unsigned long int __REPB_PREFIX(allocated); + /* Number of bytes to which 'buffer' points. */ + __re_long_size_t __REPB_PREFIX(allocated); - /* Number of bytes actually used in `buffer'. */ - unsigned long int __REPB_PREFIX(used); + /* Number of bytes actually used in 'buffer'. */ + __re_long_size_t __REPB_PREFIX(used); /* Syntax setting with which the pattern was compiled. */ reg_syntax_t __REPB_PREFIX(syntax); @@ -385,13 +440,13 @@ struct re_pattern_buffer size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. - Well, in truth it's used only in `re_search_2', to see whether or + Well, in truth it's used only in 're_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely - perfectly; see `re_compile_fastmap' (the `duplicate' case). */ + perfectly; see 're_compile_fastmap' (the "duplicate" case). */ unsigned __REPB_PREFIX(can_be_null) : 1; - /* If REGS_UNALLOCATED, allocate space in the `regs' structure - for `max (RE_NREGS, re_nsub + 1)' groups. + /* If REGS_UNALLOCATED, allocate space in the 'regs' structure + for 'max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #ifdef __USE_GNU @@ -401,11 +456,11 @@ struct re_pattern_buffer #endif unsigned __REPB_PREFIX(regs_allocated) : 2; - /* Set to zero when `regex_compile' compiles a pattern; set to one - by `re_compile_fastmap' if it updates the fastmap. */ + /* Set to zero when 're_compile_pattern' compiles a pattern; set to + one by 're_compile_fastmap' if it updates the fastmap. */ unsigned __REPB_PREFIX(fastmap_accurate) : 1; - /* If set, `re_match_2' does not return information about + /* If set, 're_match_2' does not return information about subexpressions. */ unsigned __REPB_PREFIX(no_sub) : 1; @@ -423,7 +478,17 @@ struct re_pattern_buffer typedef struct re_pattern_buffer regex_t; /* Type for byte offsets within the string. POSIX mandates this. */ +#ifdef _REGEX_LARGE_OFFSETS +/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as + ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t + is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not + visible here, so use ssize_t. */ +typedef ssize_t regoff_t; +#else +/* The traditional GNU regex implementation mishandles strings longer + than INT_MAX. */ typedef int regoff_t; +#endif #ifdef __USE_GNU @@ -431,15 +496,15 @@ typedef int regoff_t; regex.texinfo for a full description of what registers match. */ struct re_registers { - unsigned num_regs; + __re_size_t num_regs; regoff_t *start; regoff_t *end; }; -/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, - `re_match_2' returns information about at least this many registers - the first time a `regs' structure is passed. */ +/* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + 're_match_2' returns information about at least this many registers + the first time a 'regs' structure is passed. */ # ifndef RE_NREGS # define RE_NREGS 30 # endif @@ -447,7 +512,7 @@ struct re_registers /* POSIX specification for registers. Aside from the different names than - `re_registers', POSIX uses an array of structures, instead of a + 're_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { @@ -457,21 +522,46 @@ typedef struct /* Declarations for routines. */ +#ifndef _REGEX_NELTS +# if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \ + && !defined __STDC_NO_VLA__) +# define _REGEX_NELTS(n) n +# else +# define _REGEX_NELTS(n) +# endif +#endif + +#if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wvla" +#endif + +#ifndef _Attr_access_ +# ifdef __attr_access +# define _Attr_access_(arg) __attr_access (arg) +# elif defined __GNUC__ && 10 <= __GNUC__ +# define _Attr_access_(x) __attribute__ ((__access__ x)) +# else +# define _Attr_access_(x) +# endif +#endif + #ifdef __USE_GNU /* Sets the current default syntax to SYNTAX, and return the old syntax. - You can also simply assign to the `re_syntax_options' variable. */ + You can also simply assign to the 're_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH - and syntax given by the global `re_syntax_options', into the buffer + and syntax given by the global 're_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. - To free the allocated storage, you must call `regfree' on BUFFER. - Note that the translate table must either have been initialised by - `regcomp', with a malloc'ed value, or set to NULL before calling - `regfree'. */ + To free the allocated storage, you must call 'regfree' on BUFFER. + Note that the translate table must either have been initialized by + '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 @@ -485,94 +575,122 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -extern int re_search (struct re_pattern_buffer *__buffer, const char *__string, - int __length, int __start, int __range, - struct re_registers *__regs); +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) + _Attr_access_ ((__read_only__, 2, 3)); -/* Like `re_search', but search in the concatenation of STRING1 and +/* Like 're_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ -extern int re_search_2 (struct re_pattern_buffer *__buffer, - const char *__string1, int __length1, - const char *__string2, int __length2, int __start, - int __range, struct re_registers *__regs, int __stop); +extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, + const char *__string1, regoff_t __length1, + const char *__string2, regoff_t __length2, + regoff_t __start, regoff_t __range, + struct re_registers *__regs, + 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 +/* Like 're_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ -extern int re_match (struct re_pattern_buffer *__buffer, const char *__string, - int __length, int __start, struct re_registers *__regs); +extern regoff_t re_match (struct re_pattern_buffer *__buffer, + const char *__String, regoff_t __length, + 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'. */ -extern int re_match_2 (struct re_pattern_buffer *__buffer, - const char *__string1, int __length1, - const char *__string2, int __length2, int __start, - struct re_registers *__regs, int __stop); +/* Relates to 're_match' as 're_search_2' relates to 're_search'. */ +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) + _Attr_access_ ((__read_only__, 2, 3)) + _Attr_access_ ((__read_only__, 4, 5)); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be - allocated with malloc, and must each be at least `NUM_REGS * sizeof + allocated with malloc, and must each be at least 'NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using - PATTERN_BUFFER will allocate its own register data, without + BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, - unsigned int __num_regs, + __re_size_t __num_regs, regoff_t *__starts, regoff_t *__ends); #endif /* Use GNU */ #if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC) -# ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); -# endif #endif -/* GCC 2.95 and later have "__restrict"; C99 compilers have - "restrict", and "configure" may have defined "restrict". */ -#ifndef __restrict -# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) -# if defined restrict || 199901L <= __STDC_VERSION__ -# define __restrict restrict -# else -# define __restrict -# endif +/* For plain 'restrict', use glibc's __restrict if defined. + Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". + Other compilers use __restrict, __restrict__, and _Restrict, and + 'configure' might #define 'restrict' to those words, so pick a + different name. */ +#ifndef _Restrict_ +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 +# define _Restrict_ __restrict +# elif 199901L <= __STDC_VERSION__ || defined restrict +# define _Restrict_ restrict +# else +# define _Restrict_ # endif #endif -/* gcc 3.1 and up support the [restrict] syntax. */ -#ifndef __restrict_arr -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \ - && !defined __GNUG__ -# define __restrict_arr __restrict +/* For the ISO C99 syntax + array_name[restrict] + use glibc's __restrict_arr if available. + Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode). + Other ISO C99 compilers support it as well. */ +#ifndef _Restrict_arr_ +# ifdef __restrict_arr +# define _Restrict_arr_ __restrict_arr +# elif ((199901L <= __STDC_VERSION__ \ + || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3) \ + && !defined __cplusplus) +# define _Restrict_arr_ _Restrict_ # else -# define __restrict_arr +# define _Restrict_arr_ # endif #endif /* POSIX compatibility. */ -extern int regcomp (regex_t *__restrict __preg, - const char *__restrict __pattern, +extern int regcomp (regex_t *_Restrict_ __preg, + const char *_Restrict_ __pattern, int __cflags); -extern int regexec (const regex_t *__restrict __preg, - const char *__restrict __string, size_t __nmatch, - regmatch_t __pmatch[__restrict_arr], +extern int regexec (const regex_t *_Restrict_ __preg, + const char *_Restrict_ __String, size_t __nmatch, + regmatch_t __pmatch[_Restrict_arr_ + _REGEX_NELTS (__nmatch)], int __eflags); -extern size_t regerror (int __errcode, const regex_t *__restrict __preg, - char *__restrict __errbuf, size_t __errbuf_size); +extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, + char *_Restrict_ __errbuf, size_t __errbuf_size) + _Attr_access_ ((__write_only__, 3, 4)); extern void regfree (regex_t *__preg); +#if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic pop +#endif #ifdef __cplusplus } diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/resolv.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/resolv.h index 80a523e5..f40d6c58 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/resolv.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/resolv.h @@ -87,7 +87,7 @@ /* * Resolver configuration file. * Normally not present, but may contain the address of the - * inital name server(s) to query and the domain search list. + * initial name server(s) to query and the domain search list. */ #ifndef _PATH_RESCONF @@ -115,11 +115,7 @@ struct res_sym { #define RES_DEFNAMES 0x00000080 /* use default domain name */ #define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */ #define RES_DNSRCH 0x00000200 /* search up local domain tree */ -#define RES_INSECURE1 0x00000400 /* type 1 security disabled */ -#define RES_INSECURE2 0x00000800 /* type 2 security disabled */ #define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */ -#define RES_USE_INET6 \ - __glibc_macro_warning ("RES_USE_INET6 is deprecated") 0x00002000 #define RES_ROTATE 0x00004000 /* rotate ns list after each query */ #define RES_NOCHECKNAME \ __glibc_macro_warning ("RES_NOCHECKNAME is deprecated") 0x00008000 @@ -135,6 +131,8 @@ struct res_sym { #define RES_NOTLDQUERY 0x01000000 /* Do not look up unqualified name as a TLD. */ #define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */ +#define RES_TRUSTAD 0x04000000 /* Request AD bit, keep it in responses. */ +#define RES_NOAAAA 0x08000000 /* Suppress AAAA queries. */ #define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH) @@ -171,20 +169,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; @@ -200,10 +206,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 @@ -218,19 +221,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 @@ -241,50 +235,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, diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/sched.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/sched.h index 619b3b3a..3eac206f 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/sched.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/sched.h @@ -1,5 +1,5 @@ /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SCHED_H #define _SCHED_H 1 @@ -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'. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/semaphore.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/semaphore.h index 436d21cb..c75ca4ce 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/semaphore.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +/* Copyright (C) 2002-2024 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 @@ -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. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/setjmp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/setjmp.h index 1a244c4c..1309c621 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/setjmp.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.13 Nonlocal jumps @@ -27,20 +27,7 @@ __BEGIN_DECLS #include /* Get `__jmp_buf'. */ -#include - -/* Calling environment, plus possibly a saved signal mask. */ -struct __jmp_buf_tag - { - /* NOTE: The machine-dependent definitions of `__sigsetjmp' - assume that a `jmp_buf' begins with a `__jmp_buf' and that - `__mask_was_saved' follows it. Do not move these members - or add others before it. */ - __jmp_buf __jmpbuf; /* Calling environment. */ - int __mask_was_saved; /* Saved the signal mask? */ - __sigset_t __saved_mask; /* Saved signal mask. */ - }; - +#include typedef struct __jmp_buf_tag jmp_buf[1]; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/signal.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/signal.h index 87dc82a9..f37499ce 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/signal.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/signal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.14 Signal handling @@ -27,7 +27,7 @@ __BEGIN_DECLS #include -#include +#include #include @@ -148,7 +148,8 @@ extern void psiginfo (const siginfo_t *__pinfo, const char *__s); #ifdef __USE_XOPEN_EXTENDED # ifdef __GNUC__ -extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause") + __attribute_deprecated_msg__ ("Use the sigsuspend function instead"); # else extern int __sigpause (int __sig_or_mask, int __is_sig); /* Remove a signal from the signal mask and suspend the process. */ @@ -164,7 +165,9 @@ extern int __sigpause (int __sig_or_mask, int __is_sig); simply do not work in many situations. Use `sigprocmask' instead. */ /* Compute mask for signal SIG. */ -# define sigmask(sig) ((int)(1u << ((sig) - 1))) +# define sigmask(sig) \ + __glibc_macro_warning ("sigmask is deprecated") \ + ((int)(1u << ((sig) - 1))) /* Block signals in MASK, returning the old mask. */ extern int sigblock (int __mask) __THROW __attribute_deprecated__; @@ -266,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. */ @@ -281,12 +297,6 @@ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) #ifdef __USE_MISC -/* Names of the signals. This variable exists only for compatibility. - Use `strsignal' instead (see ). */ -extern const char *const _sys_siglist[_NSIG]; -extern const char *const sys_siglist[_NSIG]; - - /* Get machine-dependent `struct sigcontext' and signal subcodes. */ # include @@ -311,9 +321,11 @@ extern int sigreturn (struct sigcontext *__scp) __THROW; /* If INTERRUPT is nonzero, make signal SIG interrupt system calls (causing them to fail with EINTR); if INTERRUPT is zero, make system calls be restarted after signal SIG. */ -extern int siginterrupt (int __sig, int __interrupt) __THROW; +extern int siginterrupt (int __sig, int __interrupt) __THROW + __attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead"); # include +# include # include /* Alternate signal handler stack interface. @@ -340,16 +352,21 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) /* Simplified interface for signal management. */ /* Add SIG to the calling process' signal mask. */ -extern int sighold (int __sig) __THROW; +extern int sighold (int __sig) __THROW + __attribute_deprecated_msg__ ("Use the sigprocmask function instead"); /* Remove SIG from the calling process' signal mask. */ -extern int sigrelse (int __sig) __THROW; +extern int sigrelse (int __sig) __THROW + __attribute_deprecated_msg__ ("Use the sigprocmask function instead"); /* Set the disposition of SIG to SIG_IGN. */ -extern int sigignore (int __sig) __THROW; +extern int sigignore (int __sig) __THROW + __attribute_deprecated_msg__ ("Use the signal function instead"); /* Set the disposition of SIG. */ -extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW + __attribute_deprecated_msg__ + ("Use the signal and sigprocmask functions instead"); #endif #if defined __USE_POSIX199506 || defined __USE_UNIX98 @@ -370,6 +387,9 @@ extern int __libc_current_sigrtmax (void) __THROW; #define SIGRTMIN (__libc_current_sigrtmin ()) #define SIGRTMAX (__libc_current_sigrtmax ()) +/* System-specific extensions. */ +#include + __END_DECLS #endif /* not signal.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/spawn.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/spawn.h index aafb2761..d6d50d12 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/spawn.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/spawn.h @@ -1,5 +1,5 @@ /* Definitions for POSIX spawn interface. - Copyright (C) 2000-2018 Free Software Foundation, Inc. + Copyright (C) 2000-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SPAWN_H #define _SPAWN_H 1 @@ -34,7 +34,8 @@ typedef struct sigset_t __ss; struct sched_param __sp; int __policy; - int __pad[16]; + int __cgroup; + int __pad[15]; } posix_spawnattr_t; @@ -59,6 +60,7 @@ typedef struct #ifdef __USE_GNU # define POSIX_SPAWN_USEVFORK 0x40 # define POSIX_SPAWN_SETSID 0x80 +# define POSIX_SPAWN_SETCGROUP 0x100 #endif @@ -75,7 +77,8 @@ extern int posix_spawn (pid_t *__restrict __pid, __file_actions, const posix_spawnattr_t *__restrict __attrp, char *const __argv[__restrict_arr], - char *const __envp[__restrict_arr]); + char *const __envp[__restrict_arr]) + __nonnull ((2, 5)); /* Similar to `posix_spawn' but search for FILE in the PATH. @@ -84,85 +87,96 @@ extern int posix_spawn (pid_t *__restrict __pid, extern int posix_spawnp (pid_t *__pid, const char *__file, const posix_spawn_file_actions_t *__file_actions, const posix_spawnattr_t *__attrp, - char *const __argv[], char *const __envp[]); + char *const __argv[], char *const __envp[]) + __nonnull ((2, 5)); /* Initialize data structure with attributes for `spawn' to default values. */ -extern int posix_spawnattr_init (posix_spawnattr_t *__attr) __THROW; +extern int posix_spawnattr_init (posix_spawnattr_t *__attr) + __THROW __nonnull ((1)); /* Free resources associated with ATTR. */ -extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) __THROW; +extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) + __THROW __nonnull ((1)); /* Store signal mask for signals with default handling from ATTR in SIGDEFAULT. */ extern int posix_spawnattr_getsigdefault (const posix_spawnattr_t * __restrict __attr, sigset_t *__restrict __sigdefault) - __THROW; + __THROW __nonnull ((1, 2)); /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr, const sigset_t *__restrict __sigdefault) - __THROW; + __THROW __nonnull ((1, 2)); /* Store signal mask for the new process from ATTR in SIGMASK. */ extern int posix_spawnattr_getsigmask (const posix_spawnattr_t *__restrict __attr, - sigset_t *__restrict __sigmask) __THROW; + sigset_t *__restrict __sigmask) + __THROW __nonnull ((1, 2)); /* Set signal mask for the new process in ATTR to SIGMASK. */ extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr, const sigset_t *__restrict __sigmask) - __THROW; + __THROW __nonnull ((1, 2)); /* Get flag word from the attribute structure. */ extern int posix_spawnattr_getflags (const posix_spawnattr_t *__restrict __attr, - short int *__restrict __flags) __THROW; + short int *__restrict __flags) + __THROW __nonnull ((1, 2)); /* Store flags in the attribute structure. */ extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr, - short int __flags) __THROW; + short int __flags) + __THROW __nonnull ((1)); /* Get process group ID from the attribute structure. */ extern int posix_spawnattr_getpgroup (const posix_spawnattr_t *__restrict __attr, pid_t *__restrict __pgroup) - __THROW; + __THROW __nonnull ((1, 2)); /* Store process group ID in the attribute structure. */ extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr, - pid_t __pgroup) __THROW; + pid_t __pgroup) + __THROW __nonnull ((1)); /* Get scheduling policy from the attribute structure. */ extern int posix_spawnattr_getschedpolicy (const posix_spawnattr_t * __restrict __attr, int *__restrict __schedpolicy) - __THROW; + __THROW __nonnull ((1, 2)); /* Store scheduling policy in the attribute structure. */ extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr, - int __schedpolicy) __THROW; + int __schedpolicy) + __THROW __nonnull ((1)); /* Get scheduling parameters from the attribute structure. */ extern int posix_spawnattr_getschedparam (const posix_spawnattr_t * __restrict __attr, struct sched_param *__restrict - __schedparam) __THROW; + __schedparam) + __THROW __nonnull ((1, 2)); /* Store scheduling parameters in the attribute structure. */ extern int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr, const struct sched_param * - __restrict __schedparam) __THROW; - + __restrict __schedparam) + __THROW __nonnull ((1, 2)); /* Initialize data structure for file attribute for `spawn' call. */ extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t * - __file_actions) __THROW; + __file_actions) + __THROW __nonnull ((1)); /* Free resources associated with FILE-ACTIONS. */ extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t * - __file_actions) __THROW; + __file_actions) + __THROW __nonnull ((1)); /* Add an action to FILE-ACTIONS which tells the implementation to call `open' for the given file during the `spawn' call. */ @@ -171,20 +185,54 @@ extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * int __fd, const char *__restrict __path, int __oflag, mode_t __mode) - __THROW; + __THROW __nonnull ((1, 3)); /* Add an action to FILE-ACTIONS which tells the implementation to call `close' for the given file descriptor during the `spawn' call. */ extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t * __file_actions, int __fd) - __THROW; + __THROW __nonnull ((1)); /* Add an action to FILE-ACTIONS which tells the implementation to call `dup2' for the given file descriptors during the `spawn' call. */ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t * __file_actions, - int __fd, int __newfd) __THROW; + int __fd, int __newfd) + __THROW __nonnull ((1)); + +#ifdef __USE_MISC +/* Add an action changing the directory to PATH during spawn. This + affects the subsequent file actions. */ +extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t * + __restrict __actions, + const char *__restrict __path) + __THROW __nonnull ((1, 2)); + +/* Add an action changing the directory to FD during spawn. This + affects the subsequent file actions. FD is not duplicated and must + be open when the file action is executed. */ +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)); + +/* Add an action to set the process group of the foreground process group + associated with the terminal TCFD. */ +extern int +posix_spawn_file_actions_addtcsetpgrp_np (posix_spawn_file_actions_t *, + int __tcfd) + __THROW __nonnull ((1)); + +#endif /* __USE_MISC */ __END_DECLS +#include + #endif /* spawn.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdc-predef.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdc-predef.h index c5697594..2c5864aa 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdc-predef.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdc-predef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _STDC_PREDEF_H #define _STDC_PREDEF_H 1 @@ -36,17 +36,21 @@ #ifdef __GCC_IEC_559 # if __GCC_IEC_559 > 0 # define __STDC_IEC_559__ 1 +# define __STDC_IEC_60559_BFP__ 201404L # endif #else # define __STDC_IEC_559__ 1 +# define __STDC_IEC_60559_BFP__ 201404L #endif #ifdef __GCC_IEC_559_COMPLEX # if __GCC_IEC_559_COMPLEX > 0 # define __STDC_IEC_559_COMPLEX__ 1 +# define __STDC_IEC_60559_COMPLEX__ 201404L # endif #else # define __STDC_IEC_559_COMPLEX__ 1 +# define __STDC_IEC_60559_COMPLEX__ 201404L #endif /* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is @@ -57,7 +61,4 @@ - 3 additional Zanabazar Square characters */ #define __STDC_ISO_10646__ 201706L -/* We do not support C11 . */ -#define __STDC_NO_THREADS__ 1 - #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdint.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdint.h index 046d8bf0..01a9abc9 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdint.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdint.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99: 7.18 Integer types @@ -38,28 +38,7 @@ /* Small types. */ - -/* Signed. */ -typedef signed char int_least8_t; -typedef short int int_least16_t; -typedef int int_least32_t; -#if __WORDSIZE == 64 -typedef long int int_least64_t; -#else -__extension__ -typedef long long int int_least64_t; -#endif - -/* Unsigned. */ -typedef unsigned char uint_least8_t; -typedef unsigned short int uint_least16_t; -typedef unsigned int uint_least32_t; -#if __WORDSIZE == 64 -typedef unsigned long int uint_least64_t; -#else -__extension__ -typedef unsigned long long int uint_least64_t; -#endif +#include /* Fast types. */ @@ -283,7 +262,7 @@ typedef __uintmax_t uintmax_t; # define UINTMAX_C(c) c ## ULL # endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) # define INT8_WIDTH 8 # define UINT8_WIDTH 8 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdio.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdio.h index 95bc902a..6762cffb 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdio.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdio.h @@ -1,5 +1,6 @@ /* Define ISO C stdio on top of C++ iostreams. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 Free Software Foundation, Inc. + Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -14,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.19 Input/output @@ -32,18 +33,24 @@ __BEGIN_DECLS #define __need_NULL #include +#define __need___va_list +#include + #include +#include +#include #include #include +#include -#define _STDIO_USES_IOSTREAM - -#include +#ifdef __USE_MISC +# include +#endif #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # ifdef __GNUC__ # ifndef _VA_LIST_DEFINED -typedef _G_va_list va_list; +typedef __gnuc_va_list va_list; # define _VA_LIST_DEFINED # endif # else @@ -75,12 +82,12 @@ typedef __ssize_t ssize_t; /* The type of the second argument to `fgetpos' and `fsetpos'. */ #ifndef __USE_FILE_OFFSET64 -typedef _G_fpos_t fpos_t; +typedef __fpos_t fpos_t; #else -typedef _G_fpos64_t fpos_t; +typedef __fpos64_t fpos_t; #endif #ifdef __USE_LARGEFILE64 -typedef _G_fpos64_t fpos64_t; +typedef __fpos64_t fpos64_t; #endif /* The possibilities for the third argument to `setvbuf'. */ @@ -90,16 +97,12 @@ typedef _G_fpos64_t fpos64_t; /* Default buffer size. */ -#ifndef BUFSIZ -# define BUFSIZ _IO_BUFSIZ -#endif +#define BUFSIZ 8192 -/* End of file character. - Some things throughout the library rely on this being -1. */ -#ifndef EOF -# define EOF (-1) -#endif +/* The value returned by fgetc and similar functions to indicate the + end of the file. */ +#define EOF (-1) /* The possibilities for the third argument to `fseek'. @@ -118,23 +121,34 @@ typedef _G_fpos64_t fpos64_t; # define P_tmpdir "/tmp" #endif +#define L_tmpnam 20 +#define TMP_MAX 238328 /* Get the values: - L_tmpnam How long an array of chars must be to be passed to `tmpnam'. - TMP_MAX The minimum number of unique filenames generated by tmpnam - (and tempnam when it uses tmpnam's name space), - or tempnam (the two are separate). - L_ctermid How long an array to pass to `ctermid'. - L_cuserid How long an array to pass to `cuserid'. - FOPEN_MAX Minimum number of files that can be open at once. FILENAME_MAX Maximum length of a filename. */ #include +#ifdef __USE_POSIX +# define L_ctermid 9 +# if !defined __USE_XOPEN2K || defined __USE_GNU +# define L_cuserid 9 +# endif +#endif + +#undef FOPEN_MAX +#define FOPEN_MAX 16 + + +#if __GLIBC_USE (ISOC2X) +/* Maximum length of printf output for a NaN. */ +# define _PRINTF_NAN_LEN_MAX 4 +#endif + /* Standard streams. */ -extern struct _IO_FILE *stdin; /* Standard input stream. */ -extern struct _IO_FILE *stdout; /* Standard output stream. */ -extern struct _IO_FILE *stderr; /* Standard error output stream. */ +extern FILE *stdin; /* Standard input stream. */ +extern FILE *stdout; /* Standard output stream. */ +extern FILE *stderr; /* Standard error output stream. */ /* C89/C99 say they're macros. Make them happy. */ #define stdin stdin #define stdout stdout @@ -151,31 +165,55 @@ extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __THROW; #endif +#ifdef __USE_GNU +/* Flags for renameat2. */ +# define RENAME_NOREPLACE (1 << 0) +# define RENAME_EXCHANGE (1 << 1) +# define RENAME_WHITEOUT (1 << 2) + +/* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with + additional flags. */ +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) __nonnull ((1)); + +#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 @@ -188,15 +226,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 @@ -230,23 +262,24 @@ 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 marked with __THROW. */ extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, - FILE *__restrict __stream) __wur; + FILE *__restrict __stream) __wur __nonnull ((3)); #else # 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) - __wur; + __wur __nonnull ((3)); # else # define fopen fopen64 # define freopen freopen64 @@ -254,54 +287,66 @@ 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; + FILE *__restrict __stream) __wur __nonnull ((3)); #endif #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 +#ifdef __USE_MISC /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, - _IO_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 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; +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW + __nonnull ((1)); /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, - int __modes, size_t __n) __THROW; + int __modes, size_t __n) __THROW __nonnull ((1)); #ifdef __USE_MISC /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, - size_t __size) __THROW; + size_t __size) __THROW __nonnull ((1)); /* Make STREAM line-buffered. */ -extern void setlinebuf (FILE *__stream) __THROW; +extern void setlinebuf (FILE *__stream) __THROW __nonnull ((1)); #endif @@ -310,7 +355,7 @@ extern void setlinebuf (FILE *__stream) __THROW; This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, - const char *__restrict __format, ...); + const char *__restrict __format, ...) __nonnull ((1)); /* Write formatted output to stdout. This function is a possible cancellation point and therefore not @@ -325,15 +370,15 @@ extern int sprintf (char *__restrict __s, This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, - _G_va_list __arg); + __gnuc_va_list __arg) __nonnull ((1)); /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vprintf (const char *__restrict __format, _G_va_list __arg); +extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to S from argument list ARG. */ extern int vsprintf (char *__restrict __s, const char *__restrict __format, - _G_va_list __arg) __THROWNL; + __gnuc_va_list __arg) __THROWNL; #if defined __USE_ISOC99 || defined __USE_UNIX98 /* Maximum chars of output to write in MAXLEN. */ @@ -342,15 +387,15 @@ extern int snprintf (char *__restrict __s, size_t __maxlen, __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, - const char *__restrict __format, _G_va_list __arg) + const char *__restrict __format, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 3, 0))); #endif -#if __GLIBC_USE (LIB_EXT2) +#if defined (__USE_MISC) || __GLIBC_USE (LIB_EXT2) /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, - _G_va_list __arg) + __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) @@ -363,7 +408,7 @@ extern int asprintf (char **__restrict __ptr, #ifdef __USE_XOPEN2K8 /* Write formatted output to a file descriptor. */ extern int vdprintf (int __fd, const char *__restrict __fmt, - _G_va_list __arg) + __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); @@ -375,7 +420,7 @@ extern int dprintf (int __fd, const char *__restrict __fmt, ...) This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, - const char *__restrict __format, ...) __wur; + const char *__restrict __format, ...) __wur __nonnull ((1)); /* Read formatted input from stdin. This function is a possible cancellation point and therefore not @@ -385,30 +430,55 @@ extern int scanf (const char *__restrict __format, ...) __wur; extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; -#if defined __USE_ISOC99 && !defined __USE_GNU \ - && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ - && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) -# ifdef __REDIRECT -/* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ - GNU extension which conflicts with valid %a followed by letter - s, S or [. */ +/* For historical reasons, the C99-compliant versions of the scanf + functions are at alternative names. When __LDBL_COMPAT or + __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in + bits/stdio-ldbl.h. */ +#include +#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 +# if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT extern int __REDIRECT (fscanf, (FILE *__restrict __stream, const char *__restrict __format, ...), - __isoc99_fscanf) __wur; + __isoc23_fscanf) __wur __nonnull ((1)); +extern int __REDIRECT (scanf, (const char *__restrict __format, ...), + __isoc23_scanf) __wur; +extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, + const char *__restrict __format, ...), + __isoc23_sscanf); +# else +extern int __isoc23_fscanf (FILE *__restrict __stream, + const char *__restrict __format, ...) __wur + __nonnull ((1)); +extern int __isoc23_scanf (const char *__restrict __format, ...) __wur; +extern int __isoc23_sscanf (const char *__restrict __s, + const char *__restrict __format, ...) __THROW; +# define fscanf __isoc23_fscanf +# define scanf __isoc23_scanf +# define sscanf __isoc23_sscanf +# endif +# else +# ifdef __REDIRECT +extern int __REDIRECT (fscanf, (FILE *__restrict __stream, + const char *__restrict __format, ...), + __isoc99_fscanf) __wur __nonnull ((1)); extern int __REDIRECT (scanf, (const char *__restrict __format, ...), __isoc99_scanf) __wur; extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, const char *__restrict __format, ...), __isoc99_sscanf); -# else +# else extern int __isoc99_fscanf (FILE *__restrict __stream, - const char *__restrict __format, ...) __wur; + const char *__restrict __format, ...) __wur + __nonnull ((1)); extern int __isoc99_scanf (const char *__restrict __format, ...) __wur; extern int __isoc99_sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; -# define fscanf __isoc99_fscanf -# define scanf __isoc99_scanf -# define sscanf __isoc99_sscanf +# define fscanf __isoc99_fscanf +# define scanf __isoc99_scanf +# define sscanf __isoc99_sscanf +# endif # endif #endif @@ -418,53 +488,81 @@ extern int __isoc99_sscanf (const char *__restrict __s, This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, - _G_va_list __arg) - __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __wur __nonnull ((1)); /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int vscanf (const char *__restrict __format, _G_va_list __arg) +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; /* Read formatted input from S into argument list ARG. */ extern int vsscanf (const char *__restrict __s, - const char *__restrict __format, _G_va_list __arg) + const char *__restrict __format, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); -# if !defined __USE_GNU \ - && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ - && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) -# ifdef __REDIRECT -/* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ - GNU extension which conflicts with valid %a followed by letter - s, S or [. */ +/* Same redirection as above for the v*scanf family. */ +# if !__GLIBC_USE (DEPRECATED_SCANF) +# if __GLIBC_USE (C2X_STRTOL) +# if defined __REDIRECT && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 extern int __REDIRECT (vfscanf, (FILE *__restrict __s, - const char *__restrict __format, _G_va_list __arg), - __isoc99_vfscanf) - __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; + const char *__restrict __format, __gnuc_va_list __arg), + __isoc23_vfscanf) + __attribute__ ((__format__ (__scanf__, 2, 0))) __wur __nonnull ((1)); extern int __REDIRECT (vscanf, (const char *__restrict __format, - _G_va_list __arg), __isoc99_vscanf) + __gnuc_va_list __arg), __isoc23_vscanf) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; extern int __REDIRECT_NTH (vsscanf, (const char *__restrict __s, const char *__restrict __format, - _G_va_list __arg), __isoc99_vsscanf) + __gnuc_va_list __arg), __isoc23_vsscanf) __attribute__ ((__format__ (__scanf__, 2, 0))); +# elif !defined __REDIRECT +extern int __isoc23_vfscanf (FILE *__restrict __s, + const char *__restrict __format, + __gnuc_va_list __arg) __wur __nonnull ((1)); +extern int __isoc23_vscanf (const char *__restrict __format, + __gnuc_va_list __arg) __wur; +extern int __isoc23_vsscanf (const char *__restrict __s, + const char *__restrict __format, + __gnuc_va_list __arg) __THROW; +# define vfscanf __isoc23_vfscanf +# define vscanf __isoc23_vscanf +# define vsscanf __isoc23_vsscanf +# endif # else +# if defined __REDIRECT && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 +extern int __REDIRECT (vfscanf, + (FILE *__restrict __s, + const char *__restrict __format, __gnuc_va_list __arg), + __isoc99_vfscanf) + __attribute__ ((__format__ (__scanf__, 2, 0))) __wur __nonnull ((1)); +extern int __REDIRECT (vscanf, (const char *__restrict __format, + __gnuc_va_list __arg), __isoc99_vscanf) + __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; +extern int __REDIRECT_NTH (vsscanf, + (const char *__restrict __s, + const char *__restrict __format, + __gnuc_va_list __arg), __isoc99_vsscanf) + __attribute__ ((__format__ (__scanf__, 2, 0))); +# elif !defined __REDIRECT extern int __isoc99_vfscanf (FILE *__restrict __s, const char *__restrict __format, - _G_va_list __arg) __wur; + __gnuc_va_list __arg) __wur __nonnull ((1)); extern int __isoc99_vscanf (const char *__restrict __format, - _G_va_list __arg) __wur; + __gnuc_va_list __arg) __wur; extern int __isoc99_vsscanf (const char *__restrict __s, const char *__restrict __format, - _G_va_list __arg) __THROW; -# define vfscanf __isoc99_vfscanf -# define vscanf __isoc99_vscanf -# define vsscanf __isoc99_vsscanf + __gnuc_va_list __arg) __THROW; +# define vfscanf __isoc99_vfscanf +# define vscanf __isoc99_vscanf +# define vsscanf __isoc99_vsscanf +# endif # endif # endif #endif /* Use ISO C9x. */ @@ -474,8 +572,8 @@ extern int __isoc99_vsscanf (const char *__restrict __s, These functions are possible cancellation points and therefore not marked with __THROW. */ -extern int fgetc (FILE *__stream); -extern int getc (FILE *__stream); +extern int fgetc (FILE *__stream) __nonnull ((1)); +extern int getc (FILE *__stream) __nonnull ((1)); /* Read a character from stdin. @@ -483,16 +581,12 @@ extern int getc (FILE *__stream); marked with __THROW. */ extern int getchar (void); -/* The C standard explicitly says this is a macro, so we always do the - optimization for it. */ -#define getc(_fp) _IO_getc (_fp) - #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ -extern int getc_unlocked (FILE *__stream); +extern int getc_unlocked (FILE *__stream) __nonnull ((1)); extern int getchar_unlocked (void); #endif /* Use POSIX. */ @@ -503,7 +597,7 @@ extern int getchar_unlocked (void); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int fgetc_unlocked (FILE *__stream); +extern int fgetc_unlocked (FILE *__stream) __nonnull ((1)); #endif /* Use MISC. */ @@ -514,8 +608,8 @@ extern int fgetc_unlocked (FILE *__stream); These functions is a possible cancellation point and therefore not marked with __THROW. */ -extern int fputc (int __c, FILE *__stream); -extern int putc (int __c, FILE *__stream); +extern int fputc (int __c, FILE *__stream) __nonnull ((2)); +extern int putc (int __c, FILE *__stream) __nonnull ((2)); /* Write a character to stdout. @@ -523,10 +617,6 @@ extern int putc (int __c, FILE *__stream); marked with __THROW. */ extern int putchar (int __c); -/* The C standard explicitly says this can be a macro, - so we always do the optimization for it. */ -#define putc(_ch, _fp) _IO_putc (_ch, _fp) - #ifdef __USE_MISC /* Faster version when locking is not necessary. @@ -534,7 +624,7 @@ extern int putchar (int __c); cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern int fputc_unlocked (int __c, FILE *__stream); +extern int fputc_unlocked (int __c, FILE *__stream) __nonnull ((2)); #endif /* Use MISC. */ #ifdef __USE_POSIX199506 @@ -542,7 +632,7 @@ extern int fputc_unlocked (int __c, FILE *__stream); These functions are possible cancellation points and therefore not marked with __THROW. */ -extern int putc_unlocked (int __c, FILE *__stream); +extern int putc_unlocked (int __c, FILE *__stream) __nonnull ((2)); extern int putchar_unlocked (int __c); #endif /* Use POSIX. */ @@ -550,10 +640,10 @@ extern int putchar_unlocked (int __c); #if defined __USE_MISC \ || (defined __USE_XOPEN && !defined __USE_XOPEN2K) /* Get a word (int) from STREAM. */ -extern int getw (FILE *__stream); +extern int getw (FILE *__stream) __nonnull ((1)); /* Write a word (int) to STREAM. */ -extern int putw (int __w, FILE *__stream); +extern int putw (int __w, FILE *__stream) __nonnull ((2)); #endif @@ -562,7 +652,7 @@ extern int putw (int __w, FILE *__stream); This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) - __wur; + __wur __fortified_attr_access (__write_only__, 1, 2) __nonnull ((3)); #if __GLIBC_USE (DEPRECATED_GETS) /* Get a newline-terminated string from stdin, removing the newline. @@ -585,7 +675,8 @@ extern char *gets (char *__s) __wur __attribute_deprecated__; or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, - FILE *__restrict __stream) __wur; + FILE *__restrict __stream) __wur + __fortified_attr_access (__write_only__, 1, 2) __nonnull ((3)); #endif @@ -600,12 +691,12 @@ extern char *fgets_unlocked (char *__restrict __s, int __n, cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ -extern _IO_ssize_t __getdelim (char **__restrict __lineptr, - size_t *__restrict __n, int __delimiter, - FILE *__restrict __stream) __wur; -extern _IO_ssize_t getdelim (char **__restrict __lineptr, - size_t *__restrict __n, int __delimiter, - FILE *__restrict __stream) __wur; +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __wur __nonnull ((4)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __wur __nonnull ((4)); /* Like `getdelim', but reads up to a newline. @@ -613,9 +704,9 @@ extern _IO_ssize_t getdelim (char **__restrict __lineptr, cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ -extern _IO_ssize_t getline (char **__restrict __lineptr, - size_t *__restrict __n, - FILE *__restrict __stream) __wur; +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __wur __nonnull ((3)); #endif @@ -623,7 +714,8 @@ extern _IO_ssize_t getline (char **__restrict __lineptr, This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fputs (const char *__restrict __s, FILE *__restrict __stream); +extern int fputs (const char *__restrict __s, FILE *__restrict __stream) + __nonnull ((2)); /* Write a string, followed by a newline, to stdout. @@ -636,7 +728,7 @@ extern int puts (const char *__s); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int ungetc (int __c, FILE *__stream); +extern int ungetc (int __c, FILE *__stream) __nonnull ((2)); /* Read chunks of generic data from STREAM. @@ -644,13 +736,14 @@ extern int ungetc (int __c, FILE *__stream); This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fread (void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream) __wur; + size_t __n, FILE *__restrict __stream) __wur + __nonnull((4)); /* Write chunks of generic data to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __s); + size_t __n, FILE *__restrict __s) __nonnull((4)); #ifdef __USE_GNU /* This function does the same as `fputs' but does not lock the stream. @@ -660,7 +753,7 @@ extern size_t fwrite (const void *__restrict __ptr, size_t __size, or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputs_unlocked (const char *__restrict __s, - FILE *__restrict __stream); + FILE *__restrict __stream) __nonnull ((2)); #endif #ifdef __USE_MISC @@ -671,9 +764,11 @@ extern int fputs_unlocked (const char *__restrict __s, or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream) __wur; + size_t __n, FILE *__restrict __stream) __wur + __nonnull ((4)); extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream); + size_t __n, FILE *__restrict __stream) + __nonnull ((4)); #endif @@ -681,17 +776,18 @@ extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fseek (FILE *__stream, long int __off, int __whence); +extern int fseek (FILE *__stream, long int __off, int __whence) + __nonnull ((1)); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern long int ftell (FILE *__stream) __wur; +extern long int ftell (FILE *__stream) __wur __nonnull ((1)); /* Rewind to the beginning of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern void rewind (FILE *__stream); +extern void rewind (FILE *__stream) __nonnull ((1)); /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with @@ -704,18 +800,20 @@ extern void rewind (FILE *__stream); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fseeko (FILE *__stream, __off_t __off, int __whence); +extern int fseeko (FILE *__stream, __off_t __off, int __whence) + __nonnull ((1)); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern __off_t ftello (FILE *__stream) __wur; +extern __off_t ftello (FILE *__stream) __wur __nonnull ((1)); # else # ifdef __REDIRECT extern int __REDIRECT (fseeko, (FILE *__stream, __off64_t __off, int __whence), - fseeko64); -extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64); + fseeko64) __nonnull ((1)); +extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64) + __nonnull ((1)); # else # define fseeko fseeko64 # define ftello ftello64 @@ -728,18 +826,21 @@ extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) + __nonnull ((1)); /* Set STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int fsetpos (FILE *__stream, const fpos_t *__pos); +extern int fsetpos (FILE *__stream, const fpos_t *__pos) __nonnull ((1)); #else # ifdef __REDIRECT extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, - fpos_t *__restrict __pos), fgetpos64); + fpos_t *__restrict __pos), fgetpos64) + __nonnull ((1)); extern int __REDIRECT (fsetpos, - (FILE *__stream, const fpos_t *__pos), fsetpos64); + (FILE *__stream, const fpos_t *__pos), fsetpos64) + __nonnull ((1)); # else # define fgetpos fgetpos64 # define fsetpos fsetpos64 @@ -747,24 +848,26 @@ extern int __REDIRECT (fsetpos, #endif #ifdef __USE_LARGEFILE64 -extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); -extern __off64_t ftello64 (FILE *__stream) __wur; -extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); -extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) + __nonnull ((1)); +extern __off64_t ftello64 (FILE *__stream) __wur __nonnull ((1)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos) + __nonnull ((1)); +extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos) __nonnull ((1)); #endif /* Clear the error and EOF indicators for STREAM. */ -extern void clearerr (FILE *__stream) __THROW; +extern void clearerr (FILE *__stream) __THROW __nonnull ((1)); /* Return the EOF indicator for STREAM. */ -extern int feof (FILE *__stream) __THROW __wur; +extern int feof (FILE *__stream) __THROW __wur __nonnull ((1)); /* Return the error indicator for STREAM. */ -extern int ferror (FILE *__stream) __THROW __wur; +extern int ferror (FILE *__stream) __THROW __wur __nonnull ((1)); #ifdef __USE_MISC /* Faster versions when locking is not required. */ -extern void clearerr_unlocked (FILE *__stream) __THROW; -extern int feof_unlocked (FILE *__stream) __THROW __wur; -extern int ferror_unlocked (FILE *__stream) __THROW __wur; +extern void clearerr_unlocked (FILE *__stream) __THROW __nonnull ((1)); +extern int feof_unlocked (FILE *__stream) __THROW __wur __nonnull ((1)); +extern int ferror_unlocked (FILE *__stream) __THROW __wur __nonnull ((1)); #endif @@ -772,50 +875,48 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur; This function is a possible cancellation point and therefore not marked with __THROW. */ -extern void perror (const char *__s); - -/* Provide the declarations for `sys_errlist' and `sys_nerr' if they - are available on this system. Even if available, these variables - should not be used directly. The `strerror' function provides - all the necessary functionality. */ -#include +extern void perror (const char *__s) __COLD; #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ -extern int fileno (FILE *__stream) __THROW __wur; +extern int fileno (FILE *__stream) __THROW __wur __nonnull ((1)); #endif /* Use POSIX. */ #ifdef __USE_MISC /* Faster version when locking is not required. */ -extern int fileno_unlocked (FILE *__stream) __THROW __wur; +extern int fileno_unlocked (FILE *__stream) __THROW __wur __nonnull ((1)); #endif #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) __nonnull ((1)); -/* 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. */ @@ -828,7 +929,7 @@ extern int obstack_printf (struct obstack *__restrict __obstack, __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, - _G_va_list __args) + __gnuc_va_list __args) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))); #endif /* Use GNU. */ @@ -837,14 +938,14 @@ extern int obstack_vprintf (struct obstack *__restrict __obstack, /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ -extern void flockfile (FILE *__stream) __THROW; +extern void flockfile (FILE *__stream) __THROW __nonnull ((1)); /* Try to acquire ownership of STREAM but do not block if it is not possible. */ -extern int ftrylockfile (FILE *__stream) __THROW __wur; +extern int ftrylockfile (FILE *__stream) __THROW __wur __nonnull ((1)); /* Relinquish the ownership granted for STREAM. */ -extern void funlockfile (FILE *__stream) __THROW; +extern void funlockfile (FILE *__stream) __THROW __nonnull ((1)); #endif /* POSIX */ #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU @@ -853,17 +954,31 @@ extern void funlockfile (FILE *__stream) __THROW; # include #endif +/* Slow-path routines used by the optimized inline functions in + bits/stdio.h. */ +extern int __uflow (FILE *); +extern int __overflow (FILE *, int); + +#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function +/* Declare all functions from bits/stdio2-decl.h first. */ +# include +#endif + +/* The following headers provide asm redirections. These redirections must + appear before the first usage of these functions, e.g. in bits/stdio.h. */ +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# include +#endif + /* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */ #ifdef __USE_EXTERN_INLINES # include #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function +/* Now include the function definitions and redirects too. */ # include #endif -#ifdef __LDBL_COMPAT -# include -#endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdlib.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdlib.h index 6b1ead31..414c49d7 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdlib.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/stdlib.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 Free Software Foundation, Inc. + Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.20 General utilities @@ -207,8 +208,73 @@ extern unsigned long long int strtoull (const char *__restrict __nptr, __THROW __nonnull ((1)); #endif /* ISO C99 or use MISC. */ +/* Versions of the above functions that handle '0b' and '0B' prefixes + in base 0 or 2. */ +#if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtol) + __nonnull ((1)); +extern unsigned long int __REDIRECT_NTH (strtoul, + (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoul) + __nonnull ((1)); +# ifdef __USE_MISC +__extension__ +extern long long int __REDIRECT_NTH (strtoq, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoll) + __nonnull ((1)); +__extension__ +extern unsigned long long int __REDIRECT_NTH (strtouq, + (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoull) + __nonnull ((1)); +# endif +__extension__ +extern long long int __REDIRECT_NTH (strtoll, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoll) + __nonnull ((1)); +__extension__ +extern unsigned long long int __REDIRECT_NTH (strtoull, + (const char *__restrict __nptr, + char **__restrict __endptr, + int __base), __isoc23_strtoull) + __nonnull ((1)); +# else +extern long int __isoc23_strtol (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW __nonnull ((1)); +extern unsigned long int __isoc23_strtoul (const char *__restrict __nptr, + char **__restrict __endptr, + int __base) + __THROW __nonnull ((1)); +__extension__ +extern long long int __isoc23_strtoll (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW __nonnull ((1)); +__extension__ +extern unsigned long long int __isoc23_strtoull (const char *__restrict __nptr, + char **__restrict __endptr, + int __base) + __THROW __nonnull ((1)); +# define strtol __isoc23_strtol +# define strtoul __isoc23_strtoul +# ifdef __USE_MISC +# define strtoq __isoc23_strtoll +# define strtouq __isoc23_strtoull +# endif +# define strtoll __isoc23_strtoll +# define strtoull __isoc23_strtoull +# endif +#endif + /* Convert a floating-point number to a string. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __THROW __nonnull ((3)); @@ -292,6 +358,60 @@ extern unsigned long long int strtoull_l (const char *__restrict __nptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); +/* Versions of the above functions that handle '0b' and '0B' prefixes + in base 0 or 2. */ +# if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_strtol_l) + __nonnull ((1, 4)); +extern unsigned long int __REDIRECT_NTH (strtoul_l, + (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_strtoul_l) + __nonnull ((1, 4)); +__extension__ +extern long long int __REDIRECT_NTH (strtoll_l, (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, + locale_t __loc), + __isoc23_strtoll_l) + __nonnull ((1, 4)); +__extension__ +extern unsigned long long int __REDIRECT_NTH (strtoull_l, + (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_strtoull_l) + __nonnull ((1, 4)); +# else +extern long int __isoc23_strtol_l (const char *__restrict __nptr, + char **__restrict __endptr, int __base, + locale_t __loc) __THROW __nonnull ((1, 4)); +extern unsigned long int __isoc23_strtoul_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc) + __THROW __nonnull ((1, 4)); +__extension__ +extern long long int __isoc23_strtoll_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc) + __THROW __nonnull ((1, 4)); +__extension__ +extern unsigned long long int __isoc23_strtoull_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, locale_t __loc) + __THROW __nonnull ((1, 4)); +# define strtol_l __isoc23_strtol_l +# define strtoul_l __isoc23_strtoul_l +# define strtoll_l __isoc23_strtoll_l +# define strtoull_l __isoc23_strtoull_l +# endif +# endif + extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); @@ -397,7 +517,7 @@ extern long int a64l (const char *__s) `initstate' and `setstate' functions are those from BSD Unices. The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ -/* Return a random long integer between 0 and RAND_MAX inclusive. */ +/* Return a random long integer between 0 and 2^31-1 inclusive. */ extern long int random (void) __THROW; /* Seed the random number generator with the given number. */ @@ -532,14 +652,28 @@ extern int seed48_r (unsigned short int __seed16v[3], extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); + +/* Return a random integer between zero and 2**32-1 (inclusive). */ +extern __uint32_t arc4random (void) + __THROW __wur; + +/* Fill the buffer with random data. */ +extern void arc4random_buf (void *__buf, size_t __size) + __THROW __nonnull ((1)); + +/* Return a random number between zero (inclusive) and the specified + limit (exclusive). */ +extern __uint32_t arc4random_uniform (__uint32_t __upper_bound) + __THROW __wur; # endif /* Use misc. */ #endif /* Use misc or X/Open. */ /* Allocate SIZE bytes of memory. */ -extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur; +extern void *malloc (size_t __size) __THROW __attribute_malloc__ + __attribute_alloc_size__ ((1)) __wur; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) - __THROW __attribute_malloc__ __wur; + __THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur; /* Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. */ @@ -547,20 +681,26 @@ extern void *calloc (size_t __nmemb, size_t __size) the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) - __THROW __attribute_warn_unused_result__; + __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2)); -#ifdef __USE_GNU +/* 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. */ /* __attribute_malloc__ is not used, because if reallocarray returns 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__; -#endif + __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; +/* 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 @@ -569,7 +709,8 @@ extern void free (void *__ptr) __THROW; #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \ || defined __USE_MISC /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ -extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; +extern void *valloc (size_t __size) __THROW __attribute_malloc__ + __attribute_alloc_size__ ((1)) __wur; #endif #ifdef __USE_XOPEN2K @@ -581,7 +722,8 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ extern void *aligned_alloc (size_t __alignment, size_t __size) - __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur; + __THROW __attribute_malloc__ __attribute_alloc_align__ ((1)) + __attribute_alloc_size__ ((2)) __wur; #endif /* Abort execution and generate a core-dump. */ @@ -785,7 +927,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 @@ -928,12 +1071,14 @@ extern int wctomb (char *__s, wchar_t __wchar) __THROW; /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, - const char *__restrict __s, size_t __n) __THROW; + const char *__restrict __s, size_t __n) __THROW + __attr_access ((__read_only__, 2)); /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) - __THROW; - + __THROW + __fortified_attr_access (__write_only__, 1, 3) + __attr_access ((__read_only__, 2)); #ifdef __USE_MISC /* Determine whether the string value of RESPONSE matches the affirmation @@ -958,12 +1103,6 @@ extern int getsubopt (char **__restrict __optionp, #endif -#ifdef __USE_XOPEN -/* Setup DES tables according KEY. */ -extern void setkey (const char *__key) __THROW __nonnull ((1)); -#endif - - /* X/Open pseudo terminal handling. */ #ifdef __USE_XOPEN2KXSI @@ -993,7 +1132,7 @@ extern char *ptsname (int __fd) __THROW __wur; terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ptsname_r (int __fd, char *__buf, size_t __buflen) - __THROW __nonnull ((2)); + __THROW __nonnull ((2)) __fortified_attr_access (__write_only__, 2, 3); /* Open a master pseudo terminal and return its file descriptor. */ extern int getpt (void); @@ -1019,7 +1158,9 @@ extern int ttyslot (void) __THROW; #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include #endif -#ifdef __LDBL_COMPAT + +#include +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/string.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/string.h index 150cfd8b..10fca472 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/string.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/string.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.21 String handling @@ -33,7 +33,8 @@ __BEGIN_DECLS #include /* Tell the caller that we provide correct C++ prototypes. */ -#if defined __cplusplus && __GNUC_PREREQ (4, 4) +#if defined __cplusplus && (__GNUC_PREREQ (4, 4) \ + || __glibc_clang_prereq (3, 5)) # define __CORRECT_ISO_CPP_STRING_H_PROTO #endif @@ -49,10 +50,10 @@ extern void *memmove (void *__dest, const void *__src, size_t __n) /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ -#if defined __USE_MISC || defined __USE_XOPEN +#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X) extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) - __THROW __nonnull ((1, 2)); + __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4)); #endif /* Misc || X/Open. */ @@ -63,6 +64,22 @@ extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); extern int memcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); +/* Compare N bytes of S1 and S2. Return zero if S1 and S2 are equal. + Return some non-zero value otherwise. + + Essentially __memcmpeq has the exact same semantics as memcmp + except the return value is less constrained. memcmp is always a + correct implementation of __memcmpeq. As well !!memcmp, -memcmp, + or bcmp are correct implementations. + + __memcmpeq is meant to be used by compilers when memcmp return is + only used for its boolean value. + + __memcmpeq is declared only for use by compilers. Programs should + continue to use memcmp. */ +extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n) + __THROW __attribute_pure__ __nonnull ((1, 2)); + /* Search N bytes of S for C. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" @@ -107,12 +124,15 @@ extern void *rawmemchr (const void *__s, int __c) /* Search N bytes of S for the final occurrence of C. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *memrchr (void *__s, int __c, size_t __n) - __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); + __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)) + __attr_access ((__read_only__, 1, 3)); extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) - __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); + __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)) + __attr_access ((__read_only__, 1, 3)); # else extern void *memrchr (const void *__s, int __c, size_t __n) - __THROW __attribute_pure__ __nonnull ((1)); + __THROW __attribute_pure__ __nonnull ((1)) + __attr_access ((__read_only__, 1, 3)); # endif #endif @@ -145,7 +165,7 @@ extern int strcoll (const char *__s1, const char *__s2) /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) - __THROW __nonnull ((2)); + __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3)); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ @@ -157,11 +177,12 @@ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) /* Put a transformation of SRC into no more than N bytes of DEST, using sorting rules from L. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, - locale_t __l) __THROW __nonnull ((2, 4)); + locale_t __l) __THROW __nonnull ((2, 4)) + __attr_access ((__write_only__, 1, 3)); #endif #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \ - || __GLIBC_USE (LIB_EXT2)) + || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)) /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); @@ -170,7 +191,7 @@ extern char *strdup (const char *__s) /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ -#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) +#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X) extern char *strndup (const char *__string, size_t __n) __THROW __attribute_malloc__ __nonnull ((1)); #endif @@ -253,7 +274,7 @@ extern char *strrchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO @@ -347,7 +368,7 @@ extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, __THROW __nonnull ((2, 3)); #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* Similar to `strstr' but this function ignores the case of both strings. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strcasestr (char *__haystack, const char *__needle) @@ -361,13 +382,15 @@ extern char *strcasestr (const char *__haystack, const char *__needle) # endif #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) - __THROW __attribute_pure__ __nonnull ((1, 3)); + __THROW __attribute_pure__ __nonnull ((1, 3)) + __attr_access ((__read_only__, 1, 2)) + __attr_access ((__read_only__, 3, 4)); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ @@ -408,17 +431,25 @@ extern char *strerror (int __errnum) __THROW; # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (strerror_r, (int __errnum, char *__buf, size_t __buflen), - __xpg_strerror_r) __nonnull ((2)); + __xpg_strerror_r) __nonnull ((2)) + __attr_access ((__write_only__, 2, 3)); # else extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen) - __THROW __nonnull ((2)); + __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); # define strerror_r __xpg_strerror_r # endif # else /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) - __THROW __nonnull ((2)) __wur; + __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3)); +# endif + +# ifdef __USE_GNU +/* Return a string describing the meaning of tthe error in ERR. */ +extern const char *strerrordesc_np (int __err) __THROW; +/* Return a string with the error name in ERR. */ +extern const char *strerrorname_np (int __err) __THROW; # endif #endif @@ -432,7 +463,8 @@ extern char *strerror_l (int __errnum, locale_t __l) __THROW; /* Set N bytes of S to 0. The compiler will not delete a call to this function, even if S is dead after the call. */ -extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1)); +extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1)) + __fortified_attr_access (__write_only__, 1, 2); /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ @@ -445,6 +477,14 @@ extern char *strsep (char **__restrict __stringp, /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) __THROW; +# ifdef __USE_GNU +/* Return an abbreviation string for the signal number SIG. */ +extern const char *sigabbrev_np (int __sig) __THROW; +/* Return a string describing the meaning of the signal number in SIG, + the result is not translated. */ +extern const char *sigdescr_np (int __sig) __THROW; +# endif + /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); @@ -461,6 +501,19 @@ extern char *stpncpy (char *__restrict __dest, __THROW __nonnull ((1, 2)); #endif +#ifdef __USE_MISC +/* Copy at most N - 1 characters from SRC to DEST. */ +extern size_t strlcpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3)); + +/* Append SRC to DEST, possibly with truncation to keep the total size + below N. */ +extern size_t strlcat (char *__restrict __dest, + const char *__restrict __src, size_t __n) + __THROW __nonnull ((1, 2)) __attr_access ((__read_write__, 1, 3)); +#endif + #ifdef __USE_GNU /* Compare S1 and S2 as strings holding name & indices/version numbers. */ extern int strverscmp (const char *__s1, const char *__s2) @@ -470,7 +523,8 @@ extern int strverscmp (const char *__s1, const char *__s2) extern char *strfry (char *__string) __THROW __nonnull ((1)); /* Frobnicate N bytes of S. */ -extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)); +extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)) + __attr_access ((__read_write__, 1, 2)); # ifndef basename /* Return the file name within directory of FILENAME. We don't diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/strings.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/strings.h index f00d638f..ebf74127 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/strings.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/strings.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _STRINGS_H #define _STRINGS_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/termios.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/termios.h index a932fd68..85f232d5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/termios.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/termios.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 7.1-2 General Terminal Interface diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/time.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/time.h index 4b55e344..1609aaef 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/time.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/time.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.23 Date and time @@ -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,14 +81,26 @@ 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 of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, - const struct tm *__restrict __tp) __THROW; + const struct tm *__restrict __tp) + __THROW __nonnull((1, 3, 4)); #ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. @@ -114,6 +127,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 +136,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; -#ifdef __USE_POSIX +#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,14 +159,36 @@ 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; -#endif /* POSIX */ +# 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" that is the representation of TP in this format. */ 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 #ifdef __USE_POSIX /* Reentrant versions of the above functions. */ @@ -150,13 +199,23 @@ 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; +#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. */ -extern char *__tzname[2]; /* Current timezone names. */ +extern char *__tzname[2]; /* Current time zone abbreviations. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ @@ -175,12 +234,6 @@ extern int daylight; extern long int timezone; #endif -#ifdef __USE_MISC -/* Set the system time to *WHEN. - This call is restricted to the superuser. */ -extern int stime (const time_t *__when) __THROW; -#endif - /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ @@ -188,15 +241,32 @@ extern int stime (const time_t *__when) __THROW; ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +#if defined __USE_MISC || __GLIBC_USE (ISOC2X) +# ifndef __USE_TIME_BITS64 +/* Like `mktime', but for TP represents Universal Time, not local time. */ +extern time_t timegm (struct tm *__tp) __THROW; +# else +# ifdef __REDIRECT_NTH +extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64); +# else +# define timegm __timegm64 +# endif +# endif +#endif + + #ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ -/* Like `mktime', but for TP represents Universal Time, not local time. */ -extern time_t timegm (struct tm *__tp) __THROW; - +#ifndef __USE_TIME_BITS64 /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; +#else +# ifdef __REDIRECT_NTH +extern time_t __REDIRECT_NTH (timelocal, (struct tm *__tp), __mktime64); +# endif +#endif /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); @@ -204,6 +274,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 @@ -211,25 +282,58 @@ 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; /* Get current value of clock CLOCK_ID and store it in TP. */ -extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) + __THROW __nonnull((2)); /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) - __THROW; + __THROW __nonnull((2)); +# 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) + __nonnull((2)); +extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct + timespec *__tp), __clock_settime64) + __nonnull((2)); +# 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; @@ -245,6 +349,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; @@ -252,6 +357,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; @@ -259,9 +379,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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ucontext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ucontext.h index eec76116..f09bc451 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ucontext.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* System V ABI compliant user-level context switching support. */ @@ -22,6 +22,9 @@ #include +/* Get definition of __INDIRECT_RETURN. */ +#include + /* Get machine dependent definition of data structures. */ #include @@ -36,7 +39,8 @@ extern int setcontext (const ucontext_t *__ucp) __THROWNL; /* Save current context in context variable pointed to by OUCP and set context from variable pointed to by UCP. */ extern int swapcontext (ucontext_t *__restrict __oucp, - const ucontext_t *__restrict __ucp) __THROWNL; + const ucontext_t *__restrict __ucp) + __THROWNL __INDIRECT_RETURN; /* Manipulate user context UCP to continue with calling functions FUNC and the ARGC-1 parameters following ARGC when the context is used diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/unistd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/unistd.h index 4d149f99..54d7d752 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/unistd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/unistd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 2.10 Symbolic Constants @@ -107,9 +107,6 @@ __BEGIN_DECLS /* The X/Open Unix extensions are available. */ #define _XOPEN_UNIX 1 -/* Encryption is present. */ -#define _XOPEN_CRYPT 1 - /* The enhanced internationalization capabilities according to XPG4.2 are present. */ #define _XOPEN_ENH_I18N 1 @@ -298,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 @@ -355,18 +357,26 @@ 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. This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur; +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur + __fortified_attr_access (__write_only__, 2, 3); /* Write N bytes of BUF to FD. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur; +extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur + __attr_access ((__read_only__, 2, 3)); #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 # ifndef __USE_FILE_OFFSET64 @@ -377,7 +387,8 @@ extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur; This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, - __off_t __offset) __wur; + __off_t __offset) __wur + __fortified_attr_access (__write_only__, 2, 3); /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. @@ -385,15 +396,19 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, - __off_t __offset) __wur; + __off_t __offset) __wur + __attr_access ((__read_only__, 2, 3)); + # else # ifdef __REDIRECT extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes, __off64_t __offset), - pread64) __wur; + pread64) __wur + __fortified_attr_access (__write_only__, 2, 3); extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset), - pwrite64) __wur; + pwrite64) __wur + __attr_access ((__read_only__, 2, 3)); # else # define pread pread64 # define pwrite pwrite64 @@ -405,11 +420,13 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf, changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset) __wur; + __off64_t __offset) __wur + __fortified_attr_access (__write_only__, 2, 3); /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, - __off64_t __offset) __wur; + __off64_t __offset) __wur + __attr_access ((__read_only__, 2, 3)); # endif #endif @@ -526,7 +543,8 @@ extern char *get_current_dir_name (void) __THROW; If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ extern char *getwd (char *__buf) - __THROW __nonnull ((1)) __attribute_deprecated__ __wur; + __THROW __nonnull ((1)) __attribute_deprecated__ __wur + __attr_access ((__write_only__, 1)); #endif @@ -623,7 +641,8 @@ extern long int sysconf (int __name) __THROW; #ifdef __USE_POSIX2 /* Get the value of the string-valued system variable NAME. */ -extern size_t confstr (int __name, char *__buf, size_t __len) __THROW; +extern size_t confstr (int __name, char *__buf, size_t __len) __THROW + __fortified_attr_access (__write_only__, 2, 3); #endif @@ -689,8 +708,8 @@ extern __gid_t getegid (void) __THROW; /* If SIZE is zero, return the number of supplementary groups the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ -extern int getgroups (int __size, __gid_t __list[]) __THROW __wur; - +extern int getgroups (int __size, __gid_t __list[]) __THROW __wur + __fortified_attr_access (__write_only__, 2, 1); #ifdef __USE_GNU /* Return nonzero iff the calling process is in group GID. */ extern int group_member (__gid_t __gid) __THROW; @@ -767,6 +786,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. */ @@ -775,7 +801,8 @@ extern char *ttyname (int __fd) __THROW; /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ttyname_r (int __fd, char *__buf, size_t __buflen) - __THROW __nonnull ((2)) __wur; + __THROW __nonnull ((2)) __wur + __fortified_attr_access (__write_only__, 2, 3); /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ @@ -810,7 +837,9 @@ extern int symlink (const char *__from, const char *__to) Returns the number of characters read, or -1 for errors. */ extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) - __THROW __nonnull ((1, 2)) __wur; + __THROW __nonnull ((1, 2)) __wur + __fortified_attr_access (__write_only__, 2, 3); + #endif /* Use POSIX.1-2001. */ #ifdef __USE_ATFILE @@ -821,7 +850,8 @@ extern int symlinkat (const char *__from, int __tofd, /* Like readlink but a relative PATH is interpreted relative to FD. */ extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) - __THROW __nonnull ((2, 3)) __wur; + __THROW __nonnull ((2, 3)) __wur + __fortified_attr_access (__write_only__, 3, 4); #endif /* Remove the link NAME. */ @@ -856,7 +886,8 @@ extern char *getlogin (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)); +extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)) + __fortified_attr_access (__write_only__, 1, 2); #endif #ifdef __USE_MISC @@ -877,7 +908,8 @@ extern int setlogin (const char *__name) __THROW __nonnull ((1)); /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ -extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)); +extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)) + __fortified_attr_access (__write_only__, 1, 2); #endif @@ -885,7 +917,7 @@ extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)); /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ extern int sethostname (const char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; + __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2)); /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ @@ -896,10 +928,10 @@ extern int sethostid (long int __id) __THROW __wur; Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ extern int getdomainname (char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; + __THROW __nonnull ((1)) __wur + __fortified_attr_access (__write_only__, 1, 2); extern int setdomainname (const char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; - + __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2)); /* Revoke access permissions to all processes currently communicating with the control terminal, and then send a SIGHUP signal to the process @@ -1118,26 +1150,28 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff, extern int fdatasync (int __fildes); #endif /* Use POSIX199309 */ - -/* XPG4.2 specifies that prototypes for the encryption functions must - be defined here. */ -#ifdef __USE_XOPEN -/* Encrypt at most 8 characters from KEY using salt to perturb DES. */ +#ifdef __USE_MISC +/* One-way hash PHRASE, returning a string suitable for storage in the + user database. SALT selects the one-way function to use, and + ensures that no two users' hashes are the same, even if they use + the same passphrase. The return value points to static storage + which will be overwritten by the next call to crypt. + + This declaration is deprecated; applications should include + instead. */ extern char *crypt (const char *__key, const char *__salt) __THROW __nonnull ((1, 2)); +#endif -/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt - block in place. */ -extern void encrypt (char *__glibc_block, int __edflag) - __THROW __nonnull ((1)); - - +#ifdef __USE_XOPEN /* Swab pairs bytes in the first N bytes of the area pointed to by FROM and copy the result to TO. The value of TO must not be in the range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ extern void swab (const void *__restrict __from, void *__restrict __to, - ssize_t __n) __THROW __nonnull ((1, 2)); + ssize_t __n) __THROW __nonnull ((1, 2)) + __attr_access ((__read_only__, 1, 3)) + __attr_access ((__write_only__, 2, 3)); #endif @@ -1164,7 +1198,18 @@ extern int pthread_atfork (void (*__prepare) (void), #ifdef __USE_MISC /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ -int getentropy (void *__buffer, size_t __length) __wur; +int getentropy (void *__buffer, size_t __length) __wur + __attr_access ((__write_only__, 1, 2)); +#endif + +#ifdef __USE_GNU +/* 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 and gaps where the file descriptor is invalid or errors + encountered while closing file descriptors 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 /* Define some macros helping to catch buffer overflows. */ @@ -1172,6 +1217,9 @@ int getentropy (void *__buffer, size_t __length) __wur; # include #endif +/* System-specific extensions. */ +#include + __END_DECLS #endif /* unistd.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/utime.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/utime.h index 8409ba4d..c5eacedd 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/utime.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/utime.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 5.6.6 Set File Access and Modification Times @@ -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 */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wchar.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wchar.h index 6c94f3eb..e52fb185 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wchar.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wchar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.24 @@ -37,6 +37,17 @@ #define __need___va_list #include +#if defined __USE_XOPEN2K || defined __USE_XOPEN2K8 +# ifdef __GNUC__ +# ifndef _VA_LIST_DEFINED +typedef __gnuc_va_list va_list; +# define _VA_LIST_DEFINED +# endif +# else +# include +# endif +#endif + #include #include #include @@ -93,6 +104,19 @@ extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); +#ifdef __USE_MISC +/* Copy at most N - 1 characters from SRC to DEST. */ +extern size_t wcslcpy (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n) + __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 3)); + +/* Append SRC to DEST, possibly with truncation to keep the total size + below N. */ +extern size_t wcslcat (wchar_t *__restrict __dest, + const wchar_t *__restrict __src, size_t __n) + __THROW __nonnull ((1, 2)) __attr_access ((__read_write__, 1, 3)); +#endif + /* Append SRC onto DEST. */ extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) @@ -151,7 +175,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. */ @@ -385,42 +410,44 @@ extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ +#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) /* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */ -#if __HAVE_FLOAT16 && defined __USE_GNU +# if __HAVE_FLOAT16 extern _Float16 wcstof16 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT32 && defined __USE_GNU +# if __HAVE_FLOAT32 extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT64 && defined __USE_GNU +# if __HAVE_FLOAT64 extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT128 && defined __USE_GNU +# if __HAVE_FLOAT128 extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT32X && defined __USE_GNU +# if __HAVE_FLOAT32X extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT64X && defined __USE_GNU +# if __HAVE_FLOAT64X extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT128X && defined __USE_GNU +# if __HAVE_FLOAT128X extern _Float128x wcstof128x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif +#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) */ /* Convert initial portion of wide string NPTR to `long int' @@ -466,6 +493,67 @@ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, int __base) __THROW; #endif /* Use GNU. */ +/* Versions of the above functions that handle '0b' and '0B' prefixes + in base 0 or 2. */ +#if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern long int __REDIRECT_NTH (wcstol, (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base), __isoc23_wcstol); +extern unsigned long int __REDIRECT_NTH (wcstoul, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base), __isoc23_wcstoul); +__extension__ +extern long long int __REDIRECT_NTH (wcstoll, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base), __isoc23_wcstoll); +__extension__ +extern unsigned long long int __REDIRECT_NTH (wcstoull, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base), __isoc23_wcstoull); +# ifdef __USE_GNU +__extension__ +extern long long int __REDIRECT_NTH (wcstoq, (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base), __isoc23_wcstoll); +__extension__ +extern unsigned long long int __REDIRECT_NTH (wcstouq, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base), __isoc23_wcstoull); +# endif +# else +extern long int __isoc23_wcstol (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + __THROW; +extern unsigned long int __isoc23_wcstoul (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) + __THROW; +__extension__ +extern long long int __isoc23_wcstoll (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) + __THROW; +__extension__ +extern unsigned long long int __isoc23_wcstoull (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) + __THROW; +# define wcstol __isoc23_wcstol +# define wcstoul __isoc23_wcstoul +# define wcstoll __isoc23_wcstoll +# define wcstoull __isoc23_wcstoull +# ifdef __USE_GNU +# define wcstoq __isoc23_wcstoll +# define wcstouq __isoc23_wcstoull +# endif +# endif +#endif + #ifdef __USE_GNU /* Parallel versions of the functions above which take the locale to use as an additional parameter. These are GNU extensions inspired @@ -489,6 +577,56 @@ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, int __base, locale_t __loc) __THROW; +/* Versions of the above functions that handle '0b' and '0B' prefixes + in base 0 or 2. */ +# if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern long int __REDIRECT_NTH (wcstol_l, (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_wcstol_l); +extern unsigned long int __REDIRECT_NTH (wcstoul_l, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_wcstoul_l); +__extension__ +extern long long int __REDIRECT_NTH (wcstoll_l, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_wcstoll_l); +__extension__ +extern unsigned long long int __REDIRECT_NTH (wcstoull_l, + (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc), + __isoc23_wcstoull_l); +# else +extern long int __isoc23_wcstol_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + locale_t __loc) __THROW; +extern unsigned long int __isoc23_wcstoul_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc) + __THROW; +__extension__ +extern long long int __isoc23_wcstoll_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc) + __THROW; +__extension__ +extern unsigned long long int __isoc23_wcstoull_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, locale_t __loc) + __THROW; +# define wcstol_l __isoc23_wcstol_l +# define wcstoul_l __isoc23_wcstoul_l +# define wcstoll_l __isoc23_wcstoll_l +# define wcstoull_l __isoc23_wcstoull_l +# endif +# endif + extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; @@ -562,9 +700,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 ) 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 @@ -632,13 +784,38 @@ extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; -# if defined __USE_ISOC99 && !defined __USE_GNU \ - && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ - && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) -# ifdef __REDIRECT -/* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ - GNU extension which conflicts with valid %a followed by letter - s, S or [. */ +/* For historical reasons, the C99-compliant versions of the scanf + functions are at alternative names. When __LDBL_COMPAT or + __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in + bits/wchar-ldbl.h. */ +# if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 +# if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...), + __isoc23_fwscanf) + /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; +extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...), + __isoc23_wscanf) + /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; +extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + ...), __isoc23_swscanf) + /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; +# else +extern int __isoc23_fwscanf (__FILE *__restrict __stream, + const wchar_t *__restrict __format, ...); +extern int __isoc23_wscanf (const wchar_t *__restrict __format, ...); +extern int __isoc23_swscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, ...) + __THROW; +# define fwscanf __isoc23_fwscanf +# define wscanf __isoc23_wscanf +# define swscanf __isoc23_swscanf +# endif +# else +# ifdef __REDIRECT extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...), __isoc99_fwscanf) @@ -650,16 +827,17 @@ extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...), __isoc99_swscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; -# else +# else extern int __isoc99_fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...); extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); extern int __isoc99_swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW; -# define fwscanf __isoc99_fwscanf -# define wscanf __isoc99_wscanf -# define swscanf __isoc99_swscanf +# define fwscanf __isoc99_fwscanf +# define wscanf __isoc99_wscanf +# define swscanf __isoc99_swscanf +# endif # endif # endif @@ -687,10 +865,39 @@ extern int vswscanf (const wchar_t *__restrict __s, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; -# if !defined __USE_GNU \ +/* Same redirection as above for the v*wscanf family. */ +# if !__GLIBC_USE (DEPRECATED_SCANF) \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ - && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) -# ifdef __REDIRECT + && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 +# if __GLIBC_USE (C2X_STRTOL) +# ifdef __REDIRECT +extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), __isoc23_vfwscanf) + /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; +extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format, + __gnuc_va_list __arg), __isoc23_vwscanf) + /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; +extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg), __isoc23_vswscanf) + /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; +# else +extern int __isoc23_vfwscanf (__FILE *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg); +extern int __isoc23_vwscanf (const wchar_t *__restrict __format, + __gnuc_va_list __arg); +extern int __isoc23_vswscanf (const wchar_t *__restrict __s, + const wchar_t *__restrict __format, + __gnuc_va_list __arg) __THROW; +# define vfwscanf __isoc23_vfwscanf +# define vwscanf __isoc23_vwscanf +# define vswscanf __isoc23_vswscanf +# endif +# else +# ifdef __REDIRECT extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vfwscanf) @@ -702,7 +909,7 @@ extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vswscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; -# else +# else extern int __isoc99_vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg); @@ -711,9 +918,10 @@ extern int __isoc99_vwscanf (const wchar_t *__restrict __format, extern int __isoc99_vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW; -# define vfwscanf __isoc99_vfwscanf -# define vwscanf __isoc99_vwscanf -# define vswscanf __isoc99_vswscanf +# define vfwscanf __isoc99_vfwscanf +# define vwscanf __isoc99_vwscanf +# define vswscanf __isoc99_vswscanf +# endif # endif # endif @@ -847,13 +1055,21 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function -# include +/* Declare all functions from bits/wchar2-decl.h first. */ +# include #endif -#ifdef __LDBL_COMPAT +/* The following headers provide asm redirections. These redirections must + appear before the first usage of these functions, e.g. in bits/wchar.h. */ +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif +#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function +/* Now include the function definitions and redirects too. */ +# include +#endif + __END_DECLS #endif /* wchar.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wctype.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wctype.h index 14bf160d..8f127636 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wctype.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/wctype.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.25 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/byteorder.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/byteorder.h index 484e3cfd..149143ca 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/byteorder.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/byteorder.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_BYTEORDER_H #define _ASM_X86_BYTEORDER_H diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/mman.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/mman.h index d4a8d042..46cdc941 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/mman.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/mman.h @@ -3,28 +3,10 @@ #define _ASM_X86_MMAN_H #define MAP_32BIT 0x40 /* only give out 32bit addresses */ +#define MAP_ABOVE4G 0x80 /* only map above 4GB */ -#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS -/* - * Take the 4 protection key bits out of the vma->vm_flags - * value and turn them in to the bits that we can put in - * to a pte. - * - * Only override these if Protection Keys are available - * (which is only on 64-bit). - */ -#define arch_vm_get_page_prot(vm_flags) __pgprot( \ - ((vm_flags) & VM_PKEY_BIT0 ? _PAGE_PKEY_BIT0 : 0) | \ - ((vm_flags) & VM_PKEY_BIT1 ? _PAGE_PKEY_BIT1 : 0) | \ - ((vm_flags) & VM_PKEY_BIT2 ? _PAGE_PKEY_BIT2 : 0) | \ - ((vm_flags) & VM_PKEY_BIT3 ? _PAGE_PKEY_BIT3 : 0)) - -#define arch_calc_vm_prot_bits(prot, key) ( \ - ((key) & 0x1 ? VM_PKEY_BIT0 : 0) | \ - ((key) & 0x2 ? VM_PKEY_BIT1 : 0) | \ - ((key) & 0x4 ? VM_PKEY_BIT2 : 0) | \ - ((key) & 0x8 ? VM_PKEY_BIT3 : 0)) -#endif +/* Flags for map_shadow_stack(2) */ +#define SHADOW_STACK_SET_TOKEN (1ULL << 0) /* Set up a restore token in the shadow stack */ #include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/types.h index df55e1dd..b9e79bc5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/types.h @@ -1,7 +1 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASM_X86_TYPES_H -#define _ASM_X86_TYPES_H - #include - -#endif /* _ASM_X86_TYPES_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd.h index c04f6381..d2af42d6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd.h @@ -2,7 +2,14 @@ #ifndef _ASM_X86_UNISTD_H #define _ASM_X86_UNISTD_H -/* x32 syscall flag bit */ +/* + * x32 syscall flag bit. Some user programs expect syscall NR macros + * and __X32_SYSCALL_BIT to have type int, even though syscall numbers + * are, for practical purposes, unsigned long. + * + * Fortunately, expressions like (nr & ~__X32_SYSCALL_BIT) do the right + * thing regardless. + */ #define __X32_SYSCALL_BIT 0x40000000 # ifdef __i386__ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd_64.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd_64.h index 336c2e4a..d9aab7ae 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd_64.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/asm/unistd_64.h @@ -1,5 +1,5 @@ -#ifndef _ASM_X86_UNISTD_64_H -#define _ASM_X86_UNISTD_64_H 1 +#ifndef _ASM_UNISTD_64_H +#define _ASM_UNISTD_64_H #define __NR_read 0 #define __NR_write 1 @@ -334,5 +334,46 @@ #define __NR_pkey_alloc 330 #define __NR_pkey_free 331 #define __NR_statx 332 +#define __NR_io_pgetevents 333 +#define __NR_rseq 334 +#define __NR_pidfd_send_signal 424 +#define __NR_io_uring_setup 425 +#define __NR_io_uring_enter 426 +#define __NR_io_uring_register 427 +#define __NR_open_tree 428 +#define __NR_move_mount 429 +#define __NR_fsopen 430 +#define __NR_fsconfig 431 +#define __NR_fsmount 432 +#define __NR_fspick 433 +#define __NR_pidfd_open 434 +#define __NR_clone3 435 +#define __NR_close_range 436 +#define __NR_openat2 437 +#define __NR_pidfd_getfd 438 +#define __NR_faccessat2 439 +#define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 +#define __NR_quotactl_fd 443 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 +#define __NR_memfd_secret 447 +#define __NR_process_mrelease 448 +#define __NR_futex_waitv 449 +#define __NR_set_mempolicy_home_node 450 +#define __NR_cachestat 451 +#define __NR_fchmodat2 452 +#define __NR_map_shadow_stack 453 +#define __NR_futex_wake 454 +#define __NR_futex_wait 455 +#define __NR_futex_requeue 456 +#define __NR_statmount 457 +#define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 -#endif /* _ASM_X86_UNISTD_64_H */ + +#endif /* _ASM_UNISTD_64_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h new file mode 100644 index 00000000..30f7fe90 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h @@ -0,0 +1,35 @@ +/* Monotonically increasing wide counters (at least 62 bits). + Copyright (C) 2016-2024 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 + . */ + +#ifndef _BITS_ATOMIC_WIDE_COUNTER_H +#define _BITS_ATOMIC_WIDE_COUNTER_H + +/* Counter that is monotonically increasing (by less than 2**31 per + increment), with a single writer, and an arbitrary number of + readers. */ +typedef union +{ + __extension__ unsigned long long int __value64; + struct + { + unsigned int __low; + unsigned int __high; + } __value32; +} __atomic_wide_counter; + +#endif /* _BITS_ATOMIC_WIDE_COUNTER_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/byteswap.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/byteswap.h index 23c8f424..d15c940d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/byteswap.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/byteswap.h @@ -1,5 +1,5 @@ -/* Macros to swap the order of bytes in integer values. - Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Macros and inline functions to swap the order of bytes in integer values. + Copyright (C) 1997-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." @@ -25,131 +25,55 @@ #include #include -#include -/* Swap bytes in 16 bit value. */ -#define __bswap_constant_16(x) \ - ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) +/* Swap bytes in 16-bit value. */ +#define __bswap_constant_16(x) \ + ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) -/* Get __bswap_16. */ -#include +static __inline __uint16_t +__bswap_16 (__uint16_t __bsx) +{ +#if __GNUC_PREREQ (4, 8) + return __builtin_bswap16 (__bsx); +#else + return __bswap_constant_16 (__bsx); +#endif +} -/* Swap bytes in 32 bit value. */ -#define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) +/* Swap bytes in 32-bit value. */ +#define __bswap_constant_32(x) \ + ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ + | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) -#ifdef __GNUC__ -# if __GNUC_PREREQ (4, 3) -static __inline unsigned int -__bswap_32 (unsigned int __bsx) +static __inline __uint32_t +__bswap_32 (__uint32_t __bsx) { +#if __GNUC_PREREQ (4, 3) return __builtin_bswap32 (__bsx); -} -# elif __GNUC__ >= 2 -# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \ - || defined __pentiumpro__ || defined __pentium4__ \ - || defined __k8__ || defined __athlon__ \ - || defined __k6__ || defined __nocona__ \ - || defined __core2__ || defined __geode__ \ - || defined __amdfam10__) -/* To swap the bytes in a word the i486 processors and up provide the - `bswap' opcode. On i386 we have to use three instructions. */ -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __v, __x = (x); \ - if (__builtin_constant_p (__x)) \ - __v = __bswap_constant_32 (__x); \ - else \ - __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); \ - __v; })) -# else -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __v, __x = (x); \ - if (__builtin_constant_p (__x)) \ - __v = __bswap_constant_32 (__x); \ - else \ - __asm__ ("rorw $8, %w0;" \ - "rorl $16, %0;" \ - "rorw $8, %w0" \ - : "=r" (__v) \ - : "0" (__x) \ - : "cc"); \ - __v; })) -# endif -# else -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __x = (x); __bswap_constant_32 (__x); })) -# endif #else -static __inline unsigned int -__bswap_32 (unsigned int __bsx) -{ return __bswap_constant_32 (__bsx); -} #endif +} +/* Swap bytes in 64-bit value. */ +#define __bswap_constant_64(x) \ + ((((x) & 0xff00000000000000ull) >> 56) \ + | (((x) & 0x00ff000000000000ull) >> 40) \ + | (((x) & 0x0000ff0000000000ull) >> 24) \ + | (((x) & 0x000000ff00000000ull) >> 8) \ + | (((x) & 0x00000000ff000000ull) << 8) \ + | (((x) & 0x0000000000ff0000ull) << 24) \ + | (((x) & 0x000000000000ff00ull) << 40) \ + | (((x) & 0x00000000000000ffull) << 56)) -#if __GNUC_PREREQ (2, 0) -/* Swap bytes in 64 bit value. */ -# define __bswap_constant_64(x) \ - (__extension__ ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56))) - -# if __GNUC_PREREQ (4, 3) -static __inline __uint64_t +__extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { +#if __GNUC_PREREQ (4, 3) return __builtin_bswap64 (__bsx); -} -# elif __WORDSIZE == 64 -# define __bswap_64(x) \ - (__extension__ \ - ({ __uint64_t __v, __x = (x); \ - if (__builtin_constant_p (__x)) \ - __v = __bswap_constant_64 (__x); \ - else \ - __asm__ ("bswap %q0" : "=r" (__v) : "0" (__x)); \ - __v; })) -# else -# define __bswap_64(x) \ - (__extension__ \ - ({ union { __extension__ __uint64_t __ll; \ - unsigned int __l[2]; } __w, __r; \ - if (__builtin_constant_p (x)) \ - __r.__ll = __bswap_constant_64 (x); \ - else \ - { \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - } \ - __r.__ll; })) -# endif #else -# define __bswap_constant_64(x) \ - ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56)) - -static __inline __uint64_t -__bswap_64 (__uint64_t __bsx) -{ return __bswap_constant_64 (__bsx); -} #endif +} #endif /* _BITS_BYTESWAP_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/confname.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/confname.h index 59d31721..e4d2d3a8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/confname.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/confname.h @@ -1,5 +1,5 @@ /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993-2018 Free Software Foundation, Inc. + Copyright (C) 1993-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _UNISTD_H # error "Never use directly; include instead." @@ -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'. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/cpu-set.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/cpu-set.h index c5e919e8..dbcdc780 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/cpu-set.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/cpu-set.h @@ -1,6 +1,6 @@ /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 scheduling interface. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_CPU_SET_H #define _BITS_CPU_SET_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent.h index 2ed7919c..8bf38f81 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _DIRENT_H # error "Never use directly; include instead." @@ -54,4 +54,6 @@ struct dirent64 #if defined __OFF_T_MATCHES_OFF64_T && defined __INO_T_MATCHES_INO64_T /* Inform libc code that these two types are effectively identical. */ # define _DIRENT_MATCHES_DIRENT64 1 +#else +# define _DIRENT_MATCHES_DIRENT64 0 #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent_ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent_ext.h new file mode 100644 index 00000000..c0a9fc25 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dirent_ext.h @@ -0,0 +1,33 @@ +/* System-specific extensions of . Linux version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _DIRENT_H +# error "Never include directly; use instead." +#endif + +__BEGIN_DECLS + +#ifdef __USE_GNU +/* Read from the directory descriptor FD into LENGTH bytes at BUFFER. + Return the number of bytes read on success (0 for end of + directory), and -1 for failure. */ +extern __ssize_t getdents64 (int __fd, void *__buffer, size_t __length) + __THROW __nonnull ((2)); +#endif + +__END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dl_find_object.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dl_find_object.h new file mode 100644 index 00000000..00860f4f --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dl_find_object.h @@ -0,0 +1,29 @@ +/* x86 definitions for finding objects. + Copyright (C) 2021-2024 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 + . */ + +#ifndef _DLFCN_H +# error "Never use directly; include instead." +#endif + +#ifdef __x86_64__ +# define DLFO_STRUCT_HAS_EH_DBASE 0 +#else +# define DLFO_STRUCT_HAS_EH_DBASE 1 +#endif +#define DLFO_STRUCT_HAS_EH_COUNT 0 +#define DLFO_EH_SEGMENT_TYPE PT_GNU_EH_FRAME diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dlfcn.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dlfcn.h index b0b129b6..dd5bb46a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dlfcn.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _DLFCN_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endian.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endian.h index 5a56c726..08ca11ef 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endian.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endian.h @@ -1,7 +1,49 @@ -/* i386/x86_64 are little-endian. */ +/* Endian macros for string.h functions + Copyright (C) 1992-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. -#ifndef _ENDIAN_H -# error "Never use directly; include instead." + 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 + . */ + +#ifndef _BITS_ENDIAN_H +#define _BITS_ENDIAN_H 1 + +/* Definitions for byte order, according to significance of bytes, + from low addresses to high addresses. The value is what you get by + putting '4' in the most significant byte, '3' in the second most + significant byte, '2' in the second least significant byte, and '1' + in the least significant byte, and then writing down one digit for + each byte, starting with the byte at the lowest address at the left, + and proceeding to the byte with the highest address at the right. */ + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __PDP_ENDIAN 3412 + +/* This file defines `__BYTE_ORDER' for the particular machine. */ +#include + +/* Some machines may need to use a different endianness for floating point + values. */ +#ifndef __FLOAT_WORD_ORDER +# define __FLOAT_WORD_ORDER __BYTE_ORDER +#endif + +#if __BYTE_ORDER == __LITTLE_ENDIAN +# define __LONG_LONG_PAIR(HI, LO) LO, HI +#elif __BYTE_ORDER == __BIG_ENDIAN +# define __LONG_LONG_PAIR(HI, LO) HI, LO #endif -#define __BYTE_ORDER __LITTLE_ENDIAN +#endif /* bits/endian.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endianness.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endianness.h new file mode 100644 index 00000000..962a9ae4 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/endianness.h @@ -0,0 +1,11 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* i386/x86_64 are little-endian. */ +#define __BYTE_ORDER __LITTLE_ENDIAN + +#endif /* bits/endianness.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/environments.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/environments.h index 478c1cb7..dd7be14e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/environments.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2018 Free Software Foundation, Inc. +/* Copyright (C) 1999-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _UNISTD_H # error "Never include this file directly. Use instead" diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/epoll.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/epoll.h index 577899c3..a0279fc8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/epoll.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/epoll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 2002-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_EPOLL_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/errno.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/errno.h index e0f7f0b6..1151786a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/errno.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/errno.h @@ -1,5 +1,5 @@ /* Error constants. Linux specific version. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/eventfd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/eventfd.h index 81e4f06e..cdaf3a3d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/eventfd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2020 Free Software Foundation, Inc. +/* Copyright (C) 2007-2024 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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h index 0479a60b..628612b8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." @@ -101,7 +101,7 @@ #endif #ifndef F_GETLK -# ifndef __USE_FILE_OFFSET64 +# if !defined __USE_FILE_OFFSET64 && __TIMESIZE != 64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ # define F_SETLKW 7 /* Set record locking info (blocking). */ @@ -284,11 +284,15 @@ struct f_owner_ex # define F_SEAL_SHRINK 0x0002 /* Prevent file from shrinking. */ # define F_SEAL_GROW 0x0004 /* Prevent file from growing. */ # define F_SEAL_WRITE 0x0008 /* Prevent writes. */ +# define F_SEAL_FUTURE_WRITE 0x0010 /* Prevent future writes while + mapped. */ +# define F_SEAL_EXEC 0x0020 /* Prevent chmod modifying exec bits. */ #endif #ifdef __USE_GNU /* Hint values for F_{GET,SET}_RW_HINT. */ -# define RWF_WRITE_LIFE_NOT_SET 0 +# define RWH_WRITE_LIFE_NOT_SET 0 +# define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET # define RWH_WRITE_LIFE_NONE 1 # define RWH_WRITE_LIFE_SHORT 2 # define RWH_WRITE_LIFE_MEDIUM 3 @@ -332,6 +336,11 @@ struct f_owner_ex # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ +/* SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are + written to disk before returning. */ +# define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE \ + | SYNC_FILE_RANGE_WAIT_BEFORE \ + | SYNC_FILE_RANGE_WAIT_AFTER) /* Flags for SPLICE and VMSPLICE. */ # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ @@ -359,22 +368,15 @@ struct file_handle # define MAX_HANDLE_SZ 128 #endif -/* Values for `*at' functions. */ -#ifdef __USE_ATFILE -# define AT_FDCWD -100 /* Special value used to indicate - the *at functions should use the - current working directory. */ -# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ -# define AT_REMOVEDIR 0x200 /* Remove directory instead of - unlinking file. */ -# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ -# ifdef __USE_GNU -# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount - traversal. */ -# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ -# endif -# define AT_EACCESS 0x200 /* Test access permitted for - effective IDs, not real IDs. */ +#ifdef __USE_GNU +/* Flags for name_to_handle_at. See comment in fcntl.h about the use + of the same AT_* flag bits for different purposes in different + functions. */ +# define AT_HANDLE_FID AT_REMOVEDIR /* File handle is needed + to compare object + identity and may not + be usable to + open_by_handle_at. */ #endif __BEGIN_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl.h index f26077c9..9a3734cc 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/x86. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _FCNTL_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fenv.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fenv.h index 4103982d..472e751a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fenv.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _FENV_H # error "Never use directly; include instead." @@ -101,7 +101,7 @@ fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef struct { @@ -114,57 +114,3 @@ femode_t; /* Default floating-point control modes. */ # define FE_DFL_MODE ((const femode_t *) -1L) #endif - - -#ifdef __USE_EXTERN_INLINES -__BEGIN_DECLS - -/* Optimized versions. */ -#ifndef _LIBC -extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); -#endif -__extern_always_inline void -__NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) -{ - if ((FE_INVALID & __excepts) != 0) - { - /* One example of an invalid operation is 0.0 / 0.0. */ - float __f = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f)); -# else - __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" - : "=t" (__f) : "0" (__f)); -# endif - (void) &__f; - } - if ((FE_DIVBYZERO & __excepts) != 0) - { - float __f = 1.0; - float __g = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); -# else - __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" - : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); -# endif - (void) &__f; - } -} -__extern_inline int -__NTH (feraiseexcept (int __excepts)) -{ - if (__builtin_constant_p (__excepts) - && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) - { - __feraiseexcept_invalid_divbyzero (__excepts); - return 0; - } - - return __feraiseexcept_renamed (__excepts); -} - -__END_DECLS -#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn-common.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn-common.h index 070cdd02..c800cdb1 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn-common.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn-common.h @@ -1,6 +1,6 @@ /* Macros to control TS 18661-3 glibc features where the same definitions are appropriate for all platforms. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_FLOATN_COMMON_H #define _BITS_FLOATN_COMMON_H @@ -56,6 +56,13 @@ #define __HAVE_DISTINCT_FLOAT64X 0 #define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X +/* Defined to 1 if the corresponding _FloatN type is not binary compatible + with the corresponding ISO C type in the current compilation unit as + opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built + in glibc. */ +#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 \ + && __LDBL_MANT_DIG__ != 113) + /* Defined to 1 if any _FloatN or _FloatNx types that are not ABI-distinct are however distinct types at the C language level (so for the purposes of __builtin_types_compatible_p and _Generic). */ @@ -71,7 +78,7 @@ or _FloatNx types, if __HAVE_ is 1. The corresponding literal suffixes exist since GCC 7, for C only. */ # if __HAVE_FLOAT16 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) /* No corresponding suffix available for this type. */ # define __f16(x) ((_Float16) x##f) # else @@ -80,7 +87,7 @@ # endif # if __HAVE_FLOAT32 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # define __f32(x) x##f # else # define __f32(x) x##f32 @@ -88,7 +95,7 @@ # endif # if __HAVE_FLOAT64 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # ifdef __NO_LONG_DOUBLE_MATH # define __f64(x) x##l # else @@ -100,7 +107,7 @@ # endif # if __HAVE_FLOAT32X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # define __f32x(x) x # else # define __f32x(x) x##f32x @@ -108,7 +115,7 @@ # endif # if __HAVE_FLOAT64X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # if __HAVE_FLOAT64X_LONG_DOUBLE # define __f64x(x) x##l # else @@ -120,7 +127,7 @@ # endif # if __HAVE_FLOAT128X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # error "_Float128X supported but no constant suffix" # else # define __f128x(x) x##f128x @@ -129,7 +136,7 @@ /* Defined to a complex type if __HAVE_ is 1. */ # if __HAVE_FLOAT16 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # define __CFLOAT16 __cfloat16 # else @@ -138,7 +145,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # endif # if __HAVE_FLOAT32 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # define __CFLOAT32 _Complex float # else # define __CFLOAT32 _Complex _Float32 @@ -146,7 +153,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # endif # if __HAVE_FLOAT64 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # ifdef __NO_LONG_DOUBLE_MATH # define __CFLOAT64 _Complex long double # else @@ -158,7 +165,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # endif # if __HAVE_FLOAT32X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # define __CFLOAT32X _Complex double # else # define __CFLOAT32X _Complex _Float32x @@ -166,7 +173,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # endif # if __HAVE_FLOAT64X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # if __HAVE_FLOAT64X_LONG_DOUBLE # define __CFLOAT64X _Complex long double # else @@ -178,7 +185,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # endif # if __HAVE_FLOAT128X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # error "_Float128X supported but no complex type" # else # define __CFLOAT128X _Complex _Float128x @@ -188,7 +195,7 @@ typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); /* The remaining of this file provides support for older compilers. */ # if __HAVE_FLOAT16 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef float _Float16 __attribute__ ((__mode__ (__HF__))); # endif @@ -203,7 +210,7 @@ typedef float _Float16 __attribute__ ((__mode__ (__HF__))); # if __HAVE_FLOAT32 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef float _Float32; # endif @@ -227,7 +234,7 @@ typedef float _Float32; # ifdef __NO_LONG_DOUBLE_MATH -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef long double _Float64; # endif @@ -240,7 +247,7 @@ typedef long double _Float64; # else -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef double _Float64; # endif @@ -257,7 +264,7 @@ typedef double _Float64; # if __HAVE_FLOAT32X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef double _Float32x; # endif @@ -274,7 +281,7 @@ typedef double _Float32x; # if __HAVE_FLOAT64X_LONG_DOUBLE -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef long double _Float64x; # endif @@ -287,7 +294,7 @@ typedef long double _Float64x; # else -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef _Float128 _Float64x; # endif @@ -304,7 +311,7 @@ typedef _Float128 _Float64x; # if __HAVE_FLOAT128X -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) # error "_Float128x supported but no type" # endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn.h index 58ce5fe9..e661abae 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/floatn.h @@ -1,5 +1,5 @@ /* Macros to control TS 18661-3 glibc features on x86. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H @@ -28,8 +28,7 @@ support, for x86_64 and x86. */ #if (defined __x86_64__ \ ? __GNUC_PREREQ (4, 3) \ - : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \ - && !defined(__CUDACC__) && !defined(__ICC) + : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) # define __HAVE_FLOAT128 1 #else # define __HAVE_FLOAT128 0 @@ -59,7 +58,7 @@ /* Defined to concatenate the literal suffix to be used with _Float128 types, if __HAVE_FLOAT128 is 1. */ # if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) /* The literal suffix f128 exists only since GCC 7.0. */ # define __f128(x) x##q # else @@ -69,7 +68,7 @@ /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ # if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) /* Add a typedef for older GCC compilers which don't natively support _Complex _Float128. */ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); @@ -83,7 +82,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); # if __HAVE_FLOAT128 /* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus +# if !__GNUC_PREREQ (7, 0) || (defined __cplusplus && !__GNUC_PREREQ (13, 0)) typedef __float128 _Float128; # endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h index a6134a45..b86d3a4b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h @@ -1,5 +1,5 @@ /* Define __GLIBC_FLT_EVAL_METHOD. x86 version. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-fast.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-fast.h index 459facc2..78faa723 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-fast.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-fast.h @@ -1,5 +1,5 @@ /* Define FP_FAST_* macros. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-logb.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-logb.h index 267c7ec1..7e0815ba 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-logb.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/fp-logb.h @@ -1,5 +1,5 @@ /* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_core.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_core.h index a13838fa..55ea8f32 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_core.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_core.h @@ -1,5 +1,5 @@ /* Declarations for getopt (basic, portable features only). - Copyright (C) 1989-2018 Free Software Foundation, Inc. + Copyright (C) 1989-2024 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _GETOPT_CORE_H #define _GETOPT_CORE_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_ext.h index 57250629..24462239 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_ext.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_ext.h @@ -1,5 +1,5 @@ /* Declarations for getopt (GNU extensions). - Copyright (C) 1989-2020 Free Software Foundation, Inc. + Copyright (C) 1989-2024 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_posix.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_posix.h index 1f90e84c..cc6b6e12 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_posix.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/getopt_posix.h @@ -1,5 +1,5 @@ /* Declarations for getopt (POSIX compatibility shim). - Copyright (C) 1989-2018 Free Software Foundation, Inc. + Copyright (C) 1989-2024 Free Software Foundation, Inc. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib. @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _GETOPT_POSIX_H #define _GETOPT_POSIX_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/hwcap.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/hwcap.h index 555b3bc3..bfae2fbb 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/hwcap.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/hwcap.h @@ -1,5 +1,5 @@ /* Defines for bits in AT_HWCAP. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + Copyright (C) 2012-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_AUXV_H # error "Never include directly; use instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/in.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/in.h index fb64f1bb..ae0103c5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/in.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Linux version. */ @@ -102,6 +102,7 @@ #define IP_CHECKSUM 23 #define IP_BIND_ADDRESS_NO_PORT 24 #define IP_RECVFRAGSIZE 25 +#define IP_RECVERR_RFC4884 26 /* IP_MTU_DISCOVER arguments. */ #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ @@ -127,6 +128,8 @@ #define IP_MSFILTER 41 #define IP_MULTICAST_ALL 49 #define IP_UNICAST_IF 50 +#define IP_LOCAL_PORT_RANGE 51 +#define IP_PROTOCOL 52 /* To select the IP level. */ #define SOL_IP 0 @@ -145,14 +148,6 @@ struct ip_opts char ip_opts[40]; /* Actually variable in size. */ }; -/* Like `struct ip_mreq' but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - /* Structure used for IP_PKTINFO. */ struct in_pktinfo { @@ -191,6 +186,9 @@ struct in_pktinfo #define IPV6_V6ONLY 26 #define IPV6_JOIN_ANYCAST 27 #define IPV6_LEAVE_ANYCAST 28 +#define IPV6_MULTICAST_ALL 29 +#define IPV6_ROUTER_ALERT_ISOLATE 30 +#define IPV6_RECVERR_RFC4884 31 #define IPV6_IPSEC_POLICY 34 #define IPV6_XFRM_POLICY 35 #define IPV6_HDRINCL 36 @@ -228,6 +226,7 @@ struct in_pktinfo #define IPV6_TRANSPARENT 75 #define IPV6_UNICAST_IF 76 #define IPV6_RECVFRAGSIZE 77 +#define IPV6_FREEBIND 78 /* Obsolete synonyms for the above. */ #if !__USE_KERNEL_IPV6_DEFS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/indirect-return.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/indirect-return.h new file mode 100644 index 00000000..eed47ca4 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/indirect-return.h @@ -0,0 +1,37 @@ +/* Definition of __INDIRECT_RETURN. x86 version. + Copyright (C) 2018-2024 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 + . */ + +#ifndef _UCONTEXT_H +# error "Never include directly; use instead." +#endif + +/* On x86, swapcontext returns via indirect branch when the shadow stack + is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext + returns via indirect branch. */ +#if defined __CET__ && (__CET__ & 2) != 0 +# if __glibc_has_attribute (__indirect_return__) +# define __INDIRECT_RETURN __attribute__ ((__indirect_return__)) +# else +/* Newer compilers provide the indirect_return attribute, but without + it we can use returns_twice to affect the optimizer in the same + way and avoid unsafe optimizations. */ +# define __INDIRECT_RETURN __attribute__ ((__returns_twice__)) +# endif +#else +# define __INDIRECT_RETURN +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/inotify.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/inotify.h index d1608762..f4750f7a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/inotify.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/inotify.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2018 Free Software Foundation, Inc. +/* Copyright (C) 2005-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_INOTIFY_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctl-types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctl-types.h index 28fd1db0..ca23dc29 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctl-types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctl-types.h @@ -1,5 +1,5 @@ /* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctls.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctls.h index b719f6ef..2df44f3e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctls.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ioctls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc-perm.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc-perm.h new file mode 100644 index 00000000..14adb89b --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc-perm.h @@ -0,0 +1,40 @@ +/* struct ipc_perm definition. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _SYS_IPC_H +# error "Never use directly; include instead." +#endif + +/* Data structure used to pass permission information to IPC operations. + It follows the kernel ipc64_perm size so the syscall can be made directly + without temporary buffer copy. However, since glibc defines the MODE + field as mode_t per POSIX definition (BZ#18231), it omits the __PAD1 field + (since glibc does not export mode_t as 16-bit for any architecture). */ +struct ipc_perm +{ + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + __mode_t mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad2; + __syscall_ulong_t __glibc_reserved1; + __syscall_ulong_t __glibc_reserved2; +}; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc.h index 46656c54..a23ed727 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." @@ -37,19 +37,4 @@ /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - __syscall_ulong_t __glibc_reserved1; - __syscall_ulong_t __glibc_reserved2; - }; +#include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipctypes.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipctypes.h index be0fc92c..93a5494c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipctypes.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ipctypes.h @@ -1,5 +1,5 @@ /* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + Copyright (C) 2012-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/iscanonical.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/iscanonical.h index e1ee1356..9bfdfc4b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/iscanonical.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/iscanonical.h @@ -1,5 +1,5 @@ /* Define iscanonical macro. ldbl-96 version. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MATH_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libc-header-start.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libc-header-start.h index b4a429b8..d841f5d8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libc-header-start.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libc-header-start.h @@ -1,5 +1,5 @@ /* Handle feature test macros at the start of a header. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define @@ -43,22 +43,62 @@ #endif /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ - macro. */ + macro. Most but not all symbols enabled by that macro in TS + 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 #else # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif +#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X +#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) +# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 +#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. */ + __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction + functions, the symbols from this TS are enabled unconditionally in + C2X. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif +#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X +#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X) +# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1 +#else +# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0 +#endif /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h index 520b4bbe..08a41c46 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h @@ -1,5 +1,5 @@ /* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h. - Copyright (C) 2014-2018 Free Software Foundation, Inc. + Copyright (C) 2014-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MATH_H # error "Never include directly;\ @@ -98,4 +98,235 @@ #define __DECL_SIMD_powf32x #define __DECL_SIMD_powf64x #define __DECL_SIMD_powf128x + +#define __DECL_SIMD_acos +#define __DECL_SIMD_acosf +#define __DECL_SIMD_acosl +#define __DECL_SIMD_acosf16 +#define __DECL_SIMD_acosf32 +#define __DECL_SIMD_acosf64 +#define __DECL_SIMD_acosf128 +#define __DECL_SIMD_acosf32x +#define __DECL_SIMD_acosf64x +#define __DECL_SIMD_acosf128x + +#define __DECL_SIMD_atan +#define __DECL_SIMD_atanf +#define __DECL_SIMD_atanl +#define __DECL_SIMD_atanf16 +#define __DECL_SIMD_atanf32 +#define __DECL_SIMD_atanf64 +#define __DECL_SIMD_atanf128 +#define __DECL_SIMD_atanf32x +#define __DECL_SIMD_atanf64x +#define __DECL_SIMD_atanf128x + +#define __DECL_SIMD_asin +#define __DECL_SIMD_asinf +#define __DECL_SIMD_asinl +#define __DECL_SIMD_asinf16 +#define __DECL_SIMD_asinf32 +#define __DECL_SIMD_asinf64 +#define __DECL_SIMD_asinf128 +#define __DECL_SIMD_asinf32x +#define __DECL_SIMD_asinf64x +#define __DECL_SIMD_asinf128x + +#define __DECL_SIMD_hypot +#define __DECL_SIMD_hypotf +#define __DECL_SIMD_hypotl +#define __DECL_SIMD_hypotf16 +#define __DECL_SIMD_hypotf32 +#define __DECL_SIMD_hypotf64 +#define __DECL_SIMD_hypotf128 +#define __DECL_SIMD_hypotf32x +#define __DECL_SIMD_hypotf64x +#define __DECL_SIMD_hypotf128x + +#define __DECL_SIMD_exp2 +#define __DECL_SIMD_exp2f +#define __DECL_SIMD_exp2l +#define __DECL_SIMD_exp2f16 +#define __DECL_SIMD_exp2f32 +#define __DECL_SIMD_exp2f64 +#define __DECL_SIMD_exp2f128 +#define __DECL_SIMD_exp2f32x +#define __DECL_SIMD_exp2f64x +#define __DECL_SIMD_exp2f128x + +#define __DECL_SIMD_exp10 +#define __DECL_SIMD_exp10f +#define __DECL_SIMD_exp10l +#define __DECL_SIMD_exp10f16 +#define __DECL_SIMD_exp10f32 +#define __DECL_SIMD_exp10f64 +#define __DECL_SIMD_exp10f128 +#define __DECL_SIMD_exp10f32x +#define __DECL_SIMD_exp10f64x +#define __DECL_SIMD_exp10f128x + +#define __DECL_SIMD_cosh +#define __DECL_SIMD_coshf +#define __DECL_SIMD_coshl +#define __DECL_SIMD_coshf16 +#define __DECL_SIMD_coshf32 +#define __DECL_SIMD_coshf64 +#define __DECL_SIMD_coshf128 +#define __DECL_SIMD_coshf32x +#define __DECL_SIMD_coshf64x +#define __DECL_SIMD_coshf128x + +#define __DECL_SIMD_expm1 +#define __DECL_SIMD_expm1f +#define __DECL_SIMD_expm1l +#define __DECL_SIMD_expm1f16 +#define __DECL_SIMD_expm1f32 +#define __DECL_SIMD_expm1f64 +#define __DECL_SIMD_expm1f128 +#define __DECL_SIMD_expm1f32x +#define __DECL_SIMD_expm1f64x +#define __DECL_SIMD_expm1f128x + +#define __DECL_SIMD_sinh +#define __DECL_SIMD_sinhf +#define __DECL_SIMD_sinhl +#define __DECL_SIMD_sinhf16 +#define __DECL_SIMD_sinhf32 +#define __DECL_SIMD_sinhf64 +#define __DECL_SIMD_sinhf128 +#define __DECL_SIMD_sinhf32x +#define __DECL_SIMD_sinhf64x +#define __DECL_SIMD_sinhf128x + +#define __DECL_SIMD_cbrt +#define __DECL_SIMD_cbrtf +#define __DECL_SIMD_cbrtl +#define __DECL_SIMD_cbrtf16 +#define __DECL_SIMD_cbrtf32 +#define __DECL_SIMD_cbrtf64 +#define __DECL_SIMD_cbrtf128 +#define __DECL_SIMD_cbrtf32x +#define __DECL_SIMD_cbrtf64x +#define __DECL_SIMD_cbrtf128x + +#define __DECL_SIMD_atan2 +#define __DECL_SIMD_atan2f +#define __DECL_SIMD_atan2l +#define __DECL_SIMD_atan2f16 +#define __DECL_SIMD_atan2f32 +#define __DECL_SIMD_atan2f64 +#define __DECL_SIMD_atan2f128 +#define __DECL_SIMD_atan2f32x +#define __DECL_SIMD_atan2f64x +#define __DECL_SIMD_atan2f128x + +#define __DECL_SIMD_log10 +#define __DECL_SIMD_log10f +#define __DECL_SIMD_log10l +#define __DECL_SIMD_log10f16 +#define __DECL_SIMD_log10f32 +#define __DECL_SIMD_log10f64 +#define __DECL_SIMD_log10f128 +#define __DECL_SIMD_log10f32x +#define __DECL_SIMD_log10f64x +#define __DECL_SIMD_log10f128x + +#define __DECL_SIMD_log2 +#define __DECL_SIMD_log2f +#define __DECL_SIMD_log2l +#define __DECL_SIMD_log2f16 +#define __DECL_SIMD_log2f32 +#define __DECL_SIMD_log2f64 +#define __DECL_SIMD_log2f128 +#define __DECL_SIMD_log2f32x +#define __DECL_SIMD_log2f64x +#define __DECL_SIMD_log2f128x + +#define __DECL_SIMD_log1p +#define __DECL_SIMD_log1pf +#define __DECL_SIMD_log1pl +#define __DECL_SIMD_log1pf16 +#define __DECL_SIMD_log1pf32 +#define __DECL_SIMD_log1pf64 +#define __DECL_SIMD_log1pf128 +#define __DECL_SIMD_log1pf32x +#define __DECL_SIMD_log1pf64x +#define __DECL_SIMD_log1pf128x + +#define __DECL_SIMD_atanh +#define __DECL_SIMD_atanhf +#define __DECL_SIMD_atanhl +#define __DECL_SIMD_atanhf16 +#define __DECL_SIMD_atanhf32 +#define __DECL_SIMD_atanhf64 +#define __DECL_SIMD_atanhf128 +#define __DECL_SIMD_atanhf32x +#define __DECL_SIMD_atanhf64x +#define __DECL_SIMD_atanhf128x + +#define __DECL_SIMD_acosh +#define __DECL_SIMD_acoshf +#define __DECL_SIMD_acoshl +#define __DECL_SIMD_acoshf16 +#define __DECL_SIMD_acoshf32 +#define __DECL_SIMD_acoshf64 +#define __DECL_SIMD_acoshf128 +#define __DECL_SIMD_acoshf32x +#define __DECL_SIMD_acoshf64x +#define __DECL_SIMD_acoshf128x + +#define __DECL_SIMD_erf +#define __DECL_SIMD_erff +#define __DECL_SIMD_erfl +#define __DECL_SIMD_erff16 +#define __DECL_SIMD_erff32 +#define __DECL_SIMD_erff64 +#define __DECL_SIMD_erff128 +#define __DECL_SIMD_erff32x +#define __DECL_SIMD_erff64x +#define __DECL_SIMD_erff128x + +#define __DECL_SIMD_tanh +#define __DECL_SIMD_tanhf +#define __DECL_SIMD_tanhl +#define __DECL_SIMD_tanhf16 +#define __DECL_SIMD_tanhf32 +#define __DECL_SIMD_tanhf64 +#define __DECL_SIMD_tanhf128 +#define __DECL_SIMD_tanhf32x +#define __DECL_SIMD_tanhf64x +#define __DECL_SIMD_tanhf128x + +#define __DECL_SIMD_asinh +#define __DECL_SIMD_asinhf +#define __DECL_SIMD_asinhl +#define __DECL_SIMD_asinhf16 +#define __DECL_SIMD_asinhf32 +#define __DECL_SIMD_asinhf64 +#define __DECL_SIMD_asinhf128 +#define __DECL_SIMD_asinhf32x +#define __DECL_SIMD_asinhf64x +#define __DECL_SIMD_asinhf128x + +#define __DECL_SIMD_erfc +#define __DECL_SIMD_erfcf +#define __DECL_SIMD_erfcl +#define __DECL_SIMD_erfcf16 +#define __DECL_SIMD_erfcf32 +#define __DECL_SIMD_erfcf64 +#define __DECL_SIMD_erfcf128 +#define __DECL_SIMD_erfcf32x +#define __DECL_SIMD_erfcf64x +#define __DECL_SIMD_erfcf128x + +#define __DECL_SIMD_tan +#define __DECL_SIMD_tanf +#define __DECL_SIMD_tanl +#define __DECL_SIMD_tanf16 +#define __DECL_SIMD_tanf32 +#define __DECL_SIMD_tanf64 +#define __DECL_SIMD_tanf128 +#define __DECL_SIMD_tanf32x +#define __DECL_SIMD_tanf64x +#define __DECL_SIMD_tanf128x #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link.h index a97c4116..5e27ce94 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2018 Free Software Foundation, Inc. +/* Copyright (C) 2004-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LINK_H # error "Never include directly; use instead." @@ -38,8 +38,8 @@ typedef struct La_i86_retval uint32_t lrv_edx; long double lrv_st0; long double lrv_st1; - uint64_t lrv_bnd0; - uint64_t lrv_bnd1; + uint64_t __glibc_unused1; + uint64_t __glibc_unused2; } La_i86_retval; @@ -96,7 +96,7 @@ typedef struct La_x86_64_regs La_x86_64_xmm lr_xmm[8]; La_x86_64_vector lr_vector[8]; #ifndef __ILP32__ - __int128_t lr_bnd[4]; + __int128_t __glibc_unused1[4]; #endif } La_x86_64_regs; @@ -112,8 +112,8 @@ typedef struct La_x86_64_retval La_x86_64_vector lrv_vector0; La_x86_64_vector lrv_vector1; #ifndef __ILP32__ - __int128_t lrv_bnd0; - __int128_t lrv_bnd1; + __int128_t __glibc_unused1; + __int128_t __glibc_unused2; #endif } La_x86_64_retval; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link_lavcurrent.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link_lavcurrent.h new file mode 100644 index 00000000..9a5e0d7d --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/link_lavcurrent.h @@ -0,0 +1,25 @@ +/* Data structure for communication from the run-time dynamic linker for + loaded ELF shared objects. LAV_CURRENT definition. + Copyright (C) 2021-2024 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 + . */ + +#ifndef _LINK_H +# error "Never include directly; use instead." +#endif + +/* Version numbers for la_version handshake interface. */ +#define LAV_CURRENT 2 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/local_lim.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/local_lim.h index 2d82ada4..2c76f733 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/local_lim.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/local_lim.h @@ -1,5 +1,5 @@ /* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993-2018 Free Software Foundation, Inc. + Copyright (C) 1993-2024 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 @@ -14,7 +14,7 @@ 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 . */ + not, see . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A @@ -73,12 +73,12 @@ /* 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 +/* Maximum amount by which a process can decrease 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 16384 +/* Arrange for the definition of PTHREAD_STACK_MIN. */ +#include /* Maximum number of timer expiration overruns. */ #define DELAYTIMER_MAX 2147483647 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/locale.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/locale.h index 3a3d9219..0fcbb661 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/locale.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/locale.h @@ -1,5 +1,5 @@ /* Definition of locale category symbol values. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _LOCALE_H && !defined _LANGINFO_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/long-double.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/long-double.h index 28488e0b..791b5671 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/long-double.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-96 version. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* long double is distinct from double, so there is nothing to define here. */ +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/math-vector.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/math-vector.h index 3d229d87..04e19824 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/math-vector.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/math-vector.h @@ -1,5 +1,5 @@ /* Platform-specific SIMD declarations of math functions. - Copyright (C) 2014-2018 Free Software Foundation, Inc. + Copyright (C) 2014-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _MATH_H # error "Never include directly;\ @@ -58,6 +58,90 @@ # define __DECL_SIMD_pow __DECL_SIMD_x86_64 # undef __DECL_SIMD_powf # define __DECL_SIMD_powf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_acos +# define __DECL_SIMD_acos __DECL_SIMD_x86_64 +# undef __DECL_SIMD_acosf +# define __DECL_SIMD_acosf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_atan +# define __DECL_SIMD_atan __DECL_SIMD_x86_64 +# undef __DECL_SIMD_atanf +# define __DECL_SIMD_atanf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_asin +# define __DECL_SIMD_asin __DECL_SIMD_x86_64 +# undef __DECL_SIMD_asinf +# define __DECL_SIMD_asinf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_hypot +# define __DECL_SIMD_hypot __DECL_SIMD_x86_64 +# undef __DECL_SIMD_hypotf +# define __DECL_SIMD_hypotf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_exp2 +# define __DECL_SIMD_exp2 __DECL_SIMD_x86_64 +# undef __DECL_SIMD_exp2f +# define __DECL_SIMD_exp2f __DECL_SIMD_x86_64 +# undef __DECL_SIMD_exp10 +# define __DECL_SIMD_exp10 __DECL_SIMD_x86_64 +# undef __DECL_SIMD_exp10f +# define __DECL_SIMD_exp10f __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cosh +# define __DECL_SIMD_cosh __DECL_SIMD_x86_64 +# undef __DECL_SIMD_coshf +# define __DECL_SIMD_coshf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_expm1 +# define __DECL_SIMD_expm1 __DECL_SIMD_x86_64 +# undef __DECL_SIMD_expm1f +# define __DECL_SIMD_expm1f __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sinh +# define __DECL_SIMD_sinh __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sinhf +# define __DECL_SIMD_sinhf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cbrt +# define __DECL_SIMD_cbrt __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cbrtf +# define __DECL_SIMD_cbrtf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_atan2 +# define __DECL_SIMD_atan2 __DECL_SIMD_x86_64 +# undef __DECL_SIMD_atan2f +# define __DECL_SIMD_atan2f __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log10 +# define __DECL_SIMD_log10 __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log10f +# define __DECL_SIMD_log10f __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log2 +# define __DECL_SIMD_log2 __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log2f +# define __DECL_SIMD_log2f __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log1p +# define __DECL_SIMD_log1p __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log1pf +# define __DECL_SIMD_log1pf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_atanh +# define __DECL_SIMD_atanh __DECL_SIMD_x86_64 +# undef __DECL_SIMD_atanhf +# define __DECL_SIMD_atanhf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_acosh +# define __DECL_SIMD_acosh __DECL_SIMD_x86_64 +# undef __DECL_SIMD_acoshf +# define __DECL_SIMD_acoshf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_erf +# define __DECL_SIMD_erf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_erff +# define __DECL_SIMD_erff __DECL_SIMD_x86_64 +# undef __DECL_SIMD_tanh +# define __DECL_SIMD_tanh __DECL_SIMD_x86_64 +# undef __DECL_SIMD_tanhf +# define __DECL_SIMD_tanhf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_asinh +# define __DECL_SIMD_asinh __DECL_SIMD_x86_64 +# undef __DECL_SIMD_asinhf +# define __DECL_SIMD_asinhf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_erfc +# define __DECL_SIMD_erfc __DECL_SIMD_x86_64 +# undef __DECL_SIMD_erfcf +# define __DECL_SIMD_erfcf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_tan +# define __DECL_SIMD_tan __DECL_SIMD_x86_64 +# undef __DECL_SIMD_tanf +# define __DECL_SIMD_tanf __DECL_SIMD_x86_64 # endif #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h index ac3115bf..a51b7cdb 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h @@ -1,5 +1,5 @@ /* Prototype declarations for math classification macros helpers. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,30 +14,32 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ - + . */ /* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) +__MATHDECL_ALIAS (int, __fpclassify,, (_Mdouble_ __value), fpclassify) __attribute__ ((__const__)); /* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) +__MATHDECL_ALIAS (int, __signbit,, (_Mdouble_ __value), signbit) __attribute__ ((__const__)); /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int, __isinf,, (_Mdouble_ __value), isinf) + __attribute__ ((__const__)); /* Return nonzero if VALUE is finite and not NaN. Used by isfinite macro. */ -__MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int, __finite,, (_Mdouble_ __value), finite) + __attribute__ ((__const__)); /* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int, __isnan,, (_Mdouble_ __value), isnan) + __attribute__ ((__const__)); /* Test equality. */ -__MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y)); +__MATHDECL_ALIAS (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y), iseqsig); /* Test for signaling NaN. */ -__MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value)) +__MATHDECL_ALIAS (int, __issignaling,, (_Mdouble_ __value), issignaling) __attribute__ ((__const__)); diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h new file mode 100644 index 00000000..2ad57b6a --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h @@ -0,0 +1,39 @@ +/* Declare functions returning a narrower type. + Copyright (C) 2018-2024 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 + . */ + +#ifndef _MATH_H +# error "Never include directly; include instead." +#endif + +/* Add. */ +__MATHCALL_NARROW (__MATHCALL_NAME (add), __MATHCALL_REDIR_NAME (add), 2); + +/* Divide. */ +__MATHCALL_NARROW (__MATHCALL_NAME (div), __MATHCALL_REDIR_NAME (div), 2); + +/* Fused multiply-add. */ +__MATHCALL_NARROW (__MATHCALL_NAME (fma), __MATHCALL_REDIR_NAME2 (fma), 3); + +/* Multiply. */ +__MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2); + +/* Square root. */ +__MATHCALL_NARROW (__MATHCALL_NAME (sqrt), __MATHCALL_REDIR_NAME2 (sqrt), 1); + +/* Subtract. */ +__MATHCALL_NARROW (__MATHCALL_NAME (sub), __MATHCALL_REDIR_NAME (sub), 2); diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls.h index 92003639..4916ffb8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mathcalls.h @@ -1,5 +1,5 @@ /* Prototype declarations for math functions; helper file for . - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* NOTE: Because of the special way this file is used by , this file must NOT be protected from multiple inclusion as header files @@ -50,29 +50,29 @@ /* Trigonometric functions. */ /* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); +__MATHCALL_VEC (acos,, (_Mdouble_ __x)); /* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); +__MATHCALL_VEC (asin,, (_Mdouble_ __x)); /* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); +__MATHCALL_VEC (atan,, (_Mdouble_ __x)); /* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); +__MATHCALL_VEC (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); /* Cosine of X. */ __MATHCALL_VEC (cos,, (_Mdouble_ __x)); /* Sine of X. */ __MATHCALL_VEC (sin,, (_Mdouble_ __x)); /* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); +__MATHCALL_VEC (tan,, (_Mdouble_ __x)); /* Hyperbolic functions. */ /* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); +__MATHCALL_VEC (cosh,, (_Mdouble_ __x)); /* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); +__MATHCALL_VEC (sinh,, (_Mdouble_ __x)); /* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); +__MATHCALL_VEC (tanh,, (_Mdouble_ __x)); #ifdef __USE_GNU /* Cosine and sine of X. */ @@ -82,11 +82,11 @@ __MATHDECL_VEC (void,sincos,, #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); +__MATHCALL_VEC (acosh,, (_Mdouble_ __x)); /* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); +__MATHCALL_VEC (asinh,, (_Mdouble_ __x)); /* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); +__MATHCALL_VEC (atanh,, (_Mdouble_ __x)); #endif /* Exponential and logarithmic functions. */ @@ -104,22 +104,22 @@ __MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); __MATHCALL_VEC (log,, (_Mdouble_ __x)); /* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); +__MATHCALL_VEC (log10,, (_Mdouble_ __x)); /* Break VALUE into integral and fractional parts. */ __MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2)); -#if __GLIBC_USE (IEC_60559_FUNCS_EXT) +#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X) /* Compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); +__MATHCALL_VEC (exp10,, (_Mdouble_ __x)); #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); +__MATHCALL_VEC (expm1,, (_Mdouble_ __x)); /* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); +__MATHCALL_VEC (log1p,, (_Mdouble_ __x)); /* Return the base 2 signed integral exponent of X. */ __MATHCALL (logb,, (_Mdouble_ __x)); @@ -127,10 +127,10 @@ __MATHCALL (logb,, (_Mdouble_ __x)); #ifdef __USE_ISOC99 /* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); +__MATHCALL_VEC (exp2,, (_Mdouble_ __x)); /* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); +__MATHCALL_VEC (log2,, (_Mdouble_ __x)); #endif @@ -144,12 +144,12 @@ __MATHCALL (sqrt,, (_Mdouble_ __x)); #if defined __USE_XOPEN || defined __USE_ISOC99 /* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); +__MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); +__MATHCALL_VEC (cbrt,, (_Mdouble_ __x)); #endif @@ -174,12 +174,14 @@ __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); && !__MATH_DECLARING_FLOATN /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int,isinf,, (_Mdouble_ __value), isinf) + __attribute__ ((__const__)); # endif # if !__MATH_DECLARING_FLOATN /* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int,finite,, (_Mdouble_ __value), finite) + __attribute__ ((__const__)); /* Return the remainder of X/Y. */ __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); @@ -198,7 +200,7 @@ __MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); #ifdef __USE_ISOC99 /* Return representation of qNaN for double type. */ -__MATHCALLX (nan,, (const char *__tagb), (__const__)); +__MATHCALL (nan,, (const char *__tagb)); #endif @@ -208,7 +210,8 @@ __MATHCALLX (nan,, (const char *__tagb), (__const__)); || __MATH_DECLARING_DOUBLE == 0)) /* isnanf or isnanl don't. */ \ && !__MATH_DECLARING_FLOATN /* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int,isnan,, (_Mdouble_ __value), isnan) + __attribute__ ((__const__)); # endif #endif @@ -225,8 +228,8 @@ __MATHCALL (yn,, (int, _Mdouble_)); #if defined __USE_XOPEN || defined __USE_ISOC99 /* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); +__MATHCALL_VEC (erf,, (_Mdouble_)); +__MATHCALL_VEC (erfc,, (_Mdouble_)); __MATHCALL (lgamma,, (_Mdouble_)); #endif @@ -261,14 +264,14 @@ __MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y)); __MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y)); # endif -# if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN +# if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN /* Return X - epsilon. */ __MATHCALL (nextdown,, (_Mdouble_ __x)); /* Return X + epsilon. */ __MATHCALL (nextup,, (_Mdouble_ __x)); # endif -/* Return the remainder of integer divison X / Y with infinite precision. */ +/* Return the remainder of integer division X / Y with infinite precision. */ __MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); # ifdef __USE_ISOC99 @@ -280,7 +283,7 @@ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); __MATHDECL (int,ilogb,, (_Mdouble_ __x)); #endif -#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN /* Like ilogb, but returning long int. */ __MATHDECL (long int, llogb,, (_Mdouble_ __x)); #endif @@ -325,17 +328,19 @@ __MATHDECL (long long int,llround,, (_Mdouble_ __x)); /* Return positive difference between X and Y. */ __MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); +# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC2X) /* Return maximum numeric value from X and Y. */ __MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); /* Return minimum numeric value from X and Y. */ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); +# endif /* Multiply-add function computed as a ternary operation. */ __MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); #endif /* Use ISO C99. */ -#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN +#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN /* Round X to nearest integer value, rounding halfway cases to even. */ __MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__)); @@ -361,22 +366,56 @@ __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__)); +#endif + +#if __GLIBC_USE (ISOC2X) +/* Return maximum value from X and Y. */ +__MATHCALLX (fmaximum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); + +/* Return minimum value from X and Y. */ +__MATHCALLX (fminimum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); + +/* Return maximum numeric value from X and Y. */ +__MATHCALLX (fmaximum_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); + +/* Return minimum numeric value from X and Y. */ +__MATHCALLX (fminimum_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); + +/* Return value with maximum magnitude. */ +__MATHCALLX (fmaximum_mag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); + +/* Return value with minimum magnitude. */ +__MATHCALLX (fminimum_mag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); + +/* Return numeric value with maximum magnitude. */ +__MATHCALLX (fmaximum_mag_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); +/* Return numeric value with minimum magnitude. */ +__MATHCALLX (fminimum_mag_num,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); +#endif + +#if __GLIBC_USE (IEC_60559_EXT) || __MATH_DECLARING_FLOATN /* Total order operation. */ -__MATHDECL_1 (int, totalorder,, (_Mdouble_ __x, _Mdouble_ __y)) - __attribute__ ((__const__)); +__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x, + const _Mdouble_ *__y)) + __attribute_pure__; /* Total order operation on absolute values. */ -__MATHDECL_1 (int, totalordermag,, (_Mdouble_ __x, _Mdouble_ __y)) - __attribute__ ((__const__)); - -/* Canonicalize floating-point representation. */ -__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x)); +__MATHDECL_1 (int, totalordermag,, (const _Mdouble_ *__x, + const _Mdouble_ *__y)) + __attribute_pure__; /* Get NaN payload. */ __MATHCALL (getpayload,, (const _Mdouble_ *__x)); diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-linux.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-linux.h index ae4e30b3..5c3d43b0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-linux.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-linux.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux generic version. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." @@ -41,36 +41,28 @@ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ #define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif +#define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate + extension flags. */ +#define MAP_TYPE 0x0f /* Mask for type of mapping. */ /* Other flags. */ #define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# ifdef __MAP_ANONYMOUS -# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */ -# else -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# endif -# define MAP_ANON MAP_ANONYMOUS -/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ -# define MAP_HUGE_SHIFT 26 -# define MAP_HUGE_MASK 0x3f +#define MAP_FILE 0 +#ifdef __MAP_ANONYMOUS +# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */ +#else +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ #endif +#define MAP_ANON MAP_ANONYMOUS +/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ +#define MAP_HUGE_SHIFT 26 +#define MAP_HUGE_MASK 0x3f /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ #define MS_SYNC 4 /* Synchronous memory sync. */ #define MS_INVALIDATE 2 /* Invalidate the caches. */ -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -# define MREMAP_FIXED 2 -#endif - /* Advice to `madvise'. */ #ifdef __USE_MISC # define MADV_NORMAL 0 /* No further special treatment. */ @@ -86,15 +78,20 @@ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ -# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, +# define MADV_DONTDUMP 16 /* Explicitly exclude from the core dump, overrides the coredump filter bits. */ # define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */ # define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */ -# define MADV_COLD 20 /* deactivate these pages */ -# define MADV_PAGEOUT 21 /* reclaim these pages */ -# define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */ -# define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */ +# define MADV_COLD 20 /* Deactivate these pages. */ +# define MADV_PAGEOUT 21 /* Reclaim these pages. */ +# define MADV_POPULATE_READ 22 /* Populate (prefault) page tables + readable. */ +# define MADV_POPULATE_WRITE 23 /* Populate (prefault) page tables + writable. */ +# define MADV_DONTNEED_LOCKED 24 /* Like MADV_DONTNEED, but drop + locked pages too. */ +# define MADV_COLLAPSE 25 /* Synchronous hugepage collapse. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h new file mode 100644 index 00000000..97f654ad --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h @@ -0,0 +1,40 @@ +/* Definitions for POSIX memory map interface. Linux/generic version. + Copyright (C) 1997-2024 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 + . */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* These definitions are appropriate for architectures that, in the + Linux kernel, either have no uapi/asm/mman.h, or have one that + includes asm-generic/mman.h without any changes to the values of + the MAP_* flags defined in that header. */ + +#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +#define MAP_DENYWRITE 0x00800 /* ETXTBSY. */ +#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +#define MAP_LOCKED 0x02000 /* Lock the mapping. */ +#define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ +#define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +#define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +#define MAP_STACK 0x20000 /* Allocation is for a stack. */ +#define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +#define MAP_SYNC 0x80000 /* Perform synchronous page + faults for the mapping. */ +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-shared.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-shared.h index d15ba95c..d8ed4436 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-shared.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman-shared.h @@ -1,5 +1,5 @@ /* Memory-mapping-related declarations/definitions, not architecture-specific. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,19 +14,28 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." #endif #ifdef __USE_GNU +/* Flags for mremap. */ +# define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 +# define MREMAP_DONTUNMAP 4 + /* Flags for memfd_create. */ # ifndef MFD_CLOEXEC # define MFD_CLOEXEC 1U # define MFD_ALLOW_SEALING 2U # define MFD_HUGETLB 4U # endif +# ifndef MFD_NOEXEC_SEAL +# define MFD_NOEXEC_SEAL 8U +# define MFD_EXEC 0x10U +# endif /* Flags for mlock2. */ # ifndef MLOCK_ONFAULT diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman.h index fb4737a3..cd5ea8e0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/x86_64 version. - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." @@ -24,22 +24,15 @@ But the kernel header is not namespace clean. */ /* Other flags. */ -#ifdef __USE_MISC -# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ -#endif +#define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ +#define MAP_ABOVE4G 0x80 /* Only map above 4GB. */ -/* These are Linux-specific. */ #ifdef __USE_MISC -# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x02000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ -# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ -# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ -# define MAP_STACK 0x20000 /* Allocation is for a stack. */ -# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +/* Set up a restore token in the newly allocated shadow stack */ +# define SHADOW_STACK_SET_TOKEN 0x1 #endif +#include + /* Include generic Linux declarations. */ #include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman_ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman_ext.h new file mode 100644 index 00000000..b9112660 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/mman_ext.h @@ -0,0 +1,32 @@ +/* System-specific extensions of , Linux version. + Copyright (C) 2022-2024 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 + . */ + +#ifndef _SYS_MMAN_H +# error "Never include directly; use instead." +#endif + +#ifdef __USE_GNU +struct iovec; +extern __ssize_t process_madvise (int __pid_fd, const struct iovec *__iov, + size_t __count, int __advice, + unsigned __flags) + __THROW; + +extern int process_mrelease (int pidfd, unsigned int flags) __THROW; + +#endif /* __USE_GNU */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/netdb.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/netdb.h index dcac8543..b1ee69a7 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/netdb.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/netdb.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _NETDB_H # error "Never include directly; use instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/param.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/param.h index 03486c16..aa2d7212 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/param.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/param.h @@ -1,5 +1,5 @@ /* Old-style Unix parameters and limits. Linux version. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_PARAM_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/poll.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/poll.h index 4bd9db6f..6bac5a41 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/poll.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/poll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_POLL_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix1_lim.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix1_lim.h index 90066ffa..5d1e6169 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix1_lim.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix1_lim.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 2.9.2 Minimum Values Added to @@ -24,6 +24,7 @@ #ifndef _BITS_POSIX1_LIM_H #define _BITS_POSIX1_LIM_H 1 +#include /* These are the standard-mandated minimum values. */ @@ -133,7 +134,7 @@ /* Maximum number of characters in a tty name. */ #define _POSIX_TTY_NAME_MAX 9 -/* Maximum length of a timezone name (element of `tzname'). */ +/* Maximum length of a time zone abbreviation (element of 'tzname'). */ #ifdef __USE_XOPEN2K # define _POSIX_TZNAME_MAX 6 #else @@ -161,7 +162,14 @@ #ifndef SSIZE_MAX -# define SSIZE_MAX LONG_MAX +/* ssize_t is not formally required to be the signed type + corresponding to size_t, but it is for all configurations supported + by glibc. */ +# if __WORDSIZE == 64 || __WORDSIZE32_SIZE_ULONG +# define SSIZE_MAX LONG_MAX +# else +# define SSIZE_MAX INT_MAX +# endif #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix2_lim.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix2_lim.h index c460ea26..aa2947e8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix2_lim.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix2_lim.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Never include this file directly; include instead. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix_opt.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix_opt.h index 2339d4a1..a388d59f 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix_opt.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/posix_opt.h @@ -1,5 +1,5 @@ /* Define POSIX options for Linux. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ 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 . */ + not, see . */ #ifndef _BITS_POSIX_OPT_H #define _BITS_POSIX_OPT_H 1 @@ -25,7 +25,10 @@ /* Processes have a saved set-user-ID and a saved set-group-ID. */ #define _POSIX_SAVED_IDS 1 -/* Priority scheduling is supported. */ +/* Priority scheduling is not supported with the correct semantics, + but GNU/Linux applications expect that the corresponding interfaces + are available, even though the semantics do not meet the POSIX + requirements. See glibc bug 14829. */ #define _POSIX_PRIORITY_SCHEDULING 200809L /* Synchronizing file data is supported. */ @@ -81,7 +84,7 @@ /* We support user-defined stacks. */ #define _POSIX_THREAD_ATTR_STACKADDR 200809L -/* We support priority inheritence. */ +/* We support priority inheritance. */ #define _POSIX_THREAD_PRIO_INHERIT 200809L /* We support priority protection, though only for non-robust @@ -89,7 +92,7 @@ #define _POSIX_THREAD_PRIO_PROTECT 200809L #ifdef __USE_XOPEN2K8 -/* We support priority inheritence for robust mutexes. */ +/* We support priority inheritance for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L /* We do not support priority protection for robust mutexes. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h new file mode 100644 index 00000000..09e534fe --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h @@ -0,0 +1,31 @@ +/* Definition of PTHREAD_STACK_MIN, possibly dynamic. + Copyright (C) 2021-2024 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 + . */ + +#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 +# endif +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h new file mode 100644 index 00000000..8bcfa6a3 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h @@ -0,0 +1,20 @@ +/* Definition of PTHREAD_STACK_MIN. Linux version. + Copyright (C) 2021-2024 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 + . */ + +/* Minimum size for a thread. We are free to choose a reasonable value. */ +#define PTHREAD_STACK_MIN 16384 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h index 290f2f46..b23ff3b0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 2002-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 @@ -24,20 +24,17 @@ # if __WORDSIZE == 64 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_RWLOCK_T 56 # define __SIZEOF_PTHREAD_BARRIER_T 32 # else # define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_ATTR_T 32 -# define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_RWLOCK_T 44 # define __SIZEOF_PTHREAD_BARRIER_T 20 # endif #else # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_ATTR_T 36 -# define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_RWLOCK_T 32 # define __SIZEOF_PTHREAD_BARRIER_T 20 #endif @@ -47,57 +44,9 @@ #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -/* Definitions for internal mutex struct. */ -#define __PTHREAD_COMPAT_PADDING_MID -#define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 1 -#ifdef __x86_64__ -# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 -# define __PTHREAD_MUTEX_USE_UNION 0 -#else -# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 -# define __PTHREAD_MUTEX_USE_UNION 1 -#endif - #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT -struct __pthread_rwlock_arch_t -{ - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; -#ifdef __x86_64__ - int __cur_writer; - int __shared; - signed char __rwelision; -# ifdef __ILP32__ - unsigned char __pad1[3]; -# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } -# else - unsigned char __pad1[7]; -# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } -# endif - unsigned long int __pad2; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned int __flags; -# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 -#else - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; - unsigned char __shared; - signed char __rwelision; -# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - unsigned char __pad2; - int __cur_writer; -#endif -}; - #ifndef __x86_64__ /* Extra attributes for the cleanup functions. */ # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h index 70ce0a04..bace817f 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h @@ -1,5 +1,5 @@ /* Declaration of common pthread types for all architectures. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_PTHREADTYPES_COMMON_H # define _BITS_PTHREADTYPES_COMMON_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h index eafbbbc6..30ba0175 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h @@ -1,6 +1,6 @@ /* `ptrace' debugger support interface. Linux version, not architecture-specific. - Copyright (C) 1996-2020 Free Software Foundation, Inc. + Copyright (C) 1996-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -120,6 +120,26 @@ struct __ptrace_syscall_info }; }; +/* Results of PTRACE_GET_RSEQ_CONFIGURATION. */ +struct __ptrace_rseq_configuration +{ + __uint64_t rseq_abi_pointer; + __uint32_t rseq_abi_size; + __uint32_t signature; + __uint32_t flags; + __uint32_t pad; +}; + +/* Argument of PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG and + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG. */ +struct __ptrace_sud_config +{ + __uint64_t mode; + __uint64_t selector; + __uint64_t offset; + __uint64_t len; +}; + /* Perform process tracing functions. REQUEST is one of the values above, and determines the action to be taken. For all requests except PTRACE_TRACEME, PID specifies the process to be diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/resource.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/resource.h index fafbadf9..148b6a99 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/resource.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. Linux version. - Copyright (C) 1994-2018 Free Software Foundation, Inc. + Copyright (C) 1994-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_RESOURCE_H # error "Never use directly; include instead." @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sched.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sched.h index 24159c57..a53e1362 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sched.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sched.h @@ -1,6 +1,6 @@ /* Definitions of constants and data structure for POSIX 1003.1b-1993 scheduling interface. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SCHED_H #define _BITS_SCHED_H 1 @@ -44,6 +44,8 @@ # define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ # define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ # define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ +# define CLONE_PIDFD 0x00001000 /* Set if a pidfd should be placed + in parent. */ # define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ # define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to wake it up on mm_release. */ @@ -69,13 +71,13 @@ # define CLONE_NEWPID 0x20000000 /* New pid namespace. */ # define CLONE_NEWNET 0x40000000 /* New network namespace. */ # define CLONE_IO 0x80000000 /* Clone I/O context. */ + +/* cloning flags intersect with CSIGNAL so can be used only with unshare and + clone3 syscalls. */ +#define CLONE_NEWTIME 0x00000080 /* New time namespace */ #endif -/* Data structure to describe a process' schedulability. */ -struct sched_param -{ - int sched_priority; -}; +#include __BEGIN_DECLS @@ -90,6 +92,9 @@ extern int unshare (int __flags) __THROW; /* Get index of currently used CPU. */ extern int sched_getcpu (void) __THROW; +/* Get currently used CPU and NUMA node. */ +extern int getcpu (unsigned int *, unsigned int *) __THROW; + /* Switch process to namespace of type NSTYPE indicated by FD. */ extern int setns (int __fd, int __nstype) __THROW; #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/select.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/select.h index 2c0a2b5e..2b642fea 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/select.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/select.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,51 +13,25 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SELECT_H # error "Never use directly; include instead." #endif -#include - - -#if defined __GNUC__ && __GNUC__ >= 2 - -# if __WORDSIZE == 64 -# define __FD_ZERO_STOS "stosq" -# else -# define __FD_ZERO_STOS "stosl" -# endif - -# define __FD_ZERO(fdsp) \ - do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ - : "=c" (__d0), "=D" (__d1) \ - : "a" (0), "0" (sizeof (fd_set) \ - / sizeof (__fd_mask)), \ - "1" (&__FDS_BITS (fdsp)[0]) \ - : "memory"); \ - } while (0) - -#else /* ! GNU CC */ /* We don't use `memset' because this would require a prototype and the array isn't too big. */ -# define __FD_ZERO(set) \ +#define __FD_ZERO(s) \ do { \ unsigned int __i; \ - fd_set *__arr = (set); \ + fd_set *__arr = (s); \ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ __FDS_BITS (__arr)[__i] = 0; \ } while (0) - -#endif /* GNU CC */ - -#define __FD_SET(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) -#define __FD_CLR(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) -#define __FD_ISSET(d, set) \ - ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) +#define __FD_SET(d, s) \ + ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) +#define __FD_CLR(d, s) \ + ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) +#define __FD_ISSET(d, s) \ + ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sem.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sem.h index b34cce20..012ff151 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sem.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,13 +13,16 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." #endif #include +#include +#include +#include /* Flags for `semop'. */ #define SEM_UNDO 0x1000 /* undo the operation on exit */ @@ -33,20 +36,6 @@ #define SETVAL 16 /* set semval */ #define SETALL 17 /* set all semval's */ - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - __syscall_ulong_t __glibc_reserved1; - __time_t sem_ctime; /* last time changed by semctl() */ - __syscall_ulong_t __glibc_reserved2; - __syscall_ulong_t sem_nsems; /* number of semaphores in set */ - __syscall_ulong_t __glibc_reserved3; - __syscall_ulong_t __glibc_reserved4; -}; - /* The user should define a union like the following to use it for arguments for `semctl'. @@ -68,6 +57,7 @@ struct semid_ds /* ipcs ctl cmds */ # define SEM_STAT 18 # define SEM_INFO 19 +# define SEM_STAT_ANY 20 struct seminfo { diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/semaphore.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/semaphore.h index 299de51f..6296ea82 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/semaphore.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/semaphore.h @@ -1,6 +1,6 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +/* Generic POSIX semaphore type layout + Copyright (C) 1995-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2002. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -28,7 +28,6 @@ # define __SIZEOF_SEM_T 16 #endif - /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/setjmp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/setjmp.h index e0c22ac7..e7318ff6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/setjmp.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2018 Free Software Foundation, Inc. +/* Copyright (C) 2001-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #ifndef _BITS_SETJMP_H diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shm.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shm.h index fa70813c..95f78639 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shm.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,13 +13,15 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." #endif #include +#include +#include /* Permission flag for shmget. */ #define SHM_R 0400 /* or S_IRUGO from */ @@ -37,43 +39,18 @@ __BEGIN_DECLS -/* Segment low boundary address multiple. */ -#define SHMLBA (__getpagesize ()) -extern int __getpagesize (void) __THROW __attribute__ ((__const__)); - - /* Type to count number of attaches. */ typedef __syscall_ulong_t shmatt_t; -/* Data structure describing a shared memory segment. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ -#ifndef __x86_64__ - unsigned long int __glibc_reserved1; -#endif - __time_t shm_dtime; /* time of last shmdt() */ -#ifndef __x86_64__ - unsigned long int __glibc_reserved2; -#endif - __time_t shm_ctime; /* time of last change by shmctl() */ -#ifndef __x86_64__ - unsigned long int __glibc_reserved3; -#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_reserved4; - __syscall_ulong_t __glibc_reserved5; - }; +#include +#include #ifdef __USE_MISC /* ipcs ctl commands */ # define SHM_STAT 13 # define SHM_INFO 14 +# define SHM_STAT_ANY 15 /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shmlba.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shmlba.h new file mode 100644 index 00000000..06064914 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. Generic version. + Copyright (C) 2018-2024 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize ()) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + +__END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigaction.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigaction.h index fd29373e..af9d4577 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigaction.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigaction.h @@ -1,5 +1,5 @@ /* The proper definitions for Linux's sigaction. - Copyright (C) 1993-2018 Free Software Foundation, Inc. + Copyright (C) 1993-2024 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 @@ -14,7 +14,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ + +#ifndef _BITS_SIGACTION_H +#define _BITS_SIGACTION_H 1 #ifndef _SIGNAL_H # error "Never include directly; use instead." @@ -76,3 +79,5 @@ struct sigaction #define SIG_BLOCK 0 /* Block signals. */ #define SIG_UNBLOCK 1 /* Unblock signals. */ #define SIG_SETMASK 2 /* Set the set of blocked signals. */ + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigcontext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigcontext.h index 5f19c488..773cc327 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigcontext.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigcontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 2002-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 @@ -26,7 +26,7 @@ #define FP_XSTATE_MAGIC1 0x46505853U #define FP_XSTATE_MAGIC2 0x46505845U -#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) +#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2) struct _fpx_sw_bytes { diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h index 897b7d26..c0cece92 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h @@ -1,5 +1,5 @@ /* sigevent constants. Linux version. - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SIGEVENT_CONSTS_H #define _BITS_SIGEVENT_CONSTS_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h index 193bd9c4..5265c8dc 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h @@ -1,5 +1,5 @@ /* siginfo constants. Linux version. - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SIGINFO_CONSTS_H #define _BITS_SIGINFO_CONSTS_H 1 @@ -35,7 +35,9 @@ enum { SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ - SI_TKILL = -6, /* Sent by tkill. */ + SI_DETHREAD = -7, /* Sent by execve killing subsidiary + threads. */ + SI_TKILL, /* Sent by tkill. */ SI_SIGIO, /* Sent by queued SIGIO. */ #if __SI_ASYNCIO_AFTER_SIGIO SI_ASYNCIO, /* Sent by AIO completion. */ @@ -51,6 +53,7 @@ enum SI_KERNEL = 0x80 /* Send by kernel. */ #define SI_ASYNCNL SI_ASYNCNL +#define SI_DETHREAD SI_DETHREAD #define SI_TKILL SI_TKILL #define SI_SIGIO SI_SIGIO #define SI_ASYNCIO SI_ASYNCIO @@ -81,8 +84,10 @@ enum # define ILL_PRVREG ILL_PRVREG ILL_COPROC, /* Coprocessor error. */ # define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ + ILL_BADSTK, /* Internal stack error. */ # define ILL_BADSTK ILL_BADSTK + ILL_BADIADDR /* Unimplemented instruction address. */ +# define ILL_BADIADDR ILL_BADIADDR }; /* `si_code' values for SIGFPE signal. */ @@ -102,8 +107,12 @@ enum # define FPE_FLTRES FPE_FLTRES FPE_FLTINV, /* Floating point invalid operation. */ # define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ + FPE_FLTSUB, /* Subscript out of range. */ # define FPE_FLTSUB FPE_FLTSUB + FPE_FLTUNK = 14, /* Undiagnosed floating-point exception. */ +# define FPE_FLTUNK FPE_FLTUNK + FPE_CONDTRAP /* Trap on condition. */ +# define FPE_CONDTRAP FPE_CONDTRAP }; /* `si_code' values for SIGSEGV signal. */ @@ -115,8 +124,20 @@ enum # define SEGV_ACCERR SEGV_ACCERR SEGV_BNDERR, /* Bounds checking failure. */ # define SEGV_BNDERR SEGV_BNDERR - SEGV_PKUERR /* Protection key checking failure. */ + SEGV_PKUERR, /* Protection key checking failure. */ # define SEGV_PKUERR SEGV_PKUERR + SEGV_ACCADI, /* ADI not enabled for mapped object. */ +# define SEGV_ACCADI SEGV_ACCADI + SEGV_ADIDERR, /* Disrupting MCD error. */ +# define SEGV_ADIDERR SEGV_ADIDERR + SEGV_ADIPERR, /* Precise MCD exception. */ +# define SEGV_ADIPERR SEGV_ADIPERR + SEGV_MTEAERR, /* Asynchronous ARM MTE error. */ +# define SEGV_MTEAERR SEGV_MTEAERR + SEGV_MTESERR, /* Synchronous ARM MTE exception. */ +# define SEGV_MTESERR SEGV_MTESERR + SEGV_CPERR /* Control protection fault. */ +# define SEGV_CPERR SEGV_CPERR }; /* `si_code' values for SIGBUS signal. */ @@ -124,7 +145,7 @@ enum { BUS_ADRALN = 1, /* Invalid address alignment. */ # define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ + BUS_ADRERR, /* Non-existent physical address. */ # define BUS_ADRERR BUS_ADRERR BUS_OBJERR, /* Object specific hardware error. */ # define BUS_OBJERR BUS_OBJERR @@ -141,8 +162,14 @@ enum { TRAP_BRKPT = 1, /* Process breakpoint. */ # define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ + TRAP_TRACE, /* Process trace trap. */ # define TRAP_TRACE TRAP_TRACE + TRAP_BRANCH, /* Process taken branch trap. */ +# define TRAP_BRANCH TRAP_BRANCH + TRAP_HWBKPT, /* Hardware breakpoint/watchpoint. */ +# define TRAP_HWBKPT TRAP_HWBKPT + TRAP_UNK /* Undiagnosed trap. */ +# define TRAP_UNK TRAP_UNK }; # endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signal_ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signal_ext.h new file mode 100644 index 00000000..304a7eb8 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signal_ext.h @@ -0,0 +1,31 @@ +/* System-specific extensions of , Linux version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + +#ifdef __USE_GNU + +/* Send SIGNAL to the thread TID in the thread group (process) + identified by TGID. This function behaves like kill, but also + fails with ESRCH if the specified TID does not belong to the + specified thread group. */ +extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal); + +#endif /* __USE_GNU */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-arch.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-arch.h new file mode 100644 index 00000000..4627134e --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-arch.h @@ -0,0 +1,64 @@ +/* Signal number definitions. Linux version. + Copyright (C) 1995-2024 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 + . */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +/* Adjustments and additions to the signal number constants for + most Linux systems. */ + +#define SIGSTKFLT 16 /* Stack fault (obsolete). */ +#define SIGPWR 30 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 7 /* Bus error. */ +#define SIGSYS 31 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 23 /* Urgent data is available at a socket. */ +#define SIGSTOP 19 /* Stop, unblockable. */ +#define SIGTSTP 20 /* Keyboard stop. */ +#define SIGCONT 18 /* Continue. */ +#define SIGCHLD 17 /* Child terminated or stopped. */ +#define SIGTTIN 21 /* Background read from control terminal. */ +#define SIGTTOU 22 /* Background write to control terminal. */ +#define SIGPOLL 29 /* Pollable event occurred (System V). */ +#define SIGXFSZ 25 /* File size limit exceeded. */ +#define SIGXCPU 24 /* CPU time limit exceeded. */ +#define SIGVTALRM 26 /* Virtual timer expired. */ +#define SIGPROF 27 /* Profiling timer expired. */ +#define SIGUSR1 10 /* User-defined signal 1. */ +#define SIGUSR2 12 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +#define __SIGRTMIN 32 +#define __SIGRTMAX 64 + +#endif /* included. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-generic.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-generic.h index 8f1044a1..09781019 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-generic.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/signum-generic.h @@ -1,5 +1,5 @@ /* Signal number constants. Generic template. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SIGNUM_GENERIC_H #define _BITS_SIGNUM_GENERIC_H 1 @@ -57,31 +57,9 @@ #define SIGQUIT 3 /* Quit. */ #define SIGTRAP 5 /* Trace/breakpoint trap. */ #define SIGKILL 9 /* Killed. */ -#define SIGBUS 10 /* Bus error. */ -#define SIGSYS 12 /* Bad system call. */ #define SIGPIPE 13 /* Broken pipe. */ #define SIGALRM 14 /* Alarm clock. */ -/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ -#define SIGURG 16 /* Urgent data is available at a socket. */ -#define SIGSTOP 17 /* Stop, unblockable. */ -#define SIGTSTP 18 /* Keyboard stop. */ -#define SIGCONT 19 /* Continue. */ -#define SIGCHLD 20 /* Child terminated or stopped. */ -#define SIGTTIN 21 /* Background read from control terminal. */ -#define SIGTTOU 22 /* Background write to control terminal. */ -#define SIGPOLL 23 /* Pollable event occurred (System V). */ -#define SIGXCPU 24 /* CPU time limit exceeded. */ -#define SIGXFSZ 25 /* File size limit exceeded. */ -#define SIGVTALRM 26 /* Virtual timer expired. */ -#define SIGPROF 27 /* Profiling timer expired. */ -#define SIGUSR1 30 /* User-defined signal 1. */ -#define SIGUSR2 31 /* User-defined signal 2. */ - -/* Nonstandard signals found in all modern POSIX systems - (including both BSD and Linux). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ - /* Archaic names for compatibility. */ #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ #define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ @@ -93,8 +71,9 @@ but some real-time signals may be used internally by glibc. Do not use these constants in application code; use SIGRTMIN and SIGRTMAX (defined in signal.h) instead. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX __SIGRTMIN + +/* Include system specific bits. */ +#include /* Biggest signal number + 1 (including real-time signals). */ #define _NSIG (__SIGRTMAX + 1) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstack.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstack.h index c9e7ddfc..3250e109 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstack.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstksz.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstksz.h new file mode 100644 index 00000000..c82fe3e0 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigstksz.h @@ -0,0 +1,33 @@ +/* Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version. + Copyright (C) 2020-2024 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 + . */ + +#ifndef _SIGNAL_H +# error "Never include directly; use instead." +#endif + +#if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE +# include + +/* 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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigthread.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigthread.h index b1fb6150..700b31d8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigthread.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sigthread.h @@ -1,5 +1,5 @@ /* Signal handling function for threaded programs. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,7 @@ 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 . */ + not, see . */ #ifndef _BITS_SIGTHREAD_H #define _BITS_SIGTHREAD_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sockaddr.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sockaddr.h index edf36c28..e9779a22 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sockaddr.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sockaddr.h @@ -1,5 +1,5 @@ /* Definition of struct sockaddr_* common members and sizes, generic version. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Never include this file directly; use instead. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket.h index fa409f0f..0d86feb4 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket.h @@ -1,5 +1,5 @@ /* System-specific socket constants and types. Linux version. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H @@ -85,7 +85,9 @@ typedef __socklen_t socklen_t; #define PF_KCM 41 /* Kernel Connection Multiplexor. */ #define PF_QIPCRTR 42 /* Qualcomm IPC Router. */ #define PF_SMC 43 /* SMC sockets. */ -#define PF_MAX 44 /* For now.. */ +#define PF_XDP 44 /* XDP sockets. */ +#define PF_MCTP 45 /* Management component transport protocol. */ +#define PF_MAX 46 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC @@ -135,6 +137,8 @@ typedef __socklen_t socklen_t; #define AF_KCM PF_KCM #define AF_QIPCRTR PF_QIPCRTR #define AF_SMC PF_SMC +#define AF_XDP PF_XDP +#define AF_MCTP PF_MCTP #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. @@ -164,9 +168,13 @@ typedef __socklen_t socklen_t; #define SOL_NFC 280 #define SOL_KCM 281 #define SOL_TLS 282 +#define SOL_XDP 283 +#define SOL_MPTCP 284 +#define SOL_MCTP 285 +#define SOL_SMC 286 /* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 +#define SOMAXCONN 4096 /* Get the definition of the macro to define the common sockaddr members. */ #include @@ -299,6 +307,12 @@ struct cmsghdr + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) +/* Given a length, return the additional padding necessary such that + len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */ +#define __CMSG_PADDING(len) ((sizeof (size_t) \ + - ((len) & (sizeof (size_t) - 1))) \ + & (sizeof (size_t) - 1)) + extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW; #ifdef __USE_EXTERN_INLINES @@ -308,18 +322,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, _EXTERN_INLINE struct cmsghdr * __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) { + /* We may safely assume that __cmsg lies between __mhdr->msg_control and + __mhdr->msg_controllen because the user is required to obtain the first + cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs + via CMSG_NXTHDR, setting lengths along the way. However, we don't yet + trust the value of __cmsg->cmsg_len and therefore do not use it in any + pointer arithmetic until we check its value. */ + + unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control; + unsigned char * __cmsg_ptr = (unsigned char *) __cmsg; + + size_t __size_needed = sizeof (struct cmsghdr) + + __CMSG_PADDING (__cmsg->cmsg_len); + + /* The current header is malformed, too small to be a full header. */ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ return (struct cmsghdr *) 0; + /* There isn't enough space between __cmsg and the end of the buffer to + hold the current cmsg *and* the next one. */ + if (((size_t) + (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr) + < __size_needed) + || ((size_t) + (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr + - __size_needed) + < __cmsg->cmsg_len)) + + return (struct cmsghdr *) 0; + + /* Now, we trust cmsg_len and can use it to find the next header. */ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return (struct cmsghdr *) 0; return __cmsg; } #endif /* Use `extern inline'. */ @@ -333,6 +367,10 @@ enum #ifdef __USE_GNU , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS + , SCM_SECURITY = 0x03 /* Security label. */ +# define SCM_SECURITY SCM_SECURITY + , SCM_PIDFD = 0x04 /* Pidfd. */ +# define SCM_PIDFD SCM_PIDFD #endif }; @@ -346,98 +384,12 @@ struct ucred }; #endif -/* Ugly workaround for unclean kernel headers. */ -#ifndef __USE_MISC -# ifndef FIOGETOWN -# define __SYS_SOCKET_H_undef_FIOGETOWN -# endif -# ifndef FIOSETOWN -# define __SYS_SOCKET_H_undef_FIOSETOWN -# endif -# ifndef SIOCATMARK -# define __SYS_SOCKET_H_undef_SIOCATMARK -# endif -# ifndef SIOCGPGRP -# define __SYS_SOCKET_H_undef_SIOCGPGRP -# endif -# ifndef SIOCGSTAMP -# define __SYS_SOCKET_H_undef_SIOCGSTAMP -# endif -# ifndef SIOCGSTAMPNS -# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# endif -# ifndef SIOCSPGRP -# define __SYS_SOCKET_H_undef_SIOCSPGRP -# endif -#endif -#ifndef IOCSIZE_MASK -# define __SYS_SOCKET_H_undef_IOCSIZE_MASK -#endif -#ifndef IOCSIZE_SHIFT -# define __SYS_SOCKET_H_undef_IOCSIZE_SHIFT -#endif -#ifndef IOC_IN -# define __SYS_SOCKET_H_undef_IOC_IN -#endif -#ifndef IOC_INOUT -# define __SYS_SOCKET_H_undef_IOC_INOUT -#endif -#ifndef IOC_OUT -# define __SYS_SOCKET_H_undef_IOC_OUT -#endif - -/* Get socket manipulation related informations from kernel headers. */ -#include - -#ifndef __USE_MISC -# ifdef __SYS_SOCKET_H_undef_FIOGETOWN -# undef __SYS_SOCKET_H_undef_FIOGETOWN -# undef FIOGETOWN -# endif -# ifdef __SYS_SOCKET_H_undef_FIOSETOWN -# undef __SYS_SOCKET_H_undef_FIOSETOWN -# undef FIOSETOWN -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCATMARK -# undef __SYS_SOCKET_H_undef_SIOCATMARK -# undef SIOCATMARK -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP -# undef __SYS_SOCKET_H_undef_SIOCGPGRP -# undef SIOCGPGRP -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP -# undef __SYS_SOCKET_H_undef_SIOCGSTAMP -# undef SIOCGSTAMP -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS -# undef SIOCGSTAMPNS -# endif -# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP -# undef __SYS_SOCKET_H_undef_SIOCSPGRP -# undef SIOCSPGRP -# endif -#endif -#ifdef __SYS_SOCKET_H_undef_IOCSIZE_MASK -# undef __SYS_SOCKET_H_undef_IOCSIZE_MASK -# undef IOCSIZE_MASK -#endif -#ifdef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT -# undef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT -# undef IOCSIZE_SHIFT -#endif -#ifdef __SYS_SOCKET_H_undef_IOC_IN -# undef __SYS_SOCKET_H_undef_IOC_IN -# undef IOC_IN -#endif -#ifdef __SYS_SOCKET_H_undef_IOC_INOUT -# undef __SYS_SOCKET_H_undef_IOC_INOUT -# undef IOC_INOUT -#endif -#ifdef __SYS_SOCKET_H_undef_IOC_OUT -# undef __SYS_SOCKET_H_undef_IOC_OUT -# undef IOC_OUT +#ifdef __USE_MISC +# include +# include +#else +# define SO_DEBUG 1 +# include #endif /* Structure used to manipulate the SO_LINGER option. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket_type.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket_type.h index 035394ab..13aa922b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket_type.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/socket_type.h @@ -1,5 +1,5 @@ /* Define enum __socket_type for generic Linux. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SOCKET_H # error "Never include directly; use instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/spawn_ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/spawn_ext.h new file mode 100644 index 00000000..667bc0be --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/spawn_ext.h @@ -0,0 +1,67 @@ +/* POSIX spawn extensions. Linux version. + Copyright (C) 2023-2024 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 + . */ + +#ifndef _SPAWN_H +# error "Never include directly; use instead." +#endif + +__BEGIN_DECLS + +#ifdef __USE_MISC + +/* Get the cgroupsv2 the attribute structure. */ +extern int posix_spawnattr_getcgroup_np (const posix_spawnattr_t * + __restrict __attr, + int *__restrict __cgroup) + __THROW __nonnull ((1, 2)); + +/* Sore the cgroupsv2 the attribute structure. */ +extern int posix_spawnattr_setcgroup_np (posix_spawnattr_t *__attr, + int __cgroup) + __THROW __nonnull ((1)); + +/* Spawn a new process executing PATH with the attributes describes in *ATTRP. + Before running the process perform the actions described in FACTS. Return + a PID file descriptor in PIDFD if process creation was successful and the + argument is non-null. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int pidfd_spawn (int *__restrict __pidfd, + const char *__restrict __path, + const posix_spawn_file_actions_t *__restrict __facts, + const posix_spawnattr_t *__restrict __attrp, + char *const __argv[__restrict_arr], + char *const __envp[__restrict_arr]) + __nonnull ((2, 5)); + +/* Similar to `pidfd_spawn' but search for FILE in the PATH. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +extern int pidfd_spawnp (int *__restrict __pidfd, + const char *__restrict __file, + const posix_spawn_file_actions_t *__restrict __facts, + const posix_spawnattr_t *__restrict __attrp, + char *const __argv[__restrict_arr], + char *const __envp[__restrict_arr]) + __nonnull ((1, 2, 5)); + +#endif /* __USE_MISC */ + +__END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ss_flags.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ss_flags.h index f7fb9d02..c7151488 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ss_flags.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/ss_flags.h @@ -1,5 +1,5 @@ /* ss_flags values for stack_t. Linux version. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SS_FLAGS_H #define _BITS_SS_FLAGS_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stat.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stat.h index 2ae24869..fad5f435 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stat.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." @@ -22,157 +22,7 @@ #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 -/* Versions of the `struct stat' data structure. */ -#ifndef __x86_64__ -# define _STAT_VER_LINUX_OLD 1 -# define _STAT_VER_KERNEL 1 -# define _STAT_VER_SVR4 2 -# define _STAT_VER_LINUX 3 - -/* i386 versions of the `xmknod' interface. */ -# define _MKNOD_VER_LINUX 1 -# define _MKNOD_VER_SVR4 2 -# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ -#else -# define _STAT_VER_KERNEL 0 -# define _STAT_VER_LINUX 1 - -/* x86-64 versions of the `xmknod' interface. */ -# define _MKNOD_VER_LINUX 0 -#endif - -#define _STAT_VER _STAT_VER_LINUX - -struct stat - { - __dev_t st_dev; /* Device. */ -#ifndef __x86_64__ - unsigned short int __pad1; -#endif -#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino_t __st_ino; /* 32bit file serial number. */ -#endif -#ifndef __x86_64__ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ -#else - __nlink_t st_nlink; /* Link count. */ - __mode_t st_mode; /* File mode. */ -#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__ - int __pad0; -#endif - __dev_t st_rdev; /* Device number, if device. */ -#ifndef __x86_64__ - unsigned short int __pad2; -#endif -#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ -#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#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 - identifier 'timespec' to appear in the header. - Therefore we have to handle the use of this header in strictly - standard-compliant sources special. */ - 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 - __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__ - __syscall_slong_t __glibc_reserved[3]; -#else -# ifndef __USE_FILE_OFFSET64 - unsigned long int __glibc_reserved4; - unsigned long int __glibc_reserved5; -# else - __ino64_t st_ino; /* File serial number. */ -# endif -#endif - }; - -#ifdef __USE_LARGEFILE64 -/* Note stat64 has the same shape as stat for x86-64. */ -struct stat64 - { - __dev_t st_dev; /* Device. */ -# ifdef __x86_64__ - __ino64_t st_ino; /* File serial number. */ - __nlink_t st_nlink; /* Link count. */ - __mode_t st_mode; /* File mode. */ -# 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 - __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__ - int __pad0; - __dev_t st_rdev; /* Device number, if device. */ - __off_t st_size; /* Size of file, in bytes. */ -# else - __dev_t st_rdev; /* Device number, if device. */ - unsigned int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ -# endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ -# 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 - identifier 'timespec' to appear in the header. - Therefore we have to handle the use of this header in strictly - standard-compliant sources special. */ - 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 - __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__ - __syscall_slong_t __glibc_reserved[3]; -# else - __ino64_t st_ino; /* File serial number. */ -# endif - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV -/* Nanosecond resolution time values are supported. */ -#define _STATBUF_ST_NSEC +#include /* Encoding of the file mode. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statfs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statfs.h index f073867e..22780a11 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statfs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_STATFS_H # error "Never include directly; use instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statvfs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statvfs.h index 0d95901a..64f0dcb0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statvfs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statvfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_STATVFS_H # error "Never include directly; use instead." @@ -51,7 +51,8 @@ struct statvfs #endif unsigned long int f_flag; unsigned long int f_namemax; - int __f_spare[6]; + unsigned int f_type; + int __f_spare[5]; }; #ifdef __USE_LARGEFILE64 @@ -71,7 +72,8 @@ struct statvfs64 #endif unsigned long int f_flag; unsigned long int f_namemax; - int __f_spare[6]; + unsigned int f_type; + int __f_spare[5]; }; #endif @@ -103,7 +105,9 @@ enum # define ST_NOATIME ST_NOATIME ST_NODIRATIME = 2048, /* Do not update directory access times. */ # define ST_NODIRATIME ST_NODIRATIME - ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ + ST_RELATIME = 4096, /* Update atime relative to mtime/ctime. */ # define ST_RELATIME ST_RELATIME + ST_NOSYMFOLLOW = 8192 /* Do not follow symlinks. */ +# define ST_NOSYMFOLLOW ST_NOSYMFOLLOW #endif /* Use GNU. */ }; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statx-generic.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statx-generic.h new file mode 100644 index 00000000..58598560 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statx-generic.h @@ -0,0 +1,65 @@ +/* Generic statx-related definitions and declarations. + Copyright (C) 2018-2024 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 + . */ + +/* This interface is based on in Linux. */ + +#ifndef _SYS_STAT_H +# error Never include directly, include instead. +#endif + +#include +#include + +#ifndef STATX_TYPE +# define STATX_TYPE 0x0001U +# define STATX_MODE 0x0002U +# define STATX_NLINK 0x0004U +# define STATX_UID 0x0008U +# define STATX_GID 0x0010U +# define STATX_ATIME 0x0020U +# define STATX_MTIME 0x0040U +# define STATX_CTIME 0x0080U +# define STATX_INO 0x0100U +# define STATX_SIZE 0x0200U +# define STATX_BLOCKS 0x0400U +# define STATX_BASIC_STATS 0x07ffU +# define STATX_ALL 0x0fffU +# define STATX_BTIME 0x0800U +# define STATX_MNT_ID 0x1000U +# define STATX_DIOALIGN 0x2000U +# define STATX__RESERVED 0x80000000U + +# define STATX_ATTR_COMPRESSED 0x0004 +# define STATX_ATTR_IMMUTABLE 0x0010 +# define STATX_ATTR_APPEND 0x0020 +# define STATX_ATTR_NODUMP 0x0040 +# define STATX_ATTR_ENCRYPTED 0x0800 +# define STATX_ATTR_AUTOMOUNT 0x1000 +# define STATX_ATTR_MOUNT_ROOT 0x2000 +# define STATX_ATTR_VERITY 0x100000 +# define STATX_ATTR_DAX 0x200000 +#endif /* !STATX_TYPE */ + +__BEGIN_DECLS + +/* Fill *BUF with information about PATH in DIRFD. */ +int statx (int __dirfd, const char *__restrict __path, int __flags, + unsigned int __mask, struct statx *__restrict __buf) + __THROW __nonnull ((2, 5)); + +__END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statx.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statx.h new file mode 100644 index 00000000..6a25f8f6 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/statx.h @@ -0,0 +1,39 @@ +/* statx-related definitions and declarations. Linux version. + Copyright (C) 2018-2024 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 + . */ + +/* This interface is based on in Linux. */ + +#ifndef _SYS_STAT_H +# error Never include directly, include instead. +#endif + +/* Use the Linux kernel header if available. */ + +/* Use "" to work around incorrect macro expansion of the + __has_include argument (GCC PR 80005). */ +#ifdef __has_include +# if __has_include ("linux/stat.h") +# include "linux/stat.h" +# ifdef STATX_TYPE +# define __statx_timestamp_defined 1 +# define __statx_defined 1 +# endif +# endif +#endif + +#include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-intn.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-intn.h index de1ffcce..5bcfa6b0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-intn.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-intn.h @@ -1,5 +1,5 @@ /* Define intN_t types. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_STDINT_INTN_H #define _BITS_STDINT_INTN_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-least.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-least.h new file mode 100644 index 00000000..a4435be5 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-least.h @@ -0,0 +1,36 @@ +/* Define int_leastN_t and uint_leastN types. + Copyright (C) 2024 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 + . */ + +#ifndef _BITS_STDINT_LEAST_H +#define _BITS_STDINT_LEAST_H 1 + +#include + +/* Signed. */ +typedef __int_least8_t int_least8_t; +typedef __int_least16_t int_least16_t; +typedef __int_least32_t int_least32_t; +typedef __int_least64_t int_least64_t; + +/* Unsigned. */ +typedef __uint_least8_t uint_least8_t; +typedef __uint_least16_t uint_least16_t; +typedef __uint_least32_t uint_least32_t; +typedef __uint_least64_t uint_least64_t; + +#endif /* bits/stdint-least.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h index 350b65b2..71cf0eb9 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h @@ -1,5 +1,5 @@ /* Define uintN_t types. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_STDINT_UINTN_H #define _BITS_STDINT_UINTN_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio.h index d287083d..d836eaed 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio.h @@ -1,5 +1,5 @@ /* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,10 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ + +#ifndef _BITS_STDIO_H +#define _BITS_STDIO_H 1 #ifndef _STDIO_H # error "Never include directly; use instead." @@ -28,12 +31,12 @@ #ifdef __USE_EXTERN_INLINES -/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different +/* For -D_FORTIFY_SOURCE{,=2,=3} bits/stdio2.h will define a different inline. */ # if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function) /* Write formatted output to stdout from argument list ARG. */ __STDIO_INLINE int -vprintf (const char *__restrict __fmt, _G_va_list __arg) +vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } @@ -43,7 +46,7 @@ vprintf (const char *__restrict __fmt, _G_va_list __arg) __STDIO_INLINE int getchar (void) { - return _IO_getc (stdin); + return getc (stdin); } @@ -52,24 +55,24 @@ getchar (void) __STDIO_INLINE int fgetc_unlocked (FILE *__fp) { - return _IO_getc_unlocked (__fp); + return __getc_unlocked_body (__fp); } # endif /* misc */ -# ifdef __USE_POSIX +# ifdef __USE_POSIX199506 /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getc_unlocked (FILE *__fp) { - return _IO_getc_unlocked (__fp); + return __getc_unlocked_body (__fp); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getchar_unlocked (void) { - return _IO_getc_unlocked (stdin); + return __getc_unlocked_body (stdin); } # endif /* POSIX */ @@ -78,7 +81,7 @@ getchar_unlocked (void) __STDIO_INLINE int putchar (int __c) { - return _IO_putc (__c, stdout); + return putc (__c, stdout); } @@ -87,31 +90,31 @@ putchar (int __c) __STDIO_INLINE int fputc_unlocked (int __c, FILE *__stream) { - return _IO_putc_unlocked (__c, __stream); + return __putc_unlocked_body (__c, __stream); } # endif /* misc */ -# ifdef __USE_POSIX +# ifdef __USE_POSIX199506 /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putc_unlocked (int __c, FILE *__stream) { - return _IO_putc_unlocked (__c, __stream); + return __putc_unlocked_body (__c, __stream); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putchar_unlocked (int __c) { - return _IO_putc_unlocked (__c, stdout); + return __putc_unlocked_body (__c, stdout); } # endif /* POSIX */ # ifdef __USE_GNU /* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t +__STDIO_INLINE __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); @@ -124,14 +127,14 @@ getline (char **__lineptr, size_t *__n, FILE *__stream) __STDIO_INLINE int __NTH (feof_unlocked (FILE *__stream)) { - return _IO_feof_unlocked (__stream); + return __feof_unlocked_body (__stream); } /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (ferror_unlocked (FILE *__stream)) { - return _IO_ferror_unlocked (__stream); + return __ferror_unlocked_body (__stream); } # endif /* misc */ @@ -151,7 +154,7 @@ __NTH (ferror_unlocked (FILE *__stream)) for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ { \ - int __c = _IO_getc_unlocked (__stream); \ + int __c = getc_unlocked (__stream); \ if (__c == EOF) \ break; \ *__ptr++ = __c; \ @@ -174,7 +177,7 @@ __NTH (ferror_unlocked (FILE *__stream)) size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ + if (putc_unlocked (*__ptr++, __stream) == EOF) \ break; \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ @@ -188,3 +191,5 @@ __NTH (ferror_unlocked (FILE *__stream)) /* Define helper macro. */ #undef __STDIO_INLINE + +#endif /* bits/stdio.h. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio_lim.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio_lim.h index 1be90e6f..46b49fcc 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio_lim.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdio_lim.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1994-2018 Free Software Foundation, Inc. +/* System specific stdio.h definitions. Linux version. + Copyright (C) 2023-2024 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 @@ -13,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_STDIO_LIM_H #define _BITS_STDIO_LIM_H 1 @@ -22,18 +23,6 @@ # error "Never include directly; use instead." #endif -#define L_tmpnam 20 -#define TMP_MAX 238328 #define FILENAME_MAX 4096 -#ifdef __USE_POSIX -# define L_ctermid 9 -# if !defined __USE_XOPEN2K || defined __USE_GNU -# define L_cuserid 9 -# endif -#endif - -#undef FOPEN_MAX -#define FOPEN_MAX 16 - #endif /* bits/stdio_lim.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h index d83239a3..540d7189 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h @@ -1,5 +1,5 @@ /* Perform binary search - inline version. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ __extern_inline void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, @@ -29,14 +29,23 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, while (__l < __u) { __idx = (__l + __u) / 2; - __p = (void *) (((const char *) __base) + (__idx * __size)); + __p = (const void *) (((const char *) __base) + (__idx * __size)); __comparison = (*__compar) (__key, __p); if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; else - return (void *) __p; + { +#if __GNUC_PREREQ(4, 6) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wcast-qual" +#endif + return (void *) __p; +#if __GNUC_PREREQ(4, 6) +# pragma GCC diagnostic pop +#endif + } } return NULL; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-float.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-float.h index cb0c35b4..ee972327 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-float.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/stdlib-float.h @@ -1,5 +1,5 @@ /* Floating-point inline functions for stdlib.h. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + Copyright (C) 2012-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _STDLIB_H # error "Never use directly; include instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_mutex.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_mutex.h new file mode 100644 index 00000000..b6bb9aa3 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_mutex.h @@ -0,0 +1,63 @@ +/* x86 internal mutex struct definitions. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _THREAD_MUTEX_INTERNAL_H +#define _THREAD_MUTEX_INTERNAL_H 1 + +struct __pthread_mutex_s +{ + int __lock; + unsigned int __count; + int __owner; +#ifdef __x86_64__ + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility with static initializers. */ + int __kind; +#ifdef __x86_64__ + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __eelision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__eelision + } __elision_data; + __pthread_slist_t __list; + }; +# define __PTHREAD_MUTEX_HAVE_PREV 0 +#endif +}; + +#ifdef __x86_64__ +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } +#else +# define __PTHREAD_MUTEX_INITIALIZER(__kind) \ + 0, 0, 0, __kind, 0, { { 0, 0 } } +#endif + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h new file mode 100644 index 00000000..4751965c --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h @@ -0,0 +1,65 @@ +/* x86 internal rwlock struct definitions. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _RWLOCK_INTERNAL_H +#define _RWLOCK_INTERNAL_H + +struct __pthread_rwlock_arch_t +{ + unsigned int __readers; + unsigned int __writers; + unsigned int __wrphase_futex; + unsigned int __writers_futex; + unsigned int __pad3; + unsigned int __pad4; +#ifdef __x86_64__ + int __cur_writer; + int __shared; + signed char __rwelision; +# ifdef __ILP32__ + unsigned char __pad1[3]; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } +# else + unsigned char __pad1[7]; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } +# endif + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +#else /* __x86_64__ */ + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + unsigned char __shared; + signed char __rwelision; + unsigned char __pad2; + int __cur_writer; +#endif +}; + +#ifdef __x86_64__ +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags +#else +# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ + 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 +#endif + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_stat.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_stat.h new file mode 100644 index 00000000..21aa315d --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/struct_stat.h @@ -0,0 +1,165 @@ +/* Definition for struct stat. + Copyright (C) 2020-2024 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 + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STRUCT_STAT_H +#define _BITS_STRUCT_STAT_H 1 + +struct stat + { +#ifdef __USE_TIME_BITS64 +# include +#else + __dev_t st_dev; /* Device. */ +# ifndef __x86_64__ + unsigned short int __pad1; +# endif +# if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +# else + __ino_t __st_ino; /* 32bit file serial number. */ +# endif +# ifndef __x86_64__ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ +# else + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ +# 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__ + int __pad0; +# endif + __dev_t st_rdev; /* Device number, if device. */ +# ifndef __x86_64__ + unsigned short int __pad2; +# endif +# if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ +# if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + 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 + __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__ + __syscall_slong_t __glibc_reserved[3]; +# else +# ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +# else + __ino64_t st_ino; /* File serial number. */ +# 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 +# else + __dev_t st_dev; /* Device. */ +# ifdef __x86_64__ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ +# 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 + __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__ + int __pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +# else + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +# 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 + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + 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 + __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__ + __syscall_slong_t __glibc_reserved[3]; +# else + __ino64_t st_ino; /* File serial number. */ +# endif +# endif /* __USE_TIME_BITS64 */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +#endif /* _BITS_STRUCT_STAT_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syscall.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syscall.h index 65a64d0c..1c50345d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syscall.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syscall.h @@ -1,11 +1,11 @@ /* Generated at libc build time from syscall list. */ -/* The system call list corresponds to kernel 4.14. */ +/* The system call list corresponds to kernel 6.7. */ #ifndef _SYSCALL_H # error "Never use directly; include instead." #endif -#define __GLIBC_LINUX_VERSION_CODE 265728 +#define __GLIBC_LINUX_VERSION_CODE 395008 #ifdef __NR_FAST_atomic_update # define SYS_FAST_atomic_update __NR_FAST_atomic_update @@ -75,6 +75,18 @@ # define SYS_alloc_hugepages __NR_alloc_hugepages #endif +#ifdef __NR_arc_gettls +# define SYS_arc_gettls __NR_arc_gettls +#endif + +#ifdef __NR_arc_settls +# define SYS_arc_settls __NR_arc_settls +#endif + +#ifdef __NR_arc_usr_cmpxchg +# define SYS_arc_usr_cmpxchg __NR_arc_usr_cmpxchg +#endif + #ifdef __NR_arch_prctl # define SYS_arch_prctl __NR_arch_prctl #endif @@ -115,6 +127,10 @@ # define SYS_break __NR_break #endif +#ifdef __NR_breakpoint +# define SYS_breakpoint __NR_breakpoint +#endif + #ifdef __NR_brk # define SYS_brk __NR_brk #endif @@ -127,6 +143,10 @@ # define SYS_cacheflush __NR_cacheflush #endif +#ifdef __NR_cachestat +# define SYS_cachestat __NR_cachestat +#endif + #ifdef __NR_capget # define SYS_capget __NR_capget #endif @@ -159,22 +179,42 @@ # define SYS_clock_adjtime __NR_clock_adjtime #endif +#ifdef __NR_clock_adjtime64 +# define SYS_clock_adjtime64 __NR_clock_adjtime64 +#endif + #ifdef __NR_clock_getres # define SYS_clock_getres __NR_clock_getres #endif +#ifdef __NR_clock_getres_time64 +# define SYS_clock_getres_time64 __NR_clock_getres_time64 +#endif + #ifdef __NR_clock_gettime # define SYS_clock_gettime __NR_clock_gettime #endif +#ifdef __NR_clock_gettime64 +# define SYS_clock_gettime64 __NR_clock_gettime64 +#endif + #ifdef __NR_clock_nanosleep # define SYS_clock_nanosleep __NR_clock_nanosleep #endif +#ifdef __NR_clock_nanosleep_time64 +# define SYS_clock_nanosleep_time64 __NR_clock_nanosleep_time64 +#endif + #ifdef __NR_clock_settime # define SYS_clock_settime __NR_clock_settime #endif +#ifdef __NR_clock_settime64 +# define SYS_clock_settime64 __NR_clock_settime64 +#endif + #ifdef __NR_clone # define SYS_clone __NR_clone #endif @@ -183,10 +223,18 @@ # define SYS_clone2 __NR_clone2 #endif +#ifdef __NR_clone3 +# define SYS_clone3 __NR_clone3 +#endif + #ifdef __NR_close # define SYS_close __NR_close #endif +#ifdef __NR_close_range +# define SYS_close_range __NR_close_range +#endif + #ifdef __NR_cmpxchg_badaddr # define SYS_cmpxchg_badaddr __NR_cmpxchg_badaddr #endif @@ -247,6 +295,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 @@ -291,6 +343,10 @@ # define SYS_faccessat __NR_faccessat #endif +#ifdef __NR_faccessat2 +# define SYS_faccessat2 __NR_faccessat2 +#endif + #ifdef __NR_fadvise64 # define SYS_fadvise64 __NR_fadvise64 #endif @@ -323,6 +379,10 @@ # define SYS_fchmodat __NR_fchmodat #endif +#ifdef __NR_fchmodat2 +# define SYS_fchmodat2 __NR_fchmodat2 +#endif + #ifdef __NR_fchown # define SYS_fchown __NR_fchown #endif @@ -367,6 +427,10 @@ # define SYS_fork __NR_fork #endif +#ifdef __NR_fp_udfiex_crtl +# define SYS_fp_udfiex_crtl __NR_fp_udfiex_crtl +#endif + #ifdef __NR_free_hugepages # define SYS_free_hugepages __NR_free_hugepages #endif @@ -375,10 +439,26 @@ # define SYS_fremovexattr __NR_fremovexattr #endif +#ifdef __NR_fsconfig +# define SYS_fsconfig __NR_fsconfig +#endif + #ifdef __NR_fsetxattr # define SYS_fsetxattr __NR_fsetxattr #endif +#ifdef __NR_fsmount +# define SYS_fsmount __NR_fsmount +#endif + +#ifdef __NR_fsopen +# define SYS_fsopen __NR_fsopen +#endif + +#ifdef __NR_fspick +# define SYS_fspick __NR_fspick +#endif + #ifdef __NR_fstat # define SYS_fstat __NR_fstat #endif @@ -419,6 +499,26 @@ # define SYS_futex __NR_futex #endif +#ifdef __NR_futex_requeue +# define SYS_futex_requeue __NR_futex_requeue +#endif + +#ifdef __NR_futex_time64 +# define SYS_futex_time64 __NR_futex_time64 +#endif + +#ifdef __NR_futex_wait +# define SYS_futex_wait __NR_futex_wait +#endif + +#ifdef __NR_futex_waitv +# define SYS_futex_waitv __NR_futex_waitv +#endif + +#ifdef __NR_futex_wake +# define SYS_futex_wake __NR_futex_wake +#endif + #ifdef __NR_futimesat # define SYS_futimesat __NR_futimesat #endif @@ -439,6 +539,10 @@ # define SYS_get_thread_area __NR_get_thread_area #endif +#ifdef __NR_get_tls +# define SYS_get_tls __NR_get_tls +#endif + #ifdef __NR_getcpu # define SYS_getcpu __NR_getcpu #endif @@ -651,6 +755,14 @@ # define SYS_io_getevents __NR_io_getevents #endif +#ifdef __NR_io_pgetevents +# define SYS_io_pgetevents __NR_io_pgetevents +#endif + +#ifdef __NR_io_pgetevents_time64 +# define SYS_io_pgetevents_time64 __NR_io_pgetevents_time64 +#endif + #ifdef __NR_io_setup # define SYS_io_setup __NR_io_setup #endif @@ -659,6 +771,18 @@ # define SYS_io_submit __NR_io_submit #endif +#ifdef __NR_io_uring_enter +# define SYS_io_uring_enter __NR_io_uring_enter +#endif + +#ifdef __NR_io_uring_register +# define SYS_io_uring_register __NR_io_uring_register +#endif + +#ifdef __NR_io_uring_setup +# define SYS_io_uring_setup __NR_io_uring_setup +#endif + #ifdef __NR_ioctl # define SYS_ioctl __NR_ioctl #endif @@ -707,6 +831,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 @@ -775,6 +911,10 @@ # define SYS_madvise __NR_madvise #endif +#ifdef __NR_map_shadow_stack +# define SYS_map_shadow_stack __NR_map_shadow_stack +#endif + #ifdef __NR_mbind # define SYS_mbind __NR_mbind #endif @@ -787,6 +927,10 @@ # define SYS_memfd_create __NR_memfd_create #endif +#ifdef __NR_memfd_secret +# define SYS_memfd_secret __NR_memfd_secret +#endif + #ifdef __NR_memory_ordering # define SYS_memory_ordering __NR_memory_ordering #endif @@ -843,6 +987,14 @@ # 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 + #ifdef __NR_move_pages # define SYS_move_pages __NR_move_pages #endif @@ -871,10 +1023,18 @@ # define SYS_mq_timedreceive __NR_mq_timedreceive #endif +#ifdef __NR_mq_timedreceive_time64 +# define SYS_mq_timedreceive_time64 __NR_mq_timedreceive_time64 +#endif + #ifdef __NR_mq_timedsend # define SYS_mq_timedsend __NR_mq_timedsend #endif +#ifdef __NR_mq_timedsend_time64 +# define SYS_mq_timedsend_time64 __NR_mq_timedsend_time64 +#endif + #ifdef __NR_mq_unlink # define SYS_mq_unlink __NR_mq_unlink #endif @@ -947,6 +1107,10 @@ # define SYS_old_adjtimex __NR_old_adjtimex #endif +#ifdef __NR_old_getpagesize +# define SYS_old_getpagesize __NR_old_getpagesize +#endif + #ifdef __NR_oldfstat # define SYS_oldfstat __NR_oldfstat #endif @@ -979,10 +1143,22 @@ # define SYS_open_by_handle_at __NR_open_by_handle_at #endif +#ifdef __NR_open_tree +# define SYS_open_tree __NR_open_tree +#endif + #ifdef __NR_openat # define SYS_openat __NR_openat #endif +#ifdef __NR_openat2 +# define SYS_openat2 __NR_openat2 +#endif + +#ifdef __NR_or1k_atomic +# define SYS_or1k_atomic __NR_or1k_atomic +#endif + #ifdef __NR_osf_adjtime # define SYS_osf_adjtime __NR_osf_adjtime #endif @@ -1455,6 +1631,18 @@ # define SYS_personality __NR_personality #endif +#ifdef __NR_pidfd_getfd +# define SYS_pidfd_getfd __NR_pidfd_getfd +#endif + +#ifdef __NR_pidfd_open +# define SYS_pidfd_open __NR_pidfd_open +#endif + +#ifdef __NR_pidfd_send_signal +# define SYS_pidfd_send_signal __NR_pidfd_send_signal +#endif + #ifdef __NR_pipe # define SYS_pipe __NR_pipe #endif @@ -1487,6 +1675,10 @@ # define SYS_ppoll __NR_ppoll #endif +#ifdef __NR_ppoll_time64 +# define SYS_ppoll_time64 __NR_ppoll_time64 +#endif + #ifdef __NR_prctl # define SYS_prctl __NR_prctl #endif @@ -1507,6 +1699,14 @@ # define SYS_prlimit64 __NR_prlimit64 #endif +#ifdef __NR_process_madvise +# define SYS_process_madvise __NR_process_madvise +#endif + +#ifdef __NR_process_mrelease +# define SYS_process_mrelease __NR_process_mrelease +#endif + #ifdef __NR_process_vm_readv # define SYS_process_vm_readv __NR_process_vm_readv #endif @@ -1527,6 +1727,10 @@ # define SYS_pselect6 __NR_pselect6 #endif +#ifdef __NR_pselect6_time64 +# define SYS_pselect6_time64 __NR_pselect6_time64 +#endif + #ifdef __NR_ptrace # define SYS_ptrace __NR_ptrace #endif @@ -1555,6 +1759,10 @@ # define SYS_quotactl __NR_quotactl #endif +#ifdef __NR_quotactl_fd +# define SYS_quotactl_fd __NR_quotactl_fd +#endif + #ifdef __NR_read # define SYS_read __NR_read #endif @@ -1595,6 +1803,10 @@ # define SYS_recvmmsg __NR_recvmmsg #endif +#ifdef __NR_recvmmsg_time64 +# define SYS_recvmmsg_time64 __NR_recvmmsg_time64 +#endif + #ifdef __NR_recvmsg # define SYS_recvmsg __NR_recvmsg #endif @@ -1627,10 +1839,22 @@ # define SYS_restart_syscall __NR_restart_syscall #endif +#ifdef __NR_riscv_flush_icache +# define SYS_riscv_flush_icache __NR_riscv_flush_icache +#endif + +#ifdef __NR_riscv_hwprobe +# define SYS_riscv_hwprobe __NR_riscv_hwprobe +#endif + #ifdef __NR_rmdir # define SYS_rmdir __NR_rmdir #endif +#ifdef __NR_rseq +# define SYS_rseq __NR_rseq +#endif + #ifdef __NR_rt_sigaction # define SYS_rt_sigaction __NR_rt_sigaction #endif @@ -1659,6 +1883,10 @@ # define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #endif +#ifdef __NR_rt_sigtimedwait_time64 +# define SYS_rt_sigtimedwait_time64 __NR_rt_sigtimedwait_time64 +#endif + #ifdef __NR_rt_tgsigqueueinfo # define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #endif @@ -1683,6 +1911,10 @@ # define SYS_s390_runtime_instr __NR_s390_runtime_instr #endif +#ifdef __NR_s390_sthyi +# define SYS_s390_sthyi __NR_s390_sthyi +#endif + #ifdef __NR_sched_get_affinity # define SYS_sched_get_affinity __NR_sched_get_affinity #endif @@ -1715,6 +1947,10 @@ # define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #endif +#ifdef __NR_sched_rr_get_interval_time64 +# define SYS_sched_rr_get_interval_time64 __NR_sched_rr_get_interval_time64 +#endif + #ifdef __NR_sched_set_affinity # define SYS_sched_set_affinity __NR_sched_set_affinity #endif @@ -1767,6 +2003,10 @@ # define SYS_semtimedop __NR_semtimedop #endif +#ifdef __NR_semtimedop_time64 +# define SYS_semtimedop_time64 __NR_semtimedop_time64 +#endif + #ifdef __NR_send # define SYS_send __NR_send #endif @@ -1795,6 +2035,10 @@ # define SYS_set_mempolicy __NR_set_mempolicy #endif +#ifdef __NR_set_mempolicy_home_node +# define SYS_set_mempolicy_home_node __NR_set_mempolicy_home_node +#endif + #ifdef __NR_set_robust_list # define SYS_set_robust_list __NR_set_robust_list #endif @@ -1807,6 +2051,10 @@ # define SYS_set_tid_address __NR_set_tid_address #endif +#ifdef __NR_set_tls +# define SYS_set_tls __NR_set_tls +#endif + #ifdef __NR_setdomainname # define SYS_setdomainname __NR_setdomainname #endif @@ -2155,10 +2403,18 @@ # define SYS_timer_gettime __NR_timer_gettime #endif +#ifdef __NR_timer_gettime64 +# define SYS_timer_gettime64 __NR_timer_gettime64 +#endif + #ifdef __NR_timer_settime # define SYS_timer_settime __NR_timer_settime #endif +#ifdef __NR_timer_settime64 +# define SYS_timer_settime64 __NR_timer_settime64 +#endif + #ifdef __NR_timerfd # define SYS_timerfd __NR_timerfd #endif @@ -2171,10 +2427,18 @@ # define SYS_timerfd_gettime __NR_timerfd_gettime #endif +#ifdef __NR_timerfd_gettime64 +# define SYS_timerfd_gettime64 __NR_timerfd_gettime64 +#endif + #ifdef __NR_timerfd_settime # define SYS_timerfd_settime __NR_timerfd_settime #endif +#ifdef __NR_timerfd_settime64 +# define SYS_timerfd_settime64 __NR_timerfd_settime64 +#endif + #ifdef __NR_times # define SYS_times __NR_times #endif @@ -2195,6 +2459,10 @@ # define SYS_tuxcall __NR_tuxcall #endif +#ifdef __NR_udftrap +# define SYS_udftrap __NR_udftrap +#endif + #ifdef __NR_ugetrlimit # define SYS_ugetrlimit __NR_ugetrlimit #endif @@ -2239,6 +2507,14 @@ # define SYS_userfaultfd __NR_userfaultfd #endif +#ifdef __NR_usr26 +# define SYS_usr26 __NR_usr26 +#endif + +#ifdef __NR_usr32 +# define SYS_usr32 __NR_usr32 +#endif + #ifdef __NR_ustat # define SYS_ustat __NR_ustat #endif @@ -2251,6 +2527,10 @@ # define SYS_utimensat __NR_utimensat #endif +#ifdef __NR_utimensat_time64 +# define SYS_utimensat_time64 __NR_utimensat_time64 +#endif + #ifdef __NR_utimes # define SYS_utimes __NR_utimes #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syslog-path.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syslog-path.h index b569190c..badf60d3 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syslog-path.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/syslog-path.h @@ -1,5 +1,5 @@ /* -- _PATH_LOG definition - Copyright (C) 2006-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SYSLOG_H # error "Never include this file directly. Use instead" diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sysmacros.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sysmacros.h index ea8d562c..d6969bc5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sysmacros.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/sysmacros.h @@ -1,5 +1,5 @@ /* Definitions of macros to access `dev_t' values. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_SYSMACROS_H #define _BITS_SYSMACROS_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-baud.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-baud.h new file mode 100644 index 00000000..e7423130 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-baud.h @@ -0,0 +1,48 @@ +/* termios baud rate selection definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +#ifdef __USE_MISC +# define CBAUD 000000010017 /* Baud speed mask (not in POSIX). */ +# define CBAUDEX 000000010000 /* Extra baud speed mask, included in CBAUD. + (not in POSIX). */ +# define CIBAUD 002003600000 /* Input baud rate (not used). */ +# define CMSPAR 010000000000 /* Mark or space (stick) parity. */ +# define CRTSCTS 020000000000 /* Flow control. */ +#endif + +/* Extra output baud rates (not in POSIX). */ +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define B500000 0010005 +#define B576000 0010006 +#define B921600 0010007 +#define B1000000 0010010 +#define B1152000 0010011 +#define B1500000 0010012 +#define B2000000 0010013 +#define B2500000 0010014 +#define B3000000 0010015 +#define B3500000 0010016 +#define B4000000 0010017 +#define __MAX_BAUD B4000000 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_cc.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 00000000..5383a655 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,40 @@ +/* termios c_cc symbolic constant definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +/* c_cc characters */ +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VTIME 5 +#define VMIN 6 +#define VSWTC 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VEOL 11 +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 +#define VEOL2 16 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h new file mode 100644 index 00000000..72608831 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h @@ -0,0 +1,38 @@ +/* termios control mode definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +/* c_cflag bits. */ +#define CSIZE 0000060 +#define CS5 0000000 +#define CS6 0000020 +#define CS7 0000040 +#define CS8 0000060 +#define CSTOPB 0000100 +#define CREAD 0000200 +#define PARENB 0000400 +#define PARODD 0001000 +#define HUPCL 0002000 +#define CLOCAL 0004000 + +#ifdef __USE_MISC +# define ADDRB 04000000000 +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_iflag.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_iflag.h new file mode 100644 index 00000000..57aae5fd --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_iflag.h @@ -0,0 +1,40 @@ +/* termios input mode definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +/* c_iflag bits */ +#define IGNBRK 0000001 /* Ignore break condition. */ +#define BRKINT 0000002 /* Signal interrupt on break. */ +#define IGNPAR 0000004 /* Ignore characters with parity errors. */ +#define PARMRK 0000010 /* Mark parity and framing errors. */ +#define INPCK 0000020 /* Enable input parity check. */ +#define ISTRIP 0000040 /* Strip 8th bit off characters. */ +#define INLCR 0000100 /* Map NL to CR on input. */ +#define IGNCR 0000200 /* Ignore CR. */ +#define ICRNL 0000400 /* Map CR to NL on input. */ +#define IUCLC 0001000 /* Map uppercase characters to lowercase on input + (not in POSIX). */ +#define IXON 0002000 /* Enable start/stop output control. */ +#define IXANY 0004000 /* Enable any character to restart output. */ +#define IXOFF 0010000 /* Enable start/stop input control. */ +#define IMAXBEL 0020000 /* Ring bell when input queue is full + (not in POSIX). */ +#define IUTF8 0040000 /* Input is UTF8 (not in POSIX). */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_lflag.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_lflag.h new file mode 100644 index 00000000..725af597 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_lflag.h @@ -0,0 +1,58 @@ +/* termios local mode definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +/* c_lflag bits */ +#define ISIG 0000001 /* Enable signals. */ +#define ICANON 0000002 /* Canonical input (erase and kill processing). */ +#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) +# define XCASE 0000004 +#endif +#define ECHO 0000010 /* Enable echo. */ +#define ECHOE 0000020 /* Echo erase character as error-correcting + backspace. */ +#define ECHOK 0000040 /* Echo KILL. */ +#define ECHONL 0000100 /* Echo NL. */ +#define NOFLSH 0000200 /* Disable flush after interrupt or quit. */ +#define TOSTOP 0000400 /* Send SIGTTOU for background output. */ +#ifdef __USE_MISC +# define ECHOCTL 0001000 /* If ECHO is also set, terminal special characters + other than TAB, NL, START, and STOP are echoed as + ^X, where X is the character with ASCII code 0x40 + greater than the special character + (not in POSIX). */ +# define ECHOPRT 0002000 /* If ICANON and ECHO are also set, characters are + printed as they are being erased + (not in POSIX). */ +# define ECHOKE 0004000 /* If ICANON is also set, KILL is echoed by erasing + each character on the line, as specified by ECHOE + and ECHOPRT (not in POSIX). */ +# define FLUSHO 0010000 /* Output is being flushed. This flag is toggled by + typing the DISCARD character (not in POSIX). */ +# define PENDIN 0040000 /* All characters in the input queue are reprinted + when the next character is read + (not in POSIX). */ +#endif +#define IEXTEN 0100000 /* Enable implementation-defined input + processing. */ +#ifdef __USE_MISC +# define EXTPROC 0200000 +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_oflag.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_oflag.h new file mode 100644 index 00000000..436c9d1c --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-c_oflag.h @@ -0,0 +1,61 @@ +/* termios output mode definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +/* c_oflag bits */ +#define OPOST 0000001 /* Post-process output. */ +#define OLCUC 0000002 /* Map lowercase characters to uppercase on output. + (not in POSIX). */ +#define ONLCR 0000004 /* Map NL to CR-NL on output. */ +#define OCRNL 0000010 /* Map CR to NL on output. */ +#define ONOCR 0000020 /* No CR output at column 0. */ +#define ONLRET 0000040 /* NL performs CR function. */ +#define OFILL 0000100 /* Use fill characters for delay. */ +#define OFDEL 0000200 /* Fill is DEL. */ +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 0000400 /* Select newline delays: */ +# define NL0 0000000 /* Newline type 0. */ +# define NL1 0000400 /* Newline type 1. */ +# define CRDLY 0003000 /* Select carriage-return delays: */ +# define CR0 0000000 /* Carriage-return delay type 0. */ +# define CR1 0001000 /* Carriage-return delay type 1. */ +# define CR2 0002000 /* Carriage-return delay type 2. */ +# define CR3 0003000 /* Carriage-return delay type 3. */ +# define TABDLY 0014000 /* Select horizontal-tab delays: */ +# define TAB0 0000000 /* Horizontal-tab delay type 0. */ +# define TAB1 0004000 /* Horizontal-tab delay type 1. */ +# define TAB2 0010000 /* Horizontal-tab delay type 2. */ +# define TAB3 0014000 /* Expand tabs to spaces. */ +# define BSDLY 0020000 /* Select backspace delays: */ +# define BS0 0000000 /* Backspace-delay type 0. */ +# define BS1 0020000 /* Backspace-delay type 1. */ +# define FFDLY 0100000 /* Select form-feed delays: */ +# define FF0 0000000 /* Form-feed delay type 0. */ +# define FF1 0100000 /* Form-feed delay type 1. */ +#endif + +#define VTDLY 0040000 /* Select vertical-tab delays: */ +#define VT0 0000000 /* Vertical-tab delay type 0. */ +#define VT1 0040000 /* Vertical-tab delay type 1. */ + +#ifdef __USE_MISC +# define XTABS 0014000 +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-misc.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-misc.h new file mode 100644 index 00000000..b009d765 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-misc.h @@ -0,0 +1,21 @@ +/* termios baud platform specific definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-struct.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-struct.h new file mode 100644 index 00000000..53979611 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-struct.h @@ -0,0 +1,36 @@ +/* struct termios definition. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +#define NCCS 32 +struct termios + { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 +#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 + }; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-tcflow.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-tcflow.h new file mode 100644 index 00000000..a3d032ba --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios tcflag symbolic constant definitions. Linux/generic version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use instead." +#endif + +/* tcsetattr uses these. */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios.h index 35efa975..f190af7a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/termios.h @@ -1,5 +1,5 @@ /* termios type and macro definitions. Linux version. - Copyright (C) 1993-2018 Free Software Foundation, Inc. + Copyright (C) 1993-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _TERMIOS_H # error "Never include directly; use instead." @@ -24,100 +24,12 @@ typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ -#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 -#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 0000400 -# define NL0 0000000 -# define NL1 0000400 -# define CRDLY 0003000 -# define CR0 0000000 -# define CR1 0001000 -# define CR2 0002000 -# define CR3 0003000 -# define TABDLY 0014000 -# define TAB0 0000000 -# define TAB1 0004000 -# define TAB2 0010000 -# define TAB3 0014000 -# define BSDLY 0020000 -# define BS0 0000000 -# define BS1 0020000 -# define FFDLY 0100000 -# define FF0 0000000 -# define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#ifdef __USE_MISC -# define XTABS 0014000 -#endif +#include +#include +#include +#include /* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0010017 -#endif #define B0 0000000 /* hang up */ #define B50 0000001 #define B75 0000002 @@ -138,64 +50,14 @@ struct termios # define EXTA B19200 # define EXTB B38400 #endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CBAUDEX 0010000 -#endif -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define __MAX_BAUD B4000000 -#ifdef __USE_MISC -# define CIBAUD 002003600000 /* input baud rate (not used) */ -# define CMSPAR 010000000000 /* mark or space (stick) parity */ -# define CRTSCTS 020000000000 /* flow control */ -#endif +#include + +#include +#include -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#ifdef __USE_MISC -# define ECHOCTL 0001000 -# define ECHOPRT 0002000 -# define ECHOKE 0004000 -# define FLUSHO 0010000 -# define PENDIN 0040000 -#endif -#define IEXTEN 0100000 #ifdef __USE_MISC -# define EXTPROC 0200000 +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ +# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ #endif /* tcflow() and TCXONC use these */ @@ -209,11 +71,6 @@ struct termios #define TCOFLUSH 1 #define TCIOFLUSH 2 -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - +#include -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) +#include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h index 1e2092a0..df54eef6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h @@ -1,5 +1,5 @@ /* Common threading primitives definitions for both POSIX and C11. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _THREAD_SHARED_TYPES_H #define _THREAD_SHARED_TYPES_H 1 @@ -32,36 +32,6 @@ __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. - Also, the following macros must be define for internal pthread_mutex_t - struct definitions (struct __pthread_mutex_s): - - __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind' - and before '__spin' (for 64 bits) or - '__nusers' (for 32 bits). - __PTHREAD_COMPAT_PADDING_END - any additional members at the end of - the internal structure. - __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock - elision or 0 otherwise. - __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The - preferred value for new architectures - is 0. - __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and - __list will be place inside a union for - linuxthreads compatibility. - The preferred value for new architectures - is 0. - - For a new port the preferred values for the required defines are: - - #define __PTHREAD_COMPAT_PADDING_MID - #define __PTHREAD_COMPAT_PADDING_END - #define __PTHREAD_MUTEX_LOCK_ELISION 0 - #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 - #define __PTHREAD_MUTEX_USE_UNION 0 - - __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to - eventually support lock elision using transactional memory. - The additional macro defines any constraint for the lock alignment inside the thread structures: @@ -69,105 +39,62 @@ Same idea but for the once locking primitive: - __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. */ - And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t) - must be defined. - */ #include +#include + + /* Common definition of pthread_mutex_t. */ -#if !__PTHREAD_MUTEX_USE_UNION typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; -#else + typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; -#endif - -/* Lock elision support. */ -#if __PTHREAD_MUTEX_LOCK_ELISION -# if !__PTHREAD_MUTEX_USE_UNION -# define __PTHREAD_SPINS_DATA \ - short __spins; \ - short __elision -# define __PTHREAD_SPINS 0, 0 -# else -# define __PTHREAD_SPINS_DATA \ - struct \ - { \ - short __espins; \ - short __eelision; \ - } __elision_data -# define __PTHREAD_SPINS { 0, 0 } -# define __spins __elision_data.__espins -# define __elision __elision_data.__eelision -# endif -#else -# define __PTHREAD_SPINS_DATA int __spins -/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ -# define __PTHREAD_SPINS 0 -#endif - -struct __pthread_mutex_s -{ - int __lock __LOCK_ALIGNMENT; - unsigned int __count; - int __owner; -#if !__PTHREAD_MUTEX_NUSERS_AFTER_KIND - unsigned int __nusers; -#endif - /* KIND must stay at this position in the structure to maintain - binary compatibility with static initializers. */ - int __kind; - __PTHREAD_COMPAT_PADDING_MID -#if __PTHREAD_MUTEX_NUSERS_AFTER_KIND - unsigned int __nusers; -#endif -#if !__PTHREAD_MUTEX_USE_UNION - __PTHREAD_SPINS_DATA; - __pthread_list_t __list; -# define __PTHREAD_MUTEX_HAVE_PREV 1 -#else - __extension__ union - { - __PTHREAD_SPINS_DATA; - __pthread_slist_t __list; - }; -# define __PTHREAD_MUTEX_HAVE_PREV 0 -#endif - __PTHREAD_COMPAT_PADDING_END -}; + +/* Arch-specific mutex definitions. A generic implementation is provided + by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture + can override it by defining: + + 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t + definition). It should contains at least the internal members + defined in the generic version. + + 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with + atomic operations. + + 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. + It should initialize the mutex internal flag. */ + +#include + +/* Arch-sepecific read-write lock definitions. A generic implementation is + provided by struct_rwlock.h. If required, an architecture can override it + by defining: + + 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). + It should contain at least the internal members defined in the + generic version. + + 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. + It should initialize the rwlock internal type. */ + +#include /* Common definition of pthread_cond_t. */ struct __pthread_cond_s { - __extension__ union - { - __extension__ unsigned long long int __wseq; - struct - { - unsigned int __low; - unsigned int __high; - } __wseq32; - }; - __extension__ union - { - __extension__ unsigned long long int __g1_start; - struct - { - unsigned int __low; - unsigned int __high; - } __g1_start32; - }; + __atomic_wide_counter __wseq; + __atomic_wide_counter __g1_start; unsigned int __g_refs[2] __LOCK_ALIGNMENT; unsigned int __g_size[2]; unsigned int __g1_orig_size; @@ -175,4 +102,14 @@ struct __pthread_cond_s unsigned int __g_signals[2]; }; +typedef unsigned int __tss_t; +typedef unsigned long int __thrd_t; + +typedef struct +{ + int __data __ONCE_ALIGNMENT; +} __once_flag; + +#define __ONCE_FLAG_INIT { 0 } + #endif /* _THREAD_SHARED_TYPES_H */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time.h index 3df0dfd3..b70ba58a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time.h @@ -1,5 +1,5 @@ /* System-dependent timing definitions. Linux version. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Never include this file directly; use instead. @@ -75,7 +75,17 @@ extern long int __sysconf (int); __BEGIN_DECLS /* Tune a POSIX clock. */ -extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2)); + +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id, + struct timex *__utx), + __clock_adjtime64) __nonnull((2)); +# else +# define clock_adjtime __clock_adjtime64 +# endif +#endif __END_DECLS #endif /* use GNU */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time64.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time64.h new file mode 100644 index 00000000..6f43066e --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/time64.h @@ -0,0 +1,36 @@ +/* bits/time64.h -- underlying types for __time64_t. Generic version. + Copyright (C) 2018-2024 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 + . */ + +#ifndef _BITS_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TIME64_H +#define _BITS_TIME64_H 1 + +/* Define __TIME64_T_TYPE so that it is always a 64-bit type. */ + +#if __TIMESIZE == 64 +/* If we already have 64-bit time type then use it. */ +# define __TIME64_T_TYPE __TIME_T_TYPE +#else +/* Define a 64-bit time type alongsize the 32-bit one. */ +# define __TIME64_T_TYPE __SQUAD_TYPE +#endif + +#endif /* bits/time64.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timerfd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timerfd.h index 154343a5..d34fdf3b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timerfd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timerfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2020 Free Software Foundation, Inc. +/* Copyright (C) 2008-2024 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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timesize.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timesize.h new file mode 100644 index 00000000..57d83ab1 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timesize.h @@ -0,0 +1,27 @@ +/* Bit size of the time_t type at glibc build time, x86-64 and x32 case. + Copyright (C) 2018-2024 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 + . */ + +#include + +#if defined __x86_64__ && defined __ILP32__ +/* For x32, time is 64-bit even though word size is 32-bit. */ +# define __TIMESIZE 64 +#else +/* For others, time size is word size. */ +# define __TIMESIZE __WORDSIZE +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timex.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timex.h index 1dbcc0b5..398d8094 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timex.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/timex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TIMEX_H #define _BITS_TIMEX_H 1 @@ -25,6 +25,36 @@ struct timex { +# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32) + 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) */ @@ -104,7 +135,7 @@ struct timex #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ /* Read-only bits */ -#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ - STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER \ + | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) #endif /* bits/timex.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types.h index bd06e2d1..34e001ad 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types.h @@ -1,5 +1,5 @@ /* bits/types.h -- definitions of __*_t types underlying *_t types. - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Never include this file directly; use instead. @@ -25,6 +25,7 @@ #include #include +#include /* Convenience types. */ typedef unsigned char __u_char; @@ -47,6 +48,16 @@ __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; #endif +/* Smallest types with at least a given width. */ +typedef __int8_t __int_least8_t; +typedef __uint8_t __uint_least8_t; +typedef __int16_t __int_least16_t; +typedef __uint16_t __uint_least16_t; +typedef __int32_t __int_least32_t; +typedef __uint32_t __uint_least32_t; +typedef __int64_t __int_least64_t; +typedef __uint64_t __uint_least64_t; + /* quad_t is also 64 bits. */ #if __WORDSIZE == 64 typedef long int __quad_t; @@ -76,7 +87,7 @@ __extension__ typedef unsigned long long int __uintmax_t; 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long - QUAD -- 64-bit type, always long long + QUAD -- 64-bit type, traditionally long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long @@ -102,14 +113,14 @@ __extension__ typedef unsigned long long int __uintmax_t; #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #if __WORDSIZE == 32 -# define __SQUAD_TYPE __quad_t -# define __UQUAD_TYPE __u_quad_t +# define __SQUAD_TYPE __int64_t +# define __UQUAD_TYPE __uint64_t # define __SWORD_TYPE int # define __UWORD_TYPE unsigned int # define __SLONG32_TYPE long int # define __ULONG32_TYPE unsigned long int -# define __S64_TYPE __quad_t -# define __U64_TYPE __u_quad_t +# define __S64_TYPE __int64_t +# define __U64_TYPE __uint64_t /* We want __extension__ before typedef's that use nonstandard base types such as `long long' in C89 mode. */ # define __STD_TYPE __extension__ typedef @@ -128,6 +139,7 @@ __extension__ typedef unsigned long long int __uintmax_t; # error #endif #include /* Defines __*_T_TYPE macros. */ +#include /* Defines __TIME*_T_TYPE macros. */ __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */ @@ -148,6 +160,7 @@ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ +__STD_TYPE __SUSECONDS64_T_TYPE __suseconds64_t; __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ @@ -201,6 +214,15 @@ __STD_TYPE __U32_TYPE __socklen_t; It is not currently necessary for this to be machine-specific. */ typedef int __sig_atomic_t; +/* Seconds since the Epoch, visible to user code when time_t is too + narrow only for consistency with the old way of widening too-narrow + types. User code should never use __time64_t. */ +#if __TIMESIZE == 64 && defined __LIBC +# define __time64_t __time_t +#elif __TIMESIZE != 64 +__STD_TYPE __TIME64_T_TYPE __time64_t; +#endif + #undef __STD_TYPE #endif /* bits/types.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h new file mode 100644 index 00000000..06a68911 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h @@ -0,0 +1,16 @@ +#ifndef _____fpos64_t_defined +#define _____fpos64_t_defined 1 + +#include +#include + +/* The tag name of this struct is _G_fpos64_t to preserve historic + C++ mangled names for functions taking fpos_t and/or fpos64_t + arguments. That name should not be used in new code. */ +typedef struct _G_fpos64_t +{ + __off64_t __pos; + __mbstate_t __state; +} __fpos64_t; + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h new file mode 100644 index 00000000..bb045766 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h @@ -0,0 +1,16 @@ +#ifndef _____fpos_t_defined +#define _____fpos_t_defined 1 + +#include +#include + +/* The tag name of this struct is _G_fpos_t to preserve historic + C++ mangled names for functions taking fpos_t arguments. + That name should not be used in new code. */ +typedef struct _G_fpos_t +{ + __off_t __pos; + __mbstate_t __state; +} __fpos_t; + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h index a6cccf63..52be0010 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h @@ -1,7 +1,6 @@ /* Definition of struct __locale_struct and __locale_t. - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -15,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES___LOCALE_T_H #define _BITS_TYPES___LOCALE_T_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h index 395ce501..6f21325e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h @@ -1,5 +1,5 @@ /* Define __sigval_t. - Copyright (C) 1997-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef ____sigval_t_defined #define ____sigval_t_defined diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h new file mode 100644 index 00000000..9b72baf0 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h @@ -0,0 +1,63 @@ +/* Copyright (C) 1991-2024 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 + . */ + +#ifndef __cookie_io_functions_t_defined +#define __cookie_io_functions_t_defined 1 + +#include + +/* Functions to do I/O and file management for a stream. */ + +/* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. + Return number of bytes read. */ +typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, + size_t __nbytes); + +/* Write NBYTES bytes pointed to by BUF to COOKIE. Write all NBYTES bytes + unless there is an error. Return number of bytes written. If + there is an error, return 0 and do not write anything. If the file + has been opened for append (__mode.__append set), then set the file + pointer to the end of the file and then do the write; if not, just + write at the current file pointer. */ +typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, + size_t __nbytes); + +/* Move COOKIE's file position to *POS bytes from the + beginning of the file (if W is SEEK_SET), + the current position (if W is SEEK_CUR), + or the end of the file (if W is SEEK_END). + Set *POS to the new file position. + Returns zero if successful, nonzero if not. */ +typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); + +/* Close COOKIE. */ +typedef int cookie_close_function_t (void *__cookie); + +/* The structure with the cookie function pointers. + The tag name of this struct is _IO_cookie_io_functions_t to + preserve historic C++ mangled names for functions taking + cookie_io_functions_t arguments. That name should not be used in + new code. */ +typedef struct _IO_cookie_io_functions_t +{ + cookie_read_function_t *read; /* Read bytes. */ + cookie_write_function_t *write; /* Write bytes. */ + cookie_seek_function_t *seek; /* Seek/tell file position. */ + cookie_close_function_t *close; /* Close file. */ +} cookie_io_functions_t; + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/error_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/error_t.h new file mode 100644 index 00000000..25b4098e --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/error_t.h @@ -0,0 +1,24 @@ +/* Define error_t. + Copyright (C) 1991-2024 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 + . */ + +#ifndef __error_t_defined +# define __error_t_defined 1 + +typedef int error_t; + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/idtype_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/idtype_t.h new file mode 100644 index 00000000..fc084c77 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/idtype_t.h @@ -0,0 +1,14 @@ +#ifndef __idtype_t_defined +#define __idtype_t_defined + +/* The following values are used by the `waitid' function. */ +typedef enum +{ + P_ALL, /* Wait for any child. */ + P_PID, /* Wait for specified process. */ + P_PGID, /* Wait for members of process group. */ + P_PIDFD, /* Wait for the child referred by the PID file + descriptor. */ +} idtype_t; + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/locale_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/locale_t.h index 6a7aad28..bc20639a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/locale_t.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/locale_t.h @@ -1,5 +1,5 @@ /* Definition of locale_t. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_LOCALE_T_H #define _BITS_TYPES_LOCALE_T_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/res_state.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/res_state.h index 2544a627..79e079c5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/res_state.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/res_state.h @@ -11,7 +11,7 @@ #define MAXRESOLVSORT 10 /* number of net to sort on */ struct __res_state { - int retrans; /* retransmition time interval */ + int retrans; /* retransmission time interval */ int retry; /* number of times to retransmit */ unsigned long options; /* option flags - see below. */ int nscount; /* number of name servers */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h index 33766d18..43c4e009 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h @@ -107,7 +107,7 @@ typedef struct /* SIGPOLL. */ struct { - long int si_band; /* Band event for SIGPOLL. */ + __SI_BAND_TYPE si_band; /* Band event for SIGPOLL. */ int si_fd; } _sigpoll; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/stack_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/stack_t.h index ce809ade..82cd81ac 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/stack_t.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/stack_t.h @@ -1,5 +1,5 @@ /* Define stack_t. Linux version. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __stack_t_defined #define __stack_t_defined 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h new file mode 100644 index 00000000..7cdaae86 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h @@ -0,0 +1,120 @@ +/* Copyright (C) 1991-2024 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 + . */ + +#ifndef __struct_FILE_defined +#define __struct_FILE_defined 1 + +/* Caution: The contents of this file are not part of the official + stdio.h API. However, much of it is part of the official *binary* + interface, and therefore cannot be changed. */ + +#if defined _IO_USE_OLD_IO_FILE && !defined _LIBC +# error "_IO_USE_OLD_IO_FILE should only be defined when building libc itself" +#endif + +#if defined _IO_lock_t_defined && !defined _LIBC +# error "_IO_lock_t_defined should only be defined when building libc itself" +#endif + +#include + +struct _IO_FILE; +struct _IO_marker; +struct _IO_codecvt; +struct _IO_wide_data; + +/* During the build of glibc itself, _IO_lock_t will already have been + defined by internal headers. */ +#ifndef _IO_lock_t_defined +typedef void _IO_lock_t; +#endif + +/* The tag name of this struct is _IO_FILE to preserve historic + C++ mangled names for functions taking FILE* arguments. + That name should not be used in new code. */ +struct _IO_FILE +{ + int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ + + /* The following pointers correspond to the C++ streambuf protocol. */ + char *_IO_read_ptr; /* Current read pointer */ + char *_IO_read_end; /* End of get area. */ + char *_IO_read_base; /* Start of putback+get area. */ + char *_IO_write_base; /* Start of put area. */ + char *_IO_write_ptr; /* Current put pointer. */ + char *_IO_write_end; /* End of put area. */ + char *_IO_buf_base; /* Start of reserve area. */ + char *_IO_buf_end; /* End of reserve area. */ + + /* The following fields are used to support backing up and undo. */ + char *_IO_save_base; /* Pointer to start of non-current get area. */ + char *_IO_backup_base; /* Pointer to first valid character of backup area */ + char *_IO_save_end; /* Pointer to end of non-current get area. */ + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + int _flags2; + __off_t _old_offset; /* This used to be _offset but it's too small. */ + + /* 1+column number of pbase(); 0 is unknown. */ + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + _IO_lock_t *_lock; +#ifdef _IO_USE_OLD_IO_FILE +}; + +struct _IO_FILE_complete +{ + struct _IO_FILE _file; +#endif + __off64_t _offset; + /* Wide character stream stuff. */ + struct _IO_codecvt *_codecvt; + struct _IO_wide_data *_wide_data; + struct _IO_FILE *_freeres_list; + void *_freeres_buf; + size_t __pad5; + int _mode; + /* Make sure we don't get into trouble again. */ + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; + +/* These macros are used by bits/stdio.h and internal headers. */ +#define __getc_unlocked_body(_fp) \ + (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) \ + ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) + +#define __putc_unlocked_body(_ch, _fp) \ + (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \ + ? __overflow (_fp, (unsigned char) (_ch)) \ + : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) + +#define _IO_EOF_SEEN 0x0010 +#define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0) + +#define _IO_ERR_SEEN 0x0020 +#define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0) + +#define _IO_USER_LOCK 0x8000 +/* Many more flag bits are defined internally. */ + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h new file mode 100644 index 00000000..96f7ac19 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h @@ -0,0 +1,37 @@ +/* Define struct __jmp_buf_tag. + Copyright (C) 1991-2024 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 + . */ + +#ifndef __jmp_buf_tag_defined +#define __jmp_buf_tag_defined 1 + +#include /* Get `__jmp_buf'. */ +#include + +/* Calling environment, plus possibly a saved signal mask. */ +struct __jmp_buf_tag + { + /* NOTE: The machine-dependent definitions of `__sigsetjmp' + assume that a `jmp_buf' begins with a `__jmp_buf' and that + `__mask_was_saved' follows it. Do not move these members + or add others before it. */ + __jmp_buf __jmpbuf; /* Calling environment. */ + int __mask_was_saved; /* Saved the signal mask? */ + __sigset_t __saved_mask; /* Saved signal mask. */ + }; + +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h index 490b06b8..33627ffc 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h @@ -1,5 +1,5 @@ /* Define struct iovec. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __iovec_defined #define __iovec_defined 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_rusage.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_rusage.h index 5dc0916a..4ef4e8a6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_rusage.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_rusage.h @@ -1,5 +1,5 @@ /* Define struct rusage. - Copyright (C) 1994-2018 Free Software Foundation, Inc. + Copyright (C) 1994-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __rusage_defined #define __rusage_defined 1 @@ -22,7 +22,9 @@ #include #include -/* Structure which says how much of each resource has been used. */ +/* Structure which says how much of each resource has been used. If + the system does not keep track of a particular value, the struct + field is always zero. */ /* The purpose of all the unions is to have the kernel-compatible layout while keeping the API type as 'long int', and among machines where @@ -42,7 +44,6 @@ struct rusage }; /* Amount of sharing of text segment memory with other processes (kilobyte-seconds). */ - /* Maximum resident set size (in kilobytes). */ __extension__ union { long int ru_ixrss; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h new file mode 100644 index 00000000..e11d0c59 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h @@ -0,0 +1,28 @@ +/* Sched parameter structure. Generic version. + Copyright (C) 1996-2024 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 + . */ + +#ifndef _BITS_TYPES_STRUCT_SCHED_PARAM +#define _BITS_TYPES_STRUCT_SCHED_PARAM 1 + +/* Data structure to describe a process' schedulability. */ +struct sched_param +{ + int sched_priority; +}; + +#endif /* bits/types/struct_sched_param.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds.h new file mode 100644 index 00000000..87cbe64e --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds.h @@ -0,0 +1,30 @@ +/* Generic implementation of the semaphore struct semid64_ds. + Copyright (C) 2020-2024 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +#if __TIMESIZE == 64 +# define __semid64_ds semid_ds +#else +struct __semid64_ds +{ +# include +}; +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h new file mode 100644 index 00000000..9f3d170b --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,38 @@ +/* x86 implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2024 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ +#ifdef __USE_TIME_BITS64 +# include +#else + struct ipc_perm sem_perm; /* operation permission struct */ + __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; + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +#endif +}; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds.h new file mode 100644 index 00000000..f94e9477 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds.h @@ -0,0 +1,30 @@ +/* Generic implementation of the shared memory struct shmid_ds. + Copyright (C) 2020-2024 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +#if __TIMESIZE == 64 +# define __shmid64_ds shmid_ds +#else +struct __shmid64_ds +{ +# include +}; +#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h new file mode 100644 index 00000000..09de0b4e --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Generic implementation of the shared memory struct shmid_ds. + Copyright (C) 2020-2024 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { +#ifdef __USE_TIME_BITS64 +# include +#else + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +# 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 + __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 + __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 + }; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h index 22da1766..5cf48c31 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h @@ -1,5 +1,5 @@ /* Define struct sigstack. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef __sigstack_defined #define __sigstack_defined 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_statx.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_statx.h new file mode 100644 index 00000000..1b651d60 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_statx.h @@ -0,0 +1,55 @@ +/* Definition of the generic version of struct statx. + Copyright (C) 2018-2024 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 + . */ + +#ifndef _SYS_STAT_H +# error Never include directly, include instead. +#endif + +#ifndef __statx_defined +#define __statx_defined 1 + +/* Warning: The kernel may add additional fields to this struct in the + future. Only use this struct for calling the statx function, not + for storing data. (Expansion will be controlled by the mask + argument of the statx function.) */ +struct statx +{ + __uint32_t stx_mask; + __uint32_t stx_blksize; + __uint64_t stx_attributes; + __uint32_t stx_nlink; + __uint32_t stx_uid; + __uint32_t stx_gid; + __uint16_t stx_mode; + __uint16_t __statx_pad1[1]; + __uint64_t stx_ino; + __uint64_t stx_size; + __uint64_t stx_blocks; + __uint64_t stx_attributes_mask; + struct statx_timestamp stx_atime; + struct statx_timestamp stx_btime; + struct statx_timestamp stx_ctime; + struct statx_timestamp stx_mtime; + __uint32_t stx_rdev_major; + __uint32_t stx_rdev_minor; + __uint32_t stx_dev_major; + __uint32_t stx_dev_minor; + __uint64_t __statx_pad2[14]; +}; + +#endif /* __statx_defined */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h new file mode 100644 index 00000000..b1e6d8d9 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h @@ -0,0 +1,33 @@ +/* Definition of the generic version of struct statx_timestamp. + Copyright (C) 2018-2024 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 + . */ + +#ifndef _SYS_STAT_H +# error Never include directly, include instead. +#endif + +#ifndef __statx_timestamp_defined +#define __statx_timestamp_defined 1 + +struct statx_timestamp +{ + __int64_t tv_sec; + __uint32_t tv_nsec; + __int32_t __statx_timestamp_pad1[1]; +}; + +#endif /* __statx_timestamp_defined */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h index 644db9fd..489e8113 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h @@ -1,14 +1,33 @@ -#ifndef __timespec_defined -#define __timespec_defined 1 +/* NB: Include guard matches what uses. */ +#ifndef _STRUCT_TIMESPEC +#define _STRUCT_TIMESPEC 1 #include +#include +#include /* 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 && !defined __USE_TIME_BITS64) __syscall_slong_t tv_nsec; /* Nanoseconds. */ +#else +# if __BYTE_ORDER == __BIG_ENDIAN + int: 32; /* Padding. */ + long int tv_nsec; /* Nanoseconds. */ +# else + long int tv_nsec; /* Nanoseconds. */ + int: 32; /* Padding. */ +# endif +#endif }; #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h index 70394ce8..3466137c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/time_t.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/time_t.h index ab8287c6..84d67f6a 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/time_t.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/types/time_t.h @@ -4,6 +4,10 @@ #include /* Returned by `time'. */ +#ifdef __USE_TIME_BITS64 +typedef __time64_t time_t; +#else typedef __time_t time_t; +#endif #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/typesizes.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/typesizes.h index e6f7481a..f4e2ec29 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/typesizes.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/typesizes.h @@ -1,5 +1,5 @@ /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + Copyright (C) 2012-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." @@ -64,6 +64,7 @@ #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -84,8 +85,18 @@ /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 + +/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ +# define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 + +# define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uintn-identity.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uintn-identity.h index 2ce92351..81040705 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uintn-identity.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uintn-identity.h @@ -1,5 +1,5 @@ /* Inline functions to return unsigned integer values unchanged. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include or instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio-ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio-ext.h index 53663ed1..7854ccce 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio-ext.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio-ext.h @@ -1,5 +1,5 @@ /* Operating system-specific extensions to sys/uio.h - Linux version. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_UIO_EXT_H #define _BITS_UIO_EXT_H 1 @@ -46,6 +46,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, #define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC. */ #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ +#define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio_lim.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio_lim.h index a443fd8e..d8a5741b 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio_lim.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/uio_lim.h @@ -1,5 +1,5 @@ /* Implementation limits related to sys/uio.h - Linux version. - Copyright (C) 2017-2018 Free Software Foundation, Inc. + Copyright (C) 2017-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_UIO_LIM_H #define _BITS_UIO_LIM_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/unistd_ext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/unistd_ext.h new file mode 100644 index 00000000..2ce1d451 --- /dev/null +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/unistd_ext.h @@ -0,0 +1,50 @@ +/* System-specific extensions of , Linux version. + Copyright (C) 2019-2024 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 + . */ + +#ifndef _UNISTD_H +# error "Never include directly; use instead." +#endif + +#ifdef __USE_GNU + +/* Return the kernel thread ID (TID) of the current thread. The + returned value is not subject to caching. Most Linux system calls + accept a TID in place of a PID. Using the TID to change properties + of a thread that has been created using pthread_create can lead to + undefined behavior (comparable to manipulating file descriptors + directly that have not been created explicitly). Note that a TID + uniquely identifies a thread only while this thread is running; a + TID can be reused once a thread has exited, even if the thread is + not detached and has not been joined. */ +extern __pid_t gettid (void) __THROW; + +#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 + +#endif /* __USE_GNU */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/utsname.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/utsname.h index 9cc1c352..aa8e2199 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/utsname.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_UTSNAME_H # error "Never include directly; use instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitflags.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitflags.h index 8849241a..87dc43e9 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitflags.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitflags.h @@ -1,5 +1,5 @@ /* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992-2018 Free Software Foundation, Inc. + Copyright (C) 1992-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." @@ -37,23 +37,3 @@ in this group */ #define __WALL 0x40000000 /* Wait for any child. */ #define __WCLONE 0x80000000 /* Wait for cloned process. */ - -/* The following values are used by the `waitid' function. */ -#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 -# ifndef __ENUM_IDTYPE_T -# define __ENUM_IDTYPE_T 1 - -/* The Linux kernel defines these bare, rather than an enum, - which causes a conflict if the include order is reversed. */ -# undef P_ALL -# undef P_PID -# undef P_PGID - -typedef enum -{ - P_ALL, /* Wait for any child. */ - P_PID, /* Wait for specified process. */ - P_PGID /* Wait for members of process group. */ -} idtype_t; -# endif -#endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitstatus.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitstatus.h index a1c23261..e62a882c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitstatus.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/waitstatus.h @@ -1,5 +1,5 @@ /* Definitions of status bits for `wait' et al. - Copyright (C) 1992-2018 Free Software Foundation, Inc. + Copyright (C) 1992-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wchar.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wchar.h index 5fa6ccd4..efc80ff5 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wchar.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wchar.h @@ -1,5 +1,5 @@ /* wchar_t type related definitions. - Copyright (C) 2000-2018 Free Software Foundation, Inc. + Copyright (C) 2000-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _BITS_WCHAR_H #define _BITS_WCHAR_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h index 03c20770..829fddab 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * ISO C99 Standard: 7.25 @@ -42,7 +42,7 @@ typedef unsigned long int wctype_t; endian). We define the bit value interpretations here dependent on the machine's byte order. */ -# include +# include # if __BYTE_ORDER == __BIG_ENDIAN # define _ISwbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/xopen_lim.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/xopen_lim.h index d14b633a..76773194 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/xopen_lim.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/bits/xopen_lim.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * Never include this file directly; use instead. diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/libc-version.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/libc-version.h index 37d9e86d..dfd49c82 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/libc-version.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/libc-version.h @@ -1,5 +1,5 @@ /* Interface to GNU libc specific functions for version information. - Copyright (C) 1998-2020 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/stubs-64.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/stubs-64.h index 07eaf9b2..487b87f6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/stubs-64.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/gnu/stubs-64.h @@ -9,15 +9,9 @@ #define __stub___compat_bdflush #define __stub_chflags -#define __stub_fattach #define __stub_fchflags -#define __stub_fdetach -#define __stub_getmsg #define __stub_gtty -#define __stub_lchmod -#define __stub_putmsg #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/auxv.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/auxv.h index 114a67b9..5fa31929 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/auxv.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/auxv.h @@ -1,5 +1,5 @@ /* Access to the auxiliary vector. - Copyright (C) 2012-2018 Free Software Foundation, Inc. + Copyright (C) 2012-2024 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 @@ -14,13 +14,12 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_AUXV_H #define _SYS_AUXV_H 1 #include -#include #include #include diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/cdefs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/cdefs.h index af103fdb..520231db 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/cdefs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/cdefs.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2024 Free Software Foundation, Inc. + Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 @@ -25,16 +26,38 @@ /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not - anymore supported. */ -#if defined __GNUC__ && !defined __STDC__ -# error "You need a ISO C conforming compiler to use the glibc headers" + supported anymore. */ +#if defined __GNUC__ && !defined __STDC__ && !defined __cplusplus +# error "You need a ISO C or C++ conforming compiler to use the glibc headers" #endif /* Some user header file might have defined this before. */ #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. */ @@ -47,21 +70,26 @@ # endif /* GCC can always grok prototypes. For C++ programs we add throw() - to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions + to help it optimize the function calls. But this only works with + 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) -# define __THROW throw () -# define __THROWNL throw () -# define __NTH(fct) __LEAF_ATTR fct throw () -# define __NTHNL(fct) fct throw () +# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) +# if __cplusplus >= 201103L +# define __THROW noexcept (true) +# else +# define __THROW throw () +# endif +# define __THROWNL __THROW +# define __NTH(fct) __LEAF_ATTR fct __THROW +# define __NTHNL(fct) fct __THROW # else # define __THROW # define __THROWNL @@ -70,24 +98,27 @@ # endif # endif -#else /* Not GCC. */ +# if __GNUC_PREREQ (4, 3) || __glibc_has_attribute (__cold__) +# define __COLD __attribute__ ((__cold__)) +# else +# define __COLD +# endif + +#else /* Not GCC or clang. */ -# define __inline /* No inline functions. */ +# if (defined __cplusplus \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) +# define __inline inline +# else +# define __inline /* No inline functions. */ +# endif # define __THROW # define __THROWNL # define __NTH(fct) fct +# define __COLD -#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. */ @@ -118,14 +149,70 @@ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) +/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ +#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \ + || __GNUC_PREREQ (12, 0)) +# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) +# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) +#else +# define __glibc_objsize0(__o) __bos0 (__o) +# define __glibc_objsize(__o) __bos (__o) +#endif + +#if __USE_FORTIFY_LEVEL > 0 +/* Compile time conditions to choose between the regular, _chk and _chk_warn + variants. These conditions should get evaluated to constant and optimized + away. */ + +#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s)) +#define __glibc_unsigned_or_positive(__l) \ + ((__typeof (__l)) 0 < (__typeof (__l)) -1 \ + || (__builtin_constant_p (__l) && (__l) > 0)) + +/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ + condition can be folded to a constant and if it is true, or unknown (-1) */ +#define __glibc_safe_or_unknown_len(__l, __s, __osz) \ + ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) \ + || (__glibc_unsigned_or_positive (__l) \ + && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ + (__s), (__osz))) \ + && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) + +/* Conversely, we know at compile time that the length is unsafe if the + __L * __S <= __OBJSZ condition can be folded to a constant and if it is + false. */ +#define __glibc_unsafe_len(__l, __s, __osz) \ + (__glibc_unsigned_or_positive (__l) \ + && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ + __s, __osz)) \ + && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) + +/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be + declared. */ + +#define __glibc_fortify(f, __l, __s, __osz, ...) \ + (__glibc_safe_or_unknown_len (__l, __s, __osz) \ + ? __ ## f ## _alias (__VA_ARGS__) \ + : (__glibc_unsafe_len (__l, __s, __osz) \ + ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \ + : __ ## f ## _chk (__VA_ARGS__, __osz))) + +/* Fortify function f, where object size argument passed to f is the number of + elements and not total size. */ + +#define __glibc_fortify_n(f, __l, __s, __osz, ...) \ + (__glibc_safe_or_unknown_len (__l, __s, __osz) \ + ? __ ## f ## _alias (__VA_ARGS__) \ + : (__glibc_unsafe_len (__l, __s, __osz) \ + ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \ + : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) +#endif + #if __GNUC_PREREQ (4,3) -# define __warndecl(name, msg) \ - extern void name (void) __attribute__((__warning__ (msg))) # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) #else -# define __warndecl(name, msg) extern void name (void) # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif @@ -134,11 +221,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 @@ -164,7 +251,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 @@ -181,6 +268,14 @@ # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) # define __ASMNAME2(prefix, cname) __STRING (prefix) cname +#ifndef __REDIRECT_FORTIFY +#define __REDIRECT_FORTIFY __REDIRECT +#endif + +#ifndef __REDIRECT_FORTIFY_NTH +#define __REDIRECT_FORTIFY_NTH __REDIRECT_NTH +#endif + /* #elif __SOME_OTHER_COMPILER__ @@ -189,17 +284,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 */ @@ -214,26 +309,41 @@ # define __attribute_alloc_size__(params) /* Ignore. */ #endif +/* Tell the compiler which argument to an allocation function + indicates the alignment of the allocation. */ +#if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__) +# define __attribute_alloc_align__(param) \ + __attribute__ ((__alloc_align__ param)) +#else +# define __attribute_alloc_align__(param) /* Ignore. */ +#endif + /* 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 @@ -242,7 +352,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 */ @@ -251,8 +361,8 @@ /* Since version 4.5, gcc also allows one to specify the message printed 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__) +#if __GNUC_PREREQ (4,5) \ + || __glibc_has_extension (__attribute_deprecated_with_message__) # define __attribute_deprecated_msg__(msg) \ __attribute__ ((__deprecated__ (msg))) #else @@ -265,7 +375,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 */ @@ -275,27 +385,44 @@ 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 - must not be NULL. */ -#if __GNUC_PREREQ (3,3) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) -#else -# define __nonnull(params) +/* The nonnull function attribute marks pointer parameters that + must not be NULL. This has the name __nonnull in glibc, + and __attribute_nonnull__ in files shared with Gnulib to avoid + collision with a different __nonnull in DragonFlyBSD 5.9. */ +#ifndef __attribute_nonnull__ +# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) +# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) +# else +# define __attribute_nonnull__(params) +# endif +#endif +#ifndef __nonnull +# define __nonnull(params) __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 @@ -306,7 +433,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. */ @@ -319,7 +446,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 */ @@ -332,7 +459,7 @@ semantics. clang++ identifies itself as gcc-4.2, but has support for GNU inlining - semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and + semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ @@ -362,19 +489,26 @@ 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) -# define __restrict /* Ignore */ +/* __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 +# define __restrict /* Ignore */ +# endif #endif /* 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__ @@ -389,7 +523,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 @@ -399,7 +533,8 @@ #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 @@ -416,18 +551,64 @@ # define __attribute_nonstring__ #endif +/* Undefine (also defined in libc-symbols.h). */ +#undef __attribute_copy__ +#if __GNUC_PREREQ (9, 0) +/* Copies attributes from the declaration or type referenced by + the argument. */ +# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg))) +#else +# define __attribute_copy__(arg) +#endif + #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 -#include +/* Gnulib avoids including these, as they don't work on non-glibc or + older glibc platforms. */ +#ifndef __GNULIB_CDEFS +# include +# include +#endif + +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# ifdef __REDIRECT + +/* Alias name defined automatically. */ +# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir +# define __LDBL_REDIR_DECL(name) \ + extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); +# define __REDIRECT_LDBL(name, proto, alias) \ + name proto __asm (__ASMNAME ("__" #alias "ieee128")) -#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH +/* Alias name defined automatically, with leading underscores. */ +# define __LDBL_REDIR2_DECL(name) \ + extern __typeof (__##name) __##name \ + __asm (__ASMNAME ("__" #name "ieee128")); + +/* Alias name defined manually. */ +# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1 +# define __LDBL_REDIR1_DECL(name, alias) \ + extern __typeof (name) name __asm (__ASMNAME (#alias)); + +# define __LDBL_REDIR1_NTH(name, proto, alias) \ + __REDIRECT_NTH (name, proto, alias) +# define __REDIRECT_NTH_LDBL(name, proto, alias) \ + __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128) + +/* Unused. */ +# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth + +# else +_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform"); +# endif +#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH # define __LDBL_COMPAT 1 # ifdef __REDIRECT # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) @@ -436,6 +617,8 @@ # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) # define __LDBL_REDIR_NTH(name, proto) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) +# define __LDBL_REDIR2_DECL(name) \ + extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name)); # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ @@ -446,11 +629,13 @@ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif #endif -#if !defined __LDBL_COMPAT || !defined __REDIRECT +#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \ + || !defined __REDIRECT # define __LDBL_REDIR1(name, proto, alias) name proto # define __LDBL_REDIR(name, proto) name proto # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW +# define __LDBL_REDIR2_DECL(name) # define __LDBL_REDIR_DECL(name) # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) @@ -481,7 +666,7 @@ 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 @@ -489,4 +674,50 @@ # define __HAVE_GENERIC_SELECTION 0 #endif +#if __GNUC_PREREQ (10, 0) +/* Designates a 1-based positional argument ref-index of pointer type + that can be used to access size-index elements of the pointed-to + array according to access mode, or at least one element when + size-index is not provided: + access (access-mode, [, ]) */ +# define __attr_access(x) __attribute__ ((__access__ x)) +/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may + use the access attribute to get object sizes from function definition + arguments, so we can't use them on functions we fortify. Drop the object + size hints for such functions. */ +# if __USE_FORTIFY_LEVEL == 3 +# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o))) +# else +# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s)) +# endif +# if __GNUC_PREREQ (11, 0) +# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno))) +# else +# define __attr_access_none(argno) +# endif +#else +# define __fortified_attr_access(a, o, s) +# 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 + twice. */ +#if __GNUC_PREREQ (4, 1) +# define __attribute_returns_twice__ __attribute__ ((__returns_twice__)) +#else +# define __attribute_returns_twice__ /* Ignore. */ +#endif + #endif /* sys/cdefs.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/epoll.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/epoll.h index 2937774d..9b51e3bd 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/epoll.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/epoll.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2018 Free Software Foundation, Inc. +/* Copyright (C) 2002-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_EPOLL_H #define _SYS_EPOLL_H 1 @@ -22,6 +22,7 @@ #include #include +#include /* Get the platform-dependent flags. */ #include @@ -121,7 +122,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd, This function is a cancellation point and therefore not marked with __THROW. */ extern int epoll_wait (int __epfd, struct epoll_event *__events, - int __maxevents, int __timeout); + int __maxevents, int __timeout) + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); /* Same as epoll_wait, but the thread's signal mask is temporarily @@ -131,7 +133,30 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events, __THROW. */ extern int epoll_pwait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout, - const __sigset_t *__ss); + const __sigset_t *__ss) + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); + +/* Same as epoll_pwait, but the timeout as a timespec. + + This function is a cancellation point and therefore not marked with + __THROW. */ +#ifndef __USE_TIME_BITS64 +extern int epoll_pwait2 (int __epfd, struct epoll_event *__events, + int __maxevents, const struct timespec *__timeout, + const __sigset_t *__ss) + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); +#else +# ifdef __REDIRECT +extern int __REDIRECT (epoll_pwait2, (int __epfd, struct epoll_event *__ev, + int __maxevs, + const struct timespec *__timeout, + const __sigset_t *__ss), + __epoll_pwait2_time64) + __attr_access ((__write_only__, 2, 3)) __nonnull ((2)); +# else +# define epoll_pwait2 __epoll_pwait2_time64 +# endif +#endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/eventfd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/eventfd.h index 10515b2a..32cd267e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/eventfd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/eventfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2020 Free Software Foundation, Inc. +/* Copyright (C) 2007-2024 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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/file.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/file.h index e6494fa3..df275541 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/file.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/file.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_FILE_H #define _SYS_FILE_H 1 @@ -40,7 +40,6 @@ __BEGIN_DECLS #define LOCK_SH 1 /* Shared lock. */ #define LOCK_EX 2 /* Exclusive lock. */ #define LOCK_UN 8 /* Unlock. */ -#define __LOCK_ATOMIC 16 /* Atomic update. */ /* Can be OR'd in to one of the above. */ #define LOCK_NB 4 /* Don't block when locking. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/inotify.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/inotify.h index 49cc3748..566302a6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/inotify.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/inotify.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2018 Free Software Foundation, Inc. +/* Copyright (C) 2005-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_INOTIFY_H #define _SYS_INOTIFY_H 1 @@ -66,6 +66,7 @@ struct inotify_event #define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ #define IN_EXCL_UNLINK 0x04000000 /* Exclude events on unlinked objects. */ +#define IN_MASK_CREATE 0x10000000 /* Only create watches. */ #define IN_MASK_ADD 0x20000000 /* Add to the mask of an already existing watch. */ #define IN_ISDIR 0x40000000 /* Event occurred against dir. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ioctl.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ioctl.h index 49f7ff12..3f2338dd 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ioctl.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ioctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_IOCTL_H #define _SYS_IOCTL_H 1 @@ -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_NTH (ioctl, (int __fd, unsigned long int __request, ...), + __ioctl_time64); +# else +extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW; +# define ioctl __ioctl_time64 +# endif +#endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ipc.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ipc.h index b8c6836e..2b50286c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ipc.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_IPC_H #define _SYS_IPC_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/mman.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/mman.h index 12e1b069..c68a85d1 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/mman.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. - Copyright (C) 1994-2018 Free Software Foundation, Inc. + Copyright (C) 1994-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_MMAN_H #define _SYS_MMAN_H 1 @@ -146,6 +146,9 @@ extern int shm_open (const char *__name, int __oflag, mode_t __mode); /* Remove shared memory segment. */ extern int shm_unlink (const char *__name); +/* System-specific extensions. */ +#include + __END_DECLS #endif /* sys/mman.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/param.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/param.h index 359bc960..aea8c0e0 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/param.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/param.h @@ -1,5 +1,5 @@ /* Compatibility header for old-style Unix parameters and limits. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_PARAM_H #define _SYS_PARAM_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/poll.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/poll.h index 68f68ca4..7858fad6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/poll.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/poll.h @@ -1,5 +1,5 @@ /* Compatibility definitions for System V `poll' interface. - Copyright (C) 1994-2018 Free Software Foundation, Inc. + Copyright (C) 1994-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_POLL_H #define _SYS_POLL_H 1 @@ -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) + __fortified_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) + __fortified_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) + __fortified_attr_access (__write_only__, 1, 2); +# else +# define ppoll __ppoll64 +# endif +# endif #endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/prctl.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/prctl.h index 683d1674..b13b8462 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/prctl.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/prctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_PRCTL_H #define _SYS_PRCTL_H 1 @@ -21,10 +21,34 @@ #include #include /* The magic values come from here */ +/* Recent extensions to linux which may post-date the kernel headers + we're picking up... */ + +/* Memory tagging control operations (for AArch64). */ +#ifndef PR_MTE_TCF_SHIFT +# define PR_MTE_TCF_SHIFT 1 +# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TAG_SHIFT 3 +# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) +#endif + __BEGIN_DECLS /* Control process execution. */ +#ifndef __USE_TIME_BITS64 extern int prctl (int __option, ...) __THROW; +#else +# ifdef __REDIRECT +extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64); +# else +extern int __prctl_time64 (int __option,d ...) __THROW; +# define ioctl __prctl_time64 +# endif +#endif + __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ptrace.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ptrace.h index 1b0cbb91..8dee96ca 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ptrace.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/x86 version. - Copyright (C) 1996-2020 Free Software Foundation, Inc. + Copyright (C) 1996-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -190,8 +190,22 @@ enum __ptrace_request #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA /* Get information about system call. */ - PTRACE_GET_SYSCALL_INFO = 0x420e + PTRACE_GET_SYSCALL_INFO = 0x420e, #define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO + + /* Get rseq configuration information. */ + PTRACE_GET_RSEQ_CONFIGURATION = 0x420f, +#define PTRACE_GET_RSEQ_CONFIGURATION PTRACE_GET_RSEQ_CONFIGURATION + + /* Set configuration for syscall user dispatch. */ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210, +#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG + + /* Get configuration for syscall user dispatch. */ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 +#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG \ + PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG }; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/random.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/random.h index 056312ca..724c8d8c 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/random.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/random.h @@ -1,5 +1,5 @@ /* Interfaces for obtaining random bytes. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_RANDOM_H #define _SYS_RANDOM_H 1 @@ -25,17 +25,20 @@ /* Flags for use with getrandom. */ #define GRND_NONBLOCK 0x01 #define GRND_RANDOM 0x02 +#define GRND_INSECURE 0x04 __BEGIN_DECLS /* Write LENGTH bytes of randomness starting at BUFFER. Return the number of bytes written, or -1 on error. */ ssize_t getrandom (void *__buffer, size_t __length, - unsigned int __flags) __wur; + unsigned int __flags) __wur + __attr_access ((__write_only__, 1, 2)); /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ -int getentropy (void *__buffer, size_t __length) __wur; +int getentropy (void *__buffer, size_t __length) __wur + __attr_access ((__write_only__, 1, 2)); __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/resource.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/resource.h index 881db397..a5634ba7 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/resource.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/resource.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_RESOURCE_H #define _SYS_RESOURCE_H 1 @@ -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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/select.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/select.h index 6dd0c832..e6a0c1b8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/select.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/select.h @@ -1,5 +1,5 @@ /* `fd_set' type and related macros, and `select'/`pselect' declarations. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ @@ -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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sem.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sem.h index 200765bc..5d9ec392 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sem.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SEM_H #define _SYS_SEM_H 1 @@ -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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sendfile.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sendfile.h index 75b9d323..ff4525f2 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sendfile.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sendfile.h @@ -1,5 +1,5 @@ /* sendfile -- copy data directly from one file descriptor to another - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SENDFILE_H #define _SYS_SENDFILE_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/shm.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/shm.h index 8936af75..04191656 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/shm.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SHM_H #define _SYS_SHM_H 1 @@ -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; diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/socket.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/socket.h index 4a9c0164..366eaab8 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/socket.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/socket.h @@ -1,5 +1,5 @@ /* Declarations of socket constants, types, and functions. - Copyright (C) 1991-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SOCKET_H #define _SYS_SOCKET_H 1 @@ -154,7 +154,7 @@ extern ssize_t sendto (int __fd, const void *__buf, size_t __n, socklen_t __addr_len); /* Read N bytes into BUF through socket FD. - If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of + If ADDR is not NULL, fill in *ADDR_LEN bytes of it with the address of the sender, and store the actual size of the address in *ADDR_LEN. Returns the number of bytes read or -1 for errors. @@ -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); +# define 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. @@ -251,7 +325,7 @@ extern int shutdown (int __fd, int __how) __THROW; #ifdef __USE_XOPEN2K -/* Determine wheter socket is at a out-of-band mark. */ +/* Determine whether socket is at a out-of-band mark. */ extern int sockatmark (int __fd) __THROW; #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/stat.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/stat.h index 90c403cf..1fa6d6e6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/stat.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 5.6 File Characteristics @@ -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_time64 +# 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,176 +427,42 @@ 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; -#endif - -/* To allow the `struct stat' structure and the file type `mode_t' - bits to vary without changing shared library major version number, - the `stat' family of functions and `mknod' are in fact inline - wrappers around calls to `xstat', `fxstat', `lxstat', and `xmknod', - which all take a leading version-number argument designating the - data structure and bits used. defines _STAT_VER with - the version number corresponding to `struct stat' as defined in - that file; and _MKNOD_VER with the version number corresponding to - the S_IF* macros defined therein. It is arranged that when not - inlined these function are always statically linked; that way a - dynamically-linked executable always encodes the version number - corresponding to the data structures it uses, so the `x' functions - in the shared library can adapt without needing to recompile all - callers. */ - -#ifndef _STAT_VER -# define _STAT_VER 0 -#endif -#ifndef _MKNOD_VER -# define _MKNOD_VER 0 -#endif - -/* Wrappers for stat and mknod system calls. */ -#ifndef __USE_FILE_OFFSET64 -extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) - __THROW __nonnull ((3)); -extern int __xstat (int __ver, const char *__filename, - struct stat *__stat_buf) __THROW __nonnull ((2, 3)); -extern int __lxstat (int __ver, const char *__filename, - struct stat *__stat_buf) __THROW __nonnull ((2, 3)); -extern int __fxstatat (int __ver, int __fildes, const char *__filename, - struct stat *__stat_buf, int __flag) - __THROW __nonnull ((3, 4)); -#else -# ifdef __REDIRECT_NTH -extern int __REDIRECT_NTH (__fxstat, (int __ver, int __fildes, - struct stat *__stat_buf), __fxstat64) - __nonnull ((3)); -extern int __REDIRECT_NTH (__xstat, (int __ver, const char *__filename, - struct stat *__stat_buf), __xstat64) - __nonnull ((2, 3)); -extern int __REDIRECT_NTH (__lxstat, (int __ver, const char *__filename, - struct stat *__stat_buf), __lxstat64) - __nonnull ((2, 3)); -extern int __REDIRECT_NTH (__fxstatat, (int __ver, int __fildes, - const char *__filename, - struct stat *__stat_buf, int __flag), - __fxstatat64) __nonnull ((3, 4)); # else -# define __fxstat __fxstat64 -# define __xstat __xstat64 -# define __lxstat __lxstat64 -# endif -#endif - -#ifdef __USE_LARGEFILE64 -extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) - __THROW __nonnull ((3)); -extern int __xstat64 (int __ver, const char *__filename, - struct stat64 *__stat_buf) __THROW __nonnull ((2, 3)); -extern int __lxstat64 (int __ver, const char *__filename, - struct stat64 *__stat_buf) __THROW __nonnull ((2, 3)); -extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, - struct stat64 *__stat_buf, int __flag) - __THROW __nonnull ((3, 4)); -#endif -extern int __xmknod (int __ver, const char *__path, __mode_t __mode, - __dev_t *__dev) __THROW __nonnull ((2, 4)); - -extern int __xmknodat (int __ver, int __fd, const char *__path, - __mode_t __mode, __dev_t *__dev) - __THROW __nonnull ((3, 5)); - -#ifdef __USE_EXTERN_INLINES -/* Inlined versions of the real stat and mknod functions. */ - -__extern_inline int -__NTH (stat (const char *__path, struct stat *__statbuf)) -{ - return __xstat (_STAT_VER, __path, __statbuf); -} - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -__extern_inline int -__NTH (lstat (const char *__path, struct stat *__statbuf)) -{ - return __lxstat (_STAT_VER, __path, __statbuf); -} -# endif - -__extern_inline int -__NTH (fstat (int __fd, struct stat *__statbuf)) -{ - return __fxstat (_STAT_VER, __fd, __statbuf); -} - -# ifdef __USE_ATFILE -__extern_inline int -__NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf, - int __flag)) -{ - return __fxstatat (_STAT_VER, __fd, __filename, __statbuf, __flag); -} -# endif - -# ifdef __USE_MISC -__extern_inline int -__NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev)) -{ - return __xmknod (_MKNOD_VER, __path, __mode, &__dev); -} -# endif - -# ifdef __USE_ATFILE -__extern_inline int -__NTH (mknodat (int __fd, const char *__path, __mode_t __mode, - __dev_t __dev)) -{ - return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev); -} -# endif - -# if defined __USE_LARGEFILE64 \ - && (! defined __USE_FILE_OFFSET64 \ - || (defined __REDIRECT_NTH && defined __OPTIMIZE__)) -__extern_inline int -__NTH (stat64 (const char *__path, struct stat64 *__statbuf)) -{ - return __xstat64 (_STAT_VER, __path, __statbuf); -} - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -__extern_inline int -__NTH (lstat64 (const char *__path, struct stat64 *__statbuf)) -{ - return __lxstat64 (_STAT_VER, __path, __statbuf); -} -# endif - -__extern_inline int -__NTH (fstat64 (int __fd, struct stat64 *__statbuf)) -{ - return __fxstat64 (_STAT_VER, __fd, __statbuf); -} - -# ifdef __USE_ATFILE -__extern_inline int -__NTH (fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, - int __flag)) -{ - return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag); -} +# 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 +# include #endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statfs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statfs.h index 1bd0513b..4b88efa1 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statfs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statfs.h @@ -1,5 +1,5 @@ /* Definitions for getting information about a filesystem. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statvfs.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statvfs.h index b33bdab8..d1906f6d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statvfs.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/statvfs.h @@ -1,5 +1,5 @@ /* Definitions for getting information about a filesystem. - Copyright (C) 1998-2018 Free Software Foundation, Inc. + Copyright (C) 1998-2024 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 @@ -14,14 +14,14 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_STATVFS_H #define _SYS_STATVFS_H 1 #include -/* Get the system-specific definition of `struct statfs'. */ +/* Get the system-specific definition of `struct statvfs'. */ #include #ifndef __USE_FILE_OFFSET64 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syscall.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syscall.h index 6434dde6..259d7a77 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syscall.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syscall.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2018 Free Software Foundation, Inc. +/* Copyright (C) 1995-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYSCALL_H #define _SYSCALL_H 1 @@ -23,12 +23,9 @@ from the kernel sources. */ #include -#ifndef _LIBC -/* The Linux kernel header file defines macros `__NR_', but some - programs expect the traditional form `SYS_'. So in building libc - we scan the kernel's list and produce with macros for - all the `SYS_' names. */ -# include -#endif +/* The Linux kernel header file defines macros __NR_*, but some + programs expect the traditional form SYS_*. + defines SYS_* macros for __NR_* macros of known names. */ +#include #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysinfo.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysinfo.h index 80e2d096..e6a7cb90 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysinfo.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2018 Free Software Foundation, Inc. +/* Copyright (C) 1996-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_SYSINFO_H #define _SYS_SYSINFO_H 1 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syslog.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syslog.h index ee01478c..3888153e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syslog.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/syslog.h @@ -62,7 +62,7 @@ #define LOG_PRI(p) ((p) & LOG_PRIMASK) #define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) -#ifdef SYSLOG_NAMES +#if defined SYSLOG_NAMES && defined __USE_MISC #define INTERNAL_NOPRI 0x10 /* the "no priority" priority */ /* mark "facility" */ #define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES << 3, 0) @@ -118,7 +118,7 @@ CODE prioritynames[] = /* facility of pri */ #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) -#ifdef SYSLOG_NAMES +#if defined SYSLOG_NAMES && defined __USE_MISC CODE facilitynames[] = { { "auth", LOG_AUTH }, @@ -205,9 +205,11 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include -#endif -#ifdef __LDBL_COMPAT -# include +#else +# include +# if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# include +# endif #endif __END_DECLS diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysmacros.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysmacros.h index ccc15e5b..9823b89d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysmacros.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/sysmacros.h @@ -1,5 +1,5 @@ /* Definitions of macros to access `dev_t' values. - Copyright (C) 1996-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2024 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 @@ -14,25 +14,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ -#ifndef _SYS_SYSMACROS_H_OUTER - -#ifndef __SYSMACROS_DEPRECATED_INCLUSION -# define _SYS_SYSMACROS_H_OUTER 1 -#endif - -/* If is included after , these macros - will already be defined, and we need to redefine them without the - deprecation warnings. (If they are included in the opposite order, - the outer #ifndef will suppress this entire file and the macros - will be usable without warnings.) */ -#undef major -#undef minor -#undef makedev - -/* This is the macro that must be defined to satisfy the misuse check - in bits/sysmacros.h. */ #ifndef _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H 1 @@ -40,27 +23,6 @@ #include #include -/* Caution: The text of this deprecation message is unquoted, so that - #symbol can be substituted. (It is converted to a string by - __SYSMACROS_DM1.) This means the message must be a sequence of - complete pp-tokens; in particular, English contractions (it's, - can't) cannot be used. - - The message has been manually word-wrapped to fit in 80 columns - when output by GCC 5 and 6. The first line is shorter to leave - some room for the "foo.c:23: warning:" annotation. */ -#define __SYSMACROS_DM(symbol) __SYSMACROS_DM1 \ - (In the GNU C Library, #symbol is defined\n\ - by . For historical compatibility, it is\n\ - currently defined by as well, but we plan to\n\ - remove this soon. To use #symbol, include \n\ - directly. If you did not intend to use a system-defined macro\n\ - #symbol, you should undefine it after including .) - -/* This macro is variadic because the deprecation message above - contains commas. */ -#define __SYSMACROS_DM1(...) __glibc_macro_warning (#__VA_ARGS__) - #define __SYSMACROS_DECL_TEMPL(rtype, name, proto) \ extern rtype gnu_dev_##name proto __THROW __attribute_const__; @@ -84,8 +46,6 @@ __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_IMPL_TEMPL) __END_DECLS -#endif /* _SYS_SYSMACROS_H */ - #ifndef __SYSMACROS_NEED_IMPLEMENTATION # undef __SYSMACROS_DECL_TEMPL # undef __SYSMACROS_IMPL_TEMPL @@ -97,14 +57,8 @@ __END_DECLS # undef __SYSMACROS_DEFINE_MAKEDEV #endif -#ifdef __SYSMACROS_DEPRECATED_INCLUSION -# define major(dev) __SYSMACROS_DM (major) gnu_dev_major (dev) -# define minor(dev) __SYSMACROS_DM (minor) gnu_dev_minor (dev) -# define makedev(maj, min) __SYSMACROS_DM (makedev) gnu_dev_makedev (maj, min) -#else -# define major(dev) gnu_dev_major (dev) -# define minor(dev) gnu_dev_minor (dev) -# define makedev(maj, min) gnu_dev_makedev (maj, min) -#endif +#define major(dev) gnu_dev_major (dev) +#define minor(dev) gnu_dev_minor (dev) +#define makedev(maj, min) gnu_dev_makedev (maj, min) #endif /* sys/sysmacros.h */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/time.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/time.h index 4166a5b1..c8708198 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/time.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/time.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_TIME_H #define _SYS_TIME_H 1 @@ -54,23 +54,35 @@ struct timezone int tz_minuteswest; /* Minutes west of GMT. */ int tz_dsttime; /* Nonzero if DST is ever in effect. */ }; - -typedef struct timezone *__restrict __timezone_ptr_t; -#else -typedef void *__restrict __timezone_ptr_t; #endif -/* Get the current time of day and timezone information, - putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. - Returns 0 on success, -1 on errors. - NOTE: This form of timezone information is obsolete. - Use the functions and variables declared in instead. */ +/* Get the current time of day, putting it into *TV. + If TZ is not null, *TZ must be a struct timezone, and both fields + will be set to zero. + Calling this function with a non-null TZ is obsolete; + 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, - __timezone_ptr_t __tz) __THROW __nonnull ((1)); + 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. */ + This call is restricted to the super-user. + Setting the timezone in this way is obsolete, but we don't yet + warn about it because it still has some uses for which there is + no alternative. */ extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __THROW; @@ -81,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 @@ -117,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, @@ -135,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 @@ -159,9 +231,9 @@ extern int futimesat (int __fd, const char *__file, # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) # define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) # define timercmp(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ - ((a)->tv_sec CMP (b)->tv_sec)) + (((a)->tv_sec == (b)->tv_sec) \ + ? ((a)->tv_usec CMP (b)->tv_usec) \ + : ((a)->tv_sec CMP (b)->tv_sec)) # define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/timerfd.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/timerfd.h index 0ae60b65..19d0cbfa 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/timerfd.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/timerfd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2020 Free Software Foundation, Inc. +/* Copyright (C) 2008-2024 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 @@ -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 */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/times.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/times.h index f7da7ec1..bc1edf19 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/times.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/times.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2020 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/types.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/types.h index a9e0005c..0f1ce36d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/types.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 2.6 Primitive System Data Types @@ -39,9 +39,8 @@ typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; # define __u_char_defined # endif -#endif - typedef __loff_t loff_t; +#endif #ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 @@ -155,37 +154,20 @@ typedef unsigned int uint; #include -#if !__GNUC_PREREQ (2, 7) - /* These were defined by ISO C without the first `_'. */ -typedef unsigned char u_int8_t; -typedef unsigned short int u_int16_t; -typedef unsigned int u_int32_t; -# if __WORDSIZE == 64 -typedef unsigned long int u_int64_t; -# else -__extension__ typedef unsigned long long int u_int64_t; -# endif - -typedef int register_t; - -#else - -/* For GCC 2.7 and later, we can use specific type-size attributes. */ -# define __u_intN_t(N, MODE) \ - typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE))) - -__u_intN_t (8, __QI__); -__u_intN_t (16, __HI__); -__u_intN_t (32, __SI__); -__u_intN_t (64, __DI__); +typedef __uint8_t u_int8_t; +typedef __uint16_t u_int16_t; +typedef __uint32_t u_int32_t; +typedef __uint64_t u_int64_t; +#if __GNUC_PREREQ (2, 7) typedef int register_t __attribute__ ((__mode__ (__word__))); - +#else +typedef int register_t; +#endif /* Some code from BIND tests this macro to see if the types above are defined. */ -#endif #define __BIT_TYPES_DEFINED__ 1 @@ -195,15 +177,6 @@ typedef int register_t __attribute__ ((__mode__ (__word__))); /* It also defines `fd_set' and the FD_* macros for `select'. */ # include - -/* BSD defines `major', `minor', and `makedev' in this header. - However, these symbols are likely to collide with user code, so we are - going to stop defining them here in an upcoming release. Code that needs - these macros should include directly. Code that does - not need these macros should #undef them after including this header. */ -# define __SYSMACROS_DEPRECATED_INCLUSION -# include -# undef __SYSMACROS_DEPRECATED_INCLUSION #endif /* Use misc. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ucontext.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ucontext.h index afb7c181..492ae83e 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ucontext.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2018 Free Software Foundation, Inc. +/* Copyright (C) 2001-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 @@ -147,6 +147,7 @@ typedef struct ucontext_t mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; + __extension__ unsigned long long int __ssp[4]; } ucontext_t; #else /* !__x86_64__ */ @@ -251,6 +252,7 @@ typedef struct ucontext_t mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; + unsigned long int __ssp[4]; } ucontext_t; #endif /* !__x86_64__ */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/uio.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/uio.h index ff586c7b..58367f99 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/uio.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/uio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_UIO_H #define _SYS_UIO_H 1 @@ -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. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/un.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/un.h index efc2194a..bf03b7d6 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/un.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/un.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _SYS_UN_H #define _SYS_UN_H 1 @@ -34,10 +34,11 @@ struct sockaddr_un #ifdef __USE_MISC +# include # include /* For prototype of `strlen'. */ /* Evaluate to actual length of the `sockaddr_un' structure. */ -# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ +# define SUN_LEN(ptr) (offsetof (struct sockaddr_un, sun_path) \ + strlen ((ptr)->sun_path)) #endif diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/utsname.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/utsname.h index 4f7b16da..c6884255 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/utsname.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 4.4 System Identification diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/wait.h b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/wait.h index 8bbedd8e..edbb7b43 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/wait.h +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/include/x86_64-linux-gnu/sys/wait.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2024 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 @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ /* * POSIX Standard: 3.2.1 Wait for Process Termination @@ -69,6 +69,12 @@ typedef __pid_t pid_t; # define W_STOPCODE(sig) __W_STOPCODE (sig) #endif +/* The following values are used by the `waitid' function. */ +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +# include +#endif + + /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. @@ -133,14 +139,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. */ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib/x86_64-linux-gnu/libc_nonshared.a b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib/x86_64-linux-gnu/libc_nonshared.a new file mode 100644 index 00000000..4b374184 Binary files /dev/null and b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib/x86_64-linux-gnu/libc_nonshared.a differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crt1.o b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crt1.o index 73c94586..0d842709 100644 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crt1.o and b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crt1.o differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crti.o b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crti.o index 21aa6f28..0a9223a7 100644 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crti.o and b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/crti.o differ diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc.so b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc.so index a3d954db..5cac869d 100644 --- a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc.so +++ b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc.so @@ -2,4 +2,4 @@ Use the shared library, but some functions are only in the static library, so try that secondarily. */ OUTPUT_FORMAT(elf64-x86-64) -GROUP ( ../../lib64/libc.so.6 ./libc_nonshared.a AS_NEEDED ( ../../lib/ld-linux-x86-64.so.2 ) ) +GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) diff --git a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc_nonshared.a b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc_nonshared.a index 53698e41..4b374184 100644 Binary files a/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc_nonshared.a and b/linux-x86_64/x86_64-linux-gnu/libc/usr/lib64/libc_nonshared.a differ