don't define macros that conflict with MinGW system header files, causes
very cryptic error messages
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/exception.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/exception.h
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -2,8 +2,9 @@
#pragma warning ( disable : 4786 ) // identifier was truncated to '255'
characters in the debug information
#endif//_MSC_VER
+#include "../Rbuild.h"
#include "backend.h"
-Backend::Backend()
+Backend::Backend ( Project& project ) : ProjectNode(project)
{
}
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/backend.h
2005-01-05 02:57:58 UTC (rev 12815)
@@ -6,9 +6,9 @@
class Backend
{
public:
- Backend();
+ Backend ( Project& );
protected:
- Project ProjectNode;
+ Project& ProjectNode;
};
#endif /* __BACKEND_H */
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -1,11 +1,11 @@
#ifdef _MSC_VER
#pragma warning ( disable : 4786 ) // identifier was truncated to '255'
characters in the debug information
#endif//_MSC_VER
-#if 0
+
+//#include <stdlib.h> // mingw proves it's insanity once again
#include "mingw.h"
-MingwBackend::MingwBackend(Project project)
- : ProjectNode(project)
+MingwBackend::MingwBackend(Project& project)
+ : Backend(project)
{
}
-#endif
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/mingw.h
2005-01-05 02:57:58 UTC (rev 12815)
@@ -1,12 +1,12 @@
-#ifndef __MINGW_H
-#define __MINGW_H
-#if 0
-#include "backend.h"
+#ifndef MINGW_H
+#define MINGW_H
+#include "../backend.h"
+
class MingwBackend : public Backend
{
public:
- MingwBackend();
+ MingwBackend ( Project& );
};
-#endif
-#endif /* __MINGW_H */
+
+#endif /* MINGW_H */
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/exception.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/exception.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/exception.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -5,11 +5,13 @@
#include <stdarg.h>
#include "rbuild.h"
+using std::string;
+
Exception::Exception()
{
}
-Exception::Exception(string message)
+Exception::Exception(const string& message)
{
Message = message;
}
@@ -33,7 +35,7 @@
}
-FileNotFoundException::FileNotFoundException(string filename)
+FileNotFoundException::FileNotFoundException(const string& filename)
: Exception ( "File '%s' not found.", filename.c_str() )
{
Filename = filename;
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/exception.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/exception.h
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/exception.h
2005-01-05 02:57:58 UTC (rev 12815)
@@ -3,15 +3,13 @@
#include <string>
-using std::string;
-
class Exception
{
public:
- Exception(string message);
+ Exception(const std::string& message);
Exception(const char* format,
...);
- string Message;
+ std::string Message;
protected:
Exception();
void SetMessage(const char* message,
@@ -22,8 +20,8 @@
class FileNotFoundException : public Exception
{
public:
- FileNotFoundException(string filename);
- string Filename;
+ FileNotFoundException(const std::string& filename);
+ std::string Filename;
};
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/project.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -11,7 +11,7 @@
{
}
-Project::Project(string filename)
+Project::Project(const string& filename)
{
if ( !xmlfile.open ( filename ) )
throw FileNotFoundException ( filename );
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h
2005-01-05 02:57:58 UTC (rev 12815)
@@ -18,7 +18,7 @@
std::vector<Module*> modules;
Project ();
- Project ( string filename );
+ Project ( const std::string& filename );
~Project ();
void ProcessXML ( const XMLElement& e, const std::string& path
);
private:
_____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/test.h
--- branches/xmlbuildsystem/reactos/tools/rbuild/test.h 2005-01-05
02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/test.h 2005-01-05
02:57:58 UTC (rev 12815)
@@ -22,14 +22,10 @@
int actual,
const char* file,
int line);
- void AreEqual(string expected,
- string actual,
+ void AreEqual(const std::string& expected,
+ const std::string& actual,
const char* file,
int line);
- void AreEqual(const char* expected,
- string actual,
- const char* file,
- int line);
void AreNotEqual(int expected,
int actual,
const char* file,
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/alltests.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -61,8 +61,8 @@
}
}
-void BaseTest::AreEqual(string expected,
- string actual,
+void BaseTest::AreEqual(const std::string& expected,
+ const std::string& actual,
const char* file,
int line)
{
@@ -76,17 +76,6 @@
}
}
-void BaseTest::AreEqual(const char* expected,
- string actual,
- const char* file,
- int line)
-{
- AreEqual(string(expected),
- actual,
- file,
- line);
-}
-
void BaseTest::AreNotEqual(int expected,
int actual,
const char* file,
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/moduletest.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -1,5 +1,7 @@
#include "test.h"
+using std::string;
+
void ModuleTest::Run()
{
string projectFilename ( "tests/data/module.xml" );
_____
Modified:
branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp
--- branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp
2005-01-05 02:50:50 UTC (rev 12814)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/projecttest.cpp
2005-01-05 02:57:58 UTC (rev 12815)
@@ -1,5 +1,7 @@
#include "test.h"
+using std::string;
+
void ProjectTest::Run()
{
string projectFilename ( "tests/data/project.xml" );