]> git.ipfire.org Git - thirdparty/coreutils.git/commit
factor: switch to stdc_leading_zeros etc
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Sep 2024 23:53:52 +0000 (16:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 28 Sep 2024 00:42:58 +0000 (17:42 -0700)
commite3f3670c7e4525ccd7108d33d663987833c7ed8b
treeb5427d59d7f6dd1f9e24b85aeae3b84c6aae9ccf
parent5867465510d023ece420e9921fc1034e3abd6455
factor: switch to stdc_leading_zeros etc

* bootstrap.conf (gnulib_modules): Add stdc_trailing_zeros.
* cfg.mk (_gl_TS_unmarked_extern_vars): Remove factor_clz_tab,
as it’s no longer present.
* src/factor.c: Include stdbit.h.
(__clz_tab, factor_clz_tab): Remove.
(ASSERT, UHWtype, __GMP_DECLSPEC): Use simpler way to pacify
-Wunused-macros.
(count_leading_zeros, count_trailing_zeros):
Remove.  All uses replaced by stdc_leading_zeros, stdc_trailing_zeros.
(factor_using_division, prime2_p): Add a couple of ‘assume’s
so that GCC knows the stdc_* calls are nonzero and can
optimize accordingly.
bootstrap.conf
cfg.mk
src/factor.c