X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fproperties.c;h=599e05879ea0bb81a5ec30eef945aac3825c5417;hb=345ceab5946711a40fdeefb55a0cf469960146d0;hp=29a200aa671136a3ebf31f3d608337a15391354d;hpb=7659949229c634784f7d27aa8b679fdd4c8351ab;p=cacao.git diff --git a/src/vm/properties.c b/src/vm/properties.c index 29a200aa6..599e05879 100644 --- a/src/vm/properties.c +++ b/src/vm/properties.c @@ -25,6 +25,7 @@ #include "config.h" +#include #include #include #include @@ -32,29 +33,25 @@ #include #include -#include "vm/types.h" - #include "mm/memory.h" #include "native/jni.h" #include "native/llni.h" -#include "vm/global.h" /* required by java_lang_String.h */ -#include "native/include/java_lang_String.h" - #include "toolbox/list.h" #include "toolbox/util.h" +#include "vm/global.h" #include "vm/properties.h" -#include "vm/stringlocal.h" -#include "vm/vm.h" +#include "vm/string.hpp" +#include "vm/vm.hpp" #include "vm/jit/asmpart.h" #include "vmcore/class.h" #include "vmcore/method.h" #include "vmcore/options.h" -#include "vmcore/system.h" +#include "vmcore/os.hpp" /* internal property structure ************************************************/ @@ -62,8 +59,8 @@ typedef struct list_properties_entry_t list_properties_entry_t; struct list_properties_entry_t { - char *key; - char *value; + const char* key; + const char* value; listnode_t linkage; }; @@ -139,8 +136,8 @@ void properties_set(void) Now let's strip two levels. */ - p = system_dirname(p); - p = system_dirname(p); + p = os_dirname(p); + p = os_dirname(p); # if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH) @@ -177,7 +174,7 @@ void properties_set(void) /* Check if that libjvm.so exists. */ - if (system_access(java_home, F_OK) == 0) { + if (os_access(java_home, F_OK) == 0) { /* Yes, we add /jre to java.home. */ strcpy(java_home, p); @@ -578,7 +575,7 @@ void properties_set(void) *******************************************************************************/ -void properties_add(char *key, char *value) +void properties_add(const char *key, const char *value) { list_properties_entry_t *pe; @@ -625,7 +622,7 @@ void properties_add(char *key, char *value) *******************************************************************************/ -char *properties_get(char *key) +const char *properties_get(const char *key) { list_properties_entry_t *pe; @@ -645,7 +642,7 @@ char *properties_get(char *key) *******************************************************************************/ -void properties_system_add(java_handle_t *p, char *key, char *value) +void properties_system_add(java_handle_t *p, const char *key, const char *value) { classinfo *c; methodinfo *m;