From fd9838f41f32e21c2025ed118f53bf606101cff5 Mon Sep 17 00:00:00 2001 From: zouboan Date: Thu, 10 Nov 2022 20:41:36 +0800 Subject: [PATCH] tools/mkdeps:Fix an error caused by do_shquote in Windows native build tools/mkdeps:Fix an error caused by do_shquote in Windows native build tools/mkdeps:Fix an error caused by do_shquote in Windows native build --- tools/mkdeps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/mkdeps.c b/tools/mkdeps.c index 122fbb95e4..54b8850016 100644 --- a/tools/mkdeps.c +++ b/tools/mkdeps.c @@ -111,7 +111,9 @@ static char g_expand[MAX_EXPAND]; static char g_dequoted[MAX_PATH]; static char g_posixpath[MAX_PATH]; #endif +#ifndef CONFIG_WINDOWS_NATIVE static char g_shquote[MAX_SHQUOTE]; +#endif /**************************************************************************** * Private Functions @@ -295,7 +297,7 @@ static void show_usage(const char *progname, const char *msg, int exitcode) * https://netbsd.gw.com/cgi-bin/man-cgi?shquote++NetBSD-current * However, this implementation doesn't try to elide extraneous quotes. ****************************************************************************/ - +#ifndef CONFIG_WINDOWS_NATIVE static const char *do_shquote(const char *argument) { const char *src; @@ -347,6 +349,7 @@ static const char *do_shquote(const char *argument) *dest = '\0'; return g_shquote; } +#endif static void parse_args(int argc, char **argv) { @@ -443,12 +446,13 @@ static void parse_args(int argc, char **argv) * do_dependency() uses them as bare filenames as well. * (In addition to passing them to system().) */ - +#ifndef CONFIG_WINDOWS_NATIVE if (group == 1) { arg = do_shquote(arg); } +#endif append(&args, arg); } }