widl: Generate names for imported nameless typedefs.

This commit is contained in:
Jacek Caban 2013-08-29 15:09:21 +02:00 committed by Alexandre Julliard
parent 2510ec477b
commit 7e4462e28e
3 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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;