natSystem.cc (arraycopy): Use bcopy if memmove is not available.
1999-07-31 Alexandre Oliva <oliva@dcc.unicamp.br> * java/lang/natSystem.cc (arraycopy): Use bcopy if memmove is not available. Don't cast memmove args to (void*). * configure.in: Do not abort if memmove is not available. From-SVN: r28360
This commit is contained in:
parent
048fc68638
commit
138607df84
4 changed files with 76 additions and 75 deletions
|
@ -171,9 +171,14 @@ java::lang::System::arraycopy (jobject src, jint src_offset,
|
|||
dst_elts = (char *) elements ((jdoubleArray) dst);
|
||||
dst_elts += size * dst_offset;
|
||||
|
||||
#if HAVE_MEMMOVE
|
||||
// We don't bother trying memcpy. It can't be worth the cost of
|
||||
// the check.
|
||||
memmove ((void *) dst_elts, (void *) src_elts, count * size);
|
||||
// Don't cast to (void*), as memmove may expect (char*)
|
||||
memmove (dst_elts, src_elts, count * size);
|
||||
#else
|
||||
bcopy (src_elts, dst_elts, count * size);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue