mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
glibc: update headers to 2.42
This commit is contained in:
parent
cdd6e9ee3a
commit
1804251dfb
14
lib/libc/include/aarch64-linux-gnu/bits/fcntl.h
vendored
14
lib/libc/include/aarch64-linux-gnu/bits/fcntl.h
vendored
@ -25,17 +25,11 @@
|
||||
#define __O_NOFOLLOW 0100000
|
||||
#define __O_DIRECT 0200000
|
||||
|
||||
#ifdef __ILP32__
|
||||
# define __O_LARGEFILE 0400000
|
||||
#else
|
||||
# define __O_LARGEFILE 0
|
||||
#endif
|
||||
#define __O_LARGEFILE 0
|
||||
|
||||
#ifdef __LP64__
|
||||
# define F_GETLK64 5
|
||||
# define F_SETLK64 6
|
||||
# define F_SETLKW64 7
|
||||
#endif
|
||||
#define F_GETLK64 5
|
||||
#define F_SETLK64 6
|
||||
#define F_SETLKW64 7
|
||||
|
||||
struct flock
|
||||
{
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acoshf
|
||||
# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acospi
|
||||
# define __DECL_SIMD_acospi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acospif
|
||||
# define __DECL_SIMD_acospif __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asin
|
||||
# define __DECL_SIMD_asin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinf
|
||||
@ -45,6 +49,10 @@
|
||||
# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinhf
|
||||
# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinpi
|
||||
# define __DECL_SIMD_asinpi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinpif
|
||||
# define __DECL_SIMD_asinpif __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan
|
||||
# define __DECL_SIMD_atan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanf
|
||||
@ -53,10 +61,18 @@
|
||||
# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanhf
|
||||
# define __DECL_SIMD_atanhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanpi
|
||||
# define __DECL_SIMD_atanpi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanpif
|
||||
# define __DECL_SIMD_atanpif __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan2
|
||||
# define __DECL_SIMD_atan2 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan2f
|
||||
# define __DECL_SIMD_atan2f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan2pi
|
||||
# define __DECL_SIMD_atan2pi __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan2pif
|
||||
# define __DECL_SIMD_atan2pif __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cbrt
|
||||
# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cbrtf
|
||||
@ -176,12 +192,16 @@ typedef __SVBool_t __sv_bool_t;
|
||||
# define __vpcs __attribute__ ((__aarch64_vector_pcs__))
|
||||
|
||||
__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_atan2pif (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acospif (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinpif (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanpif (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
|
||||
@ -207,12 +227,16 @@ __vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanpif (__f32x4_t);
|
||||
|
||||
__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_atan2pi (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acospi (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asinpi (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atanpi (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
|
||||
@ -243,12 +267,16 @@ __vpcs __f64x2_t _ZGVnN2v_tanpi (__f64x2_t);
|
||||
#ifdef __SVE_VEC_MATH_SUPPORTED
|
||||
|
||||
__sv_f32_t _ZGVsMxvv_atan2f (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_atan2pif (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_acosf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_acoshf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_acospif (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinpif (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_atanf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_atanhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_atanpif (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_cbrtf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_cosf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_coshf (__sv_f32_t, __sv_bool_t);
|
||||
@ -274,12 +302,16 @@ __sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanpif (__sv_f32_t, __sv_bool_t);
|
||||
|
||||
__sv_f64_t _ZGVsMxvv_atan2 (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_atan2pi (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_acos (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_acosh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_acospi (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asinh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asinpi (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_atan (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_atanh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_atanpi (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cbrt (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cos (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_cosh (__sv_f64_t, __sv_bool_t);
|
||||
|
||||
@ -21,23 +21,13 @@
|
||||
|
||||
#include <bits/endian.h>
|
||||
|
||||
#ifdef __ILP32__
|
||||
# define __SIZEOF_PTHREAD_ATTR_T 32
|
||||
# define __SIZEOF_PTHREAD_MUTEX_T 32
|
||||
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
|
||||
# define __SIZEOF_PTHREAD_CONDATTR_T 4
|
||||
# define __SIZEOF_PTHREAD_RWLOCK_T 48
|
||||
# define __SIZEOF_PTHREAD_BARRIER_T 20
|
||||
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
|
||||
#else
|
||||
# define __SIZEOF_PTHREAD_ATTR_T 64
|
||||
# define __SIZEOF_PTHREAD_MUTEX_T 48
|
||||
# define __SIZEOF_PTHREAD_MUTEXATTR_T 8
|
||||
# define __SIZEOF_PTHREAD_CONDATTR_T 8
|
||||
# define __SIZEOF_PTHREAD_RWLOCK_T 56
|
||||
# define __SIZEOF_PTHREAD_BARRIER_T 32
|
||||
# define __SIZEOF_PTHREAD_BARRIERATTR_T 8
|
||||
#endif
|
||||
#define __SIZEOF_PTHREAD_ATTR_T 64
|
||||
#define __SIZEOF_PTHREAD_MUTEX_T 48
|
||||
#define __SIZEOF_PTHREAD_MUTEXATTR_T 8
|
||||
#define __SIZEOF_PTHREAD_CONDATTR_T 8
|
||||
#define __SIZEOF_PTHREAD_RWLOCK_T 56
|
||||
#define __SIZEOF_PTHREAD_BARRIER_T 32
|
||||
#define __SIZEOF_PTHREAD_BARRIERATTR_T 8
|
||||
#define __SIZEOF_PTHREAD_COND_T 48
|
||||
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
|
||||
|
||||
|
||||
@ -20,13 +20,7 @@
|
||||
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __ILP32__
|
||||
# define __SIZEOF_SEM_T 16
|
||||
#else
|
||||
# define __SIZEOF_SEM_T 32
|
||||
#endif
|
||||
|
||||
#define __SIZEOF_SEM_T 32
|
||||
|
||||
/* Value returned if `sem_open' failed. */
|
||||
#define SEM_FAILED ((sem_t *) 0)
|
||||
|
||||
@ -17,12 +17,5 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifdef __LP64__
|
||||
# define __WORDSIZE 64
|
||||
#else
|
||||
# define __WORDSIZE 32
|
||||
# define __WORDSIZE32_SIZE_ULONG 1
|
||||
# define __WORDSIZE32_PTRDIFF_LONG 1
|
||||
#endif
|
||||
|
||||
#define __WORDSIZE 64
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
5
lib/libc/include/generic-glibc/arpa/inet.h
vendored
5
lib/libc/include/generic-glibc/arpa/inet.h
vendored
@ -101,6 +101,11 @@ extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
|
||||
char *__buf) __THROW;
|
||||
#endif
|
||||
|
||||
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||
/* Include functions with security checks. */
|
||||
# include <bits/inet-fortified.h>
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* arpa/inet.h */
|
||||
@ -379,6 +379,8 @@ struct file_handle
|
||||
identity and may not
|
||||
be usable to
|
||||
open_by_handle_at. */
|
||||
# define AT_HANDLE_MNT_ID_UNIQUE 1 /* Return the 64-bit unique mount
|
||||
ID. */
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
42
lib/libc/include/generic-glibc/bits/inet-fortified-decl.h
vendored
Normal file
42
lib/libc/include/generic-glibc/bits/inet-fortified-decl.h
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/* Declarations of checking macros for inet functions.
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_INET_FORTIFIED_DEC_H
|
||||
#define _BITS_INET_FORTIFIED_DEC_H 1
|
||||
|
||||
#ifndef _ARPA_INET_H
|
||||
# error "Never include <bits/inet-fortified-decl.h> directly; use <arpa/inet.h> instead."
|
||||
#endif
|
||||
|
||||
extern const char *__inet_ntop_chk (int, const void *, char *, socklen_t, size_t);
|
||||
|
||||
extern const char *__REDIRECT_FORTIFY_NTH (__inet_ntop_alias,
|
||||
(int, const void *, char *, socklen_t), inet_ntop);
|
||||
extern const char *__REDIRECT_NTH (__inet_ntop_chk_warn,
|
||||
(int, const void *, char *, socklen_t, size_t), __inet_ntop_chk)
|
||||
__warnattr ("inet_ntop called with bigger length than "
|
||||
"size of destination buffer");
|
||||
|
||||
extern int __inet_pton_chk (int, const char *, void *, size_t);
|
||||
|
||||
extern int __REDIRECT_FORTIFY_NTH (__inet_pton_alias,
|
||||
(int, const char *, void *), inet_pton);
|
||||
extern int __REDIRECT_NTH (__inet_pton_chk_warn,
|
||||
(int, const char *, void *, size_t), __inet_pton_chk)
|
||||
__warnattr ("inet_pton called with a destination buffer size too small");
|
||||
#endif /* bits/inet-fortified-decl.h. */
|
||||
61
lib/libc/include/generic-glibc/bits/inet-fortified.h
vendored
Normal file
61
lib/libc/include/generic-glibc/bits/inet-fortified.h
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/* Checking macros for inet functions.
|
||||
Copyright (C) 2025 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_INET_FORTIFIED_H
|
||||
#define _BITS_INET_FORTIFIED_H 1
|
||||
|
||||
#ifndef _ARPA_INET_H
|
||||
# error "Never include <bits/inet-fortified.h> directly; use <arpa/inet.h> instead."
|
||||
#endif
|
||||
|
||||
#include <bits/inet-fortified-decl.h>
|
||||
|
||||
__fortify_function __attribute_overloadable__ const char *
|
||||
__NTH (inet_ntop (int __af,
|
||||
__fortify_clang_overload_arg (const void *, __restrict, __src),
|
||||
char *__restrict __dst, socklen_t __dst_size))
|
||||
__fortify_clang_warning_only_if_bos_lt (__dst_size, __dst,
|
||||
"inet_ntop called with bigger length "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (inet_ntop, __dst_size, sizeof (char),
|
||||
__glibc_objsize (__dst),
|
||||
__af, __src, __dst, __dst_size);
|
||||
};
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (inet_pton (int __af,
|
||||
const char *__restrict __src,
|
||||
__fortify_clang_overload_arg (void *, __restrict, __dst)))
|
||||
__fortify_clang_warning_only_if_bos0_lt
|
||||
(4, __dst, "inet_pton called with destination buffer size less than 4")
|
||||
{
|
||||
size_t sz = 0;
|
||||
if (__af == AF_INET)
|
||||
sz = sizeof (struct in_addr);
|
||||
else if (__af == AF_INET6)
|
||||
sz = sizeof (struct in6_addr);
|
||||
else
|
||||
return __inet_pton_alias (__af, __src, __dst);
|
||||
|
||||
return __glibc_fortify (inet_pton, sz, sizeof (char),
|
||||
__glibc_objsize (__dst),
|
||||
__af, __src, __dst);
|
||||
};
|
||||
|
||||
#endif /* bits/inet-fortified.h. */
|
||||
@ -32,17 +32,6 @@ struct winsize
|
||||
unsigned short int ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio
|
||||
{
|
||||
unsigned short int c_iflag; /* input mode flags */
|
||||
unsigned short int c_oflag; /* output mode flags */
|
||||
unsigned short int c_cflag; /* control mode flags */
|
||||
unsigned short int c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
|
||||
85
lib/libc/include/generic-glibc/bits/ioctls.h
vendored
85
lib/libc/include/generic-glibc/bits/ioctls.h
vendored
@ -22,87 +22,4 @@
|
||||
/* Use the definitions from the kernel header files. */
|
||||
#include <asm/ioctls.h>
|
||||
|
||||
/* Routing table calls. */
|
||||
#define SIOCADDRT 0x890B /* add routing table entry */
|
||||
#define SIOCDELRT 0x890C /* delete routing table entry */
|
||||
#define SIOCRTMSG 0x890D /* call to routing system */
|
||||
|
||||
/* Socket configuration controls. */
|
||||
#define SIOCGIFNAME 0x8910 /* get iface name */
|
||||
#define SIOCSIFLINK 0x8911 /* set iface channel */
|
||||
#define SIOCGIFCONF 0x8912 /* get iface list */
|
||||
#define SIOCGIFFLAGS 0x8913 /* get flags */
|
||||
#define SIOCSIFFLAGS 0x8914 /* set flags */
|
||||
#define SIOCGIFADDR 0x8915 /* get PA address */
|
||||
#define SIOCSIFADDR 0x8916 /* set PA address */
|
||||
#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */
|
||||
#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */
|
||||
#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */
|
||||
#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */
|
||||
#define SIOCGIFNETMASK 0x891b /* get network PA mask */
|
||||
#define SIOCSIFNETMASK 0x891c /* set network PA mask */
|
||||
#define SIOCGIFMETRIC 0x891d /* get metric */
|
||||
#define SIOCSIFMETRIC 0x891e /* set metric */
|
||||
#define SIOCGIFMEM 0x891f /* get memory address (BSD) */
|
||||
#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */
|
||||
#define SIOCGIFMTU 0x8921 /* get MTU size */
|
||||
#define SIOCSIFMTU 0x8922 /* set MTU size */
|
||||
#define SIOCSIFNAME 0x8923 /* set interface name */
|
||||
#define SIOCSIFHWADDR 0x8924 /* set hardware address */
|
||||
#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */
|
||||
#define SIOCSIFENCAP 0x8926
|
||||
#define SIOCGIFHWADDR 0x8927 /* Get hardware address */
|
||||
#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */
|
||||
#define SIOCSIFSLAVE 0x8930
|
||||
#define SIOCADDMULTI 0x8931 /* Multicast address lists */
|
||||
#define SIOCDELMULTI 0x8932
|
||||
#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */
|
||||
#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */
|
||||
#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */
|
||||
#define SIOCGIFPFLAGS 0x8935
|
||||
#define SIOCDIFADDR 0x8936 /* delete PA address */
|
||||
#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */
|
||||
#define SIOCGIFCOUNT 0x8938 /* get number of devices */
|
||||
|
||||
#define SIOCGIFBR 0x8940 /* Bridging support */
|
||||
#define SIOCSIFBR 0x8941 /* Set bridging options */
|
||||
|
||||
#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */
|
||||
#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */
|
||||
|
||||
|
||||
/* ARP cache control calls. */
|
||||
/* 0x8950 - 0x8952 * obsolete calls, don't re-use */
|
||||
#define SIOCDARP 0x8953 /* delete ARP table entry */
|
||||
#define SIOCGARP 0x8954 /* get ARP table entry */
|
||||
#define SIOCSARP 0x8955 /* set ARP table entry */
|
||||
|
||||
/* RARP cache control calls. */
|
||||
#define SIOCDRARP 0x8960 /* delete RARP table entry */
|
||||
#define SIOCGRARP 0x8961 /* get RARP table entry */
|
||||
#define SIOCSRARP 0x8962 /* set RARP table entry */
|
||||
|
||||
/* Driver configuration calls */
|
||||
|
||||
#define SIOCGIFMAP 0x8970 /* Get device parameters */
|
||||
#define SIOCSIFMAP 0x8971 /* Set device parameters */
|
||||
|
||||
/* DLCI configuration calls */
|
||||
|
||||
#define SIOCADDDLCI 0x8980 /* Create new DLCI device */
|
||||
#define SIOCDELDLCI 0x8981 /* Delete DLCI device */
|
||||
|
||||
/* Device private ioctl calls. */
|
||||
|
||||
/* These 16 ioctls are available to devices via the do_ioctl() device
|
||||
vector. Each device should include this file and redefine these
|
||||
names as their own. Because these are device dependent it is a good
|
||||
idea _NOT_ to issue them to random objects and hope. */
|
||||
|
||||
#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */
|
||||
|
||||
/*
|
||||
* These 16 ioctl calls are protocol private
|
||||
*/
|
||||
|
||||
#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */
|
||||
#include <linux/sockios.h>
|
||||
@ -373,4 +373,48 @@
|
||||
#define __DECL_SIMD_tanpif32x
|
||||
#define __DECL_SIMD_tanpif64x
|
||||
#define __DECL_SIMD_tanpif128x
|
||||
|
||||
#define __DECL_SIMD_acospi
|
||||
#define __DECL_SIMD_acospif
|
||||
#define __DECL_SIMD_acospil
|
||||
#define __DECL_SIMD_acospif16
|
||||
#define __DECL_SIMD_acospif32
|
||||
#define __DECL_SIMD_acospif64
|
||||
#define __DECL_SIMD_acospif128
|
||||
#define __DECL_SIMD_acospif32x
|
||||
#define __DECL_SIMD_acospif64x
|
||||
#define __DECL_SIMD_acospif128x
|
||||
|
||||
#define __DECL_SIMD_asinpi
|
||||
#define __DECL_SIMD_asinpif
|
||||
#define __DECL_SIMD_asinpil
|
||||
#define __DECL_SIMD_asinpif16
|
||||
#define __DECL_SIMD_asinpif32
|
||||
#define __DECL_SIMD_asinpif64
|
||||
#define __DECL_SIMD_asinpif128
|
||||
#define __DECL_SIMD_asinpif32x
|
||||
#define __DECL_SIMD_asinpif64x
|
||||
#define __DECL_SIMD_asinpif128x
|
||||
|
||||
#define __DECL_SIMD_atanpi
|
||||
#define __DECL_SIMD_atanpif
|
||||
#define __DECL_SIMD_atanpil
|
||||
#define __DECL_SIMD_atanpif16
|
||||
#define __DECL_SIMD_atanpif32
|
||||
#define __DECL_SIMD_atanpif64
|
||||
#define __DECL_SIMD_atanpif128
|
||||
#define __DECL_SIMD_atanpif32x
|
||||
#define __DECL_SIMD_atanpif64x
|
||||
#define __DECL_SIMD_atanpif128x
|
||||
|
||||
#define __DECL_SIMD_atan2pi
|
||||
#define __DECL_SIMD_atan2pif
|
||||
#define __DECL_SIMD_atan2pil
|
||||
#define __DECL_SIMD_atan2pif16
|
||||
#define __DECL_SIMD_atan2pif32
|
||||
#define __DECL_SIMD_atan2pif64
|
||||
#define __DECL_SIMD_atan2pif128
|
||||
#define __DECL_SIMD_atan2pif32x
|
||||
#define __DECL_SIMD_atan2pif64x
|
||||
#define __DECL_SIMD_atan2pif128x
|
||||
#endif
|
||||
@ -34,7 +34,7 @@
|
||||
#define __MATHCALLX(function,suffix, args, attrib) \
|
||||
__MATHDECLX (_Mdouble_,function,suffix, args, attrib)
|
||||
#define __MATHDECLX(type, function,suffix, args, attrib) \
|
||||
__MATHDECL_1(type, function,suffix, args) __attribute__ (attrib);
|
||||
__MATHDECL_1(type, function,suffix, args) __attribute__ (attrib)
|
||||
#define __MATHDECL_1_IMPL(type, function, suffix, args) \
|
||||
extern type __MATH_PRECNAME(function,suffix) args __THROW
|
||||
#define __MATHDECL_1(type, function, suffix, args) \
|
||||
|
||||
21
lib/libc/include/generic-glibc/bits/mathcalls.h
vendored
21
lib/libc/include/generic-glibc/bits/mathcalls.h
vendored
@ -68,12 +68,16 @@ __MATHCALL_VEC (tan,, (_Mdouble_ __x));
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
|
||||
/* Arc cosine of X, divided by pi. */
|
||||
__MATHCALL (acospi,, (_Mdouble_ __x));
|
||||
__MATHCALL_VEC (acospi,, (_Mdouble_ __x));
|
||||
/* Arc sine of X, divided by pi. */
|
||||
__MATHCALL (asinpi,, (_Mdouble_ __x));
|
||||
__MATHCALL_VEC (asinpi,, (_Mdouble_ __x));
|
||||
/* Arc tangent of X, divided by pi. */
|
||||
__MATHCALL (atanpi,, (_Mdouble_ __x));
|
||||
__MATHCALL_VEC (atanpi,, (_Mdouble_ __x));
|
||||
/* Arc tangent of Y/X, divided by pi. */
|
||||
__MATHCALL (atan2pi,, (_Mdouble_ __y, _Mdouble_ __x));
|
||||
__MATHCALL_VEC (atan2pi,, (_Mdouble_ __y, _Mdouble_ __x));
|
||||
|
||||
/* Cosine of pi * X. */
|
||||
__MATHCALL_VEC (cospi,, (_Mdouble_ __x));
|
||||
@ -185,6 +189,23 @@ __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
|
||||
__MATHCALL_VEC (cbrt,, (_Mdouble_ __x));
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
|
||||
/* Return 1+X to the Y power. */
|
||||
__MATHCALL (compoundn,, (_Mdouble_ __x, long long int __y));
|
||||
|
||||
/* Return X to the Y power. */
|
||||
__MATHCALL (pown,, (_Mdouble_ __x, long long int __y));
|
||||
|
||||
/* Return X to the Y power. */
|
||||
__MATHCALL (powr,, (_Mdouble_ __x, _Mdouble_ __y));
|
||||
|
||||
/* Return the Yth root of X. */
|
||||
__MATHCALL (rootn,, (_Mdouble_ __x, long long int __y));
|
||||
|
||||
/* Return the reciprocal of the square root of X. */
|
||||
__MATHCALL (rsqrt,, (_Mdouble_ __x));
|
||||
#endif
|
||||
|
||||
|
||||
/* Nearest integer, absolute value, and remainder functions. */
|
||||
|
||||
|
||||
@ -113,6 +113,8 @@
|
||||
locked pages too. */
|
||||
# define MADV_COLLAPSE 25 /* Synchronous hugepage collapse. */
|
||||
# define MADV_HWPOISON 100 /* Poison a page for testing. */
|
||||
# define MADV_GUARD_INSTALL 102 /* Fatal signal on access to range */
|
||||
# define MADV_GUARD_REMOVE 103 /* Unguard range */
|
||||
#endif
|
||||
|
||||
/* The POSIX people had to invent similar names for the same things. */
|
||||
|
||||
@ -43,10 +43,9 @@
|
||||
# endif
|
||||
|
||||
/* Access restrictions for pkey_alloc. */
|
||||
# ifndef PKEY_DISABLE_ACCESS
|
||||
# define PKEY_DISABLE_ACCESS 0x1
|
||||
# define PKEY_DISABLE_WRITE 0x2
|
||||
# endif
|
||||
# define PKEY_UNRESTRICTED 0x0
|
||||
# define PKEY_DISABLE_ACCESS 0x1
|
||||
# define PKEY_DISABLE_WRITE 0x2
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
2
lib/libc/include/generic-glibc/bits/sched.h
vendored
2
lib/libc/include/generic-glibc/bits/sched.h
vendored
@ -152,7 +152,7 @@ int sched_setattr (pid_t tid, struct sched_attr *attr, unsigned int flags)
|
||||
store it in *ATTR. */
|
||||
int sched_getattr (pid_t tid, struct sched_attr *attr, unsigned int size,
|
||||
unsigned int flags)
|
||||
__THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3));
|
||||
__THROW __nonnull ((2));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ __NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
}
|
||||
|
||||
/*
|
||||
* strlcpy and strlcat introduced in glibc 2.38
|
||||
* zig patch: strlcpy and strlcat introduced in glibc 2.38
|
||||
* https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
|
||||
*/
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
|
||||
|
||||
24
lib/libc/include/generic-glibc/bits/syscall.h
vendored
24
lib/libc/include/generic-glibc/bits/syscall.h
vendored
@ -1,11 +1,11 @@
|
||||
/* Generated at libc build time from syscall list. */
|
||||
/* The system call list corresponds to kernel 6.12. */
|
||||
/* The system call list corresponds to kernel 6.15. */
|
||||
|
||||
#ifndef _SYSCALL_H
|
||||
# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
|
||||
#endif
|
||||
|
||||
#define __GLIBC_LINUX_VERSION_CODE 396288
|
||||
#define __GLIBC_LINUX_VERSION_CODE 397056
|
||||
|
||||
#ifdef __NR_FAST_atomic_update
|
||||
# define SYS_FAST_atomic_update __NR_FAST_atomic_update
|
||||
@ -703,6 +703,10 @@
|
||||
# define SYS_getxattr __NR_getxattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_getxattrat
|
||||
# define SYS_getxattrat __NR_getxattrat
|
||||
#endif
|
||||
|
||||
#ifdef __NR_getxgid
|
||||
# define SYS_getxgid __NR_getxgid
|
||||
#endif
|
||||
@ -875,6 +879,10 @@
|
||||
# define SYS_listxattr __NR_listxattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_listxattrat
|
||||
# define SYS_listxattrat __NR_listxattrat
|
||||
#endif
|
||||
|
||||
#ifdef __NR_llistxattr
|
||||
# define SYS_llistxattr __NR_llistxattr
|
||||
#endif
|
||||
@ -1167,6 +1175,10 @@
|
||||
# define SYS_open_tree __NR_open_tree
|
||||
#endif
|
||||
|
||||
#ifdef __NR_open_tree_attr
|
||||
# define SYS_open_tree_attr __NR_open_tree_attr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_openat
|
||||
# define SYS_openat __NR_openat
|
||||
#endif
|
||||
@ -1839,6 +1851,10 @@
|
||||
# define SYS_removexattr __NR_removexattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_removexattrat
|
||||
# define SYS_removexattrat __NR_removexattrat
|
||||
#endif
|
||||
|
||||
#ifdef __NR_rename
|
||||
# define SYS_rename __NR_rename
|
||||
#endif
|
||||
@ -2199,6 +2215,10 @@
|
||||
# define SYS_setxattr __NR_setxattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_setxattrat
|
||||
# define SYS_setxattrat __NR_setxattrat
|
||||
#endif
|
||||
|
||||
#ifdef __NR_sgetmask
|
||||
# define SYS_sgetmask __NR_sgetmask
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* termios baud rate selection definitions. Linux/generic version.
|
||||
/* termios baud rate selection definitions. Universal version for sane speed_t.
|
||||
Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -20,29 +20,56 @@
|
||||
# error "Never include <bits/termios-baud.h> directly; use <termios.h> 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. */
|
||||
/* POSIX required baud rates */
|
||||
#define B0 0U /* Hang up or ispeed == ospeed */
|
||||
#define B50 50U
|
||||
#define B75 75U
|
||||
#define B110 110U
|
||||
#define B134 134U /* Really 134.5 baud by POSIX spec */
|
||||
#define B150 150U
|
||||
#define B200 200U
|
||||
#define B300 300U
|
||||
#define B600 600U
|
||||
#define B1200 1200U
|
||||
#define B1800 1800U
|
||||
#define B2400 2400U
|
||||
#define B4800 4800U
|
||||
#define B9600 9600U
|
||||
#define B19200 19200U
|
||||
#define B38400 38400U
|
||||
#ifdef __USE_MISC
|
||||
# define EXTA B19200
|
||||
# define EXTB B38400
|
||||
#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
|
||||
/* Other baud rates, "nonstandard" but known to be used */
|
||||
#define B7200 7200U
|
||||
#define B14400 14400U
|
||||
#define B28800 28800U
|
||||
#define B33600 33600U
|
||||
#define B57600 57600U
|
||||
#define B76800 76800U
|
||||
#define B115200 115200U
|
||||
#define B153600 153600U
|
||||
#define B230400 230400U
|
||||
#define B307200 307200U
|
||||
#define B460800 460800U
|
||||
#define B500000 500000U
|
||||
#define B576000 576000U
|
||||
#define B614400 614400U
|
||||
#define B921600 921600U
|
||||
#define B1000000 1000000U
|
||||
#define B1152000 1152000U
|
||||
#define B1500000 1500000U
|
||||
#define B2000000 2000000U
|
||||
#define B2500000 2500000U
|
||||
#define B3000000 3000000U
|
||||
#define B3500000 3500000U
|
||||
#define B4000000 4000000U
|
||||
#define B5000000 5000000U
|
||||
#define B10000000 10000000U
|
||||
|
||||
#ifdef __USE_GNU
|
||||
#define SPEED_MAX 4294967295U /* maximum valid speed_t value */
|
||||
#endif
|
||||
#define __MAX_BAUD 4294967295U /* legacy alias for SPEED_MAX */
|
||||
@ -34,5 +34,7 @@
|
||||
#define CLOCAL 0004000
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define ADDRB 04000000000
|
||||
# define ADDRB 04000000000
|
||||
# define CMSPAR 010000000000 /* Mark or space (stick) parity. */
|
||||
# define CRTSCTS 020000000000 /* Flow control. */
|
||||
#endif
|
||||
47
lib/libc/include/generic-glibc/bits/termios-cbaud.h
vendored
Normal file
47
lib/libc/include/generic-glibc/bits/termios-cbaud.h
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/* termios baud rate selection definitions. Linux/generic version.
|
||||
Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TERMIOS_H
|
||||
# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> 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. */
|
||||
# define IBSHIFT 16
|
||||
#endif
|
||||
|
||||
/* Extra output baud rates (not in POSIX). */
|
||||
#define __BOTHER 0010000
|
||||
#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
|
||||
@ -29,8 +29,15 @@ struct termios
|
||||
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 */
|
||||
/* Input and output baud rates. */
|
||||
__extension__ union {
|
||||
speed_t __ispeed;
|
||||
speed_t c_ispeed;
|
||||
};
|
||||
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
|
||||
__extension__ union {
|
||||
speed_t __ospeed;
|
||||
speed_t c_ospeed;
|
||||
};
|
||||
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
|
||||
};
|
||||
56
lib/libc/include/generic-glibc/bits/termios.h
vendored
56
lib/libc/include/generic-glibc/bits/termios.h
vendored
@ -24,35 +24,41 @@ typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
|
||||
#include <bits/termios-struct.h>
|
||||
#ifdef _TERMIOS_H
|
||||
# include <bits/termios-struct.h>
|
||||
#endif
|
||||
|
||||
#include <bits/termios-c_cc.h>
|
||||
#include <bits/termios-c_iflag.h>
|
||||
#include <bits/termios-c_oflag.h>
|
||||
|
||||
/* c_cflag bit meaning */
|
||||
#define B0 0000000 /* hang up */
|
||||
#define B50 0000001
|
||||
#define B75 0000002
|
||||
#define B110 0000003
|
||||
#define B134 0000004
|
||||
#define B150 0000005
|
||||
#define B200 0000006
|
||||
#define B300 0000007
|
||||
#define B600 0000010
|
||||
#define B1200 0000011
|
||||
#define B1800 0000012
|
||||
#define B2400 0000013
|
||||
#define B4800 0000014
|
||||
#define B9600 0000015
|
||||
#define B19200 0000016
|
||||
#define B38400 0000017
|
||||
#ifdef __USE_MISC
|
||||
# define EXTA B19200
|
||||
# define EXTB B38400
|
||||
#endif
|
||||
#include <bits/termios-baud.h>
|
||||
|
||||
#include <bits/termios-c_cflag.h>
|
||||
|
||||
#ifdef __USE_MISC
|
||||
#define __B0 0000000 /* hang up */
|
||||
#define __B50 0000001
|
||||
#define __B75 0000002
|
||||
#define __B110 0000003
|
||||
#define __B134 0000004
|
||||
#define __B150 0000005
|
||||
#define __B200 0000006
|
||||
#define __B300 0000007
|
||||
#define __B600 0000010
|
||||
#define __B1200 0000011
|
||||
#define __B1800 0000012
|
||||
#define __B2400 0000013
|
||||
#define __B4800 0000014
|
||||
#define __B9600 0000015
|
||||
#define __B19200 0000016
|
||||
#define __B38400 0000017
|
||||
#include <bits/termios-cbaud.h>
|
||||
|
||||
# define __EXTA __B19200
|
||||
# define __EXTB __B38400
|
||||
# define BOTHER __BOTHER
|
||||
#endif
|
||||
|
||||
#include <bits/termios-c_lflag.h>
|
||||
|
||||
#ifdef __USE_MISC
|
||||
@ -73,4 +79,6 @@ typedef unsigned int tcflag_t;
|
||||
|
||||
#include <bits/termios-tcflow.h>
|
||||
|
||||
#include <bits/termios-misc.h>
|
||||
#include <bits/termios-misc.h>
|
||||
|
||||
#include <bits/termios-baud.h>
|
||||
@ -32,6 +32,7 @@
|
||||
#endif
|
||||
|
||||
#include <bits/types.h>
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
struct _IO_FILE;
|
||||
struct _IO_marker;
|
||||
@ -97,8 +98,15 @@ struct _IO_FILE_complete
|
||||
void *_freeres_buf;
|
||||
struct _IO_FILE **_prevchain;
|
||||
int _mode;
|
||||
#if __WORDSIZE == 64
|
||||
int _unused3;
|
||||
#endif
|
||||
__uint64_t _total_written;
|
||||
#if __WORDSIZE == 32
|
||||
int _unused3;
|
||||
#endif
|
||||
/* Make sure we don't get into trouble again. */
|
||||
char _unused2[15 * sizeof (int) - 5 * sizeof (void *)];
|
||||
char _unused2[12 * sizeof (int) - 5 * sizeof (void *)];
|
||||
};
|
||||
|
||||
/* These macros are used by bits/stdio.h and internal headers. */
|
||||
|
||||
10
lib/libc/include/generic-glibc/dlfcn.h
vendored
10
lib/libc/include/generic-glibc/dlfcn.h
vendored
@ -217,15 +217,21 @@ struct dl_find_object
|
||||
int dlfo_eh_count; /* Number of exception handling entries. */
|
||||
unsigned int __dlfo_eh_count_pad;
|
||||
# endif
|
||||
__extension__ unsigned long long int __dflo_reserved[7];
|
||||
void *dlfo_sframe; /* SFrame stack trace data of the object. */
|
||||
#if __WORDSIZE == 32
|
||||
unsigned int __dlfo_sframe_pad;
|
||||
#endif
|
||||
__extension__ unsigned long long int __dlfo_reserved[6];
|
||||
};
|
||||
|
||||
/* 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 */
|
||||
/* SFrame stack trace data is valid. */
|
||||
#define DLFO_FLAG_SFRAME (1ULL << 0)
|
||||
|
||||
#endif /* __USE_GNU */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
33
lib/libc/include/generic-glibc/elf.h
vendored
33
lib/libc/include/generic-glibc/elf.h
vendored
@ -837,12 +837,15 @@ typedef struct
|
||||
#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
|
||||
#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
|
||||
#define NT_ARM_POE 0x40f /* ARM POE registers. */
|
||||
#define NT_ARM_GCS 0x410 /* ARM GCS state. */
|
||||
#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_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged
|
||||
address control */
|
||||
#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */
|
||||
#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and
|
||||
status registers. */
|
||||
@ -2906,19 +2909,6 @@ enum
|
||||
|
||||
#define R_AARCH64_NONE 0 /* No relocation. */
|
||||
|
||||
/* ILP32 AArch64 relocs. */
|
||||
#define R_AARCH64_P32_ABS32 1 /* Direct 32 bit. */
|
||||
#define R_AARCH64_P32_COPY 180 /* Copy symbol at runtime. */
|
||||
#define R_AARCH64_P32_GLOB_DAT 181 /* Create GOT entry. */
|
||||
#define R_AARCH64_P32_JUMP_SLOT 182 /* Create PLT entry. */
|
||||
#define R_AARCH64_P32_RELATIVE 183 /* Adjust by program base. */
|
||||
#define R_AARCH64_P32_TLS_DTPMOD 184 /* Module number, 32 bit. */
|
||||
#define R_AARCH64_P32_TLS_DTPREL 185 /* Module-relative offset, 32 bit. */
|
||||
#define R_AARCH64_P32_TLS_TPREL 186 /* TP-relative offset, 32 bit. */
|
||||
#define R_AARCH64_P32_TLSDESC 187 /* TLS Descriptor. */
|
||||
#define R_AARCH64_P32_IRELATIVE 188 /* STT_GNU_IFUNC relocation. */
|
||||
|
||||
/* LP64 AArch64 relocs. */
|
||||
#define R_AARCH64_ABS64 257 /* Direct 64 bit. */
|
||||
#define R_AARCH64_ABS32 258 /* Direct 32 bit. */
|
||||
#define R_AARCH64_ABS16 259 /* Direct 16-bit. */
|
||||
@ -4091,6 +4081,7 @@ enum
|
||||
#define R_RISCV_TLS_DTPREL64 9
|
||||
#define R_RISCV_TLS_TPREL32 10
|
||||
#define R_RISCV_TLS_TPREL64 11
|
||||
#define R_RISCV_TLSDESC 12
|
||||
#define R_RISCV_BRANCH 16
|
||||
#define R_RISCV_JAL 17
|
||||
#define R_RISCV_CALL 18
|
||||
@ -4116,16 +4107,10 @@ enum
|
||||
#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_GOT32_PCREL 41
|
||||
#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
|
||||
@ -4137,8 +4122,12 @@ enum
|
||||
#define R_RISCV_PLT32 59
|
||||
#define R_RISCV_SET_ULEB128 60
|
||||
#define R_RISCV_SUB_ULEB128 61
|
||||
#define R_RISCV_TLSDESC_HI20 62
|
||||
#define R_RISCV_TLSDESC_LOAD_LO12 63
|
||||
#define R_RISCV_TLSDESC_ADD_LO12 64
|
||||
#define R_RISCV_TLSDESC_CALL 65
|
||||
|
||||
#define R_RISCV_NUM 62
|
||||
#define R_RISCV_NUM 66
|
||||
|
||||
/* RISC-V specific values for the st_other field. */
|
||||
#define STO_RISCV_VARIANT_CC 0x80 /* Function uses variant calling
|
||||
@ -4147,7 +4136,7 @@ enum
|
||||
/* 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. */
|
||||
/* RISC-V specific values for the p_type field (deprecated). */
|
||||
#define PT_RISCV_ATTRIBUTES (PT_LOPROC + 3)
|
||||
|
||||
/* RISC-V specific values for the d_tag field. */
|
||||
|
||||
11
lib/libc/include/generic-glibc/fcntl.h
vendored
11
lib/libc/include/generic-glibc/fcntl.h
vendored
@ -168,7 +168,7 @@ typedef __pid_t pid_t;
|
||||
#endif
|
||||
|
||||
|
||||
/* fcntl was a simple symbol until glibc 2.27 inclusive.
|
||||
/* zig patch: fcntl was a simple symbol until glibc 2.27 inclusive.
|
||||
* glibc 2.28 onwards converted it to a macro when compiled with
|
||||
* USE_LARGEFILE64. */
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2
|
||||
@ -289,16 +289,17 @@ extern int creat64 (const char *__file, mode_t __mode) __nonnull ((1));
|
||||
# define F_TEST 3 /* Test a region for other processes locks. */
|
||||
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
extern int lockf (int __fd, int __cmd, off_t __len);
|
||||
extern int lockf (int __fd, int __cmd, off_t __len) __wur;
|
||||
# else
|
||||
# ifdef __REDIRECT
|
||||
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
|
||||
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
|
||||
lockf64) __wur;
|
||||
# else
|
||||
# define lockf lockf64
|
||||
# endif
|
||||
# endif
|
||||
# ifdef __USE_LARGEFILE64
|
||||
extern int lockf64 (int __fd, int __cmd, off64_t __len);
|
||||
extern int lockf64 (int __fd, int __cmd, off64_t __len) __wur;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -351,4 +352,4 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* fcntl.h */
|
||||
#endif /* fcntl.h */
|
||||
|
||||
6
lib/libc/include/generic-glibc/features.h
vendored
6
lib/libc/include/generic-glibc/features.h
vendored
@ -491,7 +491,7 @@
|
||||
or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
|
||||
old extension. */
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
|
||||
/* support for ISOC99 was added in glibc-2.7 */
|
||||
/* zig patch: support for ISOC99 was added in glibc-2.7 */
|
||||
# define __GLIBC_USE_DEPRECATED_SCANF 1
|
||||
#elif (defined __USE_GNU \
|
||||
&& (defined __cplusplus \
|
||||
@ -503,7 +503,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* support for ISO C2X strtol was added in 2.38
|
||||
/* zig patch: support for ISO C2X strtol was added in 2.38
|
||||
* glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
|
||||
*/
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
|
||||
@ -564,4 +564,4 @@
|
||||
#include <gnu/stubs.h>
|
||||
|
||||
|
||||
#endif /* features.h */
|
||||
#endif /* features.h */
|
||||
|
||||
3
lib/libc/include/generic-glibc/glob.h
vendored
3
lib/libc/include/generic-glibc/glob.h
vendored
@ -195,7 +195,8 @@ extern void globfree64 (glob64_t *__pglob) __THROW;
|
||||
|
||||
This function is not part of the interface specified by POSIX.2
|
||||
but several programs want to use it. */
|
||||
extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
|
||||
extern int glob_pattern_p (const char *__pattern, int __quote) __THROW
|
||||
__nonnull ((1));
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
5
lib/libc/include/generic-glibc/inttypes.h
vendored
5
lib/libc/include/generic-glibc/inttypes.h
vendored
@ -350,6 +350,11 @@ typedef struct
|
||||
/* Compute absolute value of N. */
|
||||
extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
|
||||
|
||||
|
||||
#if __GLIBC_USE (ISOC2Y)
|
||||
extern uintmax_t uimaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
|
||||
#endif
|
||||
|
||||
/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
|
||||
extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
|
||||
__THROW __attribute__ ((__const__));
|
||||
|
||||
4
lib/libc/include/generic-glibc/malloc.h
vendored
4
lib/libc/include/generic-glibc/malloc.h
vendored
@ -52,7 +52,7 @@ extern void *realloc (void *__ptr, size_t __size)
|
||||
__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
|
||||
|
||||
/*
|
||||
* reallocarray introduced in glibc 2.26
|
||||
* zig patch: reallocarray introduced in glibc 2.26
|
||||
* https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
|
||||
*/
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 26) || __GLIBC__ > 2
|
||||
@ -164,4 +164,4 @@ extern void malloc_stats (void) __THROW;
|
||||
extern int malloc_info (int __options, FILE *__fp) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
#endif /* malloc.h */
|
||||
#endif /* malloc.h */
|
||||
|
||||
3
lib/libc/include/generic-glibc/netinet/tcp.h
vendored
3
lib/libc/include/generic-glibc/netinet/tcp.h
vendored
@ -212,6 +212,9 @@ enum
|
||||
# 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 */
|
||||
# define TCPI_OPT_USEC_TS 64 /* usec timestamps */
|
||||
# define TCPI_OPT_TFO_CHILD 128 /* child from a Fast Open option on SYN */
|
||||
|
||||
|
||||
/* Values for tcpi_state. */
|
||||
enum tcp_ca_state
|
||||
|
||||
5
lib/libc/include/generic-glibc/pthread.h
vendored
5
lib/libc/include/generic-glibc/pthread.h
vendored
@ -1317,6 +1317,11 @@ extern int pthread_getcpuclockid (pthread_t __thread_id,
|
||||
__THROW __nonnull ((2));
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* Return the Linux TID for THREAD_ID. Returns -1 on failure. */
|
||||
extern pid_t pthread_gettid_np (pthread_t __thread_id);
|
||||
#endif
|
||||
|
||||
|
||||
/* Install handlers to be called when a new process is created with FORK.
|
||||
The PREPARE handler is called in the parent process just before performing
|
||||
|
||||
4
lib/libc/include/generic-glibc/resolv.h
vendored
4
lib/libc/include/generic-glibc/resolv.h
vendored
@ -171,7 +171,7 @@ __END_DECLS
|
||||
#define res_init __res_init
|
||||
#define res_isourserver __res_isourserver
|
||||
|
||||
/* In glibc 2.33 and earlier res_search, res_nsearch, res_query, res_nquery,
|
||||
/* zig patch: In glibc 2.33 and earlier res_search, res_nsearch, res_query, res_nquery,
|
||||
* res_querydomain, res_nquerydomain, dn_skipname, dn_comp, dn_expand were
|
||||
* #define'd to __res_search, __res_nsearch, etc. glibc 2.34 onwards removes
|
||||
* the macros and exposes the symbols directly. New glibc exposes compat
|
||||
@ -336,4 +336,4 @@ void res_nclose (res_state) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_RESOLV_H_ */
|
||||
#endif /* !_RESOLV_H_ */
|
||||
|
||||
6
lib/libc/include/generic-glibc/stdio.h
vendored
6
lib/libc/include/generic-glibc/stdio.h
vendored
@ -168,8 +168,11 @@ extern int renameat (int __oldfd, const char *__old, int __newfd,
|
||||
#ifdef __USE_GNU
|
||||
/* Flags for renameat2. */
|
||||
# define RENAME_NOREPLACE (1 << 0)
|
||||
# define AT_RENAME_NOREPLACE RENAME_NOREPLACE
|
||||
# define RENAME_EXCHANGE (1 << 1)
|
||||
# define AT_RENAME_EXCHANGE RENAME_EXCHANGE
|
||||
# define RENAME_WHITEOUT (1 << 2)
|
||||
# define AT_RENAME_WHITEOUT RENAME_WHITEOUT
|
||||
|
||||
/* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with
|
||||
additional flags. */
|
||||
@ -604,9 +607,6 @@ extern int fgetc_unlocked (FILE *__stream) __nonnull ((1));
|
||||
/* Write a character to STREAM.
|
||||
|
||||
These functions are possible cancellation points and therefore not
|
||||
marked with __THROW.
|
||||
|
||||
These functions is a possible cancellation point and therefore not
|
||||
marked with __THROW. */
|
||||
extern int fputc (int __c, FILE *__stream) __nonnull ((2));
|
||||
extern int putc (int __c, FILE *__stream) __nonnull ((2));
|
||||
|
||||
18
lib/libc/include/generic-glibc/stdio_ext.h
vendored
18
lib/libc/include/generic-glibc/stdio_ext.h
vendored
@ -43,43 +43,43 @@ __BEGIN_DECLS
|
||||
|
||||
/* Return the size of the buffer of FP in bytes currently in use by
|
||||
the given stream. */
|
||||
extern size_t __fbufsize (FILE *__fp) __THROW;
|
||||
extern size_t __fbufsize (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Return non-zero value iff the stream FP is opened readonly, or if the
|
||||
last operation on the stream was a read operation. */
|
||||
extern int __freading (FILE *__fp) __THROW;
|
||||
extern int __freading (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Return non-zero value iff the stream FP is opened write-only or
|
||||
append-only, or if the last operation on the stream was a write
|
||||
operation. */
|
||||
extern int __fwriting (FILE *__fp) __THROW;
|
||||
extern int __fwriting (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Return non-zero value iff stream FP is not opened write-only or
|
||||
append-only. */
|
||||
extern int __freadable (FILE *__fp) __THROW;
|
||||
extern int __freadable (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Return non-zero value iff stream FP is not opened read-only. */
|
||||
extern int __fwritable (FILE *__fp) __THROW;
|
||||
extern int __fwritable (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Return non-zero value iff the stream FP is line-buffered. */
|
||||
extern int __flbf (FILE *__fp) __THROW;
|
||||
extern int __flbf (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
|
||||
/* Discard all pending buffered I/O on the stream FP. */
|
||||
extern void __fpurge (FILE *__fp) __THROW;
|
||||
extern void __fpurge (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Return amount of output in bytes pending on a stream FP. */
|
||||
extern size_t __fpending (FILE *__fp) __THROW;
|
||||
extern size_t __fpending (FILE *__fp) __THROW __nonnull ((1));
|
||||
|
||||
/* Flush all line-buffered files. */
|
||||
extern void _flushlbf (void);
|
||||
|
||||
|
||||
/* Set locking status of stream FP to TYPE. */
|
||||
extern int __fsetlocking (FILE *__fp, int __type) __THROW;
|
||||
extern int __fsetlocking (FILE *__fp, int __type) __THROW __nonnull ((1));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
12
lib/libc/include/generic-glibc/stdlib.h
vendored
12
lib/libc/include/generic-glibc/stdlib.h
vendored
@ -654,7 +654,7 @@ extern int lcong48_r (unsigned short int __param[7],
|
||||
__THROW __nonnull ((1, 2));
|
||||
|
||||
/*
|
||||
* arc4random* symbols introduced in glibc 2.36:
|
||||
* zig patch: arc4random* symbols introduced in glibc 2.36:
|
||||
* https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=8420a65cd06874ee09518366b8fba746a557212a;hb=6f4e0fcfa2d2b0915816a3a3a1d48b4763a7dee2
|
||||
*/
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 36) || __GLIBC__ > 2
|
||||
@ -693,7 +693,7 @@ extern void *realloc (void *__ptr, size_t __size)
|
||||
extern void free (void *__ptr) __THROW;
|
||||
|
||||
/*
|
||||
* reallocarray introduced in glibc 2.26
|
||||
* zig patch: reallocarray introduced in glibc 2.26
|
||||
* https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
|
||||
*/
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 26) || __GLIBC__ > 2
|
||||
@ -997,6 +997,12 @@ __extension__ extern long long int llabs (long long int __x)
|
||||
__THROW __attribute__ ((__const__)) __wur;
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (ISOC2Y)
|
||||
extern unsigned int uabs (int __x) __THROW __attribute__ ((__const__)) __wur;
|
||||
extern unsigned long int ulabs (long int __x) __THROW __attribute__ ((__const__)) __wur;
|
||||
__extension__ extern unsigned long long int ullabs (long long int __x)
|
||||
__THROW __attribute__ ((__const__)) __wur;
|
||||
#endif
|
||||
|
||||
/* Return the `div_t', `ldiv_t' or `lldiv_t' representation
|
||||
of the value of NUMER over DENOM. */
|
||||
@ -1178,4 +1184,4 @@ extern int ttyslot (void) __THROW;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* stdlib.h */
|
||||
#endif /* stdlib.h */
|
||||
|
||||
4
lib/libc/include/generic-glibc/string.h
vendored
4
lib/libc/include/generic-glibc/string.h
vendored
@ -502,7 +502,7 @@ extern char *stpncpy (char *__restrict __dest,
|
||||
#endif
|
||||
|
||||
/*
|
||||
* strlcpy and strlcat introduced in glibc 2.38
|
||||
* zig patch: strlcpy and strlcat introduced in glibc 2.38
|
||||
* https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da
|
||||
*/
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
|
||||
@ -557,4 +557,4 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* string.h */
|
||||
#endif /* string.h */
|
||||
|
||||
42
lib/libc/include/generic-glibc/sys/hwprobe.h
vendored
42
lib/libc/include/generic-glibc/sys/hwprobe.h
vendored
@ -21,6 +21,7 @@
|
||||
#define _SYS_HWPROBE_H 1
|
||||
|
||||
#include <features.h>
|
||||
#include <sched.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#ifdef __has_include
|
||||
@ -63,22 +64,39 @@ struct riscv_hwprobe {
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern int __riscv_hwprobe (struct riscv_hwprobe *__pairs, size_t __pair_count,
|
||||
size_t __cpu_count, unsigned long int *__cpus,
|
||||
unsigned int __flags)
|
||||
__nonnull ((1)) __wur
|
||||
__fortified_attr_access (__read_write__, 1, 2)
|
||||
__fortified_attr_access (__read_only__, 4, 3);
|
||||
#if defined __cplusplus || !__GNUC_PREREQ (2, 7)
|
||||
# define __RISCV_HWPROBE_CPUS_TYPE cpu_set_t *
|
||||
#else
|
||||
/* The fourth argument to __riscv_hwprobe should be a null pointer or a
|
||||
pointer to a cpu_set_t (either the fixed-size type or allocated with
|
||||
CPU_ALLOC). However, early versions of this header file used the
|
||||
argument type unsigned long int *. The transparent union allows
|
||||
the argument to be either cpu_set_t * or unsigned long int * for
|
||||
compatibility. The older header file requiring unsigned long int *
|
||||
can be identified by the lack of the __RISCV_HWPROBE_CPUS_TYPE macro.
|
||||
In C++ and with compilers that do not support transparent unions, the
|
||||
argument type must be cpu_set_t *. */
|
||||
typedef union {
|
||||
cpu_set_t *__cs;
|
||||
unsigned long int *__ul;
|
||||
} __RISCV_HWPROBE_CPUS_TYPE __attribute__ ((__transparent_union__));
|
||||
# define __RISCV_HWPROBE_CPUS_TYPE __RISCV_HWPROBE_CPUS_TYPE
|
||||
#endif
|
||||
|
||||
/* A pointer to the __riscv_hwprobe vDSO function is passed as the second
|
||||
extern int __riscv_hwprobe (struct riscv_hwprobe *__pairs,
|
||||
size_t __pair_count, size_t __cpusetsize,
|
||||
__RISCV_HWPROBE_CPUS_TYPE __cpus,
|
||||
unsigned int __flags)
|
||||
__THROW __nonnull ((1)) __attr_access ((__read_write__, 1, 2));
|
||||
|
||||
/* A pointer to the __riscv_hwprobe function is passed as the second
|
||||
argument to ifunc selector routines. Include a function pointer type for
|
||||
convenience in calling the function in those settings. */
|
||||
typedef int (*__riscv_hwprobe_t) (struct riscv_hwprobe *__pairs, size_t __pair_count,
|
||||
size_t __cpu_count, unsigned long int *__cpus,
|
||||
typedef int (*__riscv_hwprobe_t) (struct riscv_hwprobe *__pairs,
|
||||
size_t __pair_count, size_t __cpusetsize,
|
||||
__RISCV_HWPROBE_CPUS_TYPE __cpus,
|
||||
unsigned int __flags)
|
||||
__nonnull ((1)) __wur
|
||||
__fortified_attr_access (__read_write__, 1, 2)
|
||||
__fortified_attr_access (__read_only__, 4, 3);
|
||||
__nonnull ((1)) __attr_access ((__read_write__, 1, 2));
|
||||
|
||||
/* Helper function usable from ifunc selectors that probes a single key. */
|
||||
static __inline int
|
||||
|
||||
65
lib/libc/include/generic-glibc/sys/ifunc.h
vendored
65
lib/libc/include/generic-glibc/sys/ifunc.h
vendored
@ -19,24 +19,77 @@
|
||||
#ifndef _SYS_IFUNC_H
|
||||
#define _SYS_IFUNC_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
/* A second argument is passed to the ifunc resolver. */
|
||||
#define _IFUNC_ARG_HWCAP (1ULL << 62)
|
||||
|
||||
/* The prototype of a gnu indirect function resolver on AArch64 is
|
||||
/* Maximum number of HWCAP elements that are currently supported. */
|
||||
#define _IFUNC_HWCAP_MAX 4
|
||||
|
||||
/* The prototype of a GNU indirect function resolver on AArch64 is
|
||||
|
||||
ElfW(Addr) ifunc_resolver (uint64_t, const uint64_t *);
|
||||
|
||||
The following prototype is also compatible:
|
||||
|
||||
ElfW(Addr) ifunc_resolver (uint64_t, const __ifunc_arg_t *);
|
||||
|
||||
the first argument should have the _IFUNC_ARG_HWCAP bit set and
|
||||
the remaining bits should match the AT_HWCAP settings. */
|
||||
The first argument might have the _IFUNC_ARG_HWCAP bit set and
|
||||
the remaining bits should match the AT_HWCAP settings.
|
||||
|
||||
If the _IFUNC_ARG_HWCAP bit is set in the first argument, then
|
||||
the second argument is passed to the resolver function. In
|
||||
this case, the second argument is a const pointer to a buffer
|
||||
that allows to access all available HWCAP elements.
|
||||
|
||||
This buffer has its size in bytes at offset 0. The HWCAP elements
|
||||
are available at offsets 8, 16, 24, 32... respectively for AT_HWCAP,
|
||||
AT_HWCAP2, AT_HWCAP3, AT_HWCAP4... (these offsets are multiples of
|
||||
sizeof (unsigned long)).
|
||||
|
||||
Indirect function resolvers must check availability of HWCAP
|
||||
elements at runtime before accessing them using the size of the
|
||||
buffer. */
|
||||
|
||||
/* Second argument to an ifunc resolver. */
|
||||
struct __ifunc_arg_t
|
||||
{
|
||||
unsigned long _size; /* Size of the struct, so it can grow. */
|
||||
unsigned long _size; /* Size of the struct, so it can grow. */
|
||||
unsigned long _hwcap;
|
||||
unsigned long _hwcap2;
|
||||
unsigned long _hwcap2; /* End of 1st published struct. */
|
||||
unsigned long _hwcap3;
|
||||
unsigned long _hwcap4; /* End of 2nd published struct. */
|
||||
};
|
||||
|
||||
typedef struct __ifunc_arg_t __ifunc_arg_t;
|
||||
|
||||
/* Constants for IDs of HWCAP elements to be used with the
|
||||
__ifunc_hwcap function below. */
|
||||
enum
|
||||
{
|
||||
_IFUNC_ARG_AT_HWCAP = 1,
|
||||
_IFUNC_ARG_AT_HWCAP2 = 2,
|
||||
_IFUNC_ARG_AT_HWCAP3 = 3,
|
||||
_IFUNC_ARG_AT_HWCAP4 = 4,
|
||||
};
|
||||
|
||||
/* A helper function to obtain HWCAP element by its ID from the
|
||||
parameters ARG0 and ARG1 passed to the ifunc resolver. Note that
|
||||
ID 1 corresponds to AT_HWCAP, ID 2 corresponds to AT_HWCAP2, etc.
|
||||
If there is no element available for the requested ID then 0 is
|
||||
returned. If ID doesn't much any supported AT_HWCAP{,2,...} value,
|
||||
then 0 is also returned. */
|
||||
static __inline unsigned long __attribute__ ((unused, always_inline))
|
||||
__ifunc_hwcap (unsigned long __id,
|
||||
unsigned long __arg0, const unsigned long *__arg1)
|
||||
{
|
||||
if (__glibc_likely (__arg0 & _IFUNC_ARG_HWCAP))
|
||||
{
|
||||
const unsigned long size = __arg1[0];
|
||||
const unsigned long offset = __id * sizeof (unsigned long);
|
||||
return offset < size && __id > 0 ? __arg1[__id] : 0;
|
||||
}
|
||||
return __id == 1 ? __arg0 : 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
2
lib/libc/include/generic-glibc/sys/mount.h
vendored
2
lib/libc/include/generic-glibc/sys/mount.h
vendored
@ -121,7 +121,7 @@ enum
|
||||
MS_ACTIVE = 1 << 30,
|
||||
#define MS_ACTIVE MS_ACTIVE
|
||||
#undef MS_NOUSER
|
||||
MS_NOUSER = 1 << 31
|
||||
MS_NOUSER = 1U << 31
|
||||
#define MS_NOUSER MS_NOUSER
|
||||
};
|
||||
|
||||
|
||||
@ -54,8 +54,4 @@ struct ttychars {
|
||||
char tc_lnextc; /* literal next character */
|
||||
};
|
||||
|
||||
#ifdef __USE_OLD_TTY
|
||||
#include <sys/ttydefaults.h> /* to pick up character defaults */
|
||||
#endif
|
||||
|
||||
#endif /* sys/ttychars.h */
|
||||
6
lib/libc/include/generic-glibc/termio.h
vendored
6
lib/libc/include/generic-glibc/termio.h
vendored
@ -1,6 +0,0 @@
|
||||
/* Compatible <termio.h> for old `struct termio' ioctl interface.
|
||||
This is obsolete; use the POSIX.1 `struct termios' interface
|
||||
defined in <termios.h> instead. */
|
||||
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
20
lib/libc/include/generic-glibc/termios.h
vendored
20
lib/libc/include/generic-glibc/termios.h
vendored
@ -61,6 +61,26 @@ extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __THROW;
|
||||
extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW;
|
||||
#endif
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* Interfaces that are explicitly numeric representations of baud rates */
|
||||
typedef speed_t baud_t;
|
||||
#define BAUD_MAX SPEED_MAX
|
||||
|
||||
/* Return the output baud rate stored in *TERMIOS_P. */
|
||||
extern baud_t cfgetobaud (const struct termios *__termios_p) __THROW;
|
||||
|
||||
/* Return the input baud rate stored in *TERMIOS_P. */
|
||||
extern baud_t cfgetibaud (const struct termios *__termios_p) __THROW;
|
||||
|
||||
/* Set the output baud rate stored in *TERMIOS_P to BAUD. */
|
||||
extern int cfsetobaud (struct termios *__termios_p, baud_t __baud) __THROW;
|
||||
|
||||
/* Set the input baud rate stored in *TERMIOS_P to BAUD. */
|
||||
extern int cfsetibaud (struct termios *__termios_p, baud_t __baud) __THROW;
|
||||
|
||||
/* Set both the input and output baud rates in *TERMIOS_OP to BAUD. */
|
||||
extern int cfsetbaud (struct termios *__termios_p, baud_t __baud) __THROW;
|
||||
#endif
|
||||
|
||||
/* Put the state of FD into *TERMIOS_P. */
|
||||
extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW;
|
||||
|
||||
18
lib/libc/include/generic-glibc/tgmath.h
vendored
18
lib/libc/include/generic-glibc/tgmath.h
vendored
@ -923,6 +923,24 @@
|
||||
/* Return the cube root of X. */
|
||||
#define cbrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, cbrt)
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
|
||||
/* Return 1+X to the Y power. */
|
||||
# define compoundn(Val1, Val2) \
|
||||
__TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, compoundn)
|
||||
|
||||
/* Return X to the Y power. */
|
||||
# define pown(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, pown)
|
||||
|
||||
/* Return X to the Y power. */
|
||||
# define powr(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, powr)
|
||||
|
||||
/* Return the Yth root of X. */
|
||||
# define rootn(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, rootn)
|
||||
|
||||
/* Return 1/sqrt(X). */
|
||||
# define rsqrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, rsqrt)
|
||||
#endif
|
||||
|
||||
|
||||
/* Nearest integer, absolute value, and remainder functions. */
|
||||
|
||||
|
||||
2
lib/libc/include/generic-glibc/unistd.h
vendored
2
lib/libc/include/generic-glibc/unistd.h
vendored
@ -1231,4 +1231,4 @@ extern int close_range (unsigned int __fd, unsigned int __max_fd,
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* unistd.h */
|
||||
#endif /* unistd.h */
|
||||
@ -31,18 +31,6 @@ struct winsize
|
||||
unsigned short int ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 8
|
||||
struct termio
|
||||
{
|
||||
unsigned short int c_iflag; /* input mode flags */
|
||||
unsigned short int c_oflag; /* output mode flags */
|
||||
unsigned short int c_cflag; /* control mode flags */
|
||||
unsigned short int c_lflag; /* local mode flags */
|
||||
char c_line; /* line discipline */
|
||||
/* Yes, this is really NCCS. */
|
||||
unsigned char c_cc[32 /* NCCS */]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001 /* line enable */
|
||||
#define TIOCM_DTR 0x002 /* data terminal ready */
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
/* struct termios definition. Linux/mips version.
|
||||
Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TERMIOS_H
|
||||
# error "Never include <bits/termios-struct.h> directly; use <termios.h> 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 */
|
||||
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
|
||||
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
|
||||
};
|
||||
@ -32,17 +32,6 @@ struct winsize
|
||||
unsigned short int ws_ypixel;
|
||||
};
|
||||
|
||||
#define NCC 10
|
||||
struct termio
|
||||
{
|
||||
unsigned short int c_iflag; /* input mode flags */
|
||||
unsigned short int c_oflag; /* output mode flags */
|
||||
unsigned short int c_cflag; /* control mode flags */
|
||||
unsigned short int c_lflag; /* local mode flags */
|
||||
unsigned char c_line; /* line discipline */
|
||||
unsigned char c_cc[NCC]; /* control characters */
|
||||
};
|
||||
|
||||
/* modem lines */
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
|
||||
@ -35,5 +35,7 @@
|
||||
#define CLOCAL 00100000
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define ADDRB 04000000000
|
||||
# define ADDRB 04000000000
|
||||
# define CMSPAR 010000000000 /* Mark or space (stick) parity. */
|
||||
# define CRTSCTS 020000000000 /* Flow control. */
|
||||
#endif
|
||||
@ -17,29 +17,29 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TERMIOS_H
|
||||
# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
|
||||
# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> instead."
|
||||
#endif
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define CBAUD 0000377
|
||||
# define CBAUDEX 0000020
|
||||
# define CMSPAR 010000000000 /* mark or space (stick) parity */
|
||||
# define CRTSCTS 020000000000 /* flow control */
|
||||
# define CBAUD 000000377
|
||||
# define CBAUDEX 000000020
|
||||
# define CIBAUD 077600000
|
||||
# define IBSHIFT 16
|
||||
#endif
|
||||
|
||||
#define B57600 00020
|
||||
#define B115200 00021
|
||||
#define B230400 00022
|
||||
#define B460800 00023
|
||||
#define B500000 00024
|
||||
#define B576000 00025
|
||||
#define B921600 00026
|
||||
#define B1000000 00027
|
||||
#define B1152000 00030
|
||||
#define B1500000 00031
|
||||
#define B2000000 00032
|
||||
#define B2500000 00033
|
||||
#define B3000000 00034
|
||||
#define B3500000 00035
|
||||
#define B4000000 00036
|
||||
#define __MAX_BAUD B4000000
|
||||
#define __B57600 00020
|
||||
#define __B115200 00021
|
||||
#define __B230400 00022
|
||||
#define __B460800 00023
|
||||
#define __B500000 00024
|
||||
#define __B576000 00025
|
||||
#define __B921600 00026
|
||||
#define __B1000000 00027
|
||||
#define __B1152000 00030
|
||||
#define __B1500000 00031
|
||||
#define __B2000000 00032
|
||||
#define __B2500000 00033
|
||||
#define __B3000000 00034
|
||||
#define __B3500000 00035
|
||||
#define __B4000000 00036
|
||||
#define __BOTHER 00037
|
||||
@ -17,30 +17,29 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TERMIOS_H
|
||||
# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
|
||||
# error "Never include <bits/termios-cbaud.h> directly; use <termios.h> instead."
|
||||
#endif
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# define CBAUD 0x0000100f
|
||||
# define CBAUDEX 0x00001000
|
||||
# define CIBAUD 0x100f0000 /* input baud rate (not used) */
|
||||
# define CMSPAR 0x40000000 /* mark or space (stick) parity */
|
||||
# define CRTSCTS 0x80000000 /* flow control */
|
||||
# define CIBAUD 0x100f0000 /* input baud rate */
|
||||
# define IBSHIFT 16
|
||||
#endif
|
||||
|
||||
#define B57600 0x00001001
|
||||
#define B115200 0x00001002
|
||||
#define B230400 0x00001003
|
||||
#define B460800 0x00001004
|
||||
#define B76800 0x00001005
|
||||
#define B153600 0x00001006
|
||||
#define B307200 0x00001007
|
||||
#define B614400 0x00001008
|
||||
#define B921600 0x00001009
|
||||
#define B500000 0x0000100a
|
||||
#define B576000 0x0000100b
|
||||
#define B1000000 0x0000100c
|
||||
#define B1152000 0x0000100d
|
||||
#define B1500000 0x0000100e
|
||||
#define B2000000 0x0000100f
|
||||
#define __MAX_BAUD B2000000
|
||||
#define __B57600 0x00001001
|
||||
#define __B115200 0x00001002
|
||||
#define __B230400 0x00001003
|
||||
#define __B460800 0x00001004
|
||||
#define __B76800 0x00001005
|
||||
#define __B153600 0x00001006
|
||||
#define __B307200 0x00001007
|
||||
#define __B614400 0x00001008
|
||||
#define __B921600 0x00001009
|
||||
#define __B500000 0x0000100a
|
||||
#define __B576000 0x0000100b
|
||||
#define __B1000000 0x0000100c
|
||||
#define __B1152000 0x0000100d
|
||||
#define __B1500000 0x0000100e
|
||||
#define __B2000000 0x0000100f
|
||||
#define __BOTHER 0x00001000
|
||||
@ -1,34 +0,0 @@
|
||||
/* struct termios definition. Linux/sparc version.
|
||||
Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TERMIOS_H
|
||||
# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
|
||||
#endif
|
||||
|
||||
#define NCCS 17
|
||||
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 */
|
||||
#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
|
||||
#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
|
||||
};
|
||||
10
lib/libc/include/x86-linux-gnu/bits/floatn.h
vendored
10
lib/libc/include/x86-linux-gnu/bits/floatn.h
vendored
@ -25,11 +25,15 @@
|
||||
floating-point type with the IEEE 754 binary128 format, and this
|
||||
glibc includes corresponding *f128 interfaces for it. The required
|
||||
libgcc support was added some time after the basic compiler
|
||||
support, for x86_64 and x86. */
|
||||
support, for x86_64 and x86. Intel SYCL compiler doesn't support
|
||||
_Float128: https://github.com/intel/llvm/issues/16903
|
||||
*/
|
||||
#if (defined __x86_64__ \
|
||||
? __GNUC_PREREQ (4, 3) \
|
||||
: (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \
|
||||
|| __glibc_clang_prereq (3, 4)
|
||||
|| (__glibc_clang_prereq (3, 9) \
|
||||
&& (!defined __INTEL_LLVM_COMPILER \
|
||||
|| !defined SYCL_LANGUAGE_VERSION))
|
||||
# define __HAVE_FLOAT128 1
|
||||
#else
|
||||
# define __HAVE_FLOAT128 0
|
||||
@ -89,7 +93,7 @@ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
|
||||
/* The type _Float128 exists only since GCC 7.0. */
|
||||
# if !__GNUC_PREREQ (7, 0) \
|
||||
|| (defined __cplusplus && !__GNUC_PREREQ (13, 0)) \
|
||||
|| __glibc_clang_prereq (3, 4)
|
||||
|| __glibc_clang_prereq (3, 9)
|
||||
typedef __float128 _Float128;
|
||||
# endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user