From: Stefan Weil <weil@mail.berlios.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel][Patch] Windows build broken
Date: Fri, 14 Dec 2007 20:05:39 +0100 [thread overview]
Message-ID: <4762D403.2090408@mail.berlios.de> (raw)
In-Reply-To: <4761DEC1.8000800@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
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
[-- Attachment #2: osdep.patch --]
[-- Type: text/x-diff, Size: 408 bytes --]
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;
next prev parent reply other threads:[~2007-12-16 4:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 3:05 [Qemu-devel] Windows build broken Balazs Attila-Mihaly (Cd-MaN)
2007-12-12 10:08 ` C.W. Betts
2007-12-12 10:41 ` Eduardo Felipe
2007-12-12 15:27 ` C.W. Betts
2007-12-12 19:50 ` Eduardo Felipe
2007-12-12 20:54 ` Stefan Weil
2007-12-13 0:47 ` JonY
2007-12-13 20:20 ` [Qemu-devel][Patch] " Stefan Weil
2007-12-14 1:39 ` JonY
2007-12-14 19:05 ` Stefan Weil [this message]
2007-12-16 13:54 ` Paul Brook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4762D403.2090408@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.