Lines Matching refs:func
123 # define DECLARE_WRAPPER(ret_type, func, ...) argument
129 # define DECLARE_WRAPPER(ret_type, func, ...) \ argument
130 extern "C" ret_type func(__VA_ARGS__);
131 # define DECLARE_WRAPPER_WINAPI(ret_type, func, ...) \ argument
132 extern "C" __declspec(dllimport) ret_type __stdcall func(__VA_ARGS__);
140 # define DECLARE_WRAPPER(ret_type, func, ...) \ argument
141 extern "C" ret_type func(__VA_ARGS__) \
142 __attribute__((alias("__interceptor_" #func), visibility("default")));
147 # define DECLARE_WRAPPER(ret_type, func, ...) \ argument
148 extern "C" ret_type func(__VA_ARGS__) \
149 __attribute__((weak, alias("__interceptor_" #func), visibility("default")));
159 # define DECLARE_REAL(ret_type, func, ...) argument
165 # define DECLARE_REAL(ret_type, func, ...) \ argument
166 typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
168 extern FUNC_TYPE(func) PTR_TO_REAL(func); \
173 # define DECLARE_REAL(ret_type, func, ...) \ argument
174 extern "C" ret_type func(__VA_ARGS__);
179 # define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) \ argument
180 DECLARE_REAL(ret_type, func, __VA_ARGS__) \
181 extern "C" ret_type WRAP(func)(__VA_ARGS__);
184 # define DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(ret_type, func, ...) \ argument
185 extern "C" ret_type WRAP(func)(__VA_ARGS__); \
186 extern "C" ret_type func(__VA_ARGS__);
188 # define DECLARE_REAL_AND_INTERCEPTOR(ret_type, func, ...) argument
189 # define DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(ret_type, func, ...) argument
197 # define DEFINE_REAL(ret_type, func, ...) \ argument
198 typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
200 FUNC_TYPE(func) PTR_TO_REAL(func); \
203 # define DEFINE_REAL(ret_type, func, ...) argument
211 #define INTERCEPTOR(ret_type, func, ...) \ argument
212 extern "C"[[ gnu::alias(#func), gnu::visibility("hidden") ]] ret_type \
213 __interceptor_##func(__VA_ARGS__); \
214 extern "C" INTERCEPTOR_ATTRIBUTE ret_type func(__VA_ARGS__)
218 #define INTERCEPTOR(ret_type, func, ...) \ argument
219 DEFINE_REAL(ret_type, func, __VA_ARGS__) \
220 DECLARE_WRAPPER(ret_type, func, __VA_ARGS__) \
223 ret_type WRAP(func)(__VA_ARGS__)
226 #define INTERCEPTOR_WITH_SUFFIX(ret_type, func, ...) \ argument
227 INTERCEPTOR(ret_type, func, __VA_ARGS__)
231 #define INTERCEPTOR_ZZZ(suffix, ret_type, func, ...) \ argument
232 extern "C" ret_type func(__VA_ARGS__) suffix; \
233 extern "C" ret_type WRAP(func)(__VA_ARGS__); \
234 INTERPOSER(func); \
235 extern "C" INTERCEPTOR_ATTRIBUTE ret_type WRAP(func)(__VA_ARGS__)
237 #define INTERCEPTOR(ret_type, func, ...) \ argument
238 INTERCEPTOR_ZZZ(/*no symbol variants*/, ret_type, func, __VA_ARGS__)
240 #define INTERCEPTOR_WITH_SUFFIX(ret_type, func, ...) \ argument
241 INTERCEPTOR_ZZZ(__DARWIN_ALIAS_C(func), ret_type, func, __VA_ARGS__)
249 # define INTERCEPTOR_WINAPI(ret_type, func, ...) \ argument
250 typedef ret_type (__stdcall *FUNC_TYPE(func))(__VA_ARGS__); \
252 FUNC_TYPE(func) PTR_TO_REAL(func); \
256 ret_type __stdcall WRAP(func)(__VA_ARGS__)
278 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func) argument
279 # define INTERCEPT_FUNCTION_VER(func, symver) \ argument
280 INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver)
283 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_MAC(func) argument
284 # define INTERCEPT_FUNCTION_VER(func, symver) \ argument
285 INTERCEPT_FUNCTION_VER_MAC(func, symver)
288 # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_WIN(func) argument
289 # define INTERCEPT_FUNCTION_VER(func, symver) \ argument
290 INTERCEPT_FUNCTION_VER_WIN(func, symver)