Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f8adbf35
Commit
f8adbf35
authored
Jan 25, 2022
by
Huw Davies
Committed by
Alexandre Julliard
Jan 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Remove the uuid_t typedef which causes conflicts on macOS.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18e331fd
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
55 additions
and
55 deletions
+55
-55
client.c
tools/widl/client.c
+1
-1
header.c
tools/widl/header.c
+7
-7
parser.l
tools/widl/parser.l
+2
-2
parser.y
tools/widl/parser.y
+3
-3
proxy.c
tools/widl/proxy.c
+2
-2
register.c
tools/widl/register.c
+9
-9
server.c
tools/widl/server.c
+1
-1
typegen.c
tools/widl/typegen.c
+1
-1
typelib.c
tools/widl/typelib.c
+1
-1
typelib_struct.h
tools/widl/typelib_struct.h
+4
-4
typetree.c
tools/widl/typetree.c
+4
-4
utils.h
tools/widl/utils.h
+1
-1
widl.c
tools/widl/widl.c
+4
-4
widltypes.h
tools/widl/widltypes.h
+5
-5
write_msft.c
tools/widl/write_msft.c
+10
-10
No files found.
tools/widl/client.c
View file @
f8adbf35
...
@@ -437,7 +437,7 @@ static void write_stubdescriptor(type_t *iface, int expr_eval_routines)
...
@@ -437,7 +437,7 @@ static void write_stubdescriptor(type_t *iface, int expr_eval_routines)
static
void
write_clientinterfacedecl
(
type_t
*
iface
)
static
void
write_clientinterfacedecl
(
type_t
*
iface
)
{
{
unsigned
int
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
unsigned
int
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
const
uuid_t
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
str_list_t
*
endpoints
=
get_attrp
(
iface
->
attrs
,
ATTR_ENDPOINT
);
const
str_list_t
*
endpoints
=
get_attrp
(
iface
->
attrs
,
ATTR_ENDPOINT
);
if
(
endpoints
)
write_endpoints
(
client
,
iface
->
name
,
endpoints
);
if
(
endpoints
)
write_endpoints
(
client
,
iface
->
name
,
endpoints
);
...
...
tools/widl/header.c
View file @
f8adbf35
...
@@ -141,7 +141,7 @@ static char *format_parameterized_type_args(const type_t *type, const char *pref
...
@@ -141,7 +141,7 @@ static char *format_parameterized_type_args(const type_t *type, const char *pref
return
buf
;
return
buf
;
}
}
static
void
write_guid
(
FILE
*
f
,
const
char
*
guid_prefix
,
const
char
*
name
,
const
uuid_t
*
uuid
)
static
void
write_guid
(
FILE
*
f
,
const
char
*
guid_prefix
,
const
char
*
name
,
const
struct
uuid
*
uuid
)
{
{
if
(
!
uuid
)
return
;
if
(
!
uuid
)
return
;
fprintf
(
f
,
"DEFINE_GUID(%s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
fprintf
(
f
,
"DEFINE_GUID(%s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
...
@@ -151,7 +151,7 @@ static void write_guid(FILE *f, const char *guid_prefix, const char *name, const
...
@@ -151,7 +151,7 @@ static void write_guid(FILE *f, const char *guid_prefix, const char *name, const
uuid
->
Data4
[
6
],
uuid
->
Data4
[
7
]);
uuid
->
Data4
[
6
],
uuid
->
Data4
[
7
]);
}
}
static
void
write_uuid_decl
(
FILE
*
f
,
type_t
*
type
,
const
uuid_t
*
uuid
)
static
void
write_uuid_decl
(
FILE
*
f
,
type_t
*
type
,
const
struct
uuid
*
uuid
)
{
{
fprintf
(
f
,
"#ifdef __CRT_UUID_DECL
\n
"
);
fprintf
(
f
,
"#ifdef __CRT_UUID_DECL
\n
"
);
fprintf
(
f
,
"__CRT_UUID_DECL(%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
fprintf
(
f
,
"__CRT_UUID_DECL(%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
...
@@ -162,7 +162,7 @@ static void write_uuid_decl(FILE *f, type_t *type, const uuid_t *uuid)
...
@@ -162,7 +162,7 @@ static void write_uuid_decl(FILE *f, type_t *type, const uuid_t *uuid)
fprintf
(
f
,
"#endif
\n
"
);
fprintf
(
f
,
"#endif
\n
"
);
}
}
static
const
char
*
uuid_string
(
const
uuid_t
*
uuid
)
static
const
char
*
uuid_string
(
const
struct
uuid
*
uuid
)
{
{
static
char
buf
[
37
];
static
char
buf
[
37
];
...
@@ -937,7 +937,7 @@ static void write_declaration(FILE *header, const var_t *v)
...
@@ -937,7 +937,7 @@ static void write_declaration(FILE *header, const var_t *v)
static
void
write_library
(
FILE
*
header
,
const
typelib_t
*
typelib
)
static
void
write_library
(
FILE
*
header
,
const
typelib_t
*
typelib
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
fprintf
(
header
,
"
\n
"
);
fprintf
(
header
,
"
\n
"
);
write_guid
(
header
,
"LIBID"
,
typelib
->
name
,
uuid
);
write_guid
(
header
,
"LIBID"
,
typelib
->
name
,
uuid
);
fprintf
(
header
,
"
\n
"
);
fprintf
(
header
,
"
\n
"
);
...
@@ -1680,7 +1680,7 @@ static void write_widl_using_method_macros(FILE *header, const type_t *iface, co
...
@@ -1680,7 +1680,7 @@ static void write_widl_using_method_macros(FILE *header, const type_t *iface, co
static
void
write_widl_using_macros
(
FILE
*
header
,
type_t
*
iface
)
static
void
write_widl_using_macros
(
FILE
*
header
,
type_t
*
iface
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
char
*
name
=
iface
->
short_name
?
iface
->
short_name
:
iface
->
name
;
const
char
*
name
=
iface
->
short_name
?
iface
->
short_name
:
iface
->
name
;
char
*
macro
;
char
*
macro
;
...
@@ -1702,7 +1702,7 @@ static void write_widl_using_macros(FILE *header, type_t *iface)
...
@@ -1702,7 +1702,7 @@ static void write_widl_using_macros(FILE *header, type_t *iface)
static
void
write_com_interface_end
(
FILE
*
header
,
type_t
*
iface
)
static
void
write_com_interface_end
(
FILE
*
header
,
type_t
*
iface
)
{
{
int
dispinterface
=
is_attr
(
iface
->
attrs
,
ATTR_DISPINTERFACE
);
int
dispinterface
=
is_attr
(
iface
->
attrs
,
ATTR_DISPINTERFACE
);
const
uuid_t
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
expr_t
*
contract
=
get_attrp
(
iface
->
attrs
,
ATTR_CONTRACT
);
expr_t
*
contract
=
get_attrp
(
iface
->
attrs
,
ATTR_CONTRACT
);
type_t
*
type
;
type_t
*
type
;
...
@@ -1836,7 +1836,7 @@ static void write_rpc_interface_end(FILE *header, const type_t *iface)
...
@@ -1836,7 +1836,7 @@ static void write_rpc_interface_end(FILE *header, const type_t *iface)
static
void
write_coclass
(
FILE
*
header
,
type_t
*
cocl
)
static
void
write_coclass
(
FILE
*
header
,
type_t
*
cocl
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
cocl
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
cocl
->
attrs
,
ATTR_UUID
);
fprintf
(
header
,
"/*****************************************************************************
\n
"
);
fprintf
(
header
,
"/*****************************************************************************
\n
"
);
fprintf
(
header
,
" * %s coclass
\n
"
,
cocl
->
name
);
fprintf
(
header
,
" * %s coclass
\n
"
,
cocl
->
name
);
...
...
tools/widl/parser.l
View file @
f8adbf35
...
@@ -96,9 +96,9 @@ static unsigned int xstrtoul(const char *nptr, char **endptr, int base)
...
@@ -96,9 +96,9 @@ static unsigned int xstrtoul(const char *nptr, char **endptr, int base)
return val;
return val;
}
}
uuid_t
*parse_uuid(const char *u)
struct uuid
*parse_uuid(const char *u)
{
{
uuid_t
* uuid = xmalloc(sizeof(*uuid));
struct uuid
* uuid = xmalloc(sizeof(*uuid));
char b[3];
char b[3];
/* it would be nice to use UuidFromStringA */
/* it would be nice to use UuidFromStringA */
uuid->Data1 = strtoul(u, NULL, 16);
uuid->Data1 = strtoul(u, NULL, 16);
...
...
tools/widl/parser.y
View file @
f8adbf35
...
@@ -50,7 +50,7 @@ static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t
...
@@ -50,7 +50,7 @@ static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t
enum storage_class stgclass, enum type_qualifier qual, enum function_specifier func_specifier);
enum storage_class stgclass, enum type_qualifier qual, enum function_specifier func_specifier);
static attr_t *make_attr(enum attr_type type);
static attr_t *make_attr(enum attr_type type);
static attr_t *make_attrv(enum attr_type type, unsigned int val);
static attr_t *make_attrv(enum attr_type type, unsigned int val);
static attr_t *make_custom_attr(
uuid_t
*id, expr_t *pval);
static attr_t *make_custom_attr(
struct uuid
*id, expr_t *pval);
static expr_list_t *append_expr(expr_list_t *list, expr_t *expr);
static expr_list_t *append_expr(expr_list_t *list, expr_t *expr);
static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_t *decl, int top);
static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_t *decl, int top);
static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls);
static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls);
...
@@ -141,7 +141,7 @@ static typelib_t *current_typelib;
...
@@ -141,7 +141,7 @@ static typelib_t *current_typelib;
typeref_t *typeref;
typeref_t *typeref;
typeref_list_t *typeref_list;
typeref_list_t *typeref_list;
char *str;
char *str;
uuid_t
*uuid;
struct uuid
*uuid;
unsigned int num;
unsigned int num;
double dbl;
double dbl;
typelib_t *typelib;
typelib_t *typelib;
...
@@ -1523,7 +1523,7 @@ attr_t *make_attrp(enum attr_type type, void *val)
...
@@ -1523,7 +1523,7 @@ attr_t *make_attrp(enum attr_type type, void *val)
return a;
return a;
}
}
static attr_t *make_custom_attr(
uuid_t
*id, expr_t *pval)
static attr_t *make_custom_attr(
struct uuid
*id, expr_t *pval)
{
{
attr_t *a = xmalloc(sizeof(attr_t));
attr_t *a = xmalloc(sizeof(attr_t));
attr_custdata_t *cstdata = xmalloc(sizeof(attr_custdata_t));
attr_custdata_t *cstdata = xmalloc(sizeof(attr_custdata_t));
...
...
tools/widl/proxy.c
View file @
f8adbf35
...
@@ -847,8 +847,8 @@ static int cmp_iid( const void *ptr1, const void *ptr2 )
...
@@ -847,8 +847,8 @@ static int cmp_iid( const void *ptr1, const void *ptr2 )
{
{
const
type_t
*
const
*
iface1
=
ptr1
;
const
type_t
*
const
*
iface1
=
ptr1
;
const
type_t
*
const
*
iface2
=
ptr2
;
const
type_t
*
const
*
iface2
=
ptr2
;
const
uuid_t
*
uuid1
=
get_attrp
(
(
*
iface1
)
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid1
=
get_attrp
(
(
*
iface1
)
->
attrs
,
ATTR_UUID
);
const
uuid_t
*
uuid2
=
get_attrp
(
(
*
iface2
)
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid2
=
get_attrp
(
(
*
iface2
)
->
attrs
,
ATTR_UUID
);
return
memcmp
(
uuid1
,
uuid2
,
sizeof
(
*
uuid1
)
);
return
memcmp
(
uuid1
,
uuid2
,
sizeof
(
*
uuid1
)
);
}
}
...
...
tools/widl/register.c
View file @
f8adbf35
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
static
int
indent
;
static
int
indent
;
static
const
char
*
format_uuid
(
const
uuid_t
*
uuid
)
static
const
char
*
format_uuid
(
const
struct
uuid
*
uuid
)
{
{
static
char
buffer
[
40
];
static
char
buffer
[
40
];
sprintf
(
buffer
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
sprintf
(
buffer
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
...
@@ -76,8 +76,8 @@ static const type_t *find_ps_factory( const statement_list_t *stmts )
...
@@ -76,8 +76,8 @@ static const type_t *find_ps_factory( const statement_list_t *stmts )
static
void
write_interface
(
const
type_t
*
iface
,
const
type_t
*
ps_factory
)
static
void
write_interface
(
const
type_t
*
iface
,
const
type_t
*
ps_factory
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
uuid_t
*
ps_uuid
=
get_attrp
(
ps_factory
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
ps_uuid
=
get_attrp
(
ps_factory
->
attrs
,
ATTR_UUID
);
if
(
!
uuid
)
return
;
if
(
!
uuid
)
return
;
if
(
!
is_object
(
iface
))
return
;
if
(
!
is_object
(
iface
))
return
;
...
@@ -109,8 +109,8 @@ static void write_interfaces( const statement_list_t *stmts, const type_t *ps_fa
...
@@ -109,8 +109,8 @@ static void write_interfaces( const statement_list_t *stmts, const type_t *ps_fa
static
void
write_typelib_interface
(
const
type_t
*
iface
,
const
typelib_t
*
typelib
)
static
void
write_typelib_interface
(
const
type_t
*
iface
,
const
typelib_t
*
typelib
)
{
{
const
uuid_t
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
uuid_t
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
unsigned
int
version
=
get_attrv
(
typelib
->
attrs
,
ATTR_VERSION
);
unsigned
int
version
=
get_attrv
(
typelib
->
attrs
,
ATTR_VERSION
);
if
(
!
uuid
)
return
;
if
(
!
uuid
)
return
;
...
@@ -139,7 +139,7 @@ static void write_typelib_interfaces( const typelib_t *typelib )
...
@@ -139,7 +139,7 @@ static void write_typelib_interfaces( const typelib_t *typelib )
static
int
write_coclass
(
const
type_t
*
class
,
const
typelib_t
*
typelib
)
static
int
write_coclass
(
const
type_t
*
class
,
const
typelib_t
*
typelib
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
class
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
class
->
attrs
,
ATTR_UUID
);
const
char
*
descr
=
get_attrp
(
class
->
attrs
,
ATTR_HELPSTRING
);
const
char
*
descr
=
get_attrp
(
class
->
attrs
,
ATTR_HELPSTRING
);
const
char
*
progid
=
get_attrp
(
class
->
attrs
,
ATTR_PROGID
);
const
char
*
progid
=
get_attrp
(
class
->
attrs
,
ATTR_PROGID
);
const
char
*
vi_progid
=
get_attrp
(
class
->
attrs
,
ATTR_VIPROGID
);
const
char
*
vi_progid
=
get_attrp
(
class
->
attrs
,
ATTR_VIPROGID
);
...
@@ -157,7 +157,7 @@ static int write_coclass( const type_t *class, const typelib_t *typelib )
...
@@ -157,7 +157,7 @@ static int write_coclass( const type_t *class, const typelib_t *typelib )
if
(
progid
)
put_str
(
indent
,
"ProgId = s '%s'
\n
"
,
progid
);
if
(
progid
)
put_str
(
indent
,
"ProgId = s '%s'
\n
"
,
progid
);
if
(
typelib
)
if
(
typelib
)
{
{
const
uuid_t
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
put_str
(
indent
,
"TypeLib = s '%s'
\n
"
,
format_uuid
(
typelib_uuid
));
put_str
(
indent
,
"TypeLib = s '%s'
\n
"
,
format_uuid
(
typelib_uuid
));
if
(
!
version
)
version
=
get_attrv
(
typelib
->
attrs
,
ATTR_VERSION
);
if
(
!
version
)
version
=
get_attrv
(
typelib
->
attrs
,
ATTR_VERSION
);
}
}
...
@@ -200,7 +200,7 @@ static void write_runtimeclasses_registry( const statement_list_t *stmts )
...
@@ -200,7 +200,7 @@ static void write_runtimeclasses_registry( const statement_list_t *stmts )
static
int
write_progid
(
const
type_t
*
class
)
static
int
write_progid
(
const
type_t
*
class
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
class
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
class
->
attrs
,
ATTR_UUID
);
const
char
*
descr
=
get_attrp
(
class
->
attrs
,
ATTR_HELPSTRING
);
const
char
*
descr
=
get_attrp
(
class
->
attrs
,
ATTR_HELPSTRING
);
const
char
*
progid
=
get_attrp
(
class
->
attrs
,
ATTR_PROGID
);
const
char
*
progid
=
get_attrp
(
class
->
attrs
,
ATTR_PROGID
);
const
char
*
vi_progid
=
get_attrp
(
class
->
attrs
,
ATTR_VIPROGID
);
const
char
*
vi_progid
=
get_attrp
(
class
->
attrs
,
ATTR_VIPROGID
);
...
@@ -324,7 +324,7 @@ void write_typelib_regscript( const statement_list_t *stmts )
...
@@ -324,7 +324,7 @@ void write_typelib_regscript( const statement_list_t *stmts )
void
output_typelib_regscript
(
const
typelib_t
*
typelib
)
void
output_typelib_regscript
(
const
typelib_t
*
typelib
)
{
{
const
uuid_t
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
char
*
descr
=
get_attrp
(
typelib
->
attrs
,
ATTR_HELPSTRING
);
const
char
*
descr
=
get_attrp
(
typelib
->
attrs
,
ATTR_HELPSTRING
);
const
expr_t
*
lcid_expr
=
get_attrp
(
typelib
->
attrs
,
ATTR_LIBLCID
);
const
expr_t
*
lcid_expr
=
get_attrp
(
typelib
->
attrs
,
ATTR_LIBLCID
);
unsigned
int
version
=
get_attrv
(
typelib
->
attrs
,
ATTR_VERSION
);
unsigned
int
version
=
get_attrv
(
typelib
->
attrs
,
ATTR_VERSION
);
...
...
tools/widl/server.c
View file @
f8adbf35
...
@@ -399,7 +399,7 @@ static void write_stubdescriptor(type_t *iface, int expr_eval_routines)
...
@@ -399,7 +399,7 @@ static void write_stubdescriptor(type_t *iface, int expr_eval_routines)
static
void
write_serverinterfacedecl
(
type_t
*
iface
)
static
void
write_serverinterfacedecl
(
type_t
*
iface
)
{
{
unsigned
int
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
unsigned
int
ver
=
get_attrv
(
iface
->
attrs
,
ATTR_VERSION
);
uuid_t
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
struct
uuid
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
str_list_t
*
endpoints
=
get_attrp
(
iface
->
attrs
,
ATTR_ENDPOINT
);
const
str_list_t
*
endpoints
=
get_attrp
(
iface
->
attrs
,
ATTR_ENDPOINT
);
if
(
endpoints
)
write_endpoints
(
server
,
iface
->
name
,
endpoints
);
if
(
endpoints
)
write_endpoints
(
server
,
iface
->
name
,
endpoints
);
...
...
tools/widl/typegen.c
View file @
f8adbf35
...
@@ -3506,7 +3506,7 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t
...
@@ -3506,7 +3506,7 @@ static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *t
else
else
{
{
const
type_t
*
base
=
is_ptr
(
type
)
?
type_pointer_get_ref_type
(
type
)
:
type
;
const
type_t
*
base
=
is_ptr
(
type
)
?
type_pointer_get_ref_type
(
type
)
:
type
;
const
uuid_t
*
uuid
=
get_attrp
(
base
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
base
->
attrs
,
ATTR_UUID
);
if
(
!
uuid
)
if
(
!
uuid
)
error
(
"%s: interface %s missing UUID
\n
"
,
__FUNCTION__
,
base
->
name
);
error
(
"%s: interface %s missing UUID
\n
"
,
__FUNCTION__
,
base
->
name
);
...
...
tools/widl/typelib.c
View file @
f8adbf35
...
@@ -239,7 +239,7 @@ unsigned short get_type_vt(type_t *t)
...
@@ -239,7 +239,7 @@ unsigned short get_type_vt(type_t *t)
return
0
;
return
0
;
}
}
static
void
msft_read_guid
(
void
*
data
,
MSFT_SegDir
*
segdir
,
int
offset
,
uuid_t
*
guid
)
static
void
msft_read_guid
(
void
*
data
,
MSFT_SegDir
*
segdir
,
int
offset
,
struct
uuid
*
guid
)
{
{
memcpy
(
guid
,
(
char
*
)
data
+
segdir
->
pGuidTab
.
offset
+
offset
,
sizeof
(
*
guid
)
);
memcpy
(
guid
,
(
char
*
)
data
+
segdir
->
pGuidTab
.
offset
+
offset
,
sizeof
(
*
guid
)
);
}
}
...
...
tools/widl/typelib_struct.h
View file @
f8adbf35
...
@@ -242,7 +242,7 @@ typedef struct {
...
@@ -242,7 +242,7 @@ typedef struct {
/* this is how a guid is stored */
/* this is how a guid is stored */
typedef
struct
{
typedef
struct
{
uuid_t
guid
;
struct
uuid
guid
;
int
hreftype
;
/* -2 for the typelib guid, typeinfo offset
int
hreftype
;
/* -2 for the typelib guid, typeinfo offset
for typeinfo guid, low two bits are 01 if
for typeinfo guid, low two bits are 01 if
this is an imported typeinfo, low two bits
this is an imported typeinfo, low two bits
...
@@ -357,10 +357,10 @@ typedef struct {
...
@@ -357,10 +357,10 @@ typedef struct {
unsigned
short
syskind
;
/* == 1 for win32, 0 for win16 */
unsigned
short
syskind
;
/* == 1 for win32, 0 for win16 */
unsigned
short
lcid
;
/* == 0x409, 0x809 etc */
unsigned
short
lcid
;
/* == 0x409, 0x809 etc */
unsigned
int
res12
;
/* == 0 */
unsigned
int
res12
;
/* == 0 */
unsigned
short
libflags
;
/* LIBFLAG_* */
unsigned
short
libflags
;
/* LIBFLAG_* */
unsigned
short
maj_vers
;
unsigned
short
maj_vers
;
unsigned
short
min_vers
;
unsigned
short
min_vers
;
uuid_t
uuid
;
struct
uuid
uuid
;
}
SLTG_LibBlk
;
}
SLTG_LibBlk
;
#define SLTG_LIBBLK_MAGIC 0x51cc
#define SLTG_LIBBLK_MAGIC 0x51cc
...
@@ -379,7 +379,7 @@ typedef struct {
...
@@ -379,7 +379,7 @@ typedef struct {
unsigned
short
res20
;
/* 0xffff */
unsigned
short
res20
;
/* 0xffff */
unsigned
int
helpcontext
;
unsigned
int
helpcontext
;
unsigned
short
res26
;
/* 0xffff */
unsigned
short
res26
;
/* 0xffff */
uuid_t
uuid
;
struct
uuid
uuid
;
}
SLTG_OtherTypeInfo
;
}
SLTG_OtherTypeInfo
;
/* Next we get WORD 0x0003 followed by a DWORD which if we add to
/* Next we get WORD 0x0003 followed by a DWORD which if we add to
...
...
tools/widl/typetree.c
View file @
f8adbf35
...
@@ -160,7 +160,7 @@ static size_t append_var_list_signature(char **buf, size_t *len, size_t pos, var
...
@@ -160,7 +160,7 @@ static size_t append_var_list_signature(char **buf, size_t *len, size_t pos, var
static
size_t
append_type_signature
(
char
**
buf
,
size_t
*
len
,
size_t
pos
,
type_t
*
type
)
static
size_t
append_type_signature
(
char
**
buf
,
size_t
*
len
,
size_t
pos
,
type_t
*
type
)
{
{
const
uuid_t
*
uuid
;
const
struct
uuid
*
uuid
;
size_t
n
=
0
;
size_t
n
=
0
;
if
(
!
type
)
return
0
;
if
(
!
type
)
return
0
;
...
@@ -329,7 +329,7 @@ static char *format_parameterized_type_signature(type_t *type, typeref_list_t *p
...
@@ -329,7 +329,7 @@ static char *format_parameterized_type_signature(type_t *type, typeref_list_t *p
size_t
len
=
0
,
pos
=
0
;
size_t
len
=
0
,
pos
=
0
;
char
*
buf
=
NULL
;
char
*
buf
=
NULL
;
typeref_t
*
ref
;
typeref_t
*
ref
;
const
uuid_t
*
uuid
;
const
struct
uuid
*
uuid
;
if
(
!
(
uuid
=
get_attrp
(
type
->
attrs
,
ATTR_UUID
)))
if
(
!
(
uuid
=
get_attrp
(
type
->
attrs
,
ATTR_UUID
)))
error_loc_info
(
&
type
->
loc_info
,
"cannot compute type signature, no uuid found for type %s.
\n
"
,
type
->
name
);
error_loc_info
(
&
type
->
loc_info
,
"cannot compute type signature, no uuid found for type %s.
\n
"
,
type
->
name
);
...
@@ -1237,7 +1237,7 @@ static void compute_interface_signature_uuid(type_t *iface)
...
@@ -1237,7 +1237,7 @@ static void compute_interface_signature_uuid(type_t *iface)
static
const
int
version
=
5
;
static
const
int
version
=
5
;
struct
sha1_context
ctx
;
struct
sha1_context
ctx
;
unsigned
char
hash
[
20
];
unsigned
char
hash
[
20
];
uuid_t
*
uuid
;
struct
uuid
*
uuid
;
if
(
!
(
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
)))
if
(
!
(
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
)))
{
{
...
@@ -1266,7 +1266,7 @@ static void compute_interface_signature_uuid(type_t *iface)
...
@@ -1266,7 +1266,7 @@ static void compute_interface_signature_uuid(type_t *iface)
uuid
->
Data1
=
((
unsigned
int
)
hash
[
0
]
<<
24
)
|
((
unsigned
int
)
hash
[
1
]
<<
16
)
|
((
unsigned
int
)
hash
[
2
]
<<
8
)
|
hash
[
3
];
uuid
->
Data1
=
((
unsigned
int
)
hash
[
0
]
<<
24
)
|
((
unsigned
int
)
hash
[
1
]
<<
16
)
|
((
unsigned
int
)
hash
[
2
]
<<
8
)
|
hash
[
3
];
uuid
->
Data2
=
((
unsigned
short
)
hash
[
4
]
<<
8
)
|
hash
[
5
];
uuid
->
Data2
=
((
unsigned
short
)
hash
[
4
]
<<
8
)
|
hash
[
5
];
uuid
->
Data3
=
((
unsigned
short
)
hash
[
6
]
<<
8
)
|
hash
[
7
];
uuid
->
Data3
=
((
unsigned
short
)
hash
[
6
]
<<
8
)
|
hash
[
7
];
memcpy
(
&
uuid
->
Data4
,
hash
+
8
,
sizeof
(
*
uuid
)
-
offsetof
(
uuid_t
,
Data4
));
memcpy
(
&
uuid
->
Data4
,
hash
+
8
,
sizeof
(
*
uuid
)
-
offsetof
(
struct
uuid
,
Data4
));
}
}
type_t
*
type_parameterized_type_specialize_define
(
type_t
*
type
)
type_t
*
type_parameterized_type_specialize_define
(
type_t
*
type
)
...
...
tools/widl/utils.h
View file @
f8adbf35
...
@@ -35,7 +35,7 @@ size_t strappend(char **buf, size_t *len, size_t pos, const char* fmt, ...) __at
...
@@ -35,7 +35,7 @@ size_t strappend(char **buf, size_t *len, size_t pos, const char* fmt, ...) __at
size_t
widl_getline
(
char
**
linep
,
size_t
*
lenp
,
FILE
*
fp
);
size_t
widl_getline
(
char
**
linep
,
size_t
*
lenp
,
FILE
*
fp
);
uuid_t
*
parse_uuid
(
const
char
*
u
);
struct
uuid
*
parse_uuid
(
const
char
*
u
);
int
is_valid_uuid
(
const
char
*
s
);
int
is_valid_uuid
(
const
char
*
s
);
/* buffer management */
/* buffer management */
...
...
tools/widl/widl.c
View file @
f8adbf35
...
@@ -382,7 +382,7 @@ void write_dlldata(const statement_list_t *stmts)
...
@@ -382,7 +382,7 @@ void write_dlldata(const statement_list_t *stmts)
write_dlldata_list
(
filenames
,
define_proxy_delegation
);
write_dlldata_list
(
filenames
,
define_proxy_delegation
);
}
}
static
void
write_id_guid
(
FILE
*
f
,
const
char
*
type
,
const
char
*
guid_prefix
,
const
char
*
name
,
const
uuid_t
*
uuid
)
static
void
write_id_guid
(
FILE
*
f
,
const
char
*
type
,
const
char
*
guid_prefix
,
const
char
*
name
,
const
struct
uuid
*
uuid
)
{
{
if
(
!
uuid
)
return
;
if
(
!
uuid
)
return
;
fprintf
(
f
,
"MIDL_DEFINE_GUID(%s, %s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
fprintf
(
f
,
"MIDL_DEFINE_GUID(%s, %s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
...
@@ -402,7 +402,7 @@ static void write_id_data_stmts(const statement_list_t *stmts)
...
@@ -402,7 +402,7 @@ static void write_id_data_stmts(const statement_list_t *stmts)
const
type_t
*
type
=
stmt
->
u
.
type
;
const
type_t
*
type
=
stmt
->
u
.
type
;
if
(
type_get_type
(
type
)
==
TYPE_INTERFACE
)
if
(
type_get_type
(
type
)
==
TYPE_INTERFACE
)
{
{
const
uuid_t
*
uuid
;
const
struct
uuid
*
uuid
;
if
(
!
is_object
(
type
)
&&
!
is_attr
(
type
->
attrs
,
ATTR_DISPINTERFACE
))
if
(
!
is_object
(
type
)
&&
!
is_attr
(
type
->
attrs
,
ATTR_DISPINTERFACE
))
continue
;
continue
;
uuid
=
get_attrp
(
type
->
attrs
,
ATTR_UUID
);
uuid
=
get_attrp
(
type
->
attrs
,
ATTR_UUID
);
...
@@ -416,13 +416,13 @@ static void write_id_data_stmts(const statement_list_t *stmts)
...
@@ -416,13 +416,13 @@ static void write_id_data_stmts(const statement_list_t *stmts)
}
}
else
if
(
type_get_type
(
type
)
==
TYPE_COCLASS
)
else
if
(
type_get_type
(
type
)
==
TYPE_COCLASS
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
type
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
type
->
attrs
,
ATTR_UUID
);
write_id_guid
(
idfile
,
"CLSID"
,
"CLSID"
,
type
->
name
,
uuid
);
write_id_guid
(
idfile
,
"CLSID"
,
"CLSID"
,
type
->
name
,
uuid
);
}
}
}
}
else
if
(
stmt
->
type
==
STMT_LIBRARY
)
else
if
(
stmt
->
type
==
STMT_LIBRARY
)
{
{
const
uuid_t
*
uuid
=
get_attrp
(
stmt
->
u
.
lib
->
attrs
,
ATTR_UUID
);
const
struct
uuid
*
uuid
=
get_attrp
(
stmt
->
u
.
lib
->
attrs
,
ATTR_UUID
);
write_id_guid
(
idfile
,
"IID"
,
"LIBID"
,
stmt
->
u
.
lib
->
name
,
uuid
);
write_id_guid
(
idfile
,
"IID"
,
"LIBID"
,
stmt
->
u
.
lib
->
name
,
uuid
);
write_id_data_stmts
(
stmt
->
u
.
lib
->
stmts
);
write_id_data_stmts
(
stmt
->
u
.
lib
->
stmts
);
}
}
...
...
tools/widl/widltypes.h
View file @
f8adbf35
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
#include "ndrtypes.h"
#include "ndrtypes.h"
#include "wine/list.h"
#include "wine/list.h"
typedef
struct
struct
uuid
{
{
unsigned
int
Data1
;
unsigned
int
Data1
;
unsigned
short
Data2
;
unsigned
short
Data2
;
unsigned
short
Data3
;
unsigned
short
Data3
;
unsigned
char
Data4
[
8
];
unsigned
char
Data4
[
8
];
}
uuid_t
;
};
#define TRUE 1
#define TRUE 1
#define FALSE 0
#define FALSE 0
...
@@ -359,7 +359,7 @@ struct _expr_t {
...
@@ -359,7 +359,7 @@ struct _expr_t {
};
};
struct
_attr_custdata_t
{
struct
_attr_custdata_t
{
uuid_t
id
;
struct
uuid
id
;
expr_t
*
pval
;
expr_t
*
pval
;
};
};
...
@@ -564,7 +564,7 @@ struct _typelib_entry_t {
...
@@ -564,7 +564,7 @@ struct _typelib_entry_t {
struct
_importinfo_t
{
struct
_importinfo_t
{
int
offset
;
int
offset
;
uuid_t
guid
;
struct
uuid
guid
;
int
flags
;
int
flags
;
int
id
;
int
id
;
...
@@ -578,7 +578,7 @@ struct _importlib_t {
...
@@ -578,7 +578,7 @@ struct _importlib_t {
char
*
name
;
char
*
name
;
int
version
;
int
version
;
uuid_t
guid
;
struct
uuid
guid
;
importinfo_t
*
importinfos
;
importinfo_t
*
importinfos
;
int
ntypeinfos
;
int
ntypeinfos
;
...
...
tools/widl/write_msft.c
View file @
f8adbf35
...
@@ -186,7 +186,7 @@ static void ctl2_init_segdir(
...
@@ -186,7 +186,7 @@ static void ctl2_init_segdir(
*
*
* The hash key for the GUID.
* The hash key for the GUID.
*/
*/
static
int
ctl2_hash_guid
(
const
uuid_t
*
guid
)
static
int
ctl2_hash_guid
(
const
struct
uuid
*
guid
)
{
{
int
hash
;
int
hash
;
int
i
;
int
i
;
...
@@ -211,7 +211,7 @@ static int ctl2_hash_guid(const uuid_t *guid)
...
@@ -211,7 +211,7 @@ static int ctl2_hash_guid(const uuid_t *guid)
static
int
ctl2_find_guid
(
static
int
ctl2_find_guid
(
msft_typelib_t
*
typelib
,
/* [I] The typelib to operate against. */
msft_typelib_t
*
typelib
,
/* [I] The typelib to operate against. */
int
hash_key
,
/* [I] The hash key for the guid. */
int
hash_key
,
/* [I] The hash key for the guid. */
const
uuid_t
*
guid
)
/* [I] The guid to find. */
const
struct
uuid
*
guid
)
/* [I] The guid to find. */
{
{
int
offset
;
int
offset
;
MSFT_GuidEntry
*
guidentry
;
MSFT_GuidEntry
*
guidentry
;
...
@@ -1255,7 +1255,7 @@ static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *e
...
@@ -1255,7 +1255,7 @@ static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *e
write_int_value
(
typelib
,
out
,
vt
,
expr
->
cval
);
write_int_value
(
typelib
,
out
,
vt
,
expr
->
cval
);
}
}
static
void
set_custdata
(
msft_typelib_t
*
typelib
,
const
uuid_t
*
guid
,
static
void
set_custdata
(
msft_typelib_t
*
typelib
,
const
struct
uuid
*
guid
,
int
vt
,
const
void
*
value
,
int
*
offset
)
int
vt
,
const
void
*
value
,
int
*
offset
)
{
{
int
guidoffset
;
int
guidoffset
;
...
@@ -1992,7 +1992,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
...
@@ -1992,7 +1992,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
break
;
break
;
case
ATTR_UUID
:
case
ATTR_UUID
:
guidentry
.
guid
=
*
(
uuid_t
*
)
attr
->
u
.
pval
;
guidentry
.
guid
=
*
(
struct
uuid
*
)
attr
->
u
.
pval
;
guidentry
.
hreftype
=
typelib
->
typelib_typeinfo_offsets
[
typeinfo
->
typekind
>>
16
];
guidentry
.
hreftype
=
typelib
->
typelib_typeinfo_offsets
[
typeinfo
->
typekind
>>
16
];
guidentry
.
next_hash
=
-
1
;
guidentry
.
next_hash
=
-
1
;
typeinfo
->
posguid
=
ctl2_alloc_guid
(
typelib
,
&
guidentry
);
typeinfo
->
posguid
=
ctl2_alloc_guid
(
typelib
,
&
guidentry
);
...
@@ -2025,8 +2025,8 @@ static void add_dispatch(msft_typelib_t *typelib)
...
@@ -2025,8 +2025,8 @@ static void add_dispatch(msft_typelib_t *typelib)
int
guid_offset
,
impfile_offset
,
hash_key
;
int
guid_offset
,
impfile_offset
,
hash_key
;
MSFT_GuidEntry
guidentry
;
MSFT_GuidEntry
guidentry
;
MSFT_ImpInfo
impinfo
;
MSFT_ImpInfo
impinfo
;
static
const
uuid_t
stdole
=
{
0x00020430
,
0x0000
,
0x0000
,{
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
}};
static
const
struct
uuid
stdole
=
{
0x00020430
,
0x0000
,
0x0000
,{
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
}};
static
const
uuid_t
iid_idispatch
=
{
0x00020400
,
0x0000
,
0x0000
,{
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
}};
static
const
struct
uuid
iid_idispatch
=
{
0x00020400
,
0x0000
,
0x0000
,{
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
}};
if
(
typelib
->
typelib_header
.
dispatchpos
!=
-
1
)
return
;
if
(
typelib
->
typelib_header
.
dispatchpos
!=
-
1
)
return
;
...
@@ -2509,7 +2509,7 @@ static void set_guid(msft_typelib_t *typelib)
...
@@ -2509,7 +2509,7 @@ static void set_guid(msft_typelib_t *typelib)
{
{
MSFT_GuidEntry
guidentry
=
{
{
0
},
-
2
,
-
1
};
MSFT_GuidEntry
guidentry
=
{
{
0
},
-
2
,
-
1
};
int
offset
;
int
offset
;
uuid_t
*
ptr
=
get_attrp
(
typelib
->
typelib
->
attrs
,
ATTR_UUID
);
struct
uuid
*
ptr
=
get_attrp
(
typelib
->
typelib
->
attrs
,
ATTR_UUID
);
if
(
ptr
)
guidentry
.
guid
=
*
ptr
;
if
(
ptr
)
guidentry
.
guid
=
*
ptr
;
...
@@ -2753,9 +2753,9 @@ int create_msft_typelib(typelib_t *typelib)
...
@@ -2753,9 +2753,9 @@ int create_msft_typelib(typelib_t *typelib)
time_t
cur_time
;
time_t
cur_time
;
char
*
time_override
;
char
*
time_override
;
unsigned
int
version
=
7
<<
24
|
555
;
/* 7.00.0555 */
unsigned
int
version
=
7
<<
24
|
555
;
/* 7.00.0555 */
static
const
uuid_t
midl_time_guid
=
{
0xde77ba63
,
0x517c
,
0x11d1
,{
0xa2
,
0xda
,
0x00
,
0x00
,
0xf8
,
0x77
,
0x3c
,
0xe9
}};
static
const
struct
uuid
midl_time_guid
=
{
0xde77ba63
,
0x517c
,
0x11d1
,{
0xa2
,
0xda
,
0x00
,
0x00
,
0xf8
,
0x77
,
0x3c
,
0xe9
}};
static
const
uuid_t
midl_version_guid
=
{
0xde77ba64
,
0x517c
,
0x11d1
,{
0xa2
,
0xda
,
0x00
,
0x00
,
0xf8
,
0x77
,
0x3c
,
0xe9
}};
static
const
struct
uuid
midl_version_guid
=
{
0xde77ba64
,
0x517c
,
0x11d1
,{
0xa2
,
0xda
,
0x00
,
0x00
,
0xf8
,
0x77
,
0x3c
,
0xe9
}};
static
const
uuid_t
midl_info_guid
=
{
0xde77ba65
,
0x517c
,
0x11d1
,{
0xa2
,
0xda
,
0x00
,
0x00
,
0xf8
,
0x77
,
0x3c
,
0xe9
}};
static
const
struct
uuid
midl_info_guid
=
{
0xde77ba65
,
0x517c
,
0x11d1
,{
0xa2
,
0xda
,
0x00
,
0x00
,
0xf8
,
0x77
,
0x3c
,
0xe9
}};
char
info_string
[
128
];
char
info_string
[
128
];
msft
=
xmalloc
(
sizeof
(
*
msft
));
msft
=
xmalloc
(
sizeof
(
*
msft
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment