[PATCH 16/26] configure: don't check for fls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 configure.ac          |  1 -
 include/bitops.h      |  2 --
 include/builddefs.in  |  4 ----
 m4/package_libcdev.m4 | 12 ------------
 4 files changed, 19 deletions(-)

diff --git a/configure.ac b/configure.ac
index 68d50e2d2..79fb475f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,7 +167,6 @@ AC_HAVE_PWRITEV2
 AC_HAVE_PREADV
 AC_HAVE_COPY_FILE_RANGE
 AC_HAVE_SYNCFS
-AC_HAVE_FLS
 AC_HAVE_FSETXATTR
 AC_HAVE_MREMAP
 AC_NEED_INTERNAL_FSXATTR
diff --git a/include/bitops.h b/include/bitops.h
index fe6173039..1f1adcecc 100644
--- a/include/bitops.h
+++ b/include/bitops.h
@@ -6,7 +6,6 @@
  * fls: find last bit set.
  */
 
-#ifndef HAVE_FLS
 static inline int fls(int x)
 {
 	int r = 32;
@@ -34,7 +33,6 @@ static inline int fls(int x)
 	}
 	return r;
 }
-#endif /* HAVE_FLS */
 
 static inline int fls64(__u64 x)
 {
diff --git a/include/builddefs.in b/include/builddefs.in
index 4951ae9d9..47ac7173c 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -95,7 +95,6 @@ HAVE_PREADV = @have_preadv@
 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@
@@ -127,9 +126,6 @@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
 # _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
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 25d869841..17319bb23 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -91,18 +91,6 @@ syncfs(0);
     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
 #
-- 
2.39.2





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux