diff --git a/makefile b/makefile index 639ed6c501..20788775ae 100755 --- a/makefile +++ b/makefile @@ -251,9 +251,9 @@ ifneq ($(android),) android-cflags += -D__STDC_CONSTANT_MACROS blacklist = $(luni-native)/java_io_Console.cpp \ $(luni-native)/java_lang_ProcessManager.cpp \ + $(luni-native)/java_math_NativeBN.cpp \ $(luni-native)/libcore_net_RawSocket.cpp - luni-cpps := $(filter-out $(blacklist),$(luni-cpps)) icu-libs := $(android)/external/icu4c/lib/sicuin.a \ $(android)/external/icu4c/lib/sicuuc.a \ $(android)/external/icu4c/lib/sicudt.a @@ -262,11 +262,11 @@ ifneq ($(android),) android-cflags += -fPIC -DHAVE_SYS_UIO_H blacklist = $(luni-native)/java_math_NativeBN.cpp - luni-cpps := $(filter-out $(blacklist),$(luni-cpps)) icu-libs := $(android)/external/icu4c/lib/libicui18n.a \ $(android)/external/icu4c/lib/libicuuc.a \ $(android)/external/icu4c/lib/libicudata.a endif + luni-cpps := $(filter-out $(blacklist),$(luni-cpps)) classpath-lflags := \ $(icu-libs) \ diff --git a/src/classpath-android.cpp b/src/classpath-android.cpp index 6650a829c9..4b4d669ed8 100644 --- a/src/classpath-android.cpp +++ b/src/classpath-android.cpp @@ -2565,13 +2565,14 @@ void register_libcore_net_RawSocket(_JNIEnv*) extern "C" AVIAN_EXPORT void JNICALL Avian_libcore_io_OsConstants_initConstants(Thread* t, - object method, + object m, uintptr_t*) { - object c = method->class_(); + GcMethod* method = cast(t, m); + GcClass* c = method->class_(); PROTECT(t, c); - object table = classStaticTable(t, c); + object table = c->staticTable(); PROTECT(t, table); GcField* field = resolveField(t, c, "STDIN_FILENO", "I"); @@ -2587,7 +2588,7 @@ extern "C" AVIAN_EXPORT void JNICALL extern "C" AVIAN_EXPORT int64_t JNICALL Avian_libcore_io_Posix_getenv(Thread* t, object, uintptr_t* arguments) { - object name = reinterpret_cast(arguments[1]); + GcString* name = cast(t, reinterpret_cast(arguments[1])); THREAD_RUNTIME_ARRAY(t, uint16_t, chars, name->length(t) + 1); stringChars(t, name, RUNTIME_ARRAY_BODY(chars)); @@ -2598,9 +2599,9 @@ extern "C" AVIAN_EXPORT int64_t JNICALL if (value) { unsigned size = wcslen(value); - object a = makeCharArray(t, size); + GcCharArray* a = makeCharArray(t, size); if (size) { - memcpy(&charArrayBody(t, a, 0), value, size * sizeof(jchar)); + memcpy(a->body().begin(), value, size * sizeof(jchar)); } return reinterpret_cast( @@ -2630,23 +2631,23 @@ extern "C" AVIAN_EXPORT int64_t JNICALL object arch = makeString(t, "unknown"); #endif - set(t, + setField(t, instance, - fieldOffset(t, resolveField(t, c, "machine", "Ljava/lang/String;")), + resolveField(t, c, "machine", "Ljava/lang/String;")->offset(), arch); object platform = makeString(t, "Windows"); - set(t, + setField(t, instance, - fieldOffset(t, resolveField(t, c, "sysname", "Ljava/lang/String;")), + resolveField(t, c, "sysname", "Ljava/lang/String;")->offset(), platform); object version = makeString(t, "unknown"); - set(t, + setField(t, instance, - fieldOffset(t, resolveField(t, c, "release", "Ljava/lang/String;")), + resolveField(t, c, "release", "Ljava/lang/String;")->offset(), version); return reinterpret_cast(instance); @@ -2658,7 +2659,7 @@ extern "C" AVIAN_EXPORT int64_t JNICALL object fd = reinterpret_cast(arguments[1]); PROTECT(t, fd); - object buffer = reinterpret_cast(arguments[2]); + GcByteArray* buffer = cast(t, reinterpret_cast(arguments[2])); PROTECT(t, buffer); int offset = arguments[3]; @@ -2669,7 +2670,7 @@ extern "C" AVIAN_EXPORT int64_t JNICALL int r; if (objectClass(t, buffer) == type(t, GcByteArray::Type)) { void* tmp = t->m->heap->allocate(count); - memcpy(tmp, &byteArrayBody(t, buffer, offset), count); + memcpy(tmp, &buffer->body()[offset], count); { ENTER(t, Thread::IdleState); r = _write(d, tmp, count); diff --git a/src/tools/binary-to-object/main.cpp b/src/tools/binary-to-object/main.cpp index 4cd9ff5879..583e687fe6 100644 --- a/src/tools/binary-to-object/main.cpp +++ b/src/tools/binary-to-object/main.cpp @@ -14,7 +14,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #else #include