Hi, see below On 04/22/2014 01:21 PM, Alex Bligh wrote: > > On 22 Apr 2014, at 10:03, Stanislav Vorobiov wrote: > >>> + */ >>> +#define g_poll(fds, nfds, timeout) g_poll_fixed(fds, nfds, timeout) >>> +gint g_poll_fixed(GPollFD *fds, guint nfds, gint timeout); > > I can't comment on the Windows specific bits of this patch (though > I have commented on what needs fixing), however, I'm confused by the > need for the above. > > We call g_poll. With your patch (under Windows), we should call > something else. > > Why not just move the whole of qemu_poll_ns to an OS specific > file (like aio-posix.c / aio-win32.c - even dropping it in those > files would be better), and just implement qemu_poll_ns so it > calls the right thing. IE don't even call gpoll under windows > (we don't under POSIX if ppoll is present), don't #define, etc. > That's what I originally proposed:
>m.b. it makes sense to move entire qemu_poll_ns to oslib then ? like >this patch to oslib-win32.c and the rest of the stuff to oslib-posix.c ? But Stefan proposed to make it this way (which is also reasonable, since we replace buggy g_poll with a fixed one) should I change my patch and move all stuff to posix.c/win32.c ?