3 dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_FFS],
10 AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
12 dnl We can't use AC_CHECK_FUNC here, because ffs() is defined as a
13 dnl static inline function when compiling for Android 13 or older.
14 dnl But require that ffs() is declared; otherwise we may be using
15 dnl the GCC built-in function, which leads to warnings
16 dnl "warning: implicit declaration of function 'ffs'".
17 AC_CACHE_CHECK([for ffs], [gl_cv_func_ffs],
20 [[#include <strings.h>
23 [[int (*func) (int) = ffs;
30 if test $gl_cv_func_ffs = no; then