From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J3lIt-0001RL-Ce for qemu-devel@nongnu.org; Sat, 15 Dec 2007 23:40:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J3lIp-0001PY-LO for qemu-devel@nongnu.org; Sat, 15 Dec 2007 23:40:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J3lIp-0001PI-Eu for qemu-devel@nongnu.org; Sat, 15 Dec 2007 23:40:35 -0500 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J3lIm-0003rZ-To for qemu-devel@nongnu.org; Sat, 15 Dec 2007 23:40:34 -0500 Received: from moutng.kundenserver.de ([212.227.126.183]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J3FsP-00079F-HB for qemu-devel@nongnu.org; Fri, 14 Dec 2007 14:07:13 -0500 Message-ID: <4762D403.2090408@mail.berlios.de> Date: Fri, 14 Dec 2007 20:05:39 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel][Patch] Windows build broken References: <802848.87427.qm@web57002.mail.re3.yahoo.com> <83a4d4ca0712120241n77b602a3v22990b2bb12ca4e2@mail.gmail.com> <83a4d4ca0712121150q6b7ec678yb64eb7a5f2dbb363@mail.gmail.com> <47604A79.1010804@mail.berlios.de> <47608106.6030300@gmail.com> <4761940A.8060908@mail.berlios.de> <4761DEC1.8000800@gmail.com> In-Reply-To: <4761DEC1.8000800@gmail.com> Content-Type: multipart/mixed; boundary="------------040903090604090602050902" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------040903090604090602050902 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit JonY schrieb: > > Ok, this patch works as intended. Thanks for the patch! > > Slightly off topic, but still on Windows builds broken. > > For some odd reason, dyngen-exec.h is always conflicting with > stdint.h(?!!) for me. Can somebody explain why the typedefs are in > dyngen-exec.h? > > Mingw does not have ffs, localtime_r, gmtime_r, which breaks when > compiling some files. > > I propose adding the following for *_r functions on mingw hosts. > #define localtime_r(x, y) memcpy(y, localtime(x), sizeof(y)) > #define gmtime_r(x, y) memcpy(y, gmtime(x), sizeof(y)) > > There are many implementations of ffs(), but I'm unsure what it does :( >>From the man page: ffs - find first bit set in a word Typically, gcc provides a built-in function ffs, so there is no need to get an implementation for Windows. The missing prototype just gives a warning. I send here a patch which adds the prototype to osdep.h (only for Win32). gmtime_r is really missing (see hw/omap.c). This was already discussed in another thread, but not solved up to now. Stefan --------------040903090604090602050902 Content-Type: text/x-diff; name="osdep.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="osdep.patch" Index: osdep.h =================================================================== RCS file: /sources/qemu/qemu/osdep.h,v retrieving revision 1.11 diff -u -r1.11 osdep.h --- osdep.h 19 Nov 2007 00:38:33 -0000 1.11 +++ osdep.h 14 Dec 2007 19:03:49 -0000 @@ -56,6 +56,7 @@ int qemu_create_pidfile(const char *filename); #ifdef _WIN32 +int ffs(int i); typedef struct { long tv_sec; long tv_usec; --------------040903090604090602050902--