diff options
author | Alexandre Oliva <oliva@dcc.unicamp.br> | 1999-07-31 23:41:15 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-07-31 23:41:15 +0000 |
commit | 138607df84309e4542b348c8f27bd1b17c8b387d (patch) | |
tree | c5ef21666630bf0217fa8bbe432d64a14d7d911e /libjava/java | |
parent | 048fc686384138a7489ccbb7428ac35c84b6513e (diff) | |
download | gcc-138607df84309e4542b348c8f27bd1b17c8b387d.zip gcc-138607df84309e4542b348c8f27bd1b17c8b387d.tar.gz gcc-138607df84309e4542b348c8f27bd1b17c8b387d.tar.bz2 |
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
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natSystem.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index 4f67ee9..b1effaf 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -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 { |