mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
destination areas correctly. At least on every system I could find. But it is better to use AC_REPLACE_FUNCS than to introduce new CPP conditionals. * memmove.c: New file, implementing memmove in terms of bcopy. * scmconfig.h.in: Regenerated.
24 lines
416 B
C
24 lines
416 B
C
/* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
|
|
/* This function is in the public domain. --Per Bothner. */
|
|
|
|
#include <sys/types.h>
|
|
|
|
#ifdef __STDC__
|
|
#define PTR void *
|
|
#define CPTR const void *
|
|
PTR memmove (PTR, CPTR, size_t);
|
|
#else
|
|
#define PTR char *
|
|
#define CPTR char *
|
|
PTR memmove ();
|
|
#endif
|
|
|
|
PTR
|
|
memmove (s1, s2, n)
|
|
PTR s1;
|
|
CPTR s2;
|
|
size_t n;
|
|
{
|
|
bcopy (s2, s1, n);
|
|
return s1;
|
|
}
|