From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYLvC-0004Qt-Ku for qemu-devel@nongnu.org; Mon, 02 Apr 2007 08:46:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYLvA-0004QA-SK for qemu-devel@nongnu.org; Mon, 02 Apr 2007 08:46:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYLvA-0004Pk-LM for qemu-devel@nongnu.org; Mon, 02 Apr 2007 08:46:04 -0400 Received: from phoenix.bawue.net ([193.7.176.60] helo=mail.bawue.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HYLs7-00081O-VH for qemu-devel@nongnu.org; Mon, 02 Apr 2007 08:42:56 -0400 Date: Mon, 2 Apr 2007 13:41:22 +0100 Subject: Re: [Qemu-devel] Patch: dyngen-exec.h for OpenBSD Message-ID: <20070402124122.GE24846@networkno.de> References: <200704021025.l32APPUX024888@imap.tools.intra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200704021025.l32APPUX024888@imap.tools.intra> From: Thiemo Seufer Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juergen Keil Cc: qemu-devel@nongnu.org Juergen Keil wrote: > > > From: Thiemo Seufer > > Todd T. Fries wrote: > > > This is relative to the 20070319 snapshot. > > > > > > > > > --- dyngen-exec.h.orig Mon Feb 5 17:01:54 2007 > > > +++ dyngen-exec.h Sat Mar 10 16:39:39 2007 > ... > > > /* XXX: This may be wrong for 64-bit ILP32 hosts. */ > > > typedef void * host_reg_t; > > > @@ -78,11 +83,15 @@ typedef void * host_reg_t; > > > #define UINT32_MAX (4294967295U) > > > #define UINT64_MAX ((uint64_t)(18446744073709551615)) > > > > > > +#ifdef __OpenBSD__ > > > +typedef struct __sFILE FILE; > > > +#else > > > typedef struct FILE FILE; > > > extern int fprintf(FILE *, const char *, ...); > > > extern int printf(const char *, ...); > > > #undef NULL > > > #define NULL 0 > > > +#endif > > > > Shouldn't this cover only the FILE typedef? > > Probably. > > My dyngen-exec.h has a similar change, when I made some NetBSD experiments: > > Index: dyngen-exec.h > =================================================================== > RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v > retrieving revision 1.33 > diff -u -B -r1.33 dyngen-exec.h > --- dyngen-exec.h 30 Mar 2007 16:44:53 -0000 1.33 > +++ dyngen-exec.h 2 Apr 2007 09:42:03 -0000 > @@ -78,7 +78,11 @@ > #define UINT32_MAX (4294967295U) > #define UINT64_MAX ((uint64_t)(18446744073709551615)) > > +#ifdef __NetBSD__ > +typedef struct __sFILE FILE; > +#else > typedef struct FILE FILE; > +#endif I made that "#ifdef _BSD" based on the assumption it is ok for all BSD variants, including Darwin. Thiemo