Hi,
Back in commit 4f658dc8 we gained src/port/fls.c. As anticipated by
its commit message, we later finished up with something better in
src/include/port/pg_bitutils.h. fls() ("find last set") is an
off-by-one cousin of pg_leftmost_one_pos32(). I don't know why ffs()
("find first set", the rightmost variant) made it into POSIX while
fls() did not, other than perhaps its more amusing name. fls() is
present on *BSD, Macs and maybe more, but not everywhere, hence the
configure test. Let's just do it with pg_bitutils.h instead, and drop
some cruft? Open to better ideas on whether we need a new function,
or there is some way to use the existing facilities directly without
worrying about undefined behaviour for 0, etc.
Noticed while looking for configure stuff to cull. Mentioning
separately because this isn't a simple
no-longer-needed-crutch-for-prestandard-system case like the others in
a nearby thread.