[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel][Patch] Windows build broken
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel][Patch] Windows build broken |
Date: |
Fri, 14 Dec 2007 20:05:39 +0100 |
User-agent: |
IceDove 1.5.0.14pre (X11/20071018) |
JonY schrieb:
>
> 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 :(
>From the man page: ffs - find first bit set in a word
Typically, gcc provides a built-in function ffs, so there is no need to get
an implementation for Windows. The missing prototype just gives a warning.
I send here a patch which adds the prototype to osdep.h (only for Win32).
gmtime_r is really missing (see hw/omap.c). This was already discussed
in another thread,
but not solved up to now.
Stefan
Index: osdep.h
===================================================================
RCS file: /sources/qemu/qemu/osdep.h,v
retrieving revision 1.11
diff -u -r1.11 osdep.h
--- osdep.h 19 Nov 2007 00:38:33 -0000 1.11
+++ osdep.h 14 Dec 2007 19:03:49 -0000
@@ -56,6 +56,7 @@
int qemu_create_pidfile(const char *filename);
#ifdef _WIN32
+int ffs(int i);
typedef struct {
long tv_sec;
long tv_usec;
- [Qemu-devel] Windows build broken, Balazs Attila-Mihaly \(Cd-MaN\), 2007/12/11
- Re: [Qemu-devel] Windows build broken, C.W. Betts, 2007/12/12
- Re: [Qemu-devel] Windows build broken, Eduardo Felipe, 2007/12/12
- Re: [Qemu-devel] Windows build broken, C.W. Betts, 2007/12/12
- Re: [Qemu-devel] Windows build broken, Eduardo Felipe, 2007/12/12
- Re: [Qemu-devel] Windows build broken, Stefan Weil, 2007/12/12
- Re: [Qemu-devel] Windows build broken, JonY, 2007/12/12
- Re: [Qemu-devel][Patch] Windows build broken, Stefan Weil, 2007/12/13
- Re: [Qemu-devel][Patch] Windows build broken, JonY, 2007/12/13
- Re: [Qemu-devel][Patch] Windows build broken,
Stefan Weil <=
- Re: [Qemu-devel][Patch] Windows build broken, Paul Brook, 2007/12/16