From b8879524bd3a0067d4b09bcf71a8f7f7a28932b7 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Sat, 23 Feb 2008 10:47:35 -0500 Subject: Fixed GCC 4.3 build failures --- cpp/src/Slice/Preprocessor.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'cpp/src/Slice/Preprocessor.cpp') diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 869dc5ca760..2a26aa026af 100755 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #ifndef _WIN32 # include @@ -113,7 +114,7 @@ Slice::Preprocessor::normalizeIncludePath(const string& path) result.replace(pos, 2, "/"); } - if(result == "/" || result.size() == 3 && isalpha(result[0]) && result[1] == ':' && result[2] == '/') + if(result == "/" || (result.size() == 3 && isalpha(result[0]) && result[1] == ':' && result[2] == '/')) { return result; } @@ -144,11 +145,11 @@ Slice::Preprocessor::preprocess(bool keepComments) } args.push_back(_fileName); - char** argv = new char*[args.size() + 1]; + const char** argv = new const char*[args.size() + 1]; argv[0] = "mcpp"; for(unsigned int i = 0; i < args.size(); ++i) { - argv[i + 1] = (char*) args[i].c_str(); + argv[i + 1] = args[i].c_str(); } // @@ -166,7 +167,7 @@ Slice::Preprocessor::preprocess(bool keepComments) // Call mcpp using memory buffer. // mcpp_use_mem_buffers(1); - mcpp_lib_main(static_cast(args.size()) + 1, argv); + mcpp_lib_main(static_cast(args.size()) + 1, const_cast(argv)); delete[] argv; // @@ -226,17 +227,17 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector(args.size() + 1), argv); + mcpp_lib_main(static_cast(args.size() + 1), const_cast(argv)); delete[] argv; // -- cgit v1.2.3