From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJOV3-0007Wz-Ii for qemu-devel@nongnu.org; Thu, 05 Feb 2015 10:37:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJOV0-0000eU-CH for qemu-devel@nongnu.org; Thu, 05 Feb 2015 10:37:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJOV0-0000eB-4o for qemu-devel@nongnu.org; Thu, 05 Feb 2015 10:37:46 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t15FbiJe019786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 10:37:44 -0500 Date: Thu, 5 Feb 2015 15:37:40 +0000 From: "Daniel P. Berrange" Message-ID: <20150205153740.GH2385@redhat.com> References: <1423149350-23961-1-git-send-email-quintela@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1423149350-23961-1-git-send-email-quintela@redhat.com> Subject: Re: [Qemu-devel] [RFC] mingw32/64 fixes Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org 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 :|