]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
w32: Fix missing declaration of ffs()
authorStefan Weil <weil@mail.berlios.de>
Sun, 15 May 2011 07:51:59 +0000 (09:51 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 15 May 2011 10:34:39 +0000 (12:34 +0200)
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>
qemu-common.h
qemu-os-win32.h

index f9f705da857bbc31d25a5d6670e95f236573a039..bba8dfec5e1932b6663cb49cde20c0580e4104af 100644 (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);
index ed2753d1b7b1f653af0ca20080d5c6ec1f49cb52..8a069d7fb678964193eeb9904a73df8f5a809a5a 100644 (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 */