Bug 39408

Summary: gjavah doesn't generate constants in header files where they occur in a superclass
Product: classpath Reporter: Andrew John Hughes <gnu_andrew>
Component: cp-toolsAssignee: Andrew John Hughes <gnu_andrew>
Severity: normal CC: bug-classpath
Priority: P3    
Version: 0.98   
Target Milestone: 0.99   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2009-03-16 23:53:57
Bug Depends on:    
Bug Blocks: 39410    

Description Andrew John Hughes 2009-03-09 14:33:21 UTC
In OpenJDK[7] b50:

../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c: In function 'Java_sun_nio_ch_FileDispatcherImpl_lock0':
../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: error: 'sun_nio_ch_FileDispatcherImpl_NO_LOCK' undeclared (first use in this function)
../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: error: (Each undeclared identifier is reported only once
../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:195: error: for each function it appears in.)
../../../src/solaris/native/sun/nio/ch/FileDispatcherImpl.c:197: error: 'sun_nio_ch_FileDispatcherImpl_INTERRUPTED' undeclared (first use in this function)

NO_LOCK and INTERRUPTED are not declared in FileDispatcherImpl, but in FileDispatcher.
Comment 1 Andrew John Hughes 2009-03-16 23:53:57 UTC
 diff -u sun_nio_ch_FileDispatcherImpl.h{.old,}
--- sun_nio_ch_FileDispatcherImpl.h.old	2009-03-13 18:40:49.000000000 +0000
+++ sun_nio_ch_FileDispatcherImpl.h	2009-03-16 23:38:01.000000000 +0000
@@ -7,6 +7,14 @@
 #ifdef __cplusplus
 extern "C" {
+#undef sun_nio_ch_FileDispatcherImpl_NO_LOCK
+#define sun_nio_ch_FileDispatcherImpl_NO_LOCK -1L
+#undef sun_nio_ch_FileDispatcherImpl_LOCKED
+#define sun_nio_ch_FileDispatcherImpl_LOCKED 0L
+#undef sun_nio_ch_FileDispatcherImpl_RET_EX_LOCK
+#define sun_nio_ch_FileDispatcherImpl_RET_EX_LOCK 1L
+#undef sun_nio_ch_FileDispatcherImpl_INTERRUPTED
+#define sun_nio_ch_FileDispatcherImpl_INTERRUPTED 2L
  * Class:     sun_nio_ch_FileDispatcherImpl
  * Method:    read0
Comment 2 Andrew John Hughes 2009-03-25 12:25:39 UTC
Bug fixed.  linkSupers() was never called before the search for eligible fields was made.
Comment 3 Andrew John Hughes 2010-10-12 17:28:16 UTC
Merged to gcj in libgcj-snapshot-20100921.