--- /home/cpdev/src/classpath/java/lang/StringBuffer.java	2005-07-02 21:03:34.000000000 +0000
+++ java/lang/StringBuffer.java	2005-06-30 05:34:39.000000000 +0000
@@ -263,7 +263,7 @@
   {
     if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset)
       throw new StringIndexOutOfBoundsException();
-    VMSystem.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset);
+    System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset);
   }
 
   /**
@@ -334,7 +334,7 @@
       {
         int len = stringBuffer.count;
         ensureCapacity_unsynchronized(count + len);
-        VMSystem.arraycopy(stringBuffer.value, 0, value, count, len);
+        System.arraycopy(stringBuffer.value, 0, value, count, len);
         count += len;
       }
     return this;
@@ -374,7 +374,7 @@
     if (offset < 0 || count < 0 || offset > data.length - count)
       throw new StringIndexOutOfBoundsException();
     ensureCapacity_unsynchronized(this.count + count);
-    VMSystem.arraycopy(data, offset, value, this.count, count);
+    System.arraycopy(data, offset, value, this.count, count);
     this.count += count;
     return this;
   }
@@ -415,11 +415,8 @@
    * @return this <code>StringBuffer</code>
    * @see String#valueOf(int)
    */
-  // This is native in libgcj, for efficiency.
-  public StringBuffer append(int inum)
-  {
-    return append(String.valueOf(inum));
-  }
+  // GCJ LOCAL: this is native for efficiency.
+  public native StringBuffer append (int inum);
 
   /**
    * Append the <code>String</code> value of the argument to this
@@ -483,7 +480,7 @@
     // This will unshare if required.
     ensureCapacity_unsynchronized(count);
     if (count - end != 0)
-      VMSystem.arraycopy(value, end, value, start, count - end);
+      System.arraycopy(value, end, value, start, count - end);
     count -= end - start;
     return this;
   }
@@ -526,7 +523,7 @@
     ensureCapacity_unsynchronized(count + delta);
 
     if (delta != 0 && end < count)
-      VMSystem.arraycopy(value, end, value, end + delta, count - end);
+      System.arraycopy(value, end, value, end + delta, count - end);
 
     str.getChars(0, len, value, start);
     count += delta;
@@ -613,8 +610,8 @@
         || str_offset < 0 || str_offset > str.length - len)
       throw new StringIndexOutOfBoundsException();
     ensureCapacity_unsynchronized(count + len);
-    VMSystem.arraycopy(value, offset, value, offset + len, count - offset);
-    VMSystem.arraycopy(str, str_offset, value, offset, len);
+    System.arraycopy(value, offset, value, offset + len, count - offset);
+    System.arraycopy(str, str_offset, value, offset, len);
     count += len;
     return this;
   }
@@ -653,7 +650,7 @@
       str = "null";
     int len = str.count;
     ensureCapacity_unsynchronized(count + len);
-    VMSystem.arraycopy(value, offset, value, offset + len, count - offset);
+    System.arraycopy(value, offset, value, offset + len, count - offset);
     str.getChars(0, len, value, offset);
     count += len;
     return this;
@@ -704,7 +701,7 @@
     if (offset < 0 || offset > count)
       throw new StringIndexOutOfBoundsException(offset);
     ensureCapacity_unsynchronized(count + 1);
-    VMSystem.arraycopy(value, offset, value, offset + 1, count - offset);
+    System.arraycopy(value, offset, value, offset + 1, count - offset);
     value[offset] = ch;
     count++;
     return this;
@@ -900,7 +897,7 @@
                    : value.length);
         minimumCapacity = (minimumCapacity < max ? max : minimumCapacity);
         char[] nb = new char[minimumCapacity];
-        VMSystem.arraycopy(value, 0, nb, 0, count);
+        System.arraycopy(value, 0, nb, 0, count);
         value = nb;
         shared = false;
       }
@@ -919,13 +916,6 @@
    * @see #lastIndexOf(String, int)
    * @see String#regionMatches(boolean, int, String, int, int)
    */
-  private boolean regionMatches(int toffset, String other)
-  {
-    int len = other.count;
-    int index = other.offset;
-    while (--len >= 0)
-      if (value[toffset++] != other.value[index++])
-        return false;
-    return true;
-  }
+  // GCJ LOCAL: native for gcj.
+  private native boolean regionMatches(int toffset, String other);
 }
