+2023-03-22 Bruno Haible <bruno@clisp.org>
+
+ vasnwprintf: Fix a warning: implicit declaration of function ‘wcsnlen’.
+ * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether wcsnlen is
+ declared.
+ * lib/vasnprintf.c (local_wcsnlen): Together with HAVE_WCSNLEN, test
+ also HAVE_DECL_WCSNLEN.
+
2023-03-22 Bruno Haible <bruno@clisp.org>
vasnwprintf: Fix a "warning: unused function local_wcsnlen".
#endif
#if (!USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
-# if HAVE_WCSNLEN
+# if HAVE_WCSNLEN && HAVE_DECL_WCSNLEN
# define local_wcsnlen wcsnlen
# else
# ifndef local_wcsnlen_defined
-# vasnprintf.m4 serial 45
+# vasnprintf.m4 serial 46
dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
AC_CHECK_FUNCS_ONCE([swprintf wcsnlen mbrtowc])
AC_CHECK_DECLS([_snwprintf], , , [[#include <stdio.h>]])
+ AC_CHECK_DECLS([wcsnlen], , , [[#include <wchar.h>]])
gl_SWPRINTF_WORKS
case "$gl_cv_func_swprintf_works" in
*yes)