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
Java_java_io_File_toAbsolutePath(JNIEnv* e, jclass, jstring path)
Java_java_io_File_toAbsolutePath(JNIEnv* e UNUSED, jclass, jstring path)
{
#ifdef PLATFORM_WINDOWS
// todo

View File

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

View File

@ -103,7 +103,8 @@ public class Runtime {
if (exception[0] != null) {
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 {
throw new RuntimeException(exception[0]);
}

View File

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