Alexandre Julliard : winepath: Build with msvcrt.
Alexandre Julliard
julliard at winehq.org
Thu Apr 9 16:04:46 CDT 2020
Module: wine
Branch: master
Commit: e22bcac706be3afac67f4faac3aca79fd67c3d6f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e22bcac706be3afac67f4faac3aca79fd67c3d6f
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Apr 9 09:43:30 2020 +0200
winepath: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/winepath/Makefile.in | 3 ++-
programs/winepath/winepath.c | 15 +++------------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/programs/winepath/Makefile.in b/programs/winepath/Makefile.in
index 16b5627aa5..58a9acdc9e 100644
--- a/programs/winepath/Makefile.in
+++ b/programs/winepath/Makefile.in
@@ -1,5 +1,6 @@
MODULE = winepath.exe
-APPMODE = -mconsole -municode
+
+EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
C_SRCS = winepath.c
diff --git a/programs/winepath/winepath.c b/programs/winepath/winepath.c
index 7f4cd978d5..81944829dd 100644
--- a/programs/winepath/winepath.c
+++ b/programs/winepath/winepath.c
@@ -21,9 +21,6 @@
*/
#define WIN32_LEAN_AND_MEAN
-
-#include "config.h"
-
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
@@ -92,13 +89,7 @@ static int option(int shortopt, const WCHAR *longopt)
*/
static int parse_options(WCHAR *argv[])
{
- static const WCHAR longW[] = { 'l','o','n','g',0 };
- static const WCHAR shortW[] = { 's','h','o','r','t',0 };
- static const WCHAR unixW[] = { 'u','n','i','x',0 };
- static const WCHAR windowsW[] = { 'w','i','n','d','o','w','s',0 };
- static const WCHAR helpW[] = { 'h','e','l','p',0 };
- static const WCHAR nullW[] = { 0 };
- static const WCHAR *longopts[] = { longW, shortW, unixW, windowsW, helpW, nullW };
+ static const WCHAR *longopts[] = { L"long", L"short", L"unix", L"windows", L"help", NULL };
int outputformats = 0;
BOOL done = FALSE;
int i, j;
@@ -117,10 +108,10 @@ static int parse_options(WCHAR *argv[])
done = TRUE;
} else {
/* long option */
- for (j = 0; longopts[j][0]; j++)
+ for (j = 0; longopts[j]; j++)
if (!lstrcmpiW(argv[i]+2, longopts[j]))
break;
- outputformats |= option(longopts[j][0], argv[i]);
+ if (longopts[j]) outputformats |= option(longopts[j][0], argv[i]);
}
} else {
/* short options */
More information about the wine-cvs
mailing list