Fossil SCM

Fix the build for mingw: do not translate command-line options from unicode to utf8 because mingw has already done that for us.

drh 2012-11-29 18:21 trunk
Commit f1a82cf34f1c89e31cc9d20b388f990f32e9cbbb
1 file changed +3 -1
+3 -1
--- src/main.c
+++ src/main.c
@@ -492,14 +492,16 @@
492492
g.argv = argv;
493493
#if defined(_WIN32) && !defined(__MINGW32__)
494494
parse_windows_command_line(&g.argc, &g.argv);
495495
GetModuleFileNameW(NULL, buf, MAX_PATH);
496496
g.nameOfExe = fossil_filename_to_utf8(buf);
497
+ for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
498
+#elif defined(__APPLE__)
499
+ for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
497500
#else
498501
g.nameOfExe = g.argv[0];
499502
#endif
500
- for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
501503
for(i=1; i<g.argc-1; i++){
502504
z = g.argv[i];
503505
if( z[0]!='-' ) continue;
504506
z++;
505507
if( z[0]=='-' ) z++;
506508
--- src/main.c
+++ src/main.c
@@ -492,14 +492,16 @@
492 g.argv = argv;
493 #if defined(_WIN32) && !defined(__MINGW32__)
494 parse_windows_command_line(&g.argc, &g.argv);
495 GetModuleFileNameW(NULL, buf, MAX_PATH);
496 g.nameOfExe = fossil_filename_to_utf8(buf);
 
 
 
497 #else
498 g.nameOfExe = g.argv[0];
499 #endif
500 for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
501 for(i=1; i<g.argc-1; i++){
502 z = g.argv[i];
503 if( z[0]!='-' ) continue;
504 z++;
505 if( z[0]=='-' ) z++;
506
--- src/main.c
+++ src/main.c
@@ -492,14 +492,16 @@
492 g.argv = argv;
493 #if defined(_WIN32) && !defined(__MINGW32__)
494 parse_windows_command_line(&g.argc, &g.argv);
495 GetModuleFileNameW(NULL, buf, MAX_PATH);
496 g.nameOfExe = fossil_filename_to_utf8(buf);
497 for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
498 #elif defined(__APPLE__)
499 for(i=0; i<g.argc; i++) g.argv[i] = fossil_filename_to_utf8(g.argv[i]);
500 #else
501 g.nameOfExe = g.argv[0];
502 #endif
 
503 for(i=1; i<g.argc-1; i++){
504 z = g.argv[i];
505 if( z[0]!='-' ) continue;
506 z++;
507 if( z[0]=='-' ) z++;
508

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button