This commit introduces C++ support.
[cacao.git] / src / vmcore / loader.c
index c664b12eaf7f5c9e96ce1c8a13c0090540114763..c303485d056611d5a8bd2e4d7b3103a0e5f530a2 100644 (file)
@@ -43,7 +43,7 @@
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
 #include "vm/global.h"
-#include "vm/package.h"
+#include "vm/package.hpp"
 #include "vm/primitive.h"
 #include "vm/resolve.h"
 #include "vm/stringlocal.h"
@@ -186,7 +186,7 @@ void loader_init(void)
 
        class_java_lang_Throwable  = load_class_bootstrap(utf_java_lang_Throwable);
 
-#if defined(WITH_CLASSPATH_GNU)
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
        class_java_lang_VMSystem   =
                load_class_bootstrap(utf_new_char("java/lang/VMSystem"));
 
@@ -216,7 +216,7 @@ void loader_init(void)
        class_java_lang_reflect_Field          = load_class_bootstrap(utf_java_lang_reflect_Field);
        class_java_lang_reflect_Method         = load_class_bootstrap(utf_java_lang_reflect_Method);
 
-# if defined(WITH_CLASSPATH_GNU)
+# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
        class_java_lang_reflect_VMConstructor  = load_class_bootstrap(utf_java_lang_reflect_VMConstructor);
        class_java_lang_reflect_VMField        = load_class_bootstrap(utf_java_lang_reflect_VMField);
        class_java_lang_reflect_VMMethod       = load_class_bootstrap(utf_java_lang_reflect_VMMethod);
@@ -227,7 +227,7 @@ void loader_init(void)
        class_java_util_HashMap                = load_class_bootstrap(utf_new_char("java/util/HashMap"));
        class_java_util_Vector                 = load_class_bootstrap(utf_java_util_Vector);
 
-# if defined(WITH_CLASSPATH_SUN)
+# if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
        class_sun_reflect_MagicAccessorImpl =
                load_class_bootstrap(utf_new_char("sun/reflect/MagicAccessorImpl"));
 # endif
@@ -240,7 +240,7 @@ void loader_init(void)
        class_sun_reflect_ConstantPool =
                load_class_bootstrap(utf_new_char("sun/reflect/ConstantPool"));
 
-#  if defined(WITH_CLASSPATH_GNU)
+#  if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
        /* needed by GNU Classpaths annotation support */
        class_sun_reflect_annotation_AnnotationParser =
                load_class_bootstrap(utf_new_char("sun/reflect/annotation/AnnotationParser"));
@@ -1130,7 +1130,7 @@ classinfo *load_class_from_classloader(utf *name, classloader_t *cl)
 
                LLNI_class_get(cl, c);
 
-#if defined(WITH_CLASSPATH_SUN)
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
                /* OpenJDK uses this internal function because it's
                   synchronized. */
 
@@ -1323,7 +1323,7 @@ classinfo *load_class_bootstrap(utf *name)
                else {
                        /* Add the package name to the boot packages. */
 
-                       package_add(c->packagename);
+                       Package_add(c->packagename);
                }
 
                r = res;