Hash :
a918da4d
Author :
Date :
2011-07-11T17:05:34
ffs: new module Libvirt wants to use ffs() to avoid dragging in -lm for log2(). * modules/ffs: New file. * m4/ffs.m4: Likewise. * lib/ffs.c: Likewise. * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Add default. * modules/strings (Makefile.am): Substitute witness. (Depends-on): Add c++defs. * lib/strings.in.h (ffs): Declare. * modules/ffs-tests: New test file. * tests/test-ffs.c: Test new module. * MODULES.html.sh (Integer arithmetic functions): Mention it. * doc/posix-functions/ffs.texi (ffs): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Description:
Finds the index of the least-significant set bit.
Files:
lib/ffs.c
m4/ffs.m4
Depends-on:
strings
configure.ac:
gl_FUNC_FFS
if test $HAVE_FFS = 0; then
AC_LIBOBJ([ffs])
fi
gl_STRINGS_MODULE_INDICATOR([ffs])
Makefile.am:
Include:
<strings.h>
License:
LGPLv2+
Maintainer:
Eric Blake