- /* At least one implementation is buggy: that of AIX 4.3. */
- int i;
- for (i = 0; i < S_LEN + 1; ++i)
- {
- int result = i <= S_LEN ? i : S_LEN;
- if (strnlen (S, i) != result)
- exit (1);
- }
- exit (0);
-]])],
- [ac_cv_func_strnlen_working=yes],
- [ac_cv_func_strnlen_working=no],
- [ac_cv_func_strnlen_working=no])])
-test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen])
-])# AC_FUNC_STRNLEN
+# Prerequisites of lib/strnlen.c.
+AC_DEFUN([gl_PREREQ_STRNLEN], [
+ AC_CHECK_DECLS_ONCE(strnlen)
+])