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

Alexandre Julliard julliard at winehq.org
Fri Dec 26 12:35:24 CST 2008


Module: wine
Branch: master
Commit: b1ab7d88b3e3bde52e72bea1c2bd8a83524f37a6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b1ab7d88b3e3bde52e72bea1c2bd8a83524f37a6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 26 17:21:12 2008 +0100

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

---

 tools/widl/widl.c      |   18 +++++++++++++++++-
 tools/widl/widl.h      |    2 ++
 tools/widl/widl.man.in |    4 ++++
 3 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index c10f4a1..3f03f40 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -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;
diff --git a/tools/widl/widl.h b/tools/widl/widl.h
index 07d886a..01de04c 100644
--- a/tools/widl/widl.h
+++ b/tools/widl/widl.h
@@ -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;
diff --git a/tools/widl/widl.man.in b/tools/widl/widl.man.in
index df7d1c0..e275292 100644
--- a/tools/widl/widl.man.in
+++ b/tools/widl/widl.man.in
@@ -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"




More information about the wine-cvs mailing list