1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

I take it all back --- bcopy does handle overlapping source and

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.
This commit is contained in:
Jim Blandy 1999-09-01 02:52:27 +00:00
parent b074884f06
commit be881b4688
2 changed files with 24 additions and 3 deletions

24
libguile/memmove.c Normal file
View file

@ -0,0 +1,24 @@
/* 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;
}

View file

@ -176,9 +176,6 @@
/* Define if you have the atexit function. */
#undef HAVE_ATEXIT
/* Define if you have the bcopy function. */
#undef HAVE_BCOPY
/* Define if you have the bzero function. */
#undef HAVE_BZERO