Alexandre Julliard : winebuild: Add a -m16 option to specify a 16-bit build .

Alexandre Julliard julliard at winehq.org
Wed Jul 21 10:54:59 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jul 21 12:43:53 2010 +0200

winebuild: Add a -m16 option to specify a 16-bit build.

---

 tools/winebuild/main.c           |    9 +++++----
 tools/winebuild/winebuild.man.in |    9 +++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 0e662f8..33800eb 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -251,7 +251,7 @@ static const char usage_str[] =
 "       --ld-cmd=LD           Command to use for linking (default: ld)\n"
 "   -l, --library=LIB         Import the specified library\n"
 "   -L, --library-path=DIR    Look for imports libraries in DIR\n"
-"   -m32, -m64                Force building 32-bit resp. 64-bit code\n"
+"   -m16, -m32, -m64          Force building 16-bit, 32-bit resp. 64-bit code\n"
 "   -M, --main-module=MODULE  Set the name of the main module for a Win16 dll\n"
 "       --nm-cmd=NM           Command to use to get undefined symbols (default: nm)\n"
 "       --nxcompat=y|n        Set the NX compatibility flag (default: yes)\n"
@@ -382,9 +382,10 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
             lib_path[nb_lib_paths++] = xstrdup( optarg );
             break;
         case 'm':
-            if (strcmp( optarg, "32" ) && strcmp( optarg, "64" ))
-                fatal_error( "Invalid -m option '%s', expected -m32 or -m64\n", optarg );
-            if (!strcmp( optarg, "32" )) force_pointer_size = 4;
+            if (strcmp( optarg, "16" ) && strcmp( optarg, "32" ) && strcmp( optarg, "64" ))
+                fatal_error( "Invalid -m option '%s', expected -m16, -m32 or -m64\n", optarg );
+            if (!strcmp( optarg, "16" )) spec->type = SPEC_WIN16;
+            else if (!strcmp( optarg, "32" )) force_pointer_size = 4;
             else force_pointer_size = 8;
             break;
         case 'M':
diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in
index 2b0f0b7..2da97c7 100644
--- a/tools/winebuild/winebuild.man.in
+++ b/tools/winebuild/winebuild.man.in
@@ -157,8 +157,8 @@ Import the specified library, looking for a corresponding
 \fIlibname.def\fR file in the directories specified with the \fB-L\fR
 option.
 .TP
-.B \-m32, -m64
-Generate 32-bit, respectively 64-bit code.
+.B \-m16, -m32, -m64
+Generate 16-bit, 32-bit, respectively 64-bit code.
 .TP
 .BI \-M,\ --main-module= module
 When building a 16-bit dll, set the name of its 32-bit counterpart to
@@ -211,10 +211,7 @@ for a command line executable,
 for a graphical executable,
 .br
 .B native
-for a native-mode dll,
-.br
-.B win16
-for a 16-bit module.
+for a native-mode dll.
 .br
 The entry point of a command line executable is a normal C \fBmain\fR
 function. A \fBwmain\fR function can be used instead if you need the




More information about the wine-cvs mailing list