qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Patch: dyngen-exec.h for OpenBSD


From: Paul Brook
Subject: Re: [Qemu-devel] Patch: dyngen-exec.h for OpenBSD
Date: Sat, 7 Apr 2007 01:50:20 +0100
User-agent: KMail/1.9.5

On Thursday 05 April 2007 23:12, Todd T. Fries wrote:
> Penned by Thiemo Seufer on 20070402 10:54.53, we have:
> | >  /* NOTE: standard headers should be used with special care at this
> | >     point because host CPU registers are used as global variables. Some
> | >     host headers do not allow that. */
> | >  #include <stddef.h>
> | > -
> | > +#ifdef __OpenBSD__
> | > +#include <sys/types.h>
> Hello? Portability?  sys/types.h defines these types portably.
> Doing so the way this code does it, is not portable.

If you want  portability you should be including stdint.h (or inttypes.h for 
old, broken systems).

> Why is it that qemu knows what the definition of these prototypes
> are on all systems without consulting the header files.  I have a
> better idea, lets let the header files define the prototypes.
> Who would have though of that?

See the big NOTE: comment above. dyngen is inherently unportable.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]