fls should never be provided by system headers. It seems like on MacOS
it did, but as we're not supporting MacOS anymore there is no need to
check for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
AC_HAVE_PREADV
AC_HAVE_COPY_FILE_RANGE
AC_HAVE_SYNCFS
-AC_HAVE_FLS
AC_HAVE_FSETXATTR
AC_HAVE_MREMAP
AC_NEED_INTERNAL_FSXATTR
* fls: find last bit set.
*/
-#ifndef HAVE_FLS
static inline int fls(int x)
{
int r = 32;
}
return r;
}
-#endif /* HAVE_FLS */
static inline int fls64(__u64 x)
{
HAVE_PWRITEV2 = @have_pwritev2@
HAVE_COPY_FILE_RANGE = @have_copy_file_range@
HAVE_SYNCFS = @have_syncfs@
-HAVE_FLS = @have_fls@
HAVE_FSETXATTR = @have_fsetxattr@
HAVE_MREMAP = @have_mremap@
NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
# _LGPL_SOURCE is for liburcu to work correctly with GPL/LGPL programs
PCFLAGS = -D_LGPL_SOURCE -D_GNU_SOURCE $(GCCFLAGS)
DEPENDFLAGS = -D__linux__
-ifeq ($(HAVE_FLS),yes)
-LCFLAGS+= -DHAVE_FLS
-endif
ifeq ($(HAVE_MNTENT),yes)
PCFLAGS+= -DHAVE_MNTENT
endif
AC_SUBST(have_syncfs)
])
-#
-# Check if we have a flc call (Mac OS X)
-#
-AC_DEFUN([AC_HAVE_FLS],
- [ AC_CHECK_DECL([fls],
- have_fls=yes,
- [],
- [#include <string.h>]
- )
- AC_SUBST(have_fls)
- ])
-
#
# Check if we have a fsetxattr call
#