aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorPaul Eggert2024-05-12 14:22:58 -0700
committerPaul Eggert2024-05-18 10:23:51 -0700
commit88b0bb4db9aaecff8b01e81726b911fa5d02b2fb (patch)
tree8ac3e75bba0a9082a94e7c3a03cd8b590f07a97d /admin
parent08550d058f028e0819ba6a72e9a53c0bc789257e (diff)
downloademacs-88b0bb4db9aaecff8b01e81726b911fa5d02b2fb.tar.gz
emacs-88b0bb4db9aaecff8b01e81726b911fa5d02b2fb.zip
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.
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/merge-gnulib5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index c4daaded015..65e098c7123 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -29,7 +29,6 @@ GNULIB_MODULES='
29 alignasof alloca-opt binary-io boot-time byteswap c-ctype c-strcase 29 alignasof alloca-opt binary-io boot-time byteswap c-ctype c-strcase
30 canonicalize-lgpl 30 canonicalize-lgpl
31 careadlinkat close-stream copy-file-range 31 careadlinkat close-stream copy-file-range
32 count-leading-zeros count-one-bits count-trailing-zeros
33 crypto/md5 crypto/md5-buffer 32 crypto/md5 crypto/md5-buffer
34 crypto/sha1-buffer crypto/sha256-buffer crypto/sha512-buffer 33 crypto/sha1-buffer crypto/sha256-buffer crypto/sha512-buffer
35 d-type diffseq double-slash-root dtoastr dtotimespec dup2 34 d-type diffseq double-slash-root dtoastr dtotimespec dup2
@@ -44,7 +43,9 @@ GNULIB_MODULES='
44 nanosleep nproc nstrftime 43 nanosleep nproc nstrftime
45 pathmax pipe2 pselect pthread_sigmask 44 pathmax pipe2 pselect pthread_sigmask
46 qcopy-acl readlink readlinkat regex 45 qcopy-acl readlink readlinkat regex
47 sig2str sigdescr_np socklen stat-time std-gnu11 stdbool stdckdint stddef stdio 46 sig2str sigdescr_np socklen stat-time std-gnu11 stdbool
47 stdc_bit_width stdc_count_ones stdc_trailing_zeros
48 stdckdint stddef stdio
48 stpcpy strnlen strnlen strtoimax symlink sys_stat sys_time 49 stpcpy strnlen strnlen strtoimax symlink sys_stat sys_time
49 tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub 50 tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
50 update-copyright unlocked-io utimensat 51 update-copyright unlocked-io utimensat