Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
218b1951
Commit
218b1951
authored
Nov 01, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Define PROXY_DELEGATION in dlldata.c when needed.
parent
a04f7380
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
header.h
tools/widl/header.h
+1
-0
proxy.c
tools/widl/proxy.c
+6
-1
widl.c
tools/widl/widl.c
+11
-3
No files found.
tools/widl/header.h
View file @
218b1951
...
@@ -47,6 +47,7 @@ extern int need_proxy(const type_t *iface);
...
@@ -47,6 +47,7 @@ extern int need_proxy(const type_t *iface);
extern
int
need_inline_stubs
(
const
type_t
*
iface
);
extern
int
need_inline_stubs
(
const
type_t
*
iface
);
extern
int
need_stub_files
(
const
statement_list_t
*
stmts
);
extern
int
need_stub_files
(
const
statement_list_t
*
stmts
);
extern
int
need_proxy_file
(
const
statement_list_t
*
stmts
);
extern
int
need_proxy_file
(
const
statement_list_t
*
stmts
);
extern
int
need_proxy_delegation
(
const
statement_list_t
*
stmts
);
extern
int
need_inline_stubs_file
(
const
statement_list_t
*
stmts
);
extern
int
need_inline_stubs_file
(
const
statement_list_t
*
stmts
);
extern
const
var_t
*
is_callas
(
const
attr_list_t
*
list
);
extern
const
var_t
*
is_callas
(
const
attr_list_t
*
list
);
extern
void
write_args
(
FILE
*
h
,
const
var_list_t
*
arg
,
const
char
*
name
,
int
obj
,
int
do_indent
);
extern
void
write_args
(
FILE
*
h
,
const
var_list_t
*
arg
,
const
char
*
name
,
int
obj
,
int
do_indent
);
...
...
tools/widl/proxy.c
View file @
218b1951
...
@@ -778,7 +778,12 @@ int need_stub(const type_t *iface)
...
@@ -778,7 +778,12 @@ int need_stub(const type_t *iface)
int
need_proxy_file
(
const
statement_list_t
*
stmts
)
int
need_proxy_file
(
const
statement_list_t
*
stmts
)
{
{
return
does_any_iface
(
stmts
,
need_proxy
);
return
does_any_iface
(
stmts
,
need_proxy
);
}
int
need_proxy_delegation
(
const
statement_list_t
*
stmts
)
{
return
does_any_iface
(
stmts
,
need_delegation
);
}
}
int
need_inline_stubs
(
const
type_t
*
iface
)
int
need_inline_stubs
(
const
type_t
*
iface
)
...
...
tools/widl/widl.c
View file @
218b1951
...
@@ -340,7 +340,7 @@ static void free_filename_nodes(struct list *list)
...
@@ -340,7 +340,7 @@ static void free_filename_nodes(struct list *list)
}
}
}
}
static
void
write_dlldata_list
(
struct
list
*
filenames
)
static
void
write_dlldata_list
(
struct
list
*
filenames
,
int
define_proxy_delegation
)
{
{
FILE
*
dlldata
;
FILE
*
dlldata
;
filename_node_t
*
node
;
filename_node_t
*
node
;
...
@@ -351,6 +351,8 @@ static void write_dlldata_list(struct list *filenames)
...
@@ -351,6 +351,8 @@ static void write_dlldata_list(struct list *filenames)
fprintf
(
dlldata
,
"/*** Autogenerated by WIDL %s "
,
PACKAGE_VERSION
);
fprintf
(
dlldata
,
"/*** Autogenerated by WIDL %s "
,
PACKAGE_VERSION
);
fprintf
(
dlldata
,
"- Do not edit ***/
\n\n
"
);
fprintf
(
dlldata
,
"- Do not edit ***/
\n\n
"
);
if
(
define_proxy_delegation
)
fprintf
(
dlldata
,
"#define PROXY_DELEGATION
\n
"
);
fprintf
(
dlldata
,
"#include <objbase.h>
\n
"
);
fprintf
(
dlldata
,
"#include <objbase.h>
\n
"
);
fprintf
(
dlldata
,
"#include <rpcproxy.h>
\n\n
"
);
fprintf
(
dlldata
,
"#include <rpcproxy.h>
\n\n
"
);
start_cplusplus_guard
(
dlldata
);
start_cplusplus_guard
(
dlldata
);
...
@@ -380,15 +382,19 @@ static char *eat_space(char *s)
...
@@ -380,15 +382,19 @@ static char *eat_space(char *s)
void
write_dlldata
(
const
statement_list_t
*
stmts
)
void
write_dlldata
(
const
statement_list_t
*
stmts
)
{
{
struct
list
filenames
=
LIST_INIT
(
filenames
);
struct
list
filenames
=
LIST_INIT
(
filenames
);
int
define_proxy_delegation
=
0
;
filename_node_t
*
node
;
filename_node_t
*
node
;
FILE
*
dlldata
;
FILE
*
dlldata
;
if
(
!
do_dlldata
||
!
need_proxy_file
(
stmts
))
if
(
!
do_dlldata
||
!
need_proxy_file
(
stmts
))
return
;
return
;
define_proxy_delegation
=
need_proxy_delegation
(
stmts
);
dlldata
=
fopen
(
dlldata_name
,
"r"
);
dlldata
=
fopen
(
dlldata_name
,
"r"
);
if
(
dlldata
)
{
if
(
dlldata
)
{
static
char
marker
[]
=
"REFERENCE_PROXY_FILE"
;
static
char
marker
[]
=
"REFERENCE_PROXY_FILE"
;
static
const
char
delegation_define
[]
=
"#define PROXY_DELEGATION"
;
char
*
line
=
NULL
;
char
*
line
=
NULL
;
size_t
len
=
0
;
size_t
len
=
0
;
...
@@ -409,6 +415,8 @@ void write_dlldata(const statement_list_t *stmts)
...
@@ -409,6 +415,8 @@ void write_dlldata(const statement_list_t *stmts)
*
end
=
'\0'
;
*
end
=
'\0'
;
if
(
start
<
end
)
if
(
start
<
end
)
add_filename_node
(
&
filenames
,
start
);
add_filename_node
(
&
filenames
,
start
);
}
else
if
(
!
define_proxy_delegation
&&
strncmp
(
start
,
delegation_define
,
sizeof
(
delegation_define
)
-
1
))
{
define_proxy_delegation
=
1
;
}
}
}
}
...
@@ -427,7 +435,7 @@ void write_dlldata(const statement_list_t *stmts)
...
@@ -427,7 +435,7 @@ void write_dlldata(const statement_list_t *stmts)
}
}
add_filename_node
(
&
filenames
,
proxy_token
);
add_filename_node
(
&
filenames
,
proxy_token
);
write_dlldata_list
(
&
filenames
);
write_dlldata_list
(
&
filenames
,
define_proxy_delegation
);
free_filename_nodes
(
&
filenames
);
free_filename_nodes
(
&
filenames
);
}
}
...
@@ -676,7 +684,7 @@ int main(int argc,char *argv[])
...
@@ -676,7 +684,7 @@ int main(int argc,char *argv[])
for
(
;
optind
<
argc
;
++
optind
)
for
(
;
optind
<
argc
;
++
optind
)
add_filename_node
(
&
filenames
,
argv
[
optind
]);
add_filename_node
(
&
filenames
,
argv
[
optind
]);
write_dlldata_list
(
&
filenames
);
write_dlldata_list
(
&
filenames
,
0
/* FIXME */
);
free_filename_nodes
(
&
filenames
);
free_filename_nodes
(
&
filenames
);
return
0
;
return
0
;
}
}
...
...
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