widl: Add --win32/--win64 options to select the type of code generated.

This commit is contained in:
Alexandre Julliard 2008-12-26 17:21:12 +01:00
parent 9ca1382eae
commit b1ab7d88b3
3 changed files with 23 additions and 1 deletions

View File

@ -78,6 +78,8 @@ static const char usage[] =
" -U file Name of interface identifiers file (default is infile_i.c)\n"
" -V Print version and exit\n"
" -W Enable pedantic warnings\n"
" --win32 Only generate 32-bit code\n"
" --win64 Only generate 64-bit code\n"
"Debug level 'n' is a bitmask with following meaning:\n"
" * 0x01 Tell which resource is parsed (verbose mode)\n"
" * 0x02 Dump internal structures\n"
@ -106,6 +108,8 @@ int do_idfile = 0;
int do_dlldata = 0;
int no_preprocess = 0;
int old_names = 0;
int do_win32 = 1;
int do_win64 = 1;
char *input_name;
char *header_name;
@ -143,7 +147,9 @@ enum {
LOCAL_STUBS_OPTION,
PREFIX_ALL_OPTION,
PREFIX_CLIENT_OPTION,
PREFIX_SERVER_OPTION
PREFIX_SERVER_OPTION,
WIN32_OPTION,
WIN64_OPTION
};
static const char short_options[] =
@ -156,6 +162,8 @@ static const struct option long_options[] = {
{ "prefix-all", 1, 0, PREFIX_ALL_OPTION },
{ "prefix-client", 1, 0, PREFIX_CLIENT_OPTION },
{ "prefix-server", 1, 0, PREFIX_SERVER_OPTION },
{ "win32", 0, 0, WIN32_OPTION },
{ "win64", 0, 0, WIN64_OPTION },
{ 0, 0, 0, 0 }
};
@ -377,6 +385,14 @@ int main(int argc,char *argv[])
case PREFIX_SERVER_OPTION:
prefix_server = xstrdup(optarg);
break;
case WIN32_OPTION:
do_win32 = 1;
do_win64 = 0;
break;
case WIN64_OPTION:
do_win32 = 0;
do_win64 = 1;
break;
case 'c':
do_everything = 0;
do_client = 1;

View File

@ -45,6 +45,8 @@ extern int do_server;
extern int do_idfile;
extern int do_dlldata;
extern int old_names;
extern int do_win32;
extern int do_win64;
extern char *input_name;
extern char *header_name;

View File

@ -74,6 +74,10 @@ Prefix to put on the name of server stubs.
Generate server stub.
.IP "\fB-S \fIfile\fR"
Name of server stub file (default is \fIinfile\fR_s.c)
.IP "\fB--win32, --win64\fR"
Only generate 32-bit, respectively 64-bit code (the default is to
generate both 32-bit and 64-bit versions into the same destination
file).
.PP
.B Dlldata file options:
.IP "\fB--dlldata=\fIfile\fR"