GNOME Bugzilla – Bug 57689
Unimplemented iochannel functions under win32
Last modified: 2011-02-18 15:55:24 UTC
The functions g_io_channel_new_file() and g_io_channel_[set,get]_flags() are not implemented for win32.
They are implememented now as far as I could get. See Bug #57690
Looking at the code for gnet (http://www.gnetlibrary.org), it appears that windows uses a function called ioctlsocket() to set sockets nonblocking. This is probably the function we need to use in the socket version of set/get flags. Try and dig around a little and see if you can find a file version of this function, too. Also, a few comments about the current implementation. The archtecture dependent code doesn't need to set the IS_*ABLE flags in its return value, as this is taken care of in generic code in giochannel.c. It does, however, need to recheck the values of is_readable and is_writeable whenever get_flags is called. If set_flags is unimplemented, you need to give a warning, not just return an error, as GError is intended to be used only for run time errors. I'm attaching a sample patch to give you some idea of what I'm talking about.
Created attachment 910 [details] [review] sample patch mentioned in discussion
Moving open 2.0.0 Win32 bugs to 2.0.1 milestone.
Moving 2.0.1 Win32 bugs to 2.0.2 milestone.
Fix applied to HEAD. Quite extensive changes. (Unfortunately, missed the 2.1.5 release by a little.) Reopen bug if there still are problems.