[PATCH 2/2] xstrtol: simplify integer overflow checking

2022-01-16 Thread Paul Eggert
* lib/xstrtol.c: Include intprops.h. (TYPE_SIGNED): Remove, as intprops.h defines that for us now. (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for overflow by hand. --- ChangeLog | 6 ++ lib/xstrtol.c | 17 +++-- 2 files changed, 13 insertions(+), 10 deletions(-)

[PATCH 1/2] xstrtoll-tests: use %lld for long long

2022-01-16 Thread Paul Eggert
* tests/test-xstrtoll.c, tests/test-xstrtoull.c (__spec): Do not assume long long is 64 bits, or that exact-width 64-bit types exist. Although these assumptions are true on current Gnulib platforms they are not true in general. Also, GCC warns if PRId64 is "ld" but intmax_t is long long even when

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Pádraig Brady
On 16/01/2022 18:06, Paul Eggert wrote: On 1/16/22 05:37, Pádraig Brady wrote: This looks like the replacement will only be used when the build system uses an older kernel? If so this seems brittle. Consider the case where el7 rpms are being built on central build systems with newer kernels.

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Paul Eggert
On 1/16/22 05:37, Pádraig Brady wrote: This looks like the replacement will only be used when the build system uses an older kernel? If so this seems brittle. Consider the case where el7 rpms are being built on central build systems with newer kernels. It doesn't run any code on the newer

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Pádraig Brady
On 15/01/2022 01:33, Paul Eggert wrote: --- a/m4/copy-file-range.m4 +++ b/m4/copy-file-range.m4 @@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_COPY_FILE_RANGE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) +