emacs/lib
Paul Eggert 88b0bb4db9 Prefer stdbit.h to count-one-bits.h etc
C23's <stdbit.h> in the long run should be better supported than
Gnulib's count-one-bits.h and similar headers, so switch to the
C23 primitives, with a Gnulib fallback for platforms lacking C23.
* admin/merge-gnulib (GNULIB_MODULES): Remove count-leading-zeros,
count-one-bits, count-trailing-zeros.  Add stdc_bit_width,
stdc_count_ones, stdc_trailing_zeros.
* lib/count-leading-zeros.c, lib/count-leading-zeros.h:
* lib/count-one-bits.c, lib/count-one-bits.h:
* lib/count-trailing-zeros.c, lib/count-trailing-zeros.h: Remove.
* lib/stdbit.c, lib/stdbit.in.h, lib/stdc_bit_width.c:
* lib/stdc_count_ones.c, lib/stdc_leading_zeros.c:
* lib/stdc_trailing_zeros.c, m4/stdbit_h.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/data.c: Do not include count-one-bits.h, count-trailing-zeros.h.
Instead, rely on lisp.h including stdbit.h.
(Flogcount, Fbool_vector_count_population)
(Fbool_vector_count_consecutive): Use stdbit.h macros instead of
count-one-bits.h and count-trailing-zeros.h macros.
(shift_right_ull, count_one_bits_word, pre_value)
(count_trailing_zero_bits): Remove; no longer needed.
* src/lisp.h: Include stdbit.h instead of count-leading-zeros.h.
(elogb): Use stdbit.h macro instead of count-leading-zeros.h macro.
2024-05-18 10:23:51 -07:00
..
malloc Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
COPYING Merge from Gnulib 2017-10-01 18:31:10 -07:00
Makefile.in Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
_Noreturn.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
acl-errno-valid.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
acl-internal.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
acl-internal.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
acl.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
acl_entries.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
af_alg.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
alloca.in.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
allocator.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
allocator.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
arg-nonnull.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
assert.in.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
at-func.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
attribute.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
binary-io.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
binary-io.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
boot-time-aux.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
boot-time.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
boot-time.h ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
byteswap.c Update from Gnulib by running admin/merge-gnulib 2024-05-18 10:23:50 -07:00
byteswap.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-18 10:23:50 -07:00
c++defs.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
c-ctype.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
c-ctype.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
c-strcase.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
c-strcasecmp.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
c-strncasecmp.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
canonicalize-lgpl.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
careadlinkat.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
careadlinkat.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
cdefs.h Update from Gnulib by running admin/merge-gnulib 2024-01-30 17:23:26 -08:00
cloexec.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
cloexec.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
close-stream.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
close-stream.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
copy-file-range.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
diffseq.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
dirent-private.h ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
dirent.in.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
dirfd.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
dtoastr.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
dtotimespec.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
dup2.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
dynarray.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eloop-threshold.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
errno.in.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
euidaccess.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
execinfo.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
execinfo.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
explicit_bzero.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
faccessat.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
fchmodat.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
fcntl.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
fcntl.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
fdopendir.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
file-has-acl.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
filemode.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
filemode.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
filename.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
filevercmp.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
filevercmp.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
fingerprint.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
fingerprint.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
flexmember.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
fpending.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
fpending.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
free.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
fstatat.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
fsusage.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
fsusage.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
fsync.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ftoastr.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ftoastr.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
futimens.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
get-permissions.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getdelim.c ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
getdtablesize.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getgroups.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
getline.c ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
getloadavg.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
getopt-cdefs.in.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
getopt-core.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getopt-ext.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getopt-pfx-core.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
getopt-pfx-ext.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getopt.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
getopt.in.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getopt1.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
getopt_int.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
getrandom.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
gettext.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
gettime.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
gettimeofday.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
gnulib.mk.in Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
group-member.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
idx.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
ieee754.in.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ignore-value.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
intprops-internal.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
intprops.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
inttypes.in.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lchmod.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
libc-config.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
limits.in.h Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00
lstat.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
malloc.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
md5-stream.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
md5.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
md5.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
memmem.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
mempcpy.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
memrchr.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
memset_explicit.c Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
min-max.h [ChangeLog] 2011-02-21 15:22:34 -08:00
mini-gmp-gnulib.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
mini-gmp.c Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
mini-gmp.h Update from Gnulib by running admin/merge-gnulib 2022-07-06 00:00:18 -05:00
minmax.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
mkostemp.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
mktime-internal.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
mktime.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
nanosleep.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
nproc.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
nproc.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
nstrftime.c Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00
open.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
openat-die.c Limit <config.h>’s includes 2016-09-30 12:38:52 -07:00
openat-priv.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
openat-proc.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
openat.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
pathmax.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
pipe2.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
pselect.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
pthread_sigmask.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
qcopy-acl.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
rawmemchr.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
rawmemchr.valgrind ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
readlink.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
readlinkat.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
readutmp.h Update from Gnulib 2024-01-22 08:47:34 +08:00
realloc.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regcomp.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
regex.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
regex.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regex_internal.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regex_internal.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
regexec.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
root-uid.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
save-cwd.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
save-cwd.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
scratch_buffer.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
set-permissions.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sha1.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sha1.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sha256.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sha256.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sha512.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sha512.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sig2str.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sig2str.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sigdescr_np.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
signal.in.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
stat-time.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
stat-time.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
stdalign.in.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
stdbit.c Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
stdbit.in.h Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
stdc_bit_width.c Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
stdc_count_ones.c Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
stdc_leading_zeros.c Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
stdc_trailing_zeros.c Prefer stdbit.h to count-one-bits.h etc 2024-05-18 10:23:51 -07:00
stdckdint.in.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
stddef.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
stdint.in.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
stdio-impl.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
stdio.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
stdlib.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-18 10:23:50 -07:00
stpcpy.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
str-two-way.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
strftime.c Update from Gnulib by running admin/merge-gnulib 2024-05-18 10:23:50 -07:00
strftime.h Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00
string.in.h Update from Gnulib by running admin/merge-gnulib 2024-01-30 17:23:26 -08:00
strnlen.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
strtoimax.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
strtol.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
strtoll.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
symlink.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sys_random.in.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
sys_select.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-18 10:23:50 -07:00
sys_stat.in.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
sys_time.in.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
sys_types.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
tempname.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
tempname.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
time-internal.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
time.in.h Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00
time_r.c Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00
time_rz.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timegm.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timespec-add.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
timespec-sub.c Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
timespec.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timespec.h Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
u64.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
u64.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
unistd.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
unistd.in.h Update from Gnulib by running admin/merge-gnulib 2024-05-18 10:23:50 -07:00
unlocked-io.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
utimens.c Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
utimens.h Update from Gnulib by running admin/merge-gnulib 2024-05-11 18:46:26 -07:00
utimensat.c ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
verify.h Update from Gnulib by running admin/merge-gnulib 2024-01-20 11:45:38 -08:00
vla.h ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
warn-on-use.h Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00
xalloc-oversized.h Update from Gnulib by running admin/merge-gnulib 2024-02-14 22:05:06 -08:00