don't define macros that conflict with MinGW system header files, causes very cryptic error messages

svn path=/branches/xmlbuildsystem/; revision=12815
This commit is contained in:
Royce Mitchell III
2005-01-05 02:57:58 +00:00
parent 4e36b04d0d
commit 0b755662dd
12 changed files with 33 additions and 43 deletions
+2 -1
View File
@@ -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)
{
}
+2 -2
View File
@@ -6,9 +6,9 @@
class Backend
{
public:
Backend();
Backend ( Project& );
protected:
Project ProjectNode;
Project& ProjectNode;
};
#endif /* __BACKEND_H */
+4 -4
View File
@@ -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
+7 -7
View File
@@ -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 */
+4 -2
View File
@@ -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 @@ void Exception::SetMessage(const char* message,
}
FileNotFoundException::FileNotFoundException(string filename)
FileNotFoundException::FileNotFoundException(const string& filename)
: Exception ( "File '%s' not found.", filename.c_str() )
{
Filename = filename;
+4 -6
View File
@@ -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 @@ protected:
class FileNotFoundException : public Exception
{
public:
FileNotFoundException(string filename);
string Filename;
FileNotFoundException(const std::string& filename);
std::string Filename;
};
+1 -1
View File
@@ -11,7 +11,7 @@ Project::Project()
{
}
Project::Project(string filename)
Project::Project(const string& filename)
{
if ( !xmlfile.open ( filename ) )
throw FileNotFoundException ( filename );
+1 -1
View File
@@ -18,7 +18,7 @@ public:
std::vector<Module*> modules;
Project ();
Project ( string filename );
Project ( const std::string& filename );
~Project ();
void ProcessXML ( const XMLElement& e, const std::string& path );
private:
+2 -6
View File
@@ -22,12 +22,8 @@ protected:
int actual,
const char* file,
int line);
void AreEqual(string expected,
string actual,
const char* file,
int line);
void AreEqual(const char* expected,
string actual,
void AreEqual(const std::string& expected,
const std::string& actual,
const char* file,
int line);
void AreNotEqual(int expected,
+2 -13
View File
@@ -61,8 +61,8 @@ void BaseTest::AreEqual(int expected,
}
}
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(string expected,
}
}
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,
@@ -1,5 +1,7 @@
#include "test.h"
using std::string;
void ModuleTest::Run()
{
string projectFilename ( "tests/data/module.xml" );
@@ -1,5 +1,7 @@
#include "test.h"
using std::string;
void ProjectTest::Run()
{
string projectFilename ( "tests/data/project.xml" );