From: twisti Date: Wed, 22 Aug 2007 19:32:27 +0000 (+0000) Subject: * src/vm/properties.c (properties_set): Fixed build for CLDC-1.1, X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=594eb1fccbc1f0847e2e4bff38bca722da7ca3cc;p=cacao.git * src/vm/properties.c (properties_set): Fixed build for CLDC-1.1, removed getenv of JAVA_HOME. * src/threads/native/threads.c (threads_detach_thread): Fixed build for CLDC-1.1. --- diff --git a/src/threads/native/threads.c b/src/threads/native/threads.c index 8393fbd87..0ad3ec0a0 100644 --- a/src/threads/native/threads.c +++ b/src/threads/native/threads.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: threads.c 8366 2007-08-20 20:24:35Z twisti $ + $Id: threads.c 8402 2007-08-22 19:32:27Z twisti $ */ @@ -1445,9 +1445,9 @@ bool threads_detach_thread(threadobject *t) java_handle_t *o; #endif +#if defined(ENABLE_JAVASE) object = t->object; -#if defined(ENABLE_JAVASE) group = LLNI_field_direct(object, group); /* If there's an uncaught exception, call uncaughtException on the diff --git a/src/vm/properties.c b/src/vm/properties.c index 303204d96..91cb5e875 100644 --- a/src/vm/properties.c +++ b/src/vm/properties.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: properties.c 8401 2007-08-22 18:45:31Z twisti $ + $Id: properties.c 8402 2007-08-22 19:32:27Z twisti $ */ @@ -99,14 +99,15 @@ void properties_init(void) void properties_set(void) { -#if defined(ENABLE_JAVASE) int len; char *p; char *java_home; - char *boot_library_path; char *boot_class_path; + +#if defined(ENABLE_JAVASE) char *class_path; + char *boot_library_path; # if defined(WITH_CLASSPATH_GNU) char *cwd; @@ -208,9 +209,19 @@ void properties_set(void) java_home = CACAO_PREFIX; # if defined(WITH_CLASSPATH_GNU) + boot_library_path = CLASSPATH_LIBDIR"/classpath"; -# else + +# elif defined(WITH_CLASSPATH_SUN) + boot_library_path = CLASSPATH_LIBDIR; + +# elif defined(WITH_CLASSPATH_CLDC1_1) + + /* No boot_library_path required. */ + +# else +# error unknown classpath configuration # endif #endif @@ -337,6 +348,8 @@ void properties_set(void) properties_add("java.boot.class.path", boot_class_path); properties_add("sun.boot.class.path", boot_class_path); +#if defined(ENABLE_JAVASE) + /* Set the classpath. */ p = getenv("CLASSPATH"); @@ -352,13 +365,7 @@ void properties_set(void) properties_add("java.class.path", class_path); -#if defined(ENABLE_JAVASE) - - /* get properties from system */ - - p = getenv("JAVA_HOME"); - - /* fill in system properties */ + /* Add java.vm properties. */ properties_add("java.vm.specification.version", "1.0"); properties_add("java.vm.specification.vendor", "Sun Microsystems Inc.");