This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: javah, volatile, and CNI
- From: Tom Tromey <tromey at redhat dot com>
- To: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: 26 Jan 2007 13:55:32 -0700
- Subject: Patch: FYI: javah, volatile, and CNI
- Reply-to: tromey at redhat dot com
I'm checking this in.
This fixes the 'volatile' problem that Andrew pointed out.
I just put this in Classpath, the libjava change also updates the .h
files.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* Updated headers.
Index: classpath/ChangeLog
from Tom Tromey <tromey@redhat.com>
* tools/gnu/classpath/tools/javah/FieldHelper.java (print): Print
'volatile' after field type.
Index: classpath/tools/gnu/classpath/tools/javah/FieldHelper.java
===================================================================
--- classpath/tools/gnu/classpath/tools/javah/FieldHelper.java (revision 121196)
+++ classpath/tools/gnu/classpath/tools/javah/FieldHelper.java (working copy)
@@ -1,5 +1,5 @@
/* FieldHelper.java - field helper methods for CNI
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,12 +52,12 @@
out.print(" ");
if (Modifier.isStatic(field.access))
out.print("static ");
- if (Modifier.isVolatile(field.access))
- out.print("volatile ");
if ((field.value instanceof Integer) || (field.value instanceof Long))
out.print("const ");
out.print(Type.getType(field.desc));
out.print(" ");
+ if (Modifier.isVolatile(field.access))
+ out.print("volatile ");
boolean result = false;
if (superType != null && ! Modifier.isStatic(field.access))
{