@matheusbsbs / matheus-bagliano / commits / d7fa500fb5
Fork 0

Fix __stdcall placement and function prototype

MSVC requires __stdcall to be between the functions return value and the function name, and that the function pointer type is in the form of return_type (WINAPI *function_name)(arguments...) Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Frank Li committed Sep 16, 2009 at 10:20 UTC d7fa500fb598d725bda3427535e87f06caf93ee8
2 files changed +3 -3
compat/mingw.c
+2 -2
@@ -1027,7 +1027,7 @@ static sig_handler_t timer_fn = SIG_DFL;
1027 * length to call the signal handler.
1028 */
1029
1030 -static __stdcall unsigned ticktack(void *dummy)
1030 +static unsigned __stdcall ticktack(void *dummy)
1031 {
1032 while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
1033 if (timer_fn == SIG_DFL)
@@ -1154,7 +1154,7 @@ void mingw_open_html(const char *unixpath)
1154
1155 int link(const char *oldpath, const char *newpath)
1156 {
1157 - typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
1157 + typedef BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
1158 static T create_hard_link = NULL;
1159 if (!create_hard_link) {
1160 create_hard_link = (T) GetProcAddress(
run-command.c
+1 -1
@@ -316,7 +316,7 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
316 }
317
318 #ifdef __MINGW32__
319 -static __stdcall unsigned run_thread(void *data)
319 +static unsigned __stdcall run_thread(void *data)
320 {
321 struct async *async = data;
322 return async->proc(async->fd_for_proc, async->data);