X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fnative%2Fvm%2Fopenjdk%2Fhpi.c;h=7b89c594ae59419cf60009127e22c412e62c7e87;hb=06ef503f935789e8cf4919b3d3da67cbbd805db1;hp=87f0a7d4059e6beb222458cd3cb9ae0970ac9f06;hpb=990bb8d619c70f16ff2d8aab707ed5069f90154b;p=cacao.git diff --git a/src/native/vm/openjdk/hpi.c b/src/native/vm/openjdk/hpi.c index 87f0a7d40..7b89c594a 100644 --- a/src/native/vm/openjdk/hpi.c +++ b/src/native/vm/openjdk/hpi.c @@ -36,12 +36,13 @@ #include "native/jni.h" #include "native/native.h" -#include "vm/properties.h" -#include "vm/vm.h" +#include "native/vm/openjdk/hpi.h" -#include "vmcore/options.h" -#include "vmcore/system.h" -#include "vmcore/utf8.h" +#include "vm/options.h" +#include "vm/os.hpp" +#include "vm/properties.h" +#include "vm/utf8.h" +#include "vm/vm.hpp" /* VM callback functions ******************************************************/ @@ -78,13 +79,14 @@ HPI_SystemInterface *hpi_system = NULL; void hpi_initialize(void) { - char *boot_library_path; - int len; - char *p; - utf *u; - lt_dlhandle handle; - lt_ptr dll_initialize; - int result; + const char* boot_library_path; + int len; + char* p; + utf* u; + void* handle; + void* dll_initialize; + int result; + jint (JNICALL * DLL_Initialize)(GetInterfaceFunc *, void *); TRACESUBSYSTEMINITIALIZATION("hpi_init"); @@ -94,14 +96,14 @@ void hpi_initialize(void) boot_library_path = properties_get("sun.boot.library.path"); len = - system_strlen(boot_library_path) + - system_strlen("/native_threads/libhpi.so") + - system_strlen("0"); + os_strlen(boot_library_path) + + os_strlen("/native_threads/libhpi.so") + + os_strlen("0"); p = MNEW(char, len); - system_strcpy(p, boot_library_path); - system_strcat(p, "/native_threads/libhpi.so"); + os_strcpy(p, boot_library_path); + os_strcat(p, "/native_threads/libhpi.so"); u = utf_new_char(p); @@ -118,12 +120,12 @@ void hpi_initialize(void) /* Resolve the DLL_Initialize function from the library. */ - dll_initialize = lt_dlsym(handle, "DLL_Initialize"); + dll_initialize = os_dlsym(handle, "DLL_Initialize"); DLL_Initialize = (jint (JNICALL *)(GetInterfaceFunc *, void *)) (intptr_t) dll_initialize; if (opt_TraceHPI && DLL_Initialize == NULL) - log_println("hpi_init: HPI dlsym of DLL_Initialize failed: %s", lt_dlerror()); + log_println("hpi_init: HPI dlsym of DLL_Initialize failed: %s", os_dlerror()); if (DLL_Initialize == NULL || (*DLL_Initialize)(&hpi_get_interface, &callbacks) < 0) {