]> git.proxmox.com Git - qemu.git/commitdiff
Add fprintf_function for function pointers to fprintf-like functions
authorStefan Weil <weil@mail.berlios.de>
Fri, 22 Oct 2010 21:03:30 +0000 (23:03 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 30 Oct 2010 08:01:57 +0000 (08:01 +0000)
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 <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-common.h

index d31f3661d249a243695fff34c3bfbf6d371c08ff..3496e4f5bba8b471c408d0ccb415303a9541bd9c 100644 (file)
@@ -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