From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ha1kr-0006XG-VP for qemu-devel@nongnu.org; Fri, 06 Apr 2007 23:38:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ha1kq-0006Sh-Fp for qemu-devel@nongnu.org; Fri, 06 Apr 2007 23:38:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ha1kq-0006S3-Bv for qemu-devel@nongnu.org; Fri, 06 Apr 2007 23:38:20 -0400 Received: from wx-out-0506.google.com ([66.249.82.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ha1hH-0003Hg-IX for qemu-devel@nongnu.org; Fri, 06 Apr 2007 23:34:39 -0400 Received: by wx-out-0506.google.com with SMTP id i30so1833151wxd for ; Fri, 06 Apr 2007 20:34:38 -0700 (PDT) Message-ID: <46171149.7050100@codemonkey.ws> Date: Fri, 06 Apr 2007 22:34:33 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Patch: dyngen-exec.h for OpenBSD References: <20070321023900.GA13604@fries.net> <20070402095453.GB24846@networkno.de> <20070405221242.GB4559@fries.net> <200704070150.21692.paul@codesourcery.com> In-Reply-To: <200704070150.21692.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: todd@fries.net 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 >> | > - >> | > +#ifdef __OpenBSD__ >> | > +#include >> 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 > > > >