From f868445a502a75b6ac785dddbcc3233cc5f986b0 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 22 Oct 2010 23:03:30 +0200 Subject: [PATCH] Add fprintf_function for function pointers to fprintf-like functions 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 Signed-off-by: Blue Swirl --- qemu-common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu-common.h b/qemu-common.h index d31f3661d2..3496e4f5bb 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -81,6 +81,9 @@ struct iovec { #define GCC_FMT_ATTR(n, m) #endif +typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) + GCC_FMT_ATTR(2, 3); + #ifdef _WIN32 #define fsync _commit #define lseek _lseeki64