Re: ORBit2 native Win32 port progress



Andrewlanoix aol com writes:
 > Let me give you a concrete example of what I mean. Please take a
 > look at Szalai Ferenc's proposed GNet SSL patch that has yet been
 > ported to windows.

 > http://www.gnetlibrary.org/pipermail/gnet-dev/2003-August/000328.html

Quickly glancing through that code, I do think that in theory, if
GLib's main loop and socket io channels would be fixed to work more
closely on Win32 as they do on Unix, it should be possible to have
that code working with relatively minimal changes on Windows,
too. (Provided the SSL libraray is available, presumably it is.)

 > Linc is clearly broken. Take a look at what we had to do in
 > GNet. You can not just add winsock.h. You will have to create
 > separate code paths for windows.

Well, yes, but not much. Mostly error handling, mapping
WSAGetLastError() to "fake" errno values etc, closesocket() instead of
close(), etc.

 > For IPv6 support you will have to use LoadLibary() and use function
 > pointers since only WinXP SP1 and Win 2003 have IPv6 support as I
 > am doing now for GNet.

I cheerfuly ignored IPv6 so far... It is ifdeffed in linc (although
they a bit brokenly use #ifdef AF_INET6, winsock2.h defined that even
though it doesn't have any of the needed structs, so it would be
better to use some configure check and #ifdef HAVE_IPV6). I just
#undeffed AF_INET6.

 > By the time you are done you will end up with a mini-GNet.

Linc's features are not a subset of GNet's, so that's misleading. 

For instance, linc has code that does funky stuff with GMainContexts;
in GNet there is no mention of GMainContexts. GNet on the other hand
has obviously been ported to many more systems. (Just pointing out
things that I notice, I am not advertising linc or anything, I have no
reason to, haven't had anything to do with it.)

The best would be if somebody would compile a high-level "executive
summary" of the features in linc and GNet. Then discuss with the GNet
and linc (ORbit2?) people whether it would feasible to merge them.

Or even merge both into GLib. Something for 2.6?

 > I can try to help you fix and test glib's main loop though I do not
 > have a clear understanding of the problem you describe.

Don't worry, neither have I, yet ;-)

 > It would be helpful to me if we were to work out a problem
 > statement and proposed solution prior to coding.

Yes. Bug #120299 would be a good place to collect writeups.

 > If you were to commit fixes to CVS for GNet to the auto build stuff
 > for windows; that would be great :)

OK, thanks, will do that.

--tml





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]