From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLYuy-0005y1-Kw for qemu-devel@nongnu.org; Sun, 15 May 2011 06:51:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QLYux-0005VH-Al for qemu-devel@nongnu.org; Sun, 15 May 2011 06:51:24 -0400 Received: from hall.aurel32.net ([88.191.126.93]:36254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLYux-0005Uy-0c for qemu-devel@nongnu.org; Sun, 15 May 2011 06:51:23 -0400 Date: Sun, 15 May 2011 12:51:21 +0200 From: Aurelien Jarno Message-ID: <20110515105121.GG30615@hall.aurel32.net> References: <1305445919-10146-1-git-send-email-weil@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1305445919-10146-1-git-send-email-weil@mail.berlios.de> Sender: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] w32: Fix missing declaration of ffs() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org On Sun, May 15, 2011 at 09:51:59AM +0200, Stefan Weil wrote: > target-ppc/cpu.h now needs ffs(), too, so ffs() must be declared > before this file is included. > > Moving the declaration from qemu-common.h to qemu-os-win32.h > (which is included in qemu-common.h early) fixes the compiler > warning for w32. > > Cc: Aurelien Jarno > Signed-off-by: Stefan Weil > --- > qemu-common.h | 5 ----- > qemu-os-win32.h | 3 +++ > 2 files changed, 3 insertions(+), 5 deletions(-) Thanks, applied. > diff --git a/qemu-common.h b/qemu-common.h > index f9f705d..bba8dfe 100644 > --- a/qemu-common.h > +++ b/qemu-common.h > @@ -201,11 +201,6 @@ const char *path(const char *pathname); > #define qemu_isascii(c) isascii((unsigned char)(c)) > #define qemu_toascii(c) toascii((unsigned char)(c)) > > -#ifdef _WIN32 > -/* ffs() in oslib-win32.c for WIN32, strings.h for the rest of the world */ > -int ffs(int i); > -#endif > - > void *qemu_oom_check(void *ptr); > void *qemu_malloc(size_t size); > void *qemu_realloc(void *ptr, size_t size); > diff --git a/qemu-os-win32.h b/qemu-os-win32.h > index ed2753d..8a069d7 100644 > --- a/qemu-os-win32.h > +++ b/qemu-os-win32.h > @@ -29,6 +29,9 @@ > #include > #include > > +/* Declaration of ffs() is missing in MinGW's strings.h. */ > +int ffs(int i); > + > /* Polling handling */ > > /* return TRUE if no sleep should be done afterwards */ > -- > 1.5.6.5 > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net