+#define HOOK_VOID1(type, name, fd, type1, arg1) \
+ static type (*real_ ## name)(type1); \
+ type name(type1 arg1) { \
+ _HOOK_PRE_FD_(type, name, fd) \
+ real_ ## name(arg1); \
+ _HOOK_POST_FD_(fd) \
+ }
+
+#define HOOK_FD2(type, name, fd, type1, arg1, type2, arg2) \
+ static type (*real_ ## name)(type1, type2); \
+ type name(type1 arg1, type2 arg2) { \
+ _HOOK_PRE_FD(type, name, fd) \
+ result = real_ ## name(arg1, arg2); \
+ _HOOK_POST_FD(fd) \
+ }