3 dnl Copyright (C) 2020-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_WMEMPCPY],
10 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
12 dnl Persuade glibc <wchar.h> to declare wmempcpy().
13 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
15 dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
16 AC_REQUIRE([AC_C_RESTRICT])
18 gl_CHECK_FUNCS_ANDROID([wmempcpy], [[#include <wchar.h>]])
19 if test $ac_cv_func_wmempcpy = no; then
21 case "$gl_cv_onwards_func_wmempcpy" in
22 future*) REPLACE_WMEMPCPY=1 ;;