Move stpcpy replacement function into libbb

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Dan Fandrich 2011-02-12 22:26:57 -08:00 committed by Denys Vlasenko
parent 4ed3c52ce9
commit dc50676cce
3 changed files with 26 additions and 17 deletions

View file

@ -134,3 +134,14 @@ char* FAST_FUNC strsep(char **stringp, const char *delim)
return start;
}
#endif
#ifndef HAVE_STPCPY
char* FAST_FUNC stpcpy(char *p, const char *to_add)
{
while ((*p = *to_add) != '\0') {
p++;
to_add++;
}
return p;
}
#endif