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
3b7398b4
Commit
3b7398b4
authored
Aug 18, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Guard against re-import of the main input file.
parent
3395ce23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
parser.l
tools/widl/parser.l
+1
-0
parser.y
tools/widl/parser.y
+1
-1
widl.c
tools/widl/widl.c
+6
-3
widl.h
tools/widl/widl.h
+1
-1
No files found.
tools/widl/parser.l
View file @
3b7398b4
...
...
@@ -520,6 +520,7 @@ void push_import( const char *import_name, struct location *where )
LIST_FOR_EACH_ENTRY( import, &imports, struct import, entry )
if (!strcmp( import->name, import_name )) return; /* already imported */
if (!strcmp( idl_name, import_name )) return; /* already imported */
import = xmalloc( sizeof(struct import) );
import->name = xstrdup( import_name );
...
...
tools/widl/parser.y
View file @
3b7398b4
...
...
@@ -2270,7 +2270,7 @@ char *gen_name(void)
if (! file_id)
{
char *dst = replace_extension(
get_basename(input_idl_name)
, ".idl", "" );
char *dst = replace_extension(
idl_name
, ".idl", "" );
file_id = dst;
for (; *dst; ++dst)
...
...
tools/widl/widl.c
View file @
3b7398b4
...
...
@@ -114,7 +114,7 @@ static int stdinc = 1;
static
enum
stub_mode
stub_mode
=
MODE_Os
;
char
*
input_name
;
char
*
i
nput_i
dl_name
;
char
*
idl_name
;
char
*
acf_name
;
char
*
header_name
;
char
*
local_stubs_name
;
...
...
@@ -435,7 +435,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
"
,
i
nput_i
dl_name
);
fprintf
(
idfile
,
"from %s - Do not edit ***/
\n\n
"
,
idl_name
);
fprintf
(
idfile
,
"#include <rpc.h>
\n
"
);
fprintf
(
idfile
,
"#include <rpcndr.h>
\n\n
"
);
...
...
@@ -782,7 +782,10 @@ int main(int argc,char *argv[])
return
1
;
}
else
input_idl_name
=
input_name
=
xstrdup
(
files
.
str
[
0
]);
{
input_name
=
xstrdup
(
files
.
str
[
0
]
);
idl_name
=
get_basename
(
input_name
);
}
}
else
{
fprintf
(
stderr
,
"%s"
,
usage
);
...
...
tools/widl/widl.h
View file @
3b7398b4
...
...
@@ -52,7 +52,7 @@ extern int winrt_mode;
extern
int
use_abi_namespace
;
extern
char
*
input_name
;
extern
char
*
i
nput_i
dl_name
;
extern
char
*
idl_name
;
extern
char
*
acf_name
;
extern
char
*
header_name
;
extern
char
*
header_token
;
...
...
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