Re: [libvirt] PATCH: Fix Windows / mingw32 build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 06, 2009 at 12:48:00PM +0000, Daniel P. Berrange wrote:
> There are a number of problems breaking the windows / mingw
> build currently.
> 
>  - Use of 'close' without importing unistd.h
>  - Use of non-existant localtime_r

  oops :-)

>  - ERROR macro from logging.h clashes with a symbol imported
>    from windows.h

  oh, crap, okay we need a namespaced one

> So this patch does
> 
>  - Adds the missing unistd.h include
>  - Uses localtime() if localtime_r() is missing (as checked from
>    configure)
>  - Adds a VIR_ prefix onto all logging macros, keeping
>    DEBUG() around because its just used in sooooo many
>    places
> 
> The use of localtime() on Windows is OK, because the MicroSoft
> implementation of this uses thread-local storage:
> 
>   http://msdn.microsoft.com/en-us/library/a442x3ye.aspx
> 
> And all other OS we care about have localtime_r
> 
> Finally I fix a few compile warnings, so that Mingw can now be
> built  with --enable-compile-warnings=error to detect these 
> problems more quickly in future.

  Patch looks fine. But I spotted we still use strerror, I though
this had to be discarded because it wasn't thread-safe ?

  +1

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]