After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 580236 - win32 socket support is broken
win32 socket support is broken
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-04-25 18:15 UTC by Dan Winship
Modified: 2009-05-20 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2009-04-25 18:15:29 UTC
gsocket.c assumes that winsock fds behave like unix fds in the glib API, but they don't. In particular, _g_fd_source_new() and g_poll() will not work with winsock fds. See giowin32.c for some of the gory details.

For g_socket_create_source(), you could just create a GIOSource instead (using g_io_channel_unix_new() or g_io_channel_win32_new_socket()). For the g_poll() stuff you could use g_io_channel_win32_new_socket() followed by g_io_channel_win32_make_pollfd(), though it might be more efficient to abstract some code out.

Oh, and winsock doesn't have sendmsg() and recvmsg() either.
Comment 1 Alexander Larsson 2009-04-27 20:24:45 UTC
winsock has sendmsg() and recvmsg(). They just need some special work:
http://msdn.microsoft.com/en-us/library/ms741692(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms741687(VS.85).aspx
Comment 2 Alexander Larsson 2009-05-20 10:29:43 UTC
fixed now.