[libvirt] PATCH: Fix build on Mingw32

Daniel P. Berrange berrange at redhat.com
Tue Mar 3 11:38:58 UTC 2009


On Tue, Mar 03, 2009 at 11:18:45AM +0100, Jim Meyering wrote:
> Daniel P. Berrange wrote:
> > pread() and pwrite() do not exist on mingw, and the nodedevxml2xmltest
> > was adding libvirt_driver_qemu.la for some unknown reason - probably a
> > cut & paste error. This broke the test compile when qemu was turned off
> > as it is on mingw32.
> 
> Although the new code doesn't have exactly the same semantics as
> pread/pwrite (new code doesn't restore each file pointer to its
> original position), it looks like no caller relied on the file
> pointers remaining unchanged.

Yes, all the I/O is random access via the pciRead() or pciWrite()
functions so the file pointer position is irrelvant for this usage

> On a related note, don't these need EAGAIN handling?
> Maybe EINTR, too.

I queried whether this should ue saferead/write when the patches 
were first reviewed, but Mark said it was not neccessary for use
of sysfs and this code will be replaced by libpciaccess.so in the
not too distant future

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list