From 13eac40939abefbe1b49cc6ab2663966e38d0561 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 1 May 2019 10:40:00 +0200 Subject: [PATCH] schtasks: Build with msvcrt. Signed-off-by: Alexandre Julliard --- programs/schtasks/Makefile.in | 3 ++- programs/schtasks/schtasks.c | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/programs/schtasks/Makefile.in b/programs/schtasks/Makefile.in index 8c3b79073e9..af0d58d77e5 100644 --- a/programs/schtasks/Makefile.in +++ b/programs/schtasks/Makefile.in @@ -1,6 +1,7 @@ MODULE = schtasks.exe -APPMODE = -mconsole -municode IMPORTS = oleaut32 ole32 +EXTRADLLFLAGS = -mconsole -municode -mno-cygwin + C_SRCS = \ schtasks.c diff --git a/programs/schtasks/schtasks.c b/programs/schtasks/schtasks.c index 2ac7544cd02..980093e7331 100644 --- a/programs/schtasks/schtasks.c +++ b/programs/schtasks/schtasks.c @@ -22,7 +22,6 @@ #include "taskschd.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(schtasks); @@ -141,7 +140,7 @@ static int change_command(int argc, WCHAR *argv[]) HRESULT hres; while (argc) { - if(!strcmpiW(argv[0], tn_optW)) { + if(!wcsicmp(argv[0], tn_optW)) { if (argc < 2) { FIXME("Missing /tn value\n"); return 1; @@ -155,12 +154,12 @@ static int change_command(int argc, WCHAR *argv[]) task_name = argv[1]; argc -= 2; argv += 2; - }else if (!strcmpiW(argv[0], enable_optW)) { + }else if (!wcsicmp(argv[0], enable_optW)) { enable = TRUE; have_option = TRUE; argc--; argv++; - }else if (!strcmpiW(argv[0], tr_optW)) { + }else if (!wcsicmp(argv[0], tr_optW)) { if (argc < 2) { FIXME("Missing /tr value\n"); return 1; @@ -214,7 +213,7 @@ static int create_command(int argc, WCHAR *argv[]) HRESULT hres; while (argc) { - if (!strcmpiW(argv[0], xml_optW)) { + if (!wcsicmp(argv[0], xml_optW)) { if (argc < 2) { FIXME("Missing /xml value\n"); return 1; @@ -228,7 +227,7 @@ static int create_command(int argc, WCHAR *argv[]) xml_file = argv[1]; argc -= 2; argv += 2; - }else if(!strcmpiW(argv[0], tn_optW)) { + }else if(!wcsicmp(argv[0], tn_optW)) { if (argc < 2) { FIXME("Missing /tn value\n"); return 1; @@ -242,11 +241,11 @@ static int create_command(int argc, WCHAR *argv[]) task_name = argv[1]; argc -= 2; argv += 2; - }else if(!strcmpiW(argv[0], f_optW)) { + }else if(!wcsicmp(argv[0], f_optW)) { flags = TASK_CREATE_OR_UPDATE; argc--; argv++; - }else if (!strcmpiW(argv[0], ru_optW)) { + }else if (!wcsicmp(argv[0], ru_optW)) { if (argc < 2) { FIXME("Missing /ru value\n"); return 1; @@ -303,11 +302,11 @@ static int delete_command(int argc, WCHAR *argv[]) HRESULT hres; while (argc) { - if (!strcmpiW(argv[0], f_optW)) { + if (!wcsicmp(argv[0], f_optW)) { TRACE("force opt\n"); argc--; argv++; - }else if(!strcmpiW(argv[0], tn_optW)) { + }else if(!wcsicmp(argv[0], tn_optW)) { if (argc < 2) { FIXME("Missing /tn value\n"); return 1; @@ -358,11 +357,11 @@ int wmain(int argc, WCHAR *argv[]) if (argc < 2) FIXME("Print current tasks state\n"); - else if (!strcmpiW(argv[1], change_optW)) + else if (!wcsicmp(argv[1], change_optW)) ret = change_command(argc - 2, argv + 2); - else if (!strcmpiW(argv[1], create_optW)) + else if (!wcsicmp(argv[1], create_optW)) ret = create_command(argc - 2, argv + 2); - else if (!strcmpiW(argv[1], delete_optW)) + else if (!wcsicmp(argv[1], delete_optW)) ret = delete_command(argc - 2, argv + 2); else FIXME("Unsupported command %s\n", debugstr_w(argv[1]));