mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-24 12:58:39 +00:00
* configure.ac: Check for stpcpy() support.
* src/misc.c (stpcpy): Define it if not provided.
This commit is contained in:
parent
6f7e06ec4e
commit
e33af0fb4a
2 changed files with 17 additions and 2 deletions
|
@ -133,8 +133,8 @@ AS_IF([test "$ac_cv_func_gettimeofday" = yes],
|
|||
[Define to 1 if you have a standard gettimeofday function])
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS([strtoll strdup strndup memrchr mempcpy umask mkstemp mktemp \
|
||||
fdopen dup dup2 getcwd realpath sigsetmask sigaction \
|
||||
AC_CHECK_FUNCS([strtoll strdup strndup stpcpy memrchr mempcpy umask mkstemp \
|
||||
mktemp fdopen dup dup2 getcwd realpath sigsetmask sigaction \
|
||||
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||
getrlimit setrlimit setvbuf pipe strerror strsignal \
|
||||
lstat readlink atexit isatty ttyname pselect posix_spawn \
|
||||
|
|
15
src/misc.c
15
src/misc.c
|
@ -636,6 +636,21 @@ mempcpy (void *dest, const void *src, size_t n)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_STPCPY
|
||||
char *
|
||||
stpcpy (char *dest, const char *src)
|
||||
{
|
||||
char *d = dest;
|
||||
const char *s = src;
|
||||
|
||||
do
|
||||
*d++ = *s;
|
||||
while (*s++ != '\0');
|
||||
|
||||
return d - 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRTOLL
|
||||
# undef UNSIGNED
|
||||
# undef USE_NUMBER_GROUPING
|
||||
|
|
Loading…
Reference in a new issue