mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
* gh_data.c (gh_set_substr): Revert change of 1999-08-29; bcopy is
not a correct substitute for memmove, because it doesn't handle overlapping source and destination areas on many platforms. Overlaps are the primary reason to use memmove in the first place. * ports.c (scm_ungetc): Same. * strop.c (scm_substring_move_x): Same.
This commit is contained in:
parent
74a28fa178
commit
aa97ff6036
3 changed files with 0 additions and 26 deletions
|
@ -147,19 +147,9 @@ scm_substring_move_x (SCM str1, SCM start1, SCM end1,
|
|||
SCM_ASSERT (len+s2 <= SCM_LENGTH (str2), start2,
|
||||
SCM_OUTOFRANGE, s_substring_move_x);
|
||||
|
||||
#ifdef HAVE_MEMMOVE
|
||||
SCM_SYSCALL(memmove((void *)(&(SCM_CHARS(str2)[s2])),
|
||||
(void *)(&(SCM_CHARS(str1)[s1])),
|
||||
len));
|
||||
#else
|
||||
#ifdef HAVE_BCOPY
|
||||
SCM_SYSCALL(bcopy((void *)(&(SCM_CHARS(str1)[s1])),
|
||||
(void *)(&(SCM_CHARS(str2)[s2])),
|
||||
len));
|
||||
#else
|
||||
#error Need memmove. Please send a bug report to bug-guile@gnu.org.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return scm_return_first(SCM_UNSPECIFIED, str1, str2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue