| 1 |
# stpcpy.m4 |
| 2 |
# serial 11 |
| 3 |
dnl Copyright (C) 2002, 2007, 2009-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. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_DEFUN([gl_FUNC_STPCPY], |
| 10 |
[ |
| 11 |
dnl Persuade glibc <string.h> to declare stpcpy(). |
| 12 |
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) |
| 13 |
|
| 14 |
dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. |
| 15 |
AC_REQUIRE([AC_C_RESTRICT]) |
| 16 |
|
| 17 |
AC_REQUIRE([gl_STRING_H_DEFAULTS]) |
| 18 |
gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]]) |
| 19 |
if test $ac_cv_func_stpcpy = no; then |
| 20 |
HAVE_STPCPY=0 |
| 21 |
case "$gl_cv_onwards_func_stpcpy" in |
| 22 |
future*) REPLACE_STPCPY=1 ;; |
| 23 |
esac |
| 24 |
fi |
| 25 |
]) |
| 26 |
|
| 27 |
# Prerequisites of lib/stpcpy.c. |
| 28 |
AC_DEFUN([gl_PREREQ_STPCPY], [ |
| 29 |
: |
| 30 |
]) |