2005-04-08 Benjamin Kosnik <bkoz@redhat.com>
[official-gcc.git] / libiberty / memcpy.c
blob8a97b85b06a517c3338338d602a132c6e6930dfb
1 /* memcpy (the standard C function)
2 This function is in the public domain. */
4 /*
6 @deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length})
8 Copies @var{length} bytes from memory region @var{in} to region
9 @var{out}. Returns a pointer to @var{out}.
11 @end deftypefn
15 #include <ansidecl.h>
16 #ifdef ANSI_PROTOTYPES
17 #include <stddef.h>
18 #else
19 #define size_t unsigned long
20 #endif
22 void bcopy (const void*, void*, size_t);
24 PTR
25 memcpy (PTR out, const PTR in, size_t length)
27 bcopy(in, out, length);
28 return out;