qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: todd@fries.net
Subject: Re: [Qemu-devel] Patch: dyngen-exec.h for OpenBSD
Date: Fri, 06 Apr 2007 22:34:33 -0500	[thread overview]
Message-ID: <46171149.7050100@codemonkey.ws> (raw)
In-Reply-To: <200704070150.21692.paul@codesourcery.com>

Paul Brook wrote:
> 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).
>   

I thought I'd add that this isn't just portability.  stdint.h is what 
C99 mandates although as Paul mentions, some older systems used inttypes.h.

Regards,

Anthony Liguori

>> 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	other threads:[~2007-04-07  3:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21  2:39 [Qemu-devel] Patch: dyngen-exec.h for OpenBSD Todd T. Fries
2007-04-02  9:54 ` Thiemo Seufer
2007-04-05 22:12   ` Todd T. Fries
2007-04-06 23:21     ` Thiemo Seufer
2007-04-07  0:50     ` Paul Brook
2007-04-07  3:34       ` Anthony Liguori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-02 10:25 Juergen Keil
2007-04-02 12:41 ` Thiemo Seufer
2007-04-02 14:58   ` M. Warner Losh
2007-04-02 16:08     ` Thiemo Seufer
2007-04-02 16:55       ` M. Warner Losh

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=46171149.7050100@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=todd@fries.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).