Commit 15caccb9 authored by Martin Storsjö's avatar Martin Storsjö

cmdutils: Use a configure check for enabling CommandLineToArgvW

This simplifies the condition to avoid hardcoding the systems
where the function exists. This also simplifies support for
newer Windows API subsets where this function doesn't exist,
such as Windows Phone 8 and the "metro" API subset of Windows 8.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 9d46eaec
...@@ -166,7 +166,7 @@ static const OptionDef *find_option(const OptionDef *po, const char *name) ...@@ -166,7 +166,7 @@ static const OptionDef *find_option(const OptionDef *po, const char *name)
return po; return po;
} }
#if defined(_WIN32) && !defined(__MINGW32CE__) #if HAVE_COMMANDLINETOARGVW
#include <windows.h> #include <windows.h>
#include <shellapi.h> #include <shellapi.h>
/* Will be leaked on exit */ /* Will be leaked on exit */
...@@ -226,7 +226,7 @@ static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) ...@@ -226,7 +226,7 @@ static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr)
{ {
/* nothing to do */ /* nothing to do */
} }
#endif /* WIN32 && !__MINGW32CE__ */ #endif /* HAVE_COMMANDLINETOARGVW */
int parse_option(void *optctx, const char *opt, const char *arg, int parse_option(void *optctx, const char *opt, const char *arg,
const OptionDef *options) const OptionDef *options)
......
...@@ -1181,6 +1181,7 @@ HAVE_LIST=" ...@@ -1181,6 +1181,7 @@ HAVE_LIST="
attribute_packed attribute_packed
closesocket closesocket
cmov cmov
CommandLineToArgvW
cpunop cpunop
CryptGenRandom CryptGenRandom
dcbzl dcbzl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment