]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/memmove.c
[Ada] Get rid of linear searches in Lib
[thirdparty/gcc.git] / libiberty / memmove.c
CommitLineData
28e9041c 1/* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
2/* This function is in the public domain. --Per Bothner. */
614a23c6 3
4/*
5
bac427a1 6@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, @
7 size_t @var{count})
614a23c6 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
28e9041c 16#include <ansidecl.h>
28e9041c 17#include <stddef.h>
28e9041c 18
8858115e 19void bcopy (const void*, void*, size_t);
83f85421 20
28e9041c 21PTR
8858115e 22memmove (PTR s1, const PTR s2, size_t n)
28e9041c 23{
24 bcopy (s2, s1, n);
25 return s1;
26}