提交 d7fa500f 编写于 作者: F Frank Li 提交者: Junio C Hamano

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: NFrank Li <lznuaa@gmail.com>
Signed-off-by: NMarius Storm-Olsen <mstormo@gmail.com>
Acked-by: NJohannes Sixt <j6t@kdbg.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 a6ca8c62
......@@ -1027,7 +1027,7 @@ static sig_handler_t timer_fn = SIG_DFL;
* length to call the signal handler.
*/
static __stdcall unsigned ticktack(void *dummy)
static unsigned __stdcall ticktack(void *dummy)
{
while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
if (timer_fn == SIG_DFL)
......@@ -1154,7 +1154,7 @@ void mingw_open_html(const char *unixpath)
int link(const char *oldpath, const char *newpath)
{
typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
typedef BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
static T create_hard_link = NULL;
if (!create_hard_link) {
create_hard_link = (T) GetProcAddress(
......
......@@ -316,7 +316,7 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
}
#ifdef __MINGW32__
static __stdcall unsigned run_thread(void *data)
static unsigned __stdcall run_thread(void *data)
{
struct async *async = data;
return async->proc(async->fd_for_proc, async->data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册