1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-14 14:01:48 +03:00
Files
gnulib/modules/ffs
Eric Blake a918da4d61 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>
2011-07-11 17:18:25 -06:00

28 lines
302 B
Plaintext

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