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