提交 f868445a 编写于 作者: S Stefan Weil 提交者: Blue Swirl

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: NStefan Weil <weil@mail.berlios.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 338b922e
...@@ -81,6 +81,9 @@ struct iovec { ...@@ -81,6 +81,9 @@ struct iovec {
#define GCC_FMT_ATTR(n, m) #define GCC_FMT_ATTR(n, m)
#endif #endif
typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
GCC_FMT_ATTR(2, 3);
#ifdef _WIN32 #ifdef _WIN32
#define fsync _commit #define fsync _commit
#define lseek _lseeki64 #define lseek _lseeki64
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册