Base bcopy on memmove rather than memcpy.

POSIX defined bcopy to handle overlapping memory akin to memmove and
bionic appears to have always done so.

Change-Id: I2599113411e3532913270ba1c1b49e35cbc5f106
This commit is contained in:
Rohit Agrawal 2015-12-05 12:39:54 -08:00
parent 9dec0a775b
commit d51a0b0f9d

View File

@ -247,7 +247,7 @@ sighandler_t bsd_signal(int signum, sighandler_t handler) {
// This was removed from POSIX 2008. // This was removed from POSIX 2008.
#undef bcopy #undef bcopy
void bcopy(const void* src, void* dst, size_t n) { void bcopy(const void* src, void* dst, size_t n) {
memcpy(dst, src, n); memmove(dst, src, n);
} }
#else #else
// x86 has an assembler implementation. // x86 has an assembler implementation.