Commit f868445a authored by Stefan Weil's avatar Stefan Weil Committed by Blue Swirl
Browse files

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 <blauwirbel@gmail.com>
Signed-off-by: default avatarStefan Weil <weil@mail.berlios.de>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent 338b922e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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