From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2zWQ-0003QV-R1 for qemu-devel@nongnu.org; Thu, 13 Dec 2007 20:39:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2zWQ-0003Oh-8U for qemu-devel@nongnu.org; Thu, 13 Dec 2007 20:39:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2zWP-0003OE-Oh for qemu-devel@nongnu.org; Thu, 13 Dec 2007 20:39:25 -0500 Received: from py-out-1112.google.com ([64.233.166.178]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from <10walls@gmail.com>) id 1J2zWP-00027Z-ES for qemu-devel@nongnu.org; Thu, 13 Dec 2007 20:39:25 -0500 Received: by py-out-1112.google.com with SMTP id j37so2248128pyc.4 for ; Thu, 13 Dec 2007 17:39:23 -0800 (PST) Message-ID: <4761DEC1.8000800@gmail.com> Date: Fri, 14 Dec 2007 09:39:13 +0800 From: JonY <10walls@gmail.com> 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> In-Reply-To: <4761940A.8060908@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Stefan Weil wrote: > Here is a patch using WIN32_LEAN_AND_MEAN which tries not to break > dsound (and vl.c). I could only test it using cross compilation from Linux, > so please send comments. > > Patch description: > * add WIN32_LEAN_AND_MEAN to all inclusions of windows.h > * remove windows.h from vl.c (it is already included otherwise) > * add mmsystem.h to vl.c and dsoundaudio.c (they need it and got it from > windows.h) > * fixed indentation in vl.c (wrong indentation was caused by an earlier > patch from me) > > It will be difficult to avoid using variable names like "interface" in the > future, so I still think using a minimal set of includes is the better > (and faster) solution. > > Anyway, Windows users need a working solution, so it would be nice if one > of these patches could be applied to CVS HEAD. > > Thank you. > Stefan > > JonY schrieb: >> Stefan Weil wrote: >>> basetyps.h is included by windows.h / rpc.h. QEMU does not need it, so >>> you can avoid it like this: >>> >>> #define WIN32_LEAN_AND_MEAN >>> #include >>> >>> WIN32_LEAN_AND_MEAN reduces the number of includes in windows.h >>> and increases compilation speed. And you don't have to rename >>> variables like interface :-) >>> >>> Regards, >>> Stefan >> Hi, >> >> I would prefer Eduardo's patch, defining WIN32_LEAN_AND_MEAN breaks >> dsound. >> >> Thanks. >> >> >> > 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 :(