From patchwork Sun May 15 07:51:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 95605 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 52C42B6F0C for ; Sun, 15 May 2011 18:37:53 +1000 (EST) Received: from localhost ([::1]:45269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLWpg-0001em-B1 for incoming@patchwork.ozlabs.org; Sun, 15 May 2011 04:37:48 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLWpW-0001eh-Ql for qemu-devel@nongnu.org; Sun, 15 May 2011 04:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QLWpV-0006ih-Ov for qemu-devel@nongnu.org; Sun, 15 May 2011 04:37:38 -0400 Received: from s15206839.onlinehome-server.info ([87.106.34.166]:33812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLWpV-0006iO-Ig for qemu-devel@nongnu.org; Sun, 15 May 2011 04:37:37 -0400 Received: from stefan by s15206839.onlinehome-server.info with local (Exim 4.69) (envelope-from ) id 1QLW7L-0002eo-VR; Sun, 15 May 2011 09:51:59 +0200 From: Stefan Weil To: qemu-devel@nongnu.org Date: Sun, 15 May 2011 09:51:59 +0200 Message-Id: <1305445919-10146-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.5.6.5 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: stefan@kath-kirche-ladenburg.de X-SA-Exim-Scanned: No (on s15206839.onlinehome-server.info); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 87.106.34.166 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH] w32: Fix missing declaration of ffs() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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(-) 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 */