Fossil SCM
enable unicode commandline for MinGW/MinGW-w64 as well <p> remove unused MINGW_BROKEN_MAINARGS
Commit
274d8a1dcd3b1eaae45e1665471c684708c24129
Parent
f668ff44c04174d…
6 files changed
-4
+1
-6
+4
-4
+1
-6
+1
-1
+1
-1
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -552,15 +552,11 @@ | ||
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | /* |
| 555 | 555 | ** This procedure runs first. |
| 556 | 556 | */ |
| 557 | -#if defined(_WIN32) && defined(UNICODE) | |
| 558 | -int wmain(int argc, wchar_t **argv) | |
| 559 | -#else | |
| 560 | 557 | int main(int argc, char **argv) |
| 561 | -#endif | |
| 562 | 558 | { |
| 563 | 559 | const char *zCmdName = "unknown"; |
| 564 | 560 | int idx; |
| 565 | 561 | int rc; |
| 566 | 562 | |
| 567 | 563 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -552,15 +552,11 @@ | |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | ** This procedure runs first. |
| 556 | */ |
| 557 | #if defined(_WIN32) && defined(UNICODE) |
| 558 | int wmain(int argc, wchar_t **argv) |
| 559 | #else |
| 560 | int main(int argc, char **argv) |
| 561 | #endif |
| 562 | { |
| 563 | const char *zCmdName = "unknown"; |
| 564 | int idx; |
| 565 | int rc; |
| 566 | |
| 567 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -552,15 +552,11 @@ | |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | ** This procedure runs first. |
| 556 | */ |
| 557 | int main(int argc, char **argv) |
| 558 | { |
| 559 | const char *zCmdName = "unknown"; |
| 560 | int idx; |
| 561 | int rc; |
| 562 | |
| 563 |
+1
-6
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -432,11 +432,11 @@ | ||
| 432 | 432 | # will run on the target platform. This is usually the same |
| 433 | 433 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 434 | 434 | # the finished binary for fossil. The BCC compiler above is used |
| 435 | 435 | # for building intermediate code-generator tools. |
| 436 | 436 | # |
| 437 | -TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 437 | +TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 438 | 438 | |
| 439 | 439 | #### Compile resources for use in building executables that will run |
| 440 | 440 | # on the target platform. |
| 441 | 441 | # |
| 442 | 442 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -474,15 +474,10 @@ | ||
| 474 | 474 | ifdef FOSSIL_ENABLE_JSON |
| 475 | 475 | TCC += -DFOSSIL_ENABLE_JSON=1 |
| 476 | 476 | RCC += -DFOSSIL_ENABLE_JSON=1 |
| 477 | 477 | endif |
| 478 | 478 | |
| 479 | -# Fix buggy MinGW command line parsing | |
| 480 | -ifdef MINGW_BROKEN_MAINARGS | |
| 481 | -TCC += -DMINGW_BROKEN_MAINARGS | |
| 482 | -endif | |
| 483 | - | |
| 484 | 479 | #### We add the -static option here so that we can build a static |
| 485 | 480 | # executable that will run in a chroot jail. |
| 486 | 481 | # |
| 487 | 482 | LIB = -static |
| 488 | 483 | |
| 489 | 484 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -432,11 +432,11 @@ | |
| 432 | # will run on the target platform. This is usually the same |
| 433 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 434 | # the finished binary for fossil. The BCC compiler above is used |
| 435 | # for building intermediate code-generator tools. |
| 436 | # |
| 437 | TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 438 | |
| 439 | #### Compile resources for use in building executables that will run |
| 440 | # on the target platform. |
| 441 | # |
| 442 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -474,15 +474,10 @@ | |
| 474 | ifdef FOSSIL_ENABLE_JSON |
| 475 | TCC += -DFOSSIL_ENABLE_JSON=1 |
| 476 | RCC += -DFOSSIL_ENABLE_JSON=1 |
| 477 | endif |
| 478 | |
| 479 | # Fix buggy MinGW command line parsing |
| 480 | ifdef MINGW_BROKEN_MAINARGS |
| 481 | TCC += -DMINGW_BROKEN_MAINARGS |
| 482 | endif |
| 483 | |
| 484 | #### We add the -static option here so that we can build a static |
| 485 | # executable that will run in a chroot jail. |
| 486 | # |
| 487 | LIB = -static |
| 488 | |
| 489 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -432,11 +432,11 @@ | |
| 432 | # will run on the target platform. This is usually the same |
| 433 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 434 | # the finished binary for fossil. The BCC compiler above is used |
| 435 | # for building intermediate code-generator tools. |
| 436 | # |
| 437 | TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) |
| 438 | |
| 439 | #### Compile resources for use in building executables that will run |
| 440 | # on the target platform. |
| 441 | # |
| 442 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -474,15 +474,10 @@ | |
| 474 | ifdef FOSSIL_ENABLE_JSON |
| 475 | TCC += -DFOSSIL_ENABLE_JSON=1 |
| 476 | RCC += -DFOSSIL_ENABLE_JSON=1 |
| 477 | endif |
| 478 | |
| 479 | #### We add the -static option here so that we can build a static |
| 480 | # executable that will run in a chroot jail. |
| 481 | # |
| 482 | LIB = -static |
| 483 | |
| 484 |
+4
-4
| --- test/cmdline.test | ||
| +++ test/cmdline.test | ||
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | # |
| 2 | -# Copyright (c) 2011 D. Richard Hipp | |
| 2 | +# Copyright (c) 2012 D. Richard Hipp | |
| 3 | 3 | # |
| 4 | 4 | # This program is free software; you can redistribute it and/or |
| 5 | 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | 7 | # |
| @@ -19,12 +19,12 @@ | ||
| 19 | 19 | # |
| 20 | 20 | |
| 21 | 21 | proc cmd-line {testname args} { |
| 22 | 22 | set i 1 |
| 23 | 23 | foreach {cmdline result} $args { |
| 24 | - fossil test-echo {*}$cmdline | |
| 24 | + fossil test-echo $cmdline | |
| 25 | 25 | test cmd-line-$testname.$i {[lrange [split $::RESULT \n] 2 end]=="\{argv\[2\] = \[$result\]\}"} |
| 26 | 26 | incr i |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | -cmd-line 100 abc abc {"abc"} abc | |
| 30 | -cmd-line 101 * {*} *.* {*.*} | |
| 29 | +cmd-line 100 abc abc a\"bc a\"bc \"abc\" \"abc\" | |
| 30 | +cmd-line 101 * * *.* *.* | |
| 31 | 31 |
| --- test/cmdline.test | |
| +++ test/cmdline.test | |
| @@ -1,7 +1,7 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2011 D. Richard Hipp |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| @@ -19,12 +19,12 @@ | |
| 19 | # |
| 20 | |
| 21 | proc cmd-line {testname args} { |
| 22 | set i 1 |
| 23 | foreach {cmdline result} $args { |
| 24 | fossil test-echo {*}$cmdline |
| 25 | test cmd-line-$testname.$i {[lrange [split $::RESULT \n] 2 end]=="\{argv\[2\] = \[$result\]\}"} |
| 26 | incr i |
| 27 | } |
| 28 | } |
| 29 | cmd-line 100 abc abc {"abc"} abc |
| 30 | cmd-line 101 * {*} *.* {*.*} |
| 31 |
| --- test/cmdline.test | |
| +++ test/cmdline.test | |
| @@ -1,7 +1,7 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2012 D. Richard Hipp |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| @@ -19,12 +19,12 @@ | |
| 19 | # |
| 20 | |
| 21 | proc cmd-line {testname args} { |
| 22 | set i 1 |
| 23 | foreach {cmdline result} $args { |
| 24 | fossil test-echo $cmdline |
| 25 | test cmd-line-$testname.$i {[lrange [split $::RESULT \n] 2 end]=="\{argv\[2\] = \[$result\]\}"} |
| 26 | incr i |
| 27 | } |
| 28 | } |
| 29 | cmd-line 100 abc abc a\"bc a\"bc \"abc\" \"abc\" |
| 30 | cmd-line 101 * * *.* *.* |
| 31 |
+1
-6
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -104,11 +104,11 @@ | ||
| 104 | 104 | # will run on the target platform. This is usually the same |
| 105 | 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | 107 | # for building intermediate code-generator tools. |
| 108 | 108 | # |
| 109 | -TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 109 | +TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 110 | 110 | |
| 111 | 111 | #### Compile resources for use in building executables that will run |
| 112 | 112 | # on the target platform. |
| 113 | 113 | # |
| 114 | 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -146,15 +146,10 @@ | ||
| 146 | 146 | ifdef FOSSIL_ENABLE_JSON |
| 147 | 147 | TCC += -DFOSSIL_ENABLE_JSON=1 |
| 148 | 148 | RCC += -DFOSSIL_ENABLE_JSON=1 |
| 149 | 149 | endif |
| 150 | 150 | |
| 151 | -# Fix buggy MinGW command line parsing | |
| 152 | -ifdef MINGW_BROKEN_MAINARGS | |
| 153 | -TCC += -DMINGW_BROKEN_MAINARGS | |
| 154 | -endif | |
| 155 | - | |
| 156 | 151 | #### We add the -static option here so that we can build a static |
| 157 | 152 | # executable that will run in a chroot jail. |
| 158 | 153 | # |
| 159 | 154 | LIB = -static |
| 160 | 155 | |
| 161 | 156 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -104,11 +104,11 @@ | |
| 104 | # will run on the target platform. This is usually the same |
| 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | # for building intermediate code-generator tools. |
| 108 | # |
| 109 | TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 110 | |
| 111 | #### Compile resources for use in building executables that will run |
| 112 | # on the target platform. |
| 113 | # |
| 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -146,15 +146,10 @@ | |
| 146 | ifdef FOSSIL_ENABLE_JSON |
| 147 | TCC += -DFOSSIL_ENABLE_JSON=1 |
| 148 | RCC += -DFOSSIL_ENABLE_JSON=1 |
| 149 | endif |
| 150 | |
| 151 | # Fix buggy MinGW command line parsing |
| 152 | ifdef MINGW_BROKEN_MAINARGS |
| 153 | TCC += -DMINGW_BROKEN_MAINARGS |
| 154 | endif |
| 155 | |
| 156 | #### We add the -static option here so that we can build a static |
| 157 | # executable that will run in a chroot jail. |
| 158 | # |
| 159 | LIB = -static |
| 160 | |
| 161 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -104,11 +104,11 @@ | |
| 104 | # will run on the target platform. This is usually the same |
| 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | # for building intermediate code-generator tools. |
| 108 | # |
| 109 | TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) |
| 110 | |
| 111 | #### Compile resources for use in building executables that will run |
| 112 | # on the target platform. |
| 113 | # |
| 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| @@ -146,15 +146,10 @@ | |
| 146 | ifdef FOSSIL_ENABLE_JSON |
| 147 | TCC += -DFOSSIL_ENABLE_JSON=1 |
| 148 | RCC += -DFOSSIL_ENABLE_JSON=1 |
| 149 | endif |
| 150 | |
| 151 | #### We add the -static option here so that we can build a static |
| 152 | # executable that will run in a chroot jail. |
| 153 | # |
| 154 | LIB = -static |
| 155 | |
| 156 |
+1
-1
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -104,11 +104,11 @@ | ||
| 104 | 104 | # will run on the target platform. This is usually the same |
| 105 | 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | 107 | # for building intermediate code-generator tools. |
| 108 | 108 | # |
| 109 | -TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 109 | +TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 110 | 110 | |
| 111 | 111 | #### Compile resources for use in building executables that will run |
| 112 | 112 | # on the target platform. |
| 113 | 113 | # |
| 114 | 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| 115 | 115 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -104,11 +104,11 @@ | |
| 104 | # will run on the target platform. This is usually the same |
| 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | # for building intermediate code-generator tools. |
| 108 | # |
| 109 | TCC = $(PREFIX)gcc -Os -Wall -L$(ZLIBDIR) -I$(ZINCDIR) |
| 110 | |
| 111 | #### Compile resources for use in building executables that will run |
| 112 | # on the target platform. |
| 113 | # |
| 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| 115 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -104,11 +104,11 @@ | |
| 104 | # will run on the target platform. This is usually the same |
| 105 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 106 | # the finished binary for fossil. The BCC compiler above is used |
| 107 | # for building intermediate code-generator tools. |
| 108 | # |
| 109 | TCC = $(PREFIX)gcc -Os -Wall -DUNICODE -D_UNICODE -L$(ZLIBDIR) -I$(ZINCDIR) |
| 110 | |
| 111 | #### Compile resources for use in building executables that will run |
| 112 | # on the target platform. |
| 113 | # |
| 114 | RCC = $(PREFIX)windres -I$(SRCDIR) -I$(ZINCDIR) |
| 115 |
+1
-1
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -32,11 +32,11 @@ | ||
| 32 | 32 | ZLIBDIR = $(MSCDIR)\extra\lib |
| 33 | 33 | ZLIB = zlib.lib |
| 34 | 34 | |
| 35 | 35 | INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(MSCDIR)\extra\include -I$(ZINCDIR) |
| 36 | 36 | |
| 37 | -CFLAGS = -nologo -MT -O2 -DUNICODE -D_UNICODE | |
| 37 | +CFLAGS = -nologo -MT -O2 | |
| 38 | 38 | BCC = $(CC) $(CFLAGS) |
| 39 | 39 | TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL) |
| 40 | 40 | LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB) |
| 41 | 41 | LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR) |
| 42 | 42 | |
| 43 | 43 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -32,11 +32,11 @@ | |
| 32 | ZLIBDIR = $(MSCDIR)\extra\lib |
| 33 | ZLIB = zlib.lib |
| 34 | |
| 35 | INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(MSCDIR)\extra\include -I$(ZINCDIR) |
| 36 | |
| 37 | CFLAGS = -nologo -MT -O2 -DUNICODE -D_UNICODE |
| 38 | BCC = $(CC) $(CFLAGS) |
| 39 | TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL) |
| 40 | LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB) |
| 41 | LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR) |
| 42 | |
| 43 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -32,11 +32,11 @@ | |
| 32 | ZLIBDIR = $(MSCDIR)\extra\lib |
| 33 | ZLIB = zlib.lib |
| 34 | |
| 35 | INCL = -I. -I$(SRCDIR) -I$B\win\include -I$(MSCDIR)\extra\include -I$(ZINCDIR) |
| 36 | |
| 37 | CFLAGS = -nologo -MT -O2 |
| 38 | BCC = $(CC) $(CFLAGS) |
| 39 | TCC = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL) |
| 40 | LIBS = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB) |
| 41 | LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR) |
| 42 | |
| 43 |