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: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Stefan Weil 2010-10-22 23:03:30 +02:00 committed by Blue Swirl
parent 338b922edd
commit f868445a50

View 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