Fwd: JAmiga nio

2 views
Skip to first unread message

Joakim Nordström

unread,
Jun 24, 2011, 6:02:49 AM6/24/11
to jam...@googlegroups.com


---------- Vidarebefordrat meddelande ----------
Från: Joakim Nordström <joakim.n...@gmail.com>
Datum: 12 juni 2011 23:55
Ämne: Re: JAmiga nio
Till: Thore Sittly <TSi...@gmx.de>


Great work!

The socket stuff actually didn't work that well -- atleast on OS4, you cannot share sockets between processes, so we'll need to fix some sort of socker server process that handles all socket comunication. That's what I'm currently working on.
But the next thins I'll do is to merge your changes, and make everything compile correctly for MorphOS out of SVN.


/Joakim

Den 12 juni 2011 17:19 skrev Thore Sittly <TSi...@gmx.de>:

Hello Joakim

Finally I got the HelloWorld Java program running on MorphOS. For this I had to fix the MorphOS version of javanio.library.
Unfortunatel I had to throw away socket stuff. Here I have to look for a suitable solution, but for now it should work without network support.

Here my changes for MorphOS and nio:

LibCrossCompile.mk:
MorphOS LFLAGS changed to:
LFLAGS = -noixemul --verbose --export-dynamic -nostartfiles

javanio.c:
added
struct SocketBase *SocketBase = NULL;
to MorphOS section for lib bases. Needed by linker for getting rid of exception "No reference to SocketBase".

Changes for gnu_java_nio_VMChannel.c:
added missing define:
#ifdef __MORPHOS__
#define ERROR_BROKEN_PIPE 109
#endif

in function JAmiga_gnu_java_nio_VMChannel_send:
changed
#if JA_TARGETOS==JA_AMIGAOS4
   struct sockaddr_in to;
#endif

and also set
#if JA_TARGETOS==JA_AMIGAOS4
_before_ tolen = sizeof(struct sockaddr);

in function JAmiga_gnu_java_nio_VMChannel_getsockname:
Disabled whole function using:
#if JA_TARGETOS==JA_AMIGAOS4
 [....]
#else
 ThrowException(env, "java/io/IOException", "gnu_java_nio_VMChannel_getsockname not implemented.");
 return 0;
#endif

in function JAmiga_gnu_java_nio_VMChannel_getpeername
Disabled whole function using:
#if JA_TARGETOS==JA_AMIGAOS4
 [....]
#else
 ThrowException(env, "java/io/IOException", "gnu_java_nio_VMChannel_getpeername not implemented.");
 return 0;
#endif

So I think that were the changes I made to let it compile under MorphOS.

I will keep you up to date with my changes.

so long

Thore
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de


Joakim Nordström

unread,
Jun 24, 2011, 6:04:15 AM6/24/11
to jam...@googlegroups.com


---------- Vidarebefordrat meddelande ----------
Från: Thore Sittly <TSi...@gmx.de>
Datum: 11 juni 2011 14:51
Ämne: Re: JAmiga
Till: "\"Joakim Nordström\"" <joakim.n...@gmail.com>


Hello Joakim

I removed the Printf stuff in the jmag sources and disabled DEBUG, so I could compile the lib on MorphOS. Don't know yet why stdio stuff won't compile in this lib.
But this seems to work for now. Get ready to move on :)

Regards

-------- Original-Nachricht --------
Datum: Thu, 9 Jun 2011 08:21:38 +0200
Von: "Joakim Nordström" <joakim.n...@gmail.com>
An: Thore Sittly <TSi...@gmx.de>
Betreff: Re: JAmiga

Hi Thore!
That sounds great! I have made sure it compiles for OS 3, so any OS 4 specific stuff should be in defines.
I have started with a network implementation, which is far from ready. That code is checked in as network.c, but I can't remember if it compiles a.t.m. I will try to look at it, and make it compile (I really should have made a branch...). Anyways, the network code isn't used, so just remove it from the makefile, if it doesn't work.
I won't be home this weekend, but if you have questions I will read the mail.

Good luck!

/Joakim

Den 8 jun 2011 20:10 skrev "Thore Sittly" <TSi...@gmx.de>:
> Hello Joakim
>
> I think I should do a bit on JAmiga next time, just wanted to let you know
> :)
> Hope I can do something at the Weekend.
>
> First I will check if the new source will compile on MorphOS.
>
> Just wanted to let you know.
>
> Greetings
>
> Thore
> --
> NEU: FreePhone - kostenlos mobil telefonieren!
> Jetzt informieren: http://www.gmx.net/de/go/freephone



--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone

Reply all
Reply to author
Forward
0 new messages