jdk14 on -current

Greg Lewis glewis at misty.eyesbeyond.com
Sat Aug 23 07:32:19 PDT 2003


On Fri, Aug 22, 2003 at 10:33:27PM -0400, Daniel Eischen wrote:
> Has anyone tried building jdk14 on -current.  I've never been
> lucky enough to get it to build.  It seems to be failing now
> because of the compiler:
> 
> Compiling
> /opt/FreeBSD/src/ports/java/jdk14/work/hotspot/src/share/vm/memory/javaClasses.cpp
> Compiling
> /opt/FreeBSD/src/ports/java/jdk14/work/hotspot/src/share/vm/prims/jni.cpp
> /opt/FreeBSD/src/ports/java/jdk14/work/hotspot/src/share/vm/prims/jni.cpp:929:50:
> pasting "." and "i" does not give a valid preprocessing token
> /opt/FreeBSD/src/ports/java/jdk14/work/hotspot/src/share/vm/prims/jni.cpp:929:50:
> pasting "." and "i" does not give a valid preprocessing token
> /opt/FreeBSD/src/ports/java/jdk14/work/hotspot/src/share/vm/prims/jni.cpp:929:50:
> pasting

Please try the attached patch (from CVS).  Let me know if it works and I'll
get something like it committed.

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org

-------------- next part --------------
Index: hotspot/src/share/vm/prims/jni.cpp
===================================================================
RCS file: /var/jcvs/javasrc_1_4_scsl/hotspot/src/share/vm/prims/jni.cpp,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- hotspot/src/share/vm/prims/jni.cpp	23 Jan 2003 12:48:13 -0000	1.1.1.2
+++ hotspot/src/share/vm/prims/jni.cpp	6 Aug 2003 20:56:29 -0000	1.2
@@ -902,7 +902,7 @@
   JNI_ArgumentPusherVaArg ap(methodID, args); \
   jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0); \
   va_end(args); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END \
 \
 \
@@ -912,7 +912,7 @@
   JavaValue jvalue(Tag); \
   JNI_ArgumentPusherVaArg ap(methodID, args); \
   jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END \
 \
 \
@@ -922,7 +922,7 @@
   JavaValue jvalue(Tag); \
   JNI_ArgumentPusherArray ap(methodID, args); \
   jni_invoke_nonstatic(env, &jvalue, obj, JNI_VIRTUAL, methodID, &ap, CHECK_0); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END
 
 // the runtime type of subword integral basic types is integer
@@ -976,7 +976,7 @@
   JNI_ArgumentPusherVaArg ap(methodID, args); \
   jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0); \
   va_end(args); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END \
 \
 \
@@ -986,7 +986,7 @@
   JavaValue jvalue(Tag); \
   JNI_ArgumentPusherVaArg ap(methodID, args); \
   jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END \
 \
 \
@@ -996,7 +996,7 @@
   JavaValue jvalue(Tag); \
   JNI_ArgumentPusherArray ap(methodID, args); \
   jni_invoke_nonstatic(env, &jvalue, obj, JNI_NONVIRTUAL, methodID, &ap, CHECK_0); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END
 
 // the runtime type of subword integral basic types is integer
@@ -1051,7 +1051,7 @@
   JNI_ArgumentPusherVaArg ap(methodID, args); \
   jni_invoke_static(env, &jvalue, NULL, JNI_STATIC, methodID, &ap, CHECK_0); \
   va_end(args); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END \
 \
 \
@@ -1061,7 +1061,7 @@
   JavaValue jvalue(Tag); \
   JNI_ArgumentPusherVaArg ap(methodID, args); \
   jni_invoke_static(env, &jvalue, NULL, JNI_STATIC, methodID, &ap, CHECK_0); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END \
 \
 \
@@ -1071,7 +1071,7 @@
   JavaValue jvalue(Tag); \
   JNI_ArgumentPusherArray ap(methodID, args); \
   jni_invoke_static(env, &jvalue, NULL, JNI_STATIC, methodID, &ap, CHECK_0); \
-  return (ResultType)(jvalue._value.##unionType); \
+  return (ResultType)(jvalue._value.unionType); \
 JNI_END
 
 // the runtime type of subword integral basic types is integer
@@ -1204,7 +1204,7 @@
   /* and creates a ResetNoHandleMark.                                   */ \
   if (jvmdi::enabled()) { \
     jvalue field_value; \
-    field_value.##unionType = value; \
+    field_value.unionType = value; \
     o = jvmdi::jni_SetField_probe_nh(thread, obj, o, k, fieldID, false, SigType, (jvalue *)&field_value); \
   } \
   o->Fieldname##_field_put(offset, value); \
@@ -1333,7 +1333,7 @@
   /* jni_SetField_probe() assumes that is okay to create handles. */ \
   if (jvmdi::enabled()) { \
     jvalue field_value; \
-    field_value.##unionType = value; \
+    field_value.unionType = value; \
     jvmdi::jni_SetField_probe(thread, NULL, NULL, id->holder(), fieldID, true, SigType, (jvalue *)&field_value); \
   } \
   id->holder()-> Fieldname##_field_put (id->offset(), value); \
Index: hotspot/src/share/vm/runtime/jvmdiInterfaceSupport.hpp
===================================================================
RCS file: /var/jcvs/javasrc_1_4_scsl/hotspot/src/share/vm/runtime/jvmdiInterfaceSupport.hpp,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- hotspot/src/share/vm/runtime/jvmdiInterfaceSupport.hpp	23 Jan 2003 12:48:15 -0000	1.1.1.2
+++ hotspot/src/share/vm/runtime/jvmdiInterfaceSupport.hpp	6 Aug 2003 20:55:55 -0000	1.2
@@ -24,7 +24,7 @@
   result_type JNICALL methodName signature {                                         \
     JavaThread* thread = (JavaThread*) ThreadLocalStorage::thread();                 \
     TransitionClass __tiv(thread);                                                   \
-    __ENTRY(result_type, methodName##signature, thread)                              \
+    __ENTRY(result_type, methodName signature, thread)                              \
     debug_only(VMNativeEntryWrapper __vew;)                                          \
     debug_only(const char* const _jvmdi_methodName_ = #methodName;)                  \
     debug_only(bool  _trace_ = trace; );                                             \
Index: hotspot/src/share/vm/runtime/mutexLocker.cpp
===================================================================
RCS file: /var/jcvs/javasrc_1_4_scsl/hotspot/src/share/vm/runtime/mutexLocker.cpp,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- hotspot/src/share/vm/runtime/mutexLocker.cpp	23 Jan 2003 12:48:15 -0000	1.1.1.2
+++ hotspot/src/share/vm/runtime/mutexLocker.cpp	6 Aug 2003 20:55:15 -0000	1.2
@@ -95,7 +95,7 @@
 #endif
 
 #define def(var, type, pri, vm_block) \
-  var = new type(Mutex::##pri, #var, vm_block)
+  var = new type(Mutex::pri, #var, vm_block)
 
 void mutex_init() {  
   def(Event_lock                   , Mutex  , event,       true ); // allow to lock in VM


More information about the freebsd-java mailing list