[libvirt] [PATCH] fix WIN64 compatibility bug in external EventImpl API

David Lively dlively at virtualiron.com
Wed Nov 19 18:28:23 UTC 2008


On Wed, 2008-11-19 at 16:49 +0000, Daniel P. Berrange wrote:
> On Wed, Nov 19, 2008 at 11:41:43AM -0500, David Lively wrote:
> > While starting to think about Windows compability, I realized the newly
> > exposed API for registering an external EventImpl is not adequate.
> > Currently it's assuming 32-bit unix fds.  But Windows uses a pointer
> > (HANDLE) here.  So we need to generalize this interface so it can be
> > implemented for 64-bit Windows.  The attached patch does this.  (I'm
> > sure it conflicts with work Dan B is doing, so I'm hoping he'll just
> > incorporate this into his changes.)
> 
> I'm not sure whether this is actually required. We're using gnulib for
> socket stuff, and that wraps the Winsock socket() call so that it returns
> a real file descriptor rather than a socket handle. It does this calling
> _open_osfhandle which appears to be declared to accept a 'long' and return
> an 'int' - at least in MinGW headers.

That means that the Windows application using libvirt must use gnulib as
well.  If the Windows version of libvirt actually exports the gnulib
bindings and headers, then I guess that's not a problem.  But does it
export gnulib?





More information about the libvir-list mailing list