w32: Fix missing declaration of ffs()

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 <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Stefan Weil 2011-05-15 09:51:59 +02:00 committed by Aurelien Jarno
parent 1de9756b97
commit 077030d11e
2 changed files with 3 additions and 5 deletions

View File

@ -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);

View File

@ -29,6 +29,9 @@
#include <windows.h>
#include <winsock2.h>
/* 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 */