summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-09-22 01:59:31 +0200
committerJulien Cristau <jcristau@debian.org>2008-09-22 02:49:15 +0200
commitab17f88506a2dde32c50ff72b03743cd9c384ecc (patch)
tree749d7261c750d01b0457a5bb7ecdeeda74ac8e70
parentaf0d5e2ef7b1b3f42e3522568c5f56850823c102 (diff)
Don't use our version of ffs() if the system has one
-rw-r--r--configure.ac2
-rw-r--r--dix/ffs.c4
-rw-r--r--include/dix-config.h.in3
3 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 95fa73af1..60cdc144a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,7 +180,7 @@ dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
strtol getopt getopt_long vsnprintf walkcontext backtrace \
- getisax getzoneid shmctl64 strcasestr])
+ getisax getzoneid shmctl64 strcasestr ffs])
AC_FUNC_ALLOCA
dnl Old HAS_* names used in os/*.c.
AC_CHECK_FUNC([getdtablesize],
diff --git a/dix/ffs.c b/dix/ffs.c
index b75657d29..d0bd3e507 100644
--- a/dix/ffs.c
+++ b/dix/ffs.c
@@ -30,6 +30,8 @@ The Open Group.
#include <dix-config.h>
#endif
+#ifndef HAVE_FFS
+
#include "dix.h"
int
@@ -42,3 +44,5 @@ ffs(int i)
i >>= 1;
return j;
}
+
+#endif
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 21d8d9c10..06138c5db 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -433,4 +433,7 @@
/* Need the strcasestr function. */
#undef NEED_STRCASESTR
+/* Define to 1 if you have the `ffs' function. */
+#undef HAVE_FFS
+
#endif /* _DIX_CONFIG_H_ */