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
0a8e3c39
Commit
0a8e3c39
authored
Mar 26, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Include the version number in the __WIDL__ preprocessor definition.
parent
c0c1c422
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
widl.c
tools/widl/widl.c
+31
-1
No files found.
tools/widl/widl.c
View file @
0a8e3c39
...
...
@@ -196,6 +196,36 @@ static char *dup_basename_token(const char *name, const char *ext)
return
ret
;
}
static
void
add_widl_version_define
(
void
)
{
unsigned
int
version
;
const
char
*
p
=
PACKAGE_VERSION
;
/* major */
version
=
atoi
(
p
)
*
0x10000
;
p
=
strchr
(
p
,
'.'
);
/* minor */
if
(
p
)
{
version
+=
atoi
(
p
+
1
)
*
0x100
;
p
=
strchr
(
p
+
1
,
'.'
);
}
/* build */
if
(
p
)
version
+=
atoi
(
p
+
1
);
if
(
version
!=
0
)
{
char
version_str
[
11
];
snprintf
(
version_str
,
sizeof
(
version_str
),
"0x%x"
,
version
);
wpp_add_define
(
"__WIDL__"
,
version_str
);
}
else
wpp_add_define
(
"__WIDL__"
,
NULL
);
}
/* clean things up when aborting on a signal */
static
void
exit_on_signal
(
int
sig
)
{
...
...
@@ -596,7 +626,7 @@ int main(int argc,char *argv[])
if
(
do_client
)
client_token
=
dup_basename_token
(
client_name
,
"_c.c"
);
if
(
do_server
)
server_token
=
dup_basename_token
(
server_name
,
"_s.c"
);
wpp_add_cmdline_define
(
"__WIDL__"
);
add_widl_version_define
(
);
atexit
(
rm_tempfile
);
if
(
!
no_preprocess
)
...
...
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