Update glibc headers to 2.40.
This commit is contained in:
@@ -73,7 +73,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
20
lib/libc/include/aarch64-linux-gnu/bits/hwcap.h
vendored
20
lib/libc/include/aarch64-linux-gnu/bits/hwcap.h
vendored
@@ -99,4 +99,22 @@
|
||||
#define HWCAP2_SME_B16B16 (1UL << 41)
|
||||
#define HWCAP2_SME_F16F16 (1UL << 42)
|
||||
#define HWCAP2_MOPS (1UL << 43)
|
||||
#define HWCAP2_HBC (1UL << 44)
|
||||
#define HWCAP2_HBC (1UL << 44)
|
||||
#define HWCAP2_SVE_B16B16 (1UL << 45)
|
||||
#define HWCAP2_LRCPC3 (1UL << 46)
|
||||
#define HWCAP2_LSE128 (1UL << 47)
|
||||
#define HWCAP2_FPMR (1UL << 48)
|
||||
#define HWCAP2_LUT (1UL << 49)
|
||||
#define HWCAP2_FAMINMAX (1UL << 50)
|
||||
#define HWCAP2_F8CVT (1UL << 51)
|
||||
#define HWCAP2_F8FMA (1UL << 52)
|
||||
#define HWCAP2_F8DP4 (1UL << 53)
|
||||
#define HWCAP2_F8DP2 (1UL << 54)
|
||||
#define HWCAP2_F8E4M3 (1UL << 55)
|
||||
#define HWCAP2_F8E5M2 (1UL << 56)
|
||||
#define HWCAP2_SME_LUTV2 (1UL << 57)
|
||||
#define HWCAP2_SME_F8F16 (1UL << 58)
|
||||
#define HWCAP2_SME_F8F32 (1UL << 59)
|
||||
#define HWCAP2_SME_SF8FMA (1UL << 60)
|
||||
#define HWCAP2_SME_SF8DP4 (1UL << 61)
|
||||
#define HWCAP2_SME_SF8DP2 (1UL << 62)
|
||||
@@ -33,22 +33,50 @@
|
||||
# define __DECL_SIMD_acos __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acosf
|
||||
# define __DECL_SIMD_acosf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acosh
|
||||
# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acoshf
|
||||
# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asin
|
||||
# define __DECL_SIMD_asin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinf
|
||||
# define __DECL_SIMD_asinf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinh
|
||||
# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinhf
|
||||
# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan
|
||||
# define __DECL_SIMD_atan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanf
|
||||
# define __DECL_SIMD_atanf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanh
|
||||
# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanhf
|
||||
# define __DECL_SIMD_atanhf __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_cbrt
|
||||
# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cbrtf
|
||||
# define __DECL_SIMD_cbrtf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cos
|
||||
# define __DECL_SIMD_cos __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cosf
|
||||
# define __DECL_SIMD_cosf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cosh
|
||||
# define __DECL_SIMD_cosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_coshf
|
||||
# define __DECL_SIMD_coshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erf
|
||||
# define __DECL_SIMD_erf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erff
|
||||
# define __DECL_SIMD_erff __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erfc
|
||||
# define __DECL_SIMD_erfc __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erfcf
|
||||
# define __DECL_SIMD_erfcf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp
|
||||
# define __DECL_SIMD_exp __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expf
|
||||
@@ -65,6 +93,10 @@
|
||||
# define __DECL_SIMD_expm1 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expm1f
|
||||
# define __DECL_SIMD_expm1f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_hypot
|
||||
# define __DECL_SIMD_hypot __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_hypotf
|
||||
# define __DECL_SIMD_hypotf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log
|
||||
# define __DECL_SIMD_log __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_logf
|
||||
@@ -81,14 +113,26 @@
|
||||
# define __DECL_SIMD_log2 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log2f
|
||||
# define __DECL_SIMD_log2f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_pow
|
||||
# define __DECL_SIMD_pow __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_powf
|
||||
# define __DECL_SIMD_powf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sin
|
||||
# define __DECL_SIMD_sin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinf
|
||||
# define __DECL_SIMD_sinf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinh
|
||||
# define __DECL_SIMD_sinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinhf
|
||||
# define __DECL_SIMD_sinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tan
|
||||
# define __DECL_SIMD_tan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanf
|
||||
# define __DECL_SIMD_tanf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanh
|
||||
# define __DECL_SIMD_tanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanhf
|
||||
# define __DECL_SIMD_tanhf __DECL_SIMD_aarch64
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ(9, 0)
|
||||
@@ -117,35 +161,57 @@ typedef __SVBool_t __sv_bool_t;
|
||||
|
||||
__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_erff (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_erfcf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_exp10f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_exp2f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_expm1f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_hypotf (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log10f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log1pf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log2f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_powf (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
|
||||
|
||||
__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_erf (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_erfc (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp10 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp2 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_expm1 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_hypot (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log10 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log1p (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log2 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_pow (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tanh (__f64x2_t);
|
||||
|
||||
# undef __ADVSIMD_VEC_MATH_SUPPORTED
|
||||
#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
|
||||
@@ -154,35 +220,57 @@ __vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
|
||||
|
||||
__sv_f32_t _ZGVsMxvv_atan2f (__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_asinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinhf (__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_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);
|
||||
__sv_f32_t _ZGVsMxv_erff (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_erfcf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_exp10f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_exp2f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_expm1f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_hypotf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log10f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log1pf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log2f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_powf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
|
||||
|
||||
__sv_f64_t _ZGVsMxvv_atan2 (__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_asin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asinh (__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_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);
|
||||
__sv_f64_t _ZGVsMxv_erf (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_erfc (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp10 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp2 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_expm1 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_hypot (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log10 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log1p (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log2 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_pow (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sinh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tan (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tanh (__sv_f64_t, __sv_bool_t);
|
||||
|
||||
# undef __SVE_VEC_MATH_SUPPORTED
|
||||
#endif /* __SVE_VEC_MATH_SUPPORTED */
|
||||
@@ -73,7 +73,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -99,4 +99,22 @@
|
||||
#define HWCAP2_SME_B16B16 (1UL << 41)
|
||||
#define HWCAP2_SME_F16F16 (1UL << 42)
|
||||
#define HWCAP2_MOPS (1UL << 43)
|
||||
#define HWCAP2_HBC (1UL << 44)
|
||||
#define HWCAP2_HBC (1UL << 44)
|
||||
#define HWCAP2_SVE_B16B16 (1UL << 45)
|
||||
#define HWCAP2_LRCPC3 (1UL << 46)
|
||||
#define HWCAP2_LSE128 (1UL << 47)
|
||||
#define HWCAP2_FPMR (1UL << 48)
|
||||
#define HWCAP2_LUT (1UL << 49)
|
||||
#define HWCAP2_FAMINMAX (1UL << 50)
|
||||
#define HWCAP2_F8CVT (1UL << 51)
|
||||
#define HWCAP2_F8FMA (1UL << 52)
|
||||
#define HWCAP2_F8DP4 (1UL << 53)
|
||||
#define HWCAP2_F8DP2 (1UL << 54)
|
||||
#define HWCAP2_F8E4M3 (1UL << 55)
|
||||
#define HWCAP2_F8E5M2 (1UL << 56)
|
||||
#define HWCAP2_SME_LUTV2 (1UL << 57)
|
||||
#define HWCAP2_SME_F8F16 (1UL << 58)
|
||||
#define HWCAP2_SME_F8F32 (1UL << 59)
|
||||
#define HWCAP2_SME_SF8FMA (1UL << 60)
|
||||
#define HWCAP2_SME_SF8DP4 (1UL << 61)
|
||||
#define HWCAP2_SME_SF8DP2 (1UL << 62)
|
||||
@@ -33,22 +33,50 @@
|
||||
# define __DECL_SIMD_acos __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acosf
|
||||
# define __DECL_SIMD_acosf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acosh
|
||||
# define __DECL_SIMD_acosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_acoshf
|
||||
# define __DECL_SIMD_acoshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asin
|
||||
# define __DECL_SIMD_asin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinf
|
||||
# define __DECL_SIMD_asinf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinh
|
||||
# define __DECL_SIMD_asinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_asinhf
|
||||
# define __DECL_SIMD_asinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atan
|
||||
# define __DECL_SIMD_atan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanf
|
||||
# define __DECL_SIMD_atanf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanh
|
||||
# define __DECL_SIMD_atanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_atanhf
|
||||
# define __DECL_SIMD_atanhf __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_cbrt
|
||||
# define __DECL_SIMD_cbrt __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cbrtf
|
||||
# define __DECL_SIMD_cbrtf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cos
|
||||
# define __DECL_SIMD_cos __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cosf
|
||||
# define __DECL_SIMD_cosf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_cosh
|
||||
# define __DECL_SIMD_cosh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_coshf
|
||||
# define __DECL_SIMD_coshf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erf
|
||||
# define __DECL_SIMD_erf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erff
|
||||
# define __DECL_SIMD_erff __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erfc
|
||||
# define __DECL_SIMD_erfc __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_erfcf
|
||||
# define __DECL_SIMD_erfcf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_exp
|
||||
# define __DECL_SIMD_exp __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expf
|
||||
@@ -65,6 +93,10 @@
|
||||
# define __DECL_SIMD_expm1 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_expm1f
|
||||
# define __DECL_SIMD_expm1f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_hypot
|
||||
# define __DECL_SIMD_hypot __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_hypotf
|
||||
# define __DECL_SIMD_hypotf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log
|
||||
# define __DECL_SIMD_log __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_logf
|
||||
@@ -81,14 +113,26 @@
|
||||
# define __DECL_SIMD_log2 __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_log2f
|
||||
# define __DECL_SIMD_log2f __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_pow
|
||||
# define __DECL_SIMD_pow __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_powf
|
||||
# define __DECL_SIMD_powf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sin
|
||||
# define __DECL_SIMD_sin __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinf
|
||||
# define __DECL_SIMD_sinf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinh
|
||||
# define __DECL_SIMD_sinh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_sinhf
|
||||
# define __DECL_SIMD_sinhf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tan
|
||||
# define __DECL_SIMD_tan __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanf
|
||||
# define __DECL_SIMD_tanf __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanh
|
||||
# define __DECL_SIMD_tanh __DECL_SIMD_aarch64
|
||||
# undef __DECL_SIMD_tanhf
|
||||
# define __DECL_SIMD_tanhf __DECL_SIMD_aarch64
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ(9, 0)
|
||||
@@ -117,35 +161,57 @@ typedef __SVBool_t __sv_bool_t;
|
||||
|
||||
__vpcs __f32x4_t _ZGVnN4vv_atan2f (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_acoshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_asinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_atanhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cbrtf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_cosf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_coshf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_erff (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_erfcf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_expf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_exp10f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_exp2f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_expm1f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_hypotf (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_logf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log10f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log1pf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_log2f (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4vv_powf (__f32x4_t, __f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_sinhf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanf (__f32x4_t);
|
||||
__vpcs __f32x4_t _ZGVnN4v_tanhf (__f32x4_t);
|
||||
|
||||
__vpcs __f64x2_t _ZGVnN2vv_atan2 (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_acosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_asinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_atanh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cbrt (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cos (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_cosh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_erf (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_erfc (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp10 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_exp2 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_expm1 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_hypot (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log10 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log1p (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_log2 (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2vv_pow (__f64x2_t, __f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sin (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_sinh (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
|
||||
__vpcs __f64x2_t _ZGVnN2v_tanh (__f64x2_t);
|
||||
|
||||
# undef __ADVSIMD_VEC_MATH_SUPPORTED
|
||||
#endif /* __ADVSIMD_VEC_MATH_SUPPORTED */
|
||||
@@ -154,35 +220,57 @@ __vpcs __f64x2_t _ZGVnN2v_tan (__f64x2_t);
|
||||
|
||||
__sv_f32_t _ZGVsMxvv_atan2f (__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_asinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_asinhf (__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_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);
|
||||
__sv_f32_t _ZGVsMxv_erff (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_erfcf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_expf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_exp10f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_exp2f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_expm1f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_hypotf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_logf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log10f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log1pf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_log2f (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxvv_powf (__sv_f32_t, __sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_sinhf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanf (__sv_f32_t, __sv_bool_t);
|
||||
__sv_f32_t _ZGVsMxv_tanhf (__sv_f32_t, __sv_bool_t);
|
||||
|
||||
__sv_f64_t _ZGVsMxvv_atan2 (__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_asin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_asinh (__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_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);
|
||||
__sv_f64_t _ZGVsMxv_erf (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_erfc (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp10 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_exp2 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_expm1 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_hypot (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log10 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log1p (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_log2 (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxvv_pow (__sv_f64_t, __sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sin (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_sinh (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tan (__sv_f64_t, __sv_bool_t);
|
||||
__sv_f64_t _ZGVsMxv_tanh (__sv_f64_t, __sv_bool_t);
|
||||
|
||||
# undef __SVE_VEC_MATH_SUPPORTED
|
||||
#endif /* __SVE_VEC_MATH_SUPPORTED */
|
||||
15
lib/libc/include/arc-linux-gnu/bits/endianness.h
vendored
Normal file
15
lib/libc/include/arc-linux-gnu/bits/endianness.h
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef _BITS_ENDIANNESS_H
|
||||
#define _BITS_ENDIANNESS_H 1
|
||||
|
||||
#ifndef _BITS_ENDIAN_H
|
||||
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
|
||||
#endif
|
||||
|
||||
/* ARC has selectable endianness. */
|
||||
#ifdef __BIG_ENDIAN__
|
||||
# define __BYTE_ORDER __BIG_ENDIAN
|
||||
#else
|
||||
# define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#endif /* bits/endianness.h */
|
||||
55
lib/libc/include/arc-linux-gnu/bits/fcntl.h
vendored
Normal file
55
lib/libc/include/arc-linux-gnu/bits/fcntl.h
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/* O_*, F_*, FD_* bit values for the generic Linux ABI.
|
||||
Copyright (C) 2011-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FCNTL_H
|
||||
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
|
||||
#endif
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
# define __O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
struct flock
|
||||
{
|
||||
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||
#ifndef __USE_FILE_OFFSET64
|
||||
__off_t l_start; /* Offset where the lock begins. */
|
||||
__off_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
#else
|
||||
__off64_t l_start; /* Offset where the lock begins. */
|
||||
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
#endif
|
||||
__pid_t l_pid; /* Process holding the lock. */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct flock64
|
||||
{
|
||||
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
|
||||
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
|
||||
__off64_t l_start; /* Offset where the lock begins. */
|
||||
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
|
||||
__pid_t l_pid; /* Process holding the lock. */
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Include generic Linux declarations. */
|
||||
#include <bits/fcntl-linux.h>
|
||||
78
lib/libc/include/arc-linux-gnu/bits/fenv.h
vendored
Normal file
78
lib/libc/include/arc-linux-gnu/bits/fenv.h
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/* Floating point environment. ARC version.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FENV_H
|
||||
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
FE_INVALID =
|
||||
# define FE_INVALID (0x01)
|
||||
FE_INVALID,
|
||||
FE_DIVBYZERO =
|
||||
# define FE_DIVBYZERO (0x02)
|
||||
FE_DIVBYZERO,
|
||||
FE_OVERFLOW =
|
||||
# define FE_OVERFLOW (0x04)
|
||||
FE_OVERFLOW,
|
||||
FE_UNDERFLOW =
|
||||
# define FE_UNDERFLOW (0x08)
|
||||
FE_UNDERFLOW,
|
||||
FE_INEXACT =
|
||||
# define FE_INEXACT (0x10)
|
||||
FE_INEXACT
|
||||
};
|
||||
|
||||
# define FE_ALL_EXCEPT \
|
||||
(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
|
||||
|
||||
enum
|
||||
{
|
||||
FE_TOWARDZERO =
|
||||
# define FE_TOWARDZERO (0x0)
|
||||
FE_TOWARDZERO,
|
||||
FE_TONEAREST =
|
||||
# define FE_TONEAREST (0x1) /* default */
|
||||
FE_TONEAREST,
|
||||
FE_UPWARD =
|
||||
# define FE_UPWARD (0x2)
|
||||
FE_UPWARD,
|
||||
FE_DOWNWARD =
|
||||
# define FE_DOWNWARD (0x3)
|
||||
FE_DOWNWARD
|
||||
};
|
||||
|
||||
typedef unsigned int fexcept_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int __fpcr;
|
||||
unsigned int __fpsr;
|
||||
} fenv_t;
|
||||
|
||||
/* If the default argument is used we use this value. */
|
||||
#define FE_DFL_ENV ((const fenv_t *) -1)
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
/* Default floating-point control modes. */
|
||||
# define FE_DFL_MODE ((const femode_t *) -1L)
|
||||
#endif
|
||||
52
lib/libc/include/arc-linux-gnu/bits/floatn.h
vendored
Normal file
52
lib/libc/include/arc-linux-gnu/bits/floatn.h
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Macros to control TS 18661-3 glibc features.
|
||||
Copyright (C) 2017-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
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/>. */
|
||||
|
||||
/* Defined to 1 if the current compiler invocation provides a
|
||||
floating-point type with the IEEE 754 binary128 format, and this glibc
|
||||
includes corresponding *f128 interfaces for it. */
|
||||
#define __HAVE_FLOAT128 0
|
||||
|
||||
/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
|
||||
from the default float, double and long double types in this glibc. */
|
||||
#define __HAVE_DISTINCT_FLOAT128 0
|
||||
|
||||
/* Defined to 1 if the current compiler invocation provides a
|
||||
floating-point type with the right format for _Float64x, and this
|
||||
glibc includes corresponding *f64x interfaces for it. */
|
||||
#define __HAVE_FLOAT64X 0
|
||||
|
||||
/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
|
||||
of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
|
||||
the format of _Float128, which must be different from that of long
|
||||
double. */
|
||||
#define __HAVE_FLOAT64X_LONG_DOUBLE 0
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/* Defined to concatenate the literal suffix to be used with _Float128
|
||||
types, if __HAVE_FLOAT128 is 1.
|
||||
E.g.: #define __f128(x) x##f128. */
|
||||
# undef __f128
|
||||
|
||||
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
|
||||
E.g.: #define __CFLOAT128 _Complex _Float128. */
|
||||
# undef __CFLOAT128
|
||||
|
||||
#endif /* !__ASSEMBLER__. */
|
||||
|
||||
#include <bits/floatn-common.h>
|
||||
52
lib/libc/include/arc-linux-gnu/bits/link.h
vendored
Normal file
52
lib/libc/include/arc-linux-gnu/bits/link.h
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Machine-specific declarations for dynamic linker interface, ARC version.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LINK_H
|
||||
# error "Never include <bits/link.h> directly; use <link.h> instead."
|
||||
#endif
|
||||
|
||||
/* Registers for entry into PLT on ARC. */
|
||||
typedef struct La_arc_regs
|
||||
{
|
||||
uint32_t lr_reg[8]; /* r0 through r7 (upto 8 args). */
|
||||
} La_arc_regs;
|
||||
|
||||
/* Return values for calls from PLT on ARC. */
|
||||
typedef struct La_arc_retval
|
||||
{
|
||||
/* For ARCv2, a 64-bit integer return value can use 2 regs. */
|
||||
uint32_t lrv_reg[2];
|
||||
} La_arc_retval;
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern ElfW(Addr) la_arc_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
|
||||
uintptr_t *__refcook,
|
||||
uintptr_t *__defcook,
|
||||
La_arc_regs *__regs,
|
||||
unsigned int *__flags,
|
||||
const char *__symname,
|
||||
long int *__framesizep);
|
||||
extern unsigned int la_arc_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
|
||||
uintptr_t *__refcook,
|
||||
uintptr_t *__defcook,
|
||||
const La_arc_regs *__inregs,
|
||||
La_arc_retval *__outregs,
|
||||
const char *symname);
|
||||
|
||||
__END_DECLS
|
||||
53
lib/libc/include/arc-linux-gnu/bits/long-double.h
vendored
Normal file
53
lib/libc/include/arc-linux-gnu/bits/long-double.h
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/* Properties of long double type.
|
||||
Copyright (C) 2016-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License 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/>. */
|
||||
|
||||
/* This header is included by <sys/cdefs.h>.
|
||||
|
||||
If long double is ABI-compatible with double, it should define
|
||||
__NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
|
||||
__NO_LONG_DOUBLE_MATH undefined.
|
||||
|
||||
If this build of the GNU C Library supports both long double
|
||||
ABI-compatible with double and some other long double format not
|
||||
ABI-compatible with double, it should define
|
||||
__LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
|
||||
__LONG_DOUBLE_MATH_OPTIONAL undefined.
|
||||
|
||||
If __NO_LONG_DOUBLE_MATH is already defined, this header must not
|
||||
define anything; this is needed to work with the definition of
|
||||
__NO_LONG_DOUBLE_MATH in nldbl-compat.h. */
|
||||
|
||||
/* In the default version of this header, long double is
|
||||
ABI-compatible with double. */
|
||||
#ifndef __NO_LONG_DOUBLE_MATH
|
||||
# define __NO_LONG_DOUBLE_MATH 1
|
||||
#endif
|
||||
|
||||
/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
|
||||
choice of the underlying ABI of long double. It will always assume
|
||||
a constant value for each translation unit.
|
||||
|
||||
If the value is non-zero, any API which is parameterized by the long
|
||||
double type (i.e the scanf/printf family of functions or the explicitly
|
||||
parameterized math.h functions) will be redirected to a compatible
|
||||
implementation using _Float128 ABI via symbols suffixed with ieee128.
|
||||
|
||||
The mechanism this macro uses to acquire may be a function
|
||||
of architecture, or target specific options used to invoke the
|
||||
compiler. */
|
||||
#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0
|
||||
35
lib/libc/include/arc-linux-gnu/bits/procfs.h
vendored
Normal file
35
lib/libc/include/arc-linux-gnu/bits/procfs.h
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Types for registers for sys/procfs.h. ARC version.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_PROCFS_H
|
||||
# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
|
||||
#endif
|
||||
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
/* And the whole bunch of them. We could have used `struct
|
||||
user_regs' directly in the typedef, but tradition says that
|
||||
the register set is an array, which does have some peculiar
|
||||
semantics, so leave it that way. */
|
||||
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
|
||||
|
||||
typedef unsigned long int elf_greg_t;
|
||||
typedef unsigned long int elf_gregset_t[ELF_NGREG];
|
||||
|
||||
/* There's no separate floating point reg file in ARCv2. */
|
||||
typedef struct { } elf_fpregset_t;
|
||||
26
lib/libc/include/arc-linux-gnu/bits/setjmp.h
vendored
Normal file
26
lib/libc/include/arc-linux-gnu/bits/setjmp.h
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/* Define the machine-dependent type 'jmp_buf'. ARC version.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _ARC_BITS_SETJMP_H
|
||||
#define _ARC_BITS_SETJMP_H 1
|
||||
|
||||
/* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer),
|
||||
blink (branch-n-link). */
|
||||
typedef long int __jmp_buf[32];
|
||||
|
||||
#endif
|
||||
127
lib/libc/include/arc-linux-gnu/bits/struct_stat.h
vendored
Normal file
127
lib/libc/include/arc-linux-gnu/bits/struct_stat.h
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
/* Definition for struct stat.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#if !defined _SYS_STAT_H && !defined _FCNTL_H
|
||||
# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
|
||||
#endif
|
||||
|
||||
#ifndef _BITS_STRUCT_STAT_H
|
||||
#define _BITS_STRUCT_STAT_H 1
|
||||
|
||||
#include <bits/endian.h>
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if defined __USE_FILE_OFFSET64
|
||||
# define __field64(type, type64, name) type64 name
|
||||
#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
|
||||
# if defined __INO_T_MATCHES_INO64_T && !defined __OFF_T_MATCHES_OFF64_T
|
||||
# error "ino_t and off_t must both be the same type"
|
||||
# endif
|
||||
# define __field64(type, type64, name) type name
|
||||
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define __field64(type, type64, name) \
|
||||
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
|
||||
#else
|
||||
# define __field64(type, type64, name) \
|
||||
int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
|
||||
#endif
|
||||
|
||||
struct stat
|
||||
{
|
||||
__dev_t st_dev; /* Device. */
|
||||
__field64(__ino_t, __ino64_t, st_ino); /* File serial number. */
|
||||
__mode_t st_mode; /* File mode. */
|
||||
__nlink_t st_nlink; /* Link count. */
|
||||
__uid_t st_uid; /* User ID of the file's owner. */
|
||||
__gid_t st_gid; /* Group ID of the file's group.*/
|
||||
__dev_t st_rdev; /* Device number, if device. */
|
||||
__dev_t __pad1;
|
||||
__field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */
|
||||
__blksize_t st_blksize; /* Optimal block size for I/O. */
|
||||
int __pad2;
|
||||
__field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */
|
||||
#ifdef __USE_XOPEN2K8
|
||||
/* Nanosecond resolution timestamps are stored in a format
|
||||
equivalent to 'struct timespec'. This is the type used
|
||||
whenever possible but the Unix namespace rules do not allow the
|
||||
identifier 'timespec' to appear in the <sys/stat.h> header.
|
||||
Therefore we have to handle the use of this header in strictly
|
||||
standard-compliant sources special. */
|
||||
struct timespec st_atim; /* Time of last access. */
|
||||
struct timespec st_mtim; /* Time of last modification. */
|
||||
struct timespec st_ctim; /* Time of last status change. */
|
||||
# define st_atime st_atim.tv_sec /* Backward compatibility. */
|
||||
# define st_mtime st_mtim.tv_sec
|
||||
# define st_ctime st_ctim.tv_sec
|
||||
#else
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int st_atimensec; /* Nscecs of last access. */
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int st_mtimensec; /* Nsecs of last modification. */
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
#endif
|
||||
int __glibc_reserved[2];
|
||||
};
|
||||
|
||||
#undef __field64
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
__dev_t st_dev; /* Device. */
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
__mode_t st_mode; /* File mode. */
|
||||
__nlink_t st_nlink; /* Link count. */
|
||||
__uid_t st_uid; /* User ID of the file's owner. */
|
||||
__gid_t st_gid; /* Group ID of the file's group.*/
|
||||
__dev_t st_rdev; /* Device number, if device. */
|
||||
__dev_t __pad1;
|
||||
__off64_t st_size; /* Size of file, in bytes. */
|
||||
__blksize_t st_blksize; /* Optimal block size for I/O. */
|
||||
int __pad2;
|
||||
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
|
||||
#ifdef __USE_XOPEN2K8
|
||||
/* Nanosecond resolution timestamps are stored in a format
|
||||
equivalent to 'struct timespec'. This is the type used
|
||||
whenever possible but the Unix namespace rules do not allow the
|
||||
identifier 'timespec' to appear in the <sys/stat.h> header.
|
||||
Therefore we have to handle the use of this header in strictly
|
||||
standard-compliant sources special. */
|
||||
struct timespec st_atim; /* Time of last access. */
|
||||
struct timespec st_mtim; /* Time of last modification. */
|
||||
struct timespec st_ctim; /* Time of last status change. */
|
||||
#else
|
||||
__time_t st_atime; /* Time of last access. */
|
||||
unsigned long int st_atimensec; /* Nscecs of last access. */
|
||||
__time_t st_mtime; /* Time of last modification. */
|
||||
unsigned long int st_mtimensec; /* Nsecs of last modification. */
|
||||
__time_t st_ctime; /* Time of last status change. */
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
#endif
|
||||
int __glibc_reserved[2];
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Tell code we have these members. */
|
||||
#define _STATBUF_ST_BLKSIZE
|
||||
#define _STATBUF_ST_RDEV
|
||||
/* Nanosecond resolution time values are supported. */
|
||||
#define _STATBUF_ST_NSEC
|
||||
|
||||
#endif /* _BITS_STRUCT_STAT_H */
|
||||
20
lib/libc/include/arc-linux-gnu/bits/timesize.h
vendored
Normal file
20
lib/libc/include/arc-linux-gnu/bits/timesize.h
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Bit size of the time_t type at glibc build time, general case.
|
||||
Copyright (C) 2018-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Size in bits of the 'time_t' type of the default ABI. */
|
||||
#define __TIMESIZE 64
|
||||
12
lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h
vendored
Normal file
12
lib/libc/include/arc-linux-gnu/bits/types/__sigset_t.h
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/* Architecture-specific __sigset_t definition. ARC version. */
|
||||
#ifndef ____sigset_t_defined
|
||||
#define ____sigset_t_defined
|
||||
|
||||
/* Linux asm-generic syscall ABI expects sigset_t to hold 64 signals. */
|
||||
#define _SIGSET_NWORDS (64 / (8 * sizeof (unsigned long int)))
|
||||
typedef struct
|
||||
{
|
||||
unsigned long int __val[_SIGSET_NWORDS];
|
||||
} __sigset_t;
|
||||
|
||||
#endif
|
||||
21
lib/libc/include/arc-linux-gnu/bits/wordsize.h
vendored
Normal file
21
lib/libc/include/arc-linux-gnu/bits/wordsize.h
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
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/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
105
lib/libc/include/arc-linux-gnu/fpu_control.h
vendored
Normal file
105
lib/libc/include/arc-linux-gnu/fpu_control.h
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
/* FPU control word bits. ARC version.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _FPU_CONTROL_H
|
||||
#define _FPU_CONTROL_H
|
||||
|
||||
/* ARC FPU control register bits.
|
||||
|
||||
[ 0] -> IVE: Enable invalid operation exception.
|
||||
if 0, soft exception: status register IV flag set.
|
||||
if 1, hardware exception trap (not supported in Linux yet).
|
||||
[ 1] -> DZE: Enable division by zero exception.
|
||||
if 0, soft exception: status register IV flag set.
|
||||
if 1, hardware exception: (not supported in Linux yet).
|
||||
[9:8] -> RM: Rounding Mode:
|
||||
00 - Rounding toward zero.
|
||||
01 - Rounding to nearest (default).
|
||||
10 - Rounding (up) toward plus infinity.
|
||||
11 - Rounding (down)toward minus infinity.
|
||||
|
||||
ARC FPU status register bits.
|
||||
|
||||
[ 0] -> IV: flag invalid operation.
|
||||
[ 1] -> DZ: flag division by zero.
|
||||
[ 2] -> OV: flag Overflow operation.
|
||||
[ 3] -> UV: flag Underflow operation.
|
||||
[ 4] -> IX: flag Inexact operation.
|
||||
[31] -> FWE: Flag Write Enable.
|
||||
If 1, above flags writable explicitly (clearing),
|
||||
else IoW and only writable indirectly via bits [12:7]. */
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#if !defined(__ARC_FPU_SP__) && !defined(__ARC_FPU_DP__)
|
||||
|
||||
# define _FPU_RESERVED 0xffffffff
|
||||
# define _FPU_DEFAULT 0x00000000
|
||||
typedef unsigned int fpu_control_t;
|
||||
# define _FPU_GETCW(cw) (cw) = 0
|
||||
# define _FPU_SETCW(cw) (void) (cw)
|
||||
# define _FPU_GETS(cw) (cw) = 0
|
||||
# define _FPU_SETS(cw) (void) (cw)
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#else
|
||||
|
||||
#define _FPU_RESERVED 0
|
||||
|
||||
/* The fdlibm code requires strict IEEE double precision arithmetic,
|
||||
and no interrupts for exceptions, rounding to nearest.
|
||||
So only RM set to b'01. */
|
||||
# define _FPU_DEFAULT 0x00000100
|
||||
|
||||
/* Actually default needs to have FWE bit as 1 but that is already
|
||||
ingrained into _FPU_SETS macro below. */
|
||||
#define _FPU_FPSR_DEFAULT 0x00000000
|
||||
|
||||
#define __FPU_RND_SHIFT 8
|
||||
#define __FPU_RND_MASK 0x3
|
||||
|
||||
/* Type of the control word. */
|
||||
typedef unsigned int fpu_control_t;
|
||||
|
||||
/* Macros for accessing the hardware control word. */
|
||||
# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw))
|
||||
# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw))
|
||||
|
||||
/* Macros for accessing the hardware status word.
|
||||
Writing to FPU_STATUS requires a "control" bit FWE to be able to set the
|
||||
exception flags directly (as opposed to side-effects of FP instructions).
|
||||
That is done in the macro here to keeps callers agnostic of this detail.
|
||||
And given FWE is write-only and RAZ, no need to "clear" it in _FPU_GETS
|
||||
macro. */
|
||||
# define _FPU_GETS(cw) \
|
||||
__asm__ volatile ("lr %0, [0x301] \r\n" \
|
||||
: "=r" (cw))
|
||||
|
||||
# define _FPU_SETS(cw) \
|
||||
do { \
|
||||
unsigned int __fwe = 0x80000000 | (cw); \
|
||||
__asm__ volatile ("sr %0, [0x301] \r\n" \
|
||||
: : "r" (__fwe)); \
|
||||
} while (0)
|
||||
|
||||
/* Default control word set at startup. */
|
||||
extern fpu_control_t __fpu_control;
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* fpu_control.h */
|
||||
27
lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h
vendored
Normal file
27
lib/libc/include/arc-linux-gnu/gnu/lib-names-arcle.h
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/* This file is automatically generated. */
|
||||
#ifndef __GNU_LIB_NAMES_H
|
||||
# error "Never use <gnu/lib-names-arcle.h> directly; include <gnu/lib-names.h> instead."
|
||||
#endif
|
||||
|
||||
#define LD_LINUX_ARC_SO "ld-linux-arc.so.2"
|
||||
#define LD_SO "ld-linux-arc.so.2"
|
||||
#define LIBANL_SO "libanl.so.1"
|
||||
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
|
||||
#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
|
||||
#define LIBC_SO "libc.so.6"
|
||||
#define LIBDL_SO "libdl.so.2"
|
||||
#define LIBGCC_S_SO "libgcc_s.so.1"
|
||||
#define LIBMVEC_SO "libmvec.so.1"
|
||||
#define LIBM_SO "libm.so.6"
|
||||
#define LIBNSL_SO "libnsl.so.1"
|
||||
#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
|
||||
#define LIBNSS_DB_SO "libnss_db.so.2"
|
||||
#define LIBNSS_DNS_SO "libnss_dns.so.2"
|
||||
#define LIBNSS_FILES_SO "libnss_files.so.2"
|
||||
#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
|
||||
#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
|
||||
#define LIBPTHREAD_SO "libpthread.so.0"
|
||||
#define LIBRESOLV_SO "libresolv.so.2"
|
||||
#define LIBRT_SO "librt.so.1"
|
||||
#define LIBTHREAD_DB_SO "libthread_db.so.1"
|
||||
#define LIBUTIL_SO "libutil.so.1"
|
||||
16
lib/libc/include/arc-linux-gnu/gnu/lib-names.h
vendored
Normal file
16
lib/libc/include/arc-linux-gnu/gnu/lib-names.h
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/* This file is automatically generated.
|
||||
It defines macros to allow user program to find the shared
|
||||
library files which come as part of GNU libc. */
|
||||
#ifndef __GNU_LIB_NAMES_H
|
||||
#define __GNU_LIB_NAMES_H 1
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if !defined __BIG_ENDIAN__
|
||||
# include <gnu/lib-names-arcle.h>
|
||||
#endif
|
||||
#if defined __BIG_ENDIAN__
|
||||
# include <gnu/lib-names-arcbe.h>
|
||||
#endif
|
||||
|
||||
#endif /* gnu/lib-names.h */
|
||||
38
lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h
vendored
Normal file
38
lib/libc/include/arc-linux-gnu/gnu/stubs-arcle.h
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/* This file is automatically generated.
|
||||
It defines a symbol `__stub_FUNCTION' for each function
|
||||
in the C library which is a stub, meaning it will fail
|
||||
every time called, usually setting errno to ENOSYS. */
|
||||
|
||||
#ifdef _LIBC
|
||||
#error Applications may not define the macro _LIBC
|
||||
#endif
|
||||
|
||||
#define __stub___compat_bdflush
|
||||
#define __stub___compat_create_module
|
||||
#define __stub___compat_get_kernel_syms
|
||||
#define __stub___compat_query_module
|
||||
#define __stub___compat_uselib
|
||||
#define __stub_chflags
|
||||
#define __stub_fchflags
|
||||
#define __stub_feclearexcept
|
||||
#define __stub_fedisableexcept
|
||||
#define __stub_feenableexcept
|
||||
#define __stub_fegetenv
|
||||
#define __stub_fegetexcept
|
||||
#define __stub_fegetexceptflag
|
||||
#define __stub_fegetmode
|
||||
#define __stub_fegetround
|
||||
#define __stub_feholdexcept
|
||||
#define __stub_feraiseexcept
|
||||
#define __stub_fesetenv
|
||||
#define __stub_fesetexcept
|
||||
#define __stub_fesetexceptflag
|
||||
#define __stub_fesetmode
|
||||
#define __stub_fesetround
|
||||
#define __stub_fetestexcept
|
||||
#define __stub_feupdateenv
|
||||
#define __stub_gtty
|
||||
#define __stub_revoke
|
||||
#define __stub_setlogin
|
||||
#define __stub_sigreturn
|
||||
#define __stub_stty
|
||||
12
lib/libc/include/arc-linux-gnu/gnu/stubs.h
vendored
Normal file
12
lib/libc/include/arc-linux-gnu/gnu/stubs.h
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/* This file is automatically generated.
|
||||
This file selects the right generated file of `__stub_FUNCTION' macros
|
||||
based on the architecture being compiled for. */
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if !defined __BIG_ENDIAN__
|
||||
# include <gnu/stubs-arcle.h>
|
||||
#endif
|
||||
#if defined __BIG_ENDIAN__
|
||||
# include <gnu/stubs-arcbe.h>
|
||||
#endif
|
||||
35
lib/libc/include/arc-linux-gnu/sys/cachectl.h
vendored
Normal file
35
lib/libc/include/arc-linux-gnu/sys/cachectl.h
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/* cacheflush - flush contents of instruction and/or data cache.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_CACHECTL_H
|
||||
#define _SYS_CACHECTL_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
/* Get the kernel definition for the op bits. */
|
||||
#include <asm/cachectl.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#ifdef __USE_MISC
|
||||
extern int cacheflush (void *__addr, int __nbytes, int __op) __THROW;
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
57
lib/libc/include/arc-linux-gnu/sys/ucontext.h
vendored
Normal file
57
lib/libc/include/arc-linux-gnu/sys/ucontext.h
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/* struct ucontext definition, ARC version.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* System V/ARC ABI compliant context switching support. */
|
||||
|
||||
#ifndef _SYS_UCONTEXT_H
|
||||
#define _SYS_UCONTEXT_H 1
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#include <bits/types/sigset_t.h>
|
||||
#include <bits/types/stack_t.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long int __pad;
|
||||
unsigned long int __bta;
|
||||
unsigned long int __lp_start, __lp_end, __lp_count;
|
||||
unsigned long int __status32, __ret, __blink;
|
||||
unsigned long int __fp, __gp;
|
||||
unsigned long int __r12, __r11, __r10, __r9, __r8, __r7;
|
||||
unsigned long int __r6, __r5, __r4, __r3, __r2, __r1, __r0;
|
||||
unsigned long int __sp;
|
||||
unsigned long int __r26;
|
||||
unsigned long int __r25, __r24, __r23, __r22, __r21, __r20;
|
||||
unsigned long int __r19, __r18, __r17, __r16, __r15, __r14, __r13;
|
||||
unsigned long int __efa;
|
||||
unsigned long int __stop_pc;
|
||||
unsigned long int __r30, __r58, __r59;
|
||||
} mcontext_t;
|
||||
|
||||
/* Userlevel context. */
|
||||
typedef struct ucontext_t
|
||||
{
|
||||
unsigned long int __uc_flags;
|
||||
struct ucontext_t *uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
sigset_t uc_sigmask;
|
||||
} ucontext_t;
|
||||
|
||||
#endif
|
||||
32
lib/libc/include/arc-linux-gnu/sys/user.h
vendored
Normal file
32
lib/libc/include/arc-linux-gnu/sys/user.h
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/* ptrace register data format definitions.
|
||||
Copyright (C) 2020-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_USER_H
|
||||
#define _SYS_USER_H 1
|
||||
|
||||
/* Struct user_regs_struct is exported by kernel header
|
||||
However apps like strace also expect a struct user, so it's better to
|
||||
have a dummy implementation. */
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
struct user
|
||||
{
|
||||
long int dummy;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -81,7 +81,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -83,13 +83,13 @@ struct stat
|
||||
# else
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif
|
||||
#endif /* __USE_TIME_BITS64 */
|
||||
#endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -125,7 +125,7 @@ struct stat64
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
@@ -81,7 +81,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -83,13 +83,13 @@ struct stat
|
||||
# else
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif
|
||||
#endif /* __USE_TIME_BITS64 */
|
||||
#endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -125,7 +125,7 @@ struct stat64
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
@@ -81,7 +81,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -83,13 +83,13 @@ struct stat
|
||||
# else
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif
|
||||
#endif /* __USE_TIME_BITS64 */
|
||||
#endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -125,7 +125,7 @@ struct stat64
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
@@ -81,7 +81,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -83,13 +83,13 @@ struct stat
|
||||
# else
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif
|
||||
#endif /* __USE_TIME_BITS64 */
|
||||
#endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -125,7 +125,7 @@ struct stat64
|
||||
unsigned long int st_ctimensec; /* Nsecs of last status change. */
|
||||
# endif
|
||||
__ino64_t st_ino; /* File serial number. */
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
@@ -102,7 +102,7 @@ typedef struct
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -88,7 +88,7 @@ struct stat
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
@@ -102,7 +102,7 @@ typedef struct
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
struct stat
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
#else
|
||||
__dev_t st_dev; /* Device. */
|
||||
@@ -88,7 +88,7 @@ struct stat
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev; /* Device. */
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#define __WORDSIZE 32
|
||||
#define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
#define __WORDSIZE32_PTRDIFF_LONG 0
|
||||
4
lib/libc/include/generic-glibc/aio.h
vendored
4
lib/libc/include/generic-glibc/aio.h
vendored
@@ -193,7 +193,7 @@ extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
|
||||
extern int __REDIRECT_NTH (aio_cancel,
|
||||
(int __fildes, struct aiocb *__aiocbp),
|
||||
aio_cancel64);
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
extern int __REDIRECT_NTH (aio_suspend,
|
||||
(const struct aiocb *const __list[], int __nent,
|
||||
const struct timespec *__restrict __timeout),
|
||||
@@ -215,7 +215,7 @@ extern int __REDIRECT_NTH (aio_fsync,
|
||||
# define aio_error aio_error64
|
||||
# define aio_return aio_return64
|
||||
# define aio_cancel aio_cancel64
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# define aio_suspend __aio_suspend_time64
|
||||
# else
|
||||
# define aio_suspend aio_suspend64
|
||||
|
||||
87
lib/libc/include/generic-glibc/bits/fcntl2.h
vendored
87
lib/libc/include/generic-glibc/bits/fcntl2.h
vendored
@@ -32,6 +32,8 @@ extern int __REDIRECT (__open_2, (const char *__path, int __oflag),
|
||||
extern int __REDIRECT (__open_alias, (const char *__path, int __oflag, ...),
|
||||
open64) __nonnull ((1));
|
||||
#endif
|
||||
|
||||
#ifdef __va_arg_pack_len
|
||||
__errordecl (__open_too_many_args,
|
||||
"open can be called either with 2 or 3 arguments, not more");
|
||||
__errordecl (__open_missing_mode,
|
||||
@@ -58,12 +60,29 @@ open (const char *__path, int __oflag, ...)
|
||||
|
||||
return __open_alias (__path, __oflag, __va_arg_pack ());
|
||||
}
|
||||
#elif __fortify_use_clang
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag)
|
||||
__fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
|
||||
"open with O_CREAT or O_TMPFILE in second argument needs 3 arguments")
|
||||
{
|
||||
return __open_2 (__path, __oflag);
|
||||
}
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag,
|
||||
mode_t __mode)
|
||||
{
|
||||
return __open_alias (__path, __oflag, __mode);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
extern int __open64_2 (const char *__path, int __oflag) __nonnull ((1));
|
||||
extern int __REDIRECT (__open64_alias, (const char *__path, int __oflag,
|
||||
...), open64) __nonnull ((1));
|
||||
# ifdef __va_arg_pack_len
|
||||
__errordecl (__open64_too_many_args,
|
||||
"open64 can be called either with 2 or 3 arguments, not more");
|
||||
__errordecl (__open64_missing_mode,
|
||||
@@ -90,6 +109,27 @@ open64 (const char *__path, int __oflag, ...)
|
||||
|
||||
return __open64_alias (__path, __oflag, __va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
open64 (const char *__path, int __oflag, mode_t __mode, ...)
|
||||
__fortify_clang_unavailable ("open64 can be called either with 2 or 3 arguments, not more");
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag)
|
||||
__fortify_clang_prefer_this_overload
|
||||
__fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
|
||||
"open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments")
|
||||
{
|
||||
return __open64_2 (__path, __oflag);
|
||||
}
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag,
|
||||
mode_t __mode)
|
||||
{
|
||||
return __open64_alias (__path, __oflag, __mode);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -108,6 +148,8 @@ extern int __REDIRECT (__openat_alias, (int __fd, const char *__path,
|
||||
int __oflag, ...), openat64)
|
||||
__nonnull ((2));
|
||||
# endif
|
||||
|
||||
# ifdef __va_arg_pack_len
|
||||
__errordecl (__openat_too_many_args,
|
||||
"openat can be called either with 3 or 4 arguments, not more");
|
||||
__errordecl (__openat_missing_mode,
|
||||
@@ -134,6 +176,28 @@ openat (int __fd, const char *__path, int __oflag, ...)
|
||||
|
||||
return __openat_alias (__fd, __path, __oflag, __va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
openat (int __fd, const char *__path, int __oflag, mode_t __mode, ...)
|
||||
__fortify_clang_unavailable ("openat can be called either with 3 or 4 arguments, not more");
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
openat (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
|
||||
int __oflag)
|
||||
__fortify_clang_prefer_this_overload
|
||||
__fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
|
||||
"openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments")
|
||||
{
|
||||
return __openat_2 (__fd, __path, __oflag);
|
||||
}
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
openat (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
|
||||
int __oflag, mode_t __mode)
|
||||
{
|
||||
return __openat_alias (__fd, __path, __oflag, __mode);
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
# ifdef __USE_LARGEFILE64
|
||||
@@ -147,6 +211,7 @@ __errordecl (__openat64_too_many_args,
|
||||
__errordecl (__openat64_missing_mode,
|
||||
"openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments");
|
||||
|
||||
# ifdef __va_arg_pack_len
|
||||
__fortify_function int
|
||||
openat64 (int __fd, const char *__path, int __oflag, ...)
|
||||
{
|
||||
@@ -168,5 +233,27 @@ openat64 (int __fd, const char *__path, int __oflag, ...)
|
||||
|
||||
return __openat64_alias (__fd, __path, __oflag, __va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
openat64 (int __fd, const char *__path, int __oflag, mode_t __mode, ...)
|
||||
__fortify_clang_unavailable ("openat64 can be called either with 3 or 4 arguments, not more");
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
openat64 (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
|
||||
int __oflag)
|
||||
__fortify_clang_prefer_this_overload
|
||||
__fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
|
||||
"openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments")
|
||||
{
|
||||
return __openat64_2 (__fd, __path, __oflag);
|
||||
}
|
||||
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
openat64 (int __fd, __fortify_clang_overload_arg (const char *, ,__path),
|
||||
int __oflag, mode_t __mode)
|
||||
{
|
||||
return __openat64_alias (__fd, __path, __oflag, __mode);
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
2
lib/libc/include/generic-glibc/bits/fenv.h
vendored
2
lib/libc/include/generic-glibc/bits/fenv.h
vendored
@@ -104,7 +104,7 @@ fenv_t;
|
||||
# define FE_NOMASK_ENV ((const fenv_t *) -2)
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Type representing floating-point control modes. */
|
||||
typedef unsigned int femode_t;
|
||||
|
||||
|
||||
2
lib/libc/include/generic-glibc/bits/floatn.h
vendored
2
lib/libc/include/generic-glibc/bits/floatn.h
vendored
@@ -1,4 +1,4 @@
|
||||
/* Macros to control TS 18661-3 glibc features on MIPS platforms.
|
||||
/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
|
||||
Copyright (C) 2017-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
|
||||
@@ -44,23 +44,23 @@
|
||||
|
||||
/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
macro. Most but not all symbols enabled by that macro in TS
|
||||
18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
|
||||
18661-1 are enabled unconditionally in C23. In C23, the symbols in
|
||||
Annex F still require a new feature test macro
|
||||
__STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
|
||||
__STDC_WANT_IEC_60559_EXT__ instead (C23 does not define
|
||||
__STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
|
||||
18661-1 are not included in C2X (and thus should depend on
|
||||
__STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
|
||||
18661-1 are not included in C23 (and thus should depend on
|
||||
__STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are
|
||||
enabled).
|
||||
|
||||
__GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
|
||||
18661-1 not included in C2X.
|
||||
18661-1 not included in C23.
|
||||
|
||||
__GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
|
||||
18661-1 that are also included in C2X (with no feature test macro
|
||||
required in C2X).
|
||||
__GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS
|
||||
18661-1 that are also included in C23 (with no feature test macro
|
||||
required in C23).
|
||||
|
||||
__GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
|
||||
that are included in C2X but conditional on
|
||||
that are included in C23 but conditional on
|
||||
__STDC_WANT_IEC_60559_EXT__. (There are currently no features
|
||||
conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
|
||||
18661-1.) */
|
||||
@@ -70,11 +70,11 @@
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_BFP_EXT 0
|
||||
#endif
|
||||
#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
|
||||
# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
|
||||
#undef __GLIBC_USE_IEC_60559_BFP_EXT_C23
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23)
|
||||
# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
|
||||
# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0
|
||||
#endif
|
||||
#undef __GLIBC_USE_IEC_60559_EXT
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
|
||||
@@ -86,18 +86,18 @@
|
||||
/* ISO/IEC TS 18661-4:2015 defines the
|
||||
__STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
|
||||
functions, the symbols from this TS are enabled unconditionally in
|
||||
C2X. */
|
||||
C23. */
|
||||
#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
|
||||
#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
|
||||
#endif
|
||||
#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
|
||||
#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23)
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1
|
||||
#else
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
|
||||
# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0
|
||||
#endif
|
||||
|
||||
/* ISO/IEC TS 18661-3:2015 defines the
|
||||
|
||||
29
lib/libc/include/generic-glibc/bits/mathcalls.h
vendored
29
lib/libc/include/generic-glibc/bits/mathcalls.h
vendored
@@ -109,9 +109,24 @@ __MATHCALL_VEC (log10,, (_Mdouble_ __x));
|
||||
/* Break VALUE into integral and fractional parts. */
|
||||
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
|
||||
/* Compute exponent to base ten. */
|
||||
__MATHCALL_VEC (exp10,, (_Mdouble_ __x));
|
||||
|
||||
/* Return exp2(X) - 1. */
|
||||
__MATHCALL (exp2m1,, (_Mdouble_ __x));
|
||||
|
||||
/* Return exp10(X) - 1. */
|
||||
__MATHCALL (exp10m1,, (_Mdouble_ __x));
|
||||
|
||||
/* Return log2(1 + X). */
|
||||
__MATHCALL (log2p1,, (_Mdouble_ __x));
|
||||
|
||||
/* Return log10(1 + X). */
|
||||
__MATHCALL (log10p1,, (_Mdouble_ __x));
|
||||
|
||||
/* Return log(1 + X). */
|
||||
__MATHCALL (logp1,, (_Mdouble_ __x));
|
||||
#endif
|
||||
|
||||
#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
|
||||
@@ -264,7 +279,7 @@ __MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y));
|
||||
__MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y));
|
||||
# endif
|
||||
|
||||
# if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
|
||||
# if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
|
||||
/* Return X - epsilon. */
|
||||
__MATHCALL (nextdown,, (_Mdouble_ __x));
|
||||
/* Return X + epsilon. */
|
||||
@@ -283,7 +298,7 @@ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
|
||||
__MATHDECL (int,ilogb,, (_Mdouble_ __x));
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
|
||||
/* Like ilogb, but returning long int. */
|
||||
__MATHDECL (long int, llogb,, (_Mdouble_ __x));
|
||||
#endif
|
||||
@@ -328,7 +343,7 @@ __MATHDECL (long long int,llround,, (_Mdouble_ __x));
|
||||
/* Return positive difference between X and Y. */
|
||||
__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
|
||||
|
||||
# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC2X)
|
||||
# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC23)
|
||||
/* Return maximum numeric value from X and Y. */
|
||||
__MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
|
||||
|
||||
@@ -340,7 +355,7 @@ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
|
||||
__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
|
||||
#endif /* Use ISO C99. */
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
|
||||
/* Round X to nearest integer value, rounding halfway cases to even. */
|
||||
__MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__));
|
||||
|
||||
@@ -372,7 +387,7 @@ __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
|
||||
|
||||
#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
|
||||
|| (__MATH_DECLARING_FLOATN \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X))))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23))))
|
||||
/* Return value with maximum magnitude. */
|
||||
__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
|
||||
|
||||
@@ -380,7 +395,7 @@ __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
|
||||
__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (ISOC2X)
|
||||
#if __GLIBC_USE (ISOC23)
|
||||
/* Return maximum value from X and Y. */
|
||||
__MATHCALLX (fmaximum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
|
||||
|
||||
|
||||
21
lib/libc/include/generic-glibc/bits/mman-linux.h
vendored
21
lib/libc/include/generic-glibc/bits/mman-linux.h
vendored
@@ -54,10 +54,29 @@
|
||||
# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
|
||||
#endif
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
|
||||
|
||||
/* When MAP_HUGETLB is set, bits [26:31] encode the log2 of the huge page size.
|
||||
The following definitions are associated with this huge page size encoding.
|
||||
It is responsibility of the application to know which sizes are supported on
|
||||
the running system. See mmap(2) man page for details. */
|
||||
|
||||
#define MAP_HUGE_SHIFT 26
|
||||
#define MAP_HUGE_MASK 0x3f
|
||||
|
||||
#define MAP_HUGE_16KB (14 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_64KB (16 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_512KB (19 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_1MB (20 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_8MB (23 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_16MB (24 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_32MB (25 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_256MB (28 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_512MB (29 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_2GB (31 << MAP_HUGE_SHIFT)
|
||||
#define MAP_HUGE_16GB (34U << MAP_HUGE_SHIFT)
|
||||
|
||||
/* Flags to `msync'. */
|
||||
#define MS_ASYNC 1 /* Sync memory asynchronously. */
|
||||
#define MS_SYNC 4 /* Synchronous memory sync. */
|
||||
|
||||
27
lib/libc/include/generic-glibc/bits/mqueue2.h
vendored
27
lib/libc/include/generic-glibc/bits/mqueue2.h
vendored
@@ -29,6 +29,8 @@ extern mqd_t __mq_open_2 (const char *__name, int __oflag)
|
||||
extern mqd_t __REDIRECT_NTH (__mq_open_alias, (const char *__name,
|
||||
int __oflag, ...), mq_open)
|
||||
__nonnull ((1));
|
||||
|
||||
#ifdef __va_arg_pack_len
|
||||
__errordecl (__mq_open_wrong_number_of_args,
|
||||
"mq_open can be called either with 2 or 4 arguments");
|
||||
__errordecl (__mq_open_missing_mode_and_attr,
|
||||
@@ -54,4 +56,27 @@ __NTH (mq_open (const char *__name, int __oflag, ...))
|
||||
return __mq_open_2 (__name, __oflag);
|
||||
|
||||
return __mq_open_alias (__name, __oflag, __va_arg_pack ());
|
||||
}
|
||||
}
|
||||
#elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ mqd_t
|
||||
__NTH (mq_open (__fortify_clang_overload_arg (const char *, , __name),
|
||||
int __oflag, mode_t __mode, ...))
|
||||
__fortify_clang_unavailable ("mq_open can be called either with 2 or 4 arguments");
|
||||
|
||||
__fortify_function __attribute_overloadable__ mqd_t
|
||||
__NTH (mq_open (__fortify_clang_overload_arg (const char *, ,__name),
|
||||
int __oflag, mode_t __mode, struct mq_attr *__attr))
|
||||
{
|
||||
return __mq_open_alias (__name, __oflag, __mode, __attr);
|
||||
}
|
||||
|
||||
__fortify_function __attribute_overloadable__ mqd_t
|
||||
__NTH (mq_open (__fortify_clang_overload_arg (const char *, ,__name),
|
||||
int __oflag))
|
||||
__fortify_clang_prefer_this_overload
|
||||
__fortify_clang_error ((__oflag & O_CREAT),
|
||||
"mq_open with O_CREAT in second argument needs 4 arguments")
|
||||
{
|
||||
return __mq_open_alias (__name, __oflag);
|
||||
}
|
||||
#endif
|
||||
31
lib/libc/include/generic-glibc/bits/poll2.h
vendored
31
lib/libc/include/generic-glibc/bits/poll2.h
vendored
@@ -33,8 +33,13 @@ extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
|
||||
__poll_chk)
|
||||
__warnattr ("poll called with fds buffer too small file nfds entries");
|
||||
|
||||
__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
|
||||
poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
|
||||
__fortify_function __fortified_attr_access (__write_only__, 1, 2)
|
||||
__attribute_overloadable__ int
|
||||
poll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
|
||||
int __timeout)
|
||||
__fortify_clang_warning_only_if_bos_lt2 (__nfds, __fds, sizeof (*__fds),
|
||||
"poll called with fds buffer "
|
||||
"too small file nfds entries")
|
||||
{
|
||||
return __glibc_fortify (poll, __nfds, sizeof (*__fds),
|
||||
__glibc_objsize (__fds),
|
||||
@@ -43,7 +48,7 @@ poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
|
||||
|
||||
|
||||
#ifdef __USE_GNU
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
extern int __REDIRECT (__ppoll64_alias, (struct pollfd *__fds, nfds_t __nfds,
|
||||
const struct timespec *__timeout,
|
||||
const __sigset_t *__ss), __ppoll64);
|
||||
@@ -58,9 +63,13 @@ extern int __REDIRECT (__ppoll64_chk_warn, (struct pollfd *__fds, nfds_t __n,
|
||||
__ppoll64_chk)
|
||||
__warnattr ("ppoll called with fds buffer too small file nfds entries");
|
||||
|
||||
__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
|
||||
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
|
||||
const __sigset_t *__ss)
|
||||
__fortify_function __fortified_attr_access (__write_only__, 1, 2)
|
||||
__attribute_overloadable__ int
|
||||
ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
|
||||
const struct timespec *__timeout, const __sigset_t *__ss)
|
||||
__fortify_clang_warning_only_if_bos_lt2 (__nfds, __fds, sizeof (*__fds),
|
||||
"ppoll called with fds buffer "
|
||||
"too small file nfds entries")
|
||||
{
|
||||
return __glibc_fortify (ppoll64, __nfds, sizeof (*__fds),
|
||||
__glibc_objsize (__fds),
|
||||
@@ -81,9 +90,13 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
|
||||
__ppoll_chk)
|
||||
__warnattr ("ppoll called with fds buffer too small file nfds entries");
|
||||
|
||||
__fortify_function __fortified_attr_access (__write_only__, 1, 2) int
|
||||
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
|
||||
const __sigset_t *__ss)
|
||||
__fortify_function __fortified_attr_access (__write_only__, 1, 2)
|
||||
__attribute_overloadable__ int
|
||||
ppoll (__fortify_clang_overload_arg (struct pollfd *, ,__fds), nfds_t __nfds,
|
||||
const struct timespec *__timeout, const __sigset_t *__ss)
|
||||
__fortify_clang_warning_only_if_bos_lt2 (__nfds, __fds, sizeof (*__fds),
|
||||
"ppoll called with fds buffer "
|
||||
"too small file nfds entries")
|
||||
{
|
||||
return __glibc_fortify (ppoll, __nfds, sizeof (*__fds),
|
||||
__glibc_objsize (__fds),
|
||||
|
||||
37
lib/libc/include/generic-glibc/bits/rseq.h
vendored
37
lib/libc/include/generic-glibc/bits/rseq.h
vendored
@@ -1,4 +1,4 @@
|
||||
/* Restartable Sequences Linux mips architecture header.
|
||||
/* Restartable Sequences architecture header. Stub version.
|
||||
Copyright (C) 2021-2024 Free Software Foundation, Inc.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -26,37 +26,4 @@
|
||||
architecture. When choosing this value, it needs to be taken into
|
||||
account that generating invalid instructions may have ill effects on
|
||||
tools like objdump, and may also have impact on the CPU speculative
|
||||
execution efficiency in some cases.
|
||||
|
||||
RSEQ_SIG uses the break instruction. The instruction pattern is:
|
||||
|
||||
On MIPS:
|
||||
0350000d break 0x350
|
||||
|
||||
On nanoMIPS:
|
||||
00100350 break 0x350
|
||||
|
||||
On microMIPS:
|
||||
0000d407 break 0x350
|
||||
|
||||
For nanoMIPS32 and microMIPS, the instruction stream is encoded as
|
||||
16-bit halfwords, so the signature halfwords need to be swapped
|
||||
accordingly for little-endian. */
|
||||
|
||||
#if defined (__nanomips__)
|
||||
# ifdef __MIPSEL__
|
||||
# define RSEQ_SIG 0x03500010
|
||||
# else
|
||||
# define RSEQ_SIG 0x00100350
|
||||
# endif
|
||||
#elif defined (__mips_micromips)
|
||||
# ifdef __MIPSEL__
|
||||
# define RSEQ_SIG 0xd4070000
|
||||
# else
|
||||
# define RSEQ_SIG 0x0000d407
|
||||
# endif
|
||||
#elif defined (__mips__)
|
||||
# define RSEQ_SIG 0x0350000d
|
||||
#else
|
||||
/* Unknown MIPS architecture. */
|
||||
#endif
|
||||
execution efficiency in some cases. */
|
||||
22
lib/libc/include/generic-glibc/bits/shm.h
vendored
22
lib/libc/include/generic-glibc/bits/shm.h
vendored
@@ -58,6 +58,28 @@ typedef __syscall_ulong_t shmatt_t;
|
||||
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
|
||||
# define SHM_NORESERVE 010000 /* don't check for reservations */
|
||||
|
||||
/* When SHM_HUGETLB is set, bits [26:31] encode the log2 of the huge page size.
|
||||
The following definitions are associated with this huge page size encoding.
|
||||
It is responsibility of the application to know which sizes are supported on
|
||||
the running system. See shmget(2) man page for details. */
|
||||
|
||||
#define SHM_HUGE_SHIFT 26
|
||||
#define SHM_HUGE_MASK 0x3f
|
||||
|
||||
#define SHM_HUGE_16KB (14 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_64KB (16 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_512KB (19 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_1MB (20 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_2MB (21 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_8MB (23 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_16MB (24 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_32MB (25 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_256MB (28 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_512MB (29 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_1GB (30 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_2GB (31 << SHM_HUGE_SHIFT)
|
||||
#define SHM_HUGE_16GB (34U << SHM_HUGE_SHIFT)
|
||||
|
||||
struct shminfo
|
||||
{
|
||||
__syscall_ulong_t shmmax;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
# define SO_TIMESTAMPNS_NEW 64
|
||||
# define SO_TIMESTAMPING_NEW 65
|
||||
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# define SO_RCVTIMEO SO_RCVTIMEO_NEW
|
||||
# define SO_SNDTIMEO SO_SNDTIMEO_NEW
|
||||
# define SO_TIMESTAMP SO_TIMESTAMP_NEW
|
||||
|
||||
5
lib/libc/include/generic-glibc/bits/socket.h
vendored
5
lib/libc/include/generic-glibc/bits/socket.h
vendored
@@ -172,6 +172,7 @@ typedef __socklen_t socklen_t;
|
||||
#define SOL_MPTCP 284
|
||||
#define SOL_MCTP 285
|
||||
#define SOL_SMC 286
|
||||
#define SOL_VSOCK 287
|
||||
|
||||
/* Maximum queue length specifiable by listen. */
|
||||
#define SOMAXCONN 4096
|
||||
@@ -180,7 +181,7 @@ typedef __socklen_t socklen_t;
|
||||
#include <bits/sockaddr.h>
|
||||
|
||||
/* Structure describing a generic socket address. */
|
||||
struct sockaddr
|
||||
struct __attribute_struct_may_alias__ sockaddr
|
||||
{
|
||||
__SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
|
||||
char sa_data[14]; /* Address data. */
|
||||
@@ -193,7 +194,7 @@ struct sockaddr
|
||||
#define _SS_PADSIZE \
|
||||
(_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype))
|
||||
|
||||
struct sockaddr_storage
|
||||
struct __attribute_struct_may_alias__ sockaddr_storage
|
||||
{
|
||||
__SOCKADDR_COMMON (ss_); /* Address family, etc. */
|
||||
char __ss_padding[_SS_PADSIZE];
|
||||
|
||||
20
lib/libc/include/generic-glibc/bits/socket2.h
vendored
20
lib/libc/include/generic-glibc/bits/socket2.h
vendored
@@ -30,14 +30,20 @@ extern ssize_t __REDIRECT (__recv_chk_warn,
|
||||
__warnattr ("recv called with bigger length than size of destination "
|
||||
"buffer");
|
||||
|
||||
__fortify_function ssize_t
|
||||
recv (int __fd, void *__buf, size_t __n, int __flags)
|
||||
__fortify_function __attribute_overloadable__ ssize_t
|
||||
recv (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __n,
|
||||
int __flags)
|
||||
__fortify_clang_warning_only_if_bos0_lt (__n, __buf,
|
||||
"recv called with bigger length than "
|
||||
"size of destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize0 (__buf);
|
||||
if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
|
||||
return __recv_alias (__fd, __buf, __n, __flags);
|
||||
#if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, sizeof (char), sz))
|
||||
return __recv_chk_warn (__fd, __buf, __n, sz, __flags);
|
||||
#endif
|
||||
return __recv_chk (__fd, __buf, __n, sz, __flags);
|
||||
}
|
||||
|
||||
@@ -57,15 +63,21 @@ extern ssize_t __REDIRECT (__recvfrom_chk_warn,
|
||||
__warnattr ("recvfrom called with bigger length than size of "
|
||||
"destination buffer");
|
||||
|
||||
__fortify_function ssize_t
|
||||
recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
|
||||
__fortify_function __attribute_overloadable__ ssize_t
|
||||
recvfrom (int __fd, __fortify_clang_overload_arg0 (void *, __restrict, __buf),
|
||||
size_t __n, int __flags,
|
||||
__SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
|
||||
__fortify_clang_warning_only_if_bos0_lt (__n, __buf,
|
||||
"recvfrom called with bigger length "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize0 (__buf);
|
||||
if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
|
||||
return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
|
||||
#if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, sizeof (char), sz))
|
||||
return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr,
|
||||
__addr_len);
|
||||
#endif
|
||||
return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len);
|
||||
}
|
||||
@@ -42,6 +42,7 @@
|
||||
# define STATX_BTIME 0x0800U
|
||||
# define STATX_MNT_ID 0x1000U
|
||||
# define STATX_DIOALIGN 0x2000U
|
||||
# define STATX_MNT_ID_UNIQUE 0x4000U
|
||||
# define STATX__RESERVED 0x80000000U
|
||||
|
||||
# define STATX_ATTR_COMPRESSED 0x0004
|
||||
|
||||
@@ -28,7 +28,7 @@ __LDBL_REDIR_DECL (vprintf)
|
||||
__LDBL_REDIR_DECL (vsprintf)
|
||||
#if !__GLIBC_USE (DEPRECATED_SCANF)
|
||||
# if defined __LDBL_COMPAT
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc23_fscanf)
|
||||
__LDBL_REDIR1_DECL (scanf, __nldbl___isoc23_scanf)
|
||||
__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc23_sscanf)
|
||||
@@ -38,7 +38,7 @@ __LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
|
||||
__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
|
||||
# endif
|
||||
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (fscanf, __isoc23_fscanfieee128)
|
||||
__LDBL_REDIR1_DECL (scanf, __isoc23_scanfieee128)
|
||||
__LDBL_REDIR1_DECL (sscanf, __isoc23_sscanfieee128)
|
||||
@@ -64,7 +64,7 @@ __LDBL_REDIR_DECL (vsnprintf)
|
||||
#ifdef __USE_ISOC99
|
||||
# if !__GLIBC_USE (DEPRECATED_SCANF)
|
||||
# if defined __LDBL_COMPAT
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc23_vfscanf)
|
||||
__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc23_vscanf)
|
||||
__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc23_vsscanf)
|
||||
@@ -74,7 +74,7 @@ __LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
|
||||
__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
|
||||
# endif
|
||||
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (vfscanf, __isoc23_vfscanfieee128)
|
||||
__LDBL_REDIR1_DECL (vscanf, __isoc23_vscanfieee128)
|
||||
__LDBL_REDIR1_DECL (vsscanf, __isoc23_vsscanfieee128)
|
||||
|
||||
173
lib/libc/include/generic-glibc/bits/stdio2.h
vendored
173
lib/libc/include/generic-glibc/bits/stdio2.h
vendored
@@ -31,15 +31,29 @@ __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
|
||||
__glibc_objsize (__s), __fmt,
|
||||
__va_arg_pack ());
|
||||
}
|
||||
#elif __fortify_use_clang
|
||||
/* clang does not have __va_arg_pack, so defer to va_arg version. */
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
__NTH (sprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
|
||||
const char *__restrict __fmt, ...))
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|
||||
__glibc_objsize (__s), __fmt,
|
||||
__fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
#elif !defined __cplusplus
|
||||
# define sprintf(str, ...) \
|
||||
__builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, \
|
||||
__glibc_objsize (str), __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
__fortify_function int
|
||||
__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
|
||||
__gnuc_va_list __ap))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (vsprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
|
||||
const char *__restrict __fmt, __gnuc_va_list __ap))
|
||||
{
|
||||
return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|
||||
__glibc_objsize (__s), __fmt, __ap);
|
||||
@@ -55,15 +69,33 @@ __NTH (snprintf (char *__restrict __s, size_t __n,
|
||||
__glibc_objsize (__s), __fmt,
|
||||
__va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
/* clang does not have __va_arg_pack, so defer to va_arg version. */
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
__NTH (snprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
|
||||
size_t __n, const char *__restrict __fmt, ...))
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
|
||||
__glibc_objsize (__s), __fmt,
|
||||
__fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
# elif !defined __cplusplus
|
||||
# define snprintf(str, len, ...) \
|
||||
__builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, \
|
||||
__glibc_objsize (str), __VA_ARGS__)
|
||||
# endif
|
||||
|
||||
__fortify_function int
|
||||
__NTH (vsnprintf (char *__restrict __s, size_t __n,
|
||||
const char *__restrict __fmt, __gnuc_va_list __ap))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (vsnprintf (__fortify_clang_overload_arg (char *, __restrict, __s),
|
||||
size_t __n, const char *__restrict __fmt,
|
||||
__gnuc_va_list __ap))
|
||||
__fortify_clang_warning (__fortify_clang_bos_static_lt (__n, __s),
|
||||
"call to vsnprintf may overflow the destination "
|
||||
"buffer")
|
||||
{
|
||||
return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
|
||||
__glibc_objsize (__s), __fmt, __ap);
|
||||
@@ -85,6 +117,30 @@ printf (const char *__restrict __fmt, ...)
|
||||
{
|
||||
return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
/* clang does not have __va_arg_pack, so defer to va_arg version. */
|
||||
__fortify_function_error_function __attribute_overloadable__ __nonnull ((1)) int
|
||||
fprintf (__fortify_clang_overload_arg (FILE *, __restrict, __stream),
|
||||
const char *__restrict __fmt, ...)
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __builtin___vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1,
|
||||
__fmt, __fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
printf (__fortify_clang_overload_arg (const char *, __restrict, __fmt), ...)
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __builtin___vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt,
|
||||
__fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
# elif !defined __cplusplus
|
||||
# define printf(...) \
|
||||
__printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||
@@ -92,8 +148,9 @@ printf (const char *__restrict __fmt, ...)
|
||||
__fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||
# endif
|
||||
|
||||
__fortify_function int
|
||||
vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
vprintf (__fortify_clang_overload_arg (const char *, __restrict, __fmt),
|
||||
__gnuc_va_list __ap)
|
||||
{
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
||||
@@ -117,6 +174,18 @@ dprintf (int __fd, const char *__restrict __fmt, ...)
|
||||
return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||
__va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
dprintf (int __fd, __fortify_clang_overload_arg (const char *, __restrict,
|
||||
__fmt), ...)
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||
__fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
# elif !defined __cplusplus
|
||||
# define dprintf(fd, ...) \
|
||||
__dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||
@@ -153,6 +222,43 @@ __NTH (obstack_printf (struct obstack *__restrict __obstack,
|
||||
return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||
__va_arg_pack ());
|
||||
}
|
||||
# elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
__NTH (asprintf (__fortify_clang_overload_arg (char **, __restrict, __ptr),
|
||||
const char *__restrict __fmt, ...))
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||
__fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
__NTH (__asprintf (__fortify_clang_overload_arg (char **, __restrict, __ptr),
|
||||
const char *__restrict __fmt, ...))
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
|
||||
__fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
__NTH (obstack_printf (__fortify_clang_overload_arg (struct obstack *,
|
||||
__restrict, __obstack),
|
||||
const char *__restrict __fmt, ...))
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r = __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1,
|
||||
__fmt, __fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
# elif !defined __cplusplus
|
||||
# define asprintf(ptr, ...) \
|
||||
__asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||
@@ -182,8 +288,11 @@ __NTH (obstack_vprintf (struct obstack *__restrict __obstack,
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (DEPRECATED_GETS)
|
||||
__fortify_function __wur char *
|
||||
gets (char *__str)
|
||||
__fortify_function __wur __attribute_overloadable__ char *
|
||||
gets (__fortify_clang_overload_arg (char *, , __str))
|
||||
__fortify_clang_warning (__glibc_objsize (__str) == (size_t) -1,
|
||||
"please use fgets or getline instead, gets "
|
||||
"can not specify buffer size")
|
||||
{
|
||||
if (__glibc_objsize (__str) != (size_t) -1)
|
||||
return __gets_chk (__str, __glibc_objsize (__str));
|
||||
@@ -192,48 +301,70 @@ gets (char *__str)
|
||||
#endif
|
||||
|
||||
__fortify_function __wur __fortified_attr_access (__write_only__, 1, 2)
|
||||
__nonnull ((3)) char *
|
||||
fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
|
||||
__nonnull ((3)) __attribute_overloadable__ char *
|
||||
fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
|
||||
FILE *__restrict __stream)
|
||||
__fortify_clang_warning (__fortify_clang_bos_static_lt (__n, __s) && __n > 0,
|
||||
"fgets called with bigger size than length of "
|
||||
"destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize (__s);
|
||||
if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
|
||||
return __fgets_alias (__s, __n, __stream);
|
||||
#if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, sizeof (char), sz))
|
||||
return __fgets_chk_warn (__s, sz, __n, __stream);
|
||||
#endif
|
||||
return __fgets_chk (__s, sz, __n, __stream);
|
||||
}
|
||||
|
||||
__fortify_function __wur __nonnull ((4)) size_t
|
||||
fread (void *__restrict __ptr, size_t __size, size_t __n,
|
||||
FILE *__restrict __stream)
|
||||
__fortify_function __wur __nonnull ((4)) __attribute_overloadable__ size_t
|
||||
fread (__fortify_clang_overload_arg (void *, __restrict, __ptr),
|
||||
size_t __size, size_t __n, FILE *__restrict __stream)
|
||||
__fortify_clang_warning (__fortify_clang_bos0_static_lt (__size * __n, __ptr)
|
||||
&& !__fortify_clang_mul_may_overflow (__size, __n),
|
||||
"fread called with bigger size * n than length "
|
||||
"of destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize0 (__ptr);
|
||||
if (__glibc_safe_or_unknown_len (__n, __size, sz))
|
||||
return __fread_alias (__ptr, __size, __n, __stream);
|
||||
#if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, __size, sz))
|
||||
return __fread_chk_warn (__ptr, sz, __size, __n, __stream);
|
||||
#endif
|
||||
return __fread_chk (__ptr, sz, __size, __n, __stream);
|
||||
}
|
||||
|
||||
#ifdef __USE_GNU
|
||||
__fortify_function __wur __fortified_attr_access (__write_only__, 1, 2)
|
||||
__nonnull ((3)) char *
|
||||
fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
|
||||
__nonnull ((3)) __attribute_overloadable__ char *
|
||||
fgets_unlocked (__fortify_clang_overload_arg (char *, __restrict, __s),
|
||||
int __n, FILE *__restrict __stream)
|
||||
__fortify_clang_warning (__fortify_clang_bos_static_lt (__n, __s) && __n > 0,
|
||||
"fgets called with bigger size than length of "
|
||||
"destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize (__s);
|
||||
if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz))
|
||||
return __fgets_unlocked_alias (__s, __n, __stream);
|
||||
#if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, sizeof (char), sz))
|
||||
return __fgets_unlocked_chk_warn (__s, sz, __n, __stream);
|
||||
#endif
|
||||
return __fgets_unlocked_chk (__s, sz, __n, __stream);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __USE_MISC
|
||||
# undef fread_unlocked
|
||||
__fortify_function __wur __nonnull ((4)) size_t
|
||||
fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
|
||||
FILE *__restrict __stream)
|
||||
__fortify_function __wur __nonnull ((4)) __attribute_overloadable__ size_t
|
||||
fread_unlocked (__fortify_clang_overload_arg0 (void *, __restrict, __ptr),
|
||||
size_t __size, size_t __n, FILE *__restrict __stream)
|
||||
__fortify_clang_warning (__fortify_clang_bos0_static_lt (__size * __n, __ptr)
|
||||
&& !__fortify_clang_mul_may_overflow (__size, __n),
|
||||
"fread_unlocked called with bigger size * n than "
|
||||
"length of destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize0 (__ptr);
|
||||
if (__glibc_safe_or_unknown_len (__n, __size, sz))
|
||||
@@ -261,8 +392,10 @@ fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
|
||||
# endif
|
||||
return __fread_unlocked_alias (__ptr, __size, __n, __stream);
|
||||
}
|
||||
# if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, __size, sz))
|
||||
return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream);
|
||||
# endif
|
||||
return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream);
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ __LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
# ifdef __LDBL_COMPAT
|
||||
__LDBL_REDIR1_DECL (strfroml, strfromd)
|
||||
# else
|
||||
|
||||
39
lib/libc/include/generic-glibc/bits/stdlib.h
vendored
39
lib/libc/include/generic-glibc/bits/stdlib.h
vendored
@@ -33,15 +33,22 @@ extern char *__REDIRECT_NTH (__realpath_chk_warn,
|
||||
__warnattr ("second argument of realpath must be either NULL or at "
|
||||
"least PATH_MAX bytes long buffer");
|
||||
|
||||
__fortify_function __wur char *
|
||||
__NTH (realpath (const char *__restrict __name, char *__restrict __resolved))
|
||||
__fortify_function __attribute_overloadable__ __wur char *
|
||||
__NTH (realpath (const char *__restrict __name,
|
||||
__fortify_clang_overload_arg (char *, __restrict, __resolved)))
|
||||
#if defined _LIBC_LIMITS_H_ && defined PATH_MAX
|
||||
__fortify_clang_warning_only_if_bos_lt (PATH_MAX, __resolved,
|
||||
"second argument of realpath must be "
|
||||
"either NULL or at least PATH_MAX "
|
||||
"bytes long buffer")
|
||||
#endif
|
||||
{
|
||||
size_t sz = __glibc_objsize (__resolved);
|
||||
|
||||
if (sz == (size_t) -1)
|
||||
return __realpath_alias (__name, __resolved);
|
||||
|
||||
#if defined _LIBC_LIMITS_H_ && defined PATH_MAX
|
||||
#if !__fortify_use_clang && defined _LIBC_LIMITS_H_ && defined PATH_MAX
|
||||
if (__glibc_unsafe_len (PATH_MAX, sizeof (char), sz))
|
||||
return __realpath_chk_warn (__name, __resolved, sz);
|
||||
#endif
|
||||
@@ -61,8 +68,13 @@ extern int __REDIRECT_NTH (__ptsname_r_chk_warn,
|
||||
__nonnull ((2)) __warnattr ("ptsname_r called with buflen bigger than "
|
||||
"size of buf");
|
||||
|
||||
__fortify_function int
|
||||
__NTH (ptsname_r (int __fd, char *__buf, size_t __buflen))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (ptsname_r (int __fd,
|
||||
__fortify_clang_overload_arg (char *, ,__buf),
|
||||
size_t __buflen))
|
||||
__fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
|
||||
"ptsname_r called with buflen "
|
||||
"bigger than size of buf")
|
||||
{
|
||||
return __glibc_fortify (ptsname_r, __buflen, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -75,8 +87,8 @@ extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
|
||||
extern int __REDIRECT_NTH (__wctomb_alias, (char *__s, wchar_t __wchar),
|
||||
wctomb) __wur;
|
||||
|
||||
__fortify_function __wur int
|
||||
__NTH (wctomb (char *__s, wchar_t __wchar))
|
||||
__fortify_function __attribute_overloadable__ __wur int
|
||||
__NTH (wctomb (__fortify_clang_overload_arg (char *, ,__s), wchar_t __wchar))
|
||||
{
|
||||
/* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
|
||||
But this would only disturb the namespace. So we define our own
|
||||
@@ -113,9 +125,13 @@ extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn,
|
||||
__warnattr ("mbstowcs called with dst buffer smaller than len "
|
||||
"* sizeof (wchar_t)");
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src,
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (mbstowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst),
|
||||
const char *__restrict __src,
|
||||
size_t __len))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__len, __dst, sizeof (wchar_t),
|
||||
"mbstowcs called with dst buffer "
|
||||
"smaller than len * sizeof (wchar_t)")
|
||||
{
|
||||
if (__builtin_constant_p (__dst == NULL) && __dst == NULL)
|
||||
return __mbstowcs_nulldst (__dst, __src, __len);
|
||||
@@ -139,8 +155,9 @@ extern size_t __REDIRECT_NTH (__wcstombs_chk_warn,
|
||||
size_t __len, size_t __dstlen), __wcstombs_chk)
|
||||
__warnattr ("wcstombs called with dst buffer smaller than len");
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src,
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (wcstombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
|
||||
const wchar_t *__restrict __src,
|
||||
size_t __len))
|
||||
{
|
||||
return __glibc_fortify (wcstombs, __len, sizeof (char),
|
||||
|
||||
@@ -73,24 +73,29 @@ __NTH (explicit_bzero (void *__dest, size_t __len))
|
||||
}
|
||||
#endif
|
||||
|
||||
__fortify_function char *
|
||||
__NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src))
|
||||
__fortify_clang_warn_if_src_too_large (__dest, __src)
|
||||
{
|
||||
return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest));
|
||||
}
|
||||
|
||||
#ifdef __USE_XOPEN2K8
|
||||
__fortify_function char *
|
||||
__NTH (stpcpy (char *__restrict __dest, const char *__restrict __src))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (stpcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src))
|
||||
__fortify_clang_warn_if_src_too_large (__dest, __src)
|
||||
{
|
||||
return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
__fortify_function char *
|
||||
__NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
|
||||
size_t __len))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (strncpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src, size_t __len))
|
||||
__fortify_clang_warn_if_dest_too_small (__dest, __len)
|
||||
{
|
||||
return __builtin___strncpy_chk (__dest, __src, __len,
|
||||
__glibc_objsize (__dest));
|
||||
@@ -98,8 +103,10 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
|
||||
|
||||
#ifdef __USE_XOPEN2K8
|
||||
# if __GNUC_PREREQ (4, 7) || __glibc_clang_prereq (2, 6)
|
||||
__fortify_function char *
|
||||
__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest),
|
||||
const char *__src, size_t __n))
|
||||
__fortify_clang_warn_if_dest_too_small (__dest, __n)
|
||||
{
|
||||
return __builtin___stpncpy_chk (__dest, __src, __n,
|
||||
__glibc_objsize (__dest));
|
||||
@@ -112,8 +119,9 @@ extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
|
||||
extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
|
||||
size_t __n), stpncpy);
|
||||
|
||||
__fortify_function char *
|
||||
__NTH (stpncpy (char *__dest, const char *__src, size_t __n))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (stpncpy (__fortify_clang_overload_arg (char *, ,__dest),
|
||||
const char *__src, size_t __n))
|
||||
{
|
||||
if (__bos (__dest) != (size_t) -1
|
||||
&& (!__builtin_constant_p (__n) || __n > __bos (__dest)))
|
||||
@@ -124,16 +132,19 @@ __NTH (stpncpy (char *__dest, const char *__src, size_t __n))
|
||||
#endif
|
||||
|
||||
|
||||
__fortify_function char *
|
||||
__NTH (strcat (char *__restrict __dest, const char *__restrict __src))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (strcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src))
|
||||
__fortify_clang_warn_if_src_too_large (__dest, __src)
|
||||
{
|
||||
return __builtin___strcat_chk (__dest, __src, __glibc_objsize (__dest));
|
||||
}
|
||||
|
||||
|
||||
__fortify_function char *
|
||||
__NTH (strncat (char *__restrict __dest, const char *__restrict __src,
|
||||
size_t __len))
|
||||
__fortify_function __attribute_overloadable__ char *
|
||||
__NTH (strncat (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src, size_t __len))
|
||||
__fortify_clang_warn_if_src_too_large (__dest, __src)
|
||||
{
|
||||
return __builtin___strncat_chk (__dest, __src, __len,
|
||||
__glibc_objsize (__dest));
|
||||
@@ -146,9 +157,10 @@ extern size_t __REDIRECT_NTH (__strlcpy_alias,
|
||||
(char *__dest, const char *__src, size_t __n),
|
||||
strlcpy);
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (strlcpy (char *__restrict __dest, const char *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (strlcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src, size_t __n))
|
||||
__fortify_clang_warn_if_dest_too_small (__dest, __n)
|
||||
{
|
||||
if (__glibc_objsize (__dest) != (size_t) -1
|
||||
&& (!__builtin_constant_p (__n > __glibc_objsize (__dest))
|
||||
@@ -163,9 +175,9 @@ extern size_t __REDIRECT_NTH (__strlcat_alias,
|
||||
(char *__dest, const char *__src, size_t __n),
|
||||
strlcat);
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (strlcat (char *__restrict __dest, const char *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (strlcat (__fortify_clang_overload_arg (char *, __restrict, __dest),
|
||||
const char *__restrict __src, size_t __n))
|
||||
{
|
||||
if (__glibc_objsize (__dest) != (size_t) -1
|
||||
&& (!__builtin_constant_p (__n > __glibc_objsize (__dest))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/* Structure describing file characteristics. */
|
||||
struct stat
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
unsigned long int st_dev;
|
||||
@@ -82,13 +82,13 @@ struct stat
|
||||
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
|
||||
# endif
|
||||
long int st_pad5[14];
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
|
||||
# ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
unsigned long int st_dev;
|
||||
@@ -123,7 +123,7 @@ struct stat64
|
||||
long int st_pad3;
|
||||
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
|
||||
long int st_pad4[14];
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
# endif /* __USE_LARGEFILE64 */
|
||||
|
||||
@@ -131,7 +131,7 @@ struct stat64
|
||||
|
||||
struct stat
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev;
|
||||
@@ -189,7 +189,7 @@ struct stat
|
||||
#ifdef __USE_LARGEFILE64
|
||||
struct stat64
|
||||
{
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/struct_stat_time64_helper.h>
|
||||
# else
|
||||
__dev_t st_dev;
|
||||
@@ -224,7 +224,7 @@ struct stat64
|
||||
unsigned int st_pad3;
|
||||
__blkcnt64_t st_blocks;
|
||||
int st_pad4[14];
|
||||
# endif /* __USE_TIME_BITS64 */
|
||||
# endif /* __USE_TIME64_REDIRECTS */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
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.7. */
|
||||
/* The system call list corresponds to kernel 6.9. */
|
||||
|
||||
#ifndef _SYSCALL_H
|
||||
# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
|
||||
#endif
|
||||
|
||||
#define __GLIBC_LINUX_VERSION_CODE 395008
|
||||
#define __GLIBC_LINUX_VERSION_CODE 395520
|
||||
|
||||
#ifdef __NR_FAST_atomic_update
|
||||
# define SYS_FAST_atomic_update __NR_FAST_atomic_update
|
||||
@@ -867,6 +867,10 @@
|
||||
# define SYS_listen __NR_listen
|
||||
#endif
|
||||
|
||||
#ifdef __NR_listmount
|
||||
# define SYS_listmount __NR_listmount
|
||||
#endif
|
||||
|
||||
#ifdef __NR_listxattr
|
||||
# define SYS_listxattr __NR_listxattr
|
||||
#endif
|
||||
@@ -899,6 +903,18 @@
|
||||
# define SYS_lsetxattr __NR_lsetxattr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_lsm_get_self_attr
|
||||
# define SYS_lsm_get_self_attr __NR_lsm_get_self_attr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_lsm_list_modules
|
||||
# define SYS_lsm_list_modules __NR_lsm_list_modules
|
||||
#endif
|
||||
|
||||
#ifdef __NR_lsm_set_self_attr
|
||||
# define SYS_lsm_set_self_attr __NR_lsm_set_self_attr
|
||||
#endif
|
||||
|
||||
#ifdef __NR_lstat
|
||||
# define SYS_lstat __NR_lstat
|
||||
#endif
|
||||
@@ -2283,6 +2299,10 @@
|
||||
# define SYS_statfs64 __NR_statfs64
|
||||
#endif
|
||||
|
||||
#ifdef __NR_statmount
|
||||
# define SYS_statmount __NR_statmount
|
||||
#endif
|
||||
|
||||
#ifdef __NR_statx
|
||||
# define SYS_statx __NR_statx
|
||||
#endif
|
||||
|
||||
14
lib/libc/include/generic-glibc/bits/syslog.h
vendored
14
lib/libc/include/generic-glibc/bits/syslog.h
vendored
@@ -36,6 +36,15 @@ syslog (int __pri, const char *__fmt, ...)
|
||||
{
|
||||
__syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
|
||||
}
|
||||
#elif __fortify_use_clang && defined __USE_MISC
|
||||
__fortify_function_error_function __attribute_overloadable__ void
|
||||
syslog (int __pri, __fortify_clang_overload_arg (const char *, , __fmt), ...)
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
__vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
}
|
||||
#elif !defined __cplusplus
|
||||
# define syslog(pri, ...) \
|
||||
__syslog_chk (pri, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
|
||||
@@ -43,8 +52,9 @@ syslog (int __pri, const char *__fmt, ...)
|
||||
|
||||
|
||||
#ifdef __USE_MISC
|
||||
__fortify_function void
|
||||
vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
|
||||
__fortify_function __attribute_overloadable__ void
|
||||
vsyslog (int __pri, __fortify_clang_overload_arg (const char *, ,__fmt),
|
||||
__gnuc_va_list __ap)
|
||||
{
|
||||
__vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
|
||||
}
|
||||
|
||||
2
lib/libc/include/generic-glibc/bits/time.h
vendored
2
lib/libc/include/generic-glibc/bits/time.h
vendored
@@ -77,7 +77,7 @@ __BEGIN_DECLS
|
||||
/* Tune a POSIX clock. */
|
||||
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2));
|
||||
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# if defined(__REDIRECT_NTH)
|
||||
extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id,
|
||||
struct timex *__utx),
|
||||
|
||||
2
lib/libc/include/generic-glibc/bits/timex.h
vendored
2
lib/libc/include/generic-glibc/bits/timex.h
vendored
@@ -25,7 +25,7 @@
|
||||
|
||||
struct timex
|
||||
{
|
||||
# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32)
|
||||
# if defined __USE_TIME64_REDIRECTS || (__TIMESIZE == 64 && __WORDSIZE == 32)
|
||||
unsigned int modes; /* mode selector */
|
||||
int :32; /* pad */
|
||||
long long offset; /* time offset (usec) */
|
||||
|
||||
@@ -92,10 +92,10 @@ struct _IO_FILE_complete
|
||||
struct _IO_wide_data *_wide_data;
|
||||
struct _IO_FILE *_freeres_list;
|
||||
void *_freeres_buf;
|
||||
size_t __pad5;
|
||||
struct _IO_FILE **_prevchain;
|
||||
int _mode;
|
||||
/* Make sure we don't get into trouble again. */
|
||||
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
|
||||
char _unused2[15 * sizeof (int) - 5 * sizeof (void *)];
|
||||
};
|
||||
|
||||
/* These macros are used by bits/stdio.h and internal headers. */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
The type `struct msg' is opaque. */
|
||||
struct msqid_ds
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/types/struct_msqid64_ds_helper.h>
|
||||
#else
|
||||
struct ipc_perm msg_perm; /* structure describing operation permission */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/* Data structure describing a set of semaphores. */
|
||||
struct semid_ds
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/types/struct_semid64_ds_helper.h>
|
||||
#else
|
||||
struct ipc_perm sem_perm; /* operation permission struct */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/* Data structure describing a shared memory segment. */
|
||||
struct shmid_ds
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
# include <bits/types/struct_shmid64_ds_helper.h>
|
||||
#else
|
||||
struct ipc_perm shm_perm; /* operation permission struct */
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
has nanoseconds instead of microseconds. */
|
||||
struct timespec
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
__time64_t tv_sec; /* Seconds. */
|
||||
#else
|
||||
__time_t tv_sec; /* Seconds. */
|
||||
#endif
|
||||
#if __WORDSIZE == 64 \
|
||||
|| (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
|
||||
|| (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
|
||||
|| (__TIMESIZE == 32 && !defined __USE_TIME64_REDIRECTS)
|
||||
__syscall_slong_t tv_nsec; /* Nanoseconds. */
|
||||
#else
|
||||
# if __BYTE_ORDER == __BIG_ENDIAN
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
microsecond but also has a range of years. */
|
||||
struct timeval
|
||||
{
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
__time64_t tv_sec; /* Seconds. */
|
||||
__suseconds64_t tv_usec; /* Microseconds. */
|
||||
#else
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <bits/types.h>
|
||||
|
||||
/* Returned by `time'. */
|
||||
#ifdef __USE_TIME_BITS64
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
typedef __time64_t time_t;
|
||||
#else
|
||||
typedef __time_t time_t;
|
||||
|
||||
46
lib/libc/include/generic-glibc/bits/typesizes.h
vendored
46
lib/libc/include/generic-glibc/bits/typesizes.h
vendored
@@ -1,5 +1,5 @@
|
||||
/* bits/typesizes.h -- underlying types for *_t. MIPS version.
|
||||
Copyright (C) 2002-2024 Free Software Foundation, Inc.
|
||||
/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
|
||||
Copyright (C) 2011-2024 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -13,7 +13,7 @@
|
||||
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
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _BITS_TYPES_H
|
||||
@@ -25,44 +25,57 @@
|
||||
|
||||
/* See <bits/types.h> for the meaning of these macros. This file exists so
|
||||
that <bits/types.h> need not vary across different GNU platforms. */
|
||||
#if __TIMESIZE == 64 && __WORDSIZE == 32
|
||||
/* These are the "new" y2038 types defined for architectures added after
|
||||
the 5.1 kernel. */
|
||||
# define __INO_T_TYPE __UQUAD_TYPE
|
||||
# define __OFF_T_TYPE __SQUAD_TYPE
|
||||
# define __RLIM_T_TYPE __UQUAD_TYPE
|
||||
# define __BLKCNT_T_TYPE __SQUAD_TYPE
|
||||
# define __FSBLKCNT_T_TYPE __UQUAD_TYPE
|
||||
# define __FSFILCNT_T_TYPE __UQUAD_TYPE
|
||||
# define __TIME_T_TYPE __SQUAD_TYPE
|
||||
# define __SUSECONDS_T_TYPE __SQUAD_TYPE
|
||||
#else
|
||||
# define __INO_T_TYPE __ULONGWORD_TYPE
|
||||
# define __OFF_T_TYPE __SLONGWORD_TYPE
|
||||
# define __RLIM_T_TYPE __ULONGWORD_TYPE
|
||||
# define __BLKCNT_T_TYPE __SLONGWORD_TYPE
|
||||
# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
|
||||
# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
|
||||
# define __TIME_T_TYPE __SLONGWORD_TYPE
|
||||
# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
|
||||
#endif
|
||||
|
||||
#define __DEV_T_TYPE __UQUAD_TYPE
|
||||
#define __UID_T_TYPE __U32_TYPE
|
||||
#define __GID_T_TYPE __U32_TYPE
|
||||
#define __INO_T_TYPE __ULONGWORD_TYPE
|
||||
#define __INO64_T_TYPE __UQUAD_TYPE
|
||||
#define __MODE_T_TYPE __U32_TYPE
|
||||
#define __NLINK_T_TYPE __UWORD_TYPE
|
||||
#define __OFF_T_TYPE __SLONGWORD_TYPE
|
||||
#define __NLINK_T_TYPE __U32_TYPE
|
||||
#define __OFF64_T_TYPE __SQUAD_TYPE
|
||||
#define __PID_T_TYPE __S32_TYPE
|
||||
#define __RLIM_T_TYPE __ULONGWORD_TYPE
|
||||
#define __RLIM64_T_TYPE __UQUAD_TYPE
|
||||
#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
|
||||
#define __BLKCNT64_T_TYPE __SQUAD_TYPE
|
||||
#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
|
||||
#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
|
||||
#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
|
||||
#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
|
||||
#define __FSWORD_T_TYPE __SWORD_TYPE
|
||||
#define __ID_T_TYPE __U32_TYPE
|
||||
#define __CLOCK_T_TYPE __SLONGWORD_TYPE
|
||||
#define __TIME_T_TYPE __SLONGWORD_TYPE
|
||||
#define __USECONDS_T_TYPE __U32_TYPE
|
||||
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
|
||||
#define __SUSECONDS64_T_TYPE __SQUAD_TYPE
|
||||
#define __DADDR_T_TYPE __S32_TYPE
|
||||
#define __KEY_T_TYPE __S32_TYPE
|
||||
#define __CLOCKID_T_TYPE __S32_TYPE
|
||||
#define __TIMER_T_TYPE void *
|
||||
#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
|
||||
#define __BLKSIZE_T_TYPE __S32_TYPE
|
||||
#define __FSID_T_TYPE struct { int __val[2]; }
|
||||
#define __SSIZE_T_TYPE __SWORD_TYPE
|
||||
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
|
||||
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
|
||||
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
|
||||
|
||||
#ifdef __LP64__
|
||||
#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32)
|
||||
/* Tell the libc code that off_t and off64_t are actually the same type
|
||||
for all ABI purposes, even if possibly expressed as different base types
|
||||
for C type-checking purposes. */
|
||||
@@ -71,20 +84,19 @@
|
||||
/* Same for ino_t and ino64_t. */
|
||||
# define __INO_T_MATCHES_INO64_T 1
|
||||
|
||||
/* And for rlim_t and rlim64_t. */
|
||||
/* And for __rlim_t and __rlim64_t. */
|
||||
# define __RLIM_T_MATCHES_RLIM64_T 1
|
||||
|
||||
/* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */
|
||||
# define __STATFS_MATCHES_STATFS64 1
|
||||
|
||||
/* And for getitimer, setitimer and rusage */
|
||||
# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1
|
||||
# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64)
|
||||
#else
|
||||
# define __RLIM_T_MATCHES_RLIM64_T 0
|
||||
|
||||
# define __STATFS_MATCHES_STATFS64 0
|
||||
|
||||
/* And for getitimer, setitimer and rusage */
|
||||
# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
|
||||
#define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */
|
||||
#define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */
|
||||
#define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */
|
||||
#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
110
lib/libc/include/generic-glibc/bits/unistd.h
vendored
110
lib/libc/include/generic-glibc/bits/unistd.h
vendored
@@ -22,8 +22,12 @@
|
||||
|
||||
# include <bits/unistd-decl.h>
|
||||
|
||||
__fortify_function __wur ssize_t
|
||||
read (int __fd, void *__buf, size_t __nbytes)
|
||||
__fortify_function __attribute_overloadable__ __wur ssize_t
|
||||
read (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf), size_t __nbytes)
|
||||
__fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
|
||||
"read called with bigger length than "
|
||||
"size of the destination buffer")
|
||||
|
||||
{
|
||||
return __glibc_fortify (read, __nbytes, sizeof (char),
|
||||
__glibc_objsize0 (__buf),
|
||||
@@ -32,16 +36,24 @@ read (int __fd, void *__buf, size_t __nbytes)
|
||||
|
||||
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
__fortify_function __wur ssize_t
|
||||
pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
|
||||
__fortify_function __attribute_overloadable__ __wur ssize_t
|
||||
pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
|
||||
size_t __nbytes, __off_t __offset)
|
||||
__fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
|
||||
"pread called with bigger length than "
|
||||
"size of the destination buffer")
|
||||
{
|
||||
return __glibc_fortify (pread, __nbytes, sizeof (char),
|
||||
__glibc_objsize0 (__buf),
|
||||
__fd, __buf, __nbytes, __offset);
|
||||
}
|
||||
# else
|
||||
__fortify_function __wur ssize_t
|
||||
pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
||||
__fortify_function __attribute_overloadable__ __wur ssize_t
|
||||
pread (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
|
||||
size_t __nbytes, __off64_t __offset)
|
||||
__fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
|
||||
"pread called with bigger length than "
|
||||
"size of the destination buffer")
|
||||
{
|
||||
return __glibc_fortify (pread64, __nbytes, sizeof (char),
|
||||
__glibc_objsize0 (__buf),
|
||||
@@ -50,8 +62,12 @@ pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
||||
# endif
|
||||
|
||||
# ifdef __USE_LARGEFILE64
|
||||
__fortify_function __wur ssize_t
|
||||
pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
||||
__fortify_function __attribute_overloadable__ __wur ssize_t
|
||||
pread64 (int __fd, __fortify_clang_overload_arg0 (void *, ,__buf),
|
||||
size_t __nbytes, __off64_t __offset)
|
||||
__fortify_clang_warning_only_if_bos0_lt (__nbytes, __buf,
|
||||
"pread64 called with bigger length than "
|
||||
"size of the destination buffer")
|
||||
{
|
||||
return __glibc_fortify (pread64, __nbytes, sizeof (char),
|
||||
__glibc_objsize0 (__buf),
|
||||
@@ -61,9 +77,14 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
|
||||
#endif
|
||||
|
||||
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
|
||||
__fortify_function __nonnull ((1, 2)) __wur ssize_t
|
||||
__NTH (readlink (const char *__restrict __path, char *__restrict __buf,
|
||||
__fortify_function __attribute_overloadable__ __nonnull ((1, 2)) __wur ssize_t
|
||||
__NTH (readlink (const char *__restrict __path,
|
||||
__fortify_clang_overload_arg0 (char *, __restrict, __buf),
|
||||
size_t __len))
|
||||
__fortify_clang_warning_only_if_bos_lt (__len, __buf,
|
||||
"readlink called with bigger length "
|
||||
"than size of destination buffer")
|
||||
|
||||
{
|
||||
return __glibc_fortify (readlink, __len, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -72,9 +93,13 @@ __NTH (readlink (const char *__restrict __path, char *__restrict __buf,
|
||||
#endif
|
||||
|
||||
#ifdef __USE_ATFILE
|
||||
__fortify_function __nonnull ((2, 3)) __wur ssize_t
|
||||
__fortify_function __attribute_overloadable__ __nonnull ((2, 3)) __wur ssize_t
|
||||
__NTH (readlinkat (int __fd, const char *__restrict __path,
|
||||
char *__restrict __buf, size_t __len))
|
||||
__fortify_clang_overload_arg0 (char *, __restrict, __buf),
|
||||
size_t __len))
|
||||
__fortify_clang_warning_only_if_bos_lt (__len, __buf,
|
||||
"readlinkat called with bigger length "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (readlinkat, __len, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -82,8 +107,11 @@ __NTH (readlinkat (int __fd, const char *__restrict __path,
|
||||
}
|
||||
#endif
|
||||
|
||||
__fortify_function __wur char *
|
||||
__NTH (getcwd (char *__buf, size_t __size))
|
||||
__fortify_function __attribute_overloadable__ __wur char *
|
||||
__NTH (getcwd (__fortify_clang_overload_arg (char *, , __buf), size_t __size))
|
||||
__fortify_clang_warning_only_if_bos_lt (__size, __buf,
|
||||
"getcwd called with bigger length "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (getcwd, __size, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -91,8 +119,9 @@ __NTH (getcwd (char *__buf, size_t __size))
|
||||
}
|
||||
|
||||
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
|
||||
__fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char *
|
||||
__NTH (getwd (char *__buf))
|
||||
__fortify_function __attribute_overloadable__ __nonnull ((1))
|
||||
__attribute_deprecated__ __wur char *
|
||||
__NTH (getwd (__fortify_clang_overload_arg (char *,, __buf)))
|
||||
{
|
||||
if (__glibc_objsize (__buf) != (size_t) -1)
|
||||
return __getwd_chk (__buf, __glibc_objsize (__buf));
|
||||
@@ -100,8 +129,12 @@ __NTH (getwd (char *__buf))
|
||||
}
|
||||
#endif
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (confstr (int __name, char *__buf, size_t __len))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (confstr (int __name, __fortify_clang_overload_arg (char *, ,__buf),
|
||||
size_t __len))
|
||||
__fortify_clang_warning_only_if_bos_lt (__len, __buf,
|
||||
"confstr called with bigger length than "
|
||||
"size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (confstr, __len, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -109,8 +142,13 @@ __NTH (confstr (int __name, char *__buf, size_t __len))
|
||||
}
|
||||
|
||||
|
||||
__fortify_function int
|
||||
__NTH (getgroups (int __size, __gid_t __list[]))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (getgroups (int __size,
|
||||
__fortify_clang_overload_arg (__gid_t *, , __list)))
|
||||
__fortify_clang_warning_only_if_bos_lt (__size * sizeof (__gid_t), __list,
|
||||
"getgroups called with bigger group "
|
||||
"count than what can fit into "
|
||||
"destination buffer")
|
||||
{
|
||||
return __glibc_fortify (getgroups, __size, sizeof (__gid_t),
|
||||
__glibc_objsize (__list),
|
||||
@@ -118,8 +156,13 @@ __NTH (getgroups (int __size, __gid_t __list[]))
|
||||
}
|
||||
|
||||
|
||||
__fortify_function int
|
||||
__NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (ttyname_r (int __fd,
|
||||
__fortify_clang_overload_arg (char *, ,__buf),
|
||||
size_t __buflen))
|
||||
__fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
|
||||
"ttyname_r called with bigger buflen "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (ttyname_r, __buflen, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -128,8 +171,11 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen))
|
||||
|
||||
|
||||
#ifdef __USE_POSIX199506
|
||||
__fortify_function int
|
||||
getlogin_r (char *__buf, size_t __buflen)
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
getlogin_r (__fortify_clang_overload_arg (char *, ,__buf), size_t __buflen)
|
||||
__fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
|
||||
"getlogin_r called with bigger buflen "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (getlogin_r, __buflen, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -139,8 +185,12 @@ getlogin_r (char *__buf, size_t __buflen)
|
||||
|
||||
|
||||
#if defined __USE_MISC || defined __USE_UNIX98
|
||||
__fortify_function int
|
||||
__NTH (gethostname (char *__buf, size_t __buflen))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (gethostname (__fortify_clang_overload_arg (char *, ,__buf),
|
||||
size_t __buflen))
|
||||
__fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
|
||||
"gethostname called with bigger buflen "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (gethostname, __buflen, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
@@ -150,8 +200,12 @@ __NTH (gethostname (char *__buf, size_t __buflen))
|
||||
|
||||
|
||||
#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98)
|
||||
__fortify_function int
|
||||
__NTH (getdomainname (char *__buf, size_t __buflen))
|
||||
__fortify_function __attribute_overloadable__ int
|
||||
__NTH (getdomainname (__fortify_clang_overload_arg (char *, ,__buf),
|
||||
size_t __buflen))
|
||||
__fortify_clang_warning_only_if_bos_lt (__buflen, __buf,
|
||||
"getdomainname called with bigger "
|
||||
"buflen than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify (getdomainname, __buflen, sizeof (char),
|
||||
__glibc_objsize (__buf),
|
||||
|
||||
4
lib/libc/include/generic-glibc/bits/utmp.h
vendored
4
lib/libc/include/generic-glibc/bits/utmp.h
vendored
@@ -36,7 +36,7 @@
|
||||
struct lastlog
|
||||
{
|
||||
#if __WORDSIZE_TIME64_COMPAT32
|
||||
int32_t ll_time;
|
||||
__uint32_t ll_time;
|
||||
#else
|
||||
__time_t ll_time;
|
||||
#endif
|
||||
@@ -76,7 +76,7 @@ struct utmp
|
||||
int32_t ut_session; /* Session ID, used for windowing. */
|
||||
struct
|
||||
{
|
||||
int32_t tv_sec; /* Seconds. */
|
||||
__uint32_t tv_sec; /* Seconds. */
|
||||
int32_t tv_usec; /* Microseconds. */
|
||||
} ut_tv; /* Time entry was made. */
|
||||
#else
|
||||
|
||||
2
lib/libc/include/generic-glibc/bits/utmpx.h
vendored
2
lib/libc/include/generic-glibc/bits/utmpx.h
vendored
@@ -74,7 +74,7 @@ struct utmpx
|
||||
__int32_t ut_session; /* Session ID, used for windowing. */
|
||||
struct
|
||||
{
|
||||
__int32_t tv_sec; /* Seconds. */
|
||||
__uint32_t tv_sec; /* Seconds. */
|
||||
__int32_t tv_usec; /* Microseconds. */
|
||||
} ut_tv; /* Time entry was made. */
|
||||
#else
|
||||
|
||||
@@ -29,7 +29,7 @@ __LDBL_REDIR_DECL (vwprintf);
|
||||
__LDBL_REDIR_DECL (vswprintf);
|
||||
# if !__GLIBC_USE (DEPRECATED_SCANF)
|
||||
# if defined __LDBL_COMPAT
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc23_fwscanf)
|
||||
__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc23_wscanf)
|
||||
__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc23_swscanf)
|
||||
@@ -39,7 +39,7 @@ __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
|
||||
__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
|
||||
# endif
|
||||
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (fwscanf, __isoc23_fwscanfieee128)
|
||||
__LDBL_REDIR1_DECL (wscanf, __isoc23_wscanfieee128)
|
||||
__LDBL_REDIR1_DECL (swscanf, __isoc23_swscanfieee128)
|
||||
@@ -66,7 +66,7 @@ __LDBL_REDIR1_DECL (wcstold, __wcstoieee128)
|
||||
# endif
|
||||
# if !__GLIBC_USE (DEPRECATED_SCANF)
|
||||
# if defined __LDBL_COMPAT
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc23_vfwscanf)
|
||||
__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc23_vwscanf)
|
||||
__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc23_vswscanf)
|
||||
@@ -76,7 +76,7 @@ __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
|
||||
__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
|
||||
# endif
|
||||
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
# if __GLIBC_USE (C2X_STRTOL)
|
||||
# if __GLIBC_USE (C23_STRTOL)
|
||||
__LDBL_REDIR1_DECL (vfwscanf, __isoc23_vfwscanfieee128)
|
||||
__LDBL_REDIR1_DECL (vwscanf, __isoc23_vwscanfieee128)
|
||||
__LDBL_REDIR1_DECL (vswscanf, __isoc23_vswscanfieee128)
|
||||
|
||||
167
lib/libc/include/generic-glibc/bits/wchar2.h
vendored
167
lib/libc/include/generic-glibc/bits/wchar2.h
vendored
@@ -20,17 +20,24 @@
|
||||
# error "Never include <bits/wchar2.h> directly; use <wchar.h> instead."
|
||||
#endif
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wmemcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __s1),
|
||||
const wchar_t *__restrict __s2, size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __s1, sizeof (wchar_t),
|
||||
"wmemcpy called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t),
|
||||
__glibc_objsize0 (__s1),
|
||||
__s1, __s2, __n);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wmemmove (__fortify_clang_overload_arg (wchar_t *, ,__s1),
|
||||
const wchar_t *__s2, size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __s1, sizeof (wchar_t),
|
||||
"wmemmove called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t),
|
||||
__glibc_objsize0 (__s1),
|
||||
@@ -38,9 +45,12 @@ __NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
|
||||
}
|
||||
|
||||
#ifdef __USE_GNU
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wmempcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __s1),
|
||||
const wchar_t *__restrict __s2, size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __s1, sizeof (wchar_t),
|
||||
"wmempcpy called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t),
|
||||
__glibc_objsize0 (__s1),
|
||||
@@ -48,16 +58,21 @@ __NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||
}
|
||||
#endif
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wmemset (__fortify_clang_overload_arg (wchar_t *, ,__s), wchar_t __c,
|
||||
size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __s, sizeof (wchar_t),
|
||||
"wmemset called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t),
|
||||
__glibc_objsize0 (__s),
|
||||
__s, __c, __n);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wcscpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src))
|
||||
{
|
||||
size_t sz = __glibc_objsize (__dest);
|
||||
if (sz != (size_t) -1)
|
||||
@@ -65,8 +80,9 @@ __NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
return __wcscpy_alias (__dest, __src);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wcpcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src))
|
||||
{
|
||||
size_t sz = __glibc_objsize (__dest);
|
||||
if (sz != (size_t) -1)
|
||||
@@ -74,26 +90,33 @@ __NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
return __wcpcpy_alias (__dest, __src);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wcsncpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src, size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __dest, sizeof (wchar_t),
|
||||
"wcsncpy called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t),
|
||||
__glibc_objsize (__dest),
|
||||
__dest, __src, __n);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wcpncpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src, size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __dest, sizeof (wchar_t),
|
||||
"wcpncpy called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t),
|
||||
__glibc_objsize (__dest),
|
||||
__dest, __src, __n);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wcscat (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src))
|
||||
{
|
||||
size_t sz = __glibc_objsize (__dest);
|
||||
if (sz != (size_t) -1)
|
||||
@@ -101,9 +124,9 @@ __NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
return __wcscat_alias (__dest, __src);
|
||||
}
|
||||
|
||||
__fortify_function wchar_t *
|
||||
__NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ wchar_t *
|
||||
__NTH (wcsncat (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src, size_t __n))
|
||||
{
|
||||
size_t sz = __glibc_objsize (__dest);
|
||||
if (sz != (size_t) -1)
|
||||
@@ -112,9 +135,12 @@ __NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
}
|
||||
|
||||
#ifdef __USE_MISC
|
||||
__fortify_function size_t
|
||||
__NTH (wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (wcslcpy (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src, size_t __n))
|
||||
__fortify_clang_warning_only_if_bos0_lt2 (__n, __dest, sizeof (wchar_t),
|
||||
"wcslcpy called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
if (__glibc_objsize (__dest) != (size_t) -1
|
||||
&& (!__builtin_constant_p (__n
|
||||
@@ -125,9 +151,9 @@ __NTH (wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
return __wcslcpy_alias (__dest, __src, __n);
|
||||
}
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (wcslcat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
size_t __n))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (wcslcat (__fortify_clang_overload_arg (wchar_t *, __restrict, __dest),
|
||||
const wchar_t *__restrict __src, size_t __n))
|
||||
{
|
||||
if (__glibc_objsize (__dest) != (size_t) -1
|
||||
&& (!__builtin_constant_p (__n > __glibc_objsize (__dest)
|
||||
@@ -150,6 +176,23 @@ __NTH (swprintf (wchar_t *__restrict __s, size_t __n,
|
||||
sz / sizeof (wchar_t), __fmt, __va_arg_pack ());
|
||||
return __swprintf_alias (__s, __n, __fmt, __va_arg_pack ());
|
||||
}
|
||||
#elif __fortify_use_clang
|
||||
__fortify_function_error_function __attribute_overloadable__ int
|
||||
__NTH (swprintf (__fortify_clang_overload_arg (wchar_t *, __restrict, __s),
|
||||
size_t __n, const wchar_t *__restrict __fmt, ...))
|
||||
{
|
||||
__gnuc_va_list __fortify_ap;
|
||||
__builtin_va_start (__fortify_ap, __fmt);
|
||||
int __r;
|
||||
if (__glibc_objsize (__s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
|
||||
__r = __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
|
||||
__glibc_objsize (__s) / sizeof (wchar_t),
|
||||
__fmt, __fortify_ap);
|
||||
else
|
||||
__r = __vswprintf_alias (__s, __n, __fmt, __fortify_ap);
|
||||
__builtin_va_end (__fortify_ap);
|
||||
return __r;
|
||||
}
|
||||
#elif !defined __cplusplus
|
||||
/* XXX We might want to have support in gcc for swprintf. */
|
||||
# define swprintf(s, n, ...) \
|
||||
@@ -207,34 +250,46 @@ vfwprintf (__FILE *__restrict __stream,
|
||||
}
|
||||
|
||||
#endif
|
||||
__fortify_function __wur wchar_t *
|
||||
fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
||||
__fortify_function __attribute_overloadable__ __wur wchar_t *
|
||||
fgetws (__fortify_clang_overload_arg (wchar_t *, __restrict, __s), int __n,
|
||||
__FILE *__restrict __stream)
|
||||
__fortify_clang_warning_only_if_bos_lt2 (__n, __s, sizeof (wchar_t),
|
||||
"fgetws called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize (__s);
|
||||
if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz))
|
||||
return __fgetws_alias (__s, __n, __stream);
|
||||
#if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz))
|
||||
return __fgetws_chk_warn (__s, sz / sizeof (wchar_t), __n, __stream);
|
||||
#endif
|
||||
return __fgetws_chk (__s, sz / sizeof (wchar_t), __n, __stream);
|
||||
}
|
||||
|
||||
#ifdef __USE_GNU
|
||||
__fortify_function __wur wchar_t *
|
||||
fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
||||
__fortify_function __attribute_overloadable__ __wur wchar_t *
|
||||
fgetws_unlocked (__fortify_clang_overload_arg (wchar_t *, __restrict, __s),
|
||||
int __n, __FILE *__restrict __stream)
|
||||
__fortify_clang_warning_only_if_bos_lt2 (__n, __s, sizeof (wchar_t),
|
||||
"fgetws_unlocked called with length bigger "
|
||||
"than size of destination buffer")
|
||||
{
|
||||
size_t sz = __glibc_objsize (__s);
|
||||
if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz))
|
||||
return __fgetws_unlocked_alias (__s, __n, __stream);
|
||||
# if !__fortify_use_clang
|
||||
if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz))
|
||||
return __fgetws_unlocked_chk_warn (__s, sz / sizeof (wchar_t), __n,
|
||||
__stream);
|
||||
# endif
|
||||
return __fgetws_unlocked_chk (__s, sz / sizeof (wchar_t), __n, __stream);
|
||||
}
|
||||
#endif
|
||||
|
||||
__fortify_function __wur size_t
|
||||
__NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
|
||||
mbstate_t *__restrict __ps))
|
||||
__fortify_function __attribute_overloadable__ __wur size_t
|
||||
__NTH (wcrtomb (__fortify_clang_overload_arg (char *, __restrict, __s),
|
||||
wchar_t __wchar, mbstate_t *__restrict __ps))
|
||||
{
|
||||
/* We would have to include <limits.h> to get a definition of MB_LEN_MAX.
|
||||
But this would only disturb the namespace. So we define our own
|
||||
@@ -249,18 +304,26 @@ __NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
|
||||
return __wcrtomb_alias (__s, __wchar, __ps);
|
||||
}
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (mbsrtowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst),
|
||||
const char **__restrict __src,
|
||||
size_t __len, mbstate_t *__restrict __ps))
|
||||
__fortify_clang_warning_only_if_bos_lt2 (__len, __dst, sizeof (wchar_t),
|
||||
"mbsrtowcs called with dst buffer "
|
||||
"smaller than len * sizeof (wchar_t)")
|
||||
{
|
||||
return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t),
|
||||
__glibc_objsize (__dst),
|
||||
__dst, __src, __len, __ps);
|
||||
}
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (wcsrtombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
|
||||
const wchar_t **__restrict __src,
|
||||
size_t __len, mbstate_t *__restrict __ps))
|
||||
__fortify_clang_warning_only_if_bos_lt (__len, __dst,
|
||||
"wcsrtombs called with dst buffer "
|
||||
"smaller than len")
|
||||
{
|
||||
return __glibc_fortify (wcsrtombs, __len, sizeof (char),
|
||||
__glibc_objsize (__dst),
|
||||
@@ -269,18 +332,26 @@ __NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
||||
|
||||
|
||||
#ifdef __USE_XOPEN2K8
|
||||
__fortify_function size_t
|
||||
__NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
||||
size_t __nmc, size_t __len, mbstate_t *__restrict __ps))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (mbsnrtowcs (__fortify_clang_overload_arg (wchar_t *, __restrict, __dst),
|
||||
const char **__restrict __src, size_t __nmc, size_t __len,
|
||||
mbstate_t *__restrict __ps))
|
||||
__fortify_clang_warning_only_if_bos_lt (sizeof (wchar_t) * __len, __dst,
|
||||
"mbsnrtowcs called with dst buffer "
|
||||
"smaller than len * sizeof (wchar_t)")
|
||||
{
|
||||
return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t),
|
||||
__glibc_objsize (__dst),
|
||||
__dst, __src, __nmc, __len, __ps);
|
||||
}
|
||||
|
||||
__fortify_function size_t
|
||||
__NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
||||
size_t __nwc, size_t __len, mbstate_t *__restrict __ps))
|
||||
__fortify_function __attribute_overloadable__ size_t
|
||||
__NTH (wcsnrtombs (__fortify_clang_overload_arg (char *, __restrict, __dst),
|
||||
const wchar_t **__restrict __src, size_t __nwc,
|
||||
size_t __len, mbstate_t *__restrict __ps))
|
||||
__fortify_clang_warning_only_if_bos_lt (__len, __dst,
|
||||
"wcsnrtombs called with dst buffer "
|
||||
"smaller than len")
|
||||
{
|
||||
return __glibc_fortify (wcsnrtombs, __len, sizeof (char),
|
||||
__glibc_objsize (__dst),
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
|
||||
#define __WORDSIZE _MIPS_SZPTR
|
||||
|
||||
#if _MIPS_SIM == _ABI64
|
||||
# define __WORDSIZE_TIME64_COMPAT32 1
|
||||
#else
|
||||
# define __WORDSIZE_TIME64_COMPAT32 0
|
||||
#endif
|
||||
#define __WORDSIZE_TIME64_COMPAT32 1
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#define __WORDSIZE32_SIZE_ULONG 0
|
||||
|
||||
33
lib/libc/include/generic-glibc/elf.h
vendored
33
lib/libc/include/generic-glibc/elf.h
vendored
@@ -831,6 +831,10 @@ typedef struct
|
||||
control. */
|
||||
#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
|
||||
enabled keys. */
|
||||
#define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers. */
|
||||
#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
|
||||
#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
|
||||
#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
|
||||
#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. */
|
||||
@@ -1234,6 +1238,10 @@ typedef struct
|
||||
#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */
|
||||
#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */
|
||||
|
||||
/* More machine-dependent hints about processor capabilities. */
|
||||
#define AT_HWCAP3 29 /* extension of AT_HWCAP. */
|
||||
#define AT_HWCAP4 30 /* extension of AT_HWCAP. */
|
||||
|
||||
#define AT_EXECFN 31 /* Filename of executable. */
|
||||
|
||||
/* Pointer to the global system page used for system calls and other
|
||||
@@ -1333,9 +1341,13 @@ typedef struct
|
||||
#define NT_GNU_PROPERTY_TYPE_0 5
|
||||
|
||||
/* Packaging metadata as defined on
|
||||
https://systemd.io/COREDUMP_PACKAGE_METADATA/ */
|
||||
https://systemd.io/ELF_PACKAGE_METADATA/ */
|
||||
#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
|
||||
|
||||
/* dlopen metadata as defined on
|
||||
https://systemd.io/ELF_DLOPEN_METADATA/ */
|
||||
#define NT_FDO_DLOPEN_METADATA 0x407c0c0a
|
||||
|
||||
/* Note section name of program property. */
|
||||
#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
|
||||
|
||||
@@ -4237,6 +4249,8 @@ enum
|
||||
#define R_LARCH_TLS_TPREL32 10
|
||||
#define R_LARCH_TLS_TPREL64 11
|
||||
#define R_LARCH_IRELATIVE 12
|
||||
#define R_LARCH_TLS_DESC32 13
|
||||
#define R_LARCH_TLS_DESC64 14
|
||||
|
||||
/* Reserved for future relocs that the dynamic linker must understand. */
|
||||
|
||||
@@ -4331,6 +4345,23 @@ enum
|
||||
#define R_LARCH_ADD_ULEB128 107
|
||||
#define R_LARCH_SUB_ULEB128 108
|
||||
#define R_LARCH_64_PCREL 109
|
||||
#define R_LARCH_CALL36 110
|
||||
#define R_LARCH_TLS_DESC_PC_HI20 111
|
||||
#define R_LARCH_TLS_DESC_PC_LO12 112
|
||||
#define R_LARCH_TLS_DESC64_PC_LO20 113
|
||||
#define R_LARCH_TLS_DESC64_PC_HI12 114
|
||||
#define R_LARCH_TLS_DESC_HI20 115
|
||||
#define R_LARCH_TLS_DESC_LO12 116
|
||||
#define R_LARCH_TLS_DESC64_LO20 117
|
||||
#define R_LARCH_TLS_DESC64_HI12 118
|
||||
#define R_LARCH_TLS_DESC_LD 119
|
||||
#define R_LARCH_TLS_DESC_CALL 120
|
||||
#define R_LARCH_TLS_LE_HI20_R 121
|
||||
#define R_LARCH_TLS_LE_ADD_R 122
|
||||
#define R_LARCH_TLS_LE_LO12_R 123
|
||||
#define R_LARCH_TLS_LD_PCREL20_S2 124
|
||||
#define R_LARCH_TLS_GD_PCREL20_S2 125
|
||||
#define R_LARCH_TLS_DESC_PCREL20_S2 126
|
||||
|
||||
/* ARC specific declarations. */
|
||||
|
||||
|
||||
7
lib/libc/include/generic-glibc/fcntl.h
vendored
7
lib/libc/include/generic-glibc/fcntl.h
vendored
@@ -177,7 +177,7 @@ typedef __pid_t pid_t;
|
||||
|
||||
This function is a cancellation point and therefore not marked with
|
||||
__THROW. */
|
||||
#ifndef __USE_TIME_BITS64
|
||||
#ifndef __USE_TIME64_REDIRECTS
|
||||
# ifndef __USE_FILE_OFFSET64
|
||||
extern int fcntl (int __fd, int __cmd, ...);
|
||||
# else
|
||||
@@ -190,7 +190,7 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
|
||||
# ifdef __USE_LARGEFILE64
|
||||
extern int fcntl64 (int __fd, int __cmd, ...);
|
||||
# endif
|
||||
#else /* __USE_TIME_BITS64 */
|
||||
#else /* __USE_TIME64_REDIRECTS */
|
||||
# ifdef __REDIRECT
|
||||
extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...),
|
||||
__fcntl_time64);
|
||||
@@ -345,8 +345,7 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
|
||||
|
||||
|
||||
/* Define some inlines helping to catch common problems. */
|
||||
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
|
||||
&& defined __va_arg_pack_len
|
||||
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||
# include <bits/fcntl2.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
# if _TIME_BITS == 64
|
||||
# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
|
||||
# error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
|
||||
# elif __TIMESIZE == 32
|
||||
# define __USE_TIME_BITS64 1
|
||||
# endif
|
||||
# define __USE_TIME_BITS64 1
|
||||
# elif _TIME_BITS == 32
|
||||
# if __TIMESIZE > 32
|
||||
# error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
|
||||
@@ -34,4 +33,10 @@
|
||||
# else
|
||||
# error Invalid _TIME_BITS value (can only be 32 or 64-bit)
|
||||
# endif
|
||||
#elif __TIMESIZE == 64
|
||||
# define __USE_TIME_BITS64 1
|
||||
#endif
|
||||
|
||||
#if defined __USE_TIME_BITS64 && __TIMESIZE == 32
|
||||
# define __USE_TIME64_REDIRECTS 1
|
||||
#endif
|
||||
48
lib/libc/include/generic-glibc/features.h
vendored
48
lib/libc/include/generic-glibc/features.h
vendored
@@ -24,7 +24,8 @@
|
||||
__STRICT_ANSI__ ISO Standard C.
|
||||
_ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
|
||||
_ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
|
||||
_ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
|
||||
_ISOC23_SOURCE Extensions to ISO C99 from ISO C23.
|
||||
_ISOC2X_SOURCE Old name for _ISOC23_SOURCE.
|
||||
__STDC_WANT_LIB_EXT2__
|
||||
Extensions to ISO C99 from TR 27431-2:2010.
|
||||
__STDC_WANT_IEC_60559_BFP_EXT__
|
||||
@@ -34,7 +35,7 @@
|
||||
__STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
Extensions to ISO C11 from TS 18661-3:2015.
|
||||
__STDC_WANT_IEC_60559_EXT__
|
||||
ISO C2X interfaces defined only in Annex F.
|
||||
ISO C23 interfaces defined only in Annex F.
|
||||
|
||||
_POSIX_SOURCE IEEE Std 1003.1.
|
||||
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
|
||||
@@ -148,10 +149,10 @@
|
||||
#undef __USE_GNU
|
||||
#undef __USE_FORTIFY_LEVEL
|
||||
#undef __KERNEL_STRICT_NAMES
|
||||
#undef __GLIBC_USE_ISOC2X
|
||||
#undef __GLIBC_USE_ISOC23
|
||||
#undef __GLIBC_USE_DEPRECATED_GETS
|
||||
#undef __GLIBC_USE_DEPRECATED_SCANF
|
||||
#undef __GLIBC_USE_C2X_STRTOL
|
||||
#undef __GLIBC_USE_C23_STRTOL
|
||||
|
||||
/* Suppress kernel-name space pollution unless user expressedly asks
|
||||
for it. */
|
||||
@@ -206,6 +207,13 @@
|
||||
# define _DEFAULT_SOURCE 1
|
||||
#endif
|
||||
|
||||
/* Remap the old name _ISOC2X_SOURCE to _ISOC23_SOURCE. */
|
||||
#ifdef _ISOC2X_SOURCE
|
||||
# undef _ISOC2X_SOURCE
|
||||
# undef _ISOC23_SOURCE
|
||||
# define _ISOC23_SOURCE 1
|
||||
#endif
|
||||
|
||||
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
|
||||
#ifdef _GNU_SOURCE
|
||||
# undef _ISOC95_SOURCE
|
||||
@@ -214,8 +222,8 @@
|
||||
# define _ISOC99_SOURCE 1
|
||||
# undef _ISOC11_SOURCE
|
||||
# define _ISOC11_SOURCE 1
|
||||
# undef _ISOC2X_SOURCE
|
||||
# define _ISOC2X_SOURCE 1
|
||||
# undef _ISOC23_SOURCE
|
||||
# define _ISOC23_SOURCE 1
|
||||
# undef _POSIX_SOURCE
|
||||
# define _POSIX_SOURCE 1
|
||||
# undef _POSIX_C_SOURCE
|
||||
@@ -244,37 +252,37 @@
|
||||
#if (defined _DEFAULT_SOURCE \
|
||||
|| (!defined __STRICT_ANSI__ \
|
||||
&& !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
|
||||
&& !defined _ISOC2X_SOURCE \
|
||||
&& !defined _ISOC23_SOURCE \
|
||||
&& !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
|
||||
&& !defined _XOPEN_SOURCE))
|
||||
# undef _DEFAULT_SOURCE
|
||||
# define _DEFAULT_SOURCE 1
|
||||
#endif
|
||||
|
||||
/* This is to enable the ISO C2X extension. */
|
||||
#if (defined _ISOC2X_SOURCE \
|
||||
/* This is to enable the ISO C23 extension. */
|
||||
#if (defined _ISOC23_SOURCE \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
|
||||
# define __GLIBC_USE_ISOC2X 1
|
||||
# define __GLIBC_USE_ISOC23 1
|
||||
#else
|
||||
# define __GLIBC_USE_ISOC2X 0
|
||||
# define __GLIBC_USE_ISOC23 0
|
||||
#endif
|
||||
|
||||
/* This is to enable the ISO C11 extension. */
|
||||
#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
|
||||
#if (defined _ISOC11_SOURCE || defined _ISOC23_SOURCE \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
|
||||
# define __USE_ISOC11 1
|
||||
#endif
|
||||
|
||||
/* This is to enable the ISO C99 extension. */
|
||||
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
|
||||
|| defined _ISOC2X_SOURCE \
|
||||
|| defined _ISOC23_SOURCE \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
|
||||
# define __USE_ISOC99 1
|
||||
#endif
|
||||
|
||||
/* This is to enable the ISO C90 Amendment 1:1995 extension. */
|
||||
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
|
||||
|| defined _ISOC2X_SOURCE \
|
||||
|| defined _ISOC23_SOURCE \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
|
||||
# define __USE_ISOC95 1
|
||||
#endif
|
||||
@@ -486,18 +494,18 @@
|
||||
* glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
|
||||
*/
|
||||
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
|
||||
/* ISO C2X added support for a 0b or 0B prefix on binary constants as
|
||||
/* ISO C23 added support for a 0b or 0B prefix on binary constants as
|
||||
inputs to strtol-family functions (base 0 or 2). This macro is
|
||||
used to condition redirection in headers to allow that redirection
|
||||
to be disabled when building those functions, despite _GNU_SOURCE
|
||||
being defined. */
|
||||
#if __GLIBC_USE (ISOC2X)
|
||||
# define __GLIBC_USE_C2X_STRTOL 1
|
||||
#if __GLIBC_USE (ISOC23)
|
||||
# define __GLIBC_USE_C23_STRTOL 1
|
||||
#else
|
||||
# define __GLIBC_USE_C2X_STRTOL 0
|
||||
# define __GLIBC_USE_C23_STRTOL 0
|
||||
#endif
|
||||
#else /* glibc 2.37 or lower */
|
||||
# define __GLIBC_USE_C2X_STRTOL 0
|
||||
# define __GLIBC_USE_C23_STRTOL 0
|
||||
#endif
|
||||
|
||||
/* Get definitions of __STDC_* predefined macros, if the compiler has
|
||||
@@ -543,4 +551,4 @@
|
||||
#include <gnu/stubs.h>
|
||||
|
||||
|
||||
#endif /* features.h */
|
||||
#endif /* features.h */
|
||||
8
lib/libc/include/generic-glibc/fenv.h
vendored
8
lib/libc/include/generic-glibc/fenv.h
vendored
@@ -77,7 +77,7 @@ extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW;
|
||||
/* Raise the supported exceptions represented by EXCEPTS. */
|
||||
extern int feraiseexcept (int __excepts) __THROW;
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Set the supported exception flags represented by EXCEPTS, without
|
||||
causing enabled traps to be taken. */
|
||||
extern int fesetexcept (int __excepts) __THROW;
|
||||
@@ -91,7 +91,7 @@ extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
|
||||
currently set. */
|
||||
extern int fetestexcept (int __excepts) __THROW;
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Determine which of subset of the exceptions specified by EXCEPTS
|
||||
are set in *FLAGP. */
|
||||
extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
|
||||
@@ -130,7 +130,7 @@ extern int feupdateenv (const fenv_t *__envp) __THROW;
|
||||
|
||||
/* Control modes. */
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Store the current floating-point control modes in the object
|
||||
pointed to by MODEP. */
|
||||
extern int fegetmode (femode_t *__modep) __THROW;
|
||||
@@ -143,7 +143,7 @@ extern int fesetmode (const femode_t *__modep) __THROW;
|
||||
|
||||
/* NaN support. */
|
||||
|
||||
#if (__GLIBC_USE (IEC_60559_BFP_EXT_C2X) \
|
||||
#if (__GLIBC_USE (IEC_60559_BFP_EXT_C23) \
|
||||
&& defined FE_INVALID \
|
||||
&& defined __SUPPORT_SNAN__)
|
||||
# define FE_SNANS_ALWAYS_SIGNAL 1
|
||||
|
||||
6
lib/libc/include/generic-glibc/fts.h
vendored
6
lib/libc/include/generic-glibc/fts.h
vendored
@@ -187,7 +187,7 @@ FTSENT *fts_read (FTS *);
|
||||
int fts_set (FTS *, FTSENT *, int) __THROW;
|
||||
#else
|
||||
# ifdef __REDIRECT
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
|
||||
int __REDIRECT (fts_close, (FTS *), fts64_close);
|
||||
FTS *__REDIRECT (fts_open, (char * const *, int,
|
||||
@@ -206,7 +206,7 @@ int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
|
||||
__fts64_set_time64);
|
||||
# endif
|
||||
# else
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
# define fts_children fts64_children
|
||||
# define fts_close fts64_close
|
||||
# define fts_open fts64_open
|
||||
@@ -217,7 +217,7 @@ int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __USE_LARGEFILE64
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
FTSENT64 *fts64_children (FTS64 *, int);
|
||||
int fts64_close (FTS64 *);
|
||||
FTS64 *fts64_open (char * const *, int,
|
||||
|
||||
12
lib/libc/include/generic-glibc/ftw.h
vendored
12
lib/libc/include/generic-glibc/ftw.h
vendored
@@ -137,7 +137,7 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
|
||||
__nonnull ((1, 2));
|
||||
#else
|
||||
# ifdef __REDIRECT
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
|
||||
int __descriptors), ftw64) __nonnull ((1, 2));
|
||||
# else
|
||||
@@ -146,7 +146,7 @@ extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
|
||||
__nonnull ((1, 2));
|
||||
# endif
|
||||
# else
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
# define ftw ftw64
|
||||
# else
|
||||
# define ftw __ftw64_time64
|
||||
@@ -154,7 +154,7 @@ extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
|
||||
# endif
|
||||
#endif
|
||||
#ifdef __USE_LARGEFILE64
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
extern int ftw64 (const char *__dir, __ftw64_func_t __func,
|
||||
int __descriptors) __nonnull ((1, 2));
|
||||
# else
|
||||
@@ -180,7 +180,7 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
|
||||
int __flag) __nonnull ((1, 2));
|
||||
# else
|
||||
# ifdef __REDIRECT
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
|
||||
int __descriptors, int __flag), nftw64)
|
||||
__nonnull ((1, 2));
|
||||
@@ -190,7 +190,7 @@ extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
|
||||
__nonnull ((1, 2));
|
||||
# endif
|
||||
# else
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
# define nftw nftw64
|
||||
# else
|
||||
# define nftw __nftw64_time64
|
||||
@@ -198,7 +198,7 @@ extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
|
||||
# endif
|
||||
# endif
|
||||
# ifdef __USE_LARGEFILE64
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
extern int nftw64 (const char *__dir, __nftw64_func_t __func,
|
||||
int __descriptors, int __flag) __nonnull ((1, 2));
|
||||
# else
|
||||
|
||||
4
lib/libc/include/generic-glibc/glob.h
vendored
4
lib/libc/include/generic-glibc/glob.h
vendored
@@ -150,7 +150,7 @@ extern int glob (const char *__restrict __pattern, int __flags,
|
||||
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
||||
extern void globfree (glob_t *__pglob) __THROW;
|
||||
#else
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
|
||||
int __flags,
|
||||
int (*__errfunc) (const char *, int),
|
||||
@@ -170,7 +170,7 @@ extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
|
||||
#endif
|
||||
|
||||
#ifdef __USE_LARGEFILE64
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
extern int __REDIRECT_NTHNL (glob64, (const char *__restrict __pattern,
|
||||
int __flags,
|
||||
int (*__errfunc) (const char *, int),
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
|
||||
#endif
|
||||
|
||||
#define LD_SO "ld.so.1"
|
||||
#define LD_LINUX_SO "ld-linux.so.2"
|
||||
#define LD_SO "ld-linux.so.2"
|
||||
#define LIBANL_SO "libanl.so.1"
|
||||
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
|
||||
#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
|
||||
|
||||
6
lib/libc/include/generic-glibc/inttypes.h
vendored
6
lib/libc/include/generic-glibc/inttypes.h
vendored
@@ -165,7 +165,7 @@ typedef wchar_t __gwchar_t;
|
||||
# define PRIXPTR __PRIPTR_PREFIX "X"
|
||||
|
||||
/* Binary notation. */
|
||||
# if __GLIBC_USE (ISOC2X)
|
||||
# if __GLIBC_USE (ISOC23)
|
||||
# define PRIb8 "b"
|
||||
# define PRIb16 "b"
|
||||
# define PRIb32 "b"
|
||||
@@ -303,7 +303,7 @@ typedef wchar_t __gwchar_t;
|
||||
|
||||
|
||||
/* Binary notation. */
|
||||
# if __GLIBC_USE (ISOC2X)
|
||||
# if __GLIBC_USE (ISOC23)
|
||||
# define SCNb8 "hhb"
|
||||
# define SCNb16 "hb"
|
||||
# define SCNb32 "b"
|
||||
@@ -374,7 +374,7 @@ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
|
||||
|
||||
/* Versions of the above functions that handle '0b' and '0B' prefixes
|
||||
in base 0 or 2. */
|
||||
#if __GLIBC_USE (C2X_STRTOL)
|
||||
#if __GLIBC_USE (C23_STRTOL)
|
||||
# ifdef __REDIRECT
|
||||
extern intmax_t __REDIRECT_NTH (strtoimax, (const char *__restrict __nptr,
|
||||
char **__restrict __endptr,
|
||||
|
||||
6
lib/libc/include/generic-glibc/limits.h
vendored
6
lib/libc/include/generic-glibc/limits.h
vendored
@@ -142,7 +142,7 @@
|
||||
/* The integer width macros are not defined by GCC's <limits.h> before
|
||||
GCC 7, or if _GNU_SOURCE rather than
|
||||
__STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
# ifndef CHAR_WIDTH
|
||||
# define CHAR_WIDTH 8
|
||||
# endif
|
||||
@@ -179,9 +179,9 @@
|
||||
#endif /* Use IEC_60559_BFP_EXT. */
|
||||
|
||||
/* The macros for _Bool are not defined by GCC's <limits.h> before GCC
|
||||
11, or if _GNU_SOURCE is defined rather than enabling C2x support
|
||||
11, or if _GNU_SOURCE is defined rather than enabling C23 support
|
||||
with -std. */
|
||||
#if __GLIBC_USE (ISOC2X)
|
||||
#if __GLIBC_USE (ISOC23)
|
||||
# ifndef BOOL_MAX
|
||||
# define BOOL_MAX 1
|
||||
# endif
|
||||
|
||||
24
lib/libc/include/generic-glibc/math.h
vendored
24
lib/libc/include/generic-glibc/math.h
vendored
@@ -114,37 +114,37 @@ __BEGIN_DECLS
|
||||
#endif
|
||||
#if (__HAVE_FLOAT16 \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF16 (__builtin_nansf16 (""))
|
||||
#endif
|
||||
#if (__HAVE_FLOAT32 \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF32 (__builtin_nansf32 (""))
|
||||
#endif
|
||||
#if (__HAVE_FLOAT64 \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF64 (__builtin_nansf64 (""))
|
||||
#endif
|
||||
#if (__HAVE_FLOAT128 \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF128 (__builtin_nansf128 (""))
|
||||
#endif
|
||||
#if (__HAVE_FLOAT32X \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF32X (__builtin_nansf32x (""))
|
||||
#endif
|
||||
#if (__HAVE_FLOAT64X \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF64X (__builtin_nansf64x (""))
|
||||
#endif
|
||||
#if (__HAVE_FLOAT128X \
|
||||
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
|
||||
&& (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
|
||||
# define SNANF128X (__builtin_nansf128x (""))
|
||||
#endif
|
||||
|
||||
@@ -214,7 +214,7 @@ typedef _Float128x double_t;
|
||||
# define FP_ILOGBNAN 2147483647
|
||||
# endif
|
||||
#endif
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
# if __WORDSIZE == 32
|
||||
# define __FP_LONG_MAX 0x7fffffffL
|
||||
# else
|
||||
@@ -246,7 +246,7 @@ typedef _Float128x double_t;
|
||||
|
||||
#include <bits/fp-fast.h>
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* Rounding direction macros for fromfp functions. */
|
||||
enum
|
||||
{
|
||||
@@ -558,7 +558,7 @@ extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
|
||||
#define __MATHCALL_NARROW(func, redir, nargs) \
|
||||
__MATHCALL_NARROW_NORMAL (func, nargs)
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
|
||||
# define _Mret_ float
|
||||
# define _Marg_ double
|
||||
@@ -1051,7 +1051,7 @@ enum
|
||||
|
||||
#endif /* Use ISO C99. */
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
# include <bits/iscanonical.h>
|
||||
|
||||
/* Return nonzero value if X is a signaling NaN. */
|
||||
@@ -1332,7 +1332,7 @@ iszero (__T __val)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
|
||||
#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
|
||||
/* An expression whose type has the widest of the evaluation formats
|
||||
of X and Y (which are of floating-point types). */
|
||||
# if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64
|
||||
|
||||
5
lib/libc/include/generic-glibc/mqueue.h
vendored
5
lib/libc/include/generic-glibc/mqueue.h
vendored
@@ -71,7 +71,7 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
|
||||
unsigned int __msg_prio) __nonnull ((2));
|
||||
|
||||
#ifdef __USE_XOPEN2K
|
||||
# ifndef __USE_TIME_BITS64
|
||||
# ifndef __USE_TIME64_REDIRECTS
|
||||
/* Receive the oldest from highest priority messages in message queue
|
||||
MQDES, stop waiting if ABS_TIMEOUT expires. */
|
||||
extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr,
|
||||
@@ -110,8 +110,7 @@ extern int __REDIRECT (mq_timedsend, (mqd_t __mqdes,
|
||||
#endif
|
||||
|
||||
/* Define some inlines helping to catch common problems. */
|
||||
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \
|
||||
&& defined __va_arg_pack_len
|
||||
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||
# include <bits/mqueue2.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
From Linux 2.1 the AF_PACKET interface is preferred and you should
|
||||
consider using it in place of this one. */
|
||||
|
||||
struct sockaddr_pkt
|
||||
struct __attribute_struct_may_alias__ sockaddr_pkt
|
||||
{
|
||||
__SOCKADDR_COMMON (spkt_);
|
||||
unsigned char spkt_device[14];
|
||||
|
||||
2
lib/libc/include/generic-glibc/netash/ash.h
vendored
2
lib/libc/include/generic-glibc/netash/ash.h
vendored
@@ -22,7 +22,7 @@
|
||||
#include <features.h>
|
||||
#include <bits/sockaddr.h>
|
||||
|
||||
struct sockaddr_ash
|
||||
struct __attribute_struct_may_alias__ sockaddr_ash
|
||||
{
|
||||
__SOCKADDR_COMMON (sash_); /* Common data: address family etc. */
|
||||
int sash_ifindex; /* Interface to use. */
|
||||
|
||||
2
lib/libc/include/generic-glibc/netdb.h
vendored
2
lib/libc/include/generic-glibc/netdb.h
vendored
@@ -701,7 +701,7 @@ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
|
||||
extern int gai_suspend (const struct gaicb *const __list[], int __ent,
|
||||
const struct timespec *__timeout);
|
||||
|
||||
# ifdef __USE_TIME_BITS64
|
||||
# ifdef __USE_TIME64_REDIRECTS
|
||||
# if defined(__REDIRECT)
|
||||
extern int __REDIRECT (gai_suspend, (const struct gaicb *const __list[],
|
||||
int __ent,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user