From 9ab3f6aaba5f1c0cc06ddcece72c1fba3a0a2940 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 15 Jun 2012 19:52:39 +0200 Subject: [PATCH] Compilation fixes for *NIX. --- base/application.cpp | 3 ++- base/i2-base.h | 1 - dyn/configcompiler.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/application.cpp b/base/application.cpp index 4f7f95c38..cab1bb579 100644 --- a/base/application.cpp +++ b/base/application.cpp @@ -353,6 +353,7 @@ string Application::GetExeDirectory(void) const if (getcwd(Cwd, sizeof(Cwd)) == NULL) throw PosixException("getcwd failed", errno); + // TODO:: C++ify this. if (argv0[0] != '/') snprintf(FullExePath, sizeof(FullExePath), "%s/%s", Cwd, argv0); else @@ -365,7 +366,7 @@ string Application::GetExeDirectory(void) const PathEnv = strdup(PathEnv); if (PathEnv == NULL) - throw bad_alloc(); + throw runtime_error("strdup failed"); FoundPath = false; diff --git a/base/i2-base.h b/base/i2-base.h index c5182727d..a276ac43d 100644 --- a/base/i2-base.h +++ b/base/i2-base.h @@ -120,7 +120,6 @@ using boost::enable_shared_from_this; using boost::dynamic_pointer_cast; using boost::static_pointer_cast; using boost::function; -using boost::signal; #if defined(__APPLE__) && defined(__MACH__) # pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/dyn/configcompiler.cpp b/dyn/configcompiler.cpp index 08271920b..d27eb21be 100644 --- a/dyn/configcompiler.cpp +++ b/dyn/configcompiler.cpp @@ -66,7 +66,7 @@ vector ConfigCompiler::CompileFile(const string& filename) { ifstream stream; stream.exceptions(ifstream::badbit); - stream.open(filename, ifstream::in); + stream.open(filename.c_str(), ifstream::in); return CompileStream(&stream); }