maint: avoid new tight-scope syntax-check failure

* src/system.h (floor_log2): Declare with "SYSTEM_INLINE int"
on the same line as the function name, to accommodate the
tight-scope syntax-check rule.
* cfg.mk (_gl_TS_extern): Add SYSTEM_INLINE to the regexp.
This commit is contained in:
Jim Meyering 2023-06-06 21:49:24 -07:00
parent 29f1874aea
commit 608a613abd
2 changed files with 2 additions and 3 deletions

2
cfg.mk
View File

@ -74,4 +74,4 @@ exclude_file_name_regexp--sc_space_tab = ^gl/lib/.*\.c\.diff$$
exclude_file_name_regexp--sc_prohibit_doubled_word = ^tests/y2038-vs-32bit$$
# Tell gnulib's tight_scope rule that we mark externs with XTERN
export _gl_TS_extern = extern|XTERN|DIFF_INLINE
export _gl_TS_extern = extern|XTERN|DIFF_INLINE|SYSTEM_INLINE

View File

@ -212,8 +212,7 @@ verify (LIN_MAX <= IDX_MAX);
#define STREQ(a, b) (strcmp (a, b) == 0)
/* Return the floor of the log base 2 of N. Return -1 if N is zero. */
SYSTEM_INLINE int
floor_log2 (idx_t n)
SYSTEM_INLINE int floor_log2 (idx_t n)
{
verify (IDX_MAX <= ULLONG_MAX);
return ULLONG_WIDTH - 1 - count_leading_zeros_ll (n);