Andrew Boyarshin : widl: Fix handling of output_name in option parsing.
Alexandre Julliard
julliard at winehq.org
Tue Feb 9 15:57:08 CST 2021
Module: wine
Branch: master
Commit: 5423e0d9e6fc60300a042c3933716fbcf3334fd6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5423e0d9e6fc60300a042c3933716fbcf3334fd6
Author: Andrew Boyarshin <andrew.boyarshin at gmail.com>
Date: Tue Feb 9 13:38:50 2021 +0100
widl: Fix handling of output_name in option parsing.
Do not overwrite explicitly stated paths, such as header_name or
proxy_name. Instead, use output_name when specified as a fallback.
Signed-off-by: Andrew Boyarshin <andrew.boyarshin at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/widl/widl.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 99b24e86fdc..8da887ea636 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -831,19 +831,17 @@ int main(int argc,char *argv[])
set_everything(TRUE);
}
- if (!output_name) output_name = dup_basename(input_name, ".idl");
-
if (do_header + do_typelib + do_proxies + do_client +
- do_server + do_regscript + do_idfile + do_dlldata == 1)
+ do_server + do_regscript + do_idfile + do_dlldata == 1 && output_name)
{
- if (do_header) header_name = output_name;
- else if (do_typelib) typelib_name = output_name;
- else if (do_proxies) proxy_name = output_name;
- else if (do_client) client_name = output_name;
- else if (do_server) server_name = output_name;
- else if (do_regscript) regscript_name = output_name;
- else if (do_idfile) idfile_name = output_name;
- else if (do_dlldata) dlldata_name = output_name;
+ if (do_header && !header_name) header_name = output_name;
+ else if (do_typelib && !typelib_name) typelib_name = output_name;
+ else if (do_proxies && !proxy_name) proxy_name = output_name;
+ else if (do_client && !client_name) client_name = output_name;
+ else if (do_server && !server_name) server_name = output_name;
+ else if (do_regscript && !regscript_name) regscript_name = output_name;
+ else if (do_idfile && !idfile_name) idfile_name = output_name;
+ else if (do_dlldata && !dlldata_name) dlldata_name = output_name;
}
if (!dlldata_name && do_dlldata)
More information about the wine-cvs
mailing list