Merge branch 'ios' of oss:/var/local/git/avian into ios

Conflicts:
	makefile
This commit is contained in:
Joel Dice 2011-08-29 19:07:42 -06:00
commit 6923c74c4c
4 changed files with 19 additions and 11 deletions

View File

@ -314,7 +314,7 @@ Java_java_io_File_toCanonicalPath(JNIEnv* /*e*/, jclass, jstring path)
} }
extern "C" JNIEXPORT jstring JNICALL extern "C" JNIEXPORT jstring JNICALL
Java_java_io_File_toAbsolutePath(JNIEnv* e, jclass, jstring path) Java_java_io_File_toAbsolutePath(JNIEnv* e UNUSED, jclass, jstring path)
{ {
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
// todo // todo

View File

@ -413,8 +413,8 @@ Java_java_lang_Runtime_exec(JNIEnv* e, jclass,
execvp(argv[0], argv); execvp(argv[0], argv);
// Error if here // Error if here
char c = errno; int val = errno;
ssize_t rv UNUSED = write(msg[1], &c, 1); ssize_t rv UNUSED = write(msg[1], &val, sizeof(val));
exit(127); exit(127);
} break; } break;
@ -427,12 +427,13 @@ Java_java_lang_Runtime_exec(JNIEnv* e, jclass,
safeClose(err[1]); safeClose(err[1]);
safeClose(msg[1]); safeClose(msg[1]);
char c; int val;
int r = read(msg[0], &c, 1); int r = read(msg[0], &val, sizeof(val));
if(r == -1) { if(r == -1) {
throwNewErrno(e, "java/io/IOException"); throwNewErrno(e, "java/io/IOException");
return; return;
} else if(r) { } else if(r) {
errno = val;
throwNewErrno(e, "java/io/IOException"); throwNewErrno(e, "java/io/IOException");
return; return;
} }

View File

@ -103,7 +103,8 @@ public class Runtime {
if (exception[0] != null) { if (exception[0] != null) {
if (exception[0] instanceof IOException) { if (exception[0] instanceof IOException) {
throw new IOException(exception[0]); String message = "Failed to run \"" + command[0] + "\": " + exception[0].getMessage();
throw new IOException(message);
} else { } else {
throw new RuntimeException(exception[0]); throw new RuntimeException(exception[0]);
} }

View File

@ -240,7 +240,7 @@ endif
ifeq ($(arch),arm) ifeq ($(arch),arm)
asm = arm asm = arm
pointer-size = 4 pointer-size = 4
ifneq ($(platform),darwin) ifneq ($(build-platform),darwin)
cflags += -marm -Wno-psabi cflags += -marm -Wno-psabi
endif endif
@ -262,10 +262,17 @@ ifeq ($(arch),arm)
endif endif
endif endif
ifeq ($(platform),linux) ifeq ($(platform),linux)
cflags += -DTARGET_PLATFORM_LINUX cflags += -DTARGET_PLATFORM_LINUX
endif endif
ifeq ($(build-platform),darwin)
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
cflags += -I/System/Library/Frameworks/JavaVM.framework/Headers/
build-lflags += -framework CoreFoundation
endif
ifeq ($(platform),darwin) ifeq ($(platform),darwin)
cflags += -DTARGET_PLATFORM_DARWIN cflags += -DTARGET_PLATFORM_DARWIN
@ -284,10 +291,6 @@ ifeq ($(platform),darwin)
sysroot = /opt/mac/SDKs/MacOSX${OSX_SDK_SYSROOT}.sdk sysroot = /opt/mac/SDKs/MacOSX${OSX_SDK_SYSROOT}.sdk
cflags = -I$(sysroot)/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers/ \ cflags = -I$(sysroot)/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers/ \
$(common-cflags) -fPIC -fvisibility=hidden -I$(src) $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
else
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
cflags += -I/System/Library/Frameworks/JavaVM.framework/Headers/
build-lflags += -framework CoreFoundation
endif endif
version-script-flag = version-script-flag =
@ -565,6 +568,9 @@ else
-DAVIAN_CLASSPATH=\"[classpathJar]\" -DAVIAN_CLASSPATH=\"[classpathJar]\"
endif endif
cflags += $(extra-cflags)
lflags += $(extra-lflags)
driver-source = $(src)/main.cpp driver-source = $(src)/main.cpp
driver-object = $(build)/main.o driver-object = $(build)/main.o
driver-dynamic-objects = \ driver-dynamic-objects = \