summaryrefslogtreecommitdiffstats
path: root/libc/string/generic/memmove.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-06-19 07:23:49 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-06-19 07:23:49 +0000
commit3f3ef88b6546bbd73098b8a903a4a8e9fe8c25de (patch)
treec1f9f45e8931c77d17dfe83d51eec05f552d3983 /libc/string/generic/memmove.c
parent8b96f0d1ca80a4ba9f8b06313dac4e7a351d728d (diff)
downloaduClibc-alpine-3f3ef88b6546bbd73098b8a903a4a8e9fe8c25de.tar.bz2
uClibc-alpine-3f3ef88b6546bbd73098b8a903a4a8e9fe8c25de.tar.xz
Move static function _wordcopy_fwd_aligned and _wordcopy_fwd_dest_aligned from memcopy.h to _memcpy_fwd.c to avoid unneeded inclusion in other .c files and silent gcc about unused static function
Diffstat (limited to 'libc/string/generic/memmove.c')
-rw-r--r--libc/string/generic/memmove.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libc/string/generic/memmove.c b/libc/string/generic/memmove.c
index febf014ca..7f945b150 100644
--- a/libc/string/generic/memmove.c
+++ b/libc/string/generic/memmove.c
@@ -24,8 +24,13 @@
#include "memcopy.h"
#include "pagecopy.h"
-libc_hidden_proto(memmove)
-libc_hidden_proto(memcpy)
+#ifdef __ARCH_HAS_BWD_MEMCPY__
+/* generic-opt memmove assumes memcpy does forward copying! */
+#include "_memcpy_fwd.c"
+#endif
+
+/* Experimentally off - libc_hidden_proto(memmove) */
+/* Experimentally off - libc_hidden_proto(memcpy) */
static void _wordcopy_bwd_aligned (long int dstp, long int srcp, size_t len)
{
@@ -223,7 +228,7 @@ void *memmove (void *dest, const void *src, size_t len)
if (dstp - srcp >= len) /* *Unsigned* compare! */
{
#ifndef __ARCH_HAS_BWD_MEMCPY__
- /* generic-opt memmove assumes memcpy does forward copying! */
+ /* Backward memcpy implementation cannot be used */
memcpy(dest, src, len);
#else
/* Copy from the beginning to the end. */
@@ -283,4 +288,4 @@ void *memmove (void *dest, const void *src, size_t len)
return (dest);
}
-libc_hidden_def(memmove)
+libc_hidden_weak(memmove)