aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/mhmake.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-02 09:28:00 +0000
committermarha <marha@users.sourceforge.net>2009-10-02 09:28:00 +0000
commit516cdec4894096305f5002b922ba02d49cb3e816 (patch)
treee34bc97b00f6acf17b33877efb7f5ffa543d2881 /tools/mhmake/src/mhmake.cpp
parent945c71554aa1866a5286dd4b8f5b199dd7af9be9 (diff)
downloadvcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.tar.gz
vcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.tar.bz2
vcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.zip
Optimised auto dependency generation
Added control c handler in windows Now throw string exceptions instead of integer exceptions.
Diffstat (limited to 'tools/mhmake/src/mhmake.cpp')
-rw-r--r--tools/mhmake/src/mhmake.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/mhmake/src/mhmake.cpp b/tools/mhmake/src/mhmake.cpp
index 375621fb4..9f2699f91 100644
--- a/tools/mhmake/src/mhmake.cpp
+++ b/tools/mhmake/src/mhmake.cpp
@@ -25,6 +25,15 @@
#include "util.h"
bool g_Clean=false;
+bool g_StopCompiling=false;
+
+#ifdef WIN32
+BOOL WINAPI ControlCHandler(DWORD dwCtrlType)
+{
+ g_StopCompiling=true;
+ return TRUE;
+}
+#endif
int __CDECL main(int argc, char* argv[])
{
@@ -57,6 +66,9 @@ int __CDECL main(int argc, char* argv[])
* output to fail.
*/
putenv("VS_UNICODE_OUTPUT=");
+
+ SetConsoleCtrlHandler(ControlCHandler, TRUE);
+
#endif
try
@@ -120,9 +132,9 @@ int __CDECL main(int argc, char* argv[])
}
}
- catch (int Error)
+ catch (string Message)
{
- printf("Error occured %d\n",Error);
+ cerr << "Error occured: " << Message << endl;
#ifdef _DEBUG
if (g_DumpOnError)
{