]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/memmove.c
c++: constrained hidden friends [PR109751]
[thirdparty/gcc.git] / libiberty / memmove.c
CommitLineData
6599da04
JM
1/* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
2/* This function is in the public domain. --Per Bothner. */
aaa5f039
DD
3
4/*
5
996c0cb0
RW
6@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, @
7 size_t @var{count})
aaa5f039
DD
8
9Copies @var{count} bytes from memory area @var{from} to memory area
10@var{to}, returning a pointer to @var{to}.
11
12@end deftypefn
13
14*/
15
6599da04 16#include <ansidecl.h>
6599da04 17#include <stddef.h>
6599da04 18
6da879de 19void bcopy (const void*, void*, size_t);
0ae0f1b0 20
50b009c5
ML
21void *
22memmove (void *s1, const void *s2, size_t n)
6599da04
JM
23{
24 bcopy (s2, s1, n);
25 return s1;
26}