Merge pull request #24640 from alexrp/glibc-2.42

glibc 2.42
This commit is contained in:
Alex Rønne Petersen 2025-08-01 19:17:56 +02:00 committed by GitHub
commit a00edbd52d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
77 changed files with 817 additions and 612 deletions

Binary file not shown.

View File

@ -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. */

View File

@ -15,6 +15,19 @@
# define ELF_NOTE_NEXT_OFFSET(namesz, descsz, align) \
ALIGN_UP (ELF_NOTE_DESC_OFFSET ((namesz), (align)) + (descsz), (align))
# ifdef HIDDEN_VAR_NEEDS_DYNAMIC_RELOC
# define DL_ADDRESS_WITHOUT_RELOC(expr) (expr)
# else
/* Evaluate EXPR without run-time relocation for it. EXPR should be an
array, an address of an object, or a string literal. */
# define DL_ADDRESS_WITHOUT_RELOC(expr) \
({ \
__auto_type _result = (expr); \
asm ("" : "+r" (_result)); \
_result; \
})
# endif
/* Some information which is not meant for the public and therefore not
in <elf.h>. */
# include <dl-dtprocnum.h>

View File

@ -155,7 +155,7 @@
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \
__attribute_copy__ (name);
/* Zig patch. weak_hidden_alias was removed from glibc v2.36 (v2.37?), Zig
/* zig patch: weak_hidden_alias was removed from glibc v2.36 (v2.37?), Zig
needs it for the v2.32 and earlier {f,l,}stat wrappers, so only include
in this header for 2.32 and earlier. */
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 32) || __GLIBC__ < 2
@ -220,7 +220,7 @@
#define __make_section_unallocated(section_string) \
asm (".section " section_string "\n\t.previous");
/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
/* Tacking on "\n\t#" to the section name makes gcc put its bogus
section attributes on what looks like a comment to the assembler. */
#ifdef HAVE_SECTION_QUOTES
# define __sec_comment "\"\n\t#\""
@ -280,7 +280,7 @@ for linking")
/*
*/
#ifdef HAVE_GNU_RETAIN
@ -807,7 +807,7 @@ for linking")
#define libm_ifunc_init()
#define libm_ifunc(name, expr) \
__ifunc (name, name, expr, void, libm_ifunc_init)
/* These macros facilitate sharing source files with gnulib.
They are here instead of sys/cdefs.h because they should not be

View File

@ -368,6 +368,21 @@ struct abort_msg_s
extern struct abort_msg_s *__abort_msg;
libc_hidden_proto (__abort_msg)
enum readonly_error_type
{
readonly_noerror,
readonly_area_writable,
readonly_procfs_inaccessible,
readonly_procfs_open_fail,
};
extern enum readonly_error_type __readonly_area (const void *ptr,
size_t size)
attribute_hidden;
extern enum readonly_error_type __readonly_area_fallback (const void *ptr,
size_t size)
attribute_hidden;
# if IS_IN (rtld)
extern __typeof (unsetenv) unsetenv attribute_hidden;
extern __typeof (__strtoul_internal) __strtoul_internal attribute_hidden;

View File

@ -168,7 +168,7 @@ typedef __pid_t pid_t;
#endif
/* fcntl was a simple symbol until glibc 2.27 inclusive. glibc 2.28 onwards
/* zig patch: fcntl was a simple symbol until glibc 2.27 inclusive. glibc 2.28 onwards
* re-defines it to fcntl64 (via #define) if _FILE_OFFSET_BITS == 64. */
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 28) || __GLIBC__ > 2
/* Do the file control operation described by CMD on FD.
@ -288,16 +288,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

View File

@ -217,7 +217,7 @@ 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. */
/* Zig patch: Don't check __LIBC here because it breaks fstatat.c on x86. */
/* zig patch: Don't check __LIBC here because it breaks fstatat.c on x86. */
#if __TIMESIZE == 64
# define __time64_t __time_t
#elif __TIMESIZE != 64

View File

@ -985,6 +985,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. */

View File

@ -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

View File

@ -54,8 +54,8 @@ _start:
mov x5, x0
/* Load argc and a pointer to argv */
ldr PTR_REG (1), [sp, #0]
add x2, sp, #PTR_SIZE
ldr x1, [sp, #0]
add x2, sp, 8
/* Setup stack limit in argument register */
mov x6, sp
@ -63,13 +63,13 @@ _start:
#ifdef PIC
# ifdef SHARED
adrp x0, :got:main
ldr PTR_REG (0), [x0, #:got_lo12:main]
ldr x0, [x0, #:got_lo12:main]
adrp x3, :got:__libc_csu_init
ldr PTR_REG (3), [x3, #:got_lo12:__libc_csu_init]
ldr x3, [x3, #:got_lo12:__libc_csu_init]
adrp x4, :got:__libc_csu_fini
ldr PTR_REG (4), [x4, #:got_lo12:__libc_csu_fini]
ldr x4, [x4, #:got_lo12:__libc_csu_fini]
# else
adrp x0, __wrap_main
add x0, x0, :lo12:__wrap_main
@ -80,9 +80,18 @@ _start:
# endif
#else
/* Set up the other arguments in registers */
MOVL (0, main)
MOVL (3, __libc_csu_init)
MOVL (4, __libc_csu_fini)
movz x0, :abs_g3:main
movk x0, :abs_g2_nc:main
movk x0, :abs_g1_nc:main
movk x0, :abs_g0_nc:main
movz x3, :abs_g3:__libc_csu_init
movk x3, :abs_g2_nc:__libc_csu_init
movk x3, :abs_g1_nc:__libc_csu_init
movk x3, :abs_g0_nc:__libc_csu_init
movz x4, :abs_g3:__libc_csu_fini
movk x4, :abs_g2_nc:__libc_csu_fini
movk x4, :abs_g1_nc:__libc_csu_fini
movk x4, :abs_g0_nc:__libc_csu_fini
#endif
/* __libc_start_main (main, argc, argv, init, fini, rtld_fini,

View File

@ -70,8 +70,8 @@ ENTRY(_start)
mov x5, x0
/* Load argc and a pointer to argv */
ldr PTR_REG (1), [sp, #0]
add x2, sp, #PTR_SIZE
ldr x1, [sp, #0]
add x2, sp, 8
/* Setup stack limit in argument register */
mov x6, sp
@ -79,14 +79,16 @@ ENTRY(_start)
#ifdef PIC
# ifdef SHARED
adrp x0, :got:main
ldr PTR_REG (0), [x0, #:got_lo12:main]
ldr x0, [x0, #:got_lo12:main]
# else
adrp x0, __wrap_main
add x0, x0, :lo12:__wrap_main
# endif
#else
/* Set up the other arguments in registers */
MOVL (0, main)
movz x0, :abs_g3:main
movk x0, :abs_g2_nc:main
movk x0, :abs_g1_nc:main
movk x0, :abs_g0_nc:main
#endif
mov x3, #0 /* Used to be init. */
mov x4, #0 /* Used to be fini. */
@ -106,7 +108,7 @@ ENTRY(_start)
because crt1.o and rcrt1.o share code and the later must avoid the
use of GOT relocations before __libc_start_main is called. */
__wrap_main:
BTI_C
bti c
b main
#endif
END(_start)

View File

@ -21,59 +21,15 @@
#include <sysdeps/generic/sysdep.h>
#ifdef __LP64__
# define AARCH64_R(NAME) R_AARCH64_ ## NAME
# define PTR_REG(n) x##n
# define PTR_LOG_SIZE 3
# define PTR_ARG(n)
# define SIZE_ARG(n)
#else
# define AARCH64_R(NAME) R_AARCH64_P32_ ## NAME
# define PTR_REG(n) w##n
# define PTR_LOG_SIZE 2
# define PTR_ARG(n) mov w##n, w##n
# define SIZE_ARG(n) mov w##n, w##n
#endif
#define PTR_SIZE (1<<PTR_LOG_SIZE)
#ifndef __ASSEMBLER__
/* Strip pointer authentication code from pointer p. */
static inline void *
strip_pac (void *p)
{
register void *ra asm ("x30") = (p);
asm ("hint 7 // xpaclri" : "+r"(ra));
return ra;
}
/* This is needed when glibc is built with -mbranch-protection=pac-ret
with a gcc that is affected by PR target/94891. */
# if HAVE_AARCH64_PAC_RET
# undef RETURN_ADDRESS
# define RETURN_ADDRESS(n) strip_pac (__builtin_return_address (n))
# endif
#endif
#ifdef __ASSEMBLER__
/* CFI directive for return address. */
#define cfi_negate_ra_state .cfi_negate_ra_state
/* Syntactic details of assembler. */
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
/* Branch Target Identitication support. */
#if HAVE_AARCH64_BTI
# define BTI_C hint 34
# define BTI_J hint 36
#else
# define BTI_C nop
# define BTI_J nop
#endif
/* Return address signing support (pac-ret). */
#define PACIASP hint 25
#define AUTIASP hint 29
/* Guarded Control Stack support. */
#define CHKFEAT_X16 hint 40
#define MRS_GCSPR(x) mrs x, s3_3_c2_c5_1
@ -103,11 +59,7 @@ strip_pac (void *p)
/* Add GNU property note with the supported features to all asm code
where sysdep.h is included. */
#if HAVE_AARCH64_BTI && HAVE_AARCH64_PAC_RET
GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC|FEATURE_1_GCS)
#elif HAVE_AARCH64_BTI
GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
#endif
/* Define an entry point visible from C. */
#define ENTRY(name) \
@ -116,7 +68,7 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
.p2align 6; \
C_LABEL(name) \
cfi_startproc; \
BTI_C; \
bti c; \
CALL_MCOUNT
/* Define an entry point visible from C. */
@ -126,7 +78,7 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
.p2align align; \
C_LABEL(name) \
cfi_startproc; \
BTI_C; \
bti c; \
CALL_MCOUNT
/* Define an entry point visible from C with a specified alignment and
@ -143,7 +95,7 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
.endr; \
C_LABEL(name) \
cfi_startproc; \
BTI_C; \
bti c; \
CALL_MCOUNT
#undef END
@ -195,33 +147,6 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_GCS)
# define L(name) .L##name
#endif
/* Load or store to/from a pc-relative EXPR into/from R, using T.
Note R and T are register numbers and not register names. */
#define LDST_PCREL(OP, R, T, EXPR) \
adrp x##T, EXPR; \
OP PTR_REG (R), [x##T, #:lo12:EXPR]; \
/* Load or store to/from a got-relative EXPR into/from R, using T.
Note R and T are register numbers and not register names. */
#define LDST_GLOBAL(OP, R, T, EXPR) \
adrp x##T, :got:EXPR; \
ldr PTR_REG (T), [x##T, #:got_lo12:EXPR]; \
OP PTR_REG (R), [x##T];
/* Load an immediate into R.
Note R is a register number and not a register name. */
#ifdef __LP64__
# define MOVL(R, NAME) \
movz PTR_REG (R), #:abs_g3:NAME; \
movk PTR_REG (R), #:abs_g2_nc:NAME; \
movk PTR_REG (R), #:abs_g1_nc:NAME; \
movk PTR_REG (R), #:abs_g0_nc:NAME;
#else
# define MOVL(R, NAME) \
movz PTR_REG (R), #:abs_g1:NAME; \
movk PTR_REG (R), #:abs_g0_nc:NAME;
#endif
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */

View File

@ -45,6 +45,7 @@
# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
# define cfi_offset(reg, off) .cfi_offset reg, off
# define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
# define cfi_val_offset(reg, off) .cfi_val_offset reg, off
# define cfi_register(r1, r2) .cfi_register r1, r2
# define cfi_return_column(reg) .cfi_return_column reg
# define cfi_restore(reg) .cfi_restore reg
@ -74,6 +75,8 @@
".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
# define CFI_REL_OFFSET(reg, off) \
".cfi_rel_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
# define CFI_VAL_OFFSET(reg, off) \
".cfi_val_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
# define CFI_REGISTER(r1, r2) \
".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
# define CFI_RETURN_COLUMN(reg) \

View File

@ -75,7 +75,6 @@
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
const pthread_mutexattr_t *__mutex_attr);
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
libc_hidden_proto (__pthread_mutex_destroy)
@ -91,75 +90,47 @@ libc_hidden_proto (__pthread_mutexattr_init)
extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
libc_hidden_proto (__pthread_mutexattr_destroy)
extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
int __kind);
extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
const pthread_rwlockattr_t *__attr);
libc_hidden_proto (__pthread_rwlock_init)
extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_destroy)
extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_rdlock)
extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_tryrdlock)
extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_wrlock)
extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_trywrlock)
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
libc_hidden_proto (__pthread_rwlock_unlock)
extern int __pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void));
libc_hidden_proto (__pthread_once);
extern int __pthread_atfork (void (*__prepare) (void),
void (*__parent) (void),
void (*__child) (void));
extern int __pthread_setcancelstate (int state, int *oldstate);
libc_hidden_proto (__pthread_setcancelstate)
/* Make the pthread functions weak so that we can elide them from
single-threaded processes. */
#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
# ifdef weak_extern
weak_extern (__pthread_mutex_init)
weak_extern (__pthread_mutex_destroy)
weak_extern (__pthread_mutex_lock)
weak_extern (__pthread_mutex_trylock)
weak_extern (__pthread_mutex_unlock)
weak_extern (__pthread_mutexattr_settype)
weak_extern (__pthread_rwlock_init)
weak_extern (__pthread_rwlock_destroy)
weak_extern (__pthread_rwlock_rdlock)
weak_extern (__pthread_rwlock_tryrdlock)
weak_extern (__pthread_rwlock_wrlock)
weak_extern (__pthread_rwlock_trywrlock)
weak_extern (__pthread_rwlock_unlock)
weak_extern (__pthread_key_create)
weak_extern (__pthread_setspecific)
weak_extern (__pthread_getspecific)
weak_extern (__pthread_once)
weak_extern (__pthread_initialize)
weak_extern (__pthread_atfork)
weak_extern (__pthread_setcancelstate)
# else
# pragma weak __pthread_mutex_init
# pragma weak __pthread_mutex_destroy
# pragma weak __pthread_mutex_lock
# pragma weak __pthread_mutex_trylock
# pragma weak __pthread_mutex_unlock
# pragma weak __pthread_mutexattr_settype
# pragma weak __pthread_rwlock_destroy
# pragma weak __pthread_rwlock_rdlock
# pragma weak __pthread_rwlock_tryrdlock
# pragma weak __pthread_rwlock_wrlock
# pragma weak __pthread_rwlock_trywrlock
# pragma weak __pthread_rwlock_unlock
# pragma weak __pthread_key_create
# pragma weak __pthread_setspecific
# pragma weak __pthread_getspecific
# pragma weak __pthread_once
# pragma weak __pthread_initialize
# pragma weak __pthread_atfork
# pragma weak __pthread_setcancelstate
# endif
#endif

View File

@ -20,6 +20,11 @@
/* Get the Mach definitions of ENTRY and kernel_trap. */
#include <mach/machine/syscall_sw.h>
/* This macro is defined in Mach system headers, but string functions use it
with different definitions depending on whether being compiled for
wide-characters or not. */
#undef P2ALIGN
/* The Mach definitions assume underscores should be prepended to
symbol names. Redefine them to do so only when appropriate. */
#undef EXT

View File

@ -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

View File

@ -35,6 +35,7 @@
#include <sysdep.h>
#define FRAME_SIZE 104
.section ".text"
.align 4
@ -48,12 +49,12 @@ _start:
/* Terminate the stack frame, and reserve space for functions to
drop their arguments. */
mov %g0, %fp
sub %sp, 6*4, %sp
sub %sp, FRAME_SIZE, %sp
/* Extract the arguments and environment as encoded on the stack. The
argument info starts after one register window (16 words) past the SP. */
ld [%sp+22*4], %o1
add %sp, 23*4, %o2
ld [%sp+168], %o1
add %sp, 172, %o2
/* Load the addresses of the user entry points. */
#ifndef PIC
@ -73,6 +74,10 @@ _start:
be NULL. */
mov %g1, %o5
/* Provide the highest stack address to update the __libc_stack_end (used
to enable executable stacks if required). */
st %sp, [%sp+23*4]
/* Let libc do the rest of the initialization, and call main. */
call __libc_start_main
nop

View File

@ -74,6 +74,10 @@ _start:
be NULL. */
mov %g1, %o5
/* Provide the highest stack address to update the __libc_stack_end (used
to enable executable stacks if required). */
stx %sp, [%sp+STACK_BIAS+22*8]
/* Let libc do the rest of the initialization, and call main. */
call __libc_start_main
nop

View File

@ -152,13 +152,8 @@
#else /* not __ASSEMBLER__ */
# ifdef __LP64__
# define VDSO_NAME "LINUX_2.6.39"
# define VDSO_HASH 123718537
# else
# define VDSO_NAME "LINUX_4.9"
# define VDSO_HASH 61765625
# endif
# define VDSO_NAME "LINUX_2.6.39"
# define VDSO_HASH 123718537
/* List of system calls which are supported as vsyscalls. */
# define HAVE_CLOCK_GETRES64_VSYSCALL "__kernel_clock_getres"

View File

@ -54,6 +54,10 @@
configurations). */
#define __ASSUME_SET_ROBUST_LIST 1
/* The termios2 interface was introduced across all architectures except
Alpha in kernel 2.6.22. */
#define __ASSUME_TERMIOS2 1
/* Support for various CLOEXEC and NONBLOCK flags was added in
2.6.27. */
#define __ASSUME_IN_NONBLOCK 1

View File

@ -145,11 +145,12 @@
# define HAVE_CLOCK_GETRES64_VSYSCALL "__vdso_clock_getres"
# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime"
# define HAVE_GETTIMEOFDAY_VSYSCALL "__vdso_gettimeofday"
# define HAVE_GETRANDOM_VSYSCALL "__vdso_getrandom"
# else
# define VDSO_NAME "LINUX_5.4"
# define VDSO_HASH 61765876
/* RV32 does not support the gettime VDSO syscalls. */
/* RV32 does not support the gettime and getrandom VDSO syscalls. */
# endif
# define HAVE_CLONE3_WRAPPER 1

View File

@ -102,6 +102,9 @@
| (1 << X86_XSTATE_ZMM_ID) \
| (1 << X86_XSTATE_APX_F_ID))
/* The maximum supported xstate ID. */
# define X86_XSTATE_MAX_ID X86_XSTATE_APX_F_ID
/* AMX state mask. */
# define AMX_STATE_SAVE_MASK \
((1 << X86_XSTATE_TILECFG_ID) | (1 << X86_XSTATE_TILEDATA_ID))
@ -123,6 +126,9 @@
| (1 << X86_XSTATE_K_ID) \
| (1 << X86_XSTATE_ZMM_H_ID))
/* The maximum supported xstate ID. */
# define X86_XSTATE_MAX_ID X86_XSTATE_ZMM_H_ID
/* States to be included in xsave_state_size. */
# define FULL_STATE_SAVE_MASK STATE_SAVE_MASK
#endif
@ -177,6 +183,29 @@
#define atom_text_section .section ".text.atom", "ax"
#ifndef DL_STACK_ALIGNMENT
/* Due to GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066
__tls_get_addr may be called with 8-byte/4-byte stack alignment.
Although this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't
assume that stack will be always aligned at 16 bytes. */
# ifdef __x86_64__
# define DL_STACK_ALIGNMENT 8
# define MINIMUM_ALIGNMENT 16
# else
# define DL_STACK_ALIGNMENT 4
# endif
#endif
/* True if _dl_runtime_resolve/_dl_tlsdesc_dynamic should align stack for
STATE_SAVE or align stack to MINIMUM_ALIGNMENT bytes before calling
_dl_fixup/__tls_get_addr. */
#define DL_RUNTIME_RESOLVE_REALIGN_STACK \
(STATE_SAVE_ALIGNMENT > DL_STACK_ALIGNMENT \
|| MINIMUM_ALIGNMENT > DL_STACK_ALIGNMENT)
#endif /* __ASSEMBLER__ */
#endif /* _X86_SYSDEP_H */

View File

@ -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
{

View File

@ -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);

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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 */

View File

@ -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

View 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. */

View 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. */

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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) \

View File

@ -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. */

View File

@ -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. */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View 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

View File

@ -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
};

View File

@ -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>

View File

@ -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. */

View File

@ -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

View File

@ -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. */

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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__));

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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_ */

View File

@ -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));

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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
};

View File

@ -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 */

View File

@ -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>

View File

@ -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;

View File

@ -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. */

View File

@ -1231,4 +1231,4 @@ extern int close_range (unsigned int __fd, unsigned int __max_fd,
__END_DECLS
#endif /* unistd.h */
#endif /* unistd.h */

View File

@ -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 */

View File

@ -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
};

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
};

View File

@ -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