This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcj on osx questions
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java at gcc dot gnu dot org
- Cc: Andi Vajda <andi at osafoundation dot org>, jym at Cs dot Nott dot AC dot UK, Bryce McKinlay <mckinlay at redhat dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Mon, 12 Dec 2005 19:54:58 -0600
- Subject: gcj on osx questions
- Reply-to: gnustuff at thisiscool dot com
Hi All,
This is a two-part question. I have a cute little used Mac Mini
sitting on ny dining room table that I'm trying to get gcj-built
executables to work on.
First of all, I needed to make a change to natPlainSocketImplPosix.cc
to get sockets working:
void
gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lport)
{
union SockAddr u;
struct sockaddr *ptr = (struct sockaddr *) &u.address;
jbyteArray haddress = host->addr;
jbyte *bytes = elements (haddress);
int len = haddress->length;
int i = 1;
+ memset (&u, 0, sizeof (u));
if (len == 4)
I did this against a 4.02 snapshot but am not sure where to
go from here since the trunk is already at 4.2.
The second question has to do with this:
http://gcc.gnu.org/ml/java/2005-03/msg00053.html
>Tom Tromey wrote:
>
>Andi> Not that I know of. The problem is not with gcj but with Apple, they
>Andi> changed some of the structures, sometimes in the middle.
>
> Oh, right, I remember now. Somehow I forgot our earlier discussion.
>
>Perhaps it would be possible to add some #ifdef's etc to our jni.h to make it compatible with Apple's on OS X?
>
>Bryce
I'd like to get JNI libraries built against Apple's JDK to be loaded
by libgcj, but Andi remarked that Apple changed the structures in jni.h.
Bryce commented that through #ifdefs, it might be possible to change libgcj's
jni.h to make it compatible with Apple's.
My question is: How does one go about doing this? Are we allowed to look at the
Apple headers or does doing so taint us?
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/