]> Savannah Git Hosting - gnulib.git/commit
stdbit: remove most module dependence
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 10 May 2024 17:54:43 +0000 (10:54 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 May 2024 18:44:32 +0000 (11:44 -0700)
commitfe62745d4f9c6d6b1b64f9eefb2d077466fad726
treedc3513970e9f0ae883d290e0c6d1942ca149ce67
parent202261b5f0bfe5ab8962209f67781a9b7b6e55c3
stdbit: remove most module dependence

Remove dependence of stdbit on the modules count-leading-zeros,
count-trailing-zeros, and count-one-bits.  stdbit is part of C23
and in the long run is more likely to be more portable, so code
should start preferring it.
* lib/stdbit.c (popcount_support): New var, if needed.
* lib/stdbit.in.h: Contain contents of count-leading-zeros.h,
count-trailing-zeros.h, and count-one-bits.h instead of including
those files.  In the long run those files should be stubs that are
implemented via stdbit.
* modules/stdbit (Depends-on): Do not depend on count-leading-zeros,
count-trailing-zeros, count-one-bits.
ChangeLog
lib/stdbit.c
lib/stdbit.in.h
modules/stdbit