The MinGW.org Installation Manager Tool
Revisão | c899902968d2a6d18c03600e013db86f3f659ace (tree) |
---|---|
Hora | 2013-05-08 23:34:32 |
Autor | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Avoid unnecessary command line globbing in GUI applications.
@@ -1,3 +1,13 @@ | ||
1 | +2013-05-08 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Avoid unnecessary command line globbing in GUI applications. | |
4 | + | |
5 | + * src/guimain.cpp src/guistub.cpp (_CRT_glob): Declare as extern "C"; | |
6 | + initialise to zero, so overriding the runtime start-up default. | |
7 | + | |
8 | + * src/rites.c [! IMPLEMENT_INITIATION_RITES] (_CRT_glob): Initialise | |
9 | + to zero here too; lastrites.exe doesn't need globbing either. | |
10 | + | |
1 | 11 | 2013-05-04 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 12 | |
3 | 13 | Address some GCC-4.7 string initialisation warnings. |
@@ -4,7 +4,7 @@ | ||
4 | 4 | * $Id$ |
5 | 5 | * |
6 | 6 | * Written by Keith Marshall <keithmarshall@users.sourceforge.net> |
7 | - * Copyright (C) 2012, MinGW Project | |
7 | + * Copyright (C) 2012, 2013, MinGW.org Project | |
8 | 8 | * |
9 | 9 | * |
10 | 10 | * Implementation of the WinMain() function, providing the program |
@@ -34,6 +34,14 @@ using WTK::WindowClassMaker; | ||
34 | 34 | using WTK::MainWindowMaker; |
35 | 35 | using WTK::runtime_error; |
36 | 36 | |
37 | +/* We've no use for command line arguments here, so disable globbing; | |
38 | + * note that this API must be declared 'extern "C"', but the compiler | |
39 | + * will complain if we declare as such, and initialise with a single | |
40 | + * statement, so we keep the two concepts separate. | |
41 | + */ | |
42 | +extern "C" int _CRT_glob; | |
43 | +int _CRT_glob = 0; | |
44 | + | |
37 | 45 | int APIENTRY WinMain |
38 | 46 | ( HINSTANCE Instance, HINSTANCE PrevInstance, char *CmdLine, int ShowMode ) |
39 | 47 | { |
@@ -5,7 +5,7 @@ | ||
5 | 5 | * |
6 | 6 | * Written by Keith Marshall <keithmarshall@users.sourceforge.net> |
7 | 7 | * Derived from stub by Sze Howe Koh <axfangli@users.sourceforge.net> |
8 | - * Copyright (C) 2011, MinGW Project | |
8 | + * Copyright (C) 2011, 2013, MinGW.org Project | |
9 | 9 | * |
10 | 10 | * |
11 | 11 | * Implementation of the GUI main program function, which is invoked |
@@ -31,6 +31,14 @@ | ||
31 | 31 | */ |
32 | 32 | #include <windows.h> |
33 | 33 | |
34 | +/* We've no use for command line arguments here, so disable globbing; | |
35 | + * note that this API must be declared 'extern "C"', but the compiler | |
36 | + * will complain if we declare as such, and initialise with a single | |
37 | + * statement, so we keep the two concepts separate. | |
38 | + */ | |
39 | +extern "C" int _CRT_glob; | |
40 | +int _CRT_glob = 0; | |
41 | + | |
34 | 42 | int APIENTRY WinMain |
35 | 43 | ( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) |
36 | 44 | { |
@@ -5,7 +5,7 @@ | ||
5 | 5 | * $Id$ |
6 | 6 | * |
7 | 7 | * Written by Keith Marshall <keithmarshall@users.sourceforge.net> |
8 | - * Copyright (C) 2009, 2010, 2012, MinGW.org Project | |
8 | + * Copyright (C) 2009, 2010, 2012, 2013, MinGW.org Project | |
9 | 9 | * |
10 | 10 | * |
11 | 11 | * Implementation of the main program function for the "lastrites.exe" |
@@ -94,6 +94,12 @@ | ||
94 | 94 | * always report success. |
95 | 95 | */ |
96 | 96 | # define END_RITES_IMPLEMENTATION return EXIT_SUCCESS; |
97 | + | |
98 | +/* We may note that this free-standing "main()" function doesn't | |
99 | + * process command line arguments, so we may disable globbing in | |
100 | + * the system runtime start-up code. | |
101 | + */ | |
102 | +int _CRT_glob = 0; | |
97 | 103 | #endif |
98 | 104 | |
99 | 105 | /* Provide selectors, to discriminate the two distinct classes |