• Eric Blake's avatar
    ffs: new module · a918da4d
    Eric Blake authored
    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: 's avatarEric Blake <eblake@redhat.com>