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

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



On Tue, Jan 06, 2009 at 03:41:49PM +0100, Daniel Veillard wrote:
> 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 ?

I've got a large patch to remove most of those uses coming soon...

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 :|


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