diff --git a/classpath/java-lang.cpp b/classpath/java-lang.cpp index 00df411811..f5d02d255e 100644 --- a/classpath/java-lang.cpp +++ b/classpath/java-lang.cpp @@ -46,7 +46,7 @@ #define SO_PREFIX "lib" #ifdef __APPLE__ -#define SO_SUFFIX ".jnilib" +#define SO_SUFFIX ".dylib" #include #if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE #include diff --git a/classpath/java/io/StringWriter.java b/classpath/java/io/StringWriter.java index 87c2a1e609..bb71d1209d 100644 --- a/classpath/java/io/StringWriter.java +++ b/classpath/java/io/StringWriter.java @@ -11,7 +11,7 @@ package java.io; public class StringWriter extends Writer { - private final StringBuilder out = new StringBuilder(); + private final StringBuffer out = new StringBuffer(); public void write(char[] b, int offset, int length) throws IOException { out.append(b, offset, length); @@ -24,4 +24,8 @@ public class StringWriter extends Writer { public void flush() throws IOException { } public void close() throws IOException { } + + public StringBuffer getBuffer() { + return out; + } } diff --git a/makefile b/makefile index 0019262396..39056e5b3e 100755 --- a/makefile +++ b/makefile @@ -67,7 +67,7 @@ ifeq ($(filter x86_64 i386 arm,$(arch)),) endif ifeq ($(platform),darwin) - x := $(error "please use 'platform=macosx' or 'platform=ios' instead of 'platform=$platform'") + x := $(error "please use 'platform=macosx' or 'platform=ios' instead of 'platform=$(platform)'") endif ifneq ($(ios),)