about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* S390: Regenerate ULPs.Stefan Liebler2018-09-062-68/+68
| | | | | | | | Regenerated ulps from scratch after recent changes. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* Fix segfault in maybe_script_execute.Stefan Liebler2018-09-062-1/+6
| | | | | | | | | | | | | | | | | If glibc is built with gcc 8 and -march=z900, the testcase posix/tst-spawn4-compat crashes with a segfault. In function maybe_script_execute, the new_argv array is dynamically initialized on stack with (argc + 1) elements. The function wants to add _PATH_BSHELL as the first argument and writes out of bounds of new_argv. There is an off-by-one because maybe_script_execute fails to count the terminating NULL when sizing new_argv. ChangeLog: * sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute): Increment size of new_argv by one.
* Indian and similar locales: Set the correct date format (bug 17426).Rafal Luzynski2018-09-0534-33/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit also fixes d_fmt in bn_BD which is identical to bn_IN, in ne_NP which is identical to ne_IN (not supported by Glibc but supported by CLDR), and in ta_LK which is identical to ta_IN. For those locales which are supported by CLDR data is imported from CLDR v33. For others it is copied from those locales which were identical before this commit. [BZ #17426] * localedata/locales/anp_IN (d_fmt): Use "%-d//%-m//%y". * localedata/locales/ar_IN (d_fmt): Likewise. * localedata/locales/bhb_IN (d_fmt): Likewise. * localedata/locales/bho_IN (d_fmt): Likewise. * localedata/locales/bn_BD (d_fmt): Likewise. * localedata/locales/bn_IN (d_fmt): Likewise. * localedata/locales/doi_IN (d_fmt): Likewise. * localedata/locales/gu_IN (d_fmt): Likewise. * localedata/locales/hi_IN (d_fmt): Likewise. * localedata/locales/hne_IN (d_fmt): Likewise. * localedata/locales/kn_IN (d_fmt): Likewise. * localedata/locales/mag_IN (d_fmt): Likewise. * localedata/locales/mai_IN (d_fmt): Likewise. * localedata/locales/mjw_IN (d_fmt): Likewise. * localedata/locales/ml_IN (d_fmt): Likewise. * localedata/locales/mni_IN (d_fmt): Likewise. * localedata/locales/mr_IN (d_fmt): Likewise. * localedata/locales/pa_IN (d_fmt): Likewise. * localedata/locales/raj_IN (d_fmt): Likewise. * localedata/locales/sat_IN (d_fmt): Likewise. * localedata/locales/sd_IN (d_fmt): Likewise. * localedata/locales/sd_IN@devanagari (d_fmt): Likewise. * localedata/locales/ta_IN (d_fmt): Likewise. * localedata/locales/ta_LK (d_fmt): Likewise. * localedata/locales/tcy_IN (d_fmt): Likewise. * localedata/locales/ur_IN (d_fmt): Likewise. * localedata/locales/brx_IN (d_fmt): Use "%-m//%-d//%y". * localedata/locales/ks_IN (d_fmt): Likewise. * localedata/locales/ks_IN@devanagari (d_fmt): Likewise. * localedata/locales/kok_IN (d_fmt): Use "%-d-%-m-%y". * localedata/locales/ne_NP (d_fmt): Use "%y//%-m//%-d". * localedata/locales/sa_IN (d_fmt): Use "%-d-%m-%y". * localedata/locales/te_IN (d_fmt): Use "%d-%m-%y".
* Missed ChangeLogSzabolcs Nagy2018-09-051-0/+30
|
* Add new exp and exp2 implementationsSzabolcs Nagy2018-09-0526-3672/+885
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimized exp and exp2 implementations using a lookup table for fractional powers of 2. There are several variants, see e_exp_data.c, they can be selected by modifying math_config.h allowing different tradeoffs. The default selection should be acceptable as generic libm code. Worst case error is 0.509 ULP for exp and 0.507 ULP for exp2, on aarch64 the rodata size is 2160 bytes, shared between exp and exp2. On aarch64 .text + .rodata size decreased by 24912 bytes. The non-nearest rounding error is less than 1 ULP even on targets without efficient round implementation (although the error rate is higher in that case). Targets with single instruction, rounding mode independent, to nearest integer rounding and conversion can use them by setting TOINT_INTRINSICS and adding the necessary code to their math_private.h. The __exp1 code uses the same algorithm, so the error bound of pow increased a bit. New double precision error handling code was added following the style of the single precision error handling code. Improvements on Cortex-A72 compared to current glibc master: exp thruput: 1.61x in [-9.9 9.9] exp latency: 1.53x in [-9.9 9.9] exp thruput: 1.13x in [0.5 1] exp latency: 1.30x in [0.5 1] exp2 thruput: 2.03x in [-9.9 9.9] exp2 latency: 1.64x in [-9.9 9.9] For small (< 1) inputs the current exp code uses a separate algorithm so the speed up there is less. Was tested on aarch64-linux-gnu (TOINT_INTRINSICS, fma contraction) and arm-linux-gnueabihf (!TOINT_INTRINSICS, no fma contraction) and x86_64-linux-gnu (!TOINT_INTRINSICS, no fma contraction) and powerpc64le-linux-gnu (!TOINT_INTRINSICS, fma contraction) targets, only non-nearest rounding ulp errors increase and they are within acceptable bounds (ulp updates are in separate patches). * NEWS: Mention exp and exp2 improvements. * math/Makefile (libm-support): Remove t_exp. (type-double-routines): Add math_err and e_exp_data. * sysdeps/aarch64/libm-test-ulps: Update. * sysdeps/arm/libm-test-ulps: Update. * sysdeps/i386/fpu/e_exp_data.c: New file. * sysdeps/i386/fpu/math_err.c: New file. * sysdeps/i386/fpu/t_exp.c: Remove. * sysdeps/ia64/fpu/e_exp_data.c: New file. * sysdeps/ia64/fpu/math_err.c: New file. * sysdeps/ia64/fpu/t_exp.c: Remove. * sysdeps/ieee754/dbl-64/e_exp.c: Rewrite. * sysdeps/ieee754/dbl-64/e_exp2.c: Rewrite. * sysdeps/ieee754/dbl-64/e_exp_data.c: New file. * sysdeps/ieee754/dbl-64/e_pow.c (__ieee754_pow): Update error bound. * sysdeps/ieee754/dbl-64/eexp.tbl: Remove. * sysdeps/ieee754/dbl-64/math_config.h: New file. * sysdeps/ieee754/dbl-64/math_err.c: New file. * sysdeps/ieee754/dbl-64/t_exp.c: Remove. * sysdeps/ieee754/dbl-64/t_exp2.h: Remove. * sysdeps/ieee754/dbl-64/uexp.h: Remove. * sysdeps/ieee754/dbl-64/uexp.tbl: Remove. * sysdeps/m68k/m680x0/fpu/e_exp_data.c: New file. * sysdeps/m68k/m680x0/fpu/math_err.c: New file. * sysdeps/m68k/m680x0/fpu/t_exp.c: Remove. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
* Remove alpha math_private.h.Joseph Myers2018-09-052-18/+2
| | | | | | | | | | | | | | | After some math_private.h cleanups (in particulat math-barriers.h being split out), the only thing left in the alpha math_private.h was macro definitions of __isnan and __isnanf, apparently (based on the comments) intended to avoid problems with inline definitions in other math_private.h files. Those inline definitions were removed in commit fe8c2b33aed067282ecac0cc3fdff1feef88548b, and the alpha math_private.h is no longer needed; this patch removes it. Tested with build-many-glibcs.py that installed stripped shared libraries for alpha are unchanged by the patch. * sysdeps/alpha/fpu/math_private.h: Remove.
* Move float128 inlines from sysdeps/generic/math_private.h to include/math.h.Joseph Myers2018-09-053-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | Continuing the cleanup of math_private.h, with a view to it becoming the header for the APIs defined therein and not also a header with inline variants of math.h APIs, this patch moves inline definitions of __isinff128 and fabsf128 to include/math.h, so that any users of math.h in glibc automatically get the optimized functions rather than quietly missing them if they do not also include math_private.h. Tested for x86_64 and x86, and with build-many-glibcs.py with GCC 6. There are changes to installed stripped libc.so on configurations with distinct _Float128, because of __printf_fp_l code that now gets the __isinff128 inline where previously it called the out-of-line function because of the lack of a math_private.h call. It seems appropriate that this code does get the inline (as it would automatically with GCC 7 and later when the built-in function is used) rather than being the only place in glibc that does not. * sysdeps/generic/math_private.h [__HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7, 0)] (__isinff128): Move this inline function .... [__HAVE_DISTINCT_FLOAT128] (fabsf128): And this one .... * include/math.h [!_ISOMAC]: To here....
* Move fenv.h soft-float inlines from fenv_private.h to include/fenv.h.Joseph Myers2018-09-0465-151/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <fenv_private.h> has inline versions of various <fenv.h> functions, and their __fe* variants, for systems (generally soft-float) without support for floating-point exceptions, rounding modes or both. Having these inlines in a separate header introduces a risk of a source file including <fenv.h> and compiling OK on x86_64, but failing to compile (because the feraiseexcept inline is actually a macro that discards its argument, to avoid the need for #ifdef FE_INVALID conditionals), or not being properly optimized, on systems without the exceptions and rounding modes support (when these inlines were in math_private.h, we had a few cases where this broke the build because there was no obvious reason for a file to need math_private.h and it didn't need that header on x86_64). By moving those inlines to include/fenv.h, this risk can be avoided, and fenv_private.h becomes more clearly defined as specifically the header for the internal libc_fe* and SET_RESTORE_ROUND* interfaces. This patch makes that move, removing fenv_private.h includes that are no longer needed (or replacing them by fenv.h includes in a few cases that didn't already have such an include). Tested for x86_64 and x86, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/generic/fenv_private.h [FE_ALL_EXCEPT == 0]: Move this code .... [!FE_HAVE_ROUNDING_MODES]: And this code .... * include/fenv.h [!_ISOMAC]: ... to here. * math/fraiseexcpt.c (__feraiseexcept): Undefine as macro. (feraiseexcept): Likewise. * math/fromfp.h: Do not include <fenv_private.h>. * math/s_cexp_template.c: Likewise. * math/s_csin_template.c: Likewise. * math/s_csinh_template.c: Likewise. * math/s_ctan_template.c: Likewise. * math/s_ctanh_template.c: Likewise. * math/s_iseqsig_template.c: Likewise. * math/w_acos_compat.c: Likewise. * math/w_acosf_compat.c: Likewise. * math/w_acosl_compat.c: Likewise. * math/w_asin_compat.c: Likewise. * math/w_asinf_compat.c: Likewise. * math/w_asinl_compat.c: Likewise. * math/w_j0_compat.c: Likewise. * math/w_j0f_compat.c: Likewise. * math/w_j0l_compat.c: Likewise. * math/w_j1_compat.c: Likewise. * math/w_j1f_compat.c: Likewise. * math/w_j1l_compat.c: Likewise. * math/w_jn_compat.c: Likewise. * math/w_jnf_compat.c: Likewise. * math/w_log10_compat.c: Likewise. * math/w_log10f_compat.c: Likewise. * math/w_log10l_compat.c: Likewise. * math/w_log2_compat.c: Likewise. * math/w_log2f_compat.c: Likewise. * math/w_log2l_compat.c: Likewise. * math/w_log_compat.c: Likewise. * math/w_logf_compat.c: Likewise. * math/w_logl_compat.c: Likewise. * sysdeps/ieee754/dbl-64/s_llrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_llround.c: Likewise. * sysdeps/ieee754/dbl-64/s_lrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_lround.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Likewise. * sysdeps/ieee754/flt-32/s_llrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_llroundf.c: Likewise. * sysdeps/ieee754/flt-32/s_lrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_lroundf.c: Likewise. * sysdeps/ieee754/k_standardl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_nearbyintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fma.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-96/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_lroundl.c: Likewise. * math/w_ilogb_template.c: Include <fenv.h> instead of <fenv_private.h>. * math/w_llogb_template.c: Likewise. * sysdeps/powerpc/fpu/e_sqrt.c: Likewise. * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
* Do not include fenv_private.h in math_private.h.Joseph Myers2018-09-03145-2/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the clean-up related to the catch-all math_private.h header, this patch stops math_private.h from including fenv_private.h. Instead, fenv_private.h is included directly from those users of math_private.h that also used interfaces from fenv_private.h. No attempt is made to remove unused includes of math_private.h, but that is a natural followup. (However, since math_private.h sometimes defines optimized versions of math.h interfaces or __* variants thereof, as well as defining its own interfaces, I think it might make sense to get all those optimized versions included from include/math.h, not requiring a separate header at all, before eliminating unused math_private.h includes - that avoids a file quietly becoming less-optimized if someone adds a call to one of those interfaces without restoring a math_private.h include to that file.) There is still a pitfall that if code uses plain fe* and __fe* interfaces, but only includes fenv.h and not fenv_private.h or (before this patch) math_private.h, it will compile on platforms with exceptions and rounding modes but not get the optimized versions (and possibly not compile) on platforms without exception and rounding mode support, so making it easy to break the build for such platforms accidentally. I think it would be most natural to move the inlines / macros for fe* and __fe* in the case of no exceptions and rounding modes into include/fenv.h, so that all code including fenv.h with _ISOMAC not defined automatically gets them. Then fenv_private.h would be purely the header for the libc_fe*, SET_RESTORE_ROUND etc. internal interfaces and the risk of breaking the build on other platforms than the one you tested on because of a missing fenv_private.h include would be much reduced (and there would be some unused fenv_private.h includes to remove along with unused math_private.h includes). Tested for x86_64 and x86, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/generic/math_private.h: Do not include <fenv_private.h>. * math/fromfp.h: Include <fenv_private.h>. * math/math-narrow.h: Likewise. * math/s_cexp_template.c: Likewise. * math/s_csin_template.c: Likewise. * math/s_csinh_template.c: Likewise. * math/s_ctan_template.c: Likewise. * math/s_ctanh_template.c: Likewise. * math/s_iseqsig_template.c: Likewise. * math/w_acos_compat.c: Likewise. * math/w_acosf_compat.c: Likewise. * math/w_acosl_compat.c: Likewise. * math/w_asin_compat.c: Likewise. * math/w_asinf_compat.c: Likewise. * math/w_asinl_compat.c: Likewise. * math/w_ilogb_template.c: Likewise. * math/w_j0_compat.c: Likewise. * math/w_j0f_compat.c: Likewise. * math/w_j0l_compat.c: Likewise. * math/w_j1_compat.c: Likewise. * math/w_j1f_compat.c: Likewise. * math/w_j1l_compat.c: Likewise. * math/w_jn_compat.c: Likewise. * math/w_jnf_compat.c: Likewise. * math/w_llogb_template.c: Likewise. * math/w_log10_compat.c: Likewise. * math/w_log10f_compat.c: Likewise. * math/w_log10l_compat.c: Likewise. * math/w_log2_compat.c: Likewise. * math/w_log2f_compat.c: Likewise. * math/w_log2l_compat.c: Likewise. * math/w_log_compat.c: Likewise. * math/w_logf_compat.c: Likewise. * math/w_logl_compat.c: Likewise. * sysdeps/aarch64/fpu/feholdexcpt.c: Likewise. * sysdeps/aarch64/fpu/fesetround.c: Likewise. * sysdeps/aarch64/fpu/fgetexcptflg.c: Likewise. * sysdeps/aarch64/fpu/ftestexcept.c: Likewise. * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. * sysdeps/ieee754/dbl-64/e_exp.c: Likewise. * sysdeps/ieee754/dbl-64/e_exp2.c: Likewise. * sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise. * sysdeps/ieee754/dbl-64/e_jn.c: Likewise. * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise. * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise. * sysdeps/ieee754/dbl-64/gamma_product.c: Likewise. * sysdeps/ieee754/dbl-64/lgamma_neg.c: Likewise. * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. * sysdeps/ieee754/dbl-64/s_fma.c: Likewise. * sysdeps/ieee754/dbl-64/s_fmaf.c: Likewise. * sysdeps/ieee754/dbl-64/s_llrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_llround.c: Likewise. * sysdeps/ieee754/dbl-64/s_lrint.c: Likewise. * sysdeps/ieee754/dbl-64/s_lround.c: Likewise. * sysdeps/ieee754/dbl-64/s_nearbyint.c: Likewise. * sysdeps/ieee754/dbl-64/s_sin.c: Likewise. * sysdeps/ieee754/dbl-64/s_sincos.c: Likewise. * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Likewise. * sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: Likewise. * sysdeps/ieee754/dbl-64/x2y2m1.c: Likewise. * sysdeps/ieee754/float128/float128_private.h: Likewise. * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. * sysdeps/ieee754/flt-32/e_j1f.c: Likewise. * sysdeps/ieee754/flt-32/e_jnf.c: Likewise. * sysdeps/ieee754/flt-32/lgamma_negf.c: Likewise. * sysdeps/ieee754/flt-32/s_llrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_llroundf.c: Likewise. * sysdeps/ieee754/flt-32/s_lrintf.c: Likewise. * sysdeps/ieee754/flt-32/s_lroundf.c: Likewise. * sysdeps/ieee754/flt-32/s_nearbyintf.c: Likewise. * sysdeps/ieee754/k_standardl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-128/gamma_productl.c: Likewise. * sysdeps/ieee754/ldbl-128/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-128/s_nearbyintl.c: Likewise. * sysdeps/ieee754/ldbl-128/x2y2m1l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c: Likewise. * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise. * sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise. * sysdeps/ieee754/ldbl-96/gamma_productl.c: Likewise. * sysdeps/ieee754/ldbl-96/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fma.c: Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c: Likewise. * sysdeps/ieee754/ldbl-96/s_llrintl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_llroundl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_lrintl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_lroundl.c: Likewise. * sysdeps/ieee754/ldbl-96/x2y2m1l.c: Likewise. * sysdeps/powerpc/fpu/e_sqrt.c: Likewise. * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise. * sysdeps/riscv/rv64/rvd/s_ceil.c: Likewise. * sysdeps/riscv/rv64/rvd/s_floor.c: Likewise. * sysdeps/riscv/rv64/rvd/s_nearbyint.c: Likewise. * sysdeps/riscv/rv64/rvd/s_round.c: Likewise. * sysdeps/riscv/rv64/rvd/s_roundeven.c: Likewise. * sysdeps/riscv/rv64/rvd/s_trunc.c: Likewise. * sysdeps/riscv/rvd/s_finite.c: Likewise. * sysdeps/riscv/rvd/s_fmax.c: Likewise. * sysdeps/riscv/rvd/s_fmin.c: Likewise. * sysdeps/riscv/rvd/s_fpclassify.c: Likewise. * sysdeps/riscv/rvd/s_isinf.c: Likewise. * sysdeps/riscv/rvd/s_isnan.c: Likewise. * sysdeps/riscv/rvd/s_issignaling.c: Likewise. * sysdeps/riscv/rvf/fegetround.c: Likewise. * sysdeps/riscv/rvf/feholdexcpt.c: Likewise. * sysdeps/riscv/rvf/fesetenv.c: Likewise. * sysdeps/riscv/rvf/fesetround.c: Likewise. * sysdeps/riscv/rvf/feupdateenv.c: Likewise. * sysdeps/riscv/rvf/fgetexcptflg.c: Likewise. * sysdeps/riscv/rvf/ftestexcept.c: Likewise. * sysdeps/riscv/rvf/s_ceilf.c: Likewise. * sysdeps/riscv/rvf/s_finitef.c: Likewise. * sysdeps/riscv/rvf/s_floorf.c: Likewise. * sysdeps/riscv/rvf/s_fmaxf.c: Likewise. * sysdeps/riscv/rvf/s_fminf.c: Likewise. * sysdeps/riscv/rvf/s_fpclassifyf.c: Likewise. * sysdeps/riscv/rvf/s_isinff.c: Likewise. * sysdeps/riscv/rvf/s_isnanf.c: Likewise. * sysdeps/riscv/rvf/s_issignalingf.c: Likewise. * sysdeps/riscv/rvf/s_nearbyintf.c: Likewise. * sysdeps/riscv/rvf/s_roundevenf.c: Likewise. * sysdeps/riscv/rvf/s_roundf.c: Likewise. * sysdeps/riscv/rvf/s_truncf.c: Likewise.
* [BZ #20271] Add newlines in __libc_fatal calls.Paul Pluzhnikov2018-08-3118-18/+41
|
* Replace conform/list-header-symbols.pl with a Python script.Joseph Myers2018-08-315-88/+172
| | | | | | | | | | | | | | | | | | | | Continuing the move of test code from Perl to Python (which seems uncontroversial, unlike dependencies on Python in the actual build of glibc), this patch replaces conform/list-header-symbols.pl with a Python script, as a first step in converting the conform/ tests. (conform/glibcconform.py is an equivalent to GlibcConform.pm, containing code that will be relevant to move than one of the conform/ scripts.) Tested for x86_64, including verifying that the symbol lists generated are identical to those generated by the Perl version. * conform/glibcconform.py: New file. * conform/list-header-symbols.py: Likewise. * conform/list-header-symbols.pl: Remove. * conform/Makefile (tests-special): Only add linknamespace tests if [PYTHON]. ($(linknamespace-symlists-tests)): Use list-header-symbols.py.
* test-container: Use xcopy_file_range for cross-device copy [BZ #23597]H.J. Lu2018-08-317-2/+200
| | | | | | | | | | | | | | | | | | | | copy_file_range can't be used to copy a file from glibc source directory to glibc build directory since they may be on different filesystems. This patch adds xcopy_file_range for cross-device copy. Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23597] * support/Makefile (libsupport-routines): Add support_copy_file_range and xcopy_file_range. * support/support.h: Include <sys/types.h>. (support_copy_file_range): New prototype. * support/support_copy_file_range.c: New file. Copied and modified from io/copy_file_range-compat.c. * support/test-container.c (copy_one_file): Call xcopy_file_rang instead of copy_file_range. * support/xcopy_file_range.c: New file. * support/xunistd.h (xcopy_file_range): New prototype.
* Fix test failure with -DNDEBUG.Carlos O'Donell2018-08-302-6/+11
| | | | | | | | | | | | The elf/tst-dlopen-aout.c test uses asserts to verify properties of the test execution. Instead of using assert it should use xpthread_create and xpthread_join to catch errors starting the threads and fail the test. This shows up in Fedora 28 when building for i686-pc-linux-gnu and using gcc 8.1.1. Tested on i686, and fixes a check failure with -DNDEBUG. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* reallocarray: Declare under _DEFAULT_SOURCEFlorian Weimer2018-08-303-1/+8
| | | | | | Initially, this function was restricted to _GNU_SOURCE, but experience shows that compatibility with existing build systems is improved if we declare it under _DEFAULT_SOURCE as well.
* Test stdlib/test-bz22786 exits now with unsupported if malloc fails.Stefan Liebler2018-08-302-3/+17
| | | | | | | | | | | | | | | | | | The test tries to allocate more than 2^31 bytes which will always fail on s390 as it has maximum 2^31bit of memory. Before commit 6c3a8a9d868a8deddf0d6dcc785b6d120de90523, this test returned unsupported if malloc fails. This patch re enables this behaviour. Furthermore support_delete_temp_files() failed to remove the temp directory in this case as it is not empty due to the created symlink. Thus the creation of the symlink is moved behind malloc. Reviewed-by: Carlos O'Donell <carlos@redhat.com> ChangeLog: * stdlib/test-bz22786.c (do_test): Return EXIT_UNSUPPORTED if malloc fails.
* Make gen-libm-test.py treat plus_oflow and minus_oflow as non-finite.Joseph Myers2018-08-292-4/+8
| | | | | | | | | | | | | | | | | | | | | When converting gen-libm-test to Python, in one place I noted a bug in the old Perl version that I preserved in the Python version so that the generated output files were the same with both versions, as such comparisons help give confidence in the correctness of such a rewrite of a script. Now that the conversion has been done, this patch fixes that bug, by arranging for tests with plus_oflow or minus_oflow results (manually written tests in libm-test-*.inc that have overflowing results that thus depend on the rounding mode) to be properly treated as having non-finite results, and thus not run for the __FINITE_MATH_ONLY__ tests. (As the affected tests in fact did pass for __FINITE_MATH_ONLY__ testing, this is just a matter of logical correctness in the choice of which tests run for that case, rather than fixing any actual test failures.) Tested for x86_64. * math/gen-libm-test.py (gen_test_args_res): Also treat plus_oflow and minus_oflow as non-finite.
* Split fenv_private.h out of math_private.h more consistently.Joseph Myers2018-08-2816-766/+838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some architectures, the parts of math_private.h relating to the floating-point environment are in a separate file fenv_private.h included from math_private.h. As this is purely an architecture-specific convention used by several architectures, however, all such architectures still need their own math_private.h, even if it has nothing to do beyond #include <fenv_private.h> and peculiarity of including the i386 file directly instead of having a shared file in sysdeps/x86. This patch makes the fenv_private.h name an architecture-independent convention in glibc. The include of fenv_private.h from math_private.h becomes architecture-independent (until callers are updated to include fenv_private.h directly so the include from math_private.h is no longer needed). Some architecture math_private.h headers are removed if no longer needed, or renamed to fenv_private.h if all they define belongs in that header; architecture fenv_private.h headers now do require #include_next <fenv_private.h>. The i386 fenv_private.h file moves to sysdeps/x86/fpu/ to reflect how it is actually shared with x86_64. The generic math_private.h gets a new include of <stdbool.h>, as needed for bool in some prototypes in that header (previously that was indirectly included via include/fenv.h, which now only gets included too late in math_private.h, after those prototypes). Tested for x86_64 and x86, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/aarch64/fpu/fenv_private.h: New file. Based on .... * sysdeps/aarch64/fpu/math_private.h: ... this file. All contents moved to fenv_private.h except for ... (TOINT_INTRINSICS): Kept in math_private.h. (roundtoint): Likewise. (converttoint): Likewise. * sysdeps/arm/fenv_private.h: Change multiple-include guard to [ARM_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/arm/math_private.h: Remove. * sysdeps/generic/fenv_private.h: New file. Contents moved from .... * sysdeps/generic/math_private.h: ... this file. Include <stdbool.h>. Do not include <fenv.h> or <get-rounding-mode.h>. Include <fenv_private.h>. Remove functions and macros moved to fenv_private.h. * sysdeps/i386/fpu/math_private.h: Remove. * sysdeps/mips/math_private.h: Move to .... * sysdeps/mips/fpu/fenv_private.h: ... here. Change multiple-include guard to [MIPS_FENV_PRIVATE_H]. Remove [__mips_hard_float] conditional. Include next <fenv_private.h>. * sysdeps/powerpc/fpu/fenv_private.h: Change multiple-include guard to [POWERPC_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/powerpc/fpu/math_private.h: Do not include <fenv_private.h>. * sysdeps/riscv/rvf/math_private.h: Move to .... * sysdeps/riscv/rvf/fenv_private.h: ... here. Change multiple-include guard to [RISCV_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/sparc/fpu/fenv_private.h: Change multiple-include guard to [SPARC_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/sparc/fpu/math_private.h: Remove. * sysdeps/i386/fpu/fenv_private.h: Move to .... * sysdeps/x86/fpu/fenv_private.h: ... here. Change multiple-include guard to [X86_FENV_PRIVATE_H]. Include next <fenv_private.h>. * sysdeps/x86_64/fpu/math_private.h: Do not include <sysdeps/i386/fpu/fenv_private.h>.
* regex: Add test tst-regcomp-truncated [BZ #23578]Florian Weimer2018-08-283-1/+201
|
* test-container: EPERM from unshare is UNSUPPORTEDFlorian Weimer2018-08-282-2/+8
| | | | | For example, the security policy on the Fedora build daemons results in this EPERM error.
* nscd: Fix use-after-free in addgetnetgrentX [BZ #23520]Florian Weimer2018-08-282-13/+41
| | | | | addinnetgrX may use the heap-allocated buffer, so free the buffer in this function.
* Speedup first memmem matchRajalakshmi Srinivasaraghavan2018-08-282-0/+8
| | | | | | | As done in commit 284f42bc778e487dfd5dff5c01959f93b9e0c4f5, memcmp can be used after memchr to avoid the initialization overhead of the two-way algorithm for the first match. This has shown improvement >40% for first match.
* en_IN: Set the correct date format for "%x" (bug 17426).Rafal Luzynski2018-08-282-2/+7
| | | | | [BZ #17426] * localedata/locales/en_IN (d_fmt): Use "%d/%m/%y".
* links-dso-program: Fix build-programs=no build case.DJ Delorie2018-08-272-10/+5
| | | | | * support/Makefile (others): Don't list programs explicitly as a dependency of "others".
* Move EXCEPTION_SET_FORCES_TRAP out of math-tests.h.Joseph Myers2018-08-274-15/+47
| | | | | | | | | | | | | | | Completing the move of macros out of math-tests.h to smaller headers following typo-proof conventions instead of using #ifndef, this patch moves the EXCEPTION_SET_FORCES_TRAP macro out to its own math-tests-trap-force.h header. Tested with build-many-glibcs.py. * sysdeps/generic/math-tests-trap-force.h: New file. * sysdeps/generic/math-tests.h: Include <math-tests-trap-force.h>. (EXCEPTION_SET_FORCES_TRAP): Do not define here. * sysdeps/powerpc/math-tests.h: Remove file. * sysdeps/powerpc/fpu/math-tests-trap-force.h: New file.
* pthread_cond_broadcast: Fix waiters-after-spinning case [BZ #23538]Martin Kuchta2018-08-272-2/+14
|
* Update netinet/udp.h from Linux 4.18.Joseph Myers2018-08-272-0/+5
| | | | | | | | | This patch adds the UDP_SEGMENT constant from Linux 4.18 to netinet/udp.h. Tested for x86_64. * sysdeps/gnu/netinet/udp.h (UDP_SEGMENT): New macro.
* regex: fix uninitialized memory accessPaul Eggert2018-08-252-2/+16
| | | | | | | | | | | | | I introduced this bug into gnulib in commit 8335a4d6c7b4448cd0bcb6d0bebf1d456bcfdb17 dated 2006-04-10; eventually it was merged into glibc. The bug was found by project-repo <bugs@feusi.co> and reported here: https://lists.gnu.org/r/sed-devel/2018-08/msg00017.html Diagnosis and draft fix reported by Assaf Gordon here: https://lists.gnu.org/r/bug-gnulib/2018-08/msg00071.html https://lists.gnu.org/r/bug-gnulib/2018-08/msg00142.html * posix/regex_internal.c (build_wcs_upper_buffer): Fix bug when mbrtowc returns 0.
* Update translations for be.Carlos O'Donell2018-08-242-48/+54
|
* Fix IA64 links-dso-program link.DJ Delorie2018-08-242-1/+6
| | | | | * support/Makefile (LDLIBS-links-dso-program): Add -lgcc and $(libunwind).
* Fix BZ#23400 (creating temporary files in source tree), and undefined ↵Paul Pluzhnikov2018-08-242-27/+18
| | | | behavior in test.
* Move EXCEPTION_ENABLE_SUPPORTED out of math-tests.h.Joseph Myers2018-08-246-19/+64
| | | | | | | | | | | | | | | | | | | Continuing moving macros out of math-tests.h to smaller headers following typo-proof conventions instead of using #ifndef, this patch moves the EXCEPTION_ENABLE_SUPPORTED macro out to its own math-tests-trap.h header. Tested with build-many-glibcs.py. * sysdeps/generic/math-tests-trap.h: New file. * sysdeps/generic/math-tests.h: Include <math-tests-trap.h>. (EXCEPTION_ENABLE_SUPPORTED): Do not define here. * sysdeps/aarch64/math-tests.h: Remove file. * sysdeps/arm/math-tests.h: Likewise. * sysdeps/riscv/math-tests.h: Likewise. * sysdeps/aarch64/math-tests-trap.h: New file. * sysdeps/arm/math-tests-trap.h: Likewise. * sysdeps/riscv/math-tests-trap.h: Likewise.
* Remove unused math filesWilco Dijkstra2018-08-2418-1078/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove empty files due to the sin/cos improvements: k_sinf.c, k_cosf.c, k_cos.c, k_sin.c. After the tanf change s_rem_pio2f.c and k_rem_pio2f.c (and the ia64, m68k and powerpc equivalents) are no longer used, so remove them. All e_rem_pio2.c files were already empty or commented out, so remove them too. Passes build-many-glibcs. * math/Makefile: Remove empty files k_sin(f).c, k_cos(f).c. Remove unused files e_rem_pio2(f).c, k_rem_pio2f.c. * sysdeps/i386/fpu/e_rem_pio2.c: Delete file. * sysdeps/ia64/fpu/e_rem_pio2.c: Likewise. * sysdeps/ia64/fpu/e_rem_pio2f.c: Likewise. * sysdeps/ia64/fpu/k_rem_pio2f.c: Likewise. * sysdeps/ieee754/dbl-64/e_rem_pio2.c: Likewise. * sysdeps/ieee754/dbl-64/k_cos.c: Likewise. * sysdeps/ieee754/dbl-64/k_sin.c: Likewise. * sysdeps/ieee754/flt-32/e_rem_pio2f.c: Likewise. * sysdeps/ieee754/flt-32/k_cosf.c: Likewise. * sysdeps/ieee754/flt-32/k_rem_pio2f.c: Likewise. * sysdeps/ieee754/flt-32/k_sinf.c: Likewise. * sysdeps/m68k/m680x0/fpu/e_rem_pio2.c: Likewise * sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c: Likewise * sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c: Likewise * sysdeps/powerpc/fpu/e_rem_pio2f.c: Likewise. * sysdeps/powerpc/fpu/k_rem_pio2f.c: Likewise.
* Move EXCEPTION_TESTS_* out of math-tests.hJoseph Myers2018-08-237-59/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing moving macros out of math-tests.h to smaller headers following typo-proof conventions instead of using #ifndef, this patch moves the EXCEPTION_TESTS_* macros for individual types out to their own sysdeps header. As with ROUNDING_TESTS_*, there is no need to define these macros if FE_ALL_EXCEPT == 0 and the individual exception macros are undefined; thus, math-tests-exceptions.h headers are only needed for soft-float ARM and RISC-V, while the other cases that defined these macros do not need to do so (and the associated math-tests.h headers are thus removed without needing replacement by math-tests-exceptions.h headers). Tested with build-many-glibcs.py. * sysdeps/generic/math-tests-exceptions.h: New file. * sysdeps/generic/math-tests.h: Include <math-tests-exceptions.h>. (EXCEPTION_TESTS_float): Do not define here. (EXCEPTION_TESTS_double): Likewise. (EXCEPTION_TESTS_long_double): Likewise. (EXCEPTION_TESTS_float128): Likewise. * sysdeps/arm/math-tests.h [__SOFTFP__] (EXCEPTION_TESTS_float): Likewise. [__SOFTFP__] (EXCEPTION_TESTS_double): Likewise. [__SOFTFP__] (EXCEPTION_TESTS_long_double): Likewise. * sysdeps/arm/nofpu/math-tests-exceptions.h: New file. * sysdeps/m68k/coldfire/math-tests.h: Remove file. * sysdeps/mips/math-tests.h: Likewise. * sysdeps/nios2/math-tests.h: Likewise. * sysdeps/riscv/math-tests.h [!__riscv_flen] (EXCEPTION_TESTS_float): Do not define here. [!__riscv_flen] (EXCEPTION_TESTS_double): Likewise. [!__riscv_flen] (EXCEPTION_TESTS_long_double): Likewise. * sysdeps/riscv/nofpu/math-tests-exceptions.h: New file.
* Update NEWS for sinf improvementsWilco Dijkstra2018-08-232-2/+6
| | | | | | | | | The NEWS entry for sinf improvements is listed for 2.28, while it was committed in 2.29, so move it there and mention tanf. Committed as obvious. * NEWS: Move optimized sinf entry to 2.29.
* Speedup tanf range reductionWilco Dijkstra2018-08-232-1/+32
| | | | | | | | | | | | | | | | Speedup tanf range reduction by using the new sincosf range reduction algorithm. Overall code quality is improved due to inlining, so there is a speedup even if no range reduction is required. tanf throughput gains on Cortex-A72: * |x| < M_PI_4 : 1.1x * |x| < M_PI_2 : 1.2x * |x| < 2 * M_PI: 1.5x * |x| < 120.0 : 1.6x * |x| < Inf : 12.1x * sysdeps/ieee754/flt-32/s_tanf.c (__tanf): Use fast range reduction.
* Add test-in-container infrastructure.DJ Delorie2018-08-2220-6/+1779
| | | | | | | | | | | | | | | | | | | | | | | | | * Makefile (testroot.pristine): New rules to initialize the test-in-container "testroot". * Makerules (all-testsuite): Add tests-container. * Rules (tests-expected): Add tests-container. (binaries-all-tests): Likewise. (tests-container): New, run these tests in the testroot container. * support/Makefile (others): Add *-container, support_paths.c, xmkdirp, and links-dso-program. * support/links-dso-program-c.c: New. * support/links-dso-program.cc: New. * support/test-container.c: New. * support/shell-container.c: New. * support/echo-container.c: New. * support/true-container.c: New. * support/xmkdirp.c: New. * support/xsymlink.c: New. * support/support_paths.c: New. * support/support.h: Add support paths prototypes. * support/xunistd.h: Add xmkdirp () and xsymlink (). * nss/tst-nss-test3.c: Convert to test-in-container. * nss/tst-nss-test3.root/: New.
* regex: port Gnulib code to z/OS POSIX environmentPaul Eggert2018-08-222-0/+11
| | | | | | | Problem reported by Arnold Robbins in: https://lists.gnu.org/r/bug-gnulib/2018-08/msg00129.html * posix/regex_internal.h (__iswalnum, __towlower, __towupper) [!_LIBC]: Undef.
* Don't redefine ROUNDING_TESTS_* in math/test-*-vlen*.h.Joseph Myers2018-08-228-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch completes the move of ROUNDING_TESTS_* macros to typo-proof conventions by stopping redefining them in test-*-vlen*.h. Instead, libm-test-driver.c is made to check TEST_MATHVEC when setting non-to-nearest rounding modes. Tested for x86_64. * math/test-double-vlen2.h: Don't include <math-tests-rounding.h>. (ROUNDING_TESTS_double): Remove. * math/test-double-vlen4.h: Don't include <math-tests-rounding.h>. (ROUNDING_TESTS_double): Remove. * math/test-double-vlen8.h: Don't include <math-tests-rounding.h>. (ROUNDING_TESTS_double): Remove. * math/test-float-vlen16.h: Don't include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Remove. * math/test-float-vlen4.h: Don't include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Remove. * math/test-float-vlen8.h: Don't include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Remove. * math/libm-test-driver.c (IF_ROUND_INIT_FE_DOWNWARD): Check !TEST_MATHVEC here. (IF_ROUND_INIT_FE_TOWARDZERO): Likewise. (IF_ROUND_INIT_FE_UPWARD): Likewise.
* Move ROUNDING_TESTS_* out of math-tests.h.Joseph Myers2018-08-2216-35/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing moving macros out of math-tests.h to smaller headers following typo-proof conventions instead of using #ifndef, this patch moves the ROUNDING_TESTS_* macros for individual types out to their own sysdeps header. In the soft-float case where FE_TONEAREST is the only rounding mode macro defined, there is no need to define ROUNDING_TESTS_*; it is only necessary when rounding modes macros are defined that may not be supported at runtime. Thus, the ROUNDING_TESTS_* definitions for some configurations are just removed, not moved to new math-tests-rounding.h headers; the only architectures needing math-tests-rounding.h are those where the macros are defined in bits/fenv.h because of the possibility of a soft-float compilation using a hard-float glibc with the same ABI (i.e., ARM and RISC-V). The test-*-vlen*.h headers, by using #undef, do not yet follow typo-proof conventions (but they no longer implicitly rely on being included before math-tests.h, and this area can always be cleaned up further in future). Tested with build-many-glibcs.py. * sysdeps/generic/math-tests-rounding.h: New file. * sysdeps/generic/math-tests.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Do not define here. (ROUNDING_TESTS_double): Likewise. (ROUNDING_TESTS_long_double): Likewise. (ROUNDING_TESTS_float128): Likewise. * math/test-double-vlen2.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_double): Undefine before defining. * math/test-double-vlen4.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_double): Undefine before defining. * math/test-double-vlen8.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_double): Undefine before defining. * math/test-float-vlen16.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Undefine before defining. * math/test-float-vlen4.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Undefine before defining. * math/test-float-vlen8.h: Include <math-tests-rounding.h>. (ROUNDING_TESTS_float): Undefine before defining. * sysdeps/arm/nofpu/math-tests-rounding.h: New file. * sysdeps/arm/math-tests.h [__SOFTFP__] (ROUNDING_TESTS_float): Do not define here. [__SOFTFP__] (ROUNDING_TESTS_double): Likewise. [__SOFTFP__] (ROUNDING_TESTS_long_double): Likewise. * sysdeps/riscv/nofpu/math-tests-rounding.h: New file. * sysdeps/riscv/math-tests.h [!__riscv_flen] (ROUNDING_TESTS_float): Do not define here. [!__riscv_flen] (ROUNDING_TESTS_double): Likewise. [!__risv_flen] (ROUNDING_TESTS_long_double): Likewise. * sysdeps/m68k/coldfire/math-tests.h [!__mcffpu__] (ROUNDING_TESTS_float): Likewise. [!__mcffpu__] (ROUNDING_TESTS_double): Likewise. [!__mcffpu__] (ROUNDING_TESTS_long_double): Likewise. * sysdeps/mips/math-tests.h [__mips_soft_float] (ROUNDING_TESTS_float): Likewise. [__mips_soft_float] (ROUNDING_TESTS_double): Likewise. [__mips_soft_float] (ROUNDING_TESTS_long_double): Likewise. * sysdeps/nios2/math-tests.h (ROUNDING_TESTS_float): Likewise. (ROUNDING_TESTS_double): Likewise. (ROUNDING_TESTS_long_double): Likewise.
* Add PF_XDP, AF_XDP and SOL_XDP from Linux 4.18 to bits/socket.h.Tobias Klauser2018-08-212-1/+11
| | | | | | | | | | This patch adds the PF_XDP, AF_XDP and SOL_XDP macros from Linux 4.18 to sysdeps/unix/sysv/linux/bits/socket.h. * sysdeps/unix/sysv/linux/bits/socket.h (PF_MAX): Set to 45. (PF_XDP): New macro. (AF_XDP): New macro. (SOL_XDP): New macro.
* Update netinet/tcp.h from Linux 4.18.Joseph Myers2018-08-212-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds constants from netinet/tcp.h in Linux 4.18, and an associated struct tcp_zerocopy_receive, to sysdeps/gnu/netinet/tcp.h. The new TCP_REPAIR_* constants seemed sufficiently related to those already present to include them. Note that this patch does not include additions to struct tcp_info; there are many other elements in this structure in the Linux kernel that are not included in the glibc version (which was last extended in 2007, it seems). Such additions to the end of the structure may be OK with the expected way it is used (size passed explicitly to the kernel with getsockopt), but in principle any change to the size of a type provided by glibc is an ABI change for external applications / libraries using that type in their ABIs, and has the associated risks of such a change. Tested for x86_64. * sysdeps/gnu/netinet/tcp.h (TCP_ZEROCOPY_RECEIVE): New macro. (TCP_INQ): Likewise. (TCP_CM_INQ): Likewise. (TCP_REPAIR_ON): Likewise. (TCP_REPAIR_OFF): Likewise. (TCP_REPAIR_OFF_NO_WP): Likewise. (struct tcp_zerocopy_receive): New type.
* Avoid running some tests if the file system does not support holesFlorian Weimer2018-08-2110-1/+135
| | | | | Otherwise, these tests fills up the entire disk (or just run very slowly and eventually time out).
* Makeconfig: Do not sort and deduplicate +cflags [BZ # 17248]Florian Weimer2018-08-212-3/+5
| | | | | The original intent behind this is unclear. It interferes with flags that has to be ordered in a particular way.
* __readlink_chk: Remove micro-optimizationFlorian Weimer2018-08-213-37/+5
|
* __readlink_chk: Assume HAVE_INLINED_SYSCALLSFlorian Weimer2018-08-202-7/+6
| | | | | HAVE_INLINED_SYSCALLS is always defined on Linux. Switch to INLINE_SYSCALL_CALL as well.
* Update struct signalfd_siginfo from Linux 4.18.Joseph Myers2018-08-202-1/+10
| | | | | | | | | | | | | This patch updates struct signalfd_siginfo in sys/signalfd.h with new members from Linux 4.18 (plus ssi_addr_lsb, added to the kernel in 2.6.37 without being added to sys/signalfd.h at that time). The __pad2 member name follows the kernel and the existing __pad name. Tested for x86_64. * sysdeps/unix/sysv/linux/sys/signalfd.h (struct signalfd_siginfo): Add ssi_addr_lsb, ssi_syscall, ssi_call_addr and ssi_arch members.
* Add NT_VMCOREDD, AT_MINSIGSTKSZ from Linux 4.18 to elf.h.Joseph Myers2018-08-202-0/+9
| | | | | | | | | | This patch adds two new constants from Linux 4.18 to elf.h, NT_VMCOREDD and AT_MINSIGSTKSZ. Tested for x86_64. * elf/elf.c (NT_VMCOREDD): New macro. (AT_MINSIGSTKSZ): Likewise.
* malloc: Add ChangeLog for accidentally committed changeFlorian Weimer2018-08-202-1/+5
| | | | | | Commit b90ddd08f6dd688e651df9ee89ca3a69ff88cd0c ("malloc: Additional checks for unsorted bin integrity I.") was committed without a whitespace fix, so it is adjusted here as well.
* powerpc: Remove powerpc specific sinf and cosf optimizationRajalakshmi Srinivasaraghavan2018-08-2014-1453/+18
| | | | | | | New generic optimization of sinf and cosf introduced by commit 599cf3976679e1b345307d9c02057f02aa95528f shows improvement compared to powerpc specific assembly version. Hence removing the powerpc assembly versions to make use of generic code.
* math: Regenerate s390 ulpsFlorian Weimer2018-08-172-0/+22
| | | | | Based on results on a s390x 2964 machine, with -march=z196 and -mtune=zEC12, and separately with -march=z13 and -mtune=z14.