1 1.1.1.2 christos # strnlen.m4 serial 14 2 1.1.1.2 christos dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, 3 1.1 christos dnl Inc. 4 1.1 christos dnl This file is free software; the Free Software Foundation 5 1.1 christos dnl gives unlimited permission to copy and/or distribute it, 6 1.1 christos dnl with or without modifications, as long as this notice is preserved. 7 1.1 christos 8 1.1 christos AC_DEFUN([gl_FUNC_STRNLEN], 9 1.1 christos [ 10 1.1.1.2 christos AC_REQUIRE([gl_STRING_H_DEFAULTS]) 11 1.1 christos 12 1.1 christos dnl Persuade glibc <string.h> to declare strnlen(). 13 1.1 christos AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 14 1.1 christos 15 1.1 christos AC_CHECK_DECLS_ONCE([strnlen]) 16 1.1 christos if test $ac_cv_have_decl_strnlen = no; then 17 1.1 christos HAVE_DECL_STRNLEN=0 18 1.1 christos else 19 1.1 christos m4_pushdef([AC_LIBOBJ], [:]) 20 1.1 christos dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]). 21 1.1 christos AC_FUNC_STRNLEN 22 1.1 christos m4_popdef([AC_LIBOBJ]) 23 1.1 christos if test $ac_cv_func_strnlen_working = no; then 24 1.1 christos REPLACE_STRNLEN=1 25 1.1 christos fi 26 1.1 christos fi 27 1.1 christos ]) 28 1.1 christos 29 1.1 christos # Prerequisites of lib/strnlen.c. 30 1.1 christos AC_DEFUN([gl_PREREQ_STRNLEN], [:]) 31