diff --git a/common/lib/libc/arch/arm/string/strcpy_arm.S b/common/lib/libc/arch/arm/string/strcpy_arm.S index 7b0721d8453c..146d6e147522 100644 --- a/common/lib/libc/arch/arm/string/strcpy_arm.S +++ b/common/lib/libc/arch/arm/string/strcpy_arm.S @@ -29,19 +29,29 @@ #include -RCSID("$NetBSD: strcpy_arm.S,v 1.5 2017/01/14 03:00:13 christos Exp $") +RCSID("$NetBSD: strcpy_arm.S,v 1.6 2017/01/14 03:35:21 christos Exp $") #ifdef STRLCPY #ifdef _LIBC WEAK_ALIAS(strlcpy, _strlcpy) -#endif -#define FUNCNAME _strlcpy +# define FUNCNAME _strlcpy +# else +# define FUNCNAME strlcpy +# endif #elif defined(STRNCPY) +# ifdef _LIBC WEAK_ALIAS(strncpy, _strncpy) -#define FUNCNAME _strncpy +# define FUNCNAME _strncpy +# else +# define FUNCNAME strncpy +# endif #else +# ifdef _LIBC WEAK_ALIAS(strcpy, _strcpy) -#define FUNCNAME _strcpy +# define FUNCNAME _strcpy +# else +# define FUNCNAME strcpy +# endif #endif #ifdef __ARMEL__ diff --git a/common/lib/libc/arch/arm/string/strcpy_naive.S b/common/lib/libc/arch/arm/string/strcpy_naive.S index 5b450a560d5f..c3be9bfa356a 100644 --- a/common/lib/libc/arch/arm/string/strcpy_naive.S +++ b/common/lib/libc/arch/arm/string/strcpy_naive.S @@ -28,11 +28,12 @@ */ #include -RCSID("$NetBSD: strcpy_naive.S,v 1.5 2017/01/13 13:14:54 christos Exp $") +RCSID("$NetBSD: strcpy_naive.S,v 1.6 2017/01/14 03:35:21 christos Exp $") #ifdef _LIBC #ifdef STRLCPY WEAK_ALIAS(strlcpy, _strlcpy) +#define strlcpy _strlcpy #endif #endif @@ -43,7 +44,7 @@ WEAK_ALIAS(strlcpy, _strlcpy) #if defined(STRLCPY) /* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */ -ENTRY(_strlcpy) +ENTRY(strlcpy) add ip, r1, #1 /* save src pointer (+ NUL) */ subs r2, r2, #1 /* make sure there's room for a NUL */ blt 3f /* no room, do the strlen */ @@ -62,7 +63,7 @@ ENTRY(_strlcpy) bne 3b /* no, get next byte */ 4: sub r0, r1, ip /* return length of src string */ RET -END(_strlcpy) +END(strlcpy) #elif defined(STRNCPY) /* LINTSTUB: char * strncpy(char *, const char *, size_t) */ ENTRY(_strncpy)