From b5e2f767b6834f6e7daeeab298e29fcbc6d0c763 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 29 Apr 2019 10:47:01 +0200 Subject: [PATCH] expand: Build with msvcrt. Signed-off-by: Alexandre Julliard --- programs/expand/Makefile.in | 3 ++- programs/expand/expand.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/programs/expand/Makefile.in b/programs/expand/Makefile.in index 0e83e6316a6..b6dd16b1f28 100644 --- a/programs/expand/Makefile.in +++ b/programs/expand/Makefile.in @@ -1,5 +1,6 @@ MODULE = expand.exe -APPMODE = -mconsole IMPORTS = setupapi +EXTRADLLFLAGS = -mconsole -mno-cygwin + C_SRCS = expand.c diff --git a/programs/expand/expand.c b/programs/expand/expand.c index ea7bfdf80be..cf7eb202a21 100644 --- a/programs/expand/expand.c +++ b/programs/expand/expand.c @@ -26,18 +26,18 @@ #include #include -static int myprintf(const char* format, ...) +static int WINAPIV myprintf(const char* format, ...) { - va_list va; + __ms_va_list va; char tmp[8192]; DWORD w = 0; int len; - va_start(va, format); + __ms_va_start(va, format); len = vsnprintf(tmp, sizeof(tmp), format, va); if (len > 0) WriteFile(GetStdHandle(STD_ERROR_HANDLE), tmp, len, &w, NULL); - va_end(va); + __ms_va_end(va); return w; }