From c5828043f14364441cd0725fa3e8d19b192611bf Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 16 Jun 1993 18:38:38 +0000 Subject: [PATCH] Actually, just make memcpy() an alias for memmove(). --- lib/libc/i386/string/memmove.s | 1 + lib/libc/string/Makefile.inc | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libc/i386/string/memmove.s b/lib/libc/i386/string/memmove.s index db9c685b3aa8..e88d1202ed75 100644 --- a/lib/libc/i386/string/memmove.s +++ b/lib/libc/i386/string/memmove.s @@ -43,6 +43,7 @@ */ ENTRY(memmove) +ENTRY(memcpy) pushl %esi pushl %edi movl 12(%esp),%edi diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index 791707919b67..6e35a23fa56e 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -16,7 +16,7 @@ SRCS+= bcmp.c bcopy.s bzero.s ffs.s index.s memchr.c memcmp.c memset.c \ rindex.s strcat.s strcmp.s strcpy.s strcspn.c strlen.s \ strncat.c strncmp.s strncpy.c strpbrk.c strsep.c \ strspn.c strstr.c -SRCS+= strchr.s strrchr.s memcpy.s memmove.s +SRCS+= memmove.s strchr.s strrchr.s .elif (${MACHINE} == "tahoe") SRCS+= bcmp.s bcopy.s bzero.s ffs.s index.c memchr.c memcmp.s memset.c \ rindex.c strcat.s strcmp.s strcpy.s strcspn.c strlen.s \ @@ -46,7 +46,10 @@ memmove.po: bcopy.c .endif # if no machine specific memcpy(3), build one out of bcopy(3). +# if there is a machine specific memmove(3), we'll assume it aliases +# memcpy(3). .if empty(SRCS:Mmemcpy.s) +.if empty(SRCS:Mmemmove.s) OBJS+= memcpy.o memcpy.o: bcopy.c ${CC} -DMEMCOPY ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} @@ -58,6 +61,7 @@ memcpy.po: bcopy.c @${LD} -X -r ${.TARGET} @mv a.out ${.TARGET} .endif +.endif # if no machine specific strchr(3), build one out of index(3). .if empty(SRCS:Mstrchr.s)