qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] mingw32/64 fixes


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [RFC] mingw32/64 fixes
Date: Thu, 5 Feb 2015 15:37:40 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Feb 05, 2015 at 04:15:50PM +0100, Juan Quintela wrote:
> Hi
> 
> In fedora 21 when crosscompiling for windows I get that this functions
> are already defined.  As they are declared there, I guess than in
> older complilers they weren't there.  Is there a portable way to get
> happy both old and new compilers?

[snip]

> diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
> index af3fbc4..7f39c42 100644
> --- a/include/sysemu/os-win32.h
> +++ b/include/sysemu/os-win32.h
> @@ -75,14 +75,6 @@
>  /* Declaration of ffs() is missing in MinGW's strings.h. */
>  int ffs(int i);
> 
> -/* Missing POSIX functions. Don't use MinGW-w64 macros. */
> -#undef gmtime_r
> -struct tm *gmtime_r(const time_t *timep, struct tm *result);
> -#undef localtime_r
> -struct tm *localtime_r(const time_t *timep, struct tm *result);
> -
> -char *strtok_r(char *str, const char *delim, char **saveptr);
> -
>  static inline void os_setup_signal_handling(void) {}
>  static inline void os_daemonize(void) {}
>  static inline void os_setup_post(void) {}

This is presumably due to the historic bad namespace pollution in Mingw64
winpthreads. They stuffed a bunch of macros in pthread.h for things
like gmtime_r, localtime_r and friends.  This was certainly true in the
mingw64 version that shipped with Fedora 20, but in Fedora 21 that bad
code in pthread.h has gone away. Presumably this change is what has
caused you trouble building.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]