Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/arm/string fix rump



details:   https://anonhg.NetBSD.org/src/rev/b10a68a35308
branches:  trunk
changeset: 820736:b10a68a35308
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 14 03:35:21 2017 +0000

description:
fix rump

diffstat:

 common/lib/libc/arch/arm/string/strcpy_arm.S   |  20 +++++++++++++++-----
 common/lib/libc/arch/arm/string/strcpy_naive.S |   7 ++++---
 2 files changed, 19 insertions(+), 8 deletions(-)

diffs (73 lines):

diff -r 1e64b5afadf6 -r b10a68a35308 common/lib/libc/arch/arm/string/strcpy_arm.S
--- a/common/lib/libc/arch/arm/string/strcpy_arm.S      Sat Jan 14 03:00:13 2017 +0000
+++ b/common/lib/libc/arch/arm/string/strcpy_arm.S      Sat Jan 14 03:35:21 2017 +0000
@@ -29,19 +29,29 @@
 
 #include <machine/asm.h>
 
-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 -r 1e64b5afadf6 -r b10a68a35308 common/lib/libc/arch/arm/string/strcpy_naive.S
--- a/common/lib/libc/arch/arm/string/strcpy_naive.S    Sat Jan 14 03:00:13 2017 +0000
+++ b/common/lib/libc/arch/arm/string/strcpy_naive.S    Sat Jan 14 03:35:21 2017 +0000
@@ -28,11 +28,12 @@
  */
 #include <machine/asm.h>
 
-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 @@
 
 #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 @@
        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)



Home | Main Index | Thread Index | Old Index