2 * Copyright (C) 2002 Manuel Novoa III
3 * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
14 /* inlined binary search method */
16 #if UINT_MAX == 0xffffU
17 /* nothing to do here -- just trying to avoiding possible problems */
18 #elif UINT_MAX == 0xffffffffU
24 #error ffs needs rewriting!
39 return (i) ? (n + ((i+1) & 0x01)) : 0;
42 /* linear search -- slow, but small */
45 for (n = 0 ; i ; ++n) {
53 #if ULONG_MAX == UINT_MAX
54 strong_alias_untyped(ffs, ffsl)