Commit 7e4462e2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

widl: Generate names for imported nameless typedefs.

parent 2510ec47
......@@ -1840,7 +1840,7 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
type_get_type_detect_alias(type) == TYPE_STRUCT ||
type_get_type_detect_alias(type) == TYPE_UNION ||
type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) &&
!type->name && !parse_only)
!type->name)
{
if (! is_attr(attrs, ATTR_PUBLIC) && ! is_attr (attrs, ATTR_HIDDEN))
attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) );
......@@ -1980,7 +1980,7 @@ static char *gen_name(void)
if (! file_id)
{
char *dst = dup_basename(input_name, ".idl");
char *dst = dup_basename(input_idl_name, ".idl");
file_id = dst;
for (; *dst; ++dst)
......
......@@ -118,6 +118,7 @@ int do_rt_extension = 0;
static enum stub_mode stub_mode = MODE_Os;
char *input_name;
char *input_idl_name;
char *header_name;
char *local_stubs_name;
char *header_token;
......@@ -488,7 +489,7 @@ void write_id_data(const statement_list_t *stmts)
}
fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name);
fprintf(idfile, "from %s - Do not edit ***/\n\n", input_idl_name);
fprintf(idfile, "#include <rpc.h>\n");
fprintf(idfile, "#include <rpcndr.h>\n\n");
fprintf(idfile, "#include <initguid.h>\n\n");
......@@ -706,7 +707,7 @@ int main(int argc,char *argv[])
return 1;
}
else
input_name = xstrdup(argv[optind]);
input_idl_name = input_name = xstrdup(argv[optind]);
}
else {
fprintf(stderr, "%s", usage);
......
......@@ -52,6 +52,7 @@ extern int win64_packing;
extern int do_rt_extension;
extern char *input_name;
extern char *input_idl_name;
extern char *header_name;
extern char *header_token;
extern char *local_stubs_name;
......
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