Re: ORBit2 native Win32 port progress



Andrewlanoix aol com writes:
 > You are correct in the analysis that you can not use your own
 > GSourceFuncs with the current windows socket code. People need to
 > create their own channel type per the API specs and overload
 > GIOFuncs. Perhaps we would make this clearer to people in the
 > documentation.

(BTW, I opened a bug for this issue.
http://bugzilla.gnome.org/show_bug.cgi?id=120299 )

You mean that the intention in GLib is that one shouldn't use own
GSources and set up GPollFDs "manually", and attach them to main loops
on has created? I am not so sure. Yes, the comments warn that stuff
might not work on Windows, but that doesn't mean that you shouldn't be
able to use the API freely on Unix, does it? (And if something doesn't
work on Win32, that's a bug then...)

Owen and others, any comments?

Check for instance what ORBit2/linc2/src/linc-source.c does. Surely
this is legal GLib usage? (gmain.h warns about poking into GPollFDs
and attempting own GPollFunc. But, even if one changes linc2 to make
use of the g_io_channel_win32_make_pollfd() function, whose intention
was to be the way to make a GPollFD from a socket on Windows, this
doesn't help.)

 > Also I think since linc is a fairly small library it makes more
 > sense for you to fix that then try to fix glib.

Well, one could argue that why fix it if it isn't broken. It's GLib's
main loop that's broken on Win32... (Ifdeffing linc2 to use winsock
headers and the very slightly different winsock API is another,
relatively trivial thing.)

 > I am not sure how you would go about changing glib without really
 > thinking a lot about it.

True. But I think I'll try.

 > I would much prefer that a rewrite of the windows socket code does
 > not occur. [...] If you do need my help testing I would be happy to
 > help.

Hmm. What if I send you new versions as soon as I have something
concrete, and you can check it out thoroughly? (I will use the GNet
example code, and GIMP of course, to test myself first.)

BTW, I just checked out the gnet module from CVS. Do you think it
would be OK to commit changes for auto* build on Win32? Yes, I see
that there are makefile.mingw files there, but I prefer to use the
"standard" auto* stuff on Windows, too.

 > Let me know if I can offer assistance in any way,

Sure, thanks!

--tml





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