From e41133d268cbac4e67e1f30acd5bc36526583baf Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 28 Oct 2014 14:49:50 -0600 Subject: [PATCH 1/3] fix malformed variable reference in makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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),) From f25d5921a5e0dec4e6e4741a83880861bcb8842d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 28 Oct 2014 14:52:02 -0600 Subject: [PATCH 2/3] implement StringWriter.getBuffer This is used by json.org's JSON library. --- classpath/java/io/StringWriter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; + } } From 2776e98bf5e8ae93df3336c10b9710bbf6b32a41 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 28 Oct 2014 14:53:43 -0600 Subject: [PATCH 3/3] use .dylib instead of .jnilib as OS X library suffix This matches the behavior of System.mapLibraryName on JDK 7 and later. --- classpath/java-lang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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