advice wanted on Classpath merging
Nic Ferrier
nferrier@tapsellferrier.co.uk
Tue Jul 10 22:43:00 GMT 2001
I'd like to port my GCJ PlainSocketImpl changes into the Classpath
code.
I have a problem though.
My current code uses select. GCJ requires that I use _Jv_select
(defined in posix.cc).
Classpath, of course, doesn't have a _Jv_select and would just use
select().
Also Classpath uses JNI mappings where GCJ uses CNI.
The Classpath JNI simply call an additional c module they call:
javanet
So there are two issues that confront me:
1. how to implement select
2. how to handle the native code mapping
Dealing with (1) first:
The GCJ code for select might benefit Classpath as well... so I could
easily abstract the functionality of _Jv_select to a module that could
be used by both Classpath and GCJ. But it might be difficult to do
that in a way that's portable between the 2 projects.
Alternately I could use the pre-processor to check what call I should
make for select() functionality.
And now (2)
What is the form for native code mapping? I presume that all of GCJ's
native code should be CNI and no JNI included?
If so I can just have the CNI and Classpath's JNI call the arren
javanet module (as long as I keep the CNI and JNI native requirements
the same).
Any thoughts or ideas are gratefully received.
Nic
More information about the Java
mailing list