From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50387 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PC7fD-00010Y-BX for qemu-devel@nongnu.org; Sat, 30 Oct 2010 05:23:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PC7fB-0007Ww-SN for qemu-devel@nongnu.org; Sat, 30 Oct 2010 05:23:51 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:63595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PC7fB-0007Wm-M8 for qemu-devel@nongnu.org; Sat, 30 Oct 2010 05:23:49 -0400 Received: by vws4 with SMTP id 4so1066647vws.4 for ; Sat, 30 Oct 2010 02:23:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1287781413-26723-1-git-send-email-weil@mail.berlios.de> References: <1287781413-26723-1-git-send-email-weil@mail.berlios.de> From: Blue Swirl Date: Sat, 30 Oct 2010 09:23:28 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 1/4] Add fprintf_function for function pointers to fprintf-like functions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers Thanks, applied all. On Fri, Oct 22, 2010 at 9:03 PM, Stefan Weil wrote: > This kind of function pointers is used very often in qemu. > > The new data type uses format checking with GCC_FMT_ATTR > and will be used in later patches. > > Cc: Blue Swirl > Signed-off-by: Stefan Weil > --- > =C2=A0qemu-common.h | =C2=A0 =C2=A03 +++ > =C2=A01 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/qemu-common.h b/qemu-common.h > index d5ae420..7eeec8e 100644 > --- a/qemu-common.h > +++ b/qemu-common.h > @@ -81,6 +81,9 @@ struct iovec { > =C2=A0#define GCC_FMT_ATTR(n, m) > =C2=A0#endif > > +typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) > + =C2=A0 =C2=A0GCC_FMT_ATTR(2, 3); > + > =C2=A0#ifdef _WIN32 > =C2=A0#define fsync _commit > =C2=A0#define lseek _lseeki64 > -- > 1.7.1 > >