summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2026-05-26 17:51:44 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2026-05-26 21:57:20 -0700
commit225876e97999664a075eb6f1489b4b4c8e515ded (patch)
tree87ef4401231a27883205d68c05b8abf76986436d /lib
parent834ff524f98024cbf30771df3849a5d9241ab2e2 (diff)
ARRAYELTS → countof
C2y will standardize countof as the macro that Emacs uses the name ARRAYELTS for. Switch to the standard name, which is supported by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already in use for compilers that do not support countof. Also, use countof in a few places where we missed using ARRAYELTS. * admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS. * admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h, as it is now a direct rather than an indirect dependency. * exec/trace.c, src/lisp.h, src/sfnt.c: Include <stdcountof.h>. (ARRAYELTS): Remove. All uses replaced by countof. * lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c: * lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c: Prefer <stdcountof.h> and countof to doing things by hand.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnulib.mk.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 2a18a330fa1..0605164636d 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -167,6 +167,7 @@
# stdc_count_ones \
# stdc_trailing_zeros \
# stdckdint-h \
+# stdcountof-h \
# stddef-h \
# stdio-h \
# stdio-windows \