aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-07-09 18:43:26 +0000
committermarha <marha@users.sourceforge.net>2010-07-09 18:43:26 +0000
commita32fb49df0a63bee951f98e7583396c3adb28ad3 (patch)
tree0454850c954172b17575d561061d99a1d502fcc1 /tools/mhmake
parent29c7981777a6fa7d962977d2a7bdce68c116206d (diff)
downloadvcxsrv-a32fb49df0a63bee951f98e7583396c3adb28ad3.tar.gz
vcxsrv-a32fb49df0a63bee951f98e7583396c3adb28ad3.tar.bz2
vcxsrv-a32fb49df0a63bee951f98e7583396c3adb28ad3.zip
Solved crash when compiled with VS2010
Diffstat (limited to 'tools/mhmake')
-rw-r--r--tools/mhmake/src/commandqueue.cpp2
-rw-r--r--tools/mhmake/src/commandqueue.h18
-rw-r--r--tools/mhmake/src/mhmakeparser.y3
-rw-r--r--tools/mhmake/src/util.h2
4 files changed, 17 insertions, 8 deletions
diff --git a/tools/mhmake/src/commandqueue.cpp b/tools/mhmake/src/commandqueue.cpp
index 5c09da905..306142d2b 100644
--- a/tools/mhmake/src/commandqueue.cpp
+++ b/tools/mhmake/src/commandqueue.cpp
@@ -140,7 +140,7 @@ void commandqueue::RemoveActiveEntry(unsigned Entry)
Entry=EntryP1;
}
}
- m_pActiveEntries[Entry]=activeentry();
+ m_pActiveEntries[Entry].clear();
m_pActiveProcesses[Entry]=NULL;
m_NrActiveEntries--;
}
diff --git a/tools/mhmake/src/commandqueue.h b/tools/mhmake/src/commandqueue.h
index 84878067e..3642d2f1d 100644
--- a/tools/mhmake/src/commandqueue.h
+++ b/tools/mhmake/src/commandqueue.h
@@ -33,11 +33,19 @@ class commandqueue
{
struct activeentry
{
- refptr<fileinfo> pTarget;
- vector<string>::iterator CurrentCommandIt;
- string Command;
- md5_context md5ctx;
- bool IgnoreError;
+ refptr<fileinfo> pTarget;
+ vector<string>::const_iterator CurrentCommandIt;
+ string Command;
+ md5_context md5ctx;
+ bool IgnoreError;
+ void clear()
+ {
+ pTarget=NULL;
+ Command.clear();
+ #ifdef _DEBUG
+ md5ctx.Data.clear();
+ #endif
+ }
};
private:
queue< refptr<fileinfo> > m_Queue;
diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y
index 336ddb6dc..2b2e11411 100644
--- a/tools/mhmake/src/mhmakeparser.y
+++ b/tools/mhmake/src/mhmakeparser.y
@@ -188,7 +188,8 @@ optvarassignment: STRING OPTEQUAL maybeemptyexpression
;
maybeemptyexpression: NEWLINE {$$=g_EmptyString;} |
- expression NEWLINE
+ expression NEWLINE |
+ expression SPACE NEWLINE
;
expression: nonspaceexpression |
diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h
index f29b9cbcf..9f8ab5b9b 100644
--- a/tools/mhmake/src/util.h
+++ b/tools/mhmake/src/util.h
@@ -50,7 +50,7 @@
#define PLATFORM "linux"
#endif
-#define MHMAKEVER "2.0.5"
+#define MHMAKEVER "2.0.6"
class makecommand
{