diff --git a/README.md b/README.md index 191a466..9c20777 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # rstudio +RStudio is an integrated development environment (IDE) for the R programming language. + diff --git a/rstudio-0.98.1103-fix_build_with_boost_1_57.patch b/rstudio-0.98.1103-fix_build_with_boost_1_57.patch new file mode 100644 index 0000000..d6c3e53 --- /dev/null +++ b/rstudio-0.98.1103-fix_build_with_boost_1_57.patch @@ -0,0 +1,14684 @@ +diff -ru rstudio-0.98.1103/src/cpp/core/Assert.cpp rstudio-0.98.1103-fix/src/cpp/core/Assert.cpp +--- rstudio-0.98.1103/src/cpp/core/Assert.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/Assert.cpp 2015-03-08 22:23:10.820944068 +0100 +@@ -37,7 +37,7 @@ + + // always log the failure + std::string msg = "ASSERTION FAILED: " + std::string(expr); +- core::log::logWarningMessage(msg, location); ++ ::core::log::logWarningMessage(msg, location); + + #ifndef NDEBUG + #ifdef _WIN32 +@@ -61,7 +61,7 @@ + // always log the failure + std::string message = "ASSERTION FAILED: " + std::string(expr) + + " - " + std::string(msg); +- core::log::logWarningMessage(message, location); ++ ::core::log::logWarningMessage(message, location); + + #ifndef NDEBUG + #ifdef _WIN32 +diff -ru rstudio-0.98.1103/src/cpp/core/Base64.cpp rstudio-0.98.1103-fix/src/cpp/core/Base64.cpp +--- rstudio-0.98.1103/src/cpp/core/Base64.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/Base64.cpp 2015-03-08 22:23:10.732944053 +0100 +@@ -61,7 +61,7 @@ + Error encode(const FilePath& inputFile, std::string* pOutput) + { + std::string contents; +- Error error = core::readStringFromFile(inputFile, &contents); ++ Error error = ::core::readStringFromFile(inputFile, &contents); + if (error) + return error; + +diff -ru rstudio-0.98.1103/src/cpp/core/dev/Main.cpp rstudio-0.98.1103-fix/src/cpp/core/dev/Main.cpp +--- rstudio-0.98.1103/src/cpp/core/dev/Main.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/dev/Main.cpp 2015-03-08 22:23:10.613944033 +0100 +@@ -32,14 +32,14 @@ + try + { + // setup log +- initializeStderrLog("coredev", core::system::kLogLevelWarning); ++ initializeStderrLog("coredev", ::core::system::kLogLevelWarning); + + // ignore sigpipe +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + +- using namespace core::r_util; ++ using namespace ::core::r_util; + + std::vector vers; + vers.push_back(RVersionNumber::parse("3.0")); +diff -ru rstudio-0.98.1103/src/cpp/core/FileLock.cpp rstudio-0.98.1103-fix/src/cpp/core/FileLock.cpp +--- rstudio-0.98.1103/src/cpp/core/FileLock.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/FileLock.cpp 2015-03-08 22:23:10.745944056 +0100 +@@ -90,7 +90,7 @@ + // make sure the lock file exists + if (!lockFilePath.exists()) + { +- Error error = core::writeStringToFile(lockFilePath, ""); ++ Error error = ::core::writeStringToFile(lockFilePath, ""); + if (error) + return error; + } +diff -ru rstudio-0.98.1103/src/cpp/core/FileLogWriter.cpp rstudio-0.98.1103-fix/src/cpp/core/FileLogWriter.cpp +--- rstudio-0.98.1103/src/cpp/core/FileLogWriter.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/FileLogWriter.cpp 2015-03-08 22:23:10.749944056 +0100 +@@ -36,7 +36,7 @@ + if (!logFile_.exists()) + { + // swallow errors -- we can't log so it doesn't matter +- core::appendToFile(logFile_, ""); ++ ::core::appendToFile(logFile_, ""); + } + } + +@@ -51,14 +51,14 @@ + } + } + +-void FileLogWriter::log(core::system::LogLevel logLevel, ++void FileLogWriter::log(::core::system::LogLevel logLevel, + const std::string& message) + { + log(programIdentity_, logLevel, message); + } + + void FileLogWriter::log(const std::string& programIdentity, +- core::system::LogLevel logLevel, ++ ::core::system::LogLevel logLevel, + const std::string& message) + { + if (logLevel > logLevel_) +@@ -67,7 +67,7 @@ + rotateLogFile(); + + // Swallow errors--we can't do anything anyway +- core::appendToFile(logFile_, formatLogEntry(programIdentity, message)); ++ ::core::appendToFile(logFile_, formatLogEntry(programIdentity, message)); + } + + +diff -ru rstudio-0.98.1103/src/cpp/core/FilePath.cpp rstudio-0.98.1103-fix/src/cpp/core/FilePath.cpp +--- rstudio-0.98.1103/src/cpp/core/FilePath.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/FilePath.cpp 2015-03-08 22:23:10.542944021 +0100 +@@ -159,7 +159,7 @@ + // take the user home path from the system + FilePath safePath = revertToPath; + if (!safePath.exists()) +- safePath = core::system::userHomePath(); ++ safePath = ::core::system::userHomePath(); + + Error error = safePath.makeCurrentPath(); + if (error) +@@ -1155,11 +1155,11 @@ + namespace { + void logError(path_t path, + const boost::filesystem::filesystem_error& e, +- const core::ErrorLocation& errorLocation) ++ const ::core::ErrorLocation& errorLocation) + { + Error error(e.code(), errorLocation) ; + addErrorProperties(path, &error) ; +- core::log::logError(error, errorLocation) ; ++ ::core::log::logError(error, errorLocation) ; + } + + void addErrorProperties(path_t path, Error* pError) +diff -ru rstudio-0.98.1103/src/cpp/core/FileSerializer.cpp rstudio-0.98.1103-fix/src/cpp/core/FileSerializer.cpp +--- rstudio-0.98.1103/src/cpp/core/FileSerializer.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/FileSerializer.cpp 2015-03-08 22:23:10.628944036 +0100 +@@ -34,7 +34,7 @@ + return pair.first + "=\"" + string_utils::jsonLiteralEscape(pair.second) + "\"" ; + } + +-Error writeStringMapToFile(const core::FilePath& filePath, ++Error writeStringMapToFile(const ::core::FilePath& filePath, + const std::map& map) + { + return writeCollectionToFile >( +@@ -74,7 +74,7 @@ + } + + +-Error readStringMapFromFile(const core::FilePath& filePath, ++Error readStringMapFromFile(const ::core::FilePath& filePath, + std::map* pMap) + { + return readCollectionFromFile >( +@@ -90,7 +90,7 @@ + } + + +-Error writeStringVectorToFile(const core::FilePath& filePath, ++Error writeStringVectorToFile(const ::core::FilePath& filePath, + const std::vector& vector) + { + return writeCollectionToFile >(filePath, +@@ -106,7 +106,7 @@ + return ReadCollectionAddLine ; + } + +-Error readStringVectorFromFile(const core::FilePath& filePath, ++Error readStringVectorFromFile(const ::core::FilePath& filePath, + std::vector* pVector, + bool trimAndIgnoreBlankLines) + { +diff -ru rstudio-0.98.1103/src/cpp/core/FileUtils.cpp rstudio-0.98.1103-fix/src/cpp/core/FileUtils.cpp +--- rstudio-0.98.1103/src/cpp/core/FileUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/FileUtils.cpp 2015-03-08 22:23:10.607944032 +0100 +@@ -27,7 +27,7 @@ + for (int i=0; i<100; i++) + { + // get a shortened uuid +- std::string shortentedUuid = core::system::generateShortenedUuid(); ++ std::string shortentedUuid = ::core::system::generateShortenedUuid(); + + // form full path + FilePath uniqueDir = parent.childPath(prefix + shortentedUuid); +@@ -38,7 +38,7 @@ + } + + // if we didn't succeed then return prefix + uuid +- return parent.childPath(prefix + core::system::generateUuid(false)); ++ return parent.childPath(prefix + ::core::system::generateUuid(false)); + } + + } // namespace file_utils +diff -ru rstudio-0.98.1103/src/cpp/core/gwt/GwtFileHandler.cpp rstudio-0.98.1103-fix/src/cpp/core/gwt/GwtFileHandler.cpp +--- rstudio-0.98.1103/src/cpp/core/gwt/GwtFileHandler.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/gwt/GwtFileHandler.cpp 2015-03-08 22:23:10.558944024 +0100 +@@ -45,7 +45,7 @@ + + // calculate "real" wwwPath + FilePath wwwRealPath; +- Error error = core::system::realPath(wwwLocalPath, &wwwRealPath); ++ Error error = ::core::system::realPath(wwwLocalPath, &wwwRealPath); + if (error) + { + LOG_ERROR(error); +@@ -55,7 +55,7 @@ + // calculate "real" requested path + FilePath realRequestedPath; + FilePath requestedPath = wwwRealPath.complete(relativePath); +- error = core::system::realPath(requestedPath.absolutePath(), ++ error = ::core::system::realPath(requestedPath.absolutePath(), + &realRequestedPath); + if (error) + { +@@ -91,7 +91,7 @@ + + void handleFileRequest(const std::string& wwwLocalPath, + const std::string& baseUri, +- core::http::UriFilterFunction mainPageFilter, ++ ::core::http::UriFilterFunction mainPageFilter, + const std::string& initJs, + bool useEmulatedStack, + const http::Request& request, +diff -ru rstudio-0.98.1103/src/cpp/core/gwt/GwtLogHandler.cpp rstudio-0.98.1103-fix/src/cpp/core/gwt/GwtLogHandler.cpp +--- rstudio-0.98.1103/src/cpp/core/gwt/GwtLogHandler.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/gwt/GwtLogHandler.cpp 2015-03-08 22:23:10.555944023 +0100 +@@ -172,7 +172,7 @@ + % log::cleanDelims(userAgent)); + + // log it +- core::system::log(core::system::kLogLevelError, logEntry); ++ ::core::system::log(::core::system::kLogLevelError, logEntry); + + + // set void result +@@ -196,7 +196,7 @@ + } + + // convert level to appropriate enum and str +- using namespace core::system; ++ using namespace ::core::system; + LogLevel logLevel; + std::string logLevelStr; + switch(level) +@@ -231,7 +231,7 @@ + + userAgent); + // log it +- core::system::log(logLevel, logEntry); ++ ::core::system::log(logLevel, logEntry); + + // set void result + json::setVoidJsonRpcResult(pResponse); +@@ -240,7 +240,7 @@ + + } // anonymous namespace + +-void initializeSymbolMaps(const core::FilePath& symbolMapsPath) ++void initializeSymbolMaps(const ::core::FilePath& symbolMapsPath) + { + // allocate this on the heap so that order of C++ static destruction + // issues don't cause a crash during shutdown +diff -ru rstudio-0.98.1103/src/cpp/core/HtmlUtils.cpp rstudio-0.98.1103-fix/src/cpp/core/HtmlUtils.cpp +--- rstudio-0.98.1103/src/cpp/core/HtmlUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/HtmlUtils.cpp 2015-03-08 22:23:10.778944061 +0100 +@@ -62,7 +62,7 @@ + boost::algorithm::starts_with(imagePath.mimeContentType(), "image/")) + { + std::string imageBase64; +- Error error = core::base64::encode(imagePath, &imageBase64); ++ Error error = ::core::base64::encode(imagePath, &imageBase64); + if (!error) + { + imgRef = "data:" + imagePath.mimeContentType() + ";base64,"; +@@ -97,7 +97,7 @@ + if (urlPath.exists() && (ext == ".ttf" || ext == ".otf")) + { + std::string fontBase64; +- Error error = core::base64::encode(urlPath, &fontBase64); ++ Error error = ::core::base64::encode(urlPath, &fontBase64); + if (!error) + { + // return base64 encoded font +diff -ru rstudio-0.98.1103/src/cpp/core/http/Response.cpp rstudio-0.98.1103-fix/src/cpp/core/http/Response.cpp +--- rstudio-0.98.1103/src/cpp/core/http/Response.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/http/Response.cpp 2015-03-08 22:23:10.589944029 +0100 +@@ -128,7 +128,7 @@ + const Request& request) + { + std::string content; +- Error error = core::readStringFromFile(filePath, &content); ++ Error error = ::core::readStringFromFile(filePath, &content); + if (error) + return error; + +@@ -155,7 +155,7 @@ + { + // read the file in from disk + std::string contents; +- Error error = core::readStringFromFile(filePath, &contents); ++ Error error = ::core::readStringFromFile(filePath, &contents); + if (error) + { + setError(error); +@@ -299,7 +299,7 @@ + + std::string Response::eTagForContent(const std::string& content) + { +- return core::hash::crc32Hash(content); ++ return ::core::hash::crc32Hash(content); + } + + void Response::appendFirstLineBuffers( +diff -ru rstudio-0.98.1103/src/cpp/core/http/SocketProxy.cpp rstudio-0.98.1103-fix/src/cpp/core/http/SocketProxy.cpp +--- rstudio-0.98.1103/src/cpp/core/http/SocketProxy.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/http/SocketProxy.cpp 2015-03-08 22:23:10.568944026 +0100 +@@ -145,13 +145,13 @@ + namespace { + + #ifndef _WIN32 +-bool isSslShutdownError(const core::Error& error) ++bool isSslShutdownError(const ::core::Error& error) + { + return error.code().category() == boost::asio::error::get_ssl_category() && + error.code().value() == ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ); + } + #else +-bool isSslShutdownError(const core::Error& error) ++bool isSslShutdownError(const ::core::Error& error) + { + return false; + } +@@ -159,7 +159,7 @@ + } // anonymous namespace + + void SocketProxy::handleError(const boost::system::error_code& e, +- const core::ErrorLocation& location) ++ const ::core::ErrorLocation& location) + { + // log the error if it wasn't connection terminated + Error error(e, location); +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/Error.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/Error.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/Error.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/Error.hpp 2015-03-08 22:23:10.835944071 +0100 +@@ -172,7 +172,7 @@ + + } // namespace core + +-#define ERROR_LOCATION core::ErrorLocation( \ ++#define ERROR_LOCATION ::core::ErrorLocation( \ + BOOST_CURRENT_FUNCTION,__FILE__,__LINE__) + + #define CATCH_UNEXPECTED_EXCEPTION \ +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/Exec.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/Exec.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/Exec.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/Exec.hpp 2015-03-08 22:23:11.054944108 +0100 +@@ -27,7 +27,7 @@ + class ExecBlock + { + public: +- typedef boost::function Function ; ++ typedef boost::function< ::core::Error()> Function ; + + public: + ExecBlock() {} +@@ -42,10 +42,10 @@ + EasyInit addFunctions() { return EasyInit(this); } + + // execute the block +- core::Error execute() const; ++ ::core::Error execute() const; + +- // allow an ExecBlock to act as a boost::function +- core::Error operator()() const; ++ // allow an ExecBlock to act as a boost::function< ::core::Error()> ++ ::core::Error operator()() const; + + public: + // easy init helper class +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/FileLogWriter.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/FileLogWriter.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/FileLogWriter.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/FileLogWriter.hpp 2015-03-08 22:23:10.833944071 +0100 +@@ -29,10 +29,10 @@ + const FilePath& logDir); + virtual ~FileLogWriter(); + +- virtual void log(core::system::LogLevel level, ++ virtual void log(::core::system::LogLevel level, + const std::string& message); + virtual void log(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message); + + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/FilePath.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/FilePath.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/FilePath.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/FilePath.hpp 2015-03-08 22:23:11.133944121 +0100 +@@ -49,7 +49,7 @@ + + static Error makeCurrent(const std::string& path); + +- static std::string createAliasedPath(const core::FilePath& path, ++ static std::string createAliasedPath(const ::core::FilePath& path, + const FilePath& userHomePath); + static FilePath resolveAliasedPath(const std::string& aliasedPath, + const FilePath& userHomePath) ; +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/FileSerializer.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/FileSerializer.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/FileSerializer.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/FileSerializer.hpp 2015-03-08 22:23:11.120944119 +0100 +@@ -37,7 +37,7 @@ + + template + Error writeCollectionToFile( +- const core::FilePath& filePath, ++ const ::core::FilePath& filePath, + const CollectionType& collection, + boost::function +@@ -86,7 +86,7 @@ + + template + Error readCollectionFromFile( +- const core::FilePath& filePath, ++ const ::core::FilePath& filePath, + CollectionType* pCollection, + boost::function +@@ -156,7 +156,7 @@ + } + + template +-Error appendToFile(const core::FilePath& filePath, ++Error appendToFile(const ::core::FilePath& filePath, + const ContentType& content) + { + using namespace boost::system::errc ; +@@ -189,7 +189,7 @@ + } + + template +-Error appendStructToFile(const core::FilePath& filePath, ++Error appendStructToFile(const ::core::FilePath& filePath, + const T& data) + { + using namespace boost::system::errc ; +@@ -222,7 +222,7 @@ + } + + template +-Error readStructVectorFromFile(const core::FilePath& filePath, ++Error readStructVectorFromFile(const ::core::FilePath& filePath, + std::vector* pVector) + { + using namespace boost::system::errc ; +@@ -266,26 +266,26 @@ + std::string stringifyString(const std::string& str); + + +-Error writeStringMapToFile(const core::FilePath& filePath, ++Error writeStringMapToFile(const ::core::FilePath& filePath, + const std::map& map) ; + +-Error readStringMapFromFile(const core::FilePath& filePath, ++Error readStringMapFromFile(const ::core::FilePath& filePath, + std::map* pMap) ; + +-Error writeStringVectorToFile(const core::FilePath& filePath, ++Error writeStringVectorToFile(const ::core::FilePath& filePath, + const std::vector& vector); + +-Error readStringVectorFromFile(const core::FilePath& filePath, ++Error readStringVectorFromFile(const ::core::FilePath& filePath, + std::vector* pVector, + bool trimAndIgnoreBlankLines=true); + + // lineEnding is the type of line ending you want to end up on disk +-Error writeStringToFile(const core::FilePath& filePath, ++Error writeStringToFile(const ::core::FilePath& filePath, + const std::string& str, + string_utils::LineEnding lineEnding=string_utils::LineEndingPassthrough); + + // lineEnding is the type of line ending you want the resulting string to have +-Error readStringFromFile(const core::FilePath& filePath, ++Error readStringFromFile(const ::core::FilePath& filePath, + std::string* pStr, + string_utils::LineEnding lineEnding=string_utils::LineEndingPassthrough, + int startLine = 0, +@@ -296,7 +296,7 @@ + // read a string from a file with a filter + template + Error readStringFromFile( +- const core::FilePath& filePath, ++ const ::core::FilePath& filePath, + const Filter& filter, + std::string* pContents, + string_utils::LineEnding lineEnding=string_utils::LineEndingPassthrough) +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/FileUtils.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/FileUtils.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/FileUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/FileUtils.hpp 2015-03-08 22:23:11.071944111 +0100 +@@ -26,7 +26,7 @@ + + namespace file_utils { + +-FilePath uniqueFilePath(const core::FilePath& parent, ++FilePath uniqueFilePath(const ::core::FilePath& parent, + const std::string& prefix = ""); + + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/gwt/GwtLogHandler.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/gwt/GwtLogHandler.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/gwt/GwtLogHandler.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/gwt/GwtLogHandler.hpp 2015-03-08 22:23:10.857944074 +0100 +@@ -30,7 +30,7 @@ + namespace gwt { + + +-void initializeSymbolMaps(const core::FilePath& symbolMapsPath); ++void initializeSymbolMaps(const ::core::FilePath& symbolMapsPath); + + void handleLogRequest(const std::string& username, + const http::Request& request, +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/AsyncClient.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/AsyncClient.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/AsyncClient.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/AsyncClient.hpp 2015-03-08 22:23:10.917944085 +0100 +@@ -56,7 +56,7 @@ + namespace http { + + typedef boost::function ResponseHandler; +-typedef boost::function ErrorHandler; ++typedef boost::function ErrorHandler; + + + template +@@ -136,7 +136,7 @@ + void close() + { + Error error = closeSocket(socket().lowest_layer()); +- if (error && !core::http::isConnectionTerminatedError(error)) ++ if (error && !::core::http::isConnectionTerminatedError(error)) + logError(error); + } + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/AsyncConnectionImpl.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/AsyncConnectionImpl.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/AsyncConnectionImpl.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/AsyncConnectionImpl.hpp 2015-03-08 22:23:10.884944079 +0100 +@@ -143,7 +143,7 @@ + virtual void close() + { + Error error = closeSocket(socket_); +- if (error && !core::http::isConnectionTerminatedError(error)) ++ if (error && !::core::http::isConnectionTerminatedError(error)) + LOG_ERROR(error); + } + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/AsyncServerImpl.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/AsyncServerImpl.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/AsyncServerImpl.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/AsyncServerImpl.hpp 2015-03-08 22:23:10.903944082 +0100 +@@ -156,7 +156,7 @@ + + // block all signals for the creation of the thread pool + // (prevents signals from occurring on any of the handler threads) +- core::system::SignalBlocker signalBlocker; ++ ::core::system::SignalBlocker signalBlocker; + Error error = signalBlocker.blockAll(); + if (error) + return error ; +@@ -410,23 +410,23 @@ + } + + void maybeAbortServer(const std::string& message, +- const core::ErrorLocation& location) ++ const ::core::ErrorLocation& location) + { + if (abortOnResourceError_) + { +- core::log::logErrorMessage("(ABORTING SERVER): " + message, location); ++ ::core::log::logErrorMessage("(ABORTING SERVER): " + message, location); + ::abort(); + } + else + { +- core::log::logWarningMessage( ++ ::core::log::logWarningMessage( + "Resource exhaustion error occurred (continuing to run)", + location); + } + } + + void checkForResourceExhaustion(const boost::system::error_code& ec, +- const core::ErrorLocation& location) ++ const ::core::ErrorLocation& location) + { + if ( ec.category() == boost::system::get_system_category() && + (ec.value() == boost::system::errc::too_many_files_open || +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp 2015-03-08 22:23:10.881944079 +0100 +@@ -97,7 +97,7 @@ + + private: + boost::asio::local::stream_protocol::socket socket_; +- core::FilePath localStreamPath_; ++ ::core::FilePath localStreamPath_; + }; + + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/LocalStreamAsyncServer.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/LocalStreamAsyncServer.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/LocalStreamAsyncServer.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/LocalStreamAsyncServer.hpp 2015-03-08 22:23:10.868944076 +0100 +@@ -32,7 +32,7 @@ + public: + LocalStreamAsyncServer(const std::string& serverName, + const std::string& baseUri, +- core::system::FileMode fileMode) ++ ::core::system::FileMode fileMode) + : AsyncServerImpl(serverName, baseUri), + fileMode_(fileMode) + { +@@ -60,7 +60,7 @@ + + + public: +- Error init(const core::FilePath& localStreamPath) ++ Error init(const ::core::FilePath& localStreamPath) + { + // set stream path + localStreamPath_ = localStreamPath; +@@ -86,8 +86,8 @@ + http::Request* pRequest) + { + // get peer identity +- core::system::user::UserIdentity peerIdentity; +- Error error = core::system::user::socketPeerIdentity(pSocket->native(), ++ ::core::system::user::UserIdentity peerIdentity; ++ Error error = ::core::system::user::socketPeerIdentity(pSocket->native(), + &peerIdentity); + if (error) + { +@@ -114,8 +114,8 @@ + } + + private: +- core::system::FileMode fileMode_; +- core::FilePath localStreamPath_; ++ ::core::system::FileMode fileMode_; ++ ::core::FilePath localStreamPath_; + + }; + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/LocalStreamSocketUtils.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/LocalStreamSocketUtils.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/LocalStreamSocketUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/LocalStreamSocketUtils.hpp 2015-03-08 22:23:10.914944084 +0100 +@@ -48,8 +48,8 @@ + + inline Error initLocalStreamAcceptor( + SocketAcceptorService& acceptorService, +- const core::FilePath& localStreamPath, +- core::system::FileMode fileMode) ++ const ::core::FilePath& localStreamPath, ++ ::core::system::FileMode fileMode) + { + // initialize endpoint + using boost::asio::local::stream_protocol; +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/SocketProxy.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/SocketProxy.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/SocketProxy.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/SocketProxy.hpp 2015-03-08 22:23:10.907944083 +0100 +@@ -32,8 +32,8 @@ + class SocketProxy : public boost::enable_shared_from_this + { + public: +- static void create(boost::shared_ptr ptrClient, +- boost::shared_ptr ptrServer) ++ static void create(boost::shared_ptr< ::core::http::Socket> ptrClient, ++ boost::shared_ptr< ::core::http::Socket> ptrServer) + { + boost::shared_ptr pProxy(new SocketProxy(ptrClient, + ptrServer)); +@@ -42,8 +42,8 @@ + } + + private: +- SocketProxy(boost::shared_ptr ptrClient, +- boost::shared_ptr ptrServer) ++ SocketProxy(boost::shared_ptr< ::core::http::Socket> ptrClient, ++ boost::shared_ptr< ::core::http::Socket> ptrServer) + : ptrClient_(ptrClient), ptrServer_(ptrServer) + { + } +@@ -60,13 +60,13 @@ + void handleServerWrite(const boost::system::error_code& e, + std::size_t bytesTransferred); + void handleError(const boost::system::error_code& e, +- const core::ErrorLocation& location); ++ const ::core::ErrorLocation& location); + + void close(); + + private: +- boost::shared_ptr ptrClient_; +- boost::shared_ptr ptrServer_; ++ boost::shared_ptr< ::core::http::Socket> ptrClient_; ++ boost::shared_ptr< ::core::http::Socket> ptrServer_; + boost::array clientBuffer_; + boost::array serverBuffer_; + boost::mutex socketMutex_; +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/SocketUtils.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/SocketUtils.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/SocketUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/SocketUtils.hpp 2015-03-08 22:23:10.888944080 +0100 +@@ -47,7 +47,7 @@ + return Success() ; + } + +-inline bool isConnectionTerminatedError(const core::Error& error) ++inline bool isConnectionTerminatedError(const ::core::Error& error) + { + // look for errors that indicate the client closing the connection + bool timedOut = error.code() == boost::asio::error::timed_out; +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp 2015-03-08 22:23:10.895944081 +0100 +@@ -48,7 +48,7 @@ + { + public: + typedef boost::function ConnectedHandler; +- typedef boost::function ErrorHandler; ++ typedef boost::function ErrorHandler; + + public: + TcpIpAsyncConnector(boost::asio::io_service& ioService, +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/json/JsonRpc.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/json/JsonRpc.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/json/JsonRpc.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/json/JsonRpc.hpp 2015-03-08 22:23:10.966944093 +0100 +@@ -62,7 +62,7 @@ + namespace boost { + namespace system { + template <> +-struct is_error_code_enum ++struct is_error_code_enum< ::core::json::errc::errc_t> + { static const bool value = true; }; + } // namespace system + } // namespace boost +@@ -157,12 +157,12 @@ + // + + +-inline core::Error readParam(const json::Array& params, ++inline ::core::Error readParam(const json::Array& params, + unsigned int index, + json::Value* pValue) + { + if (index >= params.size()) +- return core::Error(errc::ParamMissing, ERROR_LOCATION); ++ return ::core::Error(errc::ParamMissing, ERROR_LOCATION); + + *pValue = params[index] ; + return Success(); +@@ -172,10 +172,10 @@ + core::Error readParam(const json::Array& params, unsigned int index, T* pValue) + { + if (index >= params.size()) +- return core::Error(errc::ParamMissing, ERROR_LOCATION); ++ return ::core::Error(errc::ParamMissing, ERROR_LOCATION); + + if (!isType(params[index])) +- return core::Error(errc::ParamTypeMismatch, ERROR_LOCATION) ; ++ return ::core::Error(errc::ParamTypeMismatch, ERROR_LOCATION) ; + + *pValue = params[index].get_value(); + +@@ -191,7 +191,7 @@ + template + core::Error readParams(const json::Array& params, T1* pValue1, T2* pValue2) + { +- core::Error error = readParam(params, 0, pValue1) ; ++ ::core::Error error = readParam(params, 0, pValue1) ; + if (error) + return error ; + +@@ -204,7 +204,7 @@ + T2* pValue2, + T3* pValue3) + { +- core::Error error = readParams(params, pValue1, pValue2) ; ++ ::core::Error error = readParams(params, pValue1, pValue2) ; + if (error) + return error ; + +@@ -218,7 +218,7 @@ + T3* pValue3, + T4* pValue4) + { +- core::Error error = readParams(params, pValue1, pValue2, pValue3) ; ++ ::core::Error error = readParams(params, pValue1, pValue2, pValue3) ; + if (error) + return error ; + +@@ -234,7 +234,7 @@ + T4* pValue4, + T5* pValue5) + { +- core::Error error = readParams(params, pValue1, pValue2, pValue3, pValue4) ; ++ ::core::Error error = readParams(params, pValue1, pValue2, pValue3, pValue4) ; + if (error) + return error ; + +@@ -251,7 +251,7 @@ + T5* pValue5, + T6* pValue6) + { +- core::Error error = readParams(params, ++ ::core::Error error = readParams(params, + pValue1, + pValue2, + pValue3, +@@ -274,7 +274,7 @@ + T6* pValue6, + T7* pValue7) + { +- core::Error error = readParams(params, ++ ::core::Error error = readParams(params, + pValue1, + pValue2, + pValue3, +@@ -299,7 +299,7 @@ + T7* pValue7, + T8* pValue8) + { +- core::Error error = readParams(params, ++ ::core::Error error = readParams(params, + pValue1, + pValue2, + pValue3, +@@ -326,7 +326,7 @@ + T8* pValue8, + T9* pValue9) + { +- core::Error error = readParams(params, ++ ::core::Error error = readParams(params, + pValue1, + pValue2, + pValue3, +@@ -355,7 +355,7 @@ + T9* pValue9, + T10* pValue10) + { +- core::Error error = readParams(params, ++ ::core::Error error = readParams(params, + pValue1, + pValue2, + pValue3, +@@ -386,7 +386,7 @@ + T10* pValue10, + T11* pValue11) + { +- core::Error error = readParams(params, ++ ::core::Error error = readParams(params, + pValue1, + pValue2, + pValue3, +@@ -914,9 +914,9 @@ + return response_[kRpcResult]; + } + +- void setError(const core::Error& error); ++ void setError(const ::core::Error& error); + +- void setError(const core::Error& error, const json::Value& clientInfo); ++ void setError(const ::core::Error& error, const json::Value& clientInfo); + + void setError(const boost::system::error_code& ec); + +@@ -983,7 +983,7 @@ + } + + template +-void setJsonRpcError(const T& error, core::http::Response* pResponse) ++void setJsonRpcError(const T& error, ::core::http::Response* pResponse) + { + JsonRpcResponse jsonRpcResponse ; + jsonRpcResponse.setError(error); +@@ -992,9 +992,9 @@ + + + // convenience typedefs for managing a map of json rpc functions +-typedef boost::function ++typedef boost::function< ::core::Error(const ::core::json::JsonRpcRequest&, ::core::json::JsonRpcResponse*)> + JsonRpcFunction ; +-typedef std::pair ++typedef std::pair + JsonRpcMethod ; + typedef boost::unordered_map + JsonRpcMethods; +@@ -1009,9 +1009,9 @@ + + // JsonRpcFunctionContinuation is what a JsonRpcAsyncFunction needs to call + // when its work is complete +-typedef boost::function ++typedef boost::function + JsonRpcFunctionContinuation ; +-typedef boost::function ++typedef boost::function + JsonRpcAsyncFunction ; + // The bool in the next two typedefs specifies whether the function wants the + // HTTP connection to stay open until the method finishes executing (direct return), +@@ -1020,7 +1020,7 @@ + // return). Direct return provides lower latency for short operations, and indirect + // return must be used for longer-running operations to prevent the browser from + // being starved of available HTTP connections to the server. +-typedef std::pair > ++typedef std::pair > + JsonRpcAsyncMethod ; + typedef boost::unordered_map > + JsonRpcAsyncMethods ; +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/Log.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/Log.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/Log.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/Log.hpp 2015-03-08 22:23:11.128944120 +0100 +@@ -49,18 +49,18 @@ + // Macros for automatic inclusion of ERROR_LOCATION and easy ability to + // compile out logging calls + +-#define LOG_ERROR(error) core::log::logError(error, ERROR_LOCATION) ++#define LOG_ERROR(error) ::core::log::logError(error, ERROR_LOCATION) + +-#define LOG_ERROR_MESSAGE(message) core::log::logErrorMessage(message, \ ++#define LOG_ERROR_MESSAGE(message) ::core::log::logErrorMessage(message, \ + ERROR_LOCATION) + +-#define LOG_WARNING_MESSAGE(message) core::log::logWarningMessage( \ ++#define LOG_WARNING_MESSAGE(message) ::core::log::logWarningMessage( \ + message, \ + ERROR_LOCATION) + +-#define LOG_INFO_MESSAGE(message) core::log::logInfoMessage(message) ++#define LOG_INFO_MESSAGE(message) ::core::log::logInfoMessage(message) + +-#define LOG_DEBUG_MESSAGE(message) core::log::logDebugMessage(message) ++#define LOG_DEBUG_MESSAGE(message) ::core::log::logDebugMessage(message) + + #endif // CORE_LOG_HPP + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/LogWriter.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/LogWriter.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/LogWriter.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/LogWriter.hpp 2015-03-08 22:23:11.046944107 +0100 +@@ -25,11 +25,11 @@ + public: + virtual ~LogWriter() {} + +- virtual void log(core::system::LogLevel level, ++ virtual void log(::core::system::LogLevel level, + const std::string& message) = 0; + + virtual void log(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message) = 0; + + // for subclasses that can do automatic chaining to stderr +@@ -47,7 +47,7 @@ + + void setLogToStderr(bool logToStderr); + +-void addLogWriter(boost::shared_ptr pLogWriter); ++void addLogWriter(boost::shared_ptr< ::core::LogWriter> pLogWriter); + + } // namespace system + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/PerformanceTimer.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/PerformanceTimer.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/PerformanceTimer.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/PerformanceTimer.hpp 2015-03-08 22:23:11.082944113 +0100 +@@ -58,7 +58,7 @@ + + } // namespace core + +-#define TIME_FUNCTION core::PerformanceTimer t(BOOST_CURRENT_FUNCTION); ++#define TIME_FUNCTION ::core::PerformanceTimer t(BOOST_CURRENT_FUNCTION); + + #endif // CORE_PERFORMANCE_TIMER_HPP + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/r_util/REnvironment.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/REnvironment.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/r_util/REnvironment.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/REnvironment.hpp 2015-03-08 22:23:11.093944115 +0100 +@@ -40,7 +40,7 @@ + + void setREnvironmentVars(const EnvironmentVars& vars); + void setREnvironmentVars(const EnvironmentVars& vars, +- core::system::Options* pEnv); ++ ::core::system::Options* pEnv); + + std::string rLibraryPath(const FilePath& rHomePath, + const FilePath& rLibPath, +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/r_util/RSessionLaunchProfile.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RSessionLaunchProfile.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/r_util/RSessionLaunchProfile.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RSessionLaunchProfile.hpp 2015-03-08 22:23:11.111944118 +0100 +@@ -30,7 +30,7 @@ + std::string username; + std::string password; + std::string executablePath; +- core::system::ProcessConfig config; ++ ::core::system::ProcessConfig config; + }; + + json::Object sessionLaunchProfileToJson(const SessionLaunchProfile& profile); +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/r_util/RSourceIndex.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RSourceIndex.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/r_util/RSourceIndex.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RSourceIndex.hpp 2015-03-08 22:23:11.091944114 +0100 +@@ -120,8 +120,8 @@ + const std::string& name() const { return name_; } + const std::vector& signature() const { return signature_; } + const int braceLevel() const { return braceLevel_; } +- int line() const { return core::safe_convert::numberTo(line_,0); } +- int column() const { return core::safe_convert::numberTo(column_,0); } ++ int line() const { return ::core::safe_convert::numberTo(line_,0); } ++ int column() const { return ::core::safe_convert::numberTo(column_,0); } + + // support for RSourceIndex::search + +@@ -192,7 +192,7 @@ + OutputIterator out) const + { + // perform the copy and transform to include context +- core::algorithm::copy_transformed_if( ++ ::core::algorithm::copy_transformed_if( + items_.begin(), + items_.end(), + out, +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/r_util/RToolsInfo.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RToolsInfo.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/r_util/RToolsInfo.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RToolsInfo.hpp 2015-03-08 22:23:11.108944117 +0100 +@@ -68,7 +68,7 @@ + { + std::string path = it->absolutePath(); + boost::algorithm::replace_all(path, "/", "\\"); +- core::system::addToPath(pTarget, path, true); ++ ::core::system::addToPath(pTarget, path, true); + } + } + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/r_util/RVersionsPosix.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RVersionsPosix.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/r_util/RVersionsPosix.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/r_util/RVersionsPosix.hpp 2015-03-08 22:23:11.103944116 +0100 +@@ -33,11 +33,11 @@ + RVersion() : isDefault(false) {} + bool isDefault; + std::string number; +- core::system::Options environment; ++ ::core::system::Options environment; + + FilePath homeDir() const + { +- return FilePath(core::system::getenv(environment, "R_HOME")); ++ return FilePath(::core::system::getenv(environment, "R_HOME")); + } + }; + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/spelling/HunspellCustomDictionaries.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/spelling/HunspellCustomDictionaries.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/spelling/HunspellCustomDictionaries.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/spelling/HunspellCustomDictionaries.hpp 2015-03-08 22:23:11.037944105 +0100 +@@ -48,7 +48,7 @@ + Error remove(const std::string& name) const; + + private: +- core::FilePath customDictionariesDir_; ++ ::core::FilePath customDictionariesDir_; + }; + + } // namespace spelling +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/spelling/HunspellDictionaryManager.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/spelling/HunspellDictionaryManager.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/spelling/HunspellDictionaryManager.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/spelling/HunspellDictionaryManager.hpp 2015-03-08 22:23:11.039944105 +0100 +@@ -83,7 +83,7 @@ + + bool allLanguagesInstalled() const { return allLanguagesDir().exists(); } + +- core::Error availableLanguages( ++ ::core::Error availableLanguages( + std::vector* pDictionaries) const; + + HunspellDictionary dictionaryForLanguageId(const std::string& langId) const; +@@ -91,12 +91,12 @@ + const HunspellCustomDictionaries& custom() const; + + private: +- core::FilePath allLanguagesDir() const; +- core::FilePath userLanguagesDir() const; ++ ::core::FilePath allLanguagesDir() const; ++ ::core::FilePath userLanguagesDir() const; + + private: +- core::FilePath coreLanguagesDir_; +- core::FilePath userDir_; ++ ::core::FilePath coreLanguagesDir_; ++ ::core::FilePath userDir_; + HunspellCustomDictionaries customDicts_; + }; + +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/spelling/HunspellSpellingEngine.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/spelling/HunspellSpellingEngine.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/spelling/HunspellSpellingEngine.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/spelling/HunspellSpellingEngine.hpp 2015-03-08 22:23:11.044944106 +0100 +@@ -29,7 +29,7 @@ + + namespace spelling { + +-typedef boost::function&)> onRegistered; + + // callback which occurs if a registration error occurs +- boost::function onRegistrationError; ++ boost::function onRegistrationError; + + // callback which occurs if an error occurs during monitoring (the + // monitor is automatically unregistered if a monitoring error occurs) +- boost::function onMonitoringError; ++ boost::function onMonitoringError; + + // callback which occurs when files change + boost::function&)> onFilesChanged; +@@ -115,7 +115,7 @@ + // guarantee that the deletion of your shared_ptr object is invoked on the same + // thread that called registerMonitor you should also bind a function to + // onUnregistered (otherwise the delete will occur on the file monitoring thread) +-void registerMonitor(const core::FilePath& filePath, ++void registerMonitor(const ::core::FilePath& filePath, + bool recursive, + const boost::function& filter, + const Callbacks& callbacks); +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/system/PosixSystem.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/system/PosixSystem.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/system/PosixSystem.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/system/PosixSystem.hpp 2015-03-08 22:23:11.009944100 +0100 +@@ -151,8 +151,8 @@ + : stdStreamBehavior(StdStreamInherit) + { + } +- core::system::Options args; +- core::system::Options environment; ++ ::core::system::Options args; ++ ::core::system::Options environment; + std::string stdInput; + StdStreamBehavior stdStreamBehavior; + ProcessLimits limits; +@@ -165,7 +165,7 @@ + ProcessConfig config, + PidType* pProcessId ) ; + +-bool isUserNotFoundError(const core::Error& error); ++bool isUserNotFoundError(const ::core::Error& error); + + core::Error userBelongsToGroup(const user::User& user, + const std::string& groupName, +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/system/Process.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/system/Process.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/system/Process.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/system/Process.hpp 2015-03-08 22:23:11.020944102 +0100 +@@ -110,14 +110,14 @@ + // (respectively) should be redirected to. Note that this ONLY works + // if you use runCommand, not runProgram, as we use the shell to do + // the redirection. +- core::FilePath stdOutFile; +- core::FilePath stdErrFile; ++ ::core::FilePath stdOutFile; ++ ::core::FilePath stdErrFile; + + // function to run within the child process immediately after the fork + // NOTE: only supported on posix as there is no fork on Win32 + boost::function onAfterFork; + +- core::FilePath workingDir; ++ ::core::FilePath workingDir; + }; + + // Struct for returning output and exit status from a process +@@ -245,7 +245,7 @@ + const std::string& input, + const boost::function& onCompleted, + const boost::function& onError= +- boost::function()); ++ boost::function()); + + // Process supervisor + class ProcessSupervisor : boost::noncopyable +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/system/RegistryKey.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/system/RegistryKey.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/system/RegistryKey.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/system/RegistryKey.hpp 2015-03-08 22:23:11.004944099 +0100 +@@ -37,12 +37,12 @@ + RegistryKey(); + virtual ~RegistryKey(); + +- core::Error open(HKEY hKey, std::string subKey, REGSAM samDesired); ++ ::core::Error open(HKEY hKey, std::string subKey, REGSAM samDesired); + bool isOpen(); + + HKEY handle(); + +- core::Error getStringValue(std::string name, std::string* pValue); ++ ::core::Error getStringValue(std::string name, std::string* pValue); + std::string getStringValue(std::string name, std::string defaultValue); + + std::vector keyNames(); +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/system/ShellUtils.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/system/ShellUtils.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/system/ShellUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/system/ShellUtils.hpp 2015-03-08 22:23:10.995944098 +0100 +@@ -53,7 +53,7 @@ + class ShellCommand + { + public: +- explicit ShellCommand(const core::FilePath& filePath) ++ explicit ShellCommand(const ::core::FilePath& filePath) + : escapeMode_(EscapeAll) + { + output_ = escape(string_utils::utf8ToSystem(filePath.absolutePath())); +diff -ru rstudio-0.98.1103/src/cpp/core/include/core/Trace.hpp rstudio-0.98.1103-fix/src/cpp/core/include/core/Trace.hpp +--- rstudio-0.98.1103/src/cpp/core/include/core/Trace.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/include/core/Trace.hpp 2015-03-08 22:23:11.050944107 +0100 +@@ -30,7 +30,7 @@ + } // namespace core + + #define TRACE_CURRENT_METHOD \ +- core::trace::add(this, BOOST_CURRENT_FUNCTION); ++ ::core::trace::add(this, BOOST_CURRENT_FUNCTION); + + #endif // CORE_PERFORMANCE_TIMER_HPP + +diff -ru rstudio-0.98.1103/src/cpp/core/json/JsonRpc.cpp rstudio-0.98.1103-fix/src/cpp/core/json/JsonRpc.cpp +--- rstudio-0.98.1103/src/cpp/core/json/JsonRpc.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/json/JsonRpc.cpp 2015-03-08 22:23:10.625944035 +0100 +@@ -242,8 +242,8 @@ + setField(kRpcAsyncHandle, handle); + } + +-void setJsonRpcResponse(const core::json::JsonRpcResponse& jsonRpcResponse, +- core::http::Response* pResponse) ++void setJsonRpcResponse(const ::core::json::JsonRpcResponse& jsonRpcResponse, ++ ::core::http::Response* pResponse) + { + // no cache! + pResponse->setNoCacheHeaders(); +@@ -349,13 +349,13 @@ + namespace { + + void runSynchronousFunction(const JsonRpcFunction& func, +- const core::json::JsonRpcRequest& request, ++ const ::core::json::JsonRpcRequest& request, + const JsonRpcFunctionContinuation& continuation) + { +- core::json::JsonRpcResponse response; ++ ::core::json::JsonRpcResponse response; + if (request.isBackgroundConnection) + response.setSuppressDetectChanges(true); +- core::Error error = func(request, &response); ++ ::core::Error error = func(request, &response); + continuation(error, &response); + } + +diff -ru rstudio-0.98.1103/src/cpp/core/markdown/Markdown.cpp rstudio-0.98.1103-fix/src/cpp/core/markdown/Markdown.cpp +--- rstudio-0.98.1103/src/cpp/core/markdown/Markdown.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/markdown/Markdown.cpp 2015-03-08 22:23:10.597944031 +0100 +@@ -321,7 +321,7 @@ + if (error) + return error; + +- return core::writeStringToFile(htmlFile, ++ return ::core::writeStringToFile(htmlFile, + markdownOutput, + string_utils::LineEndingNative); + } +@@ -333,7 +333,7 @@ + std::string* pHTMLOutput) + { + std::string markdownInput; +- Error error = core::readStringFromFile(markdownFile, ++ Error error = ::core::readStringFromFile(markdownFile, + &markdownInput, + string_utils::LineEndingPosix); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/core/markdown/MathJax.cpp rstudio-0.98.1103-fix/src/cpp/core/markdown/MathJax.cpp +--- rstudio-0.98.1103/src/cpp/core/markdown/MathJax.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/markdown/MathJax.cpp 2015-03-08 22:23:10.600944031 +0100 +@@ -228,7 +228,7 @@ + } + else + { +- std::string guid = core::system::generateUuid(false); ++ std::string guid = ::core::system::generateUuid(false); + std::string suffix = (match.size() > 2) ? std::string(match[2]) : ""; + pMathBlocks->insert(std::make_pair(guid, MathBlock(equation,suffix))); + return guid; +diff -ru rstudio-0.98.1103/src/cpp/core/ProgramOptions.cpp rstudio-0.98.1103-fix/src/cpp/core/ProgramOptions.cpp +--- rstudio-0.98.1103/src/cpp/core/ProgramOptions.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/ProgramOptions.cpp 2015-03-08 22:23:10.752944057 +0100 +@@ -60,19 +60,19 @@ + + void reportError(const std::string& errorMessage, const ErrorLocation& location) + { +- if (core::system::stderrIsTerminal()) ++ if (::core::system::stderrIsTerminal()) + std::cerr << errorMessage << std::endl; + else +- core::log::logErrorMessage(errorMessage, location); ++ ::core::log::logErrorMessage(errorMessage, location); + } + + void reportWarnings(const std::string& warningMessages, + const ErrorLocation& location) + { +- if (core::system::stderrIsTerminal()) ++ if (::core::system::stderrIsTerminal()) + std::cerr << "WARNINGS: " << warningMessages << std::endl; + else +- core::log::logWarningMessage(warningMessages, location); ++ ::core::log::logWarningMessage(warningMessages, location); + } + + +diff -ru rstudio-0.98.1103/src/cpp/core/r_util/REnvironmentPosix.cpp rstudio-0.98.1103-fix/src/cpp/core/r_util/REnvironmentPosix.cpp +--- rstudio-0.98.1103/src/cpp/core/r_util/REnvironmentPosix.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/r_util/REnvironmentPosix.cpp 2015-03-08 22:23:10.814944067 +0100 +@@ -49,7 +49,7 @@ + if (rScriptPath.exists() && !rScriptPath.isDirectory()) + { + // verify that the alias points to a real version of R +- Error error = core::system::realPath(*it, &rScriptPath); ++ Error error = ::core::system::realPath(*it, &rScriptPath); + if (!error) + { + return rScriptPath; +@@ -192,7 +192,7 @@ + // run script to capture paths + std::string command = ldPathsScript.absolutePath() + " " + rHome; + system::ProcessResult result; +- Error error = runCommand(command, core::system::ProcessOptions(), &result); ++ Error error = runCommand(command, ::core::system::ProcessOptions(), &result); + if (error) + LOG_ERROR(error); + std::string libraryPaths = result.stdOut; +@@ -204,8 +204,8 @@ + { + // ask system which R to use + system::ProcessResult result; +- Error error = core::system::runCommand("which R", +- core::system::ProcessOptions(), ++ Error error = ::core::system::runCommand("which R", ++ ::core::system::ProcessOptions(), + &result); + std::string whichR = result.stdOut; + boost::algorithm::trim(whichR); +@@ -255,12 +255,12 @@ + // (the normal semantics of invoking the R script are that it overwrites + // R_HOME and prints a warning -- this warning is co-mingled with the + // output of "R RHOME" and messes up our parsing) +- core::system::setenv("R_HOME", ""); ++ ::core::system::setenv("R_HOME", ""); + + // run R script to detect R home + std::string command = rScriptPath.absolutePath() + " RHOME"; + system::ProcessResult result; +- Error error = runCommand(command, core::system::ProcessOptions(), &result); ++ Error error = runCommand(command, ::core::system::ProcessOptions(), &result); + if (error) + { + *pErrMsg = "Error running R (" + rScriptPath.absolutePath() + "): " + +@@ -288,7 +288,7 @@ + { + // get realpath + FilePath rBinaryPath; +- Error error = core::system::realPath(rScriptPath, &rBinaryPath); ++ Error error = ::core::system::realPath(rScriptPath, &rBinaryPath); + if (error) + { + *pErrMsg = "Unable to determine real path of R script " + +@@ -461,7 +461,7 @@ + // (the normal semantics of invoking the R script are that it overwrites + // R_HOME and prints a warning -- this warning is co-mingled with the + // output of R and messes up our parsing) +- core::system::setenv("R_HOME", ""); ++ ::core::system::setenv("R_HOME", ""); + + // call R to determine the locations + std::string command = rScriptPath + +@@ -692,18 +692,18 @@ + it != vars.end(); + ++it) + { +- core::system::setenv(it->first, it->second); ++ ::core::system::setenv(it->first, it->second); + } + } + + void setREnvironmentVars(const EnvironmentVars& vars, +- core::system::Options* pEnv) ++ ::core::system::Options* pEnv) + { + for (EnvironmentVars::const_iterator it = vars.begin(); + it != vars.end(); + ++it) + { +- core::system::setenv(pEnv, it->first, it->second); ++ ::core::system::setenv(pEnv, it->first, it->second); + } + } + +@@ -713,7 +713,7 @@ + const std::string& ldLibraryPath) + { + // determine library path (existing + r lib dir + r extra lib dirs) +- std::string libraryPath = core::system::getenv(kLibraryPathEnvVariable); ++ std::string libraryPath = ::core::system::getenv(kLibraryPathEnvVariable); + #ifdef __APPLE__ + // if this isn't set explicitly then initalize it with the default + // of $HOME/lib:/usr/local/lib:/usr/lib. See documentation here: +@@ -721,7 +721,7 @@ + if (libraryPath.empty()) + { + boost::format fmt("%1%/lib:/usr/local/lib:/usr/lib"); +- libraryPath = boost::str(fmt % core::system::getenv("HOME")); ++ libraryPath = boost::str(fmt % ::core::system::getenv("HOME")); + } + #endif + if (!libraryPath.empty()) +@@ -742,13 +742,13 @@ + std::string* pVersion) + { + // determine the R version +- core::system::ProcessOptions options; +- core::system::Options env; +- core::system::environment(&env); +- core::system::setenv(&env, "R_HOME", rHomePath.absolutePath()); ++ ::core::system::ProcessOptions options; ++ ::core::system::Options env; ++ ::core::system::environment(&env); ++ ::core::system::setenv(&env, "R_HOME", rHomePath.absolutePath()); + options.environment = env; +- core::system::ProcessResult result; +- Error error = core::system::runCommand(rScriptPath.absolutePath() + ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand(rScriptPath.absolutePath() + + " --slave --vanilla --version", + options, + &result); +diff -ru rstudio-0.98.1103/src/cpp/core/r_util/RPackageInfo.cpp rstudio-0.98.1103-fix/src/cpp/core/r_util/RPackageInfo.cpp +--- rstudio-0.98.1103/src/cpp/core/r_util/RPackageInfo.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/r_util/RPackageInfo.cpp 2015-03-08 22:23:10.796944064 +0100 +@@ -46,7 +46,7 @@ + // parse DCF file + FilePath descFilePath = packageDir.childPath("DESCRIPTION"); + if (!descFilePath.exists()) +- return core::fileNotFoundError(descFilePath, ERROR_LOCATION); ++ return ::core::fileNotFoundError(descFilePath, ERROR_LOCATION); + std::string errMsg; + std::map fields; + Error error = text::parseDcfFile(descFilePath, true, &fields, &errMsg); +diff -ru rstudio-0.98.1103/src/cpp/core/r_util/RSessionContext.cpp rstudio-0.98.1103-fix/src/cpp/core/r_util/RSessionContext.cpp +--- rstudio-0.98.1103/src/cpp/core/r_util/RSessionContext.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/r_util/RSessionContext.cpp 2015-03-08 22:23:10.794944064 +0100 +@@ -44,7 +44,7 @@ + if (!homePath.empty()) + dirs.homePath = homePath; + else +- dirs.homePath = core::system::userHomePath("R_USER|HOME").absolutePath(); ++ dirs.homePath = ::core::system::userHomePath("R_USER|HOME").absolutePath(); + + // compute user scratch path + std::string scratchPathName; +@@ -53,7 +53,7 @@ + else + scratchPathName = "RStudio"; + +- dirs.scratchPath = core::system::userSettingsPath( ++ dirs.scratchPath = ::core::system::userSettingsPath( + FilePath(dirs.homePath), + scratchPathName).absolutePath(); + +@@ -77,7 +77,7 @@ + if (readPath.exists()) + { + std::string value; +- Error error = core::readStringFromFile(readPath, &value); ++ Error error = ::core::readStringFromFile(readPath, &value); + if (error) + { + LOG_ERROR(error); +@@ -97,7 +97,7 @@ + const std::string& value) + { + FilePath writePath = settingsPath.complete(settingName); +- Error error = core::writeStringToFile(writePath, value); ++ Error error = ::core::writeStringToFile(writePath, value); + if (error) + LOG_ERROR(error); + } +@@ -122,12 +122,12 @@ + kLastProjectPath); + + // read environment variables derived from startup file associations +- std::string initialProjPath = core::system::getenv(kRStudioInitialProject); +- std::string initialWDPath = core::system::getenv(kRStudioInitialWorkingDir); ++ std::string initialProjPath = ::core::system::getenv(kRStudioInitialProject); ++ std::string initialWDPath = ::core::system::getenv(kRStudioInitialWorkingDir); + + // read the always restore last project user setting + bool alwaysRestoreLastProject = false; +- core::Settings uSettings; ++ ::core::Settings uSettings; + FilePath userSettingsPath = userScratchPath.childPath(kUserSettings); + Error error = uSettings.initialize(userSettingsPath); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/core/r_util/RSessionLaunchProfile.cpp rstudio-0.98.1103-fix/src/cpp/core/r_util/RSessionLaunchProfile.cpp +--- rstudio-0.98.1103/src/cpp/core/r_util/RSessionLaunchProfile.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/r_util/RSessionLaunchProfile.cpp 2015-03-08 22:23:10.804944066 +0100 +@@ -28,10 +28,10 @@ + + namespace { + +-json::Object optionsAsJson(const core::system::Options& options) ++json::Object optionsAsJson(const ::core::system::Options& options) + { + json::Object optionsJson; +- BOOST_FOREACH(const core::system::Option& option, options) ++ BOOST_FOREACH(const ::core::system::Option& option, options) + { + optionsJson[option.first] = option.second; + } +@@ -40,7 +40,7 @@ + + core::system::Options optionsFromJson(const json::Object& optionsJson) + { +- core::system::Options options; ++ ::core::system::Options options; + BOOST_FOREACH(const json::Member& member, optionsJson) + { + std::string name = member.first; +@@ -52,7 +52,7 @@ + } + + Error cpuAffinityFromJson(const json::Array& affinityJson, +- core::system::CpuAffinity* pAffinity) ++ ::core::system::CpuAffinity* pAffinity) + { + pAffinity->clear(); + +@@ -138,7 +138,7 @@ + LOG_ERROR(error); + + // read and convert cpu affinity +- core::system::CpuAffinity cpuAffinity; ++ ::core::system::CpuAffinity cpuAffinity; + json::Array cpuAffinityJson; + error = json::readObject(configJson, + "cpuAffinity", &cpuAffinityJson); +@@ -156,7 +156,7 @@ + profile.config.environment = optionsFromJson(envJson); + profile.config.stdInput = stdInput; + profile.config.stdStreamBehavior = +- static_cast(stdStreamBehavior); ++ static_cast< ::core::system::StdStreamBehavior>(stdStreamBehavior); + profile.config.limits.priority = priority; + profile.config.limits.memoryLimitBytes = memoryLimitBytes; + profile.config.limits.stackLimitBytes = stackLimitBytes; +diff -ru rstudio-0.98.1103/src/cpp/core/r_util/RToolsInfo.cpp rstudio-0.98.1103-fix/src/cpp/core/r_util/RToolsInfo.cpp +--- rstudio-0.98.1103/src/cpp/core/r_util/RToolsInfo.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/r_util/RToolsInfo.cpp 2015-03-08 22:23:10.788944063 +0100 +@@ -121,7 +121,7 @@ + { + // strip period from name + std::string ver = boost::algorithm::replace_all_copy(name(), ".", ""); +- std::string url = core::http::URL::complete( ++ std::string url = ::core::http::URL::complete( + repos, "bin/windows/Rtools/Rtools" + ver + ".exe"); + return url; + } +@@ -139,7 +139,7 @@ + + Error scanRegistryForRTools(std::vector* pRTools) + { +- core::system::RegistryKey regKey; ++ ::core::system::RegistryKey regKey; + Error error = regKey.open(HKEY_LOCAL_MACHINE, + "Software\\R-core\\Rtools", + KEY_READ | KEY_WOW64_32KEY); +@@ -155,7 +155,7 @@ + for (int i = 0; i < keys.size(); i++) + { + std::string name = keys.at(i); +- core::system::RegistryKey verKey; ++ ::core::system::RegistryKey verKey; + error = verKey.open(regKey.handle(), + name, + KEY_READ | KEY_WOW64_32KEY); +diff -ru rstudio-0.98.1103/src/cpp/core/r_util/RVersionsPosix.cpp rstudio-0.98.1103-fix/src/cpp/core/r_util/RVersionsPosix.cpp +--- rstudio-0.98.1103/src/cpp/core/r_util/RVersionsPosix.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/r_util/RVersionsPosix.cpp 2015-03-08 22:23:10.801944065 +0100 +@@ -57,7 +57,7 @@ + os << " [default]"; + os << std::endl; + os << version.homeDir() << std::endl; +- BOOST_FOREACH(const core::system::Option& option, version.environment) ++ BOOST_FOREACH(const ::core::system::Option& option, version.environment) + { + os << option.first << "=" << option.second << std::endl; + } +@@ -113,7 +113,7 @@ + BOOST_FOREACH(const FilePath& rScriptPath, rScriptPaths) + { + std::string rDiscoveredScriptPath, rVersion, errMsg; +- core::system::Options env; ++ ::core::system::Options env; + if (detectREnvironment(rScriptPath, + ldPathsScript, + ldLibraryPath, +@@ -147,27 +147,27 @@ + { + if (!versionPath.isHidden() && (versionPath.filename() != "Current")) + { +- using namespace core::system; +- core::system::Options env; ++ using namespace ::core::system; ++ ::core::system::Options env; + FilePath rHomePath = versionPath.childPath("Resources"); + FilePath rLibPath = rHomePath.childPath("lib"); +- core::system::setenv(&env, "R_HOME", rHomePath.absolutePath()); +- core::system::setenv(&env, ++ ::core::system::setenv(&env, "R_HOME", rHomePath.absolutePath()); ++ ::core::system::setenv(&env, + "R_SHARE_DIR", + rHomePath.childPath("share").absolutePath()); +- core::system::setenv(&env, ++ ::core::system::setenv(&env, + "R_INCLUDE_DIR", + rHomePath.childPath("include").absolutePath()); +- core::system::setenv(&env, ++ ::core::system::setenv(&env, + "R_DOC_DIR", + rHomePath.childPath("doc").absolutePath()); +- core::system::setenv(&env, ++ ::core::system::setenv(&env, + "DYLD_FALLBACK_LIBRARY_PATH", + r_util::rLibraryPath(rHomePath, + rLibPath, + ldPathsScript, + ldLibraryPath)); +- core::system::setenv(&env, "R_ARCH", "/x86_64"); ++ ::core::system::setenv(&env, "R_ARCH", "/x86_64"); + + RVersion version; + version.number = versionPath.filename(); +diff -ru rstudio-0.98.1103/src/cpp/core/Settings.cpp rstudio-0.98.1103-fix/src/cpp/core/Settings.cpp +--- rstudio-0.98.1103/src/cpp/core/Settings.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/Settings.cpp 2015-03-08 22:23:10.756944058 +0100 +@@ -38,7 +38,7 @@ + { + settingsFile_ = filePath ; + settingsMap_.clear() ; +- Error error = core::readStringMapFromFile(settingsFile_, &settingsMap_) ; ++ Error error = ::core::readStringMapFromFile(settingsFile_, &settingsMap_) ; + if (error) + { + // we don't consider file-not-found and error because it is a +@@ -135,7 +135,7 @@ + void Settings::writeSettings() + { + isDirty_ = false; +- Error error = core::writeStringMapToFile(settingsFile_, settingsMap_) ; ++ Error error = ::core::writeStringMapToFile(settingsFile_, settingsMap_) ; + if (error) + LOG_ERROR(error); + } +diff -ru rstudio-0.98.1103/src/cpp/core/spelling/HunspellDictionaryManager.cpp rstudio-0.98.1103-fix/src/cpp/core/spelling/HunspellDictionaryManager.cpp +--- rstudio-0.98.1103/src/cpp/core/spelling/HunspellDictionaryManager.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/spelling/HunspellDictionaryManager.cpp 2015-03-08 22:23:10.739944055 +0100 +@@ -95,7 +95,7 @@ + if (error) + return error; + +- core::algorithm::copy_if(children.begin(), ++ ::core::algorithm::copy_if(children.begin(), + children.end(), + std::back_inserter(*pAffFiles), + isDictionaryAff); +diff -ru rstudio-0.98.1103/src/cpp/core/spelling/HunspellSpellingEngine.cpp rstudio-0.98.1103-fix/src/cpp/core/spelling/HunspellSpellingEngine.cpp +--- rstudio-0.98.1103/src/cpp/core/spelling/HunspellSpellingEngine.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/spelling/HunspellSpellingEngine.cpp 2015-03-08 22:23:10.736944054 +0100 +@@ -160,9 +160,9 @@ + { + // validate that dictionaries exist + if (!dictionary.affPath().exists()) +- return core::fileNotFoundError(dictionary.affPath(), ERROR_LOCATION); ++ return ::core::fileNotFoundError(dictionary.affPath(), ERROR_LOCATION); + if (!dictionary.dicPath().exists()) +- return core::fileNotFoundError(dictionary.dicPath(), ERROR_LOCATION); ++ return ::core::fileNotFoundError(dictionary.dicPath(), ERROR_LOCATION); + + // convert paths to system encoding before sending to external API + std::string systemAffPath = string_utils::utf8ToSystem( +@@ -228,10 +228,10 @@ + + // read the file and strip the BOM + std::string contents; +- Error error = core::readStringFromFile(dicDeltaPath, &contents); ++ Error error = ::core::readStringFromFile(dicDeltaPath, &contents); + if (error) + return error; +- core::stripBOM(&contents); ++ ::core::stripBOM(&contents); + + // split into lines + std::vector lines; +@@ -355,7 +355,7 @@ + bool *pAdded) + { + if (!dicPath.exists()) +- return core::fileNotFoundError(dicPath, ERROR_LOCATION); ++ return ::core::fileNotFoundError(dicPath, ERROR_LOCATION); + + // Convert path to system encoding before sending to external api + std::string systemDicPath = string_utils::utf8ToSystem(dicPath.absolutePath()); +diff -ru rstudio-0.98.1103/src/cpp/core/StderrLogWriter.cpp rstudio-0.98.1103-fix/src/cpp/core/StderrLogWriter.cpp +--- rstudio-0.98.1103/src/cpp/core/StderrLogWriter.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/StderrLogWriter.cpp 2015-03-08 22:23:10.816944068 +0100 +@@ -41,14 +41,14 @@ + } + } + +-void StderrLogWriter::log(core::system::LogLevel logLevel, ++void StderrLogWriter::log(::core::system::LogLevel logLevel, + const std::string& message) + { + log(programIdentity_, logLevel, message); + } + + void StderrLogWriter::log(const std::string& programIdentity, +- core::system::LogLevel logLevel, ++ ::core::system::LogLevel logLevel, + const std::string& message) + { + if (logLevel > logLevel_) +diff -ru rstudio-0.98.1103/src/cpp/core/StringUtils.cpp rstudio-0.98.1103-fix/src/cpp/core/StringUtils.cpp +--- rstudio-0.98.1103/src/cpp/core/StringUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/StringUtils.cpp 2015-03-08 22:23:10.782944062 +0100 +@@ -315,7 +315,7 @@ + + for (size_t i = 0; i < chunks.size() && i < 4; i++) + { +- uint16_t value = core::safe_convert::stringTo( ++ uint16_t value = ::core::safe_convert::stringTo( + chunks[i], std::numeric_limits::max()); + if (value == std::numeric_limits::max()) + return false; +diff -ru rstudio-0.98.1103/src/cpp/core/SyslogLogWriter.cpp rstudio-0.98.1103-fix/src/cpp/core/SyslogLogWriter.cpp +--- rstudio-0.98.1103/src/cpp/core/SyslogLogWriter.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/SyslogLogWriter.cpp 2015-03-08 22:23:10.550944023 +0100 +@@ -27,7 +27,7 @@ + + int logPriority(int logLevel) + { +- using namespace core::system; ++ using namespace ::core::system; + + // map universal log entry type to posix constant + switch(logLevel) +@@ -67,7 +67,7 @@ + SyslogLogWriter::SyslogLogWriter(const std::string& programIdentity, + int logLevel) + : programIdentity_(programIdentity), +- logToStderr_(core::system::stderrIsTerminal()) ++ logToStderr_(::core::system::stderrIsTerminal()) + { + // copy program identity into new string whose buffer will stay + // around long enough to successfully register with openlog +@@ -82,7 +82,7 @@ + ::setlogmask(LOG_UPTO(logPriority(logLevel))); + } + +-void SyslogLogWriter::log(core::system::LogLevel logLevel, ++void SyslogLogWriter::log(::core::system::LogLevel logLevel, + const std::string& message) + { + if (logToStderr_) +@@ -99,7 +99,7 @@ + } + + void SyslogLogWriter::log(const std::string&, +- core::system::LogLevel logLevel, ++ ::core::system::LogLevel logLevel, + const std::string& message) + { + log(logLevel, message); +diff -ru rstudio-0.98.1103/src/cpp/core/system/Environment.cpp rstudio-0.98.1103-fix/src/cpp/core/system/Environment.cpp +--- rstudio-0.98.1103/src/cpp/core/system/Environment.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/Environment.cpp 2015-03-08 22:23:10.669944043 +0100 +@@ -52,10 +52,10 @@ + + void getModifiedEnv(const Options& extraVars, Options* pEnv) + { +- core::system::environment(pEnv); ++ ::core::system::environment(pEnv); + BOOST_FOREACH(const Option& var, extraVars) + { +- core::system::setenv(pEnv, var.first, var.second); ++ ::core::system::setenv(pEnv, var.first, var.second); + } + } + +diff -ru rstudio-0.98.1103/src/cpp/core/system/file_monitor/FileMonitor.cpp rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/FileMonitor.cpp +--- rstudio-0.98.1103/src/cpp/core/system/file_monitor/FileMonitor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/FileMonitor.cpp 2015-03-08 22:23:10.685944045 +0100 +@@ -86,7 +86,7 @@ + + bool notHidden(const FileInfo& fileInfo) + { +- return !core::system::isHiddenFile(fileInfo); ++ return !::core::system::isHiddenFile(fileInfo); + } + + bool shouldTraverse(const FileInfo& fileInfo) +@@ -394,7 +394,7 @@ + void run(const boost::function& checkForInput); + + // register a new file monitor +-Handle registerMonitor(const core::FilePath& filePath, ++Handle registerMonitor(const ::core::FilePath& filePath, + bool recursive, + const boost::function& filter, + const Callbacks& callbacks); +@@ -422,7 +422,7 @@ + { + } + +- RegistrationCommand(const core::FilePath& filePath, ++ RegistrationCommand(const ::core::FilePath& filePath, + bool recursive, + const boost::function& filter, + const Callbacks& callbacks) +@@ -441,7 +441,7 @@ + + Type type() const { return type_; } + +- const core::FilePath& filePath() const { return filePath_; } ++ const ::core::FilePath& filePath() const { return filePath_; } + bool recursive() const { return recursive_; } + const boost::function& filter() const + { +@@ -459,7 +459,7 @@ + Type type_; + + // register command data +- core::FilePath filePath_; ++ ::core::FilePath filePath_; + bool recursive_; + boost::function filter_; + Callbacks callbacks_; +@@ -468,18 +468,18 @@ + Handle handle_; + }; + +-typedef core::thread::ThreadsafeQueue ++typedef ::core::thread::ThreadsafeQueue + RegistrationCommandQueue; + RegistrationCommandQueue& registrationCommandQueue() + { +- static core::thread::ThreadsafeQueue instance; ++ static ::core::thread::ThreadsafeQueue instance; + return instance; + } + +-typedef core::thread::ThreadsafeQueue > CallbackQueue; ++typedef ::core::thread::ThreadsafeQueue > CallbackQueue; + CallbackQueue& callbackQueue() + { +- static core::thread::ThreadsafeQueue > instance; ++ static ::core::thread::ThreadsafeQueue > instance; + return instance; + } + +@@ -622,7 +622,7 @@ + void initialize() + { + s_pActiveHandles = new std::list(); +- core::thread::safeLaunchThread(fileMonitorThreadMain, &s_fileMonitorThread); ++ ::core::thread::safeLaunchThread(fileMonitorThreadMain, &s_fileMonitorThread); + } + + void stop() +diff -ru rstudio-0.98.1103/src/cpp/core/system/file_monitor/LinuxFileMonitor.cpp rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/LinuxFileMonitor.cpp +--- rstudio-0.98.1103/src/cpp/core/system/file_monitor/LinuxFileMonitor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/LinuxFileMonitor.cpp 2015-03-08 22:23:10.675944044 +0100 +@@ -435,7 +435,7 @@ + namespace detail { + + // register a new file monitor +-Handle registerMonitor(const core::FilePath& filePath, ++Handle registerMonitor(const ::core::FilePath& filePath, + bool recursive, + const boost::function& filter, + const Callbacks& callbacks) +diff -ru rstudio-0.98.1103/src/cpp/core/system/file_monitor/MacFileMonitor.cpp rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/MacFileMonitor.cpp +--- rstudio-0.98.1103/src/cpp/core/system/file_monitor/MacFileMonitor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/MacFileMonitor.cpp 2015-03-08 22:23:10.679944044 +0100 +@@ -245,7 +245,7 @@ + } + + // scan the files +- core::system::FileScannerOptions options; ++ ::core::system::FileScannerOptions options; + options.recursive = recursive; + options.yield = true; + options.filter = filter; +diff -ru rstudio-0.98.1103/src/cpp/core/system/file_monitor/Win32FileMonitor.cpp rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/Win32FileMonitor.cpp +--- rstudio-0.98.1103/src/cpp/core/system/file_monitor/Win32FileMonitor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/file_monitor/Win32FileMonitor.cpp 2015-03-08 22:23:10.690944046 +0100 +@@ -492,7 +492,7 @@ + namespace detail { + + // register a new file monitor +-Handle registerMonitor(const core::FilePath& filePath, ++Handle registerMonitor(const ::core::FilePath& filePath, + bool recursive, + const boost::function& filter, + const Callbacks& callbacks) +@@ -551,7 +551,7 @@ + ::InterlockedIncrement(&s_activeRequests); + + // scan the files +- core::system::FileScannerOptions options; ++ ::core::system::FileScannerOptions options; + options.recursive = recursive; + options.yield = true; + options.filter = filter; +diff -ru rstudio-0.98.1103/src/cpp/core/system/PosixChildProcess.cpp rstudio-0.98.1103-fix/src/cpp/core/system/PosixChildProcess.cpp +--- rstudio-0.98.1103/src/cpp/core/system/PosixChildProcess.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/PosixChildProcess.cpp 2015-03-08 22:23:10.724944052 +0100 +@@ -465,7 +465,7 @@ + } + + // clear the child signal mask +- Error error = core::system::clearSignalMask(); ++ Error error = ::core::system::clearSignalMask(); + if (error) + { + LOG_ERROR(error); +@@ -524,7 +524,7 @@ + } + + // close all open file descriptors other than std streams +- error = core::system::closeNonStdFileDescriptors(); ++ error = ::core::system::closeNonStdFileDescriptors(); + if (error) + { + LOG_ERROR(error); +@@ -544,7 +544,7 @@ + std::vector args; + args.push_back(exe_); + args.insert(args.end(), args_.begin(), args_.end()); +- using core::system::ProcessArgs; ++ using ::core::system::ProcessArgs; + ProcessArgs* pProcessArgs = new ProcessArgs(args); + + if (options_.environment) +diff -ru rstudio-0.98.1103/src/cpp/core/system/PosixOutputCapture.cpp rstudio-0.98.1103-fix/src/cpp/core/system/PosixOutputCapture.cpp +--- rstudio-0.98.1103/src/cpp/core/system/PosixOutputCapture.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/PosixOutputCapture.cpp 2015-03-08 22:23:10.664944042 +0100 +@@ -155,7 +155,7 @@ + { + // block all signals for launch of background thread (will cause it + // to never receive signals) +- core::system::SignalBlocker signalBlocker; ++ ::core::system::SignalBlocker signalBlocker; + Error error = signalBlocker.blockAll(); + if (error) + LOG_ERROR(error); +diff -ru rstudio-0.98.1103/src/cpp/core/system/PosixParentProcessMonitor.cpp rstudio-0.98.1103-fix/src/cpp/core/system/PosixParentProcessMonitor.cpp +--- rstudio-0.98.1103/src/cpp/core/system/PosixParentProcessMonitor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/PosixParentProcessMonitor.cpp 2015-03-08 22:23:10.667944042 +0100 +@@ -41,7 +41,7 @@ + char* result = ::getenv(name.c_str()); + if (!result) + return defaultVal; +- return core::safe_convert::stringTo(result, defaultVal); ++ return ::core::safe_convert::stringTo(result, defaultVal); + } + + void exitHandler() +diff -ru rstudio-0.98.1103/src/cpp/core/system/PosixShellUtils.cpp rstudio-0.98.1103-fix/src/cpp/core/system/PosixShellUtils.cpp +--- rstudio-0.98.1103/src/cpp/core/system/PosixShellUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/PosixShellUtils.cpp 2015-03-08 22:23:10.662944042 +0100 +@@ -27,7 +27,7 @@ + return "\"" + regex_replace(arg, pattern, "\\$1") + "\""; + } + +-std::string escape(const core::FilePath &path) ++std::string escape(const ::core::FilePath &path) + { + return escape(string_utils::utf8ToSystem(path.absolutePath())); + } +diff -ru rstudio-0.98.1103/src/cpp/core/system/PosixSystem.cpp rstudio-0.98.1103-fix/src/cpp/core/system/PosixSystem.cpp +--- rstudio-0.98.1103/src/cpp/core/system/PosixSystem.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/PosixSystem.cpp 2015-03-08 22:23:10.653944040 +0100 +@@ -214,7 +214,7 @@ + s_pLogWriter->setLogToStderr(logToStderr); + } + +-void addLogWriter(boost::shared_ptr pLogWriter) ++void addLogWriter(boost::shared_ptr< ::core::LogWriter> pLogWriter) + { + s_logWriters.push_back(pLogWriter); + } +@@ -477,7 +477,7 @@ + + namespace { + +-// NOTE: this function is duplicated between here and core::system ++// NOTE: this function is duplicated between here and ::core::system + // Did this to prevent the "system" interface from allowing Posix + // constructs with Win32 no-ops to creep in (since this is used on + // Posix for forking and has no purpose on Win32) +@@ -554,8 +554,8 @@ + + void setStandardStreamsToDevNull() + { +- core::system::closeStdFileDescriptors(); +- core::system::attachStdFileDescriptorsToDevNull(); ++ ::core::system::closeStdFileDescriptors(); ++ ::core::system::attachStdFileDescriptorsToDevNull(); + std::ios::sync_with_stdio(); + } + +@@ -724,7 +724,7 @@ + return error; + + // attach file descriptors 0, 1, and 2 to /dev/null +- core::system::attachStdFileDescriptorsToDevNull(); ++ ::core::system::attachStdFileDescriptorsToDevNull(); + + // note: ignoring of terminal signals are handled by an optional + // separate call (ignoreTerminalSignals) +@@ -888,9 +888,9 @@ + { + // use pidof to capture pids + std::string cmd = "pidof " + process; +- core::system::ProcessResult result; +- Error error = core::system::runCommand(cmd, +- core::system::ProcessOptions(), ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand(cmd, ++ ::core::system::ProcessOptions(), + &result); + if (error) + return error; +@@ -936,7 +936,7 @@ + + // read the cmdline + std::string cmdline; +- Error error = core::readStringFromFile(cmdlineFile, &cmdline); ++ Error error = ::core::readStringFromFile(cmdlineFile, &cmdline); + if (error) + { + LOG_ERROR(error); +@@ -968,8 +968,8 @@ + } + + // get the username +- core::system::user::User user; +- Error error = core::system::user::userFromId(st.st_uid, &user); ++ ::core::system::user::User user; ++ Error error = ::core::system::user::userFromId(st.st_uid, &user); + if (error) + { + LOG_ERROR(error); +@@ -998,9 +998,9 @@ + // use ps to capture pids + std::string cmd = "ps acx | awk \"{if (\\$5==\\\"" + + process + "\\\") print \\$1}\""; +- core::system::ProcessResult result; +- Error error = core::system::runCommand(cmd, +- core::system::ProcessOptions(), ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand(cmd, ++ ::core::system::ProcessOptions(), + &result); + if (error) + return error; +@@ -1080,7 +1080,7 @@ + Error restrictCoreDumps() + { + // set allowed size of core dumps to 0 bytes +- Error error = setResourceLimit(core::system::CoreLimit, 0); ++ Error error = setResourceLimit(::core::system::CoreLimit, 0); + if (error) + return error; + +@@ -1102,7 +1102,7 @@ + + // ulimit + RLimitType rLimitSoft, rLimitHard; +- Error error = getResourceLimit(core::system::CoreLimit, ++ Error error = getResourceLimit(::core::system::CoreLimit, + &rLimitSoft, &rLimitHard); + if (error) + LOG_ERROR(error); +@@ -1194,12 +1194,12 @@ + } + + void copyEnvironmentVar(const std::string& name, +- core::system::Options* pVars, ++ ::core::system::Options* pVars, + bool evenIfEmpty = false) + { +- std::string value = core::system::getenv(name); ++ std::string value = ::core::system::getenv(name); + if (!value.empty() || evenIfEmpty) +- core::system::setenv(pVars, name, value); ++ ::core::system::setenv(pVars, name, value); + } + + } +@@ -1308,7 +1308,7 @@ + + // clear the signal mask so the child process can handle whatever + // signals it wishes to +- Error error = core::system::clearSignalMask(); ++ Error error = ::core::system::clearSignalMask(); + if (error) + { + LOG_ERROR(error); +@@ -1337,12 +1337,12 @@ + switch(config.stdStreamBehavior) + { + case StdStreamClose: +- core::system::closeStdFileDescriptors(); ++ ::core::system::closeStdFileDescriptors(); + break; + + case StdStreamDevNull: +- core::system::closeStdFileDescriptors(); +- core::system::attachStdFileDescriptorsToDevNull(); ++ ::core::system::closeStdFileDescriptors(); ++ ::core::system::attachStdFileDescriptorsToDevNull(); + break; + + case StdStreamInherit: +@@ -1352,21 +1352,21 @@ + } + + // setup environment +- core::system::Options env; ++ ::core::system::Options env; + copyEnvironmentVar("PATH", &env); + copyEnvironmentVar("MANPATH", &env); + copyEnvironmentVar("LANG", &env); +- core::system::setenv(&env, "USER", user.username); +- core::system::setenv(&env, "LOGNAME", user.username); +- core::system::setenv(&env, "HOME", user.homeDirectory); ++ ::core::system::setenv(&env, "USER", user.username); ++ ::core::system::setenv(&env, "LOGNAME", user.username); ++ ::core::system::setenv(&env, "HOME", user.homeDirectory); + copyEnvironmentVar("SHELL", &env); + + // add custom environment vars (overriding as necessary) +- for (core::system::Options::const_iterator it = config.environment.begin(); ++ for (::core::system::Options::const_iterator it = config.environment.begin(); + it != config.environment.end(); + ++it) + { +- core::system::setenv(&env, it->first, it->second); ++ ::core::system::setenv(&env, it->first, it->second); + } + + // NOTE: this implemenentation ignores the config.stdInput field (that +@@ -1375,7 +1375,7 @@ + // format as ProcessArgs expects + boost::format fmt("%1%=%2%"); + std::vector envVars; +- for(core::system::Options::const_iterator it = env.begin(); ++ for(::core::system::Options::const_iterator it = env.begin(); + it != env.end(); + ++it) + { +@@ -1384,13 +1384,13 @@ + + // create environment args (allocate on heap so memory stays around + // after we exec (some systems including OSX seem to require this) +- core::system::ProcessArgs* pEnvironment = new core::system::ProcessArgs( ++ ::core::system::ProcessArgs* pEnvironment = new ::core::system::ProcessArgs( + envVars); + + // build process args + std::vector argVector; + argVector.push_back(path); +- for (core::system::Options::const_iterator it = config.args.begin(); ++ for (::core::system::Options::const_iterator it = config.args.begin(); + it != config.args.end(); + ++it) + { +@@ -1401,7 +1401,7 @@ + + // allocate ProcessArgs on heap so memory stays around after we exec + // (some systems including OSX seem to require this) +- core::system::ProcessArgs* pProcessArgs = new core::system::ProcessArgs( ++ ::core::system::ProcessArgs* pProcessArgs = new ::core::system::ProcessArgs( + argVector); + + // execute child +diff -ru rstudio-0.98.1103/src/cpp/core/system/System.cpp rstudio-0.98.1103-fix/src/cpp/core/system/System.cpp +--- rstudio-0.98.1103/src/cpp/core/system/System.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/System.cpp 2015-03-08 22:23:10.658944041 +0100 +@@ -65,14 +65,14 @@ + + int exitFailure(const Error& error, const ErrorLocation& loggedFromLocation) + { +- core::log::logError(error, loggedFromLocation); ++ ::core::log::logError(error, loggedFromLocation); + return EXIT_FAILURE; + } + + int exitFailure(const std::string& errMsg, + const ErrorLocation& loggedFromLocation) + { +- core::log::logErrorMessage(errMsg, loggedFromLocation); ++ ::core::log::logErrorMessage(errMsg, loggedFromLocation); + return EXIT_FAILURE; + } + +@@ -83,8 +83,8 @@ + + std::string generateShortenedUuid() + { +- std::string uuid = core::system::generateUuid(false); +- return core::hash::crc32HexHash(uuid); ++ std::string uuid = ::core::system::generateUuid(false); ++ return ::core::hash::crc32HexHash(uuid); + } + + +diff -ru rstudio-0.98.1103/src/cpp/core/system/Win32FileScanner.cpp rstudio-0.98.1103-fix/src/cpp/core/system/Win32FileScanner.cpp +--- rstudio-0.98.1103/src/cpp/core/system/Win32FileScanner.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/Win32FileScanner.cpp 2015-03-08 22:23:10.692944047 +0100 +@@ -70,7 +70,7 @@ + // interfere with the caller getting a listing of everything else + // and proceeding with its work + Error scanFiles(const tree::iterator_base& fromNode, +- const core::system::FileScannerOptions& options, ++ const ::core::system::FileScannerOptions& options, + tree* pTree) + { + // clear all existing +diff -ru rstudio-0.98.1103/src/cpp/core/system/Win32ShellUtils.cpp rstudio-0.98.1103-fix/src/cpp/core/system/Win32ShellUtils.cpp +--- rstudio-0.98.1103/src/cpp/core/system/Win32ShellUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/Win32ShellUtils.cpp 2015-03-08 22:23:10.671944043 +0100 +@@ -30,7 +30,7 @@ + return "\"" + arg + "\""; + } + +-std::string escape(const core::FilePath& path) ++std::string escape(const ::core::FilePath& path) + { + return escape(string_utils::utf8ToSystem(path.absolutePath())); + } +diff -ru rstudio-0.98.1103/src/cpp/core/system/Win32System.cpp rstudio-0.98.1103-fix/src/cpp/core/system/Win32System.cpp +--- rstudio-0.98.1103/src/cpp/core/system/Win32System.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/system/Win32System.cpp 2015-03-08 22:23:10.705944049 +0100 +@@ -203,7 +203,7 @@ + s_pLogWriter->setLogToStderr(logToStderr); + } + +-void addLogWriter(boost::shared_ptr pLogWriter) ++void addLogWriter(boost::shared_ptr< ::core::LogWriter> pLogWriter) + { + s_logWriters.push_back(pLogWriter); + } +@@ -323,8 +323,8 @@ + + FilePath homepathHomePath() + { +- std::string homeDrive = core::system::getenv("HOMEDRIVE"); +- std::string homePath = core::system::getenv("HOMEPATH"); ++ std::string homeDrive = ::core::system::getenv("HOMEDRIVE"); ++ std::string homePath = ::core::system::getenv("HOMEPATH"); + if (!homeDrive.empty() && !homePath.empty()) + return FilePath(homeDrive + homePath); + else +@@ -333,7 +333,7 @@ + + FilePath homedriveHomePath() + { +- std::string homeDrive = core::system::getenv("HOMEDRIVE"); ++ std::string homeDrive = ::core::system::getenv("HOMEDRIVE"); + if (homeDrive.empty()) + homeDrive = "C:"; + return FilePath(homeDrive); +diff -ru rstudio-0.98.1103/src/cpp/core/tex/TexLogParser.cpp rstudio-0.98.1103-fix/src/cpp/core/tex/TexLogParser.cpp +--- rstudio-0.98.1103/src/cpp/core/tex/TexLogParser.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/tex/TexLogParser.cpp 2015-03-08 22:23:10.762944058 +0100 +@@ -291,7 +291,7 @@ + + FilePath path = compileDir.complete(logPath); + FilePath realPath; +- Error error = core::system::realPath(path, &realPath); ++ Error error = ::core::system::realPath(path, &realPath); + if (error) + { + // log any error which isn't no such file or directory +@@ -512,7 +512,7 @@ + + // get the lines + std::vector lines; +- Error error = core::readStringVectorFromFile(logFilePath, &lines, false); ++ Error error = ::core::readStringVectorFromFile(logFilePath, &lines, false); + if (error) + return error; + +diff -ru rstudio-0.98.1103/src/cpp/core/tex/TexMagicComment.cpp rstudio-0.98.1103-fix/src/cpp/core/tex/TexMagicComment.cpp +--- rstudio-0.98.1103/src/cpp/core/tex/TexMagicComment.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/tex/TexMagicComment.cpp 2015-03-08 22:23:10.764944059 +0100 +@@ -31,7 +31,7 @@ + TexMagicComments* pComments) + { + std::vector lines; +- Error error = core::readStringVectorFromFile(texFile, &lines); ++ Error error = ::core::readStringVectorFromFile(texFile, &lines); + if (error) + return error; + +diff -ru rstudio-0.98.1103/src/cpp/core/tex/TexSynctex.cpp rstudio-0.98.1103-fix/src/cpp/core/tex/TexSynctex.cpp +--- rstudio-0.98.1103/src/cpp/core/tex/TexSynctex.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/tex/TexSynctex.cpp 2015-03-08 22:23:10.767944059 +0100 +@@ -99,7 +99,7 @@ + + bool Synctex::parse(const FilePath& pdfPath) + { +- using namespace core::string_utils; ++ using namespace ::core::string_utils; + pImpl_->pdfPath = pdfPath; + std::string path = utf8ToSystem(pdfPath.absolutePath()); + std::string buildDir = utf8ToSystem(pdfPath.parent().absolutePath()); +@@ -158,7 +158,7 @@ + FilePath filePath = pImpl_->pdfPath.parent().complete(adjustedName); + + // fully normalize +- Error error = core::system::realPath(filePath, &filePath); ++ Error error = ::core::system::realPath(filePath, &filePath); + if (error) + LOG_ERROR(error); + +diff -ru rstudio-0.98.1103/src/cpp/core/Thread.cpp rstudio-0.98.1103-fix/src/cpp/core/Thread.cpp +--- rstudio-0.98.1103/src/cpp/core/Thread.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/core/Thread.cpp 2015-03-08 22:23:10.552944023 +0100 +@@ -27,7 +27,7 @@ + { + // block all signals for launch of background thread (will cause it + // to never receive signals) +- core::system::SignalBlocker signalBlocker; ++ ::core::system::SignalBlocker signalBlocker; + Error error = signalBlocker.blockAll(); + if (error) + LOG_ERROR(error); +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopChooseRHome.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopChooseRHome.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopChooseRHome.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopChooseRHome.cpp 2015-03-08 22:23:09.905943913 +0100 +@@ -54,7 +54,7 @@ + pOK_(NULL) + { + ui->setupUi(this); +- if (!core::system::isWin64()) ++ if (!::core::system::isWin64()) + ui->radioDefault64->setVisible(false); + + setWindowIcon(QIcon(QString::fromAscii(":/icons/RStudio.ico"))); +@@ -98,7 +98,7 @@ + { + if (lastDir_.isEmpty()) + { +- lastDir_ = QString::fromLocal8Bit(core::system::getenv("ProgramFiles").c_str()); ++ lastDir_ = QString::fromLocal8Bit(::core::system::getenv("ProgramFiles").c_str()); + } + + QString dir = QFileDialog::getExistingDirectory( +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopGwtCallback.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopGwtCallback.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopGwtCallback.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopGwtCallback.cpp 2015-03-08 22:23:09.803943896 +0100 +@@ -119,7 +119,7 @@ + + FilePath userHomePath() + { +- return core::system::userHomePath("R_USER|HOME"); ++ return ::core::system::userHomePath("R_USER|HOME"); + } + + QString createAliasedPath(const QString& path) +@@ -839,10 +839,10 @@ + QString extraPathEntries) + { + // append extra path entries to our path before launching +- std::string path = core::system::getenv("PATH"); ++ std::string path = ::core::system::getenv("PATH"); + std::string previousPath = path; +- core::system::addToPath(&path, extraPathEntries.toStdString()); +- core::system::setenv("PATH", path); ++ ::core::system::addToPath(&path, extraPathEntries.toStdString()); ++ ::core::system::setenv("PATH", path); + + #if defined(Q_WS_MACX) + +@@ -873,9 +873,9 @@ + else + { + // set HOME to USERPROFILE so msys ssh can find our keys +- std::string previousHome = core::system::getenv("HOME"); +- std::string userProfile = core::system::getenv("USERPROFILE"); +- core::system::setenv("HOME", userProfile); ++ std::string previousHome = ::core::system::getenv("HOME"); ++ std::string userProfile = ::core::system::getenv("USERPROFILE"); ++ ::core::system::setenv("HOME", userProfile); + + // run the process + QProcess::startDetached(QString::fromAscii("cmd.exe"), +@@ -883,7 +883,7 @@ + resolveAliasedPath(workingDirectory)); + + // revert to previous home +- core::system::setenv("HOME", previousHome); ++ ::core::system::setenv("HOME", previousHome); + } + + +@@ -909,7 +909,7 @@ + #endif + + // restore previous path +- core::system::setenv("PATH", previousPath); ++ ::core::system::setenv("PATH", previousPath); + } + + bool isProportionalFont(QString fontFamily) +@@ -1068,7 +1068,7 @@ + args.push_back(QString::fromAscii("/SILENT")); + + // custom install directory +- std::string systemDrive = core::system::getenv("SYSTEMDRIVE"); ++ std::string systemDrive = ::core::system::getenv("SYSTEMDRIVE"); + if (!systemDrive.empty() && FilePath(systemDrive).exists()) + { + std::string dir = systemDrive + "\\RBuildTools\\" + version.toStdString(); +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopMain.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopMain.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopMain.cpp 2015-03-08 22:23:09.912943915 +0100 +@@ -54,7 +54,7 @@ + + QString::number(rand()) + + QString::number(rand()); + std::string value = sharedSecret.toUtf8().constData(); +- core::system::setenv("RS_SHARED_SECRET", value); ++ ::core::system::setenv("RS_SHARED_SECRET", value); + } + + void initializeWorkingDirectory(int argc, +@@ -82,7 +82,7 @@ + { + // get current path + FilePath currentPath = FilePath::safeCurrentPath( +- core::system::userHomePath()); ++ ::core::system::userHomePath()); + + #if defined(_WIN32) || defined(__APPLE__) + +@@ -93,7 +93,7 @@ + // wd to the current path + + FilePath exePath; +- Error error = core::system::executablePath(argv[0], &exePath); ++ Error error = ::core::system::executablePath(argv[0], &exePath); + if (!error) + { + if (!exePath.isWithin(currentPath)) +@@ -108,8 +108,8 @@ + + // on linux we take the current working dir if we were launched + // from within a terminal +- if (core::system::stdoutIsTerminal() && +- (currentPath != core::system::userHomePath())) ++ if (::core::system::stdoutIsTerminal() && ++ (currentPath != ::core::system::userHomePath())) + { + workingDir = currentPath.absolutePath(); + } +@@ -120,12 +120,12 @@ + + // set the working dir if we have one + if (!workingDir.empty()) +- core::system::setenv(kRStudioInitialWorkingDir, workingDir); ++ ::core::system::setenv(kRStudioInitialWorkingDir, workingDir); + } + + void setInitialProject(const FilePath& projectFile, QString* pFilename) + { +- core::system::setenv(kRStudioInitialProject, projectFile.absolutePath()); ++ ::core::system::setenv(kRStudioInitialProject, projectFile.absolutePath()); + pFilename->clear(); + } + +@@ -157,7 +157,7 @@ + } + else if (ext == ".rdata" || ext == ".rda") + { +- core::system::setenv(kRStudioInitialEnvironment, filePath.absolutePath()); ++ ::core::system::setenv(kRStudioInitialEnvironment, filePath.absolutePath()); + pFilename->clear(); + } + +@@ -189,7 +189,7 @@ + + int main(int argc, char* argv[]) + { +- core::system::initHook(); ++ ::core::system::initHook(); + + try + { +@@ -197,12 +197,12 @@ + QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); + + // initialize log +- core::system::initializeLog("rdesktop", +- core::system::kLogLevelWarning, ++ ::core::system::initializeLog("rdesktop", ++ ::core::system::kLogLevelWarning, + desktop::userLogPath()); + + // ignore SIGPIPE +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + +@@ -265,7 +265,7 @@ + if (desktop::options().runDiagnostics()) + { + desktop::reattachConsoleIfNecessary(); +- initializeStderrLog("rdesktop", core::system::kLogLevelWarning); ++ initializeStderrLog("rdesktop", ::core::system::kLogLevelWarning); + } + + pApp->setAttribute(Qt::AA_MacDontSwapCtrlAndMeta); +@@ -280,7 +280,7 @@ + + // get install path + FilePath installPath; +- error = core::system::installPath("..", argv[0], &installPath); ++ error = ::core::system::installPath("..", argv[0], &installPath); + if (error) + { + LOG_ERROR(error); +@@ -331,7 +331,7 @@ + } + #endif + } +- core::system::fixupExecutablePath(&sessionPath); ++ ::core::system::fixupExecutablePath(&sessionPath); + + // set the scripts path in options + desktop::options().setScriptsPath(scriptsPath); +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopNetworkReply.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopNetworkReply.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopNetworkReply.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopNetworkReply.cpp 2015-03-08 22:23:09.775943891 +0100 +@@ -274,7 +274,7 @@ + if ((networkError.code() != boost::asio::error::operation_aborted) && + (networkError.code() != boost::asio::error::broken_pipe) && + (networkError.code() != boost::asio::error::eof) && +- !core::isPathNotFoundError(networkError) ) ++ !::core::isPathNotFoundError(networkError) ) + { + LOG_ERROR(networkError); + } +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopNetworkReply.hpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopNetworkReply.hpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopNetworkReply.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopNetworkReply.hpp 2015-03-08 22:23:09.854943905 +0100 +@@ -57,10 +57,10 @@ + qint64 readData(char *data, qint64 maxSize); + + private: +- void onResponse(const core::http::Response& response); +- void onError(const core::Error& error); ++ void onResponse(const ::core::http::Response& response); ++ void onError(const ::core::Error& error); + +- void executeRequest(const core::http::Request& request); ++ void executeRequest(const ::core::http::Request& request); + + private: + struct Impl; +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopOptions.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopOptions.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopOptions.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopOptions.cpp 2015-03-08 22:23:09.780943892 +0100 +@@ -81,7 +81,7 @@ + { + // Use a random-ish port number to avoid collisions between different + // instances of rdesktop-launched rsessions +- int base = std::abs(core::random::uniformRandomInteger()); ++ int base = std::abs(::core::random::uniformRandomInteger()); + portNumber_ = QString::number((base % 40000) + 8080); + + // recalculate the local peer and set RS_LOCAL_PEER so that +@@ -95,7 +95,7 @@ + QString::fromAscii("-rsession"); + #endif + localPeer_ = localPeer.toUtf8().constData(); +- core::system::setenv("RS_LOCAL_PEER", localPeer_); ++ ::core::system::setenv("RS_LOCAL_PEER", localPeer_); + } + + return portNumber_; +@@ -246,7 +246,7 @@ + + bool Options::preferR64() const + { +- if (!core::system::isWin64()) ++ if (!::core::system::isWin64()) + return false; + + if (!settings_.contains(QString::fromAscii("PreferR64"))) +@@ -275,7 +275,7 @@ + { + if (executablePath_.empty()) + { +- Error error = core::system::executablePath(QApplication::arguments().at(0).toUtf8(), ++ Error error = ::core::system::executablePath(QApplication::arguments().at(0).toUtf8(), + &executablePath_); + if (error) + LOG_ERROR(error); +@@ -288,7 +288,7 @@ + if (supportingFilePath_.empty()) + { + // default to install path +- core::system::installPath("..", ++ ::core::system::installPath("..", + QApplication::arguments().at(0).toUtf8(), + &supportingFilePath_); + +@@ -350,14 +350,14 @@ + settings_.setValue(QString::fromAscii("ignoredUpdateVersions"), ignoredVersions); + } + +-core::FilePath Options::scratchTempDir(core::FilePath defaultPath) ++core::FilePath Options::scratchTempDir(::core::FilePath defaultPath) + { +- core::FilePath dir(scratchPath.toUtf8().constData()); ++ ::core::FilePath dir(scratchPath.toUtf8().constData()); + + if (!dir.empty() && dir.exists()) + { + dir = dir.childPath("tmp"); +- core::Error error = dir.ensureDirectory(); ++ ::core::Error error = dir.ensureDirectory(); + if (!error) + return dir; + } +@@ -366,7 +366,7 @@ + + void Options::cleanUpScratchTempDir() + { +- core::FilePath temp = scratchTempDir(core::FilePath()); ++ ::core::FilePath temp = scratchTempDir(::core::FilePath()); + if (!temp.empty()) + temp.removeIfExists(); + } +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopOptions.hpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopOptions.hpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopOptions.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopOptions.hpp 2015-03-08 22:23:09.837943902 +0100 +@@ -65,23 +65,23 @@ + void setPreferR64(bool preferR64); + #endif + +- core::FilePath scriptsPath() const; +- void setScriptsPath(const core::FilePath& scriptsPath); ++ ::core::FilePath scriptsPath() const; ++ void setScriptsPath(const ::core::FilePath& scriptsPath); + +- core::FilePath executablePath() const; +- core::FilePath supportingFilePath() const; ++ ::core::FilePath executablePath() const; ++ ::core::FilePath supportingFilePath() const; + +- core::FilePath wwwDocsPath() const; ++ ::core::FilePath wwwDocsPath() const; + + #ifdef _WIN32 +- core::FilePath urlopenerPath() const; +- core::FilePath rsinversePath() const; ++ ::core::FilePath urlopenerPath() const; ++ ::core::FilePath rsinversePath() const; + #endif + + QStringList ignoredUpdateVersions() const; + void setIgnoredUpdateVersions(const QStringList& ignoredVersions); + +- core::FilePath scratchTempDir(core::FilePath defaultPath=core::FilePath()); ++ ::core::FilePath scratchTempDir(::core::FilePath defaultPath=::core::FilePath()); + void cleanUpScratchTempDir(); + + bool webkitDevTools(); +@@ -98,9 +98,9 @@ + friend Options& options(); + + QSettings settings_; +- core::FilePath scriptsPath_; +- mutable core::FilePath executablePath_; +- mutable core::FilePath supportingFilePath_; ++ ::core::FilePath scriptsPath_; ++ mutable ::core::FilePath executablePath_; ++ mutable ::core::FilePath supportingFilePath_; + mutable QString portNumber_; + mutable std::string localPeer_; + bool runDiagnostics_; +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopPosixDetectRHome.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopPosixDetectRHome.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopPosixDetectRHome.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopPosixDetectRHome.cpp 2015-03-08 22:23:09.895943912 +0100 +@@ -52,7 +52,7 @@ + { + // check for which R override + FilePath rWhichRPath; +- std::string whichROverride = core::system::getenv("RSTUDIO_WHICH_R"); ++ std::string whichROverride = ::core::system::getenv("RSTUDIO_WHICH_R"); + if (!whichROverride.empty()) + rWhichRPath = FilePath(whichROverride); + +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopRVersion.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopRVersion.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopRVersion.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopRVersion.cpp 2015-03-08 22:23:09.828943900 +0100 +@@ -213,7 +213,7 @@ + + void enumRegistry(Architecture architecture, QList* pResults) + { +- using namespace core::system; ++ using namespace ::core::system; + + REGSAM flags; + switch (architecture) +@@ -261,7 +261,7 @@ + void enumRegistry(QList* pResults) + { + enumRegistry(ArchX86, pResults); +- if (core::system::isWin64()) ++ if (::core::system::isWin64()) + enumRegistry(ArchX64, pResults); + } + +@@ -295,7 +295,7 @@ + + RVersion detectPreferredFromRegistry(Architecture architecture) + { +- using namespace core::system; ++ using namespace ::core::system; + + REGSAM flags; + switch (architecture) +@@ -496,7 +496,7 @@ + { + QString result; + +- if (core::system::isWin64()) ++ if (::core::system::isWin64()) + { + if (architecture() == ArchX64) + result.append(QString::fromUtf8("[64-bit] ")); +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopSessionLauncher.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopSessionLauncher.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopSessionLauncher.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopSessionLauncher.cpp 2015-03-08 22:23:09.909943914 +0100 +@@ -61,7 +61,7 @@ + + void logEnvVar(const std::string& name) + { +- std::string value = core::system::getenv(name); ++ std::string value = ::core::system::getenv(name); + if (!value.empty()) + RUN_DIAGNOSTICS_LOG(" " + name + "=" + value); + } +@@ -302,7 +302,7 @@ + FilePath abendLog = abendLogPath(); + if (abendLog.exists()) + { +- Error error = core::readStringFromFile(abendLog, &contents); ++ Error error = ::core::readStringFromFile(abendLog, &contents); + if (error) + LOG_ERROR(error); + +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopSessionLauncher.hpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopSessionLauncher.hpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopSessionLauncher.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopSessionLauncher.hpp 2015-03-08 22:23:09.871943908 +0100 +@@ -32,8 +32,8 @@ + { + Q_OBJECT + public: +- SessionLauncher(const core::FilePath& sessionPath, +- const core::FilePath& confPath) ++ SessionLauncher(const ::core::FilePath& sessionPath, ++ const ::core::FilePath& confPath) + : confPath_(confPath), + sessionPath_(sessionPath), + pAppLaunch_(NULL), +@@ -42,10 +42,10 @@ + { + } + +- core::Error launchFirstSession(const QString& filename, ++ ::core::Error launchFirstSession(const QString& filename, + ApplicationLaunch* pAppLaunch); + +- core::Error launchNextSession(bool reload); ++ ::core::Error launchNextSession(bool reload); + + QString launchFailedErrorMessage() const; + +@@ -61,7 +61,7 @@ + + void closeAllSatillites(); + +- core::Error launchSession(const QStringList& argList, ++ ::core::Error launchSession(const QStringList& argList, + QProcess** ppRSessionProcess); + + void buildLaunchContext(QString* pHost, +@@ -71,8 +71,8 @@ + + + private: +- core::FilePath confPath_; +- core::FilePath sessionPath_; ++ ::core::FilePath confPath_; ++ ::core::FilePath sessionPath_; + ApplicationLaunch* pAppLaunch_; + MainWindow* pMainWindow_; + QProcess* pRSessionProcess_; +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopSynctex.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopSynctex.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopSynctex.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopSynctex.cpp 2015-03-08 22:23:09.863943906 +0100 +@@ -56,9 +56,9 @@ + SynctexViewerInfo discoverViewer() + { + // probe for evince version +- core::system::ProcessResult result; +- Error error = core::system::runCommand("evince --version", +- core::system::ProcessOptions(), ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand("evince --version", ++ ::core::system::ProcessOptions(), + &result); + if (error) + { +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopUtils.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopUtils.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopUtils.cpp 2015-03-08 22:23:09.835943901 +0100 +@@ -60,8 +60,8 @@ + // SessionOptions.hpp although the code path isn't exactly the same) + FilePath userLogPath() + { +- FilePath userHomePath = core::system::userHomePath("R_USER|HOME"); +- FilePath logPath = core::system::userSettingsPath( ++ FilePath userHomePath = ::core::system::userHomePath("R_USER|HOME"); ++ FilePath logPath = ::core::system::userSettingsPath( + userHomePath, + "RStudio-Desktop").childPath("log"); + return logPath; +@@ -254,15 +254,15 @@ + } + else + { +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.breakawayFromJob = true; + options.detachProcess = true; + + std::vector args; + args.push_back(url.toString().toStdString()); + +- core::system::ProcessResult result; +- Error error = core::system::runProgram( ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runProgram( + desktop::options().urlopenerPath().absolutePath(), + args, + "", +@@ -283,7 +283,7 @@ + QFileDialog::Options standardFileDialogOptions() + { + bool isWindowsXP = QSysInfo::windowsVersion() == QSysInfo::WV_XP; +- if (isWindowsXP || core::system::isWin64()) ++ if (isWindowsXP || ::core::system::isWin64()) + return 0; + else + return QFileDialog::DontUseNativeDialog; +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopWebView.cpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopWebView.cpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopWebView.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopWebView.cpp 2015-03-08 22:23:09.859943906 +0100 +@@ -38,7 +38,7 @@ + dpiZoomScaling_(getDpiZoomScaling()) + { + #ifdef Q_WS_X11 +- if (!core::system::getenv("KDE_FULL_SESSION").empty()) ++ if (!::core::system::getenv("KDE_FULL_SESSION").empty()) + setStyle(new QPlastiqueStyle()); + #endif + pWebPage_ = new WebPage(baseUrl, this); +@@ -191,7 +191,7 @@ + if (contentType.contains(QRegExp(QString::fromAscii("^\\s*application/pdf($|;)"), + Qt::CaseInsensitive))) + { +- core::FilePath dir(options().scratchTempDir()); ++ ::core::FilePath dir(options().scratchTempDir()); + + QTemporaryFile pdfFile(QString::fromUtf8( + dir.childPath("rstudio-XXXXXX.pdf").absolutePath().c_str())); +diff -ru rstudio-0.98.1103/src/cpp/desktop/DesktopWordViewer.hpp rstudio-0.98.1103-fix/src/cpp/desktop/DesktopWordViewer.hpp +--- rstudio-0.98.1103/src/cpp/desktop/DesktopWordViewer.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/DesktopWordViewer.hpp 2015-03-08 22:23:09.788943893 +0100 +@@ -29,16 +29,16 @@ + public: + WordViewer(); + ~WordViewer(); +- core::Error showDocument(QString& path); +- core::Error closeLastViewedDocument(); ++ ::core::Error showDocument(QString& path); ++ ::core::Error closeLastViewedDocument(); + + private: +- core::Error openDocument(QString& path, IDispatch* idispDocs, ++ ::core::Error openDocument(QString& path, IDispatch* idispDocs, + IDispatch** pidispDoc); +- core::Error showWord(); +- core::Error getDocumentPosition(IDispatch* idispPos, int* pxPos, int* pyPos); +- core::Error setDocumentPosition(IDispatch* idispPos, int xPos, int yPos); +- core::Error getDocumentByPath(QString& path, IDispatch** pidispDoc); ++ ::core::Error showWord(); ++ ::core::Error getDocumentPosition(IDispatch* idispPos, int* pxPos, int* pyPos); ++ ::core::Error setDocumentPosition(IDispatch* idispPos, int xPos, int yPos); ++ ::core::Error getDocumentByPath(QString& path, IDispatch** pidispDoc); + IDispatch* idispWord_; + int docScrollX_; + int docScrollY_; +diff -ru rstudio-0.98.1103/src/cpp/desktop/synctex/evince/EvinceSynctex.cpp rstudio-0.98.1103-fix/src/cpp/desktop/synctex/evince/EvinceSynctex.cpp +--- rstudio-0.98.1103/src/cpp/desktop/synctex/evince/EvinceSynctex.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/synctex/evince/EvinceSynctex.cpp 2015-03-08 22:23:09.750943887 +0100 +@@ -41,7 +41,7 @@ + std::string msg = boost::str(fmt % error.type() % + error.name().toStdString() % + error.message().toStdString()); +- core::log::logErrorMessage(msg, location); ++ ::core::log::logErrorMessage(msg, location); + } + + } // anonymous namespace +@@ -160,7 +160,7 @@ + QDBusPendingReply<> reply = pWindow->SyncView( + srcFile, + srcLoc, +- core::date_time::secondsSinceEpoch()); ++ ::core::date_time::secondsSinceEpoch()); + + // wait for the results asynchronously + QDBusPendingCallWatcher* pWatcher = new QDBusPendingCallWatcher(reply, +diff -ru rstudio-0.98.1103/src/cpp/desktop/synctex/rsinverse/RsInverseMain.cpp rstudio-0.98.1103-fix/src/cpp/desktop/synctex/rsinverse/RsInverseMain.cpp +--- rstudio-0.98.1103/src/cpp/desktop/synctex/rsinverse/RsInverseMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/synctex/rsinverse/RsInverseMain.cpp 2015-03-08 22:23:09.745943886 +0100 +@@ -44,10 +44,10 @@ + try + { + // initialize log +- initializeSystemLog("rsinverse", core::system::kLogLevelWarning); ++ initializeSystemLog("rsinverse", ::core::system::kLogLevelWarning); + + // ignore SIGPIPE +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + +@@ -75,7 +75,7 @@ + "line of code to navigate to"); + + // define program options (allow positional specification) +- core::program_options::OptionsDescription optDesc("rsinverse"); ++ ::core::program_options::OptionsDescription optDesc("rsinverse"); + optDesc.commandLine.add(rsinverseOptions); + optDesc.positionalOptions.add("hwnd", 1); + optDesc.positionalOptions.add("port", 1); +@@ -84,7 +84,7 @@ + optDesc.positionalOptions.add("line", 1); + + // read options +- ProgramStatus status = core::program_options::read(optDesc, argc, argv); ++ ProgramStatus status = ::core::program_options::read(optDesc, argc, argv); + if (status.exit()) + return status.exitCode(); + +@@ -105,7 +105,7 @@ + + // enocde the source file and line as a query string + std::string requestBody; +- core::http::Fields args; ++ ::core::http::Fields args; + args.push_back(std::make_pair("source-file", sourceFile)); + args.push_back(std::make_pair("line", + safe_convert::numberToString(line))); +@@ -127,7 +127,7 @@ + + // send it + http::Response response; +- std::string pipeName = core::system::getenv("RS_LOCAL_PEER"); ++ std::string pipeName = ::core::system::getenv("RS_LOCAL_PEER"); + error = http::sendRequest(pipeName, + request, + http::ConnectionRetryProfile( +diff -ru rstudio-0.98.1103/src/cpp/desktop/synctex/sumatra/SumatraSynctex.cpp rstudio-0.98.1103-fix/src/cpp/desktop/synctex/sumatra/SumatraSynctex.cpp +--- rstudio-0.98.1103/src/cpp/desktop/synctex/sumatra/SumatraSynctex.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/synctex/sumatra/SumatraSynctex.cpp 2015-03-08 22:23:09.763943889 +0100 +@@ -68,7 +68,7 @@ + + // shared secret + cmdFormat.append( +- QString::fromStdString(core::system::getenv("RS_SHARED_SECRET"))); ++ QString::fromStdString(::core::system::getenv("RS_SHARED_SECRET"))); + cmdFormat.append(space); + + // file and line placeholders +diff -ru rstudio-0.98.1103/src/cpp/desktop/urlopener/UrlOpenerMain.cpp rstudio-0.98.1103-fix/src/cpp/desktop/urlopener/UrlOpenerMain.cpp +--- rstudio-0.98.1103/src/cpp/desktop/urlopener/UrlOpenerMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop/urlopener/UrlOpenerMain.cpp 2015-03-08 22:23:09.818943899 +0100 +@@ -27,7 +27,7 @@ + try + { + // initialize log +- initializeSystemLog("urlopener", core::system::kLogLevelWarning); ++ initializeSystemLog("urlopener", ::core::system::kLogLevelWarning); + + // check arguments + if (argc < 2) +diff -ru rstudio-0.98.1103/src/cpp/desktop-mac/Options.hpp rstudio-0.98.1103-fix/src/cpp/desktop-mac/Options.hpp +--- rstudio-0.98.1103/src/cpp/desktop-mac/Options.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop-mac/Options.hpp 2015-03-08 22:23:09.920943916 +0100 +@@ -52,13 +52,13 @@ + int zoomLevel() const; + void setZoomLevel(int zoomLevel); + +- core::FilePath scriptsPath() const; +- void setScriptsPath(const core::FilePath& scriptsPath); ++ ::core::FilePath scriptsPath() const; ++ void setScriptsPath(const ::core::FilePath& scriptsPath); + +- core::FilePath executablePath() const; +- core::FilePath supportingFilePath() const; ++ ::core::FilePath executablePath() const; ++ ::core::FilePath supportingFilePath() const; + +- core::FilePath wwwDocsPath() const; ++ ::core::FilePath wwwDocsPath() const; + + std::vector ignoredUpdateVersions() const; + void setIgnoredUpdateVersions(const std::vector& ignored); +@@ -67,9 +67,9 @@ + + private: + std::string sharedSecret_; +- core::FilePath scriptsPath_; +- mutable core::FilePath executablePath_; +- mutable core::FilePath supportingFilePath_; ++ ::core::FilePath scriptsPath_; ++ mutable ::core::FilePath executablePath_; ++ mutable ::core::FilePath supportingFilePath_; + mutable std::string portNumber_; + bool runDiagnostics_; + +diff -ru rstudio-0.98.1103/src/cpp/desktop-mac/SessionLauncher.hpp rstudio-0.98.1103-fix/src/cpp/desktop-mac/SessionLauncher.hpp +--- rstudio-0.98.1103/src/cpp/desktop-mac/SessionLauncher.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/desktop-mac/SessionLauncher.hpp 2015-03-08 22:23:09.922943916 +0100 +@@ -48,14 +48,14 @@ + friend SessionLauncher& sessionLauncher(); + + public: +- void init(const core::FilePath& sessionPath, +- const core::FilePath& confPath); ++ void init(const ::core::FilePath& sessionPath, ++ const ::core::FilePath& confPath); + + bool sessionProcessActive() { return sessionProcessActive_; } + + void setPendingQuit(PendingQuit pendingQuit); + +- core::Error launchFirstSession(const std::string& filename); ++ ::core::Error launchFirstSession(const std::string& filename); + + void launchNextSession(bool reload); + +@@ -72,20 +72,20 @@ + std::vector* pArgList, + std::string* pUrl) const; + +- core::Error launchSession(const std::string& host, ++ ::core::Error launchSession(const std::string& host, + const std::string& port, + std::vector args); + + +- void onRSessionExited(const core::system::ProcessResult& result); ++ void onRSessionExited(const ::core::system::ProcessResult& result); + + std::string collectAbendLogMessage(); + + void closeAllWindows(); + + private: +- core::FilePath confPath_; +- core::FilePath sessionPath_; ++ ::core::FilePath confPath_; ++ ::core::FilePath sessionPath_; + std::string sessionStderr_; + PendingQuit pendingQuit_; + bool sessionProcessActive_; +diff -ru rstudio-0.98.1103/src/cpp/diagnostics/DiagnosticsMain.cpp rstudio-0.98.1103-fix/src/cpp/diagnostics/DiagnosticsMain.cpp +--- rstudio-0.98.1103/src/cpp/diagnostics/DiagnosticsMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/diagnostics/DiagnosticsMain.cpp 2015-03-08 22:23:09.713943881 +0100 +@@ -32,14 +32,14 @@ + + FilePath homePath() + { +- return core::system::userHomePath("R_USER|HOME"); ++ return ::core::system::userHomePath("R_USER|HOME"); + } + + // NOTE: this code is duplicated in diagnostics as well (and also in + // SessionOptions.hpp although the code path isn't exactly the same) + FilePath userLogPath() + { +- FilePath logPath = core::system::userSettingsPath( ++ FilePath logPath = ::core::system::userSettingsPath( + homePath(), + "RStudio-Desktop" + ).childPath("log"); +@@ -56,7 +56,7 @@ + if (logFilePath.exists()) + { + std::string contents; +- Error error = core::readStringFromFile(logFilePath, &contents); ++ Error error = ::core::readStringFromFile(logFilePath, &contents); + if (error) + LOG_ERROR(error); + if (contents.empty()) +@@ -76,16 +76,16 @@ + + int main(int argc, char** argv) + { +- core::system::initializeStderrLog("rstudio-diagnostics", +- core::system::kLogLevelWarning); ++ ::core::system::initializeStderrLog("rstudio-diagnostics", ++ ::core::system::kLogLevelWarning); + + // ignore SIGPIPE +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + + writeLogFile("rdesktop.log", std::cout); +- writeLogFile("rsession-" + core::system::username() + ".log", std::cout); ++ writeLogFile("rsession-" + ::core::system::username() + ".log", std::cout); + + return EXIT_SUCCESS; + } +diff -ru rstudio-0.98.1103/src/cpp/monitor/events/Event.cpp rstudio-0.98.1103-fix/src/cpp/monitor/events/Event.cpp +--- rstudio-0.98.1103/src/cpp/monitor/events/Event.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/events/Event.cpp 2015-03-08 22:23:11.313944152 +0100 +@@ -69,7 +69,7 @@ + + ostr << " - "; + ostr << event.username() << " [" << event.pid() << "] - "; +- ostr << core::http::util::httpDate(event.timestamp()); ++ ostr << ::core::http::util::httpDate(event.timestamp()); + if (!event.data().empty()) + { + ostr << " - " << event.data(); +diff -ru rstudio-0.98.1103/src/cpp/monitor/include/monitor/events/Event.hpp rstudio-0.98.1103-fix/src/cpp/monitor/include/monitor/events/Event.hpp +--- rstudio-0.98.1103/src/cpp/monitor/include/monitor/events/Event.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/include/monitor/events/Event.hpp 2015-03-08 22:23:11.320944153 +0100 +@@ -50,8 +50,8 @@ + Event(EventScope scope, + int id, + const std::string& data = std::string(), +- const std::string& username = core::system::username(), +- PidType pid = core::system::currentProcessId(), ++ const std::string& username = ::core::system::username(), ++ PidType pid = ::core::system::currentProcessId(), + boost::posix_time::ptime timestamp = + boost::posix_time::microsec_clock::universal_time()) + : empty_(false), +diff -ru rstudio-0.98.1103/src/cpp/monitor/include/monitor/metrics/Metric.hpp rstudio-0.98.1103-fix/src/cpp/monitor/include/monitor/metrics/Metric.hpp +--- rstudio-0.98.1103/src/cpp/monitor/include/monitor/metrics/Metric.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/include/monitor/metrics/Metric.hpp 2015-03-08 22:23:11.326944154 +0100 +@@ -147,11 +147,11 @@ + + // json serialization + core::json::Object metricToJson(const Metric& metric); +-core::Error metricFromJson(const core::json::Object& metricJson, ++core::Error metricFromJson(const ::core::json::Object& metricJson, + Metric* pMetric); + + core::json::Object metricToJson(const MultiMetric& multiMetric); +-core::Error metricFromJson(const core::json::Object& multiMetricJson, ++core::Error metricFromJson(const ::core::json::Object& multiMetricJson, + MultiMetric* pMultiMetric); + + +diff -ru rstudio-0.98.1103/src/cpp/monitor/include/monitor/MonitorClient.hpp rstudio-0.98.1103-fix/src/cpp/monitor/include/monitor/MonitorClient.hpp +--- rstudio-0.98.1103/src/cpp/monitor/include/monitor/MonitorClient.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/include/monitor/MonitorClient.hpp 2015-03-08 22:23:11.324944154 +0100 +@@ -44,10 +44,10 @@ + virtual ~Client() {} + + virtual void logMessage(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message) = 0; + +- boost::shared_ptr createLogWriter( ++ boost::shared_ptr< ::core::LogWriter> createLogWriter( + const std::string& programIdentity); + + virtual void sendMetrics(const std::vector& metrics) = 0; +diff -ru rstudio-0.98.1103/src/cpp/monitor/MonitorClient.cpp rstudio-0.98.1103-fix/src/cpp/monitor/MonitorClient.cpp +--- rstudio-0.98.1103/src/cpp/monitor/MonitorClient.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/MonitorClient.cpp 2015-03-08 22:23:11.315944152 +0100 +@@ -21,7 +21,7 @@ + + namespace { + +-class MonitorLogWriter : public core::LogWriter ++class MonitorLogWriter : public ::core::LogWriter + { + public: + MonitorLogWriter(const std::string& programIdentity) +@@ -29,13 +29,13 @@ + { + } + +- virtual void log(core::system::LogLevel level, const std::string& message) ++ virtual void log(::core::system::LogLevel level, const std::string& message) + { + log(programIdentity_, level, message); + } + + virtual void log(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message) + { + client().logMessage(programIdentity, level, message); +@@ -51,10 +51,10 @@ + + } // anonymous namespace + +-boost::shared_ptr Client::createLogWriter( ++boost::shared_ptr< ::core::LogWriter> Client::createLogWriter( + const std::string& programIdentity) + { +- return boost::shared_ptr( ++ return boost::shared_ptr< ::core::LogWriter>( + new MonitorLogWriter(programIdentity)); + } + +diff -ru rstudio-0.98.1103/src/cpp/monitor/MonitorClientImpl.hpp rstudio-0.98.1103-fix/src/cpp/monitor/MonitorClientImpl.hpp +--- rstudio-0.98.1103/src/cpp/monitor/MonitorClientImpl.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/MonitorClientImpl.hpp 2015-03-08 22:23:11.309944151 +0100 +@@ -30,7 +30,7 @@ + } + + void logMessage(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message); + + void sendMetrics(const std::vector& metrics); +@@ -52,7 +52,7 @@ + } + + void logMessage(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message); + + void sendMetrics(const std::vector& metrics); +diff -ru rstudio-0.98.1103/src/cpp/monitor/MonitorClientOverlay.cpp rstudio-0.98.1103-fix/src/cpp/monitor/MonitorClientOverlay.cpp +--- rstudio-0.98.1103/src/cpp/monitor/MonitorClientOverlay.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/monitor/MonitorClientOverlay.cpp 2015-03-08 22:23:11.311944151 +0100 +@@ -19,7 +19,7 @@ + namespace monitor { + + void SyncClient::logMessage(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message) + { + } +@@ -34,7 +34,7 @@ + } + + void AsyncClient::logMessage(const std::string& programIdentity, +- core::system::LogLevel level, ++ ::core::system::LogLevel level, + const std::string& message) + { + } +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/RErrorCategory.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/RErrorCategory.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/RErrorCategory.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/RErrorCategory.hpp 2015-03-08 22:23:11.300944150 +0100 +@@ -68,14 +68,14 @@ + + + core::Error rCodeExecutionError(const std::string& errMsg, +- const core::ErrorLocation& location); ++ const ::core::ErrorLocation& location); + +-bool isCodeExecutionError(const core::Error& error, ++bool isCodeExecutionError(const ::core::Error& error, + std::string* pErrMsg = NULL); + + // use the error message generated by R for code execution errors, + // otherwise use error.message() +-std::string endUserErrorMessage(const core::Error& error); ++std::string endUserErrorMessage(const ::core::Error& error); + + + } // namespace r +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/RExec.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/RExec.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/RExec.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/RExec.hpp 2015-03-08 22:23:11.267944144 +0100 +@@ -80,7 +80,7 @@ + { + sexp::Protect rProtect; + SEXP valueSEXP ; +- core::Error error = evaluateString(str, &valueSEXP, &rProtect); ++ ::core::Error error = evaluateString(str, &valueSEXP, &rProtect); + if (error) + return error ; + +@@ -174,27 +174,27 @@ + params_.push_back(Param(name, paramSEXP)); + } + +- core::Error call(SEXP evalNS = R_GlobalEnv, bool safely = true); +- core::Error callUnsafe(); ++ ::core::Error call(SEXP evalNS = R_GlobalEnv, bool safely = true); ++ ::core::Error callUnsafe(); + +- core::Error call(SEXP* pResultSEXP, sexp::Protect* pProtect); +- core::Error call(SEXP evalNS, SEXP* pResultSEXP, sexp::Protect* pProtect); +- core::Error call(SEXP evalNS, bool safely, SEXP* pResultSEXP, ++ ::core::Error call(SEXP* pResultSEXP, sexp::Protect* pProtect); ++ ::core::Error call(SEXP evalNS, SEXP* pResultSEXP, sexp::Protect* pProtect); ++ ::core::Error call(SEXP evalNS, bool safely, SEXP* pResultSEXP, + sexp::Protect* pProtect); + + template +- core::Error call(T* pValue) ++ ::core::Error call(T* pValue) + { + return call(R_GlobalEnv, pValue); + } + + template +- core::Error call(SEXP evalNS, T* pValue) ++ ::core::Error call(SEXP evalNS, T* pValue) + { + // call the function + sexp::Protect rProtect; + SEXP resultSEXP ; +- core::Error error = call(evalNS, &resultSEXP, &rProtect); ++ ::core::Error error = call(evalNS, &resultSEXP, &rProtect); + if (error) + return error ; + +@@ -274,7 +274,7 @@ + virtual ~IgnoreInterruptsScope(); + private: + bool previousInterruptsSuspended_ ; +- boost::scoped_ptr pSignalBlocker_; ++ boost::scoped_ptr< ::core::system::SignalBlocker> pSignalBlocker_; + }; + + // returns true if the global context is on the top (i.e. the context stack is +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/RJson.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/RJson.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/RJson.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/RJson.hpp 2015-03-08 22:23:11.278944146 +0100 +@@ -31,10 +31,10 @@ + namespace r { + namespace json { + +-core::Error jsonValueFromScalar(SEXP scalarSEXP, core::json::Value* pValue); +-core::Error jsonValueFromVector(SEXP vectorSEXP, core::json::Value* pValue); +-core::Error jsonValueFromList(SEXP listSEXP, core::json::Value* pValue); +-core::Error jsonValueFromObject(SEXP objectSEXP, core::json::Value* pValue); ++core::Error jsonValueFromScalar(SEXP scalarSEXP, ::core::json::Value* pValue); ++core::Error jsonValueFromVector(SEXP vectorSEXP, ::core::json::Value* pValue); ++core::Error jsonValueFromList(SEXP listSEXP, ::core::json::Value* pValue); ++core::Error jsonValueFromObject(SEXP objectSEXP, ::core::json::Value* pValue); + + } // namespace json + } // namesapce r +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/RJsonRpc.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/RJsonRpc.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/RJsonRpc.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/RJsonRpc.hpp 2015-03-08 22:23:11.272944145 +0100 +@@ -30,7 +30,7 @@ + namespace r { + namespace json { + +-core::Error getRpcMethods(core::json::JsonRpcMethods* pMethods); ++core::Error getRpcMethods(::core::json::JsonRpcMethods* pMethods); + + } // namespace json + } // namesapce r +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/ROptions.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/ROptions.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/ROptions.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/ROptions.hpp 2015-03-08 22:23:11.304944150 +0100 +@@ -35,8 +35,8 @@ + namespace r { + namespace options { + +-core::Error saveOptions(const core::FilePath& filePath); +-core::Error restoreOptions(const core::FilePath& filePath); ++core::Error saveOptions(const ::core::FilePath& filePath); ++core::Error restoreOptions(const ::core::FilePath& filePath); + + // console width + extern const int kDefaultWidth; +@@ -60,7 +60,7 @@ + if (valueSEXP != R_NilValue) + { + T value; +- core::Error error = sexp::extract(valueSEXP, &value); ++ ::core::Error error = sexp::extract(valueSEXP, &value); + if (error) + { + error.addProperty("symbol (option)", name); +@@ -72,7 +72,7 @@ + } + else + { +- core::Error error(errc::SymbolNotFoundError, ERROR_LOCATION); ++ ::core::Error error(errc::SymbolNotFoundError, ERROR_LOCATION); + error.addProperty("symbol (option)", name); + if (logNotFound) + LOG_ERROR(error); +@@ -85,7 +85,7 @@ + { + r::exec::RFunction optionsFunction("options"); + optionsFunction.addParam(name, value); +- core::Error error = optionsFunction.call(); ++ ::core::Error error = optionsFunction.call(); + if (error) + { + error.addProperty("option-name", name); +@@ -93,7 +93,7 @@ + } + else + { +- return core::Success(); ++ return ::core::Success(); + } + } + +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/RSexp.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/RSexp.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/RSexp.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/RSexp.hpp 2015-03-08 22:23:11.307944151 +0100 +@@ -103,7 +103,7 @@ + core::Error extract(SEXP valueSEXP, std::vector* pVector); + + // create SEXP from c++ type +-SEXP create(const core::json::Value& value, Protect* pProtect); ++SEXP create(const ::core::json::Value& value, Protect* pProtect); + SEXP create(const char* value, Protect* pProtect); + SEXP create(const std::string& value, Protect* pProtect); + SEXP create(int value, Protect* pProtect); +@@ -118,15 +118,15 @@ + + SEXP create(const std::vector >& value, + Protect* pProtect); +-SEXP create(const core::json::Array& value, Protect* pProtect); +-SEXP create(const core::json::Object& value, Protect* pProtect); ++SEXP create(const ::core::json::Array& value, Protect* pProtect); ++SEXP create(const ::core::json::Object& value, Protect* pProtect); + + + inline int indexOfElementNamed(SEXP listSEXP, const std::string& name) + { + // get the names so we can determine which slot the element is in are in + std::vector names; +- core::Error error = r::sexp::getNames(listSEXP, &names); ++ ::core::Error error = r::sexp::getNames(listSEXP, &names); + if (error) + return -1; + +@@ -155,7 +155,7 @@ + T* pValue) + { + SEXP valueSEXP; +- core::Error error = getNamedListSEXP(listSEXP, name, &valueSEXP); ++ ::core::Error error = getNamedListSEXP(listSEXP, name, &valueSEXP); + if (error) + return error; + else +@@ -168,13 +168,13 @@ + T* pValue, + const T& defaultValue) + { +- core:: Error error = getNamedListElement(listSEXP, name, pValue); ++ ::core:: Error error = getNamedListElement(listSEXP, name, pValue); + if (error) + { + if (error.code() == r::errc::ListElementNotFoundError) + { + *pValue = defaultValue; +- return core::Success(); ++ return ::core::Success(); + } + else + { +@@ -183,7 +183,7 @@ + } + else + { +- return core::Success(); ++ return ::core::Success(); + } + } + +@@ -232,12 +232,12 @@ + { + // set the appropriate value and return success + SET_VECTOR_ELT(listSEXP, valueIndex, valueSEXP); +- return core::Success(); ++ return ::core::Success(); + } + else + { + // otherwise an error +- core::Error error(r::errc::ListElementNotFoundError, ERROR_LOCATION); ++ ::core::Error error(r::errc::ListElementNotFoundError, ERROR_LOCATION); + error.addProperty("element", name); + return error; + } +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/RSourceManager.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/RSourceManager.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/RSourceManager.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/RSourceManager.hpp 2015-03-08 22:23:11.280944146 +0100 +@@ -48,10 +48,10 @@ + bool autoReload() const { return autoReload_; } + void setAutoReload(bool autoReload) { autoReload_ = autoReload; } + +- core::Error sourceTools(const core::FilePath& filePath); ++ ::core::Error sourceTools(const ::core::FilePath& filePath); + void ensureToolsLoaded(); + +- core::Error sourceLocal(const core::FilePath& filePath); ++ ::core::Error sourceLocal(const ::core::FilePath& filePath); + + void reloadIfNecessary(); + +@@ -71,15 +71,15 @@ + typedef boost::unordered_map SourcedFileMap; + + // helper functions +- core::Error source(const core::FilePath& filePath, bool local); +- void reSourceTools(const core::FilePath& filePath); +- void recordSourcedFile(const core::FilePath& filePath, bool local); ++ ::core::Error source(const ::core::FilePath& filePath, bool local); ++ void reSourceTools(const ::core::FilePath& filePath); ++ void recordSourcedFile(const ::core::FilePath& filePath, bool local); + void reloadSourceIfNecessary(const SourcedFileMap::value_type& value); + + // members + bool autoReload_ ; + SourcedFileMap sourcedFiles_ ; +- std::vector toolsFilePaths_; ++ std::vector< ::core::FilePath> toolsFilePaths_; + }; + + } // namespace r +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/session/RClientState.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RClientState.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/session/RClientState.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RClientState.hpp 2015-03-08 22:23:11.287944147 +0100 +@@ -52,41 +52,41 @@ + + void putTemporary(const std::string& scope, + const std::string& name, +- const core::json::Value& value); ++ const ::core::json::Value& value); + +- void putTemporary(const core::json::Object& temporaryState); ++ void putTemporary(const ::core::json::Object& temporaryState); + + void putPersistent(const std::string& scope, + const std::string& name, +- const core::json::Value& value); ++ const ::core::json::Value& value); + +- void putPersistent(const core::json::Object& persistentState); ++ void putPersistent(const ::core::json::Object& persistentState); + + void putProjectPersistent(const std::string& scope, + const std::string& name, +- const core::json::Value& value); ++ const ::core::json::Value& value); + +- void putProjectPersistent(const core::json::Object& projectPersistentState); +- core::json::Value getProjectPersistent(std::string scope, ++ void putProjectPersistent(const ::core::json::Object& projectPersistentState); ++ ::core::json::Value getProjectPersistent(std::string scope, + std::string name); + +- core::Error commit(ClientStateCommitType commitType, +- const core::FilePath& stateDir, +- const core::FilePath& projectStateDir); ++ ::core::Error commit(ClientStateCommitType commitType, ++ const ::core::FilePath& stateDir, ++ const ::core::FilePath& projectStateDir); + +- core::Error restore(const core::FilePath& stateDir, +- const core::FilePath& projectStateDir); ++ ::core::Error restore(const ::core::FilePath& stateDir, ++ const ::core::FilePath& projectStateDir); + +- void currentState(core::json::Object* pCurrentState) const; ++ void currentState(::core::json::Object* pCurrentState) const; + + private: +- void restoreGlobalState(const core::FilePath& stateFile); +- void restoreProjectState(const core::FilePath& stateFile); ++ void restoreGlobalState(const ::core::FilePath& stateFile); ++ void restoreProjectState(const ::core::FilePath& stateFile); + + private: +- core::json::Object temporaryState_ ; +- core::json::Object persistentState_ ; +- core::json::Object projectPersistentState_; ++ ::core::json::Object temporaryState_ ; ++ ::core::json::Object persistentState_ ; ++ ::core::json::Object projectPersistentState_; + }; + + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/session/RConsoleActions.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RConsoleActions.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/session/RConsoleActions.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RConsoleActions.hpp 2015-03-08 22:23:11.293944148 +0100 +@@ -59,17 +59,17 @@ + + // get actions in their wire-representation (two identically sized arrays, + // one for type and one for data) +- void asJson(core::json::Object* pActions) const; ++ void asJson(::core::json::Object* pActions) const; + +- core::Error loadFromFile(const core::FilePath& filePath); +- core::Error saveToFile(const core::FilePath& filePath) const; ++ ::core::Error loadFromFile(const ::core::FilePath& filePath); ++ ::core::Error saveToFile(const ::core::FilePath& filePath) const; + + private: + // protect data using a mutex because background threads (e.g. + // console output capture threads) can interact with console actions + mutable boost::mutex mutex_; +- boost::circular_buffer actionsType_; +- boost::circular_buffer actionsData_; ++ boost::circular_buffer< ::core::json::Value> actionsType_; ++ boost::circular_buffer< ::core::json::Value> actionsData_; + std::vector pendingInput_; + }; + +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/session/RConsoleHistory.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RConsoleHistory.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/session/RConsoleHistory.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RConsoleHistory.hpp 2015-03-08 22:23:11.291944148 +0100 +@@ -78,10 +78,10 @@ + int endIndex, // exclusive, + std::vector* pEntries) const; + +- void asJson(core::json::Array* pHistoryArray) const; ++ void asJson(::core::json::Array* pHistoryArray) const; + +- core::Error loadFromFile(const core::FilePath& filePath, bool verifyFile); +- core::Error saveToFile(const core::FilePath& filePath) const; ++ ::core::Error loadFromFile(const ::core::FilePath& filePath, bool verifyFile); ++ ::core::Error saveToFile(const ::core::FilePath& filePath) const; + + boost::signals::connection connectOnAdd( + const AddSignal::slot_function_type& slot) +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/session/RGraphics.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RGraphics.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/session/RGraphics.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RGraphics.hpp 2015-03-08 22:23:11.296944149 +0100 +@@ -70,7 +70,7 @@ + struct DisplayState + { + DisplayState(const std::string& imageFilename, +- const core::json::Value& manipulatorJson, ++ const ::core::json::Value& manipulatorJson, + int width, + int height, + int activePlotIndex, +@@ -85,7 +85,7 @@ + } + + std::string imageFilename; +- core::json::Value manipulatorJson; ++ ::core::json::Value manipulatorJson; + int width; + int height; + int activePlotIndex; +@@ -107,24 +107,24 @@ + + // plot list + virtual int plotCount() const = 0 ; +- virtual core::Error plotImageFilename(int index, ++ virtual ::core::Error plotImageFilename(int index, + std::string* pImageFilename) const = 0; + virtual int activePlotIndex() const = 0; +- virtual core::Error setActivePlot(int index) = 0; +- virtual core::Error removePlot(int index) = 0; ++ virtual ::core::Error setActivePlot(int index) = 0; ++ virtual ::core::Error removePlot(int index) = 0; + + // actions on active plot +- virtual core::Error savePlotAsImage(const core::FilePath& filePath, ++ virtual ::core::Error savePlotAsImage(const ::core::FilePath& filePath, + const std::string& format, + int widthPx, + int heightPx) = 0; + +- virtual core::Error savePlotAsPdf(const core::FilePath& filePath, ++ virtual ::core::Error savePlotAsPdf(const ::core::FilePath& filePath, + double widthInches, + double heightInches, + bool useCairoPdf) = 0; + +- virtual core::Error savePlotAsMetafile(const core::FilePath& filePath, ++ virtual ::core::Error savePlotAsMetafile(const ::core::FilePath& filePath, + int widthPx, + int heightPx) = 0; + +@@ -138,7 +138,7 @@ + virtual void refresh() = 0; + + // retrieve image path based on filename +- virtual core::FilePath imagePath(const std::string& imageFilename) const = 0; ++ virtual ::core::FilePath imagePath(const std::string& imageFilename) const = 0; + + // clear the display (closes the device) + virtual void clear() = 0; +@@ -147,7 +147,7 @@ + virtual boost::signal& onShowManipulator() = 0; + + // set manipulator values +- virtual void setPlotManipulatorValues(const core::json::Object& values) = 0; ++ virtual void setPlotManipulatorValues(const ::core::json::Object& values) = 0; + virtual void manipulatorPlotClicked(int x, int y) = 0; + + // notify that we are about to execute code +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/session/RSession.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RSession.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/session/RSession.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RSession.hpp 2015-03-08 22:23:11.289944148 +0100 +@@ -58,17 +58,17 @@ + rProfileOnResume(false) + { + } +- core::FilePath userHomePath; +- core::FilePath userScratchPath; +- core::FilePath scopedScratchPath; +- core::FilePath logPath; +- core::FilePath startupEnvironmentFilePath; ++ ::core::FilePath userHomePath; ++ ::core::FilePath userScratchPath; ++ ::core::FilePath scopedScratchPath; ++ ::core::FilePath logPath; ++ ::core::FilePath startupEnvironmentFilePath; + std::string sessionPort; +- boost::function persistentState; +- boost::function rEnvironmentDir; +- boost::function rHistoryDir; ++ boost::function< ::core::Settings&()> persistentState; ++ boost::function< ::core::FilePath()> rEnvironmentDir; ++ boost::function< ::core::FilePath()> rHistoryDir; + boost::function alwaysSaveHistory; +- core::FilePath rSourcePath; ++ ::core::FilePath rSourcePath; + std::string rLibsUser; + std::string rCRANRepos; + bool useInternet2; +@@ -116,16 +116,16 @@ + struct RSuspendOptions; + struct RCallbacks + { +- boost::function init ; ++ boost::function< ::core::Error(const RInitInfo&)> init ; + boost::function consoleRead; + boost::function browseURL; +- boost::function browseFile; ++ boost::function browseFile; + boost::function showHelp; +- boost::function showFile; ++ boost::function showFile; + boost::function consoleWrite; + boost::function consoleHistoryReset; + boost::function locator; +- boost::function chooseFile; ++ boost::function< ::core::FilePath(bool)> chooseFile; + boost::function editFile; + boost::function showMessage ; + boost::function busy; +@@ -136,7 +136,7 @@ + boost::function quit; + boost::function suicide; + boost::function cleanup; +- boost::function serialization; ++ boost::function serialization; + }; + + // run the session +diff -ru rstudio-0.98.1103/src/cpp/r/include/r/session/RSessionUtils.hpp rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RSessionUtils.hpp +--- rstudio-0.98.1103/src/cpp/r/include/r/session/RSessionUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/include/r/session/RSessionUtils.hpp 2015-03-08 22:23:11.298944149 +0100 +@@ -35,7 +35,7 @@ + bool isDefaultPrompt(const std::string& prompt); + + // user home path +-const core::FilePath& userHomePath(); ++const ::core::FilePath& userHomePath(); + + core::FilePath safeCurrentPath(); + +diff -ru rstudio-0.98.1103/src/cpp/r/RErrorCategory.cpp rstudio-0.98.1103-fix/src/cpp/r/RErrorCategory.cpp +--- rstudio-0.98.1103/src/cpp/r/RErrorCategory.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/RErrorCategory.cpp 2015-03-08 22:23:11.148944124 +0100 +@@ -81,15 +81,15 @@ + } + + core::Error rCodeExecutionError(const std::string& errMsg, +- const core::ErrorLocation& location) ++ const ::core::ErrorLocation& location) + { +- core::Error error(errc::CodeExecutionError, location); ++ ::core::Error error(errc::CodeExecutionError, location); + error.addProperty("errormsg", errMsg); + return error; + } + + +-bool isCodeExecutionError(const core::Error& error, std::string* pErrMsg) ++bool isCodeExecutionError(const ::core::Error& error, std::string* pErrMsg) + { + if (error.code() == r::errc::CodeExecutionError) + { +@@ -103,7 +103,7 @@ + } + } + +-std::string endUserErrorMessage(const core::Error& error) ++std::string endUserErrorMessage(const ::core::Error& error) + { + std::string errMsg; + if (isCodeExecutionError(error, &errMsg)) +diff -ru rstudio-0.98.1103/src/cpp/r/RExec.cpp rstudio-0.98.1103-fix/src/cpp/r/RExec.cpp +--- rstudio-0.98.1103/src/cpp/r/RExec.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/RExec.cpp 2015-03-08 22:23:11.251944141 +0100 +@@ -480,7 +480,7 @@ + } + + IgnoreInterruptsScope::IgnoreInterruptsScope() +- : pSignalBlocker_(new core::system::SignalBlocker()) ++ : pSignalBlocker_(new ::core::system::SignalBlocker()) + { + // save suspend state and set suspend flag + previousInterruptsSuspended_ = (R_interrupts_suspended == TRUE); +@@ -490,7 +490,7 @@ + setInterruptsPending(false); + + // enable signal blocker +- Error error = pSignalBlocker_->block(core::system::SigInt); ++ Error error = pSignalBlocker_->block(::core::system::SigInt); + if (error) + LOG_ERROR(error); + } +diff -ru rstudio-0.98.1103/src/cpp/r/RJson.cpp rstudio-0.98.1103-fix/src/cpp/r/RJson.cpp +--- rstudio-0.98.1103/src/cpp/r/RJson.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/RJson.cpp 2015-03-08 22:23:11.256944142 +0100 +@@ -66,7 +66,7 @@ + + Error jsonValueFromVectorElement(SEXP vectorSEXP, + int i, +- core::json::Value* pValue) ++ ::core::json::Value* pValue) + { + // NOTE: currently NaN is represented in json as null. this is problematic + // as parsing routines (such as JS overlay types in GWT) won't handle +@@ -81,14 +81,14 @@ + // and also make sure they are distinguished for other types + + // default to null +- *pValue = core::json::Value(); ++ *pValue = ::core::json::Value(); + + // check for underlying value + switch(TYPEOF(vectorSEXP)) + { + case NILSXP: + { +- *pValue = core::json::Value(); ++ *pValue = ::core::json::Value(); + break; + } + case STRSXP: +@@ -131,7 +131,7 @@ + double imaginary = COMPLEX(vectorSEXP)[i].i; + if ( !ISNAN(real) && !ISNAN(imaginary)) + { +- core::json::Object jsonComplex ; ++ ::core::json::Object jsonComplex ; + jsonComplex["r"] = real; + jsonComplex["i"] = imaginary; + *pValue = jsonComplex; +@@ -153,10 +153,10 @@ + } + + +-Error jsonValueArrayFromList(SEXP listSEXP, core::json::Value* pValue) ++Error jsonValueArrayFromList(SEXP listSEXP, ::core::json::Value* pValue) + { + // value array to return +- core::json::Array jsonValueArray; ++ ::core::json::Array jsonValueArray; + + // return a value for each list item + int listLength = Rf_length(listSEXP); +@@ -166,7 +166,7 @@ + SEXP valueSEXP = VECTOR_ELT(listSEXP, i); + + // extract the value +- core::json::Value jsonValue ; ++ ::core::json::Value jsonValue ; + Error error = jsonValueFromObject(valueSEXP, &jsonValue); + if (error) + return error; +@@ -197,7 +197,7 @@ + return false ; + int nameCount = std::count_if(fieldNames.begin(), + fieldNames.end(), +- &core::string_utils::stringNotEmpty); ++ &::core::string_utils::stringNotEmpty); + if (nameCount != listLength) + return false; + +@@ -208,20 +208,20 @@ + Error jsonObjectFromListElement(SEXP listSEXP, + const std::vector& fieldNames, + int index, +- core::json::Value* pValue) ++ ::core::json::Value* pValue) + { + // note list length + int listLength = Rf_length(listSEXP); + + // compose an object by iterating through the fields +- core::json::Object jsonObject ; ++ ::core::json::Object jsonObject ; + for (int f=0; f fieldNames ; +@@ -267,13 +267,13 @@ + return error; + + // compose object +- core::json::Object object ; ++ ::core::json::Object object ; + int fields = Rf_length(listSEXP); + for (int i=0; i fieldNames ; +@@ -299,13 +299,13 @@ + return error; + + // object array to return +- core::json::Array jsonObjectArray ; ++ ::core::json::Array jsonObjectArray ; + + // iterate through the values + int values = Rf_length(VECTOR_ELT(listSEXP, 0)); + for (int v=0; v rpcHandlers; +diff -ru rstudio-0.98.1103/src/cpp/r/RSexp.cpp rstudio-0.98.1103-fix/src/cpp/r/RSexp.cpp +--- rstudio-0.98.1103/src/cpp/r/RSexp.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/RSexp.cpp 2015-03-08 22:23:11.262944143 +0100 +@@ -284,12 +284,12 @@ + { + // get the appropriate value + *pValueSEXP = VECTOR_ELT(listSEXP, valueIndex); +- return core::Success(); ++ return ::core::Success(); + } + else + { + // otherwise an error +- core::Error error(r::errc::ListElementNotFoundError, ERROR_LOCATION); ++ ::core::Error error(r::errc::ListElementNotFoundError, ERROR_LOCATION); + error.addProperty("element", name); + return error; + } +diff -ru rstudio-0.98.1103/src/cpp/r/RSourceManager.cpp rstudio-0.98.1103-fix/src/cpp/r/RSourceManager.cpp +--- rstudio-0.98.1103/src/cpp/r/RSourceManager.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/RSourceManager.cpp 2015-03-08 22:23:11.139944122 +0100 +@@ -37,7 +37,7 @@ + return instance ; + } + +-Error SourceManager::sourceTools(const core::FilePath& filePath) ++Error SourceManager::sourceTools(const ::core::FilePath& filePath) + { + Error error = sourceLocal(filePath); + if (error) +@@ -85,7 +85,7 @@ + } + + +-void SourceManager::reSourceTools(const core::FilePath& filePath) ++void SourceManager::reSourceTools(const ::core::FilePath& filePath) + { + Error error = source(filePath, true); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsDevice.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsDevice.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsDevice.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsDevice.cpp 2015-03-08 22:23:11.210944134 +0100 +@@ -600,8 +600,8 @@ + *y = grconvertY(*y, "device", "ndc"); + } + +-Error saveSnapshot(const core::FilePath& snapshotFile, +- const core::FilePath& imageFile) ++Error saveSnapshot(const ::core::FilePath& snapshotFile, ++ const ::core::FilePath& imageFile) + { + // ensure we are active + Error error = makeActive(); +@@ -619,7 +619,7 @@ + return handler::writeToPNG(imageFile, pDC); + } + +-Error restoreSnapshot(const core::FilePath& snapshotFile) ++Error restoreSnapshot(const ::core::FilePath& snapshotFile) + { + // ensure we are active + Error error = makeActive(); +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsDevice.hpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsDevice.hpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsDevice.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsDevice.hpp 2015-03-08 22:23:11.192944131 +0100 +@@ -33,7 +33,7 @@ + + // initialize + core::Error initialize( +- const core::FilePath& graphicsPath, ++ const ::core::FilePath& graphicsPath, + const boost::function& locatorFunction); + + // device size +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsHandler.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsHandler.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsHandler.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsHandler.cpp 2015-03-08 22:23:11.172944128 +0100 +@@ -31,7 +31,7 @@ + void (*onBeforeAddDevice)(DeviceContext* pDC); + void (*onAfterAddDevice)(DeviceContext* pDC); + +-core::Error (*writeToPNG)(const core::FilePath& targetPath, ++core::Error (*writeToPNG)(const ::core::FilePath& targetPath, + DeviceContext* pDC); + + void (*circle)(double x, +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsHandler.hpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsHandler.hpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsHandler.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsHandler.hpp 2015-03-08 22:23:11.187944131 +0100 +@@ -47,7 +47,7 @@ + void* pDeviceSpecific; + + // file info +- core::FilePath targetPath; ++ ::core::FilePath targetPath; + int width; + int height; + +@@ -67,7 +67,7 @@ + extern void (*onBeforeAddDevice)(DeviceContext* pDC); + extern void (*onAfterAddDevice)(DeviceContext* pDC); + +-extern core::Error (*writeToPNG)(const core::FilePath& targetPath, ++extern ::core::Error (*writeToPNG)(const ::core::FilePath& targetPath, + DeviceContext* pDC); + + extern void (*circle)(double x, +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlot.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlot.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlot.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlot.cpp 2015-03-08 22:23:11.182944130 +0100 +@@ -129,7 +129,7 @@ + } + + // generate a new storage uuid +- std::string storageUuid = core::system::generateUuid(); ++ std::string storageUuid = ::core::system::generateUuid(); + + // generate snapshot and image files + Error error = graphicsDevice_.saveSnapshot(snapshotFilePath(storageUuid), +@@ -163,7 +163,7 @@ + return Success(); + + // generate a new storage uuid +- std::string storageUuid = core::system::generateUuid(); ++ std::string storageUuid = ::core::system::generateUuid(); + + // generate snapshot file + FilePath snapshotFile = snapshotFilePath(storageUuid); +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlot.hpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlot.hpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlot.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlot.hpp 2015-03-08 22:23:11.196944132 +0100 +@@ -43,11 +43,11 @@ + { + public: + Plot(const GraphicsDeviceFunctions& graphicsDevice, +- const core::FilePath& baseDirPath, ++ const ::core::FilePath& baseDirPath, + SEXP manipulatorSEXP); + + Plot(const GraphicsDeviceFunctions& graphicsDevice, +- const core::FilePath& baseDirPath, ++ const ::core::FilePath& baseDirPath, + const std::string& storageUuid, + const DisplaySize& renderedSize); + +@@ -57,36 +57,36 @@ + + bool hasManipulator() const; + SEXP manipulatorSEXP() const; +- void manipulatorAsJson(core::json::Value* pValue) const; ++ void manipulatorAsJson(::core::json::Value* pValue) const; + void saveManipulator() const; + + void invalidate(); + +- core::Error renderFromDisplay(); +- core::Error renderFromDisplaySnapshot(SEXP snapshot); ++ ::core::Error renderFromDisplay(); ++ ::core::Error renderFromDisplaySnapshot(SEXP snapshot); + std::string imageFilename() const; + +- core::Error renderToDisplay(); ++ ::core::Error renderToDisplay(); + +- core::Error removeFiles(); ++ ::core::Error removeFiles(); + + void purgeInMemoryResources(); + + private: + bool hasStorage() const; + +- core::FilePath snapshotFilePath() const ; +- core::FilePath snapshotFilePath(const std::string& storageUuid) const; +- core::FilePath imageFilePath(const std::string& storageUuid) const; ++ ::core::FilePath snapshotFilePath() const ; ++ ::core::FilePath snapshotFilePath(const std::string& storageUuid) const; ++ ::core::FilePath imageFilePath(const std::string& storageUuid) const; + + bool hasManipulatorFile() const; +- core::FilePath manipulatorFilePath(const std::string& storageUuid) const; ++ ::core::FilePath manipulatorFilePath(const std::string& storageUuid) const; + void loadManipulatorIfNecessary() const; + void saveManipulator(const std::string& storageUuid) const; + + private: + GraphicsDeviceFunctions graphicsDevice_; +- core::FilePath baseDirPath_; ++ ::core::FilePath baseDirPath_; + std::string storageUuid_ ; + DisplaySize renderedSize_ ; + bool needsUpdate_; +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlotManager.cpp 2015-03-08 22:23:11.177944129 +0100 +@@ -374,7 +374,7 @@ + } + + +-Error PlotManager::savePlotAsMetafile(const core::FilePath& filePath, ++Error PlotManager::savePlotAsMetafile(const ::core::FilePath& filePath, + int widthPx, + int heightPx) + { +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlotManager.hpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlotManager.hpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlotManager.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlotManager.hpp 2015-03-08 22:23:11.185944130 +0100 +@@ -61,30 +61,30 @@ + public: + virtual ~PlotManager() {} + +- core::Error initialize(const core::FilePath& graphicsPath, ++ ::core::Error initialize(const ::core::FilePath& graphicsPath, + const GraphicsDeviceFunctions& graphicsDevice, + GraphicsDeviceEvents* pEvents); + + // plot list + virtual int plotCount() const; +- virtual core::Error plotImageFilename(int index, ++ virtual ::core::Error plotImageFilename(int index, + std::string* pImageFilename) const; + virtual int activePlotIndex() const; +- virtual core::Error setActivePlot(int index) ; +- virtual core::Error removePlot(int index); ++ virtual ::core::Error setActivePlot(int index) ; ++ virtual ::core::Error removePlot(int index); + + // actions on active plot +- virtual core::Error savePlotAsImage(const core::FilePath& filePath, ++ virtual ::core::Error savePlotAsImage(const ::core::FilePath& filePath, + const std::string& format, + int widthPx, + int heightPx); + +- virtual core::Error savePlotAsPdf(const core::FilePath& filePath, ++ virtual ::core::Error savePlotAsPdf(const ::core::FilePath& filePath, + double widthInches, + double heightInches, + bool useCairoPdf); + +- virtual core::Error savePlotAsMetafile(const core::FilePath& filePath, ++ virtual ::core::Error savePlotAsMetafile(const ::core::FilePath& filePath, + int widthPx, + int heightPx); + +@@ -98,23 +98,23 @@ + virtual void refresh() ; + + // retrieve image path based on filename +- virtual core::FilePath imagePath(const std::string& imageFilename) const; ++ virtual ::core::FilePath imagePath(const std::string& imageFilename) const; + + virtual void clear(); + + virtual boost::signal& onShowManipulator() ; +- virtual void setPlotManipulatorValues(const core::json::Object& values); ++ virtual void setPlotManipulatorValues(const ::core::json::Object& values); + virtual void manipulatorPlotClicked(int x, int y); + + virtual void onBeforeExecute(); + + // manipulate persistent state +- core::Error savePlotsState(); +- core::Error restorePlotsState(); ++ ::core::Error savePlotsState(); ++ ::core::Error restorePlotsState(); + + // fully serialize and deserialize to an external directory +- core::Error serialize(const core::FilePath& saveToPath); +- core::Error deserialize(const core::FilePath& restoreFromPath); ++ ::core::Error serialize(const ::core::FilePath& saveToPath); ++ ::core::Error deserialize(const ::core::FilePath& restoreFromPath); + + private: + +@@ -145,26 +145,26 @@ + void renderActivePlotToDisplay(); + + // render active plot file file +- core::Error savePlotAsFile(const boost::function& ++ ::core::Error savePlotAsFile(const boost::function< ::core::Error()>& + deviceCreationFunction); +- core::Error savePlotAsFile(const std::string& fileDeviceCreationCode); ++ ::core::Error savePlotAsFile(const std::string& fileDeviceCreationCode); + +- core::Error savePlotAsBitmapFile(const core::FilePath& targetPath, ++ ::core::Error savePlotAsBitmapFile(const ::core::FilePath& targetPath, + const std::string& bitmapFileType, + int width, + int height); + +- core::Error savePlotAsSvg(const core::FilePath& targetPath, ++ ::core::Error savePlotAsSvg(const ::core::FilePath& targetPath, + int width, + int height); + +- core::Error savePlotAsPostscript(const core::FilePath& targetPath, ++ ::core::Error savePlotAsPostscript(const ::core::FilePath& targetPath, + int width, + int height); + + + // error helpers +- core::Error plotIndexError(int index, const core::ErrorLocation& location) ++ ::core::Error plotIndexError(int index, const ::core::ErrorLocation& location) + const; + + std::string emptyImageFilename() const ; +@@ -173,8 +173,8 @@ + friend class SuppressDeviceEventsScope; + + // storage paths +- core::FilePath plotsStateFile_; +- core::FilePath graphicsPath_; ++ ::core::FilePath plotsStateFile_; ++ ::core::FilePath graphicsPath_; + + // interface to graphics device + GraphicsDeviceFunctions graphicsDevice_ ; +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlotManipulator.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlotManipulator.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsPlotManipulator.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsPlotManipulator.cpp 2015-03-08 22:23:11.216944135 +0100 +@@ -78,12 +78,12 @@ + return Success(); + } + +-void PlotManipulator::asJson(core::json::Value* pValue) const ++void PlotManipulator::asJson(::core::json::Value* pValue) const + { + if (!empty()) + { + // build manipulator json +- core::json::Object manipulator; ++ ::core::json::Object manipulator; + + // meta-info + manipulator["id"] = getAsJson(".id"); +@@ -91,7 +91,7 @@ + manipulator["variables"] = getAsJson(".variables"); + + // variable values +- core::json::Value valuesJson; ++ ::core::json::Value valuesJson; + SEXP valuesSEXP = getUserVisibleValuesList(); + Error error = r::json::jsonValueFromObject(valuesSEXP, &valuesJson); + if (error) +@@ -103,7 +103,7 @@ + } + else + { +- *pValue = core::json::Value(); ++ *pValue = ::core::json::Value(); + } + } + +@@ -140,7 +140,7 @@ + + core::json::Value PlotManipulator::getAsJson(const std::string& name) const + { +- core::json::Value value; ++ ::core::json::Value value; + Error error = r::json::jsonValueFromObject(get(name), &value); + if (error) + LOG_ERROR(error); +@@ -155,11 +155,11 @@ + if (error) + { + LOG_ERROR(error); +- return core::json::Object(); ++ return ::core::json::Object(); + } + + // json object to return +- core::json::Object control; ++ ::core::json::Object control; + + int length = r::sexp::length(controlSEXP); + for (int i=0; i& onShowManipulator() ; +- void setPlotManipulatorValues(const core::json::Object& values); ++ void setPlotManipulatorValues(const ::core::json::Object& values); + void manipulatorPlotClicked(int x, int y); + + void executeAndAttachManipulator(SEXP manipulatorSEXP); +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsTypes.hpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsTypes.hpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsTypes.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsTypes.hpp 2015-03-08 22:23:11.223944137 +0100 +@@ -63,9 +63,9 @@ + boost::function isActive; + boost::function displaySize; + UnitConversionFunctions convert; +- boost::function saveSnapshot; +- boost::function restoreSnapshot; ++ boost::function< ::core::Error(const ::core::FilePath&, ++ const ::core::FilePath&)> saveSnapshot; ++ boost::function< ::core::Error(const ::core::FilePath&)> restoreSnapshot; + boost::function copyToActiveDevice; + boost::function imageFileExtension; + boost::function close; +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsUtils.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsUtils.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsUtils.cpp 2015-03-08 22:23:11.202944133 +0100 +@@ -201,7 +201,7 @@ + } + } + +-void reportError(const core::Error& error) ++void reportError(const ::core::Error& error) + { + std::string endUserMessage = r::endUserErrorMessage(error); + std::string errmsg = ("Graphics error: " + endUserMessage + "\n"); +@@ -211,7 +211,7 @@ + void logAndReportError(const Error& error, const ErrorLocation& location) + { + // log +- core::log::logError(error, location); ++ ::core::log::logError(error, location); + + // report to user + reportError(error); +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsUtils.hpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsUtils.hpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RGraphicsUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RGraphicsUtils.hpp 2015-03-08 22:23:11.212944135 +0100 +@@ -44,10 +44,10 @@ + boost::shared_ptr pImpl_; + }; + +-void reportError(const core::Error& error); ++void reportError(const ::core::Error& error); + +-void logAndReportError(const core::Error& error, +- const core::ErrorLocation& location); ++void logAndReportError(const ::core::Error& error, ++ const ::core::ErrorLocation& location); + + } // namespace graphics + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/r/session/graphics/RShadowPngGraphicsHandler.cpp rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RShadowPngGraphicsHandler.cpp +--- rstudio-0.98.1103/src/cpp/r/session/graphics/RShadowPngGraphicsHandler.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/graphics/RShadowPngGraphicsHandler.cpp 2015-03-08 22:23:11.205944134 +0100 +@@ -157,7 +157,7 @@ + FilePath tempFile(const std::string& extension) + { + FilePath tempFileDir(string_utils::systemToUtf8(R_TempDir)); +- FilePath tempFilePath = tempFileDir.complete(core::system::generateUuid(false) + ++ FilePath tempFilePath = tempFileDir.complete(::core::system::generateUuid(false) + + "." + extension); + return tempFilePath; + } +diff -ru rstudio-0.98.1103/src/cpp/r/session/RClientMetrics.hpp rstudio-0.98.1103-fix/src/cpp/r/session/RClientMetrics.hpp +--- rstudio-0.98.1103/src/cpp/r/session/RClientMetrics.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RClientMetrics.hpp 2015-03-08 22:23:11.227944137 +0100 +@@ -29,8 +29,8 @@ + + RClientMetrics get(); + void set(const RClientMetrics& metrics); +-void save(core::Settings* pSettings); +-void restore(const core::Settings& settings); ++void save(::core::Settings* pSettings); ++void restore(const ::core::Settings& settings); + + } // namespace client_metrics + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/r/session/RClientState.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RClientState.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RClientState.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RClientState.cpp 2015-03-08 22:23:11.236944139 +0100 +@@ -83,7 +83,7 @@ + + void commitState(const json::Object& stateContainer, + const std::string& fileExt, +- const core::FilePath& stateDir) ++ const ::core::FilePath& stateDir) + { + for (json::Object::const_iterator + it = stateContainer.begin(); it != stateContainer.end(); ++it) +@@ -100,7 +100,7 @@ + } + } + +-void restoreState(const core::FilePath& stateFilePath, ++void restoreState(const ::core::FilePath& stateFilePath, + json::Object* pStateContainer) + { + // read the contents of the file +@@ -248,7 +248,7 @@ + } + else + { +- if (!json::isType(i->second)) ++ if (!json::isType< ::core::json::Object>(i->second)) + return json::Value(); + json::Object& scopeObject = (i->second).get_obj(); + return scopeObject[name]; +@@ -263,8 +263,8 @@ + + + Error ClientState::commit(ClientStateCommitType commitType, +- const core::FilePath& stateDir, +- const core::FilePath& projectStateDir) ++ const ::core::FilePath& stateDir, ++ const ::core::FilePath& projectStateDir) + { + // remove and re-create the stateDirs + Error error = removeAndRecreateStateDir(stateDir); +diff -ru rstudio-0.98.1103/src/cpp/r/session/RConsoleActions.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RConsoleActions.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RConsoleActions.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RConsoleActions.cpp 2015-03-08 22:23:11.168944127 +0100 +@@ -214,7 +214,7 @@ + return Success(); + } + +-Error ConsoleActions::saveToFile(const core::FilePath& filePath) const ++Error ConsoleActions::saveToFile(const ::core::FilePath& filePath) const + { + // write actions + json::Object actionsObject; +diff -ru rstudio-0.98.1103/src/cpp/r/session/RConsoleHistory.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RConsoleHistory.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RConsoleHistory.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RConsoleHistory.cpp 2015-03-08 22:23:11.165944127 +0100 +@@ -50,7 +50,7 @@ + + void ConsoleHistory::setCapacityFromRHistsize() + { +- std::string histSize = core::system::getenv("R_HISTSIZE"); ++ std::string histSize = ::core::system::getenv("R_HISTSIZE"); + if (!histSize.empty()) + { + setCapacity( +@@ -154,10 +154,10 @@ + // tolerate file not found -- the user may not have any prior history + if (filePath.exists()) + { +- return core::readCollectionFromFile >( ++ return ::core::readCollectionFromFile >( + filePath, + &historyBuffer_, +- core::parseString); ++ ::core::parseString); + } + else if (verifyFile) + { +@@ -172,10 +172,10 @@ + + Error ConsoleHistory::saveToFile(const FilePath& filePath) const + { +- return core::writeCollectionToFile >( ++ return ::core::writeCollectionToFile >( + filePath, + historyBuffer_, +- core::stringifyString); ++ ::core::stringifyString); + } + + void ConsoleHistory::safeRemove(int index) +diff -ru rstudio-0.98.1103/src/cpp/r/session/RDiscovery.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RDiscovery.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RDiscovery.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RDiscovery.cpp 2015-03-08 22:23:11.242944140 +0100 +@@ -56,16 +56,16 @@ + Error discoverR(RLocations* pLocations) + { + // rhome +- std::string rHome = core::system::getenv("R_HOME"); ++ std::string rHome = ::core::system::getenv("R_HOME"); + if (rHome.empty() || !FilePath(rHome).exists()) +- return core::pathNotFoundError(rHome, ERROR_LOCATION); ++ return ::core::pathNotFoundError(rHome, ERROR_LOCATION); + else + pLocations->homePath = rHome; + + // rdocdir +- std::string rDocDir = core::system::getenv("R_DOC_DIR"); ++ std::string rDocDir = ::core::system::getenv("R_DOC_DIR"); + if (rDocDir.empty() || !FilePath(rDocDir).exists()) +- return core::pathNotFoundError(rDocDir, ERROR_LOCATION); ++ return ::core::pathNotFoundError(rDocDir, ERROR_LOCATION); + else + pLocations->docPath = rDocDir; + +diff -ru rstudio-0.98.1103/src/cpp/r/session/REmbedded.hpp rstudio-0.98.1103-fix/src/cpp/r/session/REmbedded.hpp +--- rstudio-0.98.1103/src/cpp/r/session/REmbedded.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/REmbedded.hpp 2015-03-08 22:23:11.150944124 +0100 +@@ -61,8 +61,8 @@ + void (*cleanUp)(SA_TYPE, int, int); + }; + +-void runEmbeddedR(const core::FilePath& rHome, +- const core::FilePath& userHome, ++void runEmbeddedR(const ::core::FilePath& rHome, ++ const ::core::FilePath& userHome, + bool quiet, + bool loadInitFile, + SA_TYPE defaultSaveAction, +diff -ru rstudio-0.98.1103/src/cpp/r/session/REmbeddedPosix.cpp rstudio-0.98.1103-fix/src/cpp/r/session/REmbeddedPosix.cpp +--- rstudio-0.98.1103/src/cpp/r/session/REmbeddedPosix.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/REmbeddedPosix.cpp 2015-03-08 22:23:11.230944138 +0100 +@@ -45,8 +45,8 @@ + namespace r { + namespace session { + +-void runEmbeddedR(const core::FilePath& /*rHome*/, // ignored on posix +- const core::FilePath& /*userHome*/, // ignored on posix ++void runEmbeddedR(const ::core::FilePath& /*rHome*/, // ignored on posix ++ const ::core::FilePath& /*userHome*/, // ignored on posix + bool quiet, + bool loadInitFile, + SA_TYPE defaultSaveAction, +@@ -185,7 +185,7 @@ + char* dlError = ::dlerror(); + if (dlError) + errmsg += ": " + std::string(dlError); +- core::log::logErrorMessage(errmsg, location); ++ ::core::log::logErrorMessage(errmsg, location); + } + + // Note that when we passed QCF_SET_FRONT to QuartzCocoa_SetupEventLoop +diff -ru rstudio-0.98.1103/src/cpp/r/session/REmbeddedWin32.cpp rstudio-0.98.1103-fix/src/cpp/r/session/REmbeddedWin32.cpp +--- rstudio-0.98.1103/src/cpp/r/session/REmbeddedWin32.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/REmbeddedWin32.cpp 2015-03-08 22:23:11.233944138 +0100 +@@ -127,8 +127,8 @@ + + } + +-void runEmbeddedR(const core::FilePath& rHome, +- const core::FilePath& userHome, ++void runEmbeddedR(const ::core::FilePath& rHome, ++ const ::core::FilePath& userHome, + bool quiet, + bool loadInitFile, + SA_TYPE defaultSaveAction, +diff -ru rstudio-0.98.1103/src/cpp/r/session/RRestartContext.hpp rstudio-0.98.1103-fix/src/cpp/r/session/RRestartContext.hpp +--- rstudio-0.98.1103/src/cpp/r/session/RRestartContext.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RRestartContext.hpp 2015-03-08 22:23:11.244944140 +0100 +@@ -35,23 +35,23 @@ + + public: + +- void initialize(const core::FilePath& scopePath, ++ void initialize(const ::core::FilePath& scopePath, + const std::string& contextId); + + bool hasSessionState() const; + + bool rProfileOnRestore() const; + +- core::FilePath sessionStatePath() const; ++ ::core::FilePath sessionStatePath() const; + + void removeSessionState(); + +- static core::FilePath createSessionStatePath( +- const core::FilePath& scopePath, ++ static ::core::FilePath createSessionStatePath( ++ const ::core::FilePath& scopePath, + const std::string& contextId); + + private: +- core::FilePath sessionStatePath_; ++ ::core::FilePath sessionStatePath_; + }; + + +diff -ru rstudio-0.98.1103/src/cpp/r/session/RSearchPath.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RSearchPath.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RSearchPath.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RSearchPath.cpp 2015-03-08 22:23:11.247944141 +0100 +@@ -72,7 +72,7 @@ + // add context to error and log it + Error restoreError = error ; + restoreError.addProperty("context", message); +- core::log::logError(restoreError, location); ++ ::core::log::logError(restoreError, location); + + // notify end-user + std::string report = message + ": " + error.code().message() + "\n"; +@@ -86,7 +86,7 @@ + return executeSafely(boost::bind(R_SaveGlobalEnvToFile, envPath.c_str())); + } + +-Error restoreGlobalEnvironment(const core::FilePath& environmentFile) ++Error restoreGlobalEnvironment(const ::core::FilePath& environmentFile) + { + // tolerate no environment saved + if (!environmentFile.exists()) +@@ -282,7 +282,7 @@ + + if (!path.empty()) + { +- path = core::string_utils::systemToUtf8(path); ++ path = ::core::string_utils::systemToUtf8(path); + packagePaths[name] = path; + } + } +diff -ru rstudio-0.98.1103/src/cpp/r/session/RSearchPath.hpp rstudio-0.98.1103-fix/src/cpp/r/session/RSearchPath.hpp +--- rstudio-0.98.1103/src/cpp/r/session/RSearchPath.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RSearchPath.hpp 2015-03-08 22:23:11.160944126 +0100 +@@ -25,9 +25,9 @@ + namespace session { + namespace search_path { + +-core::Error save(const core::FilePath& statePath); +-core::Error saveGlobalEnvironment(const core::FilePath& statePath); +-core::Error restore(const core::FilePath& statePath); ++core::Error save(const ::core::FilePath& statePath); ++core::Error saveGlobalEnvironment(const ::core::FilePath& statePath); ++core::Error restore(const ::core::FilePath& statePath); + + } // namespace search_path + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/r/session/RSession.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RSession.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RSession.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RSession.cpp 2015-03-08 22:23:11.158944126 +0100 +@@ -110,7 +110,7 @@ + + FilePath rHistoryFilePath() + { +- std::string histFile = core::system::getenv("R_HISTFILE"); ++ std::string histFile = ::core::system::getenv("R_HISTFILE"); + boost::algorithm::trim(histFile); + if (histFile.empty()) + histFile = ".Rhistory"; +@@ -403,7 +403,7 @@ + else + { + graphicsPath = r::session::utils::tempDir().complete( +- "rs-graphics-" + core::system::generateUuid()); ++ "rs-graphics-" + ::core::system::generateUuid()); + } + + error = graphics::device::initialize(graphicsPath, +@@ -517,7 +517,7 @@ + { + FilePath abendLogPath = s_options.logPath.complete( + "rsession_abort_msg.log"); +- Error error = core::writeStringToFile(abendLogPath, msg); ++ Error error = ::core::writeStringToFile(abendLogPath, msg); + if (error) + LOG_ERROR(error); + } +@@ -531,7 +531,7 @@ + // provide error message if the error was unexpected + std::string msg; + if (!error.expected()) +- msg = core::log::errorAsLogEntry(error); ++ msg = ::core::log::errorAsLogEntry(error); + + rSuicide(msg); + } +@@ -959,13 +959,13 @@ + + // transform into FilePath + std::string path = URL.substr(filePrefix.length()); +- path = core::http::util::urlDecode(path); ++ path = ::core::http::util::urlDecode(path); + FilePath filePath(r::util::fixPath(path)); + + // sometimes R passes short paths (like for files within the + // R home directory). Convert these to long paths + #ifdef _WIN32 +- core::system::ensureLongPath(&filePath); ++ ::core::system::ensureLongPath(&filePath); + #endif + + // fire browseFile +@@ -992,7 +992,7 @@ + SEXP rs_createUUID() + { + r::sexp::Protect rProtect; +- return r::sexp::create(core::system::generateUuid(false), &rProtect); ++ return r::sexp::create(::core::system::generateUuid(false), &rProtect); + } + + SEXP rs_loadHistory(SEXP sFile) +@@ -1314,14 +1314,14 @@ + return error; + + // R_HOME +- core::system::setenv("R_HOME", rLocations.homePath); ++ ::core::system::setenv("R_HOME", rLocations.homePath); + + // R_DOC_DIR (required by help-links.sh) +- core::system::setenv("R_DOC_DIR", rLocations.docPath); ++ ::core::system::setenv("R_DOC_DIR", rLocations.docPath); + + // R_LIBS_USER + if (!s_options.rLibsUser.empty()) +- core::system::setenv("R_LIBS_USER", s_options.rLibsUser); ++ ::core::system::setenv("R_LIBS_USER", s_options.rLibsUser); + + // set compatible graphics engine version + int engineVersion = s_options.rCompatibleGraphicsEngineVersion; +@@ -1635,7 +1635,7 @@ + + bool isPackratModeOn() + { +- return !core::system::getenv("R_PACKRAT_MODE").empty(); ++ return !::core::system::getenv("R_PACKRAT_MODE").empty(); + } + + bool isDefaultPrompt(const std::string& prompt) +diff -ru rstudio-0.98.1103/src/cpp/r/session/RSessionState.cpp rstudio-0.98.1103-fix/src/cpp/r/session/RSessionState.cpp +--- rstudio-0.98.1103/src/cpp/r/session/RSessionState.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RSessionState.cpp 2015-03-08 22:23:11.240944139 +0100 +@@ -90,16 +90,16 @@ + Error error = envFile.removeIfExists(); + if (error) + return error; +- core::Settings envSettings; ++ ::core::Settings envSettings; + error = envSettings.initialize(envFile); + if (error) + return error; + + // get environment and write it to the file +- core::system::Options env; +- core::system::environment(&env); ++ ::core::system::Options env; ++ ::core::system::environment(&env); + envSettings.beginUpdate(); +- BOOST_FOREACH(const core::system::Option& var, env) ++ BOOST_FOREACH(const ::core::system::Option& var, env) + { + envSettings.set(var.first, var.second); + } +@@ -110,7 +110,7 @@ + + void setEnvVar(const std::string& name, const std::string& value) + { +- core::system::setenv(name, value); ++ ::core::system::setenv(name, value); + } + + Error restoreEnvironmentVars(const FilePath& envFile) +@@ -119,7 +119,7 @@ + return Success(); + + // read settings file +- core::Settings envSettings; ++ ::core::Settings envSettings; + Error error = envSettings.initialize(envFile); + if (error) + return error; +@@ -163,7 +163,7 @@ + // add context to error and log it + Error serializationError = error ; + serializationError.addProperty("context", message); +- core::log::logError(serializationError, location); ++ ::core::log::logError(serializationError, location); + + // notify end-user + std::string report = message + ": " + error.code().message() + "\n"; +@@ -370,7 +370,7 @@ + } + + +-bool saveMinimal(const core::FilePath& statePath, ++bool saveMinimal(const ::core::FilePath& statePath, + bool saveGlobalEnvironment) + { + // initialize context +@@ -414,7 +414,7 @@ + + namespace { + +-bool getBoolSetting(const core::FilePath& statePath, ++bool getBoolSetting(const ::core::FilePath& statePath, + const std::string& name, + bool defaultValue) + { +@@ -431,12 +431,12 @@ + + } // anonymous namespace + +-bool rProfileOnRestore(const core::FilePath& statePath) ++bool rProfileOnRestore(const ::core::FilePath& statePath) + { + return getBoolSetting(statePath, kRProfileOnRestore, true); + } + +-bool packratModeEnabled(const core::FilePath& statePath) ++bool packratModeEnabled(const ::core::FilePath& statePath) + { + return getBoolSetting(statePath, kPackratModeOn, false); + } +diff -ru rstudio-0.98.1103/src/cpp/r/session/RSessionState.hpp rstudio-0.98.1103-fix/src/cpp/r/session/RSessionState.hpp +--- rstudio-0.98.1103/src/cpp/r/session/RSessionState.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/r/session/RSessionState.hpp 2015-03-08 22:23:11.225944137 +0100 +@@ -30,25 +30,25 @@ + namespace session { + namespace state { + +-bool save(const core::FilePath& statePath, ++bool save(const ::core::FilePath& statePath, + bool serverMode, + bool excludePackages, + bool disableSaveCompression); + +-bool saveMinimal(const core::FilePath& statePath, ++bool saveMinimal(const ::core::FilePath& statePath, + bool saveGlobalEnvironment); + + +-bool rProfileOnRestore(const core::FilePath& statePath); ++bool rProfileOnRestore(const ::core::FilePath& statePath); + +-bool packratModeEnabled(const core::FilePath& statePath); ++bool packratModeEnabled(const ::core::FilePath& statePath); + +-bool restore(const core::FilePath& statePath, ++bool restore(const ::core::FilePath& statePath, + bool serverMode, +- boost::function* pDeferredRestoreAction, ++ boost::function< ::core::Error()>* pDeferredRestoreAction, + std::string* pErrorMessages); + +-bool destroy(const core::FilePath& statePath); ++bool destroy(const ::core::FilePath& statePath); + + } // namespace state + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/server/auth/ServerAuthHandler.cpp rstudio-0.98.1103-fix/src/cpp/server/auth/ServerAuthHandler.cpp +--- rstudio-0.98.1103/src/cpp/server/auth/ServerAuthHandler.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/auth/ServerAuthHandler.cpp 2015-03-08 22:23:09.679943875 +0100 +@@ -36,7 +36,7 @@ + Handler s_handler; + + void updateCredentialsNotSupported( +- boost::shared_ptr pConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> pConnection) + { + // alias response + http::Response* pResponse = &(pConnection->response()); +@@ -60,7 +60,7 @@ + const char * const kRefreshCredentialsAndContinue = "/auth-refresh-credentials"; + + +-std::string getUserIdentifier(const core::http::Request& request) ++std::string getUserIdentifier(const ::core::http::Request& request) + { + return s_handler.getUserIdentifier(request); + } +@@ -70,20 +70,20 @@ + return s_handler.userIdentifierToLocalUsername(userIdentifier); + } + +-bool mainPageFilter(const core::http::Request& request, +- core::http::Response* pResponse) ++bool mainPageFilter(const ::core::http::Request& request, ++ ::core::http::Response* pResponse) + { + return s_handler.mainPageFilter(request, pResponse); + } + +-void signInThenContinue(const core::http::Request& request, +- core::http::Response* pResponse) ++void signInThenContinue(const ::core::http::Request& request, ++ ::core::http::Response* pResponse) + { + s_handler.signInThenContinue(request, pResponse); + } + + void refreshCredentialsThenContinue( +- boost::shared_ptr pConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> pConnection) + { + s_handler.refreshCredentialsThenContinue(pConnection); + } +@@ -122,10 +122,10 @@ + return !s_handler.setSignInCookies.empty(); + } + +-void setSignInCookies(const core::http::Request& request, ++void setSignInCookies(const ::core::http::Request& request, + const std::string& username, + bool persist, +- core::http::Response* pResponse) ++ ::core::http::Response* pResponse) + { + s_handler.setSignInCookies(request, username, persist, pResponse); + } +diff -ru rstudio-0.98.1103/src/cpp/server/auth/ServerSecureCookie.cpp rstudio-0.98.1103-fix/src/cpp/server/auth/ServerSecureCookie.cpp +--- rstudio-0.98.1103/src/cpp/server/auth/ServerSecureCookie.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/auth/ServerSecureCookie.cpp 2015-03-08 22:23:09.682943876 +0100 +@@ -65,18 +65,18 @@ + + // compute hmac for the message + std::vector hmac; +- Error error = core::system::crypto::HMAC_SHA1(message, cookieKey, &hmac); ++ Error error = ::core::system::crypto::HMAC_SHA1(message, cookieKey, &hmac); + if (error) + return error; + + // base 64 encode it +- return core::system::crypto::base64Encode(hmac, pHMAC); ++ return ::core::system::crypto::base64Encode(hmac, pHMAC); + } + + http::Cookie createSecureCookie( + const std::string& name, + const std::string& value, +- const core::http::Request& request, ++ const ::core::http::Request& request, + const boost::posix_time::time_duration& validDuration, + const std::string& path) + { +@@ -115,7 +115,7 @@ + + } // anonymous namespace + +-std::string readSecureCookie(const core::http::Request& request, ++std::string readSecureCookie(const ::core::http::Request& request, + const std::string& name) + { + // get the signed cookie value +@@ -219,7 +219,7 @@ + void remove(const http::Request& request, + const std::string& name, + const std::string& path, +- core::http::Response* pResponse) ++ ::core::http::Response* pResponse) + { + // create vanilla cookie (no need for secure cookie since we are removing) + http::Cookie cookie(request, name, std::string(), path); +@@ -235,7 +235,7 @@ + { + // determine path to use for secure cookie key file + FilePath secureCookieKeyPath; +- if (core::system::effectiveUserIsRoot()) ++ if (::core::system::effectiveUserIsRoot()) + { + secureCookieKeyPath = FilePath("/etc/rstudio/secure-cookie-key"); + if (!secureCookieKeyPath.exists()) +@@ -269,7 +269,7 @@ + else + { + // generate a new key +- std::string secureCookieKey = core::system::generateUuid(false); ++ std::string secureCookieKey = ::core::system::generateUuid(false); + + // ensure the parent directory + Error error = secureCookieKeyPath.parent().ensureDirectory(); +@@ -283,7 +283,7 @@ + + // change mode it so it is only readable and writeable by this user + if (changeFileMode(secureCookieKeyPath, +- core::system::UserReadWriteMode) < 0) ++ ::core::system::UserReadWriteMode) < 0) + { + return systemError(errno, ERROR_LOCATION); + } +diff -ru rstudio-0.98.1103/src/cpp/server/auth/ServerValidateUser.cpp rstudio-0.98.1103-fix/src/cpp/server/auth/ServerValidateUser.cpp +--- rstudio-0.98.1103/src/cpp/server/auth/ServerValidateUser.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/auth/ServerValidateUser.cpp 2015-03-08 22:23:09.674943874 +0100 +@@ -38,12 +38,12 @@ + return true; + + // get the user +- core::system::user::User user; ++ ::core::system::user::User user; + Error error = userFromUsername(username, &user); + if (error) + { + // log the error only if it is unexpected +- if (!core::system::isUserNotFoundError(error)) ++ if (!::core::system::isUserNotFoundError(error)) + LOG_ERROR(error); + + // not found either due to non-existence or an unexpected error +@@ -55,7 +55,7 @@ + { + // see if they are a member of the required group + bool belongsToGroup ; +- error = core::system::userBelongsToGroup(user, ++ error = ::core::system::userBelongsToGroup(user, + requiredGroup, + &belongsToGroup); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/auth/ServerAuthHandler.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/auth/ServerAuthHandler.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/auth/ServerAuthHandler.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/auth/ServerAuthHandler.hpp 2015-03-08 22:23:09.701943879 +0100 +@@ -35,15 +35,15 @@ + extern const char * const kRefreshCredentialsAndContinue; + + // functions which can be called on the handler directly +-std::string getUserIdentifier(const core::http::Request& request); ++std::string getUserIdentifier(const ::core::http::Request& request); + + std::string userIdentifierToLocalUsername(const std::string& userIdentifier); + +-bool mainPageFilter(const core::http::Request& request, +- core::http::Response* pResponse); ++bool mainPageFilter(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + +-void signInThenContinue(const core::http::Request& request, +- core::http::Response* pResponse); ++void signInThenContinue(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + + // Special uri handler which attempts to refresh the user's + // credentials then continues on to the originally requested +@@ -51,26 +51,26 @@ + // auth back-end doesn't support this behavior then it should + // redirect to the sign-in page + void refreshCredentialsThenContinue( +- boost::shared_ptr pConnection); ++ boost::shared_ptr< ::core::http::AsyncConnection> pConnection); + + + // functions which must be provided by an auth handler + struct Handler + { +- boost::function getUserIdentifier; ++ boost::function getUserIdentifier; + boost::function + userIdentifierToLocalUsername; +- core::http::UriFilterFunction mainPageFilter; +- core::http::UriHandlerFunction signInThenContinue; +- core::http::AsyncUriHandlerFunction refreshCredentialsThenContinue; +- core::http::AsyncUriHandlerFunction updateCredentials; +- core::http::UriHandlerFunction signIn; +- core::http::UriHandlerFunction signOut; ++ ::core::http::UriFilterFunction mainPageFilter; ++ ::core::http::UriHandlerFunction signInThenContinue; ++ ::core::http::AsyncUriHandlerFunction refreshCredentialsThenContinue; ++ ::core::http::AsyncUriHandlerFunction updateCredentials; ++ ::core::http::UriHandlerFunction signIn; ++ ::core::http::UriHandlerFunction signOut; + +- boost::function setSignInCookies; ++ ::core::http::Response*)> setSignInCookies; + }; + + // register the auth handler +@@ -81,14 +81,14 @@ + + // set sign in cookies + bool canSetSignInCookies(); +-void setSignInCookies(const core::http::Request& request, ++void setSignInCookies(const ::core::http::Request& request, + const std::string& username, + bool persist, +- core::http::Response* pResponse); ++ ::core::http::Response* pResponse); + + // sign out +-void signOut(const core::http::Request& request, +- core::http::Response* pResponse); ++void signOut(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + + } // namespace handler + } // namespace auth +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/auth/ServerSecureCookie.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/auth/ServerSecureCookie.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/auth/ServerSecureCookie.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/auth/ServerSecureCookie.hpp 2015-03-08 22:23:09.705943880 +0100 +@@ -34,7 +34,7 @@ + namespace auth { + namespace secure_cookie { + +-std::string readSecureCookie(const core::http::Request& request, ++std::string readSecureCookie(const ::core::http::Request& request, + const std::string& name); + + void set(const std::string& name, +@@ -55,7 +55,7 @@ + void remove(const http::Request& request, + const std::string& name, + const std::string& path, +- core::http::Response* pResponse); ++ ::core::http::Response* pResponse); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/auth/ServerSecureUriHandler.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/auth/ServerSecureUriHandler.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/auth/ServerSecureUriHandler.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/auth/ServerSecureUriHandler.hpp 2015-03-08 22:23:09.703943879 +0100 +@@ -33,12 +33,12 @@ + + typedef boost::function SecureUriHandlerFunction ; ++ const ::core::http::Request&, ++ ::core::http::Response*)> SecureUriHandlerFunction ; + + typedef boost::function)> ++ boost::shared_ptr< ::core::http::AsyncConnection>)> + SecureAsyncUriHandlerFunction; + + +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerErrorCategory.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerErrorCategory.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerErrorCategory.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerErrorCategory.hpp 2015-03-08 22:23:09.696943878 +0100 +@@ -60,9 +60,9 @@ + } // namespace errc + + +-bool isAuthenticationError(const core::Error& error); ++bool isAuthenticationError(const ::core::Error& error); + +-bool isSessionUnavailableError(const core::Error& error); ++bool isSessionUnavailableError(const ::core::Error& error); + + } // namespace server + +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerOptions.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerOptions.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerOptions.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerOptions.hpp 2015-03-08 22:23:09.708943880 +0100 +@@ -45,7 +45,7 @@ + + public: + virtual ~Options() {} +- core::ProgramStatus read(int argc, ++ ::core::ProgramStatus read(int argc, + char * const argv[], + std::ostream& osWarnings); + +@@ -99,9 +99,9 @@ + return std::string(wwwLocalPath_.c_str()); + } + +- core::FilePath wwwSymbolMapsPath() const ++ ::core::FilePath wwwSymbolMapsPath() const + { +- return core::FilePath(wwwSymbolMapsPath_.c_str()); ++ return ::core::FilePath(wwwSymbolMapsPath_.c_str()); + } + + bool wwwUseEmulatedStack() const +@@ -188,7 +188,7 @@ + + private: + +- void resolvePath(const core::FilePath& basePath, ++ void resolvePath(const ::core::FilePath& basePath, + std::string* pPath) const; + + void addOverlayOptions(boost::program_options::options_description* pServer, +@@ -213,12 +213,12 @@ + + void setOverlayOption(const std::string& name, int value) + { +- setOverlayOption(name, core::safe_convert::numberToString(value)); ++ setOverlayOption(name, ::core::safe_convert::numberToString(value)); + } + + + private: +- core::FilePath installPath_; ++ ::core::FilePath installPath_; + bool verifyInstallation_; + std::string serverWorkingDir_; + std::string serverUser_; +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerProcessSupervisor.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerProcessSupervisor.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerProcessSupervisor.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerProcessSupervisor.hpp 2015-03-08 22:23:09.692943877 +0100 +@@ -32,8 +32,8 @@ + const std::string& executable, + const std::vector& args, + const std::string& input, +- const core::system::ProcessOptions& options, +- const boost::function& onCompleted); ++ const ::core::system::ProcessOptions& options, ++ const boost::function& onCompleted); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerScheduler.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerScheduler.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerScheduler.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerScheduler.hpp 2015-03-08 22:23:09.690943877 +0100 +@@ -27,7 +27,7 @@ + // + // note that this function does not synchronize access to the list of + // scheduled commands so it should ONLY be called during server init +-void addCommand(boost::shared_ptr pCmd); ++void addCommand(boost::shared_ptr< ::core::ScheduledCommand> pCmd); + + } // namespace scheduler + } // namespace server +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerSessionManager.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerSessionManager.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerSessionManager.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerSessionManager.hpp 2015-03-08 22:23:09.686943876 +0100 +@@ -52,18 +52,18 @@ + + public: + // launching +- core::Error launchSession(const std::string& username); ++ ::core::Error launchSession(const std::string& username); + void removePendingLaunch(const std::string& username); + + // set a custom session launcher +- typedef boost::function ++ typedef boost::function< ::core::Error( ++ const ::core::r_util::SessionLaunchProfile&)> + SessionLaunchFunction; + void setSessionLaunchFunction(const SessionLaunchFunction& launchFunction); + + // set a launch profile filter + typedef boost::function ++ ::core::r_util::SessionLaunchProfile*)> + SessionLaunchProfileFilter; + void addSessionLaunchProfileFilter(const SessionLaunchProfileFilter& filter); + +@@ -73,8 +73,8 @@ + private: + // default session launcher -- runs the process then uses the + // ChildProcessTracker to track it's pid for later reaping +- core::Error launchAndTrackSession( +- const core::r_util::SessionLaunchProfile& profile); ++ ::core::Error launchAndTrackSession( ++ const ::core::r_util::SessionLaunchProfile& profile); + + private: + // pending launches +@@ -89,13 +89,13 @@ + std::vector sessionLaunchProfileFilters_; + + // child process tracker +- core::system::ChildProcessTracker processTracker_; ++ ::core::system::ChildProcessTracker processTracker_; + }; + + // Lower-level global functions for launching sessions. These are used + // internally by the SessionManager as well as for verify-installation + core::Error launchSession(const std::string& username, +- const core::system::Options& extraArgs, ++ const ::core::system::Options& extraArgs, + PidType* pPid); + + +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerSessionProxy.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerSessionProxy.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerSessionProxy.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerSessionProxy.hpp 2015-03-08 22:23:09.688943877 +0100 +@@ -33,25 +33,25 @@ + + void proxyContentRequest( + const std::string& username, +- boost::shared_ptr ptrConnection) ; ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) ; + + void proxyRpcRequest( + const std::string& username, +- boost::shared_ptr ptrConnection) ; ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) ; + + void proxyEventsRequest( + const std::string& username, +- boost::shared_ptr ptrConnection); ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection); + + void proxyLocalhostRequest( + const std::string& username, +- boost::shared_ptr ptrConnection); ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection); + +-bool requiresSession(const core::http::Request& request); ++bool requiresSession(const ::core::http::Request& request); + + typedef boost::function)> ProxyFilter; ++ boost::shared_ptr< ::core::http::AsyncConnection>)> ProxyFilter; + void setProxyFilter(ProxyFilter filter); + + } // namespace session_proxy +diff -ru rstudio-0.98.1103/src/cpp/server/include/server/ServerUriHandlers.hpp rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerUriHandlers.hpp +--- rstudio-0.98.1103/src/cpp/server/include/server/ServerUriHandlers.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/include/server/ServerUriHandlers.hpp 2015-03-08 22:23:09.694943878 +0100 +@@ -26,17 +26,17 @@ + + // add async uri handler + void add(const std::string& prefix, +- const core::http::AsyncUriHandlerFunction& handler); ++ const ::core::http::AsyncUriHandlerFunction& handler); + + // add blocking uri handler + void addBlocking(const std::string& prefix, +- const core::http::UriHandlerFunction& handler); ++ const ::core::http::UriHandlerFunction& handler); + + // set async default handler +-void setDefault(const core::http::AsyncUriHandlerFunction& handler); ++void setDefault(const ::core::http::AsyncUriHandlerFunction& handler); + + // set blocking default handler +-void setBlockingDefault(const core::http::UriHandlerFunction& handler); ++void setBlockingDefault(const ::core::http::UriHandlerFunction& handler); + + } // namespace uri_handlers + } // namespace server +diff -ru rstudio-0.98.1103/src/cpp/server/Main.cpp rstudio-0.98.1103-fix/src/cpp/server/Main.cpp +--- rstudio-0.98.1103/src/cpp/server/Main.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/Main.cpp 2015-03-08 22:23:09.614943864 +0100 +@@ -19,7 +19,7 @@ + + int main(int argc, char * const argv[]) + { +- core::system::initializeLog("rserver", 2); ++ ::core::system::initializeLog("rserver", 2); + + LOG_WARNING_MESSAGE("hello cmake!"); + +diff -ru rstudio-0.98.1103/src/cpp/server/pam/PamMain.cpp rstudio-0.98.1103-fix/src/cpp/server/pam/PamMain.cpp +--- rstudio-0.98.1103/src/cpp/server/pam/PamMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/pam/PamMain.cpp 2015-03-08 22:23:09.619943865 +0100 +@@ -34,8 +34,8 @@ + // log warning + boost::format fmt("Inappropriate use of pam helper binary (user=%1%)"); + std::string msg = boost::str( +- fmt % core::system::user::currentUserIdentity().userId); +- core::log::logWarningMessage(msg, location); ++ fmt % ::core::system::user::currentUserIdentity().userId); ++ ::core::log::logWarningMessage(msg, location); + + // additional notification to the user + std::cerr << "\nThis binary is not designed for running this way\n" +@@ -55,10 +55,10 @@ + try + { + // initialize log +- initializeSystemLog("rserver-pam", core::system::kLogLevelWarning); ++ initializeSystemLog("rserver-pam", ::core::system::kLogLevelWarning); + + // ignore SIGPIPE +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + +@@ -93,7 +93,7 @@ + } + + // verify password +- if (core::system::PAM("rstudio", false).login(username, ++ if (::core::system::PAM("rstudio", false).login(username, + password) == PAM_SUCCESS) + return EXIT_SUCCESS; + else +diff -ru rstudio-0.98.1103/src/cpp/server/ServerBrowser.hpp rstudio-0.98.1103-fix/src/cpp/server/ServerBrowser.hpp +--- rstudio-0.98.1103/src/cpp/server/ServerBrowser.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerBrowser.hpp 2015-03-08 22:23:09.616943864 +0100 +@@ -30,11 +30,11 @@ + + extern const char * const kBrowserUnsupported; + +-bool supportedBrowserFilter(const core::http::Request& request, +- core::http::Response* pResponse); ++bool supportedBrowserFilter(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + +-void handleBrowserUnsupportedRequest(const core::http::Request& request, +- core::http::Response* pResponse); ++void handleBrowserUnsupportedRequest(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + + } // namespace browser + } // namespace server +diff -ru rstudio-0.98.1103/src/cpp/server/ServerErrorCategory.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerErrorCategory.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerErrorCategory.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerErrorCategory.cpp 2015-03-08 22:23:09.640943869 +0100 +@@ -57,7 +57,7 @@ + } + + +-bool isAuthenticationError(const core::Error& error) ++bool isAuthenticationError(const ::core::Error& error) + { + if (error.code() == server::errc::AuthenticationError) + return true; +@@ -65,7 +65,7 @@ + return false; + } + +-bool isSessionUnavailableError(const core::Error& error) ++bool isSessionUnavailableError(const ::core::Error& error) + { + if (error.code() == server::errc::SessionUnavailableError) + return true; +diff -ru rstudio-0.98.1103/src/cpp/server/ServerEval.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerEval.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerEval.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerEval.cpp 2015-03-08 22:23:09.656943871 +0100 +@@ -32,8 +32,8 @@ + namespace server { + namespace eval { + +-bool expirationFilter(const core::http::Request& request, +- core::http::Response* pResponse) ++bool expirationFilter(const ::core::http::Request& request, ++ ::core::http::Response* pResponse) + { + // read the expiration date + std::string expires; +diff -ru rstudio-0.98.1103/src/cpp/server/ServerEval.hpp rstudio-0.98.1103-fix/src/cpp/server/ServerEval.hpp +--- rstudio-0.98.1103/src/cpp/server/ServerEval.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerEval.hpp 2015-03-08 22:23:09.651943870 +0100 +@@ -26,8 +26,8 @@ + namespace server { + namespace eval { + +-bool expirationFilter(const core::http::Request& request, +- core::http::Response* pResponse); ++bool expirationFilter(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + + } // namespace eval + } // namespace server +diff -ru rstudio-0.98.1103/src/cpp/server/ServerInit.hpp rstudio-0.98.1103-fix/src/cpp/server/ServerInit.hpp +--- rstudio-0.98.1103/src/cpp/server/ServerInit.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerInit.hpp 2015-03-08 22:23:09.647943870 +0100 +@@ -28,7 +28,7 @@ + namespace server { + + core::http::AsyncServer* httpServerCreate(); +-core::Error httpServerInit(core::http::AsyncServer* pAsyncServer); ++core::Error httpServerInit(::core::http::AsyncServer* pAsyncServer); + + + } // namespace server +diff -ru rstudio-0.98.1103/src/cpp/server/ServerMain.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerMain.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerMain.cpp 2015-03-08 22:23:09.629943867 +0100 +@@ -77,8 +77,8 @@ + + namespace { + +-bool mainPageFilter(const core::http::Request& request, +- core::http::Response* pResponse) ++bool mainPageFilter(const ::core::http::Request& request, ++ ::core::http::Response* pResponse) + { + return server::eval::expirationFilter(request, pResponse) && + server::browser::supportedBrowserFilter(request, pResponse) && +@@ -193,7 +193,7 @@ + FilePath progressPagePath = wwwPath.complete("progress.htm"); + uri_handlers::addBlocking("/progress", + secureHttpHandler(boost::bind( +- core::text::handleSecureTemplateRequest, ++ ::core::text::handleSecureTemplateRequest, + _1, progressPagePath, _2, _3))); + + // establish browser unsupported handler +@@ -270,7 +270,7 @@ + overlay::shutdown(); + + // clear the signal mask +- Error error = core::system::clearSignalMask(); ++ Error error = ::core::system::clearSignalMask(); + if (error) + LOG_ERROR(error); + +@@ -346,11 +346,11 @@ + { + // initialize log + const char * const kProgramIdentity = "rserver"; +- initializeSystemLog(kProgramIdentity, core::system::kLogLevelWarning); ++ initializeSystemLog(kProgramIdentity, ::core::system::kLogLevelWarning); + + // ignore SIGPIPE (don't log error because we should never call + // syslog prior to daemonizing) +- core::system::ignoreSignal(core::system::SigPipe); ++ ::core::system::ignoreSignal(::core::system::SigPipe); + + // read program options + std::ostringstream osWarnings; +@@ -368,16 +368,16 @@ + // daemonize if requested + if (options.serverDaemonize()) + { +- Error error = core::system::daemonize(); ++ Error error = ::core::system::daemonize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + +- error = core::system::ignoreTerminalSignals(); ++ error = ::core::system::ignoreTerminalSignals(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // set file creation mask to 022 (might have inherted 0 from init) +- setUMask(core::system::OthersNoWriteMask); ++ setUMask(::core::system::OthersNoWriteMask); + } + + // wait until now to output options warnings (we need to wait for our +@@ -397,41 +397,41 @@ + + // increase the number of open files allowed (need more files + // so we can supports lots of concurrent connectins) +- if (core::system::realUserIsRoot()) ++ if (::core::system::realUserIsRoot()) + { +- Error error = setResourceLimit(core::system::FilesLimit, 4096); ++ Error error = setResourceLimit(::core::system::FilesLimit, 4096); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + } + + // set working directory + Error error = FilePath(options.serverWorkingDir()).makeCurrentPath(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // initialize crypto utils +- core::system::crypto::initialize(); ++ ::core::system::crypto::initialize(); + + // initialize secure cookie module + error = auth::secure_cookie::initialize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // initialize the session proxy + error = session_proxy::initialize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // initialize http server + error = httpServerInit(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // initialize the process supervisor (needs to happen post http server + // init for access to the scheduled command list) + error = process_supervisor::initialize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // initialize monitor (needs to happen post http server init for access + // to the server's io service) +@@ -440,13 +440,13 @@ + s_pHttpServer->ioService()); + + // add a monitor log writer +- core::system::addLogWriter( ++ ::core::system::addLogWriter( + monitor::client().createLogWriter(kProgramIdentity)); + + // call overlay initialize + error = overlay::initialize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // add handlers and initiliaze addins (offline has distinct behavior) + if (server::options().serverOffline()) +@@ -461,14 +461,14 @@ + // initialize addins + error = addins::initialize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // initialize pam auth if we don't already have an auth handler + if (!auth::handler::isRegistered()) + { + error = pam_auth::initialize(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + } + } + +@@ -491,9 +491,9 @@ + if (!runAsUser.empty()) + { + // drop root priv +- Error error = core::system::temporarilyDropPriv(runAsUser); ++ Error error = ::core::system::temporarilyDropPriv(runAsUser); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + } + + // run special verify installation mode if requested +@@ -501,7 +501,7 @@ + { + Error error = session_proxy::runVerifyInstallationSession(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + return EXIT_SUCCESS; + } +@@ -509,17 +509,17 @@ + // call overlay startup + error = overlay::startup(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // run http server + error = s_pHttpServer->run(options.wwwThreadPoolSize()); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // wait for signals + error = waitForSignals(); + if (error) +- return core::system::exitFailure(error, ERROR_LOCATION); ++ return ::core::system::exitFailure(error, ERROR_LOCATION); + + // NOTE: we never get here because waitForSignals waits forever + return EXIT_SUCCESS; +diff -ru rstudio-0.98.1103/src/cpp/server/ServerMeta.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerMeta.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerMeta.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerMeta.cpp 2015-03-08 22:23:09.710943880 +0100 +@@ -36,8 +36,8 @@ + } // anonymous namespace + + void handleMetaRequest(const std::string& username, +- const core::http::Request& request, +- core::http::Response* pResponse) ++ const ::core::http::Request& request, ++ ::core::http::Response* pResponse) + { + // parse request + json::JsonRpcRequest jsonRpcRequest; +diff -ru rstudio-0.98.1103/src/cpp/server/ServerMeta.hpp rstudio-0.98.1103-fix/src/cpp/server/ServerMeta.hpp +--- rstudio-0.98.1103/src/cpp/server/ServerMeta.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerMeta.hpp 2015-03-08 22:23:09.672943874 +0100 +@@ -29,8 +29,8 @@ + namespace meta { + + void handleMetaRequest(const std::string& username, +- const core::http::Request& request, +- core::http::Response* pResponse); ++ const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + + } // namespace meta + } // namespace server +diff -ru rstudio-0.98.1103/src/cpp/server/ServerOptions.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerOptions.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerOptions.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerOptions.cpp 2015-03-08 22:23:09.668943873 +0100 +@@ -90,7 +90,7 @@ + using namespace boost::program_options ; + + // compute install path +- Error error = core::system::installPath("..", argv[0], &installPath_); ++ Error error = ::core::system::installPath("..", argv[0], &installPath_); + if (error) + { + LOG_ERROR_MESSAGE("Unable to determine install path: "+error.summary()); +@@ -122,7 +122,7 @@ + serverOffline_ = FilePath("/var/lib/rstudio-server/offline").exists(); + + // generate monitor shared secret +- monitorSharedSecret_ = core::system::generateUuid(); ++ monitorSharedSecret_ = ::core::system::generateUuid(); + + // program - name and execution + options_description server("server"); +@@ -135,7 +135,7 @@ + "program user") + ("server-daemonize", + value(&serverDaemonize_)->default_value( +- core::system::effectiveUserIsRoot()), ++ ::core::system::effectiveUserIsRoot()), + "run program as daemon") + ("server-app-armor-enabled", + value(&serverAppArmorEnabled_)->default_value(1), +@@ -201,11 +201,11 @@ + auth.add_options() + ("auth-none", + value(&authNone_)->default_value( +- !core::system::effectiveUserIsRoot()), ++ !::core::system::effectiveUserIsRoot()), + "don't do any authentication") + ("auth-validate-users", + value(&authValidateUsers_)->default_value( +- core::system::effectiveUserIsRoot()), ++ ::core::system::effectiveUserIsRoot()), + "validate that authenticated users exist on the target system") + ("auth-encrypt-password", + value(&authEncryptPassword_)->default_value(true), +@@ -241,7 +241,7 @@ + + // read options + bool help = false; +- ProgramStatus status = core::program_options::read(optionsDesc, ++ ProgramStatus status = ::core::program_options::read(optionsDesc, + argc, + argv, + &help); +@@ -279,12 +279,12 @@ + if (!serverUser_.empty()) + { + // if we aren't running as root then forget the programUser +- if (!core::system::realUserIsRoot()) ++ if (!::core::system::realUserIsRoot()) + { + serverUser_ = ""; + } + // if there is a program user specified and it doesn't exist.... +- else if (!core::system::user::exists(serverUser_)) ++ else if (!::core::system::user::exists(serverUser_)) + { + if (serverUser_ == kDefaultProgramUser) + { +diff -ru rstudio-0.98.1103/src/cpp/server/ServerPAMAuth.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerPAMAuth.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerPAMAuth.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerPAMAuth.cpp 2015-03-08 22:23:09.654943871 +0100 +@@ -54,9 +54,9 @@ + // running with geteuid != getuid (as is the case when we temporarily + // drop privileges). We've also seen kerberos on Ubuntu require + // priv to work correctly -- so, restore privilliges in the child +- if (core::system::realUserIsRoot()) ++ if (::core::system::realUserIsRoot()) + { +- Error error = core::system::restorePriv(); ++ Error error = ::core::system::restorePriv(); + if (error) + { + LOG_ERROR(error); +@@ -112,10 +112,10 @@ + return signInURL; + } + +-std::string getUserIdentifier(const core::http::Request& request) ++std::string getUserIdentifier(const ::core::http::Request& request) + { + if (server::options().authNone()) +- return core::system::username(); ++ return ::core::system::username(); + else + return auth::secure_cookie::readSecureCookie(request, kUserId); + } +@@ -142,14 +142,14 @@ + } + } + +-void signInThenContinue(const core::http::Request& request, +- core::http::Response* pResponse) ++void signInThenContinue(const ::core::http::Request& request, ++ ::core::http::Response* pResponse) + { + pResponse->setMovedTemporarily(request, applicationSignInURL(request, request.uri())); + } + + void refreshCredentialsThenContinue( +- boost::shared_ptr pConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> pConnection) + { + // no silent refresh possible so delegate to sign-in and continue + signInThenContinue(pConnection->request(), +@@ -195,16 +195,16 @@ + http::Response* pResponse) + { + std::string exp, mod; +- core::system::crypto::rsaPublicKey(&exp, &mod); ++ ::core::system::crypto::rsaPublicKey(&exp, &mod); + pResponse->setNoCacheHeaders(); + pResponse->setBody(exp + ":" + mod); + pResponse->setContentType("text/plain"); + } + +-void setSignInCookies(const core::http::Request& request, ++void setSignInCookies(const ::core::http::Request& request, + const std::string& username, + bool persist, +- core::http::Response* pResponse) ++ ::core::http::Response* pResponse) + { + boost::optional expiry; + if (persist) +@@ -240,7 +240,7 @@ + { + std::string encryptedValue = request.formFieldValue("v"); + std::string plainText; +- Error error = core::system::crypto::rsaPrivateDecrypt(encryptedValue, ++ Error error = ::core::system::crypto::rsaPrivateDecrypt(encryptedValue, + &plainText); + if (error) + { +@@ -351,12 +351,12 @@ + args.push_back(username); + + // options (assume priv after fork) +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.onAfterFork = assumeRootPriv; + + // run pam helper +- core::system::ProcessResult result; +- Error error = core::system::runProgram(pamHelperPath.absolutePath(), ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runProgram(pamHelperPath.absolutePath(), + args, + password, + options, +@@ -392,7 +392,7 @@ + uri_handlers::addBlocking(kPublicKey, publicKey); + + // initialize crypto +- return core::system::crypto::rsaInit(); ++ return ::core::system::crypto::rsaInit(); + } + + +diff -ru rstudio-0.98.1103/src/cpp/server/ServerProcessSupervisor.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerProcessSupervisor.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerProcessSupervisor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerProcessSupervisor.cpp 2015-03-08 22:23:09.645943869 +0100 +@@ -35,7 +35,7 @@ + + core::system::ProcessSupervisor& processSupervisor() + { +- static core::system::ProcessSupervisor instance; ++ static ::core::system::ProcessSupervisor instance; + return instance; + } + +@@ -56,8 +56,8 @@ + const std::string& executable, + const std::vector& args, + const std::string& input, +- const core::system::ProcessOptions& options, +- const boost::function& onCompleted) ++ const ::core::system::ProcessOptions& options, ++ const boost::function& onCompleted) + { + LOCK_MUTEX(s_mutex) + { +@@ -70,7 +70,7 @@ + END_LOCK_MUTEX + + // fulfill closure and keep compiler happy +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + result.exitStatus = EXIT_FAILURE; + result.stdErr = "Thread resource error occurred while running program " + + executable; +diff -ru rstudio-0.98.1103/src/cpp/server/ServerREnvironment.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerREnvironment.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerREnvironment.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerREnvironment.cpp 2015-03-08 22:23:09.670943874 +0100 +@@ -66,8 +66,8 @@ + return r_util::EnvironmentVars(); + } + +-bool detectREnvironment(const core::FilePath& rScriptPath, +- core::r_util::EnvironmentVars* pVars, ++bool detectREnvironment(const ::core::FilePath& rScriptPath, ++ ::core::r_util::EnvironmentVars* pVars, + std::string* pErrMsg) + { + // determine rLdPaths script location +diff -ru rstudio-0.98.1103/src/cpp/server/ServerREnvironment.hpp rstudio-0.98.1103-fix/src/cpp/server/ServerREnvironment.hpp +--- rstudio-0.98.1103/src/cpp/server/ServerREnvironment.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerREnvironment.hpp 2015-03-08 22:23:09.621943865 +0100 +@@ -33,8 +33,8 @@ + + std::vector > variables(); + +-bool detectREnvironment(const core::FilePath& filePath, +- core::r_util::EnvironmentVars* pVars, ++bool detectREnvironment(const ::core::FilePath& filePath, ++ ::core::r_util::EnvironmentVars* pVars, + std::string* pErrMsg); + + } // namespace r_environment +diff -ru rstudio-0.98.1103/src/cpp/server/ServerSessionManager.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerSessionManager.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerSessionManager.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerSessionManager.cpp 2015-03-08 22:23:09.632943867 +0100 +@@ -47,11 +47,11 @@ + + core::system::ProcessConfig sessionProcessConfig( + const std::string& username, +- const core::system::Options& extraArgs = core::system::Options()) ++ const ::core::system::Options& extraArgs = ::core::system::Options()) + { + // prepare command line arguments + server::Options& options = server::options(); +- core::system::Options args ; ++ ::core::system::Options args ; + + // check for options-specified config file and add to command + // line if specified +@@ -64,13 +64,13 @@ + username)); + + // allow session timeout to be overridden via environment variable +- std::string timeout = core::system::getenv("RSTUDIO_SESSION_TIMEOUT"); ++ std::string timeout = ::core::system::getenv("RSTUDIO_SESSION_TIMEOUT"); + if (!timeout.empty()) + args.push_back(std::make_pair("--" kTimeoutSessionOption, timeout)); + + // pass our uid to instruct rsession to limit rpc clients to us and itself +- core::system::Options environment; +- uid_t uid = core::system::user::currentUserIdentity().userId; ++ ::core::system::Options environment; ++ uid_t uid = ::core::system::user::currentUserIdentity().userId; + environment.push_back(std::make_pair( + kRStudioLimitRpcClientUid, + safe_convert::numberToString(uid))); +@@ -79,7 +79,7 @@ + std::copy(extraArgs.begin(), extraArgs.end(), std::back_inserter(args)); + + // append R environment variables +- core::system::Options rEnvVars = r_environment::variables(); ++ ::core::system::Options rEnvVars = r_environment::variables(); + environment.insert(environment.end(), rEnvVars.begin(), rEnvVars.end()); + + // add monitor shared secret +@@ -87,10 +87,10 @@ + options.monitorSharedSecret())); + + // build the config object and return it +- core::system::ProcessConfig config; ++ ::core::system::ProcessConfig config; + config.args = args; + config.environment = environment; +- config.stdStreamBehavior = core::system::StdStreamInherit; ++ config.stdStreamBehavior = ::core::system::StdStreamInherit; + return config; + } + +@@ -172,10 +172,10 @@ + // default session launcher -- does the launch then tracks the pid + // for later reaping + Error SessionManager::launchAndTrackSession( +- const core::r_util::SessionLaunchProfile& profile) ++ const ::core::r_util::SessionLaunchProfile& profile) + { + // if we are root then assume the identity of the user +- using namespace core::system; ++ using namespace ::core::system; + std::string runAsUser = realUserIsRoot() ? profile.username : ""; + + // launch the session +@@ -224,17 +224,17 @@ + + // helper function for verify-installation + Error launchSession(const std::string& username, +- const core::system::Options& extraArgs, ++ const ::core::system::Options& extraArgs, + PidType* pPid) + { + // launch the session + std::string rsessionPath = server::options().rsessionPath(); +- std::string runAsUser = core::system::realUserIsRoot() ? username : ""; +- core::system::ProcessConfig config = sessionProcessConfig(username, ++ std::string runAsUser = ::core::system::realUserIsRoot() ? username : ""; ++ ::core::system::ProcessConfig config = sessionProcessConfig(username, + extraArgs); + + *pPid = -1; +- return core::system::launchChildProcess(rsessionPath, ++ return ::core::system::launchChildProcess(rsessionPath, + runAsUser, + config, + pPid); +diff -ru rstudio-0.98.1103/src/cpp/server/ServerSessionProxy.cpp rstudio-0.98.1103-fix/src/cpp/server/ServerSessionProxy.cpp +--- rstudio-0.98.1103/src/cpp/server/ServerSessionProxy.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/server/ServerSessionProxy.cpp 2015-03-08 22:23:09.612943864 +0100 +@@ -96,7 +96,7 @@ + + bool applyProxyFilter( + const std::string& username, +- boost::shared_ptr ptrConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) + { + if (s_proxyFilter) + return s_proxyFilter(username, ptrConnection); +@@ -105,7 +105,7 @@ + } + + void handleProxyResponse( +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + std::string username, + const http::Response& response) + { +@@ -178,7 +178,7 @@ + } + + void handleLocalhostResponse( +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + boost::shared_ptr ptrLocalhost, + const std::string& port, + const http::Response& response) +@@ -241,7 +241,7 @@ + } + + void handleLocalhostError( +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + const Error& error) + { + // if this request required a session then return a standard 503 +@@ -270,7 +270,7 @@ + } + + void handleContentError( +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + std::string username, + const Error& error) + { +@@ -315,7 +315,7 @@ + } + + void handleRpcError( +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + std::string username, + const Error& error) + { +@@ -359,7 +359,7 @@ + } + + void handleEventsError( +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + const Error& error) + { + // NOTE: events requests don't initiate session launches so +@@ -395,7 +395,7 @@ + + void proxyRequest( + const std::string& username, +- boost::shared_ptr ptrConnection, ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection, + const http::ErrorHandler& errorHandler, + const http::ConnectionRetryProfile& connectionRetryProfile) + { +@@ -461,26 +461,26 @@ + Error runVerifyInstallationSession() + { + // get current user +- core::system::user::User user; ++ ::core::system::user::User user; + Error error = currentUser(&user); + if (error) + return error; + + // launch verify installation session +- core::system::Options args; +- args.push_back(core::system::Option("--" kVerifyInstallationSessionOption, "1")); ++ ::core::system::Options args; ++ args.push_back(::core::system::Option("--" kVerifyInstallationSessionOption, "1")); + PidType sessionPid; + error = server::launchSession(user.username, args, &sessionPid); + if (error) + return error; + + // wait for exit +- return core::system::waitForProcessExit(sessionPid); ++ return ::core::system::waitForProcessExit(sessionPid); + } + + void proxyContentRequest( + const std::string& username, +- boost::shared_ptr ptrConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) + { + proxyRequest(username, + ptrConnection, +@@ -490,7 +490,7 @@ + + void proxyRpcRequest( + const std::string& username, +- boost::shared_ptr ptrConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) + { + // validate the user if this is client_init + if (boost::algorithm::ends_with(ptrConnection->request().uri(), +@@ -508,7 +508,7 @@ + + void proxyEventsRequest( + const std::string& username, +- boost::shared_ptr ptrConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) + { + // validate the user + if (!validateUser(ptrConnection, username)) +@@ -522,7 +522,7 @@ + + void proxyLocalhostRequest( + const std::string& username, +- boost::shared_ptr ptrConnection) ++ boost::shared_ptr< ::core::http::AsyncConnection> ptrConnection) + { + // apply optional proxy filter + if (applyProxyFilter(username, ptrConnection)) +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionImpl.hpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionImpl.hpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionImpl.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionImpl.hpp 2015-03-08 22:23:10.376943993 +0100 +@@ -75,25 +75,25 @@ + public: + + // request/resposne (used by Handler) +- virtual const core::http::Request& request() { return request_; } ++ virtual const ::core::http::Request& request() { return request_; } + +- virtual void sendResponse(const core::http::Response &response) ++ virtual void sendResponse(const ::core::http::Response &response) + { + try + { + // write the response + boost::asio::write(socket_, + response.toBuffers( +- core::http::Header::connectionClose())); ++ ::core::http::Header::connectionClose())); + } + catch(const boost::system::system_error& e) + { + // establish error +- core::Error error = core::Error(e.code(), ERROR_LOCATION); ++ ::core::Error error = ::core::Error(e.code(), ERROR_LOCATION); + error.addProperty("request-uri", request_.uri()); + + // log the error if it wasn't connection terminated +- if (!core::http::isConnectionTerminatedError(error)) ++ if (!::core::http::isConnectionTerminatedError(error)) + LOG_ERROR(error); + } + CATCH_UNEXPECTED_EXCEPTION +@@ -111,7 +111,7 @@ + virtual void close() + { + // always close connection +- core::Error error = core::http::closeSocket(socket_); ++ ::core::Error error = ::core::http::closeSocket(socket_); + if (error) + LOG_ERROR(error); + } +@@ -158,16 +158,16 @@ + if (!e) + { + // parse next chunk +- core::http::RequestParser::status status = requestParser_.parse( ++ ::core::http::RequestParser::status status = requestParser_.parse( + request_, + buffer_.data(), + buffer_.data() + bytesTransferred); + + // error - return bad request +- if (status == core::http::RequestParser::error) ++ if (status == ::core::http::RequestParser::error) + { +- core::http::Response response; +- response.setStatusCode(core::http::status::BadRequest); ++ ::core::http::Response response; ++ response.setStatusCode(::core::http::status::BadRequest); + sendResponse(response); + + // no more async operations w/ shared_from_this() initiated so this +@@ -175,7 +175,7 @@ + } + + // incomplete -- keep reading +- else if (status == core::http::RequestParser::incomplete) ++ else if (status == ::core::http::RequestParser::incomplete) + { + readSome(); + } +@@ -198,8 +198,8 @@ + else // error reading + { + // log the error if it wasn't connection terminated +- core::Error error(e, ERROR_LOCATION); +- if (!core::http::isConnectionTerminatedError(error)) ++ ::core::Error error(e, ERROR_LOCATION); ++ if (!::core::http::isConnectionTerminatedError(error)) + LOG_ERROR(error); + + // close the connection +@@ -215,8 +215,8 @@ + private: + typename ProtocolType::socket socket_; + boost::array buffer_ ; +- core::http::RequestParser requestParser_ ; +- core::http::Request request_; ++ ::core::http::RequestParser requestParser_ ; ++ ::core::http::Request request_; + std::string requestId_; + Handler handler_; + }; +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp 2015-03-08 22:23:10.382943994 +0100 +@@ -80,10 +80,10 @@ + // COPYING: boost::noncopyable + + public: +- virtual core::Error start() ++ virtual ::core::Error start() + { + // cleanup any existing networking state +- core::Error error = cleanup(); ++ ::core::Error error = cleanup(); + if (error) + return error ; + +@@ -97,7 +97,7 @@ + + // block all signals for launch of listener thread (will cause it + // to never receive signals) +- core::system::SignalBlocker signalBlocker; ++ ::core::system::SignalBlocker signalBlocker; + error = signalBlocker.blockAll(); + if (error) + return error ; +@@ -113,11 +113,11 @@ + // set started flag + started_ = true; + +- return core::Success(); ++ return ::core::Success(); + } + catch(const boost::thread_resource_error& e) + { +- return core::Error(boost::thread_error::ec_from_exception(e), ++ return ::core::Error(boost::thread_error::ec_from_exception(e), + ERROR_LOCATION); + } + } +@@ -136,7 +136,7 @@ + boost::system::error_code ec ; + acceptorService_.closeAcceptor(ec); + if (ec) +- LOG_ERROR(core::Error(ec, ERROR_LOCATION)); ++ LOG_ERROR(::core::Error(ec, ERROR_LOCATION)); + + // stop the server + ioService().stop(); +@@ -154,7 +154,7 @@ + } + + // allow subclass specific cleanup +- core::Error error = cleanup(); ++ ::core::Error error = cleanup(); + if (error) + LOG_ERROR(error); + } +@@ -179,13 +179,13 @@ + + private: + // required subclass hooks +- virtual core::Error initializeAcceptor( +- core::http::SocketAcceptorService* pAcceptor) = 0; ++ virtual ::core::Error initializeAcceptor( ++ ::core::http::SocketAcceptorService* pAcceptor) = 0; + + virtual bool validateConnection( + boost::shared_ptr > ptrConnection) = 0; + +- virtual core::Error cleanup() = 0 ; ++ virtual ::core::Error cleanup() = 0 ; + + private: + boost::asio::io_service& ioService() { return acceptorService_.ioService(); } +@@ -234,7 +234,7 @@ + // for errors, log and continue,but don't log errors caused + // by normal course of socket shutdown + if (!isShutdownError(ec)) +- LOG_ERROR(core::Error(ec, ERROR_LOCATION)) ; ++ LOG_ERROR(::core::Error(ec, ERROR_LOCATION)) ; + } + } + catch(const boost::system::system_error& e) +@@ -262,7 +262,7 @@ + + if (!authenticate(ptrHttpConnection)) + { +- core::http::Response response; ++ ::core::http::Response response; + response.setStatusCode(403); + response.setStatusMessage("Forbidden"); + ptrConnection->sendResponse(response); +@@ -297,7 +297,7 @@ + private: + + // acceptor service (includes io service) +- core::http::SocketAcceptorService acceptorService_; ++ ::core::http::SocketAcceptorService acceptorService_; + + // next connection + boost::shared_ptr > ptrNextConnection_; +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionUtils.cpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionUtils.cpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionUtils.cpp 2015-03-08 22:23:10.364943991 +0100 +@@ -37,31 +37,31 @@ + + namespace session { + +-void HttpConnection::sendJsonRpcError(const core::Error& error) ++void HttpConnection::sendJsonRpcError(const ::core::Error& error) + { +- core::json::JsonRpcResponse jsonRpcResponse; ++ ::core::json::JsonRpcResponse jsonRpcResponse; + jsonRpcResponse.setError(error); + sendJsonRpcResponse(jsonRpcResponse); + } + + void HttpConnection::sendJsonRpcResponse() + { +- core::json::JsonRpcResponse jsonRpcResponse ; ++ ::core::json::JsonRpcResponse jsonRpcResponse ; + sendJsonRpcResponse(jsonRpcResponse); + } + + void HttpConnection::sendJsonRpcResponse( +- const core::json::JsonRpcResponse& jsonRpcResponse) ++ const ::core::json::JsonRpcResponse& jsonRpcResponse) + { + // setup response +- core::http::Response response ; ++ ::core::http::Response response ; + + // automagic gzip support +- if (request().acceptsEncoding(core::http::kGzipEncoding)) +- response.setContentEncoding(core::http::kGzipEncoding); ++ if (request().acceptsEncoding(::core::http::kGzipEncoding)) ++ response.setContentEncoding(::core::http::kGzipEncoding); + + // set response +- core::json::setJsonRpcResponse(jsonRpcResponse, &response); ++ ::core::json::setJsonRpcResponse(jsonRpcResponse, &response); + + // send the response + sendResponse(response); +@@ -71,7 +71,7 @@ + + namespace connection { + +-std::string rstudioRequestIdFromRequest(const core::http::Request& request) ++std::string rstudioRequestIdFromRequest(const ::core::http::Request& request) + { + return request.headerValue("X-RS-RID"); + } +@@ -94,13 +94,13 @@ + boost::shared_ptr ptrConnection) + { + std::string nextProj; +- core::json::JsonRpcRequest jsonRpcRequest; +- core::Error error = core::json::parseJsonRpcRequest( ++ ::core::json::JsonRpcRequest jsonRpcRequest; ++ ::core::Error error = ::core::json::parseJsonRpcRequest( + ptrConnection->request().body(), + &jsonRpcRequest); + if (!error) + { +- error = core::json::readParam(jsonRpcRequest.params, 0, &nextProj); ++ error = ::core::json::readParam(jsonRpcRequest.params, 0, &nextProj); + if (error) + LOG_ERROR(error); + +@@ -111,13 +111,13 @@ + // constants rather than code so that this code (which runs in + // a background thread) don't call into the projects module (which + // is designed to be foreground and single-threaded) +- core::FilePath userScratch = session::options().userScratchPath(); +- core::FilePath settings = userScratch.complete(kProjectsSettings); ++ ::core::FilePath userScratch = session::options().userScratchPath(); ++ ::core::FilePath settings = userScratch.complete(kProjectsSettings); + error = settings.ensureDirectory(); + if (error) + LOG_ERROR(error); +- core::FilePath writePath = settings.complete(kNextSessionProject); +- core::Error error = core::writeStringToFile(writePath, nextProj); ++ ::core::FilePath writePath = settings.complete(kNextSessionProject); ++ ::core::Error error = ::core::writeStringToFile(writePath, nextProj); + if (error) + LOG_ERROR(error); + } +@@ -185,12 +185,12 @@ + + bool checkForSuspend(boost::shared_ptr ptrConnection) + { +- using namespace core::json; ++ using namespace ::core::json; + if (isMethod(ptrConnection, "suspend_session")) + { + bool force = false; + JsonRpcRequest jsonRpcRequest; +- core::Error error = parseJsonRpcRequest(ptrConnection->request().body(), ++ ::core::Error error = parseJsonRpcRequest(ptrConnection->request().body(), + &jsonRpcRequest); + if (error) + { +@@ -203,7 +203,7 @@ + else + { + // send a signal to this process to suspend +- using namespace core::system; ++ using namespace ::core::system; + sendSignalToSelf(force ? SigUsr2 : SigUsr1); + + // send response +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionUtils.hpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionUtils.hpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionHttpConnectionUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionHttpConnectionUtils.hpp 2015-03-08 22:23:10.366943991 +0100 +@@ -31,7 +31,7 @@ + namespace session { + namespace connection { + +-std::string rstudioRequestIdFromRequest(const core::http::Request& request); ++std::string rstudioRequestIdFromRequest(const ::core::http::Request& request); + + bool isMethod(boost::shared_ptr ptrConnection, + const std::string& method); +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionLocalStreamHttpConnectionListener.hpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionLocalStreamHttpConnectionListener.hpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionLocalStreamHttpConnectionListener.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionLocalStreamHttpConnectionListener.hpp 2015-03-08 22:23:10.371943992 +0100 +@@ -35,7 +35,7 @@ + { + public: + LocalStreamHttpConnectionListener(const FilePath& streamPath, +- core::system::FileMode streamFileMode, ++ ::core::system::FileMode streamFileMode, + const std::string& secret, + int limitRpcClientUid) + : localStreamPath_(streamPath), +@@ -45,7 +45,7 @@ + if (limitRpcClientUid != -1) + { + // always add current user +- using namespace core::system::user; ++ using namespace ::core::system::user; + permittedClients_.push_back(currentUserIdentity().userId); + + // also add rpc client +@@ -74,8 +74,8 @@ + int socket = ptrConnection->socket().native(); + + // get client identity +- core::system::user::UserIdentity userIdentity; +- core::Error error = socketPeerIdentity(socket,&userIdentity); ++ ::core::system::user::UserIdentity userIdentity; ++ ::core::Error error = socketPeerIdentity(socket,&userIdentity); + if (error) + { + LOG_ERROR(error); +@@ -120,8 +120,8 @@ + } + + private: +- core::FilePath localStreamPath_; +- core::system::FileMode streamFileMode_; ++ ::core::FilePath localStreamPath_; ++ ::core::system::FileMode streamFileMode_; + + // desktop shared secret + std::string secret_; +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionNamedPipeHttpConnectionListener.hpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionNamedPipeHttpConnectionListener.hpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionNamedPipeHttpConnectionListener.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionNamedPipeHttpConnectionListener.hpp 2015-03-08 22:23:10.386943995 +0100 +@@ -84,7 +84,7 @@ + + bool readRequest() + { +- core::http::RequestParser parser; ++ ::core::http::RequestParser parser; + CHAR buff[kReadBufferSize]; + DWORD bytesRead; + +@@ -97,7 +97,7 @@ + if (!result) + { + Error error = systemError(::GetLastError(), ERROR_LOCATION); +- if (!core::http::isConnectionTerminatedError(error)) ++ if (!::core::http::isConnectionTerminatedError(error)) + LOG_ERROR(error); + + close(); +@@ -111,8 +111,8 @@ + { + LOG_WARNING_MESSAGE("ReadFile returned 0 bytes"); + +- core::http::Response response; +- response.setStatusCode(core::http::status::BadRequest); ++ ::core::http::Response response; ++ response.setStatusCode(::core::http::status::BadRequest); + sendResponse(response); + + return false; +@@ -128,17 +128,17 @@ + buff + bytesRead); + + // error - return bad request +- if (status == core::http::RequestParser::error) ++ if (status == ::core::http::RequestParser::error) + { +- core::http::Response response; +- response.setStatusCode(core::http::status::BadRequest); ++ ::core::http::Response response; ++ response.setStatusCode(::core::http::status::BadRequest); + sendResponse(response); + + return false; + } + + // incomplete -- keep reading +- else if (status == core::http::RequestParser::incomplete) ++ else if (status == ::core::http::RequestParser::incomplete) + { + continue; + } +@@ -156,13 +156,13 @@ + return false; + } + +- virtual const core::http::Request& request() { return request_; } ++ virtual const ::core::http::Request& request() { return request_; } + +- virtual void sendResponse(const core::http::Response &response) ++ virtual void sendResponse(const ::core::http::Response &response) + { + // get the buffers + std::vector buffers =response.toBuffers( +- core::http::Header::connectionClose()); ++ ::core::http::Header::connectionClose()); + + // write them + DWORD bytesWritten; +@@ -183,7 +183,7 @@ + error.addProperty("request-uri", request_.uri()); + + // log the error if it wasn't connection terminated +- if (!core::http::isConnectionTerminatedError(error)) ++ if (!::core::http::isConnectionTerminatedError(error)) + LOG_ERROR(error); + + // close and terminate +@@ -218,7 +218,7 @@ + + private: + HANDLE hPipe_; +- core::http::Request request_; ++ ::core::http::Request request_; + std::string requestId_; + }; + +@@ -236,7 +236,7 @@ + + virtual Error start() + { +- core::thread::safeLaunchThread( ++ ::core::thread::safeLaunchThread( + boost::bind(&NamedPipeHttpConnectionListener::listenerThread, + this)); + +@@ -286,7 +286,7 @@ + + // set pipe mode, specify rejection of remote clients if >= vista + DWORD dwPipeMode = PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT; +- if (core::system::isVistaOrLater()) ++ if (::core::system::isVistaOrLater()) + dwPipeMode |= PIPE_REJECT_REMOTE_CLIENTS; + + // create pipe +@@ -345,7 +345,7 @@ + + if (!authenticate(ptrHttpConnection)) + { +- core::http::Response response; ++ ::core::http::Response response; + response.setStatusCode(403); + response.setStatusMessage("Forbidden"); + ptrConnection->sendResponse(response); +@@ -382,7 +382,7 @@ + return connection::authenticate(ptrConnection, secret_); + } + +- core::Error cleanup() ++ ::core::Error cleanup() + { + return Success(); + } +@@ -419,13 +419,13 @@ + } + } + +- static core::Error logonSessionOnlyDescriptor(std::string* pDescriptor) ++ static ::core::Error logonSessionOnlyDescriptor(std::string* pDescriptor) + { + // token for current process + HANDLE hToken = NULL; + if (!OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, &hToken)) + return systemError(::GetLastError(), ERROR_LOCATION); +- core::system::CloseHandleOnExitScope tokenScope(&hToken, ERROR_LOCATION); ++ ::core::system::CloseHandleOnExitScope tokenScope(&hToken, ERROR_LOCATION); + + // size of token groups structure (note that we exepct the error + // since we pass NULL for the token information buffer) +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionPosixHttpConnectionListener.cpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionPosixHttpConnectionListener.cpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionPosixHttpConnectionListener.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionPosixHttpConnectionListener.cpp 2015-03-08 22:23:10.379943994 +0100 +@@ -44,13 +44,13 @@ + + if (options.programMode() == kSessionProgramModeDesktop) + { +- std::string localPeer = core::system::getenv("RS_LOCAL_PEER"); ++ std::string localPeer = ::core::system::getenv("RS_LOCAL_PEER"); + if (!localPeer.empty()) + { + FilePath streamPath(localPeer); + s_pHttpConnectionListener = new LocalStreamHttpConnectionListener( + streamPath, +- core::system::UserReadWriteMode, ++ ::core::system::UserReadWriteMode, + options.sharedSecret(), + -1); + } +@@ -78,7 +78,7 @@ + FilePath localStreamPath = local_streams::streamPath(userIdentity); + s_pHttpConnectionListener = new LocalStreamHttpConnectionListener( + localStreamPath, +- core::system::EveryoneReadWriteMode, ++ ::core::system::EveryoneReadWriteMode, + "", // no shared secret + options.limitRpcClientUid()); + } +diff -ru rstudio-0.98.1103/src/cpp/session/http/SessionWin32HttpConnectionListener.cpp rstudio-0.98.1103-fix/src/cpp/session/http/SessionWin32HttpConnectionListener.cpp +--- rstudio-0.98.1103/src/cpp/session/http/SessionWin32HttpConnectionListener.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/http/SessionWin32HttpConnectionListener.cpp 2015-03-08 22:23:10.388943995 +0100 +@@ -39,7 +39,7 @@ + void initializeHttpConnectionListener() + { + session::Options& options = session::options(); +- std::string pipeName = core::system::getenv("RS_LOCAL_PEER"); ++ std::string pipeName = ::core::system::getenv("RS_LOCAL_PEER"); + std::string secret = options.sharedSecret(); + s_pHttpConnectionListener = new NamedPipeHttpConnectionListener(pipeName, + secret); +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/projects/SessionProjects.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/projects/SessionProjects.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/projects/SessionProjects.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/projects/SessionProjects.hpp 2015-03-08 22:23:10.529944019 +0100 +@@ -46,9 +46,9 @@ + // file monitoring callbacks (all callbacks are optional) + struct FileMonitorCallbacks + { +- boost::function&)> onMonitoringEnabled; ++ boost::function&)> onMonitoringEnabled; + boost::function&)> onFilesChanged; ++ const std::vector< ::core::system::FileChangeEvent>&)> onFilesChanged; + boost::function onMonitoringDisabled; + }; + +@@ -83,10 +83,10 @@ + } + virtual ~ProjectContext() {} + +- core::Error startup(const core::FilePath& projectFile, ++ ::core::Error startup(const ::core::FilePath& projectFile, + std::string* pUserErrMsg); + +- core::Error initialize(); ++ ::core::Error initialize(); + + public: + // these functions can be called even when there is no project +@@ -98,17 +98,17 @@ + void setNextSessionProject(const std::string& nextSessionProject); + + // last project path -- used to implement restore last project user setting +- core::FilePath lastProjectPath() const; +- void setLastProjectPath(const core::FilePath& lastProjectPath); ++ ::core::FilePath lastProjectPath() const; ++ void setLastProjectPath(const ::core::FilePath& lastProjectPath); + +- const core::FilePath& file() const { return file_; } +- const core::FilePath& directory() const { return directory_; } +- const core::FilePath& scratchPath() const { return scratchPath_; } ++ const ::core::FilePath& file() const { return file_; } ++ const ::core::FilePath& directory() const { return directory_; } ++ const ::core::FilePath& scratchPath() const { return scratchPath_; } + +- core::FilePath oldScratchPath() const; ++ ::core::FilePath oldScratchPath() const; + +- const core::r_util::RProjectConfig& config() const { return config_; } +- void setConfig(const core::r_util::RProjectConfig& config) ++ const ::core::r_util::RProjectConfig& config() const { return config_; } ++ void setConfig(const ::core::r_util::RProjectConfig& config) + { + config_ = config; + updateDefaultEncoding(); +@@ -116,11 +116,11 @@ + updatePackageInfo(); + } + +- core::Error readVcsOptions(RProjectVcsOptions* pOptions) const; +- core::Error writeVcsOptions(const RProjectVcsOptions& options) const; ++ ::core::Error readVcsOptions(RProjectVcsOptions* pOptions) const; ++ ::core::Error writeVcsOptions(const RProjectVcsOptions& options) const; + +- core::Error readBuildOptions(RProjectBuildOptions* pOptions); +- core::Error writeBuildOptions(const RProjectBuildOptions& options); ++ ::core::Error readBuildOptions(RProjectBuildOptions* pOptions); ++ ::core::Error writeBuildOptions(const RProjectBuildOptions& options); + + // code which needs to rely on the encoding should call this method + // rather than getting the encoding off of the config (because the +@@ -131,14 +131,14 @@ + std::string defaultEncoding() const; + + // computed absolute path to project build target directory +- const core::FilePath& buildTargetPath() const ++ const ::core::FilePath& buildTargetPath() const + { + return buildTargetPath_; + } + +- core::json::Object uiPrefs() const; ++ ::core::json::Object uiPrefs() const; + +- core::json::Array openDocs() const; ++ ::core::json::Array openDocs() const; + + // current build options (note that these are not synchronized + // accross processes!) +@@ -148,7 +148,7 @@ + } + + // current package info (if this is a package) +- const core::r_util::RPackageInfo& packageInfo() const ++ const ::core::r_util::RPackageInfo& packageInfo() const + { + return packageInfo_; + } +@@ -160,7 +160,7 @@ + + // are we monitoring the specified directory? (used by other modules to + // suppress file monitoring if the project already has it covered) +- bool isMonitoringDirectory(const core::FilePath& directory) const; ++ bool isMonitoringDirectory(const ::core::FilePath& directory) const; + + // subscribe to file monitor notifications -- note that to ensure + // receipt of the onMonitoringEnabled callback subscription should +@@ -169,8 +169,8 @@ + const FileMonitorCallbacks& cb); + + public: +- static core::r_util::RProjectBuildDefaults buildDefaults(); +- static core::r_util::RProjectConfig defaultConfig(); ++ static ::core::r_util::RProjectBuildDefaults buildDefaults(); ++ static ::core::r_util::RProjectConfig defaultConfig(); + + private: + // deferred init handler (this allows other modules to reliably subscribe +@@ -179,14 +179,14 @@ + void onDeferredInit(bool newSession); + + // file monitor event handlers +- void fileMonitorRegistered(core::system::file_monitor::Handle handle, +- const tree& files); ++ void fileMonitorRegistered(::core::system::file_monitor::Handle handle, ++ const tree< ::core::FileInfo>& files); + void fileMonitorFilesChanged( +- const std::vector& events); +- void fileMonitorTermination(const core::Error& error); ++ const std::vector< ::core::system::FileChangeEvent>& events); ++ void fileMonitorTermination(const ::core::Error& error); + +- core::FilePath vcsOptionsFilePath() const; +- core::Error buildOptionsFile(core::Settings* pOptionsFile) const; ++ ::core::FilePath vcsOptionsFilePath() const; ++ ::core::Error buildOptionsFile(::core::Settings* pOptionsFile) const; + + void updateDefaultEncoding(); + void updateBuildTargetPath(); +@@ -195,19 +195,19 @@ + void augmentRbuildignore(); + + private: +- core::FilePath file_; +- core::FilePath directory_; +- core::FilePath scratchPath_; +- core::r_util::RProjectConfig config_; ++ ::core::FilePath file_; ++ ::core::FilePath directory_; ++ ::core::FilePath scratchPath_; ++ ::core::r_util::RProjectConfig config_; + std::string defaultEncoding_; +- core::FilePath buildTargetPath_; ++ ::core::FilePath buildTargetPath_; + RProjectBuildOptions buildOptions_; +- core::r_util::RPackageInfo packageInfo_; ++ ::core::r_util::RPackageInfo packageInfo_; + + bool hasFileMonitor_; + std::vector monitorSubscribers_; +- boost::signal&)> onMonitoringEnabled_; +- boost::signal&)> ++ boost::signal&)> onMonitoringEnabled_; ++ boost::signal&)> + onFilesChanged_; + boost::signal onMonitoringDisabled_; + }; +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionAsyncRProcess.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionAsyncRProcess.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionAsyncRProcess.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionAsyncRProcess.hpp 2015-03-08 22:23:10.488944012 +0100 +@@ -40,7 +40,7 @@ + AsyncRProcess(); + virtual ~AsyncRProcess(); + +- void start(const char* rCommand, const core::FilePath& workingDir, ++ void start(const char* rCommand, const ::core::FilePath& workingDir, + AsyncRProcessOptions rOptions); + bool isRunning(); + void terminate(); +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionConsoleProcess.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionConsoleProcess.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionConsoleProcess.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionConsoleProcess.hpp 2015-03-08 22:23:10.520944017 +0100 +@@ -53,7 +53,7 @@ + + ConsoleProcess( + const std::string& command, +- const core::system::ProcessOptions& options, ++ const ::core::system::ProcessOptions& options, + const std::string& caption, + bool dialog, + InteractionMode mode, +@@ -62,7 +62,7 @@ + ConsoleProcess( + const std::string& program, + const std::vector& args, +- const core::system::ProcessOptions& options, ++ const ::core::system::ProcessOptions& options, + const std::string& caption, + bool dialog, + InteractionMode mode, +@@ -95,7 +95,7 @@ + // the runProgram codepath + static boost::shared_ptr create( + const std::string& command, +- core::system::ProcessOptions options, ++ ::core::system::ProcessOptions options, + const std::string& caption, + bool dialog, + InteractionMode mode, +@@ -104,7 +104,7 @@ + static boost::shared_ptr create( + const std::string& program, + const std::vector& args, +- core::system::ProcessOptions options, ++ ::core::system::ProcessOptions options, + const std::string& caption, + bool dialog, + InteractionMode mode, +@@ -124,29 +124,29 @@ + std::string handle() const { return handle_; } + InteractionMode interactionMode() const { return interactionMode_; } + +- core::Error start(); ++ ::core::Error start(); + void enqueInput(const Input& input); + void interrupt(); + + void setShowOnOutput(bool showOnOutput) { showOnOutput_ = showOnOutput; } + +- core::json::Object toJson() const; ++ ::core::json::Object toJson() const; + static boost::shared_ptr fromJson( +- core::json::Object& obj); ++ ::core::json::Object& obj); + + private: +- core::system::ProcessCallbacks createProcessCallbacks(); +- bool onContinue(core::system::ProcessOperations& ops); +- void onStdout(core::system::ProcessOperations& ops, ++ ::core::system::ProcessCallbacks createProcessCallbacks(); ++ bool onContinue(::core::system::ProcessOperations& ops); ++ void onStdout(::core::system::ProcessOperations& ops, + const std::string& output); + void onExit(int exitCode); + + std::string bufferedOutput() const; + void appendToOutputBuffer(const std::string& str); + void enqueOutputEvent(const std::string& output, bool error); +- void handleConsolePrompt(core::system::ProcessOperations& ops, ++ void handleConsolePrompt(::core::system::ProcessOperations& ops, + const std::string& prompt); +- void maybeConsolePrompt(core::system::ProcessOperations& ops, ++ void maybeConsolePrompt(::core::system::ProcessOperations& ops, + const std::string& output); + + private: +@@ -154,7 +154,7 @@ + std::string command_; + std::string program_; + std::vector args_; +- core::system::ProcessOptions options_; ++ ::core::system::ProcessOptions options_; + + std::string caption_; + bool dialog_; +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionContentUrls.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionContentUrls.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionContentUrls.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionContentUrls.hpp 2015-03-08 22:23:10.522944018 +0100 +@@ -26,7 +26,7 @@ + namespace session { + namespace content_urls { + +-std::string provision(const std::string& title, const core::FilePath& filePath); ++std::string provision(const std::string& title, const ::core::FilePath& filePath); + + std::string provision(const std::string& title, + const std::string& content, +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionHttpConnection.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionHttpConnection.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionHttpConnection.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionHttpConnection.hpp 2015-03-08 22:23:10.486944012 +0100 +@@ -56,13 +56,13 @@ + public: + virtual ~HttpConnection() {} + +- virtual const core::http::Request& request() = 0; +- virtual void sendResponse(const core::http::Response& response) = 0; ++ virtual const ::core::http::Request& request() = 0; ++ virtual void sendResponse(const ::core::http::Response& response) = 0; + +- void sendJsonRpcError(const core::Error& error); ++ void sendJsonRpcError(const ::core::Error& error); + void sendJsonRpcResponse(); + void sendJsonRpcResponse( +- const core::json::JsonRpcResponse& jsonRpcResponse); ++ const ::core::json::JsonRpcResponse& jsonRpcResponse); + + + // close (occurs automatically after writeResponse, here in case it +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionHttpConnectionListener.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionHttpConnectionListener.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionHttpConnectionListener.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionHttpConnectionListener.hpp 2015-03-08 22:23:10.492944013 +0100 +@@ -90,7 +90,7 @@ + virtual ~HttpConnectionListener() {} + + // start and stop +- virtual core::Error start() = 0; ++ virtual ::core::Error start() = 0; + virtual void stop() = 0; + + // connection queues +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionLocalStreams.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionLocalStreams.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionLocalStreams.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionLocalStreams.hpp 2015-03-08 22:23:10.503944015 +0100 +@@ -29,20 +29,20 @@ + namespace session { + namespace local_streams { + +-inline core::Error ensureStreamsDir() ++inline ::core::Error ensureStreamsDir() + { +- core::FilePath sessionStreamsPath(kSessionLocalStreamsDir); +- return core::http::initializeStreamDir(sessionStreamsPath); ++ ::core::FilePath sessionStreamsPath(kSessionLocalStreamsDir); ++ return ::core::http::initializeStreamDir(sessionStreamsPath); + } + +-inline core::FilePath streamPath(const std::string& user) ++inline ::core::FilePath streamPath(const std::string& user) + { +- return core::FilePath(kSessionLocalStreamsDir).complete(user); ++ return ::core::FilePath(kSessionLocalStreamsDir).complete(user); + } + + inline void removeStreams(const std::string& user) + { +- core::Error error = streamPath(user).removeIfExists(); ++ ::core::Error error = streamPath(user).removeIfExists(); + if (error) + LOG_ERROR(error); + } +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionModuleContext.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionModuleContext.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionModuleContext.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionModuleContext.hpp 2015-03-08 22:23:10.515944017 +0100 +@@ -69,19 +69,19 @@ + + // paths + core::FilePath userHomePath(); +-std::string createAliasedPath(const core::FileInfo& fileInfo); +-std::string createAliasedPath(const core::FilePath& path); +-std::string createFileUrl(const core::FilePath& path); ++std::string createAliasedPath(const ::core::FileInfo& fileInfo); ++std::string createAliasedPath(const ::core::FilePath& path); ++std::string createFileUrl(const ::core::FilePath& path); + core::FilePath resolveAliasedPath(const std::string& aliasedPath); + core::FilePath userScratchPath(); + core::FilePath scopedScratchPath(); + core::FilePath oldScopedScratchPath(); +-bool isVisibleUserFile(const core::FilePath& filePath); ++bool isVisibleUserFile(const ::core::FilePath& filePath); + + core::FilePath safeCurrentPath(); + +-core::json::Object createFileSystemItem(const core::FileInfo& fileInfo); +-core::json::Object createFileSystemItem(const core::FilePath& filePath); ++core::json::Object createFileSystemItem(const ::core::FileInfo& fileInfo); ++core::json::Object createFileSystemItem(const ::core::FilePath& filePath); + + // get a temp file + core::FilePath tempFile(const std::string& prefix, +@@ -95,12 +95,12 @@ + bool isPdfLatexInstalled(); + + // is the file a text file +-bool isTextFile(const core::FilePath& targetPath); ++bool isTextFile(const ::core::FilePath& targetPath); + + // find the location of the R script +-core::Error rBinDir(core::FilePath* pRBinDirPath); +-core::Error rScriptPath(core::FilePath* pRScriptPath); +-core::shell_utils::ShellCommand rCmd(const core::FilePath& rBinDir); ++core::Error rBinDir(::core::FilePath* pRBinDirPath); ++core::Error rScriptPath(::core::FilePath* pRScriptPath); ++core::shell_utils::ShellCommand rCmd(const ::core::FilePath& rBinDir); + + // get the R local help port + std::string rLocalHelpPort(); +@@ -126,37 +126,37 @@ + core::Error installEmbeddedPackage(const std::string& name); + + // find the package name for a source file +-std::string packageNameForSourceFile(const core::FilePath& sourceFilePath); ++std::string packageNameForSourceFile(const ::core::FilePath& sourceFilePath); + + // register a handler for rBrowseUrl + typedef boost::function RBrowseUrlHandler; + core::Error registerRBrowseUrlHandler(const RBrowseUrlHandler& handler); + + // register a handler for rBrowseFile +-typedef boost::function RBrowseFileHandler; ++typedef boost::function RBrowseFileHandler; + core::Error registerRBrowseFileHandler(const RBrowseFileHandler& handler); + + // register an inbound uri handler (include a leading slash) + core::Error registerAsyncUriHandler( + const std::string& name, +- const core::http::UriAsyncHandlerFunction& handlerFunction); ++ const ::core::http::UriAsyncHandlerFunction& handlerFunction); + + // register an inbound uri handler (include a leading slash) + core::Error registerUriHandler( + const std::string& name, +- const core::http::UriHandlerFunction& handlerFunction); ++ const ::core::http::UriHandlerFunction& handlerFunction); + + // register a local uri handler (scoped by a special prefix which indicates + // a local scope) + core::Error registerAsyncLocalUriHandler( + const std::string& name, +- const core::http::UriAsyncHandlerFunction& handlerFunction); ++ const ::core::http::UriAsyncHandlerFunction& handlerFunction); + + // register a local uri handler (scoped by a special prefix which indicates + // a local scope) + core::Error registerLocalUriHandler( + const std::string& name, +- const core::http::UriHandlerFunction& handlerFunction); ++ const ::core::http::UriHandlerFunction& handlerFunction); + + typedef boost::function PostbackHandlerContinuation; + +@@ -172,16 +172,16 @@ + // register an rpc method + core::Error registerAsyncRpcMethod( + const std::string& name, +- const core::json::JsonRpcAsyncFunction& function); ++ const ::core::json::JsonRpcAsyncFunction& function); + + // register an rpc method + core::Error registerRpcMethod(const std::string& name, +- const core::json::JsonRpcFunction& function); ++ const ::core::json::JsonRpcFunction& function); + + +-core::Error executeAsync(const core::json::JsonRpcFunction& function, +- const core::json::JsonRpcRequest& request, +- core::json::JsonRpcResponse* pResponse); ++core::Error executeAsync(const ::core::json::JsonRpcFunction& function, ++ const ::core::json::JsonRpcRequest& request, ++ ::core::json::JsonRpcResponse* pResponse); + + + // create a waitForMethod function -- when called this function will: +@@ -190,20 +190,20 @@ + // (b) wait for the specified methodName to be returned from the client + // (c) automatically re-issue the event after a client-init + // +-typedef boost::function WaitForMethodFunction; ++typedef boost::function WaitForMethodFunction; + WaitForMethodFunction registerWaitForMethod(const std::string& methodName); + + namespace { + + template + core::Error rpcAsyncCoupleRunner( +- boost::function initFunc, +- boost::function workerFunc, +- const core::json::JsonRpcRequest& request, +- core::json::JsonRpcResponse* pResponse) ++ boost::function< ::core::Error(const ::core::json::JsonRpcRequest&, T*)> initFunc, ++ boost::function< ::core::Error(const ::core::json::JsonRpcRequest&, const T&, ::core::json::JsonRpcResponse*)> workerFunc, ++ const ::core::json::JsonRpcRequest& request, ++ ::core::json::JsonRpcResponse* pResponse) + { + T state; +- core::Error error = initFunc(request, &state); ++ ::core::Error error = initFunc(request, &state); + if (error) + return error; + +@@ -225,8 +225,8 @@ + template + core::Error registerRpcAsyncCoupleMethod( + const std::string& name, +- boost::function initFunc, +- boost::function workerFunc) ++ boost::function< ::core::Error(const ::core::json::JsonRpcRequest&, T*)> initFunc, ++ boost::function< ::core::Error(const ::core::json::JsonRpcRequest&, const T&, ::core::json::JsonRpcResponse*)> workerFunc) + { + return registerRpcMethod(name, boost::bind(rpcAsyncCoupleRunner, + initFunc, +@@ -278,7 +278,7 @@ + boost::signal + onConsoleOutput; + boost::signal onDetectChanges; +- boost::signal onSourceEditorFileSaved; ++ boost::signal onSourceEditorFileSaved; + boost::signal onDeferredInit; + boost::signal afterSessionInitHook; + boost::signal onBackgroundProcessing; +@@ -340,7 +340,7 @@ + bool idleOnly = true); + + +-core::Error readAndDecodeFile(const core::FilePath& filePath, ++core::Error readAndDecodeFile(const ::core::FilePath& filePath, + const std::string& encoding, + bool allowSubstChars, + std::string* pContents); +@@ -353,29 +353,29 @@ + // source R files + core::Error sourceModuleRFile(const std::string& rSourceFile); + core::Error sourceModuleRFileWithResult(const std::string& rSourceFile, +- const core::FilePath& workingDir, +- core::system::ProcessResult* pResult); ++ const ::core::FilePath& workingDir, ++ ::core::system::ProcessResult* pResult); + + // enque client events (note R methods can do this via .rs.enqueClientEvent) + void enqueClientEvent(const ClientEvent& event); + + // check whether a directory is currently being monitored by one of our subsystems +-bool isDirectoryMonitored(const core::FilePath& directory); ++bool isDirectoryMonitored(const ::core::FilePath& directory); + + // check whether an R source file belongs to the package under development +-bool isRScriptInPackageBuildTarget(const core::FilePath& filePath); ++bool isRScriptInPackageBuildTarget(const ::core::FilePath& filePath); + + // convenience method for filtering out file listing and changes +-bool fileListingFilter(const core::FileInfo& fileInfo); ++bool fileListingFilter(const ::core::FileInfo& fileInfo); + + // enque file changed events +-void enqueFileChangedEvent(const core::system::FileChangeEvent& event); +-void enqueFileChangedEvents(const core::FilePath& vcsStatusRoot, +- const std::vector& events); ++void enqueFileChangedEvent(const ::core::system::FileChangeEvent& event); ++void enqueFileChangedEvents(const ::core::FilePath& vcsStatusRoot, ++ const std::vector< ::core::system::FileChangeEvent>& events); + + + // register a scratch path which is monitored. +-typedef boost::function OnFileChange; ++typedef boost::function OnFileChange; + core::FilePath registerMonitoredUserScratchDir(const std::string& dirName, + const OnFileChange& onFileChange); + +@@ -390,11 +390,11 @@ + // show an error dialog (convenience wrapper for enquing kShowErrorMessage) + void showErrorMessage(const std::string& title, const std::string& message); + +-void showFile(const core::FilePath& filePath, ++void showFile(const ::core::FilePath& filePath, + const std::string& window = "_blank"); + + +-void showContent(const std::string& title, const core::FilePath& filePath); ++void showContent(const std::string& title, const ::core::FilePath& filePath); + + std::string resourceFileAsString(const std::string& fileName); + +@@ -402,8 +402,8 @@ + + std::string mapUrlPorts(const std::string& url); + +-std::string pathRelativeTo(const core::FilePath& sourcePath, +- const core::FilePath& targetPath); ++std::string pathRelativeTo(const ::core::FilePath& sourcePath, ++ const ::core::FilePath& targetPath); + + void activatePane(const std::string& pane); + +@@ -418,7 +418,7 @@ + #ifdef __APPLE__ + bool isOSXMavericks(); + bool hasOSXMavericksDeveloperTools(); +-core::Error copyImageToCocoaPasteboard(const core::FilePath& filePath); ++core::Error copyImageToCocoaPasteboard(const ::core::FilePath& filePath); + #else + inline bool isOSXMavericks() + { +@@ -428,9 +428,9 @@ + { + return false; + } +-inline core::Error copyImageToCocoaPasteboard(const core::FilePath& filePath) ++inline ::core::Error copyImageToCocoaPasteboard(const ::core::FilePath& filePath) + { +- return core::systemError(boost::system::errc::not_supported, ERROR_LOCATION); ++ return ::core::systemError(boost::system::errc::not_supported, ERROR_LOCATION); + } + #endif + +@@ -441,7 +441,7 @@ + std::string svnRepositoryRoot; + std::string gitRemoteOriginUrl; + }; +-VcsContext vcsContext(const core::FilePath& workingDir); ++VcsContext vcsContext(const ::core::FilePath& workingDir); + + std::string normalizeVcsOverride(const std::string& vcsOverride); + +@@ -450,8 +450,8 @@ + // persist state accross suspend and resume + + typedef boost::function SuspendFunction; +-typedef boost::function ResumeFunction; ++ ::core::Settings*)> SuspendFunction; ++typedef boost::function ResumeFunction; + + class SuspendHandler + { +@@ -494,7 +494,7 @@ + core::json::Object compileOutputAsJson(const CompileOutput& compileOutput); + + +-std::string previousRpubsUploadId(const core::FilePath& filePath); ++std::string previousRpubsUploadId(const ::core::FilePath& filePath); + + std::string CRANReposURL(); + +@@ -594,7 +594,7 @@ + class RCommand + { + public: +- explicit RCommand(const core::FilePath& rBinDir) ++ explicit RCommand(const ::core::FilePath& rBinDir) + : shellCmd_(buildRCmd(rBinDir)) + { + #ifdef _WIN32 +@@ -606,7 +606,7 @@ + // set escape mode to files-only. this is so that when we + // add the group of extra arguments from the user that we + // don't put quotes around it. +- shellCmd_ << core::shell_utils::EscapeFilesOnly; ++ shellCmd_ << ::core::shell_utils::EscapeFilesOnly; + } + + RCommand& operator<<(const std::string& arg) +@@ -619,7 +619,7 @@ + return *this; + } + +- RCommand& operator<<(const core::FilePath& arg) ++ RCommand& operator<<(const ::core::FilePath& arg) + { + cmdString_ += " " + arg.absolutePath(); + shellCmd_ << arg; +@@ -632,18 +632,18 @@ + return cmdString_; + } + +- const core::shell_utils::ShellCommand& shellCommand() const ++ const ::core::shell_utils::ShellCommand& shellCommand() const + { + return shellCmd_; + } + + private: +- static core::shell_utils::ShellCommand buildRCmd( +- const core::FilePath& rBinDir); ++ static ::core::shell_utils::ShellCommand buildRCmd( ++ const ::core::FilePath& rBinDir); + + private: + std::string cmdString_; +- core::shell_utils::ShellCommand shellCmd_; ++ ::core::shell_utils::ShellCommand shellCmd_; + }; + + +@@ -662,8 +662,8 @@ + + const std::string& sessionTempPath() const { return sessionTempPath_; } + +- core::Error copy(const core::FilePath& sourceDir, +- const core::FilePath& destinationDir) const; ++ ::core::Error copy(const ::core::FilePath& sourceDir, ++ const ::core::FilePath& destinationDir) const; + + private: + std::string sessionTempPath_; +@@ -671,12 +671,12 @@ + + void addViewerHistoryEntry(const ViewerHistoryEntry& entry); + +-core::Error recursiveCopyDirectory(const core::FilePath& fromDir, +- const core::FilePath& toDir); ++core::Error recursiveCopyDirectory(const ::core::FilePath& fromDir, ++ const ::core::FilePath& toDir); + + std::string sessionTempDirUrl(const std::string& sessionTempPath); + +-core::Error uniqueSaveStem(const core::FilePath& directoryPath, ++core::Error uniqueSaveStem(const ::core::FilePath& directoryPath, + const std::string& base, + std::string* pStem); + +@@ -684,8 +684,8 @@ + const std::string& extension); + + +-core::Error createSelfContainedHtml(const core::FilePath& sourceFilePath, +- const core::FilePath& targetFilePath); ++core::Error createSelfContainedHtml(const ::core::FilePath& sourceFilePath, ++ const ::core::FilePath& targetFilePath); + + } // namespace module_context + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionOptions.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionOptions.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionOptions.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionOptions.hpp 2015-03-08 22:23:10.508944015 +0100 +@@ -53,7 +53,7 @@ + + public: + // read options +- core::ProgramStatus read(int argc, char * const argv[]); ++ ::core::ProgramStatus read(int argc, char * const argv[]); + virtual ~Options() {} + + bool verifyInstallation() const +@@ -61,12 +61,12 @@ + return verifyInstallation_; + } + +- core::FilePath verifyInstallationHomeDir() const ++ ::core::FilePath verifyInstallationHomeDir() const + { + if (!verifyInstallationHomeDir_.empty()) +- return core::FilePath(verifyInstallationHomeDir_.c_str()); ++ return ::core::FilePath(verifyInstallationHomeDir_.c_str()); + else +- return core::FilePath(); ++ return ::core::FilePath(); + } + + std::string programIdentity() const +@@ -85,12 +85,12 @@ + } + + // agreement +- core::FilePath agreementFilePath() const ++ ::core::FilePath agreementFilePath() const + { + if (!agreementFilePath_.empty()) +- return core::FilePath(agreementFilePath_.c_str()); ++ return ::core::FilePath(agreementFilePath_.c_str()); + else +- return core::FilePath(); ++ return ::core::FilePath(); + } + + // docs +@@ -105,9 +105,9 @@ + return std::string(wwwLocalPath_.c_str()); + } + +- core::FilePath wwwSymbolMapsPath() const ++ ::core::FilePath wwwSymbolMapsPath() const + { +- return core::FilePath(wwwSymbolMapsPath_.c_str()); ++ return ::core::FilePath(wwwSymbolMapsPath_.c_str()); + } + + std::string wwwPort() const +@@ -125,9 +125,9 @@ + return std::string(secret_.c_str()); + } + +- core::FilePath preflightScriptPath() const ++ ::core::FilePath preflightScriptPath() const + { +- return core::FilePath(preflightScript_.c_str()); ++ return ::core::FilePath(preflightScript_.c_str()); + } + + int timeoutMinutes() const { return timeoutMinutes_; } +@@ -144,29 +144,29 @@ + + unsigned int minimumUserId() const { return 100; } + +- core::FilePath coreRSourcePath() const ++ ::core::FilePath coreRSourcePath() const + { +- return core::FilePath(coreRSourcePath_.c_str()); ++ return ::core::FilePath(coreRSourcePath_.c_str()); + } + +- core::FilePath modulesRSourcePath() const ++ ::core::FilePath modulesRSourcePath() const + { +- return core::FilePath(modulesRSourcePath_.c_str()); ++ return ::core::FilePath(modulesRSourcePath_.c_str()); + } + +- core::FilePath sessionLibraryPath() const ++ ::core::FilePath sessionLibraryPath() const + { +- return core::FilePath(sessionLibraryPath_.c_str()); ++ return ::core::FilePath(sessionLibraryPath_.c_str()); + } + +- core::FilePath sessionPackagesPath() const ++ ::core::FilePath sessionPackagesPath() const + { +- return core::FilePath(sessionPackagesPath_.c_str()); ++ return ::core::FilePath(sessionPackagesPath_.c_str()); + } + +- core::FilePath sessionPackageArchivesPath() const ++ ::core::FilePath sessionPackageArchivesPath() const + { +- return core::FilePath(sessionPackageArchivesPath_.c_str()); ++ return ::core::FilePath(sessionPackageArchivesPath_.c_str()); + } + + +@@ -185,9 +185,9 @@ + return rCompatibleGraphicsEngineVersion_; + } + +- core::FilePath rResourcesPath() const ++ ::core::FilePath rResourcesPath() const + { +- return core::FilePath(rResourcesPath_.c_str()); ++ return ::core::FilePath(rResourcesPath_.c_str()); + } + + std::string rHomeDirOverride() +@@ -211,49 +211,49 @@ + bool limitXfsDiskQuota() const { return limitXfsDiskQuota_; } + + // external +- core::FilePath rpostbackPath() const ++ ::core::FilePath rpostbackPath() const + { +- return core::FilePath(rpostbackPath_.c_str()); ++ return ::core::FilePath(rpostbackPath_.c_str()); + } + +- core::FilePath consoleIoPath() const ++ ::core::FilePath consoleIoPath() const + { +- return core::FilePath(consoleIoPath_.c_str()); ++ return ::core::FilePath(consoleIoPath_.c_str()); + } + +- core::FilePath gnudiffPath() const ++ ::core::FilePath gnudiffPath() const + { +- return core::FilePath(gnudiffPath_.c_str()); ++ return ::core::FilePath(gnudiffPath_.c_str()); + } + +- core::FilePath gnugrepPath() const ++ ::core::FilePath gnugrepPath() const + { +- return core::FilePath(gnugrepPath_.c_str()); ++ return ::core::FilePath(gnugrepPath_.c_str()); + } + +- core::FilePath msysSshPath() const ++ ::core::FilePath msysSshPath() const + { +- return core::FilePath(msysSshPath_.c_str()); ++ return ::core::FilePath(msysSshPath_.c_str()); + } + +- core::FilePath sumatraPath() const ++ ::core::FilePath sumatraPath() const + { +- return core::FilePath(sumatraPath_.c_str()); ++ return ::core::FilePath(sumatraPath_.c_str()); + } + +- core::FilePath hunspellDictionariesPath() const ++ ::core::FilePath hunspellDictionariesPath() const + { +- return core::FilePath(hunspellDictionariesPath_.c_str()); ++ return ::core::FilePath(hunspellDictionariesPath_.c_str()); + } + +- core::FilePath mathjaxPath() const ++ ::core::FilePath mathjaxPath() const + { +- return core::FilePath(mathjaxPath_.c_str()); ++ return ::core::FilePath(mathjaxPath_.c_str()); + } + +- core::FilePath pandocPath() const ++ ::core::FilePath pandocPath() const + { +- return core::FilePath(pandocPath_.c_str()); ++ return ::core::FilePath(pandocPath_.c_str()); + } + + bool allowFileDownloads() const +@@ -307,43 +307,43 @@ + return showUserIdentity_; + } + +- core::FilePath userHomePath() const ++ ::core::FilePath userHomePath() const + { +- return core::FilePath(userHomePath_.c_str()); ++ return ::core::FilePath(userHomePath_.c_str()); + } + +- core::FilePath userScratchPath() const ++ ::core::FilePath userScratchPath() const + { +- return core::FilePath(userScratchPath_.c_str()); ++ return ::core::FilePath(userScratchPath_.c_str()); + } + +- core::FilePath userLogPath() const ++ ::core::FilePath userLogPath() const + { + return userScratchPath().childPath("log"); + } + +- core::FilePath initialWorkingDirOverride() ++ ::core::FilePath initialWorkingDirOverride() + { + if (!initialWorkingDirOverride_.empty()) +- return core::FilePath(initialWorkingDirOverride_.c_str()); ++ return ::core::FilePath(initialWorkingDirOverride_.c_str()); + else +- return core::FilePath(); ++ return ::core::FilePath(); + } + +- core::FilePath initialEnvironmentFileOverride() ++ ::core::FilePath initialEnvironmentFileOverride() + { + if (!initialEnvironmentFileOverride_.empty()) +- return core::FilePath(initialEnvironmentFileOverride_.c_str()); ++ return ::core::FilePath(initialEnvironmentFileOverride_.c_str()); + else +- return core::FilePath(); ++ return ::core::FilePath(); + } + +- core::FilePath initialProjectPath() ++ ::core::FilePath initialProjectPath() + { + if (!initialProjectPath_.empty()) +- return core::FilePath(initialProjectPath_.c_str()); ++ return ::core::FilePath(initialProjectPath_.c_str()); + else +- return core::FilePath(); ++ return ::core::FilePath(); + } + + void clearInitialContextSettings() +@@ -356,16 +356,16 @@ + // The line ending we use when working with source documents + // in memory. This doesn't really make sense for the user to + // change. +- core::string_utils::LineEnding sourceLineEnding() const ++ ::core::string_utils::LineEnding sourceLineEnding() const + { +- return core::string_utils::LineEndingPosix; ++ return ::core::string_utils::LineEndingPosix; + } + + // The line ending we persist to disk with. This could potentially + // be a per-user or even per-file option. +- core::string_utils::LineEnding sourcePersistLineEnding() const ++ ::core::string_utils::LineEnding sourcePersistLineEnding() const + { +- return core::string_utils::LineEndingNative; ++ return ::core::string_utils::LineEndingNative; + } + + std::string monitorSharedSecret() const +@@ -386,11 +386,11 @@ + bool getBoolOverlayOption(const std::string& name); + + private: +- void resolvePath(const core::FilePath& resourcePath, ++ void resolvePath(const ::core::FilePath& resourcePath, + std::string* pPath); +- void resolvePostbackPath(const core::FilePath& resourcePath, ++ void resolvePostbackPath(const ::core::FilePath& resourcePath, + std::string* pPath); +- void resolvePandocPath(const core::FilePath& resourcePath, std::string* pPath); ++ void resolvePandocPath(const ::core::FilePath& resourcePath, std::string* pPath); + + void addOverlayOptions(boost::program_options::options_description* pOpt); + bool validateOverlayOptions(std::string* pErrMsg); +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionPersistentState.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionPersistentState.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionPersistentState.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionPersistentState.hpp 2015-03-08 22:23:10.498944014 +0100 +@@ -37,7 +37,7 @@ + public: + // COPYING: boost::noncopyable + +- core::Error initialize(); ++ ::core::Error initialize(); + + // active-client-id + std::string activeClientId(); +@@ -57,12 +57,12 @@ + const std::string& hashValue); + + // get underlying settings +- core::Settings& settings() { return settings_; } ++ ::core::Settings& settings() { return settings_; } + + private: + bool serverMode_; + std::string desktopClientId_; +- core::Settings settings_; ++ ::core::Settings settings_; + }; + + } // namespace session +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionSourceDatabase.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionSourceDatabase.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionSourceDatabase.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionSourceDatabase.hpp 2015-03-08 22:23:10.510944016 +0100 +@@ -50,7 +50,7 @@ + bool dirty() const { return dirty_; } + double created() const { return created_; } + bool sourceOnSave() const { return sourceOnSave_; } +- const core::json::Object& properties() const { return properties_; } ++ const ::core::json::Object& properties() const { return properties_; } + const std::string& folds() const { return folds_; } + std::string getProperty(const std::string& name) const; + +@@ -61,10 +61,10 @@ + void setContents(const std::string& contents); + + // set contents from file +- core::Error setPathAndContents(const std::string& path, ++ ::core::Error setPathAndContents(const std::string& path, + bool allowSubstChars = true); + +- core::Error updateDirty(); ++ ::core::Error updateDirty(); + + // set dirty + void setDirty(bool dirty) +@@ -97,20 +97,20 @@ + // properties that already exist but are not present in the given object are + // left unchanged. if an entry in the given object has a null value, that + // property should be removed. +- void editProperties(core::json::Object& properties); ++ void editProperties(::core::json::Object& properties); + + void setType(const std::string& type) + { + type_ = type; + } + +- core::Error readFromJson(core::json::Object* pDocJson); +- void writeToJson(core::json::Object* pDocJson) const; ++ ::core::Error readFromJson(::core::json::Object* pDocJson); ++ void writeToJson(::core::json::Object* pDocJson) const; + +- core::Error writeToFile(const core::FilePath& filePath) const; ++ ::core::Error writeToFile(const ::core::FilePath& filePath) const; + + private: +- void editProperty(const core::json::Object::value_type& property); ++ void editProperty(const ::core::json::Object::value_type& property); + + private: + std::string id_; +@@ -124,7 +124,7 @@ + bool dirty_; + double created_; + bool sourceOnSave_; +- core::json::Object properties_; ++ ::core::json::Object properties_; + }; + + bool sortByCreated(const boost::shared_ptr& pDoc1, +@@ -133,7 +133,7 @@ + core::FilePath path(); + core::Error get(const std::string& id, boost::shared_ptr pDoc); + core::Error getDurableProperties(const std::string& path, +- core::json::Object* pProperties); ++ ::core::json::Object* pProperties); + core::Error list(std::vector >* pDocs); + core::Error put(boost::shared_ptr pDoc); + core::Error remove(const std::string& id); +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionSSH.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionSSH.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionSSH.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionSSH.hpp 2015-03-08 22:23:10.517944017 +0100 +@@ -32,7 +32,7 @@ + class ProcessOptionsCreator + { + public: +- ProcessOptionsCreator(core::system::ProcessOptions baseOptions) ++ ProcessOptionsCreator(::core::system::ProcessOptions baseOptions) + : baseOptions_(baseOptions) + { + } +@@ -50,20 +50,20 @@ + void rmEnv(const std::string& name); + + // Add a directory to the path of the child process +- void addToPath(const core::FilePath& dir); ++ void addToPath(const ::core::FilePath& dir); + +- void setWorkingDirectory(const core::FilePath& dir); ++ void setWorkingDirectory(const ::core::FilePath& dir); + void clearWorkingDirectory(); + + // Create the actual ProcessOptions object from the state of this + // object. +- core::system::ProcessOptions processOptions() const; ++ ::core::system::ProcessOptions processOptions() const; + + private: +- core::system::ProcessOptions baseOptions_; ++ ::core::system::ProcessOptions baseOptions_; + std::map env_; +- std::vector pathDirs_; +- core::FilePath workingDir_; ++ std::vector< ::core::FilePath> pathDirs_; ++ ::core::FilePath workingDir_; + }; + + } // namespace ssh +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/SessionUserSettings.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionUserSettings.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/SessionUserSettings.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/SessionUserSettings.hpp 2015-03-08 22:23:10.501944014 +0100 +@@ -62,7 +62,7 @@ + // COPYING: boost::noncopyable + + // intialize +- core::Error initialize(); ++ ::core::Error initialize(); + + // enable batch updates + void beginUpdate() { settings_.beginUpdate(); } +@@ -83,8 +83,8 @@ + bool autoCreatedProfile() const; + void setAutoCreatedProfile(bool autoCreated) ; + +- core::json::Object uiPrefs() const; +- void setUiPrefs(const core::json::Object& prefsObject); ++ ::core::json::Object uiPrefs() const; ++ void setUiPrefs(const ::core::json::Object& prefsObject); + + // readers for ui prefs + bool useSpacesForTab() const; +@@ -110,8 +110,8 @@ + bool loadRData() const; + void setLoadRData(bool loadRData); + +- core::FilePath initialWorkingDirectory() const; +- void setInitialWorkingDirectory(const core::FilePath& filePath); ++ ::core::FilePath initialWorkingDirectory() const; ++ void setInitialWorkingDirectory(const ::core::FilePath& filePath); + + bool alwaysSaveHistory() const; + void setAlwaysSaveHistory(bool alwaysSave); +@@ -128,14 +128,14 @@ + bool vcsEnabled() const; + void setVcsEnabled(bool enabled); + +- core::FilePath gitExePath() const; +- void setGitExePath(const core::FilePath& gitExePath); ++ ::core::FilePath gitExePath() const; ++ void setGitExePath(const ::core::FilePath& gitExePath); + +- core::FilePath svnExePath() const; +- void setSvnExePath(const core::FilePath& svnExePath); ++ ::core::FilePath svnExePath() const; ++ void setSvnExePath(const ::core::FilePath& svnExePath); + +- core::FilePath vcsTerminalPath() const; +- void setVcsTerminalPath(const core::FilePath& terminalPath); ++ ::core::FilePath vcsTerminalPath() const; ++ void setVcsTerminalPath(const ::core::FilePath& terminalPath); + + bool vcsUseGitBash() const; + void setVcsUseGitBash(bool useGitBash); +@@ -170,13 +170,13 @@ + private: + + void onSettingsFileChanged( +- const core::system::FileChangeEvent& changeEvent); ++ const ::core::system::FileChangeEvent& changeEvent); + +- core::FilePath getWorkingDirectoryValue(const std::string& key) const; ++ ::core::FilePath getWorkingDirectoryValue(const std::string& key) const; + void setWorkingDirectoryValue(const std::string& key, +- const core::FilePath& filePath) ; ++ const ::core::FilePath& filePath) ; + +- void updatePrefsCache(const core::json::Object& uiPrefs) const; ++ void updatePrefsCache(const ::core::json::Object& uiPrefs) const; + + template + T readUiPref(const boost::scoped_ptr& pPref) const +@@ -188,8 +188,8 @@ + } + + private: +- core::FilePath settingsFilePath_; +- core::Settings settings_; ++ ::core::FilePath settingsFilePath_; ++ ::core::Settings settings_; + + // cached prefs values + mutable boost::scoped_ptr pUseSpacesForTab_; +@@ -201,7 +201,7 @@ + mutable boost::scoped_ptr pDefaultLatexProgram_; + mutable boost::scoped_ptr pAlwaysEnableRnwConcordance_; + mutable boost::scoped_ptr pSpellingLanguage_; +- mutable boost::scoped_ptr pSpellingCustomDicts_; ++ mutable boost::scoped_ptr< ::core::json::Array> pSpellingCustomDicts_; + mutable boost::scoped_ptr pHandleErrorsInUserCodeOnly_; + mutable boost::scoped_ptr pShinyViewerType_; + }; +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/worker_safe/session/SessionClientEvent.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/worker_safe/session/SessionClientEvent.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/worker_safe/session/SessionClientEvent.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/worker_safe/session/SessionClientEvent.hpp 2015-03-08 22:23:10.526944019 +0100 +@@ -126,27 +126,27 @@ + public: + explicit ClientEvent(int type) + { +- init(type, core::json::Value()); ++ init(type, ::core::json::Value()); + } + +- ClientEvent(int type, const core::json::Value& data) ++ ClientEvent(int type, const ::core::json::Value& data) + { + init(type, data); + } + + ClientEvent(int type, const char* data) + { +- init(type, core::json::Value(std::string(data))); ++ init(type, ::core::json::Value(std::string(data))); + } + + ClientEvent(int type, const std::string& data) + { +- init(type, core::json::Value(data)); ++ init(type, ::core::json::Value(data)); + } + + ClientEvent(int type, bool data) + { +- core::json::Object boolObject ; ++ ::core::json::Object boolObject ; + boolObject["value"] = data; + init(type, boolObject); + } +@@ -156,17 +156,17 @@ + public: + int type() const { return type_; } + std::string typeName() const; +- const core::json::Value& data() const { return data_; } ++ const ::core::json::Value& data() const { return data_; } + const std::string& id() const { return id_; } + +- void asJsonObject(int id, core::json::Object* pObject) const; ++ void asJsonObject(int id, ::core::json::Object* pObject) const; + + private: +- void init(int type, const core::json::Value& data); ++ void init(int type, const ::core::json::Value& data); + + private: + int type_ ; +- core::json::Value data_ ; ++ ::core::json::Value data_ ; + std::string id_; + }; + +diff -ru rstudio-0.98.1103/src/cpp/session/include/session/worker_safe/session/SessionWorkerContext.hpp rstudio-0.98.1103-fix/src/cpp/session/include/session/worker_safe/session/SessionWorkerContext.hpp +--- rstudio-0.98.1103/src/cpp/session/include/session/worker_safe/session/SessionWorkerContext.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/include/session/worker_safe/session/SessionWorkerContext.hpp 2015-03-08 22:23:10.524944018 +0100 +@@ -27,7 +27,7 @@ + + // register a worker method + core::Error registerWorkerRpcMethod(const std::string& name, +- const core::json::JsonRpcFunction& function); ++ const ::core::json::JsonRpcFunction& function); + + + // enque client event +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuild.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuild.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuild.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuild.cpp 2015-03-08 22:23:09.968943924 +0100 +@@ -134,7 +134,7 @@ + } + } + +-void onFilesChanged(const std::vector& events) ++void onFilesChanged(const std::vector< ::core::system::FileChangeEvent>& events) + { + if (!s_forcePackageRebuild) + { +@@ -202,7 +202,7 @@ + } + + // callbacks +- core::system::ProcessCallbacks cb; ++ ::core::system::ProcessCallbacks cb; + cb.onContinue = boost::bind(&Build::onContinue, + Build::shared_from_this()); + cb.onStdout = boost::bind(&Build::onStandardOutput, +@@ -219,14 +219,14 @@ + + + void executeBuild(const std::string& type, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessCallbacks& cb) + { + // options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + + FilePath buildTargetPath = projects::projectContext().buildTargetPath(); +- const core::r_util::RProjectConfig& config = projectConfig(); ++ const ::core::r_util::RProjectConfig& config = projectConfig(); + if (config.buildType == r_util::kBuildTypePackage) + { + options.workingDir = buildTargetPath.parent(); +@@ -250,8 +250,8 @@ + + void executePackageBuild(const std::string& type, + const FilePath& packagePath, +- const core::system::ProcessOptions& options, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& options, ++ const ::core::system::ProcessCallbacks& cb) + { + // validate that this is a package + if (!r_util::isPackageDirectory(packagePath)) +@@ -293,7 +293,7 @@ + if (roxygenizeRequired(type)) + { + // special callback for roxygenize result +- core::system::ProcessCallbacks roxygenizeCb = cb; ++ ::core::system::ProcessCallbacks roxygenizeCb = cb; + roxygenizeCb.onExit = boost::bind(&Build::onRoxygenizeCompleted, + Build::shared_from_this(), + _1, +@@ -393,8 +393,8 @@ + + + void roxygenize(const FilePath& packagePath, +- core::system::ProcessOptions options, +- const core::system::ProcessCallbacks& cb) ++ ::core::system::ProcessOptions options, ++ const ::core::system::ProcessCallbacks& cb) + { + FilePath rScriptPath; + Error error = module_context::rScriptPath(&rScriptPath); +@@ -424,7 +424,7 @@ + { + if (module_context::haveRcppAttributes()) + { +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = module_context::sourceModuleRFileWithResult( + "SessionCompileAttributes.R", + packagePath, +@@ -460,8 +460,8 @@ + + void buildPackage(const std::string& type, + const FilePath& packagePath, +- const core::system::ProcessOptions& options, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& options, ++ const ::core::system::ProcessCallbacks& cb) + { + + // if this action is going to INSTALL the package then on +@@ -485,22 +485,22 @@ + initErrorParser(packagePath, parsers); + + // make a copy of options so we can customize the environment +- core::system::ProcessOptions pkgOptions(options); +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::ProcessOptions pkgOptions(options); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + + // allow child process to inherit our R_LIBS + std::string libPaths = module_context::libPathsString(); + if (!libPaths.empty()) +- core::system::setenv(&childEnv, "R_LIBS", libPaths); ++ ::core::system::setenv(&childEnv, "R_LIBS", libPaths); + + // prevent spurious cygwin warnings on windows + #ifdef _WIN32 +- core::system::setenv(&childEnv, "CYGWIN", "nodosfilewarning"); ++ ::core::system::setenv(&childEnv, "CYGWIN", "nodosfilewarning"); + #endif + + // set the not cran env var +- core::system::setenv(&childEnv, "NOT_CRAN", "true"); ++ ::core::system::setenv(&childEnv, "NOT_CRAN", "true"); + + // add r tools to path if necessary + addRtoolsToPathIfNecessary(&childEnv, &buildToolsWarning_); +@@ -600,8 +600,8 @@ + + void buildSourcePackage(const FilePath& rBinDir, + const FilePath& packagePath, +- const core::system::ProcessOptions& pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + // compose the build command + module_context::RCommand rCmd(rBinDir); +@@ -630,8 +630,8 @@ + + void buildBinaryPackage(const FilePath& rBinDir, + const FilePath& packagePath, +- const core::system::ProcessOptions& pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + // compose the INSTALL --binary + module_context::RCommand rCmd(rBinDir); +@@ -660,8 +660,8 @@ + + void checkPackage(const FilePath& rBinDir, + const FilePath& packagePath, +- const core::system::ProcessOptions& pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + // first build then check + +@@ -695,7 +695,7 @@ + rCheckCmd << FilePath(pkgInfo_.sourcePackageFilename()); + + // special callback for build result +- core::system::ProcessCallbacks buildCb = cb; ++ ::core::system::ProcessCallbacks buildCb = cb; + buildCb.onExit = boost::bind(&Build::onBuildForCheckCompleted, + Build::shared_from_this(), + _1, +@@ -733,8 +733,8 @@ + + bool devtoolsExecute(const std::string& command, + const FilePath& packagePath, +- core::system::ProcessOptions pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ ::core::system::ProcessOptions pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + // Find the path to R + FilePath rProgramPath; +@@ -768,8 +768,8 @@ + } + + void devtoolsCheckPackage(const FilePath& packagePath, +- const core::system::ProcessOptions& pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + // build the call to check + std::ostringstream ostr; +@@ -839,8 +839,8 @@ + } + + void devtoolsTestPackage(const FilePath& packagePath, +- const core::system::ProcessOptions& pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + std::string command = "devtools::test()"; + enqueCommandString(command); +@@ -848,8 +848,8 @@ + } + + void testPackage(const FilePath& packagePath, +- core::system::ProcessOptions pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ ::core::system::ProcessOptions pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + FilePath rScriptPath; + Error error = module_context::rScriptPath(&rScriptPath); +@@ -891,8 +891,8 @@ + + void devtoolsBuildPackage(const FilePath& packagePath, + bool binary, +- const core::system::ProcessOptions& pkgOptions, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& pkgOptions, ++ const ::core::system::ProcessCallbacks& cb) + { + // create the call to build + std::ostringstream ostr; +@@ -930,8 +930,8 @@ + void onBuildForCheckCompleted( + int exitStatus, + const module_context::RCommand& checkCmd, +- const core::system::ProcessOptions& checkOptions, +- const core::system::ProcessCallbacks& checkCb) ++ const ::core::system::ProcessOptions& checkOptions, ++ const ::core::system::ProcessCallbacks& checkCb) + { + if (exitStatus == EXIT_SUCCESS) + { +@@ -985,8 +985,8 @@ + + void executeMakefileBuild(const std::string& type, + const FilePath& targetPath, +- const core::system::ProcessOptions& options, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& options, ++ const ::core::system::ProcessCallbacks& cb) + { + // validate that there is a Makefile file + FilePath makefilePath = targetPath.childPath("Makefile"); +@@ -1031,8 +1031,8 @@ + + void executeCustomBuild(const std::string& type, + const FilePath& customScriptPath, +- const core::system::ProcessOptions& options, +- const core::system::ProcessCallbacks& cb) ++ const ::core::system::ProcessOptions& options, ++ const ::core::system::ProcessCallbacks& cb) + { + module_context::processSupervisor().runCommand( + shell_utils::ShellCommand(customScriptPath), +@@ -1389,7 +1389,7 @@ + + + void writeBuildContext(const BuildContext& buildContext, +- core::Settings* pSettings) ++ ::core::Settings* pSettings) + { + std::ostringstream ostr; + json::write(buildContext.outputs, ostr); +@@ -1402,7 +1402,7 @@ + pSettings->set("build-last-errors-base-dir", buildContext.errorsBaseDir); + } + +-void onSuspend(core::Settings* pSettings) ++void onSuspend(::core::Settings* pSettings) + { + if (s_pBuild) + { +@@ -1423,7 +1423,7 @@ + } + } + +-void onResume(const core::Settings& settings) ++void onResume(const ::core::Settings& settings) + { + std::string buildLastOutputs = settings.get("build-last-outputs"); + if (!buildLastOutputs.empty()) +@@ -1461,7 +1461,7 @@ + { + #ifdef _WIN32 + if (!s_previousPath.empty()) +- core::system::setenv("PATH", s_previousPath); ++ ::core::system::setenv("PATH", s_previousPath); + s_previousPath.clear(); + #endif + return R_NilValue; +@@ -1470,11 +1470,11 @@ + SEXP rs_addRToolsToPath() + { + #ifdef _WIN32 +- s_previousPath = core::system::getenv("PATH"); ++ s_previousPath = ::core::system::getenv("PATH"); + std::string newPath = s_previousPath; + std::string warningMsg; + build::addRtoolsToPathIfNecessary(&newPath, &warningMsg); +- core::system::setenv("PATH", newPath); ++ ::core::system::setenv("PATH", newPath); + + #endif + return R_NilValue; +@@ -1501,10 +1501,10 @@ + { + // on mavericks we just need to invoke clang and the user will be + // prompted to install the command line tools +- core::system::ProcessResult result; +- Error error = core::system::runCommand("clang --version", ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand("clang --version", + "", +- core::system::ProcessOptions(), ++ ::core::system::ProcessOptions(), + &result); + if (error) + LOG_ERROR(error); +@@ -1588,7 +1588,7 @@ + if (!error) + { + std::string makevars = "CC=clang\nCXX=clang++\n"; +- error = core::writeStringToFile(makevarsPath, makevars); ++ error = ::core::writeStringToFile(makevarsPath, makevars); + if (error) + LOG_ERROR(error); + } +@@ -1697,7 +1697,7 @@ + + // try to build a simple c file to test whether we have build tools available + FilePath cppPath = module_context::tempFile("test", "c"); +- Error error = core::writeStringToFile(cppPath, "void test() {}\n"); ++ Error error = ::core::writeStringToFile(cppPath, "void test() {}\n"); + if (error) + { + LOG_ERROR(error); +@@ -1718,16 +1718,16 @@ + rCmd << "SHLIB"; + rCmd << cppPath.filename(); + +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.workingDir = cppPath.parent(); +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + std::string warningMsg; + modules::build::addRtoolsToPathIfNecessary(&childEnv, &warningMsg); + options.environment = childEnv; + +- core::system::ProcessResult result; +- error = core::system::runCommand(rCmd.commandString(), options, &result); ++ ::core::system::ProcessResult result; ++ error = ::core::system::runCommand(rCmd.commandString(), options, &result); + if (error) + { + LOG_ERROR(error); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildEnvironment.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildEnvironment.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildEnvironment.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildEnvironment.cpp 2015-03-08 22:23:09.955943922 +0100 +@@ -52,7 +52,7 @@ + + // we have a candidate installPath + FilePath installPath = lsPath.parent().parent(); +- core::system::ensureLongPath(&installPath); ++ ::core::system::ensureLongPath(&installPath); + if (!installPath.childPath("Rtools.txt").exists()) + return noToolsFound; + +@@ -70,7 +70,7 @@ + + // Rtools is in the path -- now crack the VERSION file + std::string contents; +- Error error = core::readStringFromFile(versionPath, &contents); ++ Error error = ::core::readStringFromFile(versionPath, &contents); + if (error) + { + LOG_ERROR(error); +@@ -90,7 +90,7 @@ + std::string formatPath(const FilePath& filePath) + { + FilePath displayPath = filePath; +- core::system::ensureLongPath(&displayPath); ++ ::core::system::ensureLongPath(&displayPath); + return boost::algorithm::replace_all_copy( + displayPath.absolutePath(), "/", "\\"); + } +@@ -133,7 +133,7 @@ + + // ok so scan for R tools + std::vector rTools; +- error = core::r_util::scanRegistryForRTools(&rTools); ++ error = ::core::r_util::scanRegistryForRTools(&rTools); + if (error) + { + LOG_ERROR(error); +@@ -209,7 +209,7 @@ + return doAddRtoolsToPathIfNecessary(pPath, pWarningMessage); + } + +-bool addRtoolsToPathIfNecessary(core::system::Options* pEnvironment, ++bool addRtoolsToPathIfNecessary(::core::system::Options* pEnvironment, + std::string* pWarningMessage) + { + return doAddRtoolsToPathIfNecessary(pEnvironment, pWarningMessage); +@@ -231,7 +231,7 @@ + return false; + } + +-bool addRtoolsToPathIfNecessary(core::system::Options* pEnvironment, ++bool addRtoolsToPathIfNecessary(::core::system::Options* pEnvironment, + std::string* pWarningMessage) + { + return false; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildEnvironment.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildEnvironment.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildEnvironment.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildEnvironment.hpp 2015-03-08 22:23:09.953943922 +0100 +@@ -30,12 +30,12 @@ + namespace modules { + namespace build { + +-bool isRtoolsCompatible(const core::r_util::RToolsInfo& rTools); ++bool isRtoolsCompatible(const ::core::r_util::RToolsInfo& rTools); + + bool addRtoolsToPathIfNecessary(std::string* pPath, + std::string* pWarningMessage); + +-bool addRtoolsToPathIfNecessary(core::system::Options* pEnvironment, ++bool addRtoolsToPathIfNecessary(::core::system::Options* pEnvironment, + std::string* pWarningMessage); + + } // namespace build +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildErrors.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildErrors.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildErrors.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildErrors.cpp 2015-03-08 22:23:09.951943921 +0100 +@@ -76,7 +76,7 @@ + if (isRSourceFile(child)) + { + std::vector lines; +- Error error = core::readStringVectorFromFile(child, &lines, false); ++ Error error = ::core::readStringVectorFromFile(child, &lines, false); + if (error) + { + LOG_ERROR(error); +@@ -113,7 +113,7 @@ + + // we need to guess the file based on the contextual information + // provided in the error message +- int diagLine = core::safe_convert::stringTo(match[4], -1); ++ int diagLine = ::core::safe_convert::stringTo(match[4], -1); + if (diagLine != -1) + { + FilePath rSrcFile = scanForRSourceFile(basePath, +@@ -125,8 +125,8 @@ + // create error and add it + CompileError err(CompileError::Error, + rSrcFile, +- core::safe_convert::stringTo(line, 1), +- core::safe_convert::stringTo(column, 1), ++ ::core::safe_convert::stringTo(line, 1), ++ ::core::safe_convert::stringTo(column, 1), + message, + false); + errors.push_back(err); +@@ -183,7 +183,7 @@ + else + filePath = basePath.complete(file); + FilePath realPath; +- Error error = core::system::realPath(filePath, &realPath); ++ Error error = ::core::system::realPath(filePath, &realPath); + if (error) + LOG_ERROR(error); + else +@@ -200,8 +200,8 @@ + // create error and add it + CompileError err(errType, + filePath, +- core::safe_convert::stringTo(line, 1), +- core::safe_convert::stringTo(column, 1), ++ ::core::safe_convert::stringTo(line, 1), ++ ::core::safe_convert::stringTo(column, 1), + message, + true); + errors.push_back(err); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildErrors.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildErrors.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionBuildErrors.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionBuildErrors.hpp 2015-03-08 22:23:09.943943920 +0100 +@@ -39,7 +39,7 @@ + }; + + CompileError(Type type, +- const core::FilePath& path, ++ const ::core::FilePath& path, + int line, + int column, + const std::string& message, +@@ -50,7 +50,7 @@ + } + + Type type; +- core::FilePath path; ++ ::core::FilePath path; + int line; + int column; + std::string message; +@@ -91,9 +91,9 @@ + std::vector parsers_; + }; + +-CompileErrorParser gccErrorParser(const core::FilePath& basePath); ++CompileErrorParser gccErrorParser(const ::core::FilePath& basePath); + +-CompileErrorParser rErrorParser(const core::FilePath& basePath); ++CompileErrorParser rErrorParser(const ::core::FilePath& basePath); + + + } // namespace build +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionInstallRtools.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionInstallRtools.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionInstallRtools.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionInstallRtools.cpp 2015-03-08 22:23:09.958943922 +0100 +@@ -37,7 +37,7 @@ + + namespace { + +-void onDownloadCompleted(const core::system::ProcessResult& result, ++void onDownloadCompleted(const ::core::system::ProcessResult& result, + const std::string& version, + const FilePath& installerPath) + { +@@ -85,7 +85,7 @@ + } + } + if (version.empty()) +- return core::pathNotFoundError(ERROR_LOCATION); ++ return ::core::pathNotFoundError(ERROR_LOCATION); + + // R binary + FilePath rProgramPath; +@@ -119,7 +119,7 @@ + args.push_back(cmd); + + // create and execute the process +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.redirectStdErrToStdOut = true; + options.terminateChildren = true; + module_context::processSupervisor().runProgram( +diff -ru rstudio-0.98.1103/src/cpp/session/modules/build/SessionSourceCpp.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionSourceCpp.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/build/SessionSourceCpp.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/build/SessionSourceCpp.cpp 2015-03-08 22:23:09.948943921 +0100 +@@ -120,12 +120,12 @@ + showOutput_ = showOutput; + + // fixup path if necessary +- std::string path = core::system::getenv("PATH"); ++ std::string path = ::core::system::getenv("PATH"); + std::string newPath = path; + if (build::addRtoolsToPathIfNecessary(&newPath, &rToolsWarning_)) + { + previousPath_ = path; +- core::system::setenv("PATH", newPath); ++ ::core::system::setenv("PATH", newPath); + } + + // capture all output that goes to the console +@@ -156,7 +156,7 @@ + { + // restore previous path + if (!previousPath_.empty()) +- core::system::setenv("PATH", previousPath_); ++ ::core::system::setenv("PATH", previousPath_); + + // collect all build output (do this before r tools warning so + // it's output doesn't end up in consoleErrorBuffer_) +diff -ru rstudio-0.98.1103/src/cpp/session/modules/environment/EnvironmentUtils.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/environment/EnvironmentUtils.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/environment/EnvironmentUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/environment/EnvironmentUtils.hpp 2015-03-08 22:23:10.108943948 +0100 +@@ -23,7 +23,7 @@ + core::json::Value varToJson(SEXP env, const r::sexp::Variable& var); + bool isUnevaluatedPromise(SEXP var); + bool functionDiffersFromSource(SEXP srcRef, const std::string& functionCode); +-void sourceRefToJson(const SEXP srcref, core::json::Object* pObject); ++void sourceRefToJson(const SEXP srcref, ::core::json::Object* pObject); + + } // namespace environment + } // namespace modules +diff -ru rstudio-0.98.1103/src/cpp/session/modules/environment/SessionEnvironment.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/environment/SessionEnvironment.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/environment/SessionEnvironment.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/environment/SessionEnvironment.cpp 2015-03-08 22:23:10.097943946 +0100 +@@ -85,7 +85,7 @@ + return srcref && TYPEOF(srcref) != NILSXP; + } + +-bool handleRBrowseEnv(const core::FilePath& filePath) ++bool handleRBrowseEnv(const ::core::FilePath& filePath) + { + if (filePath.filename() == "wsbrowser.html") + { +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/PresentationLog.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/PresentationLog.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/PresentationLog.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/PresentationLog.cpp 2015-03-08 22:23:10.066943941 +0100 +@@ -212,7 +212,7 @@ + *pTargetFile = presDir.childPath(filename); + if (!pTargetFile->exists()) + { +- Error error = core::writeStringToFile(*pTargetFile, header + "\n"); ++ Error error = ::core::writeStringToFile(*pTargetFile, header + "\n"); + if (error) + return error; + } +@@ -276,7 +276,7 @@ + std::vector fields; + fields.push_back((type == NavigationEntry) ? "Navigation" : "Input"); + fields.push_back(timestamp()); +- fields.push_back(csvString(core::system::username())); ++ fields.push_back(csvString(::core::system::username())); + fields.push_back(csvPresentationPath()); + fields.push_back(safe_convert::numberToString(slideIndex)); + fields.push_back(slideType); +@@ -287,7 +287,7 @@ + std::string entry = boost::algorithm::join(fields, ","); + + // append entry +- error = core::appendToFile(logFilePath, entry + "\n"); ++ error = ::core::appendToFile(logFilePath, entry + "\n"); + if (error) + LOG_ERROR(error); + } +@@ -313,14 +313,14 @@ + // generate entry + std::vector fields; + fields.push_back(timestamp()); +- fields.push_back(csvString(core::system::username())); ++ fields.push_back(csvString(::core::system::username())); + fields.push_back(csvPresentationPath()); + fields.push_back(safe_convert::numberToString(currentSlideIndex_)); + fields.push_back(csvString(feedback)); + std::string entry = boost::algorithm::join(fields, ","); + + // append entry +- error = core::appendToFile(feedbackFilePath, entry + "\n"); ++ error = ::core::appendToFile(feedbackFilePath, entry + "\n"); + if (error) + LOG_ERROR(error); + } +@@ -347,7 +347,7 @@ + // generate entry + std::vector fields; + fields.push_back(timestamp()); +- fields.push_back(csvString(core::system::username())); ++ fields.push_back(csvString(::core::system::username())); + fields.push_back(csvPresentationPath()); + fields.push_back(safe_convert::numberToString(index)); + fields.push_back(safe_convert::numberToString(answer)); +@@ -355,7 +355,7 @@ + std::string entry = boost::algorithm::join(fields, ","); + + // append entry +- error = core::appendToFile(quizResponseFilePath, entry + "\n"); ++ error = ::core::appendToFile(quizResponseFilePath, entry + "\n"); + if (error) + LOG_ERROR(error); + } +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/PresentationLog.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/PresentationLog.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/PresentationLog.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/PresentationLog.hpp 2015-03-08 22:23:10.048943938 +0100 +@@ -45,7 +45,7 @@ + friend Log& log(); + + public: +- core::Error initialize(); ++ ::core::Error initialize(); + + void onSlideDeckChanged(const SlideDeck& slideDeck); + void onSlideIndexChanged(int index); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/PresentationState.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/PresentationState.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/PresentationState.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/PresentationState.hpp 2015-03-08 22:23:10.028943934 +0100 +@@ -29,7 +29,7 @@ + namespace state { + + +-void init(const core::FilePath& filePath, ++void init(const ::core::FilePath& filePath, + const std::string& caption = "Presentation", + bool isTutorial = false); + void setSlideIndex(int index); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SessionPresentation.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SessionPresentation.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SessionPresentation.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SessionPresentation.cpp 2015-03-08 22:23:10.046943937 +0100 +@@ -144,19 +144,19 @@ + // process template + std::map vars; + vars["name"] = filePath.stem(); +- core::text::TemplateFilter filter(vars); ++ ::core::text::TemplateFilter filter(vars); + + // read file with template filter + FilePath templatePath = session::options().rResourcesPath().complete( + "templates/r_presentation.Rpres"); + std::string presContents; +- error = core::readStringFromFile(templatePath, filter, &presContents); ++ error = ::core::readStringFromFile(templatePath, filter, &presContents); + if (error) + return error; + + + // write file +- return core::writeStringToFile(filePath, ++ return ::core::writeStringToFile(filePath, + presContents, + string_utils::LineEndingNative); + } +@@ -171,7 +171,7 @@ + + FilePath filePath = module_context::resolveAliasedPath(file); + if (!filePath.exists()) +- return core::fileNotFoundError(filePath, ERROR_LOCATION); ++ return ::core::fileNotFoundError(filePath, ERROR_LOCATION); + + showPresentation(filePath); + +@@ -326,7 +326,7 @@ + + // read code + std::string code; +- error = core::readStringFromFile(filePath, ++ error = ::core::readStringFromFile(filePath, + &code, + string_utils::LineEndingPosix); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideMediaRenderer.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideMediaRenderer.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideMediaRenderer.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideMediaRenderer.hpp 2015-03-08 22:23:10.040943936 +0100 +@@ -33,7 +33,7 @@ + + void renderMedia(const std::string& type, + int slideNumber, +- const core::FilePath& baseDir, ++ const ::core::FilePath& baseDir, + const std::string& fileName, + const std::vector& atCommands, + std::ostream& os, +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideNavigationList.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideNavigationList.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideNavigationList.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideNavigationList.hpp 2015-03-08 22:23:10.042943936 +0100 +@@ -37,11 +37,11 @@ + + std::string asCall() const; + +- core::json::Object asJson() const; ++ ::core::json::Object asJson() const; + + private: + void addSlide(const std::string& title, int indent, int index, int line); +- core::json::Array slides_; ++ ::core::json::Array slides_; + bool allowNavigation_; + bool allowSlideNavigation_; + int index_; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideParser.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideParser.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideParser.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideParser.cpp 2015-03-08 22:23:10.031943935 +0100 +@@ -406,7 +406,7 @@ + } + + // loop through the header lines to capture the slides +- boost::regex dcfFieldRegex(core::text::kDcfFieldRegex); ++ boost::regex dcfFieldRegex(::core::text::kDcfFieldRegex); + for (std::size_t i = 0; i& slides() const { return slides_; } + +- core::FilePath baseDir() const { return baseDir_; } ++ ::core::FilePath baseDir() const { return baseDir_; } + + private: +- core::FilePath baseDir_; ++ ::core::FilePath baseDir_; + std::string preamble_; + std::vector slides_; + }; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideRenderer.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideRenderer.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideRenderer.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideRenderer.cpp 2015-03-08 22:23:10.021943933 +0100 +@@ -206,7 +206,7 @@ + std::string* pSpecifiedWidth, + std::string* pOtherWidth) + { +- int w = core::safe_convert::stringTo(width, 50); ++ int w = ::core::safe_convert::stringTo(width, 50); + *pSpecifiedWidth = safe_convert::numberToString(w - 2) + "%"; + *pOtherWidth = safe_convert::numberToString(100 - w - 2) + "%"; + } +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideRequestHandler.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideRequestHandler.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideRequestHandler.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideRequestHandler.cpp 2015-03-08 22:23:10.055943939 +0100 +@@ -334,13 +334,13 @@ + args.push_back(cmd); + + // options +- core::system::ProcessOptions options; +- core::system::ProcessResult result; ++ ::core::system::ProcessOptions options; ++ ::core::system::ProcessResult result; + options.workingDir = rmdPath.parent(); + + // run knit +- error = core::system::runProgram( +- core::string_utils::utf8ToSystem(rProgramPath.absolutePath()), ++ error = ::core::system::runProgram( ++ ::core::string_utils::utf8ToSystem(rProgramPath.absolutePath()), + args, + "", + options, +@@ -356,7 +356,7 @@ + // play the error text back into + if (!mdPath.exists()) + { +- Error error = core::writeStringToFile(mdPath, ++ Error error = ::core::writeStringToFile(mdPath, + mdPath.stem() + + "\n=======================\n"); + if (error) +@@ -370,7 +370,7 @@ + << extractKnitrError(result.stdErr) << std::endl + << "```" << std::endl; + +- Error error = core::appendToFile(mdPath, ostr.str()); ++ Error error = ::core::appendToFile(mdPath, ostr.str()); + if (error) + LOG_ERROR(error); + +@@ -434,16 +434,16 @@ + using namespace boost::algorithm; + std::size_t colonLoc = href.find_first_of(':'); + std::string path = trim_copy(href.substr(colonLoc+1)); +- path = core::http::util::urlDecode(path); ++ path = ::core::http::util::urlDecode(path); + if (boost::algorithm::starts_with(path, "~/")) + path = module_context::resolveAliasedPath(path).absolutePath(); + FilePath filePath = presentation::state::directory() + .parent().complete(path); + +- Error error = core::system::realPath(filePath, &filePath); ++ Error error = ::core::system::realPath(filePath, &filePath); + if (error) + { +- if (!core::isPathNotFoundError(error)) ++ if (!::core::isPathNotFoundError(error)) + LOG_ERROR(error); + return match[0]; + } +@@ -486,7 +486,7 @@ + std::string userSlidesCss; + if (cssPath.exists()) + { +- Error error = core::readStringFromFile(cssPath, &userSlidesCss); ++ Error error = ::core::readStringFromFile(cssPath, &userSlidesCss); + if (error) + LOG_ERROR(error); + } +@@ -920,7 +920,7 @@ + + void handlePresentationHelpMarkdownRequest(const FilePath& filePath, + const std::string& jsCallbacks, +- core::http::Response* pResponse) ++ ::core::http::Response* pResponse) + { + // indirection on the actual md file (related to processing R markdown) + FilePath mdFilePath; +@@ -1001,7 +1001,7 @@ + s_cache.clear(); + + // read the file in from disk +- Error error = core::readStringFromFile(targetFile, &(s_cache.contents)); ++ Error error = ::core::readStringFromFile(targetFile, &(s_cache.contents)); + if (error) + { + pResponse->setError(error); +@@ -1165,9 +1165,9 @@ + } + } + +-void handlePresentationHelpRequest(const core::http::Request& request, ++void handlePresentationHelpRequest(const ::core::http::Request& request, + const std::string& jsCallbacks, +- core::http::Response* pResponse) ++ ::core::http::Response* pResponse) + { + // we save the most recent /help/presentation/&file=parameter so we + // can resolve relative file references against it. we do this +@@ -1229,7 +1229,7 @@ + } + } + +-bool savePresentationAsStandalone(const core::FilePath& filePath, ++bool savePresentationAsStandalone(const ::core::FilePath& filePath, + ErrorResponse* pErrorResponse) + { + return createStandalonePresentation(filePath, +@@ -1237,7 +1237,7 @@ + pErrorResponse); + } + +-bool savePresentationAsRpubsSource(const core::FilePath& filePath, ++bool savePresentationAsRpubsSource(const ::core::FilePath& filePath, + ErrorResponse* pErrorResponse) + { + return createStandalonePresentation(filePath, +diff -ru rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideRequestHandler.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideRequestHandler.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/presentation/SlideRequestHandler.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/presentation/SlideRequestHandler.hpp 2015-03-08 22:23:10.023943933 +0100 +@@ -34,30 +34,30 @@ + struct ErrorResponse + { + explicit ErrorResponse(const std::string& message = std::string(), +- core::http::status::Code statusCode +- = core::http::status::InternalServerError) ++ ::core::http::status::Code statusCode ++ = ::core::http::status::InternalServerError) + : message(message), statusCode(statusCode) + { + } + + std::string message; +- core::http::status::Code statusCode; ++ ::core::http::status::Code statusCode; + }; + + bool clearKnitrCache(ErrorResponse* pErrorResponse); + +-void handlePresentationPaneRequest(const core::http::Request& request, +- core::http::Response* pResponse); ++void handlePresentationPaneRequest(const ::core::http::Request& request, ++ ::core::http::Response* pResponse); + + +-void handlePresentationHelpRequest(const core::http::Request& request, ++void handlePresentationHelpRequest(const ::core::http::Request& request, + const std::string& jsCallbacks, +- core::http::Response* pResponse); ++ ::core::http::Response* pResponse); + +-bool savePresentationAsStandalone(const core::FilePath& filePath, ++bool savePresentationAsStandalone(const ::core::FilePath& filePath, + ErrorResponse* pErrorResponse); + +-bool savePresentationAsRpubsSource(const core::FilePath& filePath, ++bool savePresentationAsRpubsSource(const ::core::FilePath& filePath, + ErrorResponse* pErrorResponse); + + } // namespace presentation +diff -ru rstudio-0.98.1103/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.cpp 2015-03-08 22:23:10.279943977 +0100 +@@ -59,7 +59,7 @@ + + + void ammendResults(const std::string& formatName, +- core::FilePath& targetFile, ++ ::core::FilePath& targetFile, + int sourceLine, + json::Object* pResultJson) + { +@@ -76,7 +76,7 @@ + + // read the input file + std::vector lines; +- Error error = core::readStringVectorFromFile(targetFile, &lines, false); ++ Error error = ::core::readStringVectorFromFile(targetFile, &lines, false); + if (error) + { + LOG_ERROR(error); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/rmarkdown/RMarkdownPresentation.hpp 2015-03-08 22:23:10.290943979 +0100 +@@ -30,9 +30,9 @@ + namespace presentation { + + void ammendResults(const std::string& formatName, +- core::FilePath& targetFile, ++ ::core::FilePath& targetFile, + int sourceLine, +- core::json::Object* pResultsJson); ++ ::core::json::Object* pResultsJson); + + + } // namespace presentation +diff -ru rstudio-0.98.1103/src/cpp/session/modules/rmarkdown/SessionRMarkdown.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/rmarkdown/SessionRMarkdown.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/rmarkdown/SessionRMarkdown.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/rmarkdown/SessionRMarkdown.cpp 2015-03-08 22:23:10.287943978 +0100 +@@ -803,7 +803,7 @@ + + // create temp file + FilePath rmdTempFile = module_context::tempFile("Preview-", "Rmd"); +- error = core::writeStringToFile(rmdTempFile, source); ++ error = ::core::writeStringToFile(rmdTempFile, source); + if (error) + return error; + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionAskPass.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionAskPass.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionAskPass.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionAskPass.cpp 2015-03-08 22:23:10.347943988 +0100 +@@ -103,7 +103,7 @@ + ClientEvent askPassEvent(client_events::kAskPass, payload); + + // wait for method +- core::json::JsonRpcRequest request; ++ ::core::json::JsonRpcRequest request; + if (!s_waitForAskPass(&request, askPassEvent)) + { + return systemError(boost::system::errc::operation_canceled, +@@ -133,7 +133,7 @@ + if (options().programMode() == kSessionProgramModeServer) + { + // In server mode, passphrases are encrypted +- error = core::system::crypto::rsaPrivateDecrypt( ++ error = ::core::system::crypto::rsaPrivateDecrypt( + pInput->password, + &pInput->password); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionAuthoring.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionAuthoring.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionAuthoring.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionAuthoring.cpp 2015-03-08 22:23:10.352943989 +0100 +@@ -61,7 +61,7 @@ + "_rstudio_compile_pdf"); + } + +-Error getTexCapabilities(const core::json::JsonRpcRequest& request, ++Error getTexCapabilities(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + pResponse->setResult(authoring::texCapabilitiesAsJson()); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionBreakpoints.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionBreakpoints.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionBreakpoints.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionBreakpoints.cpp 2015-03-08 22:23:10.223943967 +0100 +@@ -512,14 +512,14 @@ + r::session::clientState().getProjectPersistent("debug-breakpoints", + "debugBreakpointsState"); + if (!breakpointStateValue.is_null() && +- json::isType(breakpointStateValue)) ++ json::isType< ::core::json::Object>(breakpointStateValue)) + { + json::Object breakpointState = breakpointStateValue.get_obj(); + json::Array breakpointArray = breakpointState["breakpoints"].get_array(); + s_breakpoints.clear(); + BOOST_FOREACH(json::Value bp, breakpointArray) + { +- if (json::isType(bp)) ++ if (json::isType< ::core::json::Object>(bp)) + { + s_breakpoints.push_back(breakpointFromJson(bp.get_obj())); + } +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionCodeSearch.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionCodeSearch.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionCodeSearch.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionCodeSearch.cpp 2015-03-08 22:23:09.999943929 +0100 +@@ -111,7 +111,7 @@ + void enqueFiles(ForwardIterator begin, ForwardIterator end) + { + // add all source files to the indexing queue +- using namespace core::system; ++ using namespace ::core::system; + for ( ; begin != end; ++begin) + { + if (isSourceFile(*begin)) +@@ -136,7 +136,7 @@ + } + } + +- void enqueFileChange(const core::system::FileChangeEvent& event) ++ void enqueFileChange(const ::core::system::FileChangeEvent& event) + { + // screen out files which aren't source files + if (!isSourceFile(event.fileInfo())) +@@ -284,7 +284,7 @@ + void clear() + { + indexing_ = false; +- indexingQueue_ = std::queue(); ++ indexingQueue_ = std::queue< ::core::system::FileChangeEvent>(); + entries_.clear(); + } + +@@ -299,20 +299,20 @@ + } + + Entry(const FileInfo& fileInfo, +- boost::shared_ptr pIndex) ++ boost::shared_ptr< ::core::r_util::RSourceIndex> pIndex) + : fileInfo(fileInfo), pIndex(pIndex) + { + } + + FileInfo fileInfo; + +- boost::shared_ptr pIndex; ++ boost::shared_ptr< ::core::r_util::RSourceIndex> pIndex; + + bool hasIndex() const { return pIndex.get() != NULL; } + + bool operator < (const Entry& other) const + { +- return core::fileInfoPathLessThan(fileInfo, other.fileInfo); ++ return ::core::fileInfoPathLessThan(fileInfo, other.fileInfo); + } + }; + +@@ -320,7 +320,7 @@ + + bool dequeAndIndex() + { +- using namespace core::system; ++ using namespace ::core::system; + + if (!indexingQueue_.empty()) + { +@@ -373,7 +373,7 @@ + { + // log if not path not found error (this can happen if the + // file was removed after entering the indexing queue) +- if (!core::isPathNotFoundError(error)) ++ if (!::core::isPathNotFoundError(error)) + { + error.addProperty("src-file", filePath.absolutePath()); + LOG_ERROR(error); +@@ -481,7 +481,7 @@ + + // indexing queue + bool indexing_; +- std::queue indexingQueue_; ++ std::queue< ::core::system::FileChangeEvent> indexingQueue_; + }; + + // global source file index +@@ -1402,12 +1402,12 @@ + return Success(); + } + +-void onFileMonitorEnabled(const tree& files) ++void onFileMonitorEnabled(const tree< ::core::FileInfo>& files) + { + s_projectIndex.enqueFiles(files.begin_leaf(), files.end_leaf()); + } + +-void onFilesChanged(const std::vector& events) ++void onFilesChanged(const std::vector< ::core::system::FileChangeEvent>& events) + { + std::for_each( + events.begin(), +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionConsole.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionConsole.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionConsole.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionConsole.cpp 2015-03-08 22:23:10.010943931 +0100 +@@ -84,11 +84,11 @@ + { + // only capture stderr if it isn't connected to a terminal + boost::function stderrHandler; +- if (!core::system::stderrIsTerminal()) ++ if (!::core::system::stderrIsTerminal()) + stderrHandler = writeStandardError; + + // initialize +- return core::system::captureStandardStreams(writeStandardOutput, ++ return ::core::system::captureStandardStreams(writeStandardOutput, + stderrHandler); + } + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionCrypto.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionCrypto.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionCrypto.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionCrypto.cpp 2015-03-08 22:23:10.157943956 +0100 +@@ -52,7 +52,7 @@ + { + std::string exponent; + std::string modulo; +- core::system::crypto::rsaPublicKey(&exponent, &modulo); ++ ::core::system::crypto::rsaPublicKey(&exponent, &modulo); + + json::Object result; + result["exponent"] = exponent; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionDependencies.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionDependencies.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionDependencies.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionDependencies.cpp 2015-03-08 22:23:10.013943932 +0100 +@@ -288,7 +288,7 @@ + return error; + + // options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + options.redirectStdErrToStdOut = true; + +@@ -340,11 +340,11 @@ + else + { + args.push_back("--vanilla"); +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + std::string libPaths = module_context::libPathsString(); + if (!libPaths.empty()) +- core::system::setenv(&childEnv, "R_LIBS", libPaths); ++ ::core::system::setenv(&childEnv, "R_LIBS", libPaths); + options.environment = childEnv; + } + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionFiles.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFiles.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionFiles.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFiles.cpp 2015-03-08 22:23:10.303943981 +0100 +@@ -197,7 +197,7 @@ + FilePath targetPath = module_context::resolveAliasedPath(path) ; + + // if this includes a request for monitoring +- core::json::Array jsonFiles; ++ ::core::json::Array jsonFiles; + if (monitor) + { + // always stop existing if we have one +@@ -230,7 +230,7 @@ + + + // IN: String path +-core::Error createFolder(const core::json::JsonRpcRequest& request, ++core::Error createFolder(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + std::string path; +@@ -259,7 +259,7 @@ + { + if (session::options().programMode() == kSessionProgramModeDesktop) + { +- Error error = core::system::recycle_bin::sendTo(filePath); ++ Error error = ::core::system::recycle_bin::sendTo(filePath); + if (error) + { + LOG_ERROR(error); +@@ -277,7 +277,7 @@ + } + + // IN: Array paths +-core::Error deleteFiles(const core::json::JsonRpcRequest& request, ++core::Error deleteFiles(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + json::Array files; +@@ -335,7 +335,7 @@ + } + + // IN: String sourcePath, String targetPath +-Error copyFile(const core::json::JsonRpcRequest& request, ++Error copyFile(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + // read params +@@ -397,7 +397,7 @@ + + + // IN: Array paths, String targetPath +-Error moveFiles(const core::json::JsonRpcRequest& request, ++Error moveFiles(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + json::Array files; +@@ -434,7 +434,7 @@ + } + + // IN: String path, String targetPath +-core::Error renameFile(const core::json::JsonRpcRequest& request, ++core::Error renameFile(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + // read params +@@ -511,7 +511,7 @@ + const char * const kUploadedTempFile = "uploadedTempFile"; + const char * const kUploadTargetDirectory = "targetDirectory"; + +-Error completeUpload(const core::json::JsonRpcRequest& request, ++Error completeUpload(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + // read params +@@ -678,7 +678,7 @@ + isZip ? "zip" : "bin"); + + // attempt to write the temp file +- Error saveError = core::writeStringToFile(tempFilePath, file.contents); ++ Error saveError = ::core::writeStringToFile(tempFilePath, file.contents); + if (saveError) + { + LOG_ERROR(saveError); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionFiles.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFiles.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionFiles.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFiles.hpp 2015-03-08 22:23:10.015943932 +0100 +@@ -25,7 +25,7 @@ + namespace modules { + namespace files { + +-bool isMonitoringDirectory(const core::FilePath& directory); ++bool isMonitoringDirectory(const ::core::FilePath& directory); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionFilesListingMonitor.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFilesListingMonitor.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionFilesListingMonitor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFilesListingMonitor.cpp 2015-03-08 22:23:10.128943951 +0100 +@@ -57,17 +57,17 @@ + std::transform(files.begin(), + files.end(), + std::back_inserter(prevFiles), +- core::toFileInfo); ++ ::core::toFileInfo); + + // kickoff new monitor +- core::system::file_monitor::Callbacks cb; ++ ::core::system::file_monitor::Callbacks cb; + cb.onRegistered = boost::bind(&FilesListingMonitor::onRegistered, + this, _1, filePath, prevFiles, _2); +- cb.onRegistrationError = boost::bind(core::log::logError, _1, ERROR_LOCATION); ++ cb.onRegistrationError = boost::bind(::core::log::logError, _1, ERROR_LOCATION); + cb.onFilesChanged = boost::bind(module_context::enqueFileChangedEvents, filePath, _1); +- cb.onMonitoringError = boost::bind(core::log::logError, _1, ERROR_LOCATION); ++ cb.onMonitoringError = boost::bind(::core::log::logError, _1, ERROR_LOCATION); + cb.onUnregistered = boost::bind(&FilesListingMonitor::onUnregistered, this, _1); +- core::system::file_monitor::registerMonitor(filePath, ++ ::core::system::file_monitor::registerMonitor(filePath, + false, + module_context::fileListingFilter, + cb); +@@ -81,8 +81,8 @@ + currentPath_ = FilePath(); + if (!currentHandle_.empty()) + { +- core::system::file_monitor::unregisterMonitor(currentHandle_); +- currentHandle_ = core::system::file_monitor::Handle(); ++ ::core::system::file_monitor::unregisterMonitor(currentHandle_); ++ currentHandle_ = ::core::system::file_monitor::Handle(); + } + } + +@@ -105,11 +105,11 @@ + // - The above two behaviors intersect to cause a pair of add/remove events + // for symliniks within onRegistered (because the initial snapshot + // was taken with FilePath::children and the file monitor enumeration +-// is taken using core::scanFiles). When propagated to the client this ++// is taken using ::core::scanFiles). When propagated to the client this + // results in symlinked directories appearing as documents and not + // being traversable in the files pane + // +-// - We could fix this by changing the behavior of core::scanFiles and/or ++// - We could fix this by changing the behavior of ::core::scanFiles and/or + // another layer in the file listing / monitoring code however we + // are making the fix late in the cycle and therefore want to treat + // only the symptom (it's not clear that this isn't the best fix anyway, +@@ -124,10 +124,10 @@ + + } // anonymous namespace + +-void FilesListingMonitor::onRegistered(core::system::file_monitor::Handle handle, ++void FilesListingMonitor::onRegistered(::core::system::file_monitor::Handle handle, + const FilePath& filePath, + const std::vector& prevFiles, +- const tree& files) ++ const tree< ::core::FileInfo>& files) + { + // set path and current handle + currentPath_ = filePath; +@@ -142,8 +142,8 @@ + + // compare the previously returned listing with the initial scan to see if any + // file changes occurred between listings +- std::vector events; +- core::system::collectFileChangeEvents(prevFiles.begin(), ++ std::vector< ::core::system::FileChangeEvent> events; ++ ::core::system::collectFileChangeEvents(prevFiles.begin(), + prevFiles.end(), + currFiles.begin(), + currFiles.end(), +@@ -155,7 +155,7 @@ + module_context::enqueFileChangedEvents(filePath, events); + } + +-void FilesListingMonitor::onUnregistered(core::system::file_monitor::Handle handle) ++void FilesListingMonitor::onUnregistered(::core::system::file_monitor::Handle handle) + { + // typically we clear our internal state explicitly when a new registration + // comes in. however, it is possible that our monitor could be unregistered +@@ -164,7 +164,7 @@ + if (currentHandle_ == handle) + { + currentPath_ = FilePath(); +- currentHandle_ = core::system::file_monitor::Handle(); ++ currentHandle_ = ::core::system::file_monitor::Handle(); + } + } + +@@ -174,7 +174,7 @@ + { + // enumerate the files + pFiles->clear(); +- core::Error error = rootPath.children(pFiles) ; ++ ::core::Error error = rootPath.children(pFiles) ; + if (error) + return error; + +@@ -183,16 +183,16 @@ + source_control::fileDecorationContext(rootPath); + + // sort the files by name +- std::sort(pFiles->begin(), pFiles->end(), core::compareAbsolutePathNoCase); ++ std::sort(pFiles->begin(), pFiles->end(), ::core::compareAbsolutePathNoCase); + + // produce json listing +- BOOST_FOREACH( core::FilePath& filePath, *pFiles) ++ BOOST_FOREACH( ::core::FilePath& filePath, *pFiles) + { + // files which may have been deleted after the listing or which + // are not end-user visible +- if (filePath.exists() && module_context::fileListingFilter(core::FileInfo(filePath))) ++ if (filePath.exists() && module_context::fileListingFilter(::core::FileInfo(filePath))) + { +- core::json::Object fileObject = module_context::createFileSystemItem(filePath); ++ ::core::json::Object fileObject = module_context::createFileSystemItem(filePath); + pCtx->decorateFile(filePath, &fileObject); + pJsonFiles->push_back(fileObject) ; + } +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionFilesListingMonitor.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFilesListingMonitor.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionFilesListingMonitor.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFilesListingMonitor.hpp 2015-03-08 22:23:10.349943989 +0100 +@@ -48,39 +48,39 @@ + { + public: + // kickoff monitoring +- core::Error start(const core::FilePath& filePath, core::json::Array* pJsonFiles); ++ ::core::Error start(const ::core::FilePath& filePath, ::core::json::Array* pJsonFiles); + + void stop(); + + // what path are we currently monitoring? +- const core::FilePath& currentMonitoredPath() const; ++ const ::core::FilePath& currentMonitoredPath() const; + + // convenience method which is also called by listFiles for requests that + // don't specify monitoring (e.g. file dialog listing) +- static core::Error listFiles(const core::FilePath& rootPath, +- core::json::Array* pJsonFiles) ++ static ::core::Error listFiles(const ::core::FilePath& rootPath, ++ ::core::json::Array* pJsonFiles) + { +- std::vector files; ++ std::vector< ::core::FilePath> files; + return listFiles(rootPath, &files, pJsonFiles); + } + + private: + // stateful handlers for registration and unregistration +- void onRegistered(core::system::file_monitor::Handle handle, +- const core::FilePath& filePath, +- const std::vector& prevFiles, +- const tree& files); ++ void onRegistered(::core::system::file_monitor::Handle handle, ++ const ::core::FilePath& filePath, ++ const std::vector< ::core::FileInfo>& prevFiles, ++ const tree< ::core::FileInfo>& files); + +- void onUnregistered(core::system::file_monitor::Handle handle); ++ void onUnregistered(::core::system::file_monitor::Handle handle); + + // helpers +- static core::Error listFiles(const core::FilePath& rootPath, +- std::vector* pFiles, +- core::json::Array* pJsonFiles); ++ static ::core::Error listFiles(const ::core::FilePath& rootPath, ++ std::vector< ::core::FilePath>* pFiles, ++ ::core::json::Array* pJsonFiles); + + private: +- core::FilePath currentPath_; +- core::system::file_monitor::Handle currentHandle_; ++ ::core::FilePath currentPath_; ++ ::core::system::file_monitor::Handle currentHandle_; + }; + + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionFilesQuotas.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFilesQuotas.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionFilesQuotas.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFilesQuotas.cpp 2015-03-08 22:23:10.139943953 +0100 +@@ -162,9 +162,9 @@ + try + { + // run the command +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = runCommand("xfs_quota -c 'quota -N'", +- core::system::ProcessOptions(), ++ ::core::system::ProcessOptions(), + &result); + if (error) + { +@@ -222,7 +222,7 @@ + { + // block all signals for launch of background thread (will cause it + // to never receive signals) +- core::system::SignalBlocker signalBlocker; ++ ::core::system::SignalBlocker signalBlocker; + Error error = signalBlocker.blockAll(); + if (error) + LOG_ERROR(error); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionFind.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFind.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionFind.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionFind.cpp 2015-03-08 22:23:10.261943974 +0100 +@@ -207,7 +207,7 @@ + const FilePath& tempFile) + : firstDecodeError_(true), encoding_(encoding), tempFile_(tempFile) + { +- handle_ = core::system::generateUuid(false); ++ handle_ = ::core::system::generateUuid(false); + } + + public: +@@ -216,9 +216,9 @@ + return handle_; + } + +- core::system::ProcessCallbacks createProcessCallbacks() ++ ::core::system::ProcessCallbacks createProcessCallbacks() + { +- core::system::ProcessCallbacks callbacks; ++ ::core::system::ProcessCallbacks callbacks; + callbacks.onContinue = boost::bind(&GrepOperation::onContinue, + shared_from_this(), + _1); +@@ -235,7 +235,7 @@ + } + + private: +- bool onContinue(const core::system::ProcessOperations& ops) const ++ bool onContinue(const ::core::system::ProcessOperations& ops) const + { + return findResults().isRunning() && findResults().handle() == handle(); + } +@@ -304,7 +304,7 @@ + *pContent = decodedLine; + } + +- void onStdout(const core::system::ProcessOperations& ops, const std::string& data) ++ void onStdout(const ::core::system::ProcessOperations& ops, const std::string& data) + { + json::Array files; + json::Array lineNums; +@@ -390,7 +390,7 @@ + findResults().onFindEnd(handle()); + } + +- void onStderr(const core::system::ProcessOperations& ops, const std::string& data) ++ void onStderr(const ::core::system::ProcessOperations& ops, const std::string& data) + { + LOG_ERROR_MESSAGE("grep: " + data); + } +@@ -430,15 +430,15 @@ + if (error) + return error; + +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + +- core::system::Options childEnv; +- core::system::environment(&childEnv); +- core::system::setenv(&childEnv, "GREP_COLOR", "01"); +- core::system::setenv(&childEnv, "GREP_COLORS", "ne:fn=:ln=:se=:mt=01"); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); ++ ::core::system::setenv(&childEnv, "GREP_COLOR", "01"); ++ ::core::system::setenv(&childEnv, "GREP_COLORS", "ne:fn=:ln=:se=:mt=01"); + #ifdef _WIN32 + FilePath gnuGrepPath = session::options().gnugrepPath(); +- core::system::addToPath( ++ ::core::system::addToPath( + &childEnv, + string_utils::utf8ToSystem(gnuGrepPath.absolutePath())); + #endif +@@ -470,7 +470,7 @@ + + boost::shared_ptr ptrGrepOp = GrepOperation::create(encoding, + tempFile); +- core::system::ProcessCallbacks callbacks = ++ ::core::system::ProcessCallbacks callbacks = + ptrGrepOp->createProcessCallbacks(); + + #ifdef _WIN32 +@@ -539,14 +539,14 @@ + return Success(); + } + +-void onSuspend(core::Settings* pSettings) ++void onSuspend(::core::Settings* pSettings) + { + std::ostringstream os; + json::write(findResults().asJson(), os); + pSettings->set("find-in-files-state", os.str()); + } + +-void onResume(const core::Settings& settings) ++void onResume(const ::core::Settings& settings) + { + std::string state = settings.get("find-in-files-state"); + if (!state.empty()) +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionGit.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionGit.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionGit.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionGit.cpp 2015-03-08 22:23:10.089943944 +0100 +@@ -65,7 +65,7 @@ + #include "session-config.h" + + using namespace core; +-using namespace core::shell_utils; ++using namespace ::core::shell_utils; + using session::console_process::ConsoleProcess; + using namespace session::modules::vcs_utils; + using session::modules::source_control::FileWithStatus; +@@ -90,7 +90,7 @@ + + core::system::ProcessOptions procOptions() + { +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + + // detach the session so there is no terminal + #ifndef _WIN32 +@@ -98,24 +98,24 @@ + #endif + + // get current environment for modification prior to passing to child +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + + // add git bin dir to PATH if necessary + std::string nonPathGitBinDir = git::nonPathGitBinDir(); + if (!nonPathGitBinDir.empty()) +- core::system::addToPath(&childEnv, nonPathGitBinDir); ++ ::core::system::addToPath(&childEnv, nonPathGitBinDir); + + // add postback directory to PATH + FilePath postbackDir = session::options().rpostbackPath().parent(); +- core::system::addToPath(&childEnv, postbackDir.absolutePath()); ++ ::core::system::addToPath(&childEnv, postbackDir.absolutePath()); + + options.workingDir = projects::projectContext().directory(); + + // on windows set HOME to USERPROFILE + #ifdef _WIN32 +- std::string userProfile = core::system::getenv(childEnv, "USERPROFILE"); +- core::system::setenv(&childEnv, "HOME", userProfile); ++ std::string userProfile = ::core::system::getenv(childEnv, "USERPROFILE"); ++ ::core::system::setenv(&childEnv, "HOME", userProfile); + #endif + + // set custom environment +@@ -202,10 +202,10 @@ + #endif + + Error gitExec(const ShellArgs& args, +- const core::FilePath& workingDir, +- core::system::ProcessResult* pResult) ++ const ::core::FilePath& workingDir, ++ ::core::system::ProcessResult* pResult) + { +- core::system::ProcessOptions options = procOptions(); ++ ::core::system::ProcessOptions options = procOptions(); + options.workingDir = workingDir; + // Important to ensure SSH_ASKPASS works + #ifdef _WIN32 +@@ -266,12 +266,12 @@ + FilePath root_; + + protected: +- core::Error runGit(const ShellArgs& args, ++ ::core::Error runGit(const ShellArgs& args, + std::string* pStdOut=NULL, + std::string* pStdErr=NULL, + int* pExitCode=NULL) + { +- using namespace core::system; ++ using namespace ::core::system; + + ProcessResult result; + Error error = gitExec(args, root_, &result); +@@ -293,7 +293,7 @@ + return Success(); + } + +- core::Error createConsoleProc(const ShellArgs& args, ++ ::core::Error createConsoleProc(const ShellArgs& args, + const std::string& caption, + bool dialog, + boost::shared_ptr* ppCP, +@@ -301,7 +301,7 @@ + { + using namespace session::console_process; + +- core::system::ProcessOptions options = procOptions(); ++ ::core::system::ProcessOptions options = procOptions(); + #ifdef _WIN32 + options.detachProcess = true; + #endif +@@ -385,7 +385,7 @@ + root_ = path; + } + +- core::Error status(const FilePath& dir, ++ ::core::Error status(const FilePath& dir, + StatusResult* pStatusResult) + { + using namespace boost; +@@ -424,12 +424,12 @@ + return Success(); + } + +- core::Error add(const std::vector& filePaths) ++ ::core::Error add(const std::vector& filePaths) + { + return runGit(ShellArgs() << "add" << "--" << filePaths); + } + +- core::Error remove(const std::vector& filePaths) ++ ::core::Error remove(const std::vector& filePaths) + { + ShellArgs args; + args << "rm" << "--"; +@@ -437,7 +437,7 @@ + return runGit(args); + } + +- core::Error discard(const std::vector& filePaths) ++ ::core::Error discard(const std::vector& filePaths) + { + source_control::StatusResult statusResult; + Error error = status(root_, &statusResult); +@@ -461,7 +461,7 @@ + } + } + +- core::Error stage(const std::vector &filePaths) ++ ::core::Error stage(const std::vector &filePaths) + { + StatusResult statusResult; + this->status(root_, &statusResult); +@@ -507,7 +507,7 @@ + return Success(); + } + +- core::Error unstage(const std::vector& filePaths) ++ ::core::Error unstage(const std::vector& filePaths) + { + source_control::StatusResult statusResult; + Error error = status(root_, &statusResult); +@@ -544,7 +544,7 @@ + } + } + +- core::Error listBranches(std::vector* pBranches, ++ ::core::Error listBranches(std::vector* pBranches, + boost::optional* pActiveBranchIndex) + { + std::vector lines; +@@ -569,7 +569,7 @@ + return Success(); + } + +- core::Error checkout(const std::string& id, ++ ::core::Error checkout(const std::string& id, + boost::shared_ptr* ppCP) + { + return createConsoleProc(ShellArgs() << "checkout" << id << "--", +@@ -578,7 +578,7 @@ + ppCP); + } + +- core::Error commit(std::string message, bool amend, bool signOff, ++ ::core::Error commit(std::string message, bool amend, bool signOff, + boost::shared_ptr* ppCP) + { + bool alwaysUseUtf8 = s_gitVersion >= GIT_1_7_2; +@@ -627,7 +627,7 @@ + if (mergeMsg.exists()) + { + std::string mergeMsgStr; +- error = core::readStringFromFile(mergeMsg, &mergeMsgStr); ++ error = ::core::readStringFromFile(mergeMsg, &mergeMsgStr); + if (!error) + { + if (!message.empty()) +@@ -658,7 +658,7 @@ + ppCP); + } + +- core::Error clone(const std::string& url, ++ ::core::Error clone(const std::string& url, + const std::string dirName, + const FilePath& parentPath, + boost::shared_ptr* ppCP) +@@ -728,7 +728,7 @@ + return true; + } + +- core::Error push(boost::shared_ptr* ppCP) ++ ::core::Error push(boost::shared_ptr* ppCP) + { + std::string branch; + Error error = currentBranch(&branch); +@@ -746,13 +746,13 @@ + return createConsoleProc(args, "Git Push", true, ppCP); + } + +- core::Error pull(boost::shared_ptr* ppCP) ++ ::core::Error pull(boost::shared_ptr* ppCP) + { + return createConsoleProc(ShellArgs() << "pull", + "Git Pull", true, ppCP); + } + +- core::Error doDiffFile(const FilePath& filePath, ++ ::core::Error doDiffFile(const FilePath& filePath, + const FilePath* pCompareTo, + PatchMode mode, + int contextLines, +@@ -770,7 +770,7 @@ + return runGit(args, pOutput, NULL, NULL); + } + +- core::Error diffFile(const FilePath& filePath, ++ ::core::Error diffFile(const FilePath& filePath, + PatchMode mode, + int contextLines, + std::string* pOutput) +@@ -822,7 +822,7 @@ + return secs; + } + +- core::Error applyPatch(const FilePath& patchFile, ++ ::core::Error applyPatch(const FilePath& patchFile, + PatchMode patchMode) + { + ShellArgs args = ShellArgs() << "apply"; +@@ -870,7 +870,7 @@ + } + } + +- core::Error logLength(const std::string &rev, ++ ::core::Error logLength(const std::string &rev, + const FilePath& fileFilter, + const std::string &searchText, + int *pLength) +@@ -904,7 +904,7 @@ + } + } + +- core::Error log(const std::string& rev, ++ ::core::Error log(const std::string& rev, + const FilePath& fileFilter, + int skip, + int maxentries, +@@ -1089,7 +1089,7 @@ + return Success(); + } + +- virtual core::Error show(const std::string& rev, ++ virtual ::core::Error show(const std::string& rev, + std::string* pOutput) + { + ShellArgs args = ShellArgs() << "show" << "--pretty=oneline" << "-M"; +@@ -1100,7 +1100,7 @@ + return runGit(args, pOutput); + } + +- virtual core::Error showFile(const std::string& rev, ++ virtual ::core::Error showFile(const std::string& rev, + const std::string& filename, + std::string* pOutput) + { +@@ -1111,7 +1111,7 @@ + return runGit(args, pOutput); + } + +- virtual core::Error remoteBranchInfo(RemoteBranchInfo* pRemoteBranchInfo) ++ virtual ::core::Error remoteBranchInfo(RemoteBranchInfo* pRemoteBranchInfo) + { + // default to none + *pRemoteBranchInfo = RemoteBranchInfo(); +@@ -1201,14 +1201,14 @@ + + FilePath detectGitDir(const FilePath& workingDir) + { +- core::system::ProcessOptions options = procOptions(); ++ ::core::system::ProcessOptions options = procOptions(); + options.workingDir = workingDir; + #ifndef _WIN32 + options.detachSession = true; + #endif + +- core::system::ProcessResult result; +- Error error = core::system::runCommand( ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand( + git() << "rev-parse" << "--show-toplevel", + "", + options, +@@ -1640,14 +1640,14 @@ + FilePath gitIgnorePath = filePath.complete(".gitignore"); + + // setup result (default to empty) +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + result.exitStatus = EXIT_SUCCESS; + result.stdOut = ""; + + // read the file if it exists + if (gitIgnorePath.exists()) + { +- Error error = core::readStringFromFile(gitIgnorePath, ++ Error error = ::core::readStringFromFile(gitIgnorePath, + &result.stdOut, + string_utils::LineEndingPosix); + if (error) +@@ -1675,14 +1675,14 @@ + FilePath gitIgnorePath = filePath.complete(".gitignore"); + + // write the .gitignore file +- error = core::writeStringToFile(gitIgnorePath, ++ error = ::core::writeStringToFile(gitIgnorePath, + ignores, + string_utils::LineEndingNative); + if (error) + return error; + + // always return an empty (successful) ProcessResult +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + result.exitStatus = EXIT_SUCCESS; + pResponse->setResult(processResultToJson(result)); + return Success(); +@@ -1698,7 +1698,7 @@ + + // get the upstream + std::string upstream; +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = gitExec(ShellArgs() << + "rev-parse" << "--abbrev-ref" << query, + s_git_.root(), +@@ -1744,7 +1744,7 @@ + std::string upstreamBranch = upstream.substr(pos + 1); + + // now get the remote url +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = gitExec(ShellArgs() << + "config" << "--get" << ("remote." + upstreamName + ".url"), + s_git_.root(), +@@ -1994,7 +1994,7 @@ + return error; + + // write it +- return core::writeStringToFile( ++ return ::core::writeStringToFile( + module_context::resolveAliasedPath(targetPath), + output); + } +@@ -2014,13 +2014,13 @@ + FilePath publicKeyPath = module_context::resolveAliasedPath(aliasedPath); + if (!publicKeyPath.exists()) + { +- return core::fileNotFoundError(publicKeyPath.absolutePath(), ++ return ::core::fileNotFoundError(publicKeyPath.absolutePath(), + ERROR_LOCATION); + } + + // read the key + std::string publicKeyContents; +- error = core::readStringFromFile(publicKeyPath, &publicKeyContents); ++ error = ::core::readStringFromFile(publicKeyPath, &publicKeyContents); + if (error) + return error; + +@@ -2057,11 +2057,11 @@ + return error; + FilePath dirPath = module_context::resolveAliasedPath(directory); + +- core::system::ProcessOptions options = procOptions(); ++ ::core::system::ProcessOptions options = procOptions(); + options.workingDir = dirPath; + + // run it +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = runCommand(git() << "init", options, &result); + if (error) + return error; +@@ -2082,7 +2082,7 @@ + bool ensureSSHAgentIsRunning() + { + // Use "ssh-add -l" to see if ssh-agent is running +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = runCommand(shell_utils::sendStdErrToNull("ssh-add -l"), + procOptions(), &result); + if (error) +@@ -2125,7 +2125,7 @@ + { + std::string name = (*it).str(1); + std::string value = (*it).str(2); +- core::system::setenv(name, value); ++ ::core::system::setenv(name, value); + + if (name == "SSH_AGENT_PID") + { +@@ -2138,7 +2138,7 @@ + return true; + } + +-void addKeyToSSHAgent_onCompleted(const core::system::ProcessResult& result) ++void addKeyToSSHAgent_onCompleted(const ::core::system::ProcessResult& result) + { + if (result.exitStatus != EXIT_SUCCESS) + LOG_ERROR_MESSAGE(result.stdErr); +@@ -2147,11 +2147,11 @@ + void addKeyToSSHAgent(const FilePath& keyFile, + const std::string& passphrase) + { +- core::system::ProcessOptions options = procOptions(); +- core::system::setenv(options.environment.get_ptr(), ++ ::core::system::ProcessOptions options = procOptions(); ++ ::core::system::setenv(options.environment.get_ptr(), + "__ASKPASS_PASSTHROUGH_RESULT", + passphrase); +- core::system::setenv(options.environment.get_ptr(), ++ ::core::system::setenv(options.environment.get_ptr(), + "SSH_ASKPASS", + "askpass-passthrough"); + +@@ -2424,7 +2424,7 @@ + void onShutdown(bool) + { + std::for_each(s_pidsToTerminate_.begin(), s_pidsToTerminate_.end(), +- &core::system::terminateProcess); ++ &::core::system::terminateProcess); + s_pidsToTerminate_.clear(); + } + +@@ -2494,7 +2494,7 @@ + // If .gitignore exists, add .Rproj.user unless it's already there + + std::string strIgnore; +- Error error = core::readStringFromFile(gitIgnoreFile, &strIgnore); ++ Error error = ::core::readStringFromFile(gitIgnoreFile, &strIgnore); + if (error) + return error; + +@@ -2554,8 +2554,8 @@ + return false; + } + +- core::system::ProcessResult result; +- Error error = core::system::runCommand(git() << "--version", ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand(git() << "--version", + procOptions(), + &result); + if (error) +@@ -2629,9 +2629,9 @@ + } + } + +-Error statusToJson(const core::FilePath &path, ++Error statusToJson(const ::core::FilePath &path, + const VCSStatus &status, +- core::json::Object *pObject) ++ ::core::json::Object *pObject) + { + json::Object& obj = *pObject; + obj["status"] = status.status(); +@@ -2642,11 +2642,11 @@ + return Success(); + } + +-void onSuspend(core::Settings*) ++void onSuspend(::core::Settings*) + { + } + +-void onResume(const core::Settings&) ++void onResume(const ::core::Settings&) + { + enqueueRefreshEvent(); + } +@@ -2675,8 +2675,8 @@ + + // Save version + s_gitVersion = GIT_1_7_2; +- core::system::ProcessResult result; +- error = core::system::runCommand(git() << "--version", ++ ::core::system::ProcessResult result; ++ error = ::core::system::runCommand(git() << "--version", + procOptions(), + &result); + if (error) +@@ -2698,7 +2698,7 @@ + return true; + } + +-bool isGitDirectory(const core::FilePath& workingDir) ++bool isGitDirectory(const ::core::FilePath& workingDir) + { + return !detectGitDir(workingDir).empty(); + } +@@ -2709,7 +2709,7 @@ + // default to none + std::string remoteOriginUrl; + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = gitExec(ShellArgs() << + "config" << "--get" << "remote.origin.url", + workingDir, +@@ -2735,7 +2735,7 @@ + } + + +-core::Error initializeGit(const core::FilePath& workingDir) ++core::Error initializeGit(const ::core::FilePath& workingDir) + { + s_git_.setRoot(detectGitDir(workingDir)); + +@@ -2801,11 +2801,11 @@ + + // setup environment + BOOST_ASSERT(boost::algorithm::ends_with(sshAskCmd, "rpostback-askpass")); +- core::system::setenv("GIT_ASKPASS", "rpostback-askpass"); ++ ::core::system::setenv("GIT_ASKPASS", "rpostback-askpass"); + + if (interceptAskPass) + { +- core::system::setenv("SSH_ASKPASS", "rpostback-askpass"); ++ ::core::system::setenv("SSH_ASKPASS", "rpostback-askpass"); + } + + // add suspend/resume handler +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionGit.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionGit.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionGit.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionGit.hpp 2015-03-08 22:23:09.941943920 +0100 +@@ -41,10 +41,10 @@ + class GitFileDecorationContext : public source_control::FileDecorationContext + { + public: +- GitFileDecorationContext(const core::FilePath& rootDir); ++ GitFileDecorationContext(const ::core::FilePath& rootDir); + virtual ~GitFileDecorationContext(); +- virtual void decorateFile(const core::FilePath &filePath, +- core::json::Object *pFileObject); ++ virtual void decorateFile(const ::core::FilePath &filePath, ++ ::core::json::Object *pFileObject); + + private: + source_control::StatusResult vcsStatus_; +@@ -54,29 +54,29 @@ + bool isGitInstalled(); + bool isGitEnabled(); + +-bool isGitDirectory(const core::FilePath& workingDir); ++bool isGitDirectory(const ::core::FilePath& workingDir); + +-std::string remoteOriginUrl(const core::FilePath& workingDir); ++std::string remoteOriginUrl(const ::core::FilePath& workingDir); + + bool isGithubRepository(); + +-core::Error initializeGit(const core::FilePath& workingDir); ++core::Error initializeGit(const ::core::FilePath& workingDir); + + core::FilePath detectedGitExePath(); + + std::string nonPathGitBinDir(); + +-core::Error status(const core::FilePath& dir, ++core::Error status(const ::core::FilePath& dir, + source_control::StatusResult* pStatusResult); +-core::Error fileStatus(const core::FilePath& filePath, ++core::Error fileStatus(const ::core::FilePath& filePath, + source_control::VCSStatus* pStatus); +-core::Error statusToJson(const core::FilePath& path, ++core::Error statusToJson(const ::core::FilePath& path, + const source_control::VCSStatus& status, +- core::json::Object* pObject); ++ ::core::json::Object* pObject); + + core::Error clone(const std::string& url, + const std::string dirName, +- const core::FilePath& parentPath, ++ const ::core::FilePath& parentPath, + boost::shared_ptr* ppCP); + + core::Error initialize(); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionHelp.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHelp.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionHelp.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHelp.cpp 2015-03-08 22:23:10.149943955 +0100 +@@ -192,7 +192,7 @@ + + // As of R 2.10 RShowDoc still uses the legacy file::// mechanism for + // displaying the manual. Redirect these to the appropriate help event +-bool handleRShowDocFile(const core::FilePath& filePath) ++bool handleRShowDocFile(const ::core::FilePath& filePath) + { + boost::regex manualRegx(".*/lib/R/(doc/manual/[A-Za-z0-9_\\-]*\\.html)"); + boost::smatch match; +@@ -640,9 +640,9 @@ + rCmd << filePath; + + // run the converstion and return it +- core::system::ProcessOptions options; +- core::system::ProcessResult result; +- error = core::system::runCommand(rCmd, options, &result); ++ ::core::system::ProcessOptions options; ++ ::core::system::ProcessResult result; ++ error = ::core::system::runCommand(rCmd, options, &result); + if (error) + { + pResponse->setError(error); +@@ -673,7 +673,7 @@ + // server custom css file if necessary + if (boost::algorithm::ends_with(path, "/R.css")) + { +- core::FilePath cssFile = options().rResourcesPath().childPath("R.css"); ++ ::core::FilePath cssFile = options().rResourcesPath().childPath("R.css"); + if (cssFile.exists()) + { + pResponse->setFile(cssFile, request, filter); +@@ -698,7 +698,7 @@ + // markdown help is also a special case + if (path == "/doc/markdown_help.html") + { +- core::FilePath helpFile = options().rResourcesPath().childPath( ++ ::core::FilePath helpFile = options().rResourcesPath().childPath( + "markdown_help.html"); + if (helpFile.exists()) + { +@@ -870,7 +870,7 @@ + r::routines::addCallMethod(previewRdMethodDef); + + using boost::bind; +- using core::http::UriHandler; ++ using ::core::http::UriHandler; + using namespace module_context; + using namespace r::function_hook ; + ExecBlock initBlock ; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionHistoryArchive.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHistoryArchive.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionHistoryArchive.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHistoryArchive.cpp 2015-03-08 22:23:10.309943982 +0100 +@@ -137,7 +137,7 @@ + + // write the entry to the file + std::ostringstream ostrEntry ; +- double currentTime = core::date_time::millisecondsSinceEpoch(); ++ double currentTime = ::core::date_time::millisecondsSinceEpoch(); + writeEntry(currentTime, command, &ostrEntry); + ostrEntry << std::endl; + return appendToFile(historyDatabaseFilePath(), ostrEntry.str()); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionHistoryArchive.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHistoryArchive.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionHistoryArchive.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHistoryArchive.hpp 2015-03-08 22:23:10.251943972 +0100 +@@ -55,7 +55,7 @@ + static void migrateRhistoryIfNecessary(); + + public: +- core::Error add(const std::string& command); ++ ::core::Error add(const std::string& command); + const std::vector& entries() const; + + private: +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionHTMLPreview.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHTMLPreview.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionHTMLPreview.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHTMLPreview.cpp 2015-03-08 22:23:10.342943987 +0100 +@@ -149,7 +149,7 @@ + return std::string(); + + std::string output; +- Error error = core::readStringFromFile(outputFile_, &output); ++ Error error = ::core::readStringFromFile(outputFile_, &output); + if (error) + LOG_ERROR(error); + +@@ -249,7 +249,7 @@ + if (knitrOutputFile_.empty()) + { + std::string outputFile; +- Error error = core::readStringFromFile(outputPathTempFile, ++ Error error = ::core::readStringFromFile(outputPathTempFile, + &outputFile); + if (error) + { +@@ -358,7 +358,7 @@ + + // create an output file and write to it + FilePath outputFile = createOutputFile(); +- error = core::writeStringToFile(outputFile, content); ++ error = ::core::writeStringToFile(outputFile, content); + if (error) + terminateWithError(error); + else +@@ -788,7 +788,7 @@ + { + + FilePath htmlPreviewFile = resPath.childPath("markdown.html"); +- return core::readStringFromFile(htmlPreviewFile, pPreviewTemplate); ++ return ::core::readStringFromFile(htmlPreviewFile, pPreviewTemplate); + } + + void setVarFromHtmlResourceFile(const std::string& name, +@@ -858,7 +858,7 @@ + + // write to output file + std::string previewHtml = previewStrStream.str(); +- error = core::writeStringToFile(s_pCurrentPreview_->htmlPreviewFile(), ++ error = ::core::writeStringToFile(s_pCurrentPreview_->htmlPreviewFile(), + previewHtml); + if (error) + { +@@ -998,7 +998,7 @@ + error = r::json::jsonValueFromList(capsSEXP, &valJson); + if (error) + LOG_ERROR(error); +- else if (core::json::isType(valJson)) ++ else if (::core::json::isType< ::core::json::Object>(valJson)) + capsJson = valJson.get_obj(); + } + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionHTMLPreview.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHTMLPreview.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionHTMLPreview.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionHTMLPreview.hpp 2015-03-08 22:23:10.123943950 +0100 +@@ -37,8 +37,8 @@ + namespace html_preview { + + core::json::Object capabilitiesAsJson(); +-void addFileSpecificHeaders(const core::FilePath& filePath, +- core::http::Response* pResponse); ++void addFileSpecificHeaders(const ::core::FilePath& filePath, ++ ::core::http::Response* pResponse); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionLists.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionLists.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionLists.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionLists.cpp 2015-03-08 22:23:10.072943942 +0100 +@@ -115,10 +115,10 @@ + return jsonArray; + } + +-void onListsFileChanged(const core::system::FileChangeEvent& fileChange) ++void onListsFileChanged(const ::core::system::FileChangeEvent& fileChange) + { + // ignore if deleted +- if (fileChange.type() == core::system::FileChangeEvent::FileRemoved) ++ if (fileChange.type() == ::core::system::FileChangeEvent::FileRemoved) + return; + + // ignore if it is the lists directory +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionPackages.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPackages.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionPackages.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPackages.cpp 2015-03-08 22:23:10.239943970 +0100 +@@ -50,7 +50,7 @@ + + namespace { + +-Error availablePackagesBegin(const core::json::JsonRpcRequest& request, ++Error availablePackagesBegin(const ::core::json::JsonRpcRequest& request, + std::vector* pContribUrls) + { + return r::exec::evaluateString >( +@@ -162,9 +162,9 @@ + } + } + +-Error availablePackagesEnd(const core::json::JsonRpcRequest& request, ++Error availablePackagesEnd(const ::core::json::JsonRpcRequest& request, + const std::vector& contribUrls, +- core::json::JsonRpcResponse* pResponse) ++ ::core::json::JsonRpcResponse* pResponse) + { + // download available packages + std::vector availablePackages; +@@ -294,9 +294,9 @@ + + if (newSession || (options().programMode() == kSessionProgramModeServer)) + { +- std::string libDir = core::string_utils::utf8ToSystem( ++ std::string libDir = ::core::string_utils::utf8ToSystem( + options().sessionLibraryPath().absolutePath()); +- std::string pkgSrcDir = core::string_utils::utf8ToSystem( ++ std::string pkgSrcDir = ::core::string_utils::utf8ToSystem( + options().sessionPackagesPath().absolutePath()); + std::string rsVersion = RSTUDIO_VERSION; + Error error = r::exec::RFunction(".rs.initializeRStudioPackages", +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionPackrat.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPackrat.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionPackrat.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPackrat.cpp 2015-03-08 22:23:10.246943971 +0100 +@@ -598,9 +598,9 @@ + } + } + +-void onFilesChanged(const std::vector& changes) ++void onFilesChanged(const std::vector< ::core::system::FileChangeEvent>& changes) + { +- BOOST_FOREACH(const core::system::FileChangeEvent& fileChange, changes) ++ BOOST_FOREACH(const ::core::system::FileChangeEvent& fileChange, changes) + { + FilePath changedFilePath(fileChange.fileInfo().absolutePath()); + onFileChanged(changedFilePath); +@@ -777,7 +777,7 @@ + bool running) + { + // if this doesn't apply to the current project then skip it +- if (!core::system::realPathsEqual( ++ if (!::core::system::realPathsEqual( + projects::projectContext().directory(), FilePath(project))) + { + return; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionPackrat.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPackrat.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionPackrat.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPackrat.hpp 2015-03-08 22:23:10.253943972 +0100 +@@ -34,7 +34,7 @@ + core::json::Object contextAsJson(); + + // annotate a JSON object with pending Packrat actions +-void annotatePendingActions(core::json::Object *pJson, bool useCached); ++void annotatePendingActions(::core::json::Object *pJson, bool useCached); + + // return the given Packrat context + core::json::Object contextAsJson(const module_context::PackratContext& context); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionPath.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPath.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionPath.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPath.cpp 2015-03-08 22:23:10.167943958 +0100 +@@ -43,7 +43,7 @@ + std::vector* pPaths) + { + std::vector paths; +- Error error = core::readStringVectorFromFile(filePath, &paths); ++ Error error = ::core::readStringVectorFromFile(filePath, &paths); + if (error) + { + error.addProperty("path-source", filePath.absolutePath()); +@@ -102,7 +102,7 @@ + } + + // build the PATH +- std::string path = core::system::getenv("PATH"); ++ std::string path = ::core::system::getenv("PATH"); + std::for_each(paths.begin(), + paths.end(), + boost::bind(addToPathIfNecessary, _1, &path)); +@@ -119,7 +119,7 @@ + addToPathIfNecessary(optLocalBinPath.absolutePath(), &path); + + // set the path +- core::system::setenv("PATH", path); ++ ::core::system::setenv("PATH", path); + #endif + + return Success(); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionPlots.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPlots.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionPlots.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionPlots.cpp 2015-03-08 22:23:10.325943984 +0100 +@@ -73,7 +73,7 @@ + + if (display.plotCount() < 1) + { +- return Error(core::json::errc::ParamInvalid, ERROR_LOCATION); ++ return Error(::core::json::errc::ParamInvalid, ERROR_LOCATION); + } + else if (display.plotCount() == 1) + { +@@ -323,7 +323,7 @@ + "\n" + "\n"); + std::string html = boost::str(fmt % title % width % plotPath.filename()); +- error = core::writeStringToFile(sourceFilePath, html); ++ error = ::core::writeStringToFile(sourceFilePath, html); + if (error) + return error; + +@@ -471,7 +471,7 @@ + Error error = pResponse->setBody(imageFilePath); + if (error) + { +- if (!core::isPathNotFoundError(error)) ++ if (!::core::isPathNotFoundError(error)) + LOG_ERROR(error); + pResponse->setError(http::status::InternalServerError, + error.code().message()); +@@ -823,7 +823,7 @@ + { + // make sure there is a real x server running on osx + #ifdef __APPLE__ +- std::string display = core::system::getenv("DISPLAY"); ++ std::string display = ::core::system::getenv("DISPLAY"); + if (display.empty() || (display == ":0")) + return false; + #endif +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionRPubs.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionRPubs.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionRPubs.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionRPubs.cpp 2015-03-08 22:23:10.218943966 +0100 +@@ -125,7 +125,7 @@ + + void start(const std::string& title, const FilePath& htmlFile, bool allowUpdate) + { +- using namespace core::string_utils; ++ using namespace ::core::string_utils; + using namespace module_context; + + htmlFile_ = htmlFile; +@@ -177,12 +177,12 @@ + args.push_back(cmd); + + // options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + options.workingDir = htmlFile.parent(); + + // callbacks +- core::system::ProcessCallbacks cb; ++ ::core::system::ProcessCallbacks cb; + cb.onContinue = boost::bind(&RPubsUpload::onContinue, + RPubsUpload::shared_from_this()); + cb.onStdout = boost::bind(&RPubsUpload::onStdOut, +@@ -221,7 +221,7 @@ + if(csvOutputFile_.exists()) + { + std::string csvOutput; +- Error error = core::readStringFromFile( ++ Error error = ::core::readStringFromFile( + csvOutputFile_, + &csvOutput, + string_utils::LineEndingPosix); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionSource.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSource.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionSource.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSource.cpp 2015-03-08 22:23:10.296943979 +0100 +@@ -126,7 +126,7 @@ + + + void writeDocToJson(boost::shared_ptr pDoc, +- core::json::Object* pDocJson) ++ ::core::json::Object* pDocJson) + { + // write the doc + pDoc->writeToJson(pDocJson); +@@ -216,7 +216,7 @@ + + std::string encoding; + error = json::readParam(request.params, 2, &encoding); +- if (error && error.code() != core::json::errc::ParamTypeMismatch) ++ if (error && error.code() != ::core::json::errc::ParamTypeMismatch) + return error ; + if (encoding.empty()) + encoding = ::locale2charset(NULL); +@@ -362,7 +362,7 @@ + // enque file changed event if we need to + if (!module_context::isDirectoryMonitored(fullDocPath.parent())) + { +- using core::system::FileChangeEvent; ++ using ::core::system::FileChangeEvent; + FileChangeEvent changeEvent(newFile ? FileChangeEvent::FileAdded : + FileChangeEvent::FileModified, + FileInfo(fullDocPath)); +@@ -423,7 +423,7 @@ + Error saveDocumentDiff(const json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { +- using namespace core::string_utils; ++ using namespace ::core::string_utils; + + // unique id and jsonPath (can be null for auto-save) + std::string id; +@@ -721,12 +721,12 @@ + // setup template filter + std::map vars; + vars["name"] = name; +- core::text::TemplateFilter filter(vars); ++ ::core::text::TemplateFilter filter(vars); + + // read file with template filter + FilePath templatePath = session::options().rResourcesPath().complete( + "templates/" + templateName); +- return core::readStringFromFile(templatePath, ++ return ::core::readStringFromFile(templatePath, + filter, + pContents, + string_utils::LineEndingPosix); +@@ -761,7 +761,7 @@ + return error; + + std::string contents; +- error = core::readStringFromFile( ++ error = ::core::readStringFromFile( + FilePath(string_utils::systemToUtf8(filePath)), + &contents, + string_utils::LineEndingPosix); +@@ -830,7 +830,7 @@ + else + { + std::string contents; +- error = core::readStringFromFile(rdFilePath, ++ error = ::core::readStringFromFile(rdFilePath, + &contents, + string_utils::LineEndingPosix); + if (error) +@@ -867,7 +867,7 @@ + FilePath filePath = module_context::resolveAliasedPath(path); + + pResponse->setResult(filePath.exists() && +- core::system::isReadOnly(filePath)); ++ ::core::system::isReadOnly(filePath)); + + return Success(); + } +@@ -944,7 +944,7 @@ + // if it doesn't exist then create it + if (!filePath.exists()) + { +- Error error = core::writeStringToFile(filePath, "", ++ Error error = ::core::writeStringToFile(filePath, "", + options().sourcePersistLineEnding()); + if (error) + { +@@ -1030,7 +1030,7 @@ + + } // anonymous namespace + +-Error clientInitDocuments(core::json::Array* pJsonDocs) ++Error clientInitDocuments(::core::json::Array* pJsonDocs) + { + // remove all items from the source index database + rSourceIndexes().removeAll(); +@@ -1072,7 +1072,7 @@ + return Success(); + } + +-std::vector > rIndexes() ++std::vector > rIndexes() + { + return rSourceIndexes().indexes(); + } +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionSource.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSource.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionSource.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSource.hpp 2015-03-08 22:23:10.159943956 +0100 +@@ -33,9 +33,9 @@ + namespace modules { + namespace source { + +-core::Error clientInitDocuments(core::json::Array* pJsonDocs) ; ++core::Error clientInitDocuments(::core::json::Array* pJsonDocs) ; + +-std::vector > rIndexes(); ++std::vector > rIndexes(); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionSpelling.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSpelling.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionSpelling.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSpelling.cpp 2015-03-08 22:23:10.256943973 +0100 +@@ -39,7 +39,7 @@ + namespace { + + // underlying spelling engine +-boost::scoped_ptr s_pSpellingEngine; ++boost::scoped_ptr< ::core::spelling::SpellingEngine> s_pSpellingEngine; + + // R function for testing & debugging + SEXP rs_checkSpelling(SEXP wordSEXP) +@@ -61,7 +61,7 @@ + } + + +-json::Object dictionaryAsJson(const core::spelling::HunspellDictionary& dict) ++json::Object dictionaryAsJson(const ::core::spelling::HunspellDictionary& dict) + { + json::Object dictJson; + dictJson["id"] = dict.id(); +@@ -83,7 +83,7 @@ + + core::spelling::HunspellDictionaryManager hunspellDictionaryManager() + { +- core::spelling::HunspellDictionaryManager dictManager( ++ ::core::spelling::HunspellDictionaryManager dictManager( + options().hunspellDictionariesPath(), + userDictionariesDir()); + return dictManager; +@@ -186,7 +186,7 @@ + } + + // perform the add +- using namespace core::spelling; ++ using namespace ::core::spelling; + HunspellDictionaryManager dictManager = hunspellDictionaryManager(); + error = dictManager.custom().add(dictPath); + if (error) +@@ -210,7 +210,7 @@ + return error; + + // perform the remove +- using namespace core::spelling; ++ using namespace ::core::spelling; + HunspellDictionaryManager dictManager = hunspellDictionaryManager(); + error = dictManager.custom().remove(name); + if (error) +@@ -258,9 +258,9 @@ + + core::json::Object spellingPrefsContextAsJson() + { +- using namespace core::spelling; ++ using namespace ::core::spelling; + +- core::json::Object contextJson; ++ ::core::json::Object contextJson; + + HunspellDictionaryManager dictManager = hunspellDictionaryManager(); + std::vector dictionaries; +@@ -268,10 +268,10 @@ + if (error) + { + LOG_ERROR(error); +- return core::json::Object(); ++ return ::core::json::Object(); + } + +- core::json::Array dictionariesJson; ++ ::core::json::Array dictionariesJson; + std::transform(dictionaries.begin(), + dictionaries.end(), + std::back_inserter(dictionariesJson), +@@ -279,7 +279,7 @@ + + + std::vector customDicts = dictManager.custom().dictionaries(); +- core::json::Array customDictsJson = json::toJsonArray(customDicts); ++ ::core::json::Array customDictsJson = json::toJsonArray(customDicts); + + // return json + contextJson["all_languages_installed"] = dictManager.allLanguagesInstalled(); +@@ -297,7 +297,7 @@ + r::routines::addCallMethod(methodDef); + + // initialize spelling engine +- using namespace core::spelling; ++ using namespace ::core::spelling; + HunspellSpellingEngine* pHunspell = new HunspellSpellingEngine( + userSettings().spellingLanguage(), + hunspellDictionaryManager(), +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionSVN.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSVN.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionSVN.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSVN.cpp 2015-03-08 22:23:09.979943926 +0100 +@@ -51,7 +51,7 @@ + #include "SessionGit.hpp" + + using namespace core; +-using namespace core::shell_utils; ++using namespace ::core::shell_utils; + using namespace session::modules::vcs_utils; + using namespace session::console_process; + +@@ -103,7 +103,7 @@ + + core::system::ProcessOptions procOptions(bool requiresSsh) + { +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + + // detach the session so there is no terminal + #ifndef _WIN32 +@@ -111,16 +111,16 @@ + #endif + + // get current environment for modification prior to passing to child +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + + // add postback directory to PATH + FilePath postbackDir = session::options().rpostbackPath().parent(); +- core::system::addToPath(&childEnv, postbackDir.absolutePath()); ++ ::core::system::addToPath(&childEnv, postbackDir.absolutePath()); + + // on windows add gnudiff directory to the path + #ifdef _WIN32 +- core::system::addToPath(&childEnv, ++ ::core::system::addToPath(&childEnv, + session::options().gnudiffPath().absolutePath()); + #endif + +@@ -128,7 +128,7 @@ + #ifdef _WIN32 + if (requiresSsh) + { +- core::system::addToPath(&childEnv, ++ ::core::system::addToPath(&childEnv, + session::options().msysSshPath().absolutePath()); + } + #endif +@@ -140,14 +140,14 @@ + + // on windows set HOME to USERPROFILE + #ifdef _WIN32 +- std::string userProfile = core::system::getenv(childEnv, "USERPROFILE"); +- core::system::setenv(&childEnv, "HOME", userProfile); ++ std::string userProfile = ::core::system::getenv(childEnv, "USERPROFILE"); ++ ::core::system::setenv(&childEnv, "HOME", userProfile); + #endif + + // set the SVN_EDITOR if it is available + std::string editFileCommand = workbench::editFileCommand(); + if (!editFileCommand.empty()) +- core::system::setenv(&childEnv, "SVN_EDITOR", editFileCommand); ++ ::core::system::setenv(&childEnv, "SVN_EDITOR", editFileCommand); + + // set custom environment + options.environment = childEnv; +@@ -175,13 +175,13 @@ + Error runSvn(const ShellArgs& args, + const FilePath& workingDir, + bool redirectStdErrToStdOut, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { +- core::system::ProcessOptions options = procOptions(); ++ ::core::system::ProcessOptions options = procOptions(); + if (!workingDir.empty()) + options.workingDir = workingDir; + options.redirectStdErrToStdOut = redirectStdErrToStdOut; +- Error error = core::system::runCommand(svn() << args.args(), ++ Error error = ::core::system::runCommand(svn() << args.args(), + options, + pResult); + return error; +@@ -189,7 +189,7 @@ + + Error runSvn(const ShellArgs& args, + bool redirectStdErrToStdOut, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { + FilePath workingDir; + if (!s_workingDir.empty()) +@@ -203,7 +203,7 @@ + std::string* pStdErr=NULL, + int* pExitCode=NULL) + { +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = runSvn(args, false, &result); + if (error) + return error; +@@ -234,7 +234,7 @@ + bool enqueueRefreshOnExit, + boost::shared_ptr* ppCP) + { +- core::system::ProcessOptions options = procOptions(requiresSsh); ++ ::core::system::ProcessOptions options = procOptions(requiresSsh); + if (!workingDir) + options.workingDir = s_workingDir; + else if (!workingDir.get().empty()) +@@ -285,8 +285,8 @@ + ppCP); + } + +-typedef boost::function ++typedef boost::function + ProcResultCallback; + + void onAsyncSvnExit(int exitCode, +@@ -297,14 +297,14 @@ + { + // read the file + std::string contents; +- Error error = core::readStringFromFile(outputFile, &contents); ++ Error error = ::core::readStringFromFile(outputFile, &contents); + if (error) + { +- completionCallback(error, core::system::ProcessResult()); ++ completionCallback(error, ::core::system::ProcessResult()); + return; + } + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + result.exitStatus = exitCode; + result.stdOut = contents; + completionCallback(Success(), result); +@@ -314,7 +314,7 @@ + completionCallback( + systemError(boost::system::errc::operation_canceled, + ERROR_LOCATION), +- core::system::ProcessResult()); ++ ::core::system::ProcessResult()); + } + } + +@@ -338,7 +338,7 @@ + enqueueRefreshOnExit, + &pCP); + if (error) +- completionCallback(error, core::system::ProcessResult()); ++ completionCallback(error, ::core::system::ProcessResult()); + + // set showOnOutput + pCP->setShowOnOutput(true); +@@ -448,12 +448,12 @@ + }; + + +-Error runSvnInfo(const core::FilePath& workingDir, SvnInfo* pSvnInfo) ++Error runSvnInfo(const ::core::FilePath& workingDir, SvnInfo* pSvnInfo) + { + if (workingDir.empty()) + return Success(); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = runSvn(ShellArgs() << "info" << "--xml", + workingDir, + true, +@@ -492,7 +492,7 @@ + return Success(); + } + +-bool isSvnDirectory(const core::FilePath& workingDir) ++bool isSvnDirectory(const ::core::FilePath& workingDir) + { + return !repositoryRoot(workingDir).empty(); + } +@@ -669,7 +669,7 @@ + std::transform(files.begin(), files.end(), std::back_inserter(paths), + &resolveAliasedJsonPath); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = runSvn(ShellArgs() << "add" << globalArgs() << "-q" << "--" << paths, + true, &result); + if (error) +@@ -694,7 +694,7 @@ + std::transform(files.begin(), files.end(), std::back_inserter(paths), + &resolveAliasedJsonPath); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = runSvn(ShellArgs() << "delete" << globalArgs() << "-q" << "--" << paths, + true, &result); + if (error) +@@ -719,7 +719,7 @@ + std::transform(files.begin(), files.end(), std::back_inserter(paths), + &resolveAliasedJsonPath); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = runSvn(ShellArgs() << "revert" << globalArgs() << "-q" << + "--depth" << "infinity" << + "--" << paths, +@@ -747,7 +747,7 @@ + std::transform(files.begin(), files.end(), std::back_inserter(paths), + &resolveAliasedJsonPath); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = runSvn(ShellArgs() << "resolve" << globalArgs() << "-q" << + "--accept" << accept << + "--" << paths, +@@ -760,9 +760,9 @@ + return Success(); + } + +-Error statusToJson(const core::FilePath &path, ++Error statusToJson(const ::core::FilePath &path, + const source_control::VCSStatus &status, +- core::json::Object *pObject) ++ ::core::json::Object *pObject) + { + json::Object& obj = *pObject; + obj["status"] = status.status(); +@@ -936,7 +936,7 @@ + { + RefreshOnExit refreshOnExit; + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = runSvn(ShellArgs() << "cleanup" << globalArgs(), + true, + &result); +@@ -1098,10 +1098,10 @@ + cmd << "-i" << tempFile; + cmd << filePath; + +- core::system::ProcessOptions options = procOptions(); ++ ::core::system::ProcessOptions options = procOptions(); + +- core::system::ProcessResult result; +- error = core::system::runCommand(cmd, ++ ::core::system::ProcessResult result; ++ error = ::core::system::runCommand(cmd, + options, + &result); + if (error) +@@ -1230,7 +1230,7 @@ + + void historyEnd(boost::function callback, + const Error& error, +- const core::system::ProcessResult& result) ++ const ::core::system::ProcessResult& result) + { + if (!error && result.exitStatus != EXIT_SUCCESS && !result.stdErr.empty()) + LOG_ERROR_MESSAGE(result.stdErr); +@@ -1459,7 +1459,7 @@ + void svnShowEnd(bool noSizeWarning, + const json::JsonRpcFunctionContinuation& cont, + Error error, +- const core::system::ProcessResult& result) ++ const ::core::system::ProcessResult& result) + { + json::JsonRpcResponse response; + +@@ -1512,7 +1512,7 @@ + + void svnShowFileEnd(const json::JsonRpcFunctionContinuation& cont, + Error error, +- const core::system::ProcessResult& result) ++ const ::core::system::ProcessResult& result) + { + json::JsonRpcResponse response; + +@@ -1550,7 +1550,7 @@ + } + + Error getIgnores(const FilePath& filePath, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { + return runSvn(ShellArgs() << "propget" << "svn:ignore" + << filePath << globalArgs(), +@@ -1569,7 +1569,7 @@ + // resolve path + FilePath filePath = module_context::resolveAliasedPath(path); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = getIgnores(filePath, &result); + if (error) + return error; +@@ -1581,11 +1581,11 @@ + + Error setIgnores(const FilePath& filePath, + const std::string& ignores, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { + // write the ignores to a temporary file + FilePath ignoresFile = module_context::tempFile("svn-ignore", "txt"); +- Error error = core::writeStringToFile(ignoresFile, ignores); ++ Error error = ::core::writeStringToFile(ignoresFile, ignores); + if (error) + return error; + +@@ -1619,7 +1619,7 @@ + // resolve path + FilePath filePath = module_context::resolveAliasedPath(path); + +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = setIgnores(filePath, ignores, &result); + if (error) + return error; +@@ -1632,7 +1632,7 @@ + Error checkout(const std::string& url, + const std::string& username, + const std::string dirName, +- const core::FilePath& parentPath, ++ const ::core::FilePath& parentPath, + boost::shared_ptr* ppCP) + { + // optional username arg +@@ -1700,7 +1700,7 @@ + } + + SvnFileDecorationContext::SvnFileDecorationContext( +- const core::FilePath& rootDir) ++ const ::core::FilePath& rootDir) + { + using namespace source_control; + +@@ -1716,8 +1716,8 @@ + { + } + +-void SvnFileDecorationContext::decorateFile(const core::FilePath& filePath, +- core::json::Object* pFileObject) ++void SvnFileDecorationContext::decorateFile(const ::core::FilePath& filePath, ++ ::core::json::Object* pFileObject) + { + using namespace source_control; + +@@ -1737,7 +1737,7 @@ + Error augmentSvnIgnore() + { + // check for existing svn:ignore +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = getIgnores(s_workingDir, &result); + if (error) + return error; +@@ -1771,7 +1771,7 @@ + } + + // write back svn:ignore +- core::system::ProcessResult setResult; ++ ::core::system::ProcessResult setResult; + error = setIgnores(s_workingDir, svnIgnore, &setResult); + if (error) + return error; +@@ -1820,7 +1820,7 @@ + return Success(); + } + +-Error initializeSvn(const core::FilePath& workingDir) ++Error initializeSvn(const ::core::FilePath& workingDir) + { + s_workingDir = workingDir; + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionSVN.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSVN.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionSVN.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionSVN.hpp 2015-03-08 22:23:10.125943951 +0100 +@@ -38,10 +38,10 @@ + class SvnFileDecorationContext : public source_control::FileDecorationContext + { + public: +- SvnFileDecorationContext(const core::FilePath& rootDir); ++ SvnFileDecorationContext(const ::core::FilePath& rootDir); + virtual ~SvnFileDecorationContext(); +- void decorateFile(const core::FilePath& filePath, +- core::json::Object* pFileObject); ++ void decorateFile(const ::core::FilePath& filePath, ++ ::core::json::Object* pFileObject); + private: + source_control::StatusResult vcsResult_; + }; +@@ -50,9 +50,9 @@ + bool isSvnInstalled(); + + // Returns true if the working directory is in a Subversion tree +-bool isSvnDirectory(const core::FilePath& workingDir); ++bool isSvnDirectory(const ::core::FilePath& workingDir); + +-std::string repositoryRoot(const core::FilePath& workingDir); ++std::string repositoryRoot(const ::core::FilePath& workingDir); + + bool isSvnEnabled(); + +@@ -63,13 +63,13 @@ + core::Error checkout(const std::string& url, + const std::string& username, + const std::string dirName, +- const core::FilePath& parentPath, ++ const ::core::FilePath& parentPath, + boost::shared_ptr* ppCP); + + core::Error initialize(); + + // Initialize SVN with the given working directory +-core::Error initializeSvn(const core::FilePath& workingDir); ++core::Error initializeSvn(const ::core::FilePath& workingDir); + + } // namespace svn + } // namespace modules +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionUpdates.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionUpdates.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionUpdates.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionUpdates.cpp 2015-03-08 22:23:10.276943976 +0100 +@@ -36,7 +36,7 @@ + namespace updates { + namespace { + +-json::Object jsonFromProcessResult(const core::system::ProcessResult& result) ++json::Object jsonFromProcessResult(const ::core::system::ProcessResult& result) + { + json::Object obj; + std::stringstream output(result.stdOut); +@@ -57,7 +57,7 @@ + } + + void beginUpdateCheck(bool manual, +- const boost::function& onCompleted) ++ const boost::function& onCompleted) + { + // Find the path to R + FilePath rProgramPath; +@@ -69,7 +69,7 @@ + + // Find the path to the script we need to source + FilePath modulesPath = session::options().modulesRSourcePath();; +- std::string scriptPath = core::string_utils::utf8ToSystem( ++ std::string scriptPath = ::core::string_utils::utf8ToSystem( + modulesPath.complete("SessionUpdates.R").absolutePath()); + + // Arguments +@@ -104,7 +104,7 @@ + args.push_back(cmd); + + // Set options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + + module_context::processSupervisor().runProgram(rProgramPath.absolutePath(), +@@ -115,7 +115,7 @@ + } + + void endRPCUpdateCheck(const json::JsonRpcFunctionContinuation& cont, +- const core::system::ProcessResult& result) ++ const ::core::system::ProcessResult& result) + { + json::JsonRpcResponse response; + response.setResult(jsonFromProcessResult(result)); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionVCS.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionVCS.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionVCS.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionVCS.cpp 2015-03-08 22:23:10.328943985 +0100 +@@ -134,7 +134,7 @@ + } // anonymous namespace + + boost::shared_ptr fileDecorationContext( +- const core::FilePath& rootDir) ++ const ::core::FilePath& rootDir) + { + if (git::isGitEnabled()) + { +@@ -183,9 +183,9 @@ + #if _WIN32 + // On Windows, R's idea of "$HOME" is not, by default, the same as + // $USERPROFILE, which is what we want for ssh purposes +- return FilePath(string_utils::systemToUtf8(core::system::getenv("USERPROFILE"))); ++ return FilePath(string_utils::systemToUtf8(::core::system::getenv("USERPROFILE"))); + #else +- return FilePath(string_utils::systemToUtf8(core::system::getenv("HOME"))); ++ return FilePath(string_utils::systemToUtf8(::core::system::getenv("HOME"))); + #endif + } + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionVCS.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionVCS.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionVCS.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionVCS.hpp 2015-03-08 22:23:09.983943927 +0100 +@@ -40,7 +40,7 @@ + }; + + boost::shared_ptr fileDecorationContext( +- const core::FilePath& rootDir); ++ const ::core::FilePath& rootDir); + + VCS activeVCS(); + std::string activeVCSName(); +@@ -52,7 +52,7 @@ + + void enqueueRefreshEvent(); + +-core::Error fileStatus(const core::FilePath& filePath, ++core::Error fileStatus(const ::core::FilePath& filePath, + source_control::VCSStatus* pStatus); + + core::Error initialize(); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/SessionWorkbench.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/SessionWorkbench.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/SessionWorkbench.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/SessionWorkbench.cpp 2015-03-08 22:23:10.154943955 +0100 +@@ -438,15 +438,15 @@ + // non-path git bin dir + std::string gitBinDir = git::nonPathGitBinDir(); + if (!gitBinDir.empty()) +- core::system::addToPath(pTarget, gitBinDir); ++ ::core::system::addToPath(pTarget, gitBinDir); + + // non-path svn bin dir + std::string svnBinDir = svn::nonPathSvnBinDir(); + if (!svnBinDir.empty()) +- core::system::addToPath(pTarget, svnBinDir); ++ ::core::system::addToPath(pTarget, svnBinDir); + + // msys_ssh path +- core::system::addToPath(pTarget, ++ ::core::system::addToPath(pTarget, + session::options().msysSshPath().absolutePath()); + } + +@@ -508,7 +508,7 @@ + + #ifdef RSTUDIO_SERVER + // In server mode, passphrases are encrypted +- using namespace core::system::crypto; ++ using namespace ::core::system::crypto; + error = rsaPrivateDecrypt(passphrase, &passphrase); + if (error) + return error; +@@ -555,7 +555,7 @@ + cmd << "-f" << sshKeyPath; + + // process options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + + // detach the session so there is no terminal + #ifndef _WIN32 +@@ -564,22 +564,22 @@ + + // customize the environment on Win32 + #ifdef _WIN32 +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + + // set HOME to USERPROFILE +- std::string userProfile = core::system::getenv(childEnv, "USERPROFILE"); +- core::system::setenv(&childEnv, "HOME", userProfile); ++ std::string userProfile = ::core::system::getenv(childEnv, "USERPROFILE"); ++ ::core::system::setenv(&childEnv, "HOME", userProfile); + + // add msys_ssh to path +- core::system::addToPath(&childEnv, ++ ::core::system::addToPath(&childEnv, + session::options().msysSshPath().absolutePath()); + + options.environment = childEnv; + #endif + + // run it +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + error = runCommand(shell_utils::sendStdErrToStdOut(cmd), + options, + &result); +@@ -610,7 +610,7 @@ + // read file contents + FilePath filePath(file); + std::string fileContents; +- Error error = core::readStringFromFile(filePath, &fileContents); ++ Error error = ::core::readStringFromFile(filePath, &fileContents); + if (error) + { + LOG_ERROR(error); +@@ -643,7 +643,7 @@ + } + + // write the content back to the file +- error = core::writeStringToFile(filePath, editedFileContents); ++ error = ::core::writeStringToFile(filePath, editedFileContents); + if (error) + { + LOG_ERROR(error); +@@ -663,36 +663,36 @@ + using namespace session::console_process; + + // configure environment for shell +- core::system::Options shellEnv; +- core::system::environment(&shellEnv); ++ ::core::system::Options shellEnv; ++ ::core::system::environment(&shellEnv); + + // set dumb terminal +- core::system::setenv(&shellEnv, "TERM", "dumb"); ++ ::core::system::setenv(&shellEnv, "TERM", "dumb"); + + // set prompt + std::string path = module_context::createAliasedPath( + module_context::safeCurrentPath()); + std::string prompt = (path.length() > 30) ? "\\W$ " : "\\w$ "; +- core::system::setenv(&shellEnv, "PS1", prompt); ++ ::core::system::setenv(&shellEnv, "PS1", prompt); + + // disable screen oriented facillites +- core::system::unsetenv(&shellEnv, "EDITOR"); +- core::system::unsetenv(&shellEnv, "VISUAL"); +- core::system::setenv(&shellEnv, "PAGER", "/bin/cat"); ++ ::core::system::unsetenv(&shellEnv, "EDITOR"); ++ ::core::system::unsetenv(&shellEnv, "VISUAL"); ++ ::core::system::setenv(&shellEnv, "PAGER", "/bin/cat"); + +- core::system::setenv(&shellEnv, "GIT_EDITOR", s_editFileCommand); +- core::system::setenv(&shellEnv, "SVN_EDITOR", s_editFileCommand); ++ ::core::system::setenv(&shellEnv, "GIT_EDITOR", s_editFileCommand); ++ ::core::system::setenv(&shellEnv, "SVN_EDITOR", s_editFileCommand); + + // ammend shell paths as appropriate + ammendShellPaths(&shellEnv); + + // set options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.workingDir = module_context::shellWorkingDirectory(); + options.environment = shellEnv; + + // configure bash command +- core::shell_utils::ShellCommand bashCommand("/bin/bash"); ++ ::core::shell_utils::ShellCommand bashCommand("/bin/bash"); + bashCommand << "--norc"; + + // run process +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdf.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdf.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdf.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdf.cpp 2015-03-08 22:23:10.214943966 +0100 +@@ -253,7 +253,7 @@ + } + + // NOTE: sync changes with SessionBuildErrors.cpp compileErrorJson +-json::Object logEntryJson(const core::tex::LogEntry& logEntry) ++json::Object logEntryJson(const ::core::tex::LogEntry& logEntry) + { + json::Object obj; + obj["type"] = static_cast(logEntry.type()); +@@ -267,38 +267,38 @@ + return obj; + } + +-void showLogEntries(const core::tex::LogEntries& logEntries, ++void showLogEntries(const ::core::tex::LogEntries& logEntries, + const rnw_concordance::Concordances& rnwConcordances = + rnw_concordance::Concordances()) + { + json::Array logEntriesJson; +- BOOST_FOREACH(const core::tex::LogEntry& logEntry, logEntries) ++ BOOST_FOREACH(const ::core::tex::LogEntry& logEntry, logEntries) + { + using namespace tex::rnw_concordance; +- core::tex::LogEntry rnwEntry = rnwConcordances.fixup(logEntry); ++ ::core::tex::LogEntry rnwEntry = rnwConcordances.fixup(logEntry); + logEntriesJson.push_back(logEntryJson(rnwEntry)); + } + + enqueErrorsEvent(logEntriesJson); + } + +-void writeLogEntriesOutput(const core::tex::LogEntries& logEntries) ++void writeLogEntriesOutput(const ::core::tex::LogEntries& logEntries) + { + if (logEntries.empty()) + return; + + std::string output = "\n"; +- BOOST_FOREACH(const core::tex::LogEntry& logEntry, logEntries) ++ BOOST_FOREACH(const ::core::tex::LogEntry& logEntry, logEntries) + { + switch(logEntry.type()) + { +- case core::tex::LogEntry::Error: ++ case ::core::tex::LogEntry::Error: + output += "Error: "; + break; +- case core::tex::LogEntry::Warning: ++ case ::core::tex::LogEntry::Warning: + output += "Warning: "; + break; +- case core::tex::LogEntry::Box: ++ case ::core::tex::LogEntry::Box: + output += "Bad Box: "; + break; + } +@@ -317,36 +317,36 @@ + } + + +-bool includeLogEntry(const core::tex::LogEntry& logEntry) ++bool includeLogEntry(const ::core::tex::LogEntry& logEntry) + { + return true; + } + + // filter out log entries which we view as superflous or distracting +-void filterLatexLog(const core::tex::LogEntries& logEntries, +- core::tex::LogEntries* pFilteredLogEntries) ++void filterLatexLog(const ::core::tex::LogEntries& logEntries, ++ ::core::tex::LogEntries* pFilteredLogEntries) + { +- core::algorithm::copy_if(logEntries.begin(), ++ ::core::algorithm::copy_if(logEntries.begin(), + logEntries.end(), + std::back_inserter(*pFilteredLogEntries), + includeLogEntry); + } + +-bool isLogEntryFromTargetFile(const core::tex::LogEntry& logEntry, ++bool isLogEntryFromTargetFile(const ::core::tex::LogEntry& logEntry, + const FilePath& texPath) + { + return logEntry.filePath() == texPath; + } + + void getLogEntries(const FilePath& texPath, +- core::tex::LogEntries* pLogEntries) ++ ::core::tex::LogEntries* pLogEntries) + { + // latex log file + FilePath logPath = ancillaryFilePath(texPath, ".log"); + if (logPath.exists()) + { +- core::tex::LogEntries logEntries; +- Error error = core::tex::parseLatexLog(logPath, &logEntries); ++ ::core::tex::LogEntries logEntries; ++ Error error = ::core::tex::parseLatexLog(logPath, &logEntries); + if (error) + LOG_ERROR(error); + +@@ -360,11 +360,11 @@ + } + + // bibtex log file +- core::tex::LogEntries bibtexLogEntries; ++ ::core::tex::LogEntries bibtexLogEntries; + logPath = ancillaryFilePath(texPath, ".blg"); + if (logPath.exists()) + { +- Error error = core::tex::parseBibtexLog(logPath, &bibtexLogEntries); ++ Error error = ::core::tex::parseBibtexLog(logPath, &bibtexLogEntries); + if (error) + LOG_ERROR(error); + } +@@ -391,20 +391,20 @@ + removeExistingAncillary(texFilePath, ".synctex.gz"); + } + +-std::string buildIssuesMessage(const core::tex::LogEntries& logEntries) ++std::string buildIssuesMessage(const ::core::tex::LogEntries& logEntries) + { + if (logEntries.empty()) + return std::string(); + + // count error types + int errors = 0, warnings = 0, badBoxes = 0; +- BOOST_FOREACH(const core::tex::LogEntry& logEntry, logEntries) ++ BOOST_FOREACH(const ::core::tex::LogEntry& logEntry, logEntries) + { +- if (logEntry.type() == core::tex::LogEntry::Error) ++ if (logEntry.type() == ::core::tex::LogEntry::Error) + errors++; +- else if (logEntry.type() == core::tex::LogEntry::Warning) ++ else if (logEntry.type() == ::core::tex::LogEntry::Warning) + warnings++; +- else if (logEntry.type() == core::tex::LogEntry::Box) ++ else if (logEntry.type() == ::core::tex::LogEntry::Box) + badBoxes++; + } + +@@ -472,9 +472,9 @@ + } + + void preserveLogReferencedFiles( +- const core::tex::LogEntries& logEntries) ++ const ::core::tex::LogEntries& logEntries) + { +- BOOST_FOREACH(const core::tex::LogEntry& logEntry, logEntries) ++ BOOST_FOREACH(const ::core::tex::LogEntry& logEntry, logEntries) + { + logRefFiles_.insert(logEntry.filePath()); + } +@@ -562,7 +562,7 @@ + { + if (targetFilePath_.exists()) + { +- Error error = core::system::realPath(targetFilePath_, &targetFilePath_); ++ Error error = ::core::system::realPath(targetFilePath_, &targetFilePath_); + if (error) + LOG_ERROR(error); + } +@@ -591,7 +591,7 @@ + } + + // parse magic comments +- Error error = core::tex::parseMagicComments(targetFilePath_, ++ Error error = ::core::tex::parseMagicComments(targetFilePath_, + &magicComments_); + if (error) + LOG_ERROR(error); +@@ -654,12 +654,12 @@ + options.shellEscape = userSettings().enableLaTeXShellEscape(); + + // get back-end version info +- core::system::ProcessResult result; +- Error error = core::system::runProgram( ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runProgram( + string_utils::utf8ToSystem(texProgramPath_.absolutePath()), +- core::shell_utils::ShellArgs() << "--version", ++ ::core::shell_utils::ShellArgs() << "--version", + "", +- core::system::ProcessOptions(), ++ ::core::system::ProcessOptions(), + &result); + if (error) + LOG_ERROR(error); +@@ -724,7 +724,7 @@ + const rnw_concordance::Concordances& concords) + { + // collect errors from the log +- core::tex::LogEntries logEntries; ++ ::core::tex::LogEntries logEntries; + getLogEntries(texFilePath, &logEntries); + + // determine whether they will be shown in the list +@@ -797,7 +797,7 @@ + enqueCompletedWithFailureEvent(targetFilePath_, sourceLocation_); + } + +- void terminateWithErrorLogEntries(const core::tex::LogEntries& logEntries) ++ void terminateWithErrorLogEntries(const ::core::tex::LogEntries& logEntries) + { + showLogEntries(logEntries); + enqueCompletedWithFailureEvent(targetFilePath_, sourceLocation_); +@@ -813,7 +813,7 @@ + std::string encoding_; + json::Object sourceLocation_; + const boost::function onCompleted_; +- core::tex::TexMagicComments magicComments_; ++ ::core::tex::TexMagicComments magicComments_; + FilePath texProgramPath_; + AuxillaryFileCleanupContext auxillaryFileCleanupContext_; + }; +@@ -822,7 +822,7 @@ + } // anonymous namespace + + +-bool startCompile(const core::FilePath& targetFilePath, ++bool startCompile(const ::core::FilePath& targetFilePath, + const std::string& encoding, + const json::Object& sourceLocation, + const boost::function& onCompleted) +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdf.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdf.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdf.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdf.hpp 2015-03-08 22:23:10.192943962 +0100 +@@ -30,9 +30,9 @@ + namespace tex { + namespace compile_pdf { + +-bool startCompile(const core::FilePath& targetFilePath, ++bool startCompile(const ::core::FilePath& targetFilePath, + const std::string& encoding, +- const core::json::Object& sourceLocation, ++ const ::core::json::Object& sourceLocation, + const boost::function& onCompleted); + + bool compileIsRunning(); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.cpp 2015-03-08 22:23:10.190943962 +0100 +@@ -110,10 +110,10 @@ + } + } + +-Error runProgram(const core::FilePath& programFilePath, ++Error runProgram(const ::core::FilePath& programFilePath, + const std::vector& args, +- const core::system::Options& extraEnvVars, +- const core::FilePath& workingDir, ++ const ::core::system::Options& extraEnvVars, ++ const ::core::FilePath& workingDir, + const boost::function& onOutput, + const boost::function& onExited) + { +@@ -122,17 +122,17 @@ + programFilePath.absolutePath()); + + // setup options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + options.redirectStdErrToStdOut = true; +- core::system::Options env; +- core::system::getModifiedEnv(extraEnvVars, &env); ++ ::core::system::Options env; ++ ::core::system::getModifiedEnv(extraEnvVars, &env); + options.environment = env; + options.workingDir = workingDir; + + // setup callbacks + boost::shared_ptr pCB(new CB(onOutput, onExited)); +- core::system::ProcessCallbacks cb; ++ ::core::system::ProcessCallbacks cb; + cb.onStdout = cb.onStderr = boost::bind(&CB::onOutput, pCB, _2); + cb.onExit = boost::bind(&CB::onExit, pCB, _1); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionCompilePdfSupervisor.hpp 2015-03-08 22:23:10.185943961 +0100 +@@ -41,10 +41,10 @@ + bool hasRunningChildren(); + core::Error terminateAll(const boost::posix_time::time_duration& waitDuration); + +-core::Error runProgram(const core::FilePath& programFilePath, ++core::Error runProgram(const ::core::FilePath& programFilePath, + const std::vector& args, +- const core::system::Options& extraEnvVars, +- const core::FilePath& workingDir, ++ const ::core::system::Options& extraEnvVars, ++ const ::core::FilePath& workingDir, + const boost::function& onOutput, + const boost::function& onExited); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionPdfLatex.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionPdfLatex.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionPdfLatex.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionPdfLatex.cpp 2015-03-08 22:23:10.178943960 +0100 +@@ -104,9 +104,9 @@ + } + + std::string latexProgramMagicComment( +- const core::tex::TexMagicComments& magicComments) ++ const ::core::tex::TexMagicComments& magicComments) + { +- BOOST_FOREACH(const core::tex::TexMagicComment& mc, magicComments) ++ BOOST_FOREACH(const ::core::tex::TexMagicComment& mc, magicComments) + { + if (boost::algorithm::iequals(mc.scope(), "tex") && + (boost::algorithm::iequals(mc.variable(), "program") || +@@ -199,7 +199,7 @@ + + FilePath programPath(const std::string& name, const std::string& envOverride) + { +- std::string envProgram = core::system::getenv(envOverride); ++ std::string envProgram = ::core::system::getenv(envOverride); + std::string program = envProgram.empty() ? name : envProgram; + return module_context::findProgram(program); + } +@@ -216,7 +216,7 @@ + { + // read the log file + std::vector lines; +- Error error = core::readStringVectorFromFile(logFilePath, &lines); ++ Error error = ::core::readStringVectorFromFile(logFilePath, &lines); + if (error) + { + LOG_ERROR(error); +@@ -234,7 +234,7 @@ + bool logIncludesRerun(const FilePath& logFilePath) + { + std::string logContents; +- Error error = core::readStringFromFile(logFilePath, &logContents); ++ Error error = ::core::readStringFromFile(logFilePath, &logContents); + if (error) + { + LOG_ERROR(error); +@@ -264,13 +264,13 @@ + } + + +-bool latexProgramForFile(const core::tex::TexMagicComments& magicComments, ++bool latexProgramForFile(const ::core::tex::TexMagicComments& magicComments, + FilePath* pTexProgramPath, + std::string* pUserErrMsg) + { + // get (optional) magic comments and environment variable override + std::string latexProgramMC = latexProgramMagicComment(magicComments); +- std::string pdflatexEnv = core::system::getenv("RSTUDIO_PDFLATEX"); ++ std::string pdflatexEnv = ::core::system::getenv("RSTUDIO_PDFLATEX"); + + // magic comment always takes highest priority + if (!latexProgramMC.empty()) +@@ -349,10 +349,10 @@ + // tools::texi2dvi function (but the regex for detecting citation + // warnings was made a bit more liberal) + // +-core::Error texToPdf(const core::FilePath& texProgramPath, +- const core::FilePath& texFilePath, ++core::Error texToPdf(const ::core::FilePath& texProgramPath, ++ const ::core::FilePath& texFilePath, + const tex::pdflatex::PdfLatexOptions& options, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { + // input file paths + FilePath baseFilePath = texFilePath.parent().complete(texFilePath.stem()); +@@ -364,11 +364,11 @@ + FilePath makeindexProgramPath = programPath("makeindex", "MAKEINDEX"); + + // args and process options for running bibtex and makeindex +- core::shell_utils::ShellArgs bibtexArgs; ++ ::core::shell_utils::ShellArgs bibtexArgs; + bibtexArgs << string_utils::utf8ToSystem(baseFilePath.filename()); +- core::shell_utils::ShellArgs makeindexArgs; ++ ::core::shell_utils::ShellArgs makeindexArgs; + makeindexArgs << string_utils::utf8ToSystem(idxFilePath.filename()); +- core::system::ProcessOptions procOptions; ++ ::core::system::ProcessOptions procOptions; + procOptions.environment = utils::rTexInputsEnvVars(); + procOptions.workingDir = texFilePath.parent(); + +@@ -391,8 +391,8 @@ + // run bibtex if necessary + if (misses > 0 && !bibtexProgramPath.empty()) + { +- core::system::ProcessResult result; +- Error error = core::system::runProgram( ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runProgram( + string_utils::utf8ToSystem(bibtexProgramPath.absolutePath()), + bibtexArgs, + "", +@@ -408,7 +408,7 @@ + // run makeindex if necessary + if (idxFilePath.exists() && !makeindexProgramPath.empty()) + { +- Error error = core::system::runProgram( ++ Error error = ::core::system::runProgram( + string_utils::utf8ToSystem(makeindexProgramPath.absolutePath()), + makeindexArgs, + "", +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionPdfLatex.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionPdfLatex.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionPdfLatex.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionPdfLatex.hpp 2015-03-08 22:23:10.187943961 +0100 +@@ -68,17 +68,17 @@ + std::string versionInfo; + }; + +-core::Error texToPdf(const core::FilePath& texProgramPath, +- const core::FilePath& texFilePath, ++core::Error texToPdf(const ::core::FilePath& texProgramPath, ++ const ::core::FilePath& texFilePath, + const tex::pdflatex::PdfLatexOptions& options, +- core::system::ProcessResult* pResult); ++ ::core::system::ProcessResult* pResult); + + bool isInstalled(); + + core::json::Array supportedTypes(); + +-bool latexProgramForFile(const core::tex::TexMagicComments& magicComments, +- core::FilePath* pTexProgramPath, ++bool latexProgramForFile(const ::core::tex::TexMagicComments& magicComments, ++ ::core::FilePath* pTexProgramPath, + std::string* pUserErrMsg); + + } // namespace pdflatex +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwConcordance.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwConcordance.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwConcordance.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwConcordance.cpp 2015-03-08 22:23:10.173943959 +0100 +@@ -118,8 +118,8 @@ + return badFormatError(sourceFile, "sections", ERROR_LOCATION); + + // get input and output file names +- outputFile_ = baseDir.complete(core::tex::normalizeSynctexName(sections[1])); +- inputFile_ = baseDir.complete(core::tex::normalizeSynctexName(sections[2])); ++ outputFile_ = baseDir.complete(::core::tex::normalizeSynctexName(sections[1])); ++ inputFile_ = baseDir.complete(::core::tex::normalizeSynctexName(sections[2])); + + // get offset and values + std::string valuesSection; +@@ -310,7 +310,7 @@ + { + if (what[i].matched) + { +- int inputLine = core::safe_convert::stringTo(what[i], 1); ++ int inputLine = ::core::safe_convert::stringTo(what[i], 1); + FileAndLine dest = concordances.rnwLine( + FileAndLine(sourceFile, inputLine)); + if (!dest.empty()) +@@ -325,7 +325,7 @@ + return result; + } + +-core::tex::LogEntry Concordances::fixup(const core::tex::LogEntry &entry, ++core::tex::LogEntry Concordances::fixup(const ::core::tex::LogEntry &entry, + bool *pSuccess) const + { + // Error messages themselves can (and usually do) contain line numbers. +@@ -344,7 +344,7 @@ + if (pSuccess) + *pSuccess = true; + +- return core::tex::LogEntry(entry.logFilePath(), ++ return ::core::tex::LogEntry(entry.logFilePath(), + entry.logLine(), + entry.type(), + mapped.filePath(), +@@ -359,7 +359,7 @@ + } + } + +-void removePrevious(const core::FilePath& rnwFile) ++void removePrevious(const ::core::FilePath& rnwFile) + { + Error error = concordanceFilePath(rnwFile).removeIfExists(); + if (error) +@@ -367,7 +367,7 @@ + } + + +-Error readIfExists(const core::FilePath& srcFile, Concordances* pConcordances) ++Error readIfExists(const ::core::FilePath& srcFile, Concordances* pConcordances) + { + // return success if the file doesn't exist + FilePath concordanceFile = concordanceFilePath(srcFile); +@@ -376,7 +376,7 @@ + + // read the file + std::string contents; +- Error error = core::readStringFromFile(concordanceFile, ++ Error error = ::core::readStringFromFile(concordanceFile, + &contents, + string_utils::LineEndingPosix); + if (error) +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwConcordance.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwConcordance.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwConcordance.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwConcordance.hpp 2015-03-08 22:23:10.183943961 +0100 +@@ -45,9 +45,9 @@ + // COPYING: via compiler + + // create by parsing a concordance file +- core::Error parse(const core::FilePath& sourceFile, ++ ::core::Error parse(const ::core::FilePath& sourceFile, + const std::string& input, +- const core::FilePath& baseDir); ++ const ::core::FilePath& baseDir); + + // append another concordance to this concordance (assumes they have + // the same input and output file and they originate from a common +@@ -56,9 +56,9 @@ + + bool empty() const { return mapping_.empty(); } + +- const core::FilePath& outputFile() const { return outputFile_; } ++ const ::core::FilePath& outputFile() const { return outputFile_; } + +- const core::FilePath& inputFile() const { return inputFile_; } ++ const ::core::FilePath& inputFile() const { return inputFile_; } + + std::size_t offset() const { return offset_; } + +@@ -73,7 +73,7 @@ + texLine -= offset_; + + // return the mapping (but return -1 if it is out of range) +- int mappingSize = core::safe_convert::numberTo(mapping_.size(), 0); ++ int mappingSize = ::core::safe_convert::numberTo(mapping_.size(), 0); + if (texLine >= 0 && texLine < mappingSize) + return mapping_[texLine]; + else +@@ -112,8 +112,8 @@ + } + + private: +- core::FilePath outputFile_; +- core::FilePath inputFile_; ++ ::core::FilePath outputFile_; ++ ::core::FilePath inputFile_; + std::size_t offset_; + std::vector mapping_; + }; +@@ -126,7 +126,7 @@ + { + } + +- FileAndLine(const core::FilePath& filePath, int line) ++ FileAndLine(const ::core::FilePath& filePath, int line) + : filePath_(filePath), line_(line) + { + } +@@ -135,11 +135,11 @@ + + bool empty() const { return filePath_.empty(); } + +- const core::FilePath& filePath() const { return filePath_; } ++ const ::core::FilePath& filePath() const { return filePath_; } + int line() const { return line_; } + + private: +- core::FilePath filePath_; ++ ::core::FilePath filePath_; + int line_; + }; + +@@ -162,16 +162,16 @@ + FileAndLine rnwLine(const FileAndLine& texLine) const; + FileAndLine texLine(const FileAndLine& rnwLine) const; + +- core::tex::LogEntry fixup(const core::tex::LogEntry& entry, ++ ::core::tex::LogEntry fixup(const ::core::tex::LogEntry& entry, + bool* pSuccess=NULL) const; + + private: + std::vector concordances_; + }; + +-void removePrevious(const core::FilePath& rnwFile); ++void removePrevious(const ::core::FilePath& rnwFile); + +-core::Error readIfExists(const core::FilePath& srcFile, ++core::Error readIfExists(const ::core::FilePath& srcFile, + Concordances* pConcordances); + + } // namespace rnw_concordance +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwWeave.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwWeave.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwWeave.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwWeave.cpp 2015-03-08 22:23:10.202943964 +0100 +@@ -88,11 +88,11 @@ + + virtual bool isInstalled() const = 0; + +- virtual core::json::Value chunkOptions() const = 0; ++ virtual ::core::json::Value chunkOptions() const = 0; + + // tangle the passed file (note that the implementation can assume + // that the working directory is already set to that of the file) +- virtual core::Error tangle(const std::string& file) = 0; ++ virtual ::core::Error tangle(const std::string& file) = 0; + + virtual std::vector commandArgs( + const std::string& file, +@@ -112,17 +112,17 @@ + virtual std::string weaveCommand(const std::string& file, + const std::string& encoding) const = 0; + +- virtual core::Error parseOutputForErrors( ++ virtual ::core::Error parseOutputForErrors( + const std::string& output, +- const core::FilePath& rnwFilePath, +- core::tex::LogEntries* pLogEntries) const ++ const ::core::FilePath& rnwFilePath, ++ ::core::tex::LogEntries* pLogEntries) const + { + // split into lines so we can determine the line numbers for the chunks + // NOTE: will need to read this using global/project encoding if we + // want to look for text outside of theh orignal error parsing + // scenario (which only required ascii) + std::string rnwContents; +- Error error = core::readStringFromFile(rnwFilePath, &rnwContents); ++ Error error = ::core::readStringFromFile(rnwFilePath, &rnwContents); + if (error) + return error; + std::vector lines; +@@ -145,14 +145,14 @@ + { + std::string match1(match[1]); + std::string match2(match[2]); +- std::size_t chunk = core::safe_convert::stringTo(match1, 0); ++ std::size_t chunk = ::core::safe_convert::stringTo(match1, 0); + std::string msg = boost::algorithm::trim_copy(match2); + if (chunk > 0 && chunk <= chunkLineNumbers.size()) + { + boost::format fmt("(chunk %1%) %2%"); +- core::tex::LogEntry logEntry(FilePath(), ++ ::core::tex::LogEntry logEntry(FilePath(), + -1, +- core::tex::LogEntry::Error, ++ ::core::tex::LogEntry::Error, + rnwFilePath, + chunkLineNumbers[chunk-1], + boost::str(fmt % chunk % msg)); +@@ -164,7 +164,7 @@ + } + + protected: +- core::json::Value chunkOptions(const std::string& chunkFunction) const ++ ::core::json::Value chunkOptions(const std::string& chunkFunction) const + { + SEXP optionsSEXP; + r::sexp::Protect rProtect; +@@ -176,7 +176,7 @@ + return json::Value(); + } + +- core::json::Value optionsJson; ++ ::core::json::Value optionsJson; + error = r::json::jsonValueFromList(optionsSEXP, &optionsJson); + if (error) + LOG_ERROR(error); +@@ -205,12 +205,12 @@ + + virtual bool forceEchoOnExec() const { return false; } + +- virtual core::json::Value chunkOptions() const ++ virtual ::core::json::Value chunkOptions() const + { + return RnwWeave::chunkOptions(".rs.sweaveChunkOptions"); + } + +- virtual core::Error tangle(const std::string& file) ++ virtual ::core::Error tangle(const std::string& file) + { + return r::exec::RFunction("utils:::Stangle", file).call(); + } +@@ -266,10 +266,10 @@ + return cmd; + } + +- virtual core::Error parseOutputForErrors( ++ virtual ::core::Error parseOutputForErrors( + const std::string& output, +- const core::FilePath& rnwFilePath, +- core::tex::LogEntries* pLogEntries) const ++ const ::core::FilePath& rnwFilePath, ++ ::core::tex::LogEntries* pLogEntries) const + { + // older error style + boost::regex errRe("^\\s*Quitting from lines ([0-9]+)-([0-9]+): " +@@ -296,9 +296,9 @@ + message = match[2]; + } + +- core::tex::LogEntry logEntry(FilePath(), ++ ::core::tex::LogEntry logEntry(FilePath(), + -1, +- core::tex::LogEntry::Error, ++ ::core::tex::LogEntry::Error, + rnwFilePath, + lineBegin, + message); +@@ -311,9 +311,9 @@ + int lineBegin = safe_convert::stringTo(match[1], -1); + std::string message = match[4]; + +- core::tex::LogEntry logEntry(FilePath(), ++ ::core::tex::LogEntry logEntry(FilePath(), + -1, +- core::tex::LogEntry::Error, ++ ::core::tex::LogEntry::Error, + rnwFilePath, + lineBegin, + message); +@@ -323,7 +323,7 @@ + return Success(); + } + +- virtual core::json::Value chunkOptions() const ++ virtual ::core::json::Value chunkOptions() const + { + if (isInstalled()) + return RnwWeave::chunkOptions(".rs.knitrChunkOptions"); +@@ -331,7 +331,7 @@ + return json::Value(); + } + +- virtual core::Error tangle(const std::string& file) ++ virtual ::core::Error tangle(const std::string& file) + { + r::session::utils::SuppressOutputInScope suppressOutput; + r::exec::RFunction purlFunc("knitr:::purl"); +@@ -396,10 +396,10 @@ + return instance; + } + +-std::string weaveTypeForFile(const core::tex::TexMagicComments& magicComments) ++std::string weaveTypeForFile(const ::core::tex::TexMagicComments& magicComments) + { + // first see if the file contains an rnw weave magic comment +- BOOST_FOREACH(const core::tex::TexMagicComment& mc, magicComments) ++ BOOST_FOREACH(const ::core::tex::TexMagicComment& mc, magicComments) + { + if (boost::algorithm::iequals(mc.scope(), "rnw") && + boost::algorithm::iequals(mc.variable(), "weave")) +@@ -436,7 +436,7 @@ + else + { + // parse for errors +- core::tex::LogEntries entries; ++ ::core::tex::LogEntries entries; + Error error = pRnwWeave->parseOutputForErrors(output, rnwPath, &entries); + if (error) + LOG_ERROR(error); +@@ -473,9 +473,9 @@ + } + } + +-void runWeave(const core::FilePath& rnwPath, ++void runWeave(const ::core::FilePath& rnwPath, + const std::string& encoding, +- const core::tex::TexMagicComments& magicComments, ++ const ::core::tex::TexMagicComments& magicComments, + const boost::function& onOutput, + const CompletedFunction& onCompleted) + { +@@ -515,7 +515,7 @@ + Error error = compile_pdf_supervisor::runProgram( + rBinPath, + args, +- core::system::Options(), ++ ::core::system::Options(), + rnwPath.parent(), + onOutput, + boost::bind(onWeaveProcessExit, +@@ -541,7 +541,7 @@ + if (pRnwWeave) + return pRnwWeave->chunkOptions(); + else +- return core::json::Value(); ++ return ::core::json::Value(); + } + + core::json::Array supportedTypes() +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwWeave.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwWeave.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionRnwWeave.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionRnwWeave.hpp 2015-03-08 22:23:10.204943964 +0100 +@@ -37,7 +37,7 @@ + namespace rnw_weave { + + core::json::Array supportedTypes(); +-void getTypesInstalledStatus(core::json::Object* pObj); ++void getTypesInstalledStatus(::core::json::Object* pObj); + + core::json::Value chunkOptions(const std::string& weaveType); + +@@ -51,7 +51,7 @@ + return result; + } + +- static Result error(const core::tex::LogEntries& logEntries) ++ static Result error(const ::core::tex::LogEntries& logEntries) + { + Result result; + result.succeeded = false; +@@ -70,7 +70,7 @@ + + bool succeeded; + std::string errorMessage; +- core::tex::LogEntries errorLogEntries; ++ ::core::tex::LogEntries errorLogEntries; + tex::rnw_concordance::Concordances concordances; + }; + +@@ -78,9 +78,9 @@ + + void runTangle(const std::string& filePath, const std::string& rnwWeave); + +-void runWeave(const core::FilePath& filePath, ++void runWeave(const ::core::FilePath& filePath, + const std::string& encoding, +- const core::tex::TexMagicComments& magicComments, ++ const ::core::tex::TexMagicComments& magicComments, + const boost::function& onOutput, + const CompletedFunction& onCompleted); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionSynctex.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionSynctex.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionSynctex.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionSynctex.cpp 2015-03-08 22:23:10.198943963 +0100 +@@ -38,7 +38,7 @@ + namespace { + + json::Value toJson(const FilePath& pdfFile, +- const core::tex::PdfLocation& pdfLoc, ++ const ::core::tex::PdfLocation& pdfLoc, + bool fromClick) + { + if (!pdfLoc.empty()) +@@ -59,7 +59,7 @@ + } + } + +-json::Value toJson(const core::tex::SourceLocation& srcLoc) ++json::Value toJson(const ::core::tex::SourceLocation& srcLoc) + { + if (!srcLoc.empty()) + { +@@ -76,7 +76,7 @@ + } + + void applyForwardConcordance(const FilePath& mainFile, +- core::tex::SourceLocation* pLoc) ++ ::core::tex::SourceLocation* pLoc) + { + // skip if this isn't an Rnw + if (pLoc->file().extensionLowerCase() != ".rnw") +@@ -97,14 +97,14 @@ + pLoc->line())); + if (!texLine.empty()) + { +- *pLoc = core::tex::SourceLocation(texLine.filePath(), ++ *pLoc = ::core::tex::SourceLocation(texLine.filePath(), + texLine.line(), + pLoc->column()); + } + } + + +-json::Object sourceLocationAsJson(const core::tex::SourceLocation& srcLoc, ++json::Object sourceLocationAsJson(const ::core::tex::SourceLocation& srcLoc, + bool fromClick) + { + json::Object sourceLocation; +@@ -140,7 +140,7 @@ + } + + +-void applyInverseConcordance(core::tex::SourceLocation* pLoc) ++void applyInverseConcordance(::core::tex::SourceLocation* pLoc) + { + // try to read concordance + using namespace tex::rnw_concordance; +@@ -157,7 +157,7 @@ + pLoc->line())); + if (!rnwLine.empty()) + { +- *pLoc = core::tex::SourceLocation(rnwLine.filePath(), ++ *pLoc = ::core::tex::SourceLocation(rnwLine.filePath(), + rnwLine.line(), + pLoc->column()); + } +@@ -189,7 +189,7 @@ + + FilePath srcPath = module_context::resolveAliasedPath(file); + +- core::tex::SourceLocation srcLoc(srcPath, line, column); ++ ::core::tex::SourceLocation srcLoc(srcPath, line, column); + + applyForwardConcordance(rootDocPath, &srcLoc); + +@@ -215,7 +215,7 @@ + return error; + FilePath srcPath = module_context::resolveAliasedPath(file); + +- core::tex::SourceLocation srcLoc(srcPath, line, column); ++ ::core::tex::SourceLocation srcLoc(srcPath, line, column); + + applyInverseConcordance(&srcLoc); + +@@ -244,7 +244,7 @@ + return error; + FilePath pdfPath = module_context::resolveAliasedPath(file); + +- core::tex::Synctex synctex; ++ ::core::tex::Synctex synctex; + if (synctex.parse(pdfPath)) + { + if (!fromClick) +@@ -253,14 +253,14 @@ + // the passed x and y coordinates since they represent the + // top of the user-visible content (in case the page is + // scrolled down from the top) +- core::tex::PdfLocation contLoc = synctex.topOfPageContent(page); ++ ::core::tex::PdfLocation contLoc = synctex.topOfPageContent(page); + x = std::max((float)x, contLoc.x()); + y = std::max((float)y, contLoc.y()); + } + +- core::tex::PdfLocation pdfLocation(page, x, y, width, height); ++ ::core::tex::PdfLocation pdfLocation(page, x, y, width, height); + +- core::tex::SourceLocation srcLoc = synctex.inverseSearch(pdfLocation); ++ ::core::tex::SourceLocation srcLoc = synctex.inverseSearch(pdfLocation); + applyInverseConcordance(&srcLoc); + + pResponse->setResult(toJson(srcLoc)); +@@ -286,7 +286,7 @@ + int line = safe_convert::stringTo(args[1].second, 1); + + // apply inverse concordance +- core::tex::SourceLocation srcLoc(FilePath(sourceFile), line, 1); ++ ::core::tex::SourceLocation srcLoc(FilePath(sourceFile), line, 1); + applyInverseConcordance(&srcLoc); + + // edit the file +@@ -323,13 +323,13 @@ + // determine pdf + FilePath pdfFile = rootFile.parent().complete(rootFile.stem() + ".pdf"); + +- core::tex::Synctex synctex; ++ ::core::tex::Synctex synctex; + if (synctex.parse(pdfFile)) + { +- core::tex::SourceLocation srcLoc(inputFile, line, column); ++ ::core::tex::SourceLocation srcLoc(inputFile, line, column); + applyForwardConcordance(rootFile, &srcLoc); + +- core::tex::PdfLocation pdfLoc = synctex.forwardSearch(srcLoc); ++ ::core::tex::PdfLocation pdfLoc = synctex.forwardSearch(srcLoc); + *pPdfLocation = toJson(pdfFile, pdfLoc, fromClick); + } + else +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionSynctex.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionSynctex.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionSynctex.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionSynctex.hpp 2015-03-08 22:23:10.206943964 +0100 +@@ -30,9 +30,9 @@ + + // returns an object suitable for jnsi binding back into a PdfLocation + // (or null if the search didn't succeed) +-core::Error forwardSearch(const core::FilePath& rootDocument, +- const core::json::Object& sourceLocation, +- core::json::Value* pPdfLocation); ++core::Error forwardSearch(const ::core::FilePath& rootDocument, ++ const ::core::json::Object& sourceLocation, ++ ::core::json::Value* pPdfLocation); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionTexUtils.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionTexUtils.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionTexUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionTexUtils.cpp 2015-03-08 22:23:10.194943962 +0100 +@@ -42,7 +42,7 @@ + const FilePath& extraPath, + bool ensureForwardSlashes) + { +- std::string value = core::system::getenv(name); ++ std::string value = ::core::system::getenv(name); + if (value.empty()) + value = "."; + +@@ -54,8 +54,8 @@ + #endif + + std::string sysPath = string_utils::utf8ToSystem(extraPath.absolutePath()); +- core::system::addToPath(&value, sysPath); +- core::system::addToPath(&value, ""); // trailing : required by tex ++ ::core::system::addToPath(&value, sysPath); ++ ::core::system::addToPath(&value, ""); // trailing : required by tex + + return std::make_pair(name, value); + } +@@ -89,7 +89,7 @@ + FilePath rHomeSharePath(rHomeShare); + if (!rHomeSharePath.exists()) + { +- LOG_ERROR(core::pathNotFoundError(rHomeShare, ERROR_LOCATION)); ++ LOG_ERROR(::core::pathNotFoundError(rHomeShare, ERROR_LOCATION)); + return RTexmfPaths(); + } + +@@ -97,7 +97,7 @@ + FilePath rTexmfPath(rHomeSharePath.complete("texmf")); + if (!rTexmfPath.exists()) + { +- LOG_ERROR(core::pathNotFoundError(rTexmfPath.absolutePath(), ++ LOG_ERROR(::core::pathNotFoundError(rTexmfPath.absolutePath(), + ERROR_LOCATION)); + return RTexmfPaths(); + } +@@ -115,7 +115,7 @@ + // the environment (or . if none) with the R dirs in share/texmf + core::system::Options rTexInputsEnvVars() + { +- core::system::Options envVars; ++ ::core::system::Options envVars; + RTexmfPaths texmfPaths = rTexmfPaths(); + if (!texmfPaths.empty()) + { +@@ -133,28 +133,28 @@ + } + + Error runTexCompile(const FilePath& texProgramPath, +- const core::system::Options& envVars, ++ const ::core::system::Options& envVars, + const shell_utils::ShellArgs& args, + const FilePath& texFilePath, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { + // copy extra environment variables +- core::system::Options env; +- core::system::environment(&env); +- BOOST_FOREACH(const core::system::Option& var, envVars) ++ ::core::system::Options env; ++ ::core::system::environment(&env); ++ BOOST_FOREACH(const ::core::system::Option& var, envVars) + { +- core::system::setenv(&env, var.first, var.second); ++ ::core::system::setenv(&env, var.first, var.second); + } + + // set options +- core::system::ProcessOptions procOptions; ++ ::core::system::ProcessOptions procOptions; + procOptions.terminateChildren = true; + procOptions.redirectStdErrToStdOut = true; + procOptions.environment = env; + procOptions.workingDir = texFilePath.parent(); + + // run the program +- return core::system::runProgram( ++ return ::core::system::runProgram( + string_utils::utf8ToSystem(texProgramPath.absolutePath()), + buildArgs(args, texFilePath), + "", +@@ -163,10 +163,10 @@ + } + + core::Error runTexCompile( +- const core::FilePath& texProgramPath, +- const core::system::Options& envVars, +- const core::shell_utils::ShellArgs& args, +- const core::FilePath& texFilePath, ++ const ::core::FilePath& texProgramPath, ++ const ::core::system::Options& envVars, ++ const ::core::shell_utils::ShellArgs& args, ++ const ::core::FilePath& texFilePath, + const boost::function& onExited) + { + return compile_pdf_supervisor::runProgram( +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionTexUtils.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionTexUtils.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionTexUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionTexUtils.hpp 2015-03-08 22:23:10.175943959 +0100 +@@ -35,26 +35,26 @@ + { + bool empty() const { return texInputsPath.empty(); } + +- core::FilePath texInputsPath; +- core::FilePath bibInputsPath; +- core::FilePath bstInputsPath; ++ ::core::FilePath texInputsPath; ++ ::core::FilePath bibInputsPath; ++ ::core::FilePath bstInputsPath; + }; + + RTexmfPaths rTexmfPaths(); + + core::system::Options rTexInputsEnvVars(); + +-core::Error runTexCompile(const core::FilePath& texProgramPath, +- const core::system::Options& envVars, +- const core::shell_utils::ShellArgs& args, +- const core::FilePath& texFilePath, +- core::system::ProcessResult* pResult); ++core::Error runTexCompile(const ::core::FilePath& texProgramPath, ++ const ::core::system::Options& envVars, ++ const ::core::shell_utils::ShellArgs& args, ++ const ::core::FilePath& texFilePath, ++ ::core::system::ProcessResult* pResult); + + core::Error runTexCompile( +- const core::FilePath& texProgramPath, +- const core::system::Options& envVars, +- const core::shell_utils::ShellArgs& args, +- const core::FilePath& texFilePath, ++ const ::core::FilePath& texProgramPath, ++ const ::core::system::Options& envVars, ++ const ::core::shell_utils::ShellArgs& args, ++ const ::core::FilePath& texFilePath, + const boost::function& onExited); + + } // namespace utils +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionViewPdf.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionViewPdf.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionViewPdf.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionViewPdf.cpp 2015-03-08 22:23:10.209943965 +0100 +@@ -65,7 +65,7 @@ + return; + } + +- core::FilePath pdfJsResource = options().rResourcesPath().childPath(path); ++ ::core::FilePath pdfJsResource = options().rResourcesPath().childPath(path); + if (pdfJsResource.exists()) + { + pResponse->setCacheableFile(pdfJsResource, request); +@@ -75,7 +75,7 @@ + + } // anonymous namespace + +-std::string createViewPdfUrl(const core::FilePath& filePath) ++std::string createViewPdfUrl(const ::core::FilePath& filePath) + { + return "view_pdf?path=" + http::util::urlEncode(filePath.absolutePath(), + true); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/tex/SessionViewPdf.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionViewPdf.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/tex/SessionViewPdf.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/tex/SessionViewPdf.hpp 2015-03-08 22:23:10.180943960 +0100 +@@ -28,7 +28,7 @@ + namespace tex { + namespace view_pdf { + +-std::string createViewPdfUrl(const core::FilePath& filePath); ++std::string createViewPdfUrl(const ::core::FilePath& filePath); + + core::Error initialize(); + +diff -ru rstudio-0.98.1103/src/cpp/session/modules/vcs/SessionVCSCore.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/vcs/SessionVCSCore.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/vcs/SessionVCSCore.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/vcs/SessionVCSCore.hpp 2015-03-08 22:23:09.985943927 +0100 +@@ -51,7 +51,7 @@ + struct FileWithStatus + { + VCSStatus status; +- core::FilePath path; ++ ::core::FilePath path; + }; + + class StatusResult +@@ -69,7 +69,7 @@ + } + } + +- VCSStatus getStatus(const core::FilePath& fileOrDirectory) const; ++ VCSStatus getStatus(const ::core::FilePath& fileOrDirectory) const; + std::vector files() const { return files_; } + + private: +@@ -84,8 +84,8 @@ + FileDecorationContext() {} + virtual ~FileDecorationContext() {} + +- virtual void decorateFile(const core::FilePath& filePath, +- core::json::Object* pFileObject) = 0; ++ virtual void decorateFile(const ::core::FilePath& filePath, ++ ::core::json::Object* pFileObject) = 0; + }; + + } // namespace source_control +diff -ru rstudio-0.98.1103/src/cpp/session/modules/vcs/SessionVCSUtils.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/vcs/SessionVCSUtils.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/vcs/SessionVCSUtils.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/vcs/SessionVCSUtils.cpp 2015-03-08 22:23:09.988943927 +0100 +@@ -48,9 +48,9 @@ + } + + core::json::Object processResultToJson( +- const core::system::ProcessResult& result) ++ const ::core::system::ProcessResult& result) + { +- core::json::Object obj; ++ ::core::json::Object obj; + obj["output"] = result.stdOut; + obj["exit_code"] = result.exitStatus; + return obj; +diff -ru rstudio-0.98.1103/src/cpp/session/modules/vcs/SessionVCSUtils.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/vcs/SessionVCSUtils.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/vcs/SessionVCSUtils.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/vcs/SessionVCSUtils.hpp 2015-03-08 22:23:09.990943928 +0100 +@@ -29,9 +29,9 @@ + void enqueueRefreshEvent(); + + core::json::Object processResultToJson( +- const core::system::ProcessResult& result); ++ const ::core::system::ProcessResult& result); + +-core::FilePath fileFilterPath(const core::json::Value& fileFilterJson); ++core::FilePath fileFilterPath(const ::core::json::Value& fileFilterJson); + + void splitMessage(const std::string message, + std::string* pSubject, +diff -ru rstudio-0.98.1103/src/cpp/session/modules/viewer/ViewerHistory.cpp rstudio-0.98.1103-fix/src/cpp/session/modules/viewer/ViewerHistory.cpp +--- rstudio-0.98.1103/src/cpp/session/modules/viewer/ViewerHistory.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/viewer/ViewerHistory.cpp 2015-03-08 22:23:10.315943983 +0100 +@@ -103,12 +103,12 @@ + + namespace { + +-FilePath historyEntriesPath(const core::FilePath& serializationPath) ++FilePath historyEntriesPath(const ::core::FilePath& serializationPath) + { + return serializationPath.complete("history_entries"); + } + +-FilePath currentIndexPath(const core::FilePath& serializationPath) ++FilePath currentIndexPath(const ::core::FilePath& serializationPath) + { + return serializationPath.complete("current_index"); + } +@@ -128,7 +128,7 @@ + + } // anonymous namespace + +-void ViewerHistory::saveTo(const core::FilePath& serializationPath) const ++void ViewerHistory::saveTo(const ::core::FilePath& serializationPath) const + { + // blow away any existing serialization data + Error error = serializationPath.removeIfExists(); +@@ -149,7 +149,7 @@ + + // save the current index + std::string currentIndex = safe_convert::numberToString(currentIndex_); +- error = core::writeStringToFile(currentIndexPath(serializationPath), ++ error = ::core::writeStringToFile(currentIndexPath(serializationPath), + currentIndex); + if (error) + { +@@ -179,7 +179,7 @@ + } + } + +-void ViewerHistory::restoreFrom(const core::FilePath& serializationPath) ++void ViewerHistory::restoreFrom(const ::core::FilePath& serializationPath) + { + // skip if the directory doesn't exist + if (!serializationPath.exists()) +@@ -196,7 +196,7 @@ + + // read the index + std::string currentIndex; +- Error error = core::readStringFromFile(indexPath, ¤tIndex); ++ Error error = ::core::readStringFromFile(indexPath, ¤tIndex); + if (error) + { + LOG_ERROR(error); +@@ -242,8 +242,8 @@ + } + + core::Error ViewerHistoryEntry::copy( +- const core::FilePath& sourceDir, +- const core::FilePath& destinationDir) const ++ const ::core::FilePath& sourceDir, ++ const ::core::FilePath& destinationDir) const + { + // copy enclosing directory to the destinationDir + FilePath entryPath = sourceDir.childPath(sessionTempPath_); +diff -ru rstudio-0.98.1103/src/cpp/session/modules/viewer/ViewerHistory.hpp rstudio-0.98.1103-fix/src/cpp/session/modules/viewer/ViewerHistory.hpp +--- rstudio-0.98.1103/src/cpp/session/modules/viewer/ViewerHistory.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/modules/viewer/ViewerHistory.hpp 2015-03-08 22:23:10.317943983 +0100 +@@ -51,8 +51,8 @@ + bool hasPrevious() const; + module_context::ViewerHistoryEntry goBack(); + +- void saveTo(const core::FilePath& serializationPath) const; +- void restoreFrom(const core::FilePath& serializationPath); ++ void saveTo(const ::core::FilePath& serializationPath) const; ++ void restoreFrom(const ::core::FilePath& serializationPath); + + private: + int currentIndex_; +diff -ru rstudio-0.98.1103/src/cpp/session/postback/PostbackMain.cpp rstudio-0.98.1103-fix/src/cpp/session/postback/PostbackMain.cpp +--- rstudio-0.98.1103/src/cpp/session/postback/PostbackMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/postback/PostbackMain.cpp 2015-03-08 22:23:10.400943997 +0100 +@@ -58,9 +58,9 @@ + { + #ifdef _WIN32 + // get local peer +- std::string pipeName = core::system::getenv("RS_LOCAL_PEER"); ++ std::string pipeName = ::core::system::getenv("RS_LOCAL_PEER"); + pRequest->setHeader("X-Shared-Secret", +- core::system::getenv("RS_SHARED_SECRET")); ++ ::core::system::getenv("RS_SHARED_SECRET")); + return http::sendRequest(pipeName, + *pRequest, + http::ConnectionRetryProfile( +@@ -68,7 +68,7 @@ + boost::posix_time::milliseconds(50)), + pResponse); + #else +- std::string tcpipPort = core::system::getenv(kRSessionStandalonePortNumber); ++ std::string tcpipPort = ::core::system::getenv(kRSessionStandalonePortNumber); + if (!tcpipPort.empty()) + { + return http::sendRequest("127.0.0.1", tcpipPort, *pRequest, pResponse); +@@ -76,7 +76,7 @@ + else + { + // determine stream path +- std::string userIdentity = core::system::getenv(kRStudioUserIdentity); ++ std::string userIdentity = ::core::system::getenv(kRStudioUserIdentity); + FilePath streamPath = session::local_streams::streamPath(userIdentity); + return http::sendRequest(streamPath, *pRequest, pResponse); + } +@@ -89,10 +89,10 @@ + try + { + // initialize log +- initializeSystemLog("rpostback", core::system::kLogLevelWarning); ++ initializeSystemLog("rpostback", ::core::system::kLogLevelWarning); + + // ignore SIGPIPE +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + +diff -ru rstudio-0.98.1103/src/cpp/session/postback/PostbackOptions.cpp rstudio-0.98.1103-fix/src/cpp/session/postback/PostbackOptions.cpp +--- rstudio-0.98.1103/src/cpp/session/postback/PostbackOptions.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/postback/PostbackOptions.cpp 2015-03-08 22:23:10.404943998 +0100 +@@ -50,7 +50,7 @@ + optionsDesc.positionalOptions.add("argument", 1); + + // read options +- ProgramStatus status = core::program_options::read(optionsDesc, argc, argv); ++ ProgramStatus status = ::core::program_options::read(optionsDesc, argc, argv); + if (status.exit()) + return status; + +diff -ru rstudio-0.98.1103/src/cpp/session/postback/PostbackOptions.hpp rstudio-0.98.1103-fix/src/cpp/session/postback/PostbackOptions.hpp +--- rstudio-0.98.1103/src/cpp/session/postback/PostbackOptions.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/postback/PostbackOptions.hpp 2015-03-08 22:23:10.402943998 +0100 +@@ -39,7 +39,7 @@ + // COPYING: boost::noncopyable + + public: +- core::ProgramStatus read(int argc, char * const argv[]); ++ ::core::ProgramStatus read(int argc, char * const argv[]); + + std::string command() const + { +diff -ru rstudio-0.98.1103/src/cpp/session/projects/SessionProjectContext.cpp rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectContext.cpp +--- rstudio-0.98.1103/src/cpp/session/projects/SessionProjectContext.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectContext.cpp 2015-03-08 22:23:10.474944010 +0100 +@@ -42,8 +42,8 @@ + + bool canWriteToProjectDir(const FilePath& projectDirPath) + { +- FilePath testFile = projectDirPath.complete(core::system::generateUuid()); +- Error error = core::writeStringToFile(testFile, "test"); ++ FilePath testFile = projectDirPath.complete(::core::system::generateUuid()); ++ Error error = ::core::writeStringToFile(testFile, "test"); + if (error) + { + return false; +@@ -78,7 +78,7 @@ + + // mark hidden if we are on win32 + #ifdef _WIN32 +- error = core::system::makeFileHidden(projectUserDir); ++ error = ::core::system::makeFileHidden(projectUserDir); + if (error) + return error; + #endif +@@ -103,7 +103,7 @@ + return FilePath(); + + // add username if we can get one +- std::string username = core::system::username(); ++ std::string username = ::core::system::username(); + if (!username.empty()) + projectUserDir = projectUserDir.complete(username); + +@@ -224,7 +224,7 @@ + // they are already there + + std::string strIgnore; +- Error error = core::readStringFromFile( ++ Error error = ::core::readStringFromFile( + rbuildIgnorePath, + &strIgnore, + string_utils::LineEndingPosix); +@@ -251,7 +251,7 @@ + strIgnore += kIgnoreRproj + std::string("\n"); + if (!hasRProjUser) + strIgnore += kIgnoreRprojUser + std::string("\n"); +- error = core::writeStringToFile(rbuildIgnorePath, ++ error = ::core::writeStringToFile(rbuildIgnorePath, + strIgnore, + string_utils::LineEndingNative); + if (error) +@@ -353,7 +353,7 @@ + { + // kickoff file monitoring for this directory + using namespace boost; +- core::system::file_monitor::Callbacks cb; ++ ::core::system::file_monitor::Callbacks cb; + cb.onRegistered = bind(&ProjectContext::fileMonitorRegistered, + this, _1, _2); + cb.onRegistrationError = bind(&ProjectContext::fileMonitorTermination, +@@ -364,7 +364,7 @@ + this, _1); + cb.onUnregistered = bind(&ProjectContext::fileMonitorTermination, + this, Success()); +- core::system::file_monitor::registerMonitor( ++ ::core::system::file_monitor::registerMonitor( + directory(), + true, + module_context::fileListingFilter, +@@ -372,8 +372,8 @@ + } + + void ProjectContext::fileMonitorRegistered( +- core::system::file_monitor::Handle handle, +- const tree& files) ++ ::core::system::file_monitor::Handle handle, ++ const tree< ::core::FileInfo>& files) + { + // update state + hasFileMonitor_ = true; +@@ -383,7 +383,7 @@ + } + + void ProjectContext::fileMonitorFilesChanged( +- const std::vector& events) ++ const std::vector< ::core::system::FileChangeEvent>& events) + { + // notify client (gwt) + module_context::enqueFileChangedEvents(directory(), events); +@@ -606,7 +606,7 @@ + + Error ProjectContext::readVcsOptions(RProjectVcsOptions* pOptions) const + { +- core::Settings settings; ++ ::core::Settings settings; + Error error = settings.initialize(vcsOptionsFilePath()); + if (error) + return error; +@@ -620,7 +620,7 @@ + + Error ProjectContext::writeVcsOptions(const RProjectVcsOptions& options) const + { +- core::Settings settings; ++ ::core::Settings settings; + Error error = settings.initialize(vcsOptionsFilePath()); + if (error) + return error; +@@ -634,7 +634,7 @@ + + Error ProjectContext::readBuildOptions(RProjectBuildOptions* pOptions) + { +- core::Settings optionsFile; ++ ::core::Settings optionsFile; + Error error = buildOptionsFile(&optionsFile); + if (error) + return error; +@@ -658,7 +658,7 @@ + + Error ProjectContext::writeBuildOptions(const RProjectBuildOptions& options) + { +- core::Settings optionsFile; ++ ::core::Settings optionsFile; + Error error = buildOptionsFile(&optionsFile); + if (error) + return error; +diff -ru rstudio-0.98.1103/src/cpp/session/projects/SessionProjectFirstRun.cpp rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectFirstRun.cpp +--- rstudio-0.98.1103/src/cpp/session/projects/SessionProjectFirstRun.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectFirstRun.cpp 2015-03-08 22:23:10.465944008 +0100 +@@ -47,7 +47,7 @@ + + std::ostringstream ostr; + ostr << doc << std::endl; +- error = core::appendToFile(scratchPath.childPath(kFirstRunDocs), ostr.str()); ++ error = ::core::appendToFile(scratchPath.childPath(kFirstRunDocs), ostr.str()); + if (error) + LOG_ERROR(error); + } +@@ -70,7 +70,7 @@ + FilePath firstRunDocsPath = scratchPath.childPath(kFirstRunDocs); + if (firstRunDocsPath.exists()) + { +- Error error = core::readStringVectorFromFile(firstRunDocsPath, &docs); ++ Error error = ::core::readStringVectorFromFile(firstRunDocsPath, &docs); + if (error) + LOG_ERROR(error); + +diff -ru rstudio-0.98.1103/src/cpp/session/projects/SessionProjectFirstRun.hpp rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectFirstRun.hpp +--- rstudio-0.98.1103/src/cpp/session/projects/SessionProjectFirstRun.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectFirstRun.hpp 2015-03-08 22:23:10.469944009 +0100 +@@ -26,8 +26,8 @@ + namespace session { + namespace projects { + +-void addFirstRunDoc(const core::FilePath& projectFile, const std::string& doc); +-std::vector collectFirstRunDocs(const core::FilePath& projectFile); ++void addFirstRunDoc(const ::core::FilePath& projectFile, const std::string& doc); ++std::vector collectFirstRunDocs(const ::core::FilePath& projectFile); + + } // namespace projects + } // namesapce session +diff -ru rstudio-0.98.1103/src/cpp/session/projects/SessionProjects.cpp rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjects.cpp +--- rstudio-0.98.1103/src/cpp/session/projects/SessionProjects.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjects.cpp 2015-03-08 22:23:10.463944008 +0100 +@@ -111,7 +111,7 @@ + // error if the package dir already exists + FilePath packageDir = projectFilePath.parent(); + if (packageDir.exists()) +- return core::fileExistsError(ERROR_LOCATION); ++ return ::core::fileExistsError(ERROR_LOCATION); + + // create a temp dir (so we can import the list of code files) + FilePath tempDir = module_context::tempFile("newpkg", "dir"); +@@ -145,7 +145,7 @@ + { + std::string srcFileName = packageDir.filename() + ".R"; + FilePath srcFilePath = tempDir.complete(srcFileName); +- Error error = core::writeStringToFile(srcFilePath, ""); ++ Error error = ::core::writeStringToFile(srcFilePath, ""); + if (error) + return error; + rFileNames.push_back(string_utils::utf8ToSystem(srcFileName)); +@@ -193,7 +193,7 @@ + // error if the shiny app dir already exists + FilePath appDir = projectFilePath.parent(); + if (appDir.exists()) +- return core::fileExistsError(ERROR_LOCATION); ++ return ::core::fileExistsError(ERROR_LOCATION); + + // now create it + Error error = appDir.ensureDirectory(); +@@ -553,9 +553,9 @@ + module_context::enqueClientEvent(event); + } + +-void onFilesChanged(const std::vector& events) ++void onFilesChanged(const std::vector< ::core::system::FileChangeEvent>& events) + { +- BOOST_FOREACH(const core::system::FileChangeEvent& event, events) ++ BOOST_FOREACH(const ::core::system::FileChangeEvent& event, events) + { + // if the project file changed then sync its changes + if (event.fileInfo().absolutePath() == +@@ -579,7 +579,7 @@ + + + // Note that the logic here needs to be synchronized with the logic in +-// core::r_util::RSessionContext::nextSessionWorkingDir (so that both ++// ::core::r_util::RSessionContext::nextSessionWorkingDir (so that both + // reach the same conclusion about what the next working directory is) + void startup() + { +diff -ru rstudio-0.98.1103/src/cpp/session/projects/SessionProjectsInternal.hpp rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectsInternal.hpp +--- rstudio-0.98.1103/src/cpp/session/projects/SessionProjectsInternal.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/projects/SessionProjectsInternal.hpp 2015-03-08 22:23:10.467944009 +0100 +@@ -30,8 +30,8 @@ + + core::Error initialize(); + +-core::Error computeScratchPath(const core::FilePath& projectFile, +- core::FilePath* pScratchPath); ++core::Error computeScratchPath(const ::core::FilePath& projectFile, ++ ::core::FilePath* pScratchPath); + + } // namespace projects + } // namesapce session +diff -ru rstudio-0.98.1103/src/cpp/session/SessionAsyncRProcess.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionAsyncRProcess.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionAsyncRProcess.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionAsyncRProcess.cpp 2015-03-08 22:23:10.358943990 +0100 +@@ -31,12 +31,12 @@ + } + + void AsyncRProcess::start(const char* rCommand, +- const core::FilePath& workingDir, ++ const ::core::FilePath& workingDir, + AsyncRProcessOptions rOptions) + { + // R binary +- core::FilePath rProgramPath; +- core::Error error = module_context::rScriptPath(&rProgramPath); ++ ::core::FilePath rProgramPath; ++ ::core::Error error = module_context::rScriptPath(&rProgramPath); + if (error) + { + LOG_ERROR(error); +@@ -53,7 +53,7 @@ + args.push_back(rCommand); + + // options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + if (rOptions & R_PROCESS_REDIRECTSTDERR) + options.redirectStdErrToStdOut = true; +@@ -66,16 +66,16 @@ + + // forward R_LIBS so the child process has access to the same libraries + // we do +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + std::string libPaths = module_context::libPathsString(); + if (!libPaths.empty()) + { +- core::system::setenv(&childEnv, "R_LIBS", libPaths); ++ ::core::system::setenv(&childEnv, "R_LIBS", libPaths); + options.environment = childEnv; + } + +- core::system::ProcessCallbacks cb; ++ ::core::system::ProcessCallbacks cb; + using namespace module_context; + cb.onContinue = boost::bind(&AsyncRProcess::onContinue, + AsyncRProcess::shared_from_this()); +diff -ru rstudio-0.98.1103/src/cpp/session/SessionClientEvent.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionClientEvent.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionClientEvent.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionClientEvent.cpp 2015-03-08 22:23:10.479944011 +0100 +@@ -126,7 +126,7 @@ + { + type_ = type; + data_ = data; +- id_ = core::system::generateUuid(); ++ id_ = ::core::system::generateUuid(); + } + + void ClientEvent::asJsonObject(int id, json::Object* pObject) const +diff -ru rstudio-0.98.1103/src/cpp/session/SessionClientEventService.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionClientEventService.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionClientEventService.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionClientEventService.cpp 2015-03-08 22:23:10.415944000 +0100 +@@ -64,7 +64,7 @@ + + // block all signals for launch of background thread (will cause it + // to never receive signals) +- core::system::SignalBlocker signalBlocker; ++ ::core::system::SignalBlocker signalBlocker; + Error error = signalBlocker.blockAll(); + if (error) + return error ; +@@ -173,7 +173,7 @@ + } + + void ClientEventService::setClientEventResult( +- core::json::JsonRpcResponse* pResponse) ++ ::core::json::JsonRpcResponse* pResponse) + { + LOCK_MUTEX(mutex_) + { +diff -ru rstudio-0.98.1103/src/cpp/session/SessionClientEventService.hpp rstudio-0.98.1103-fix/src/cpp/session/SessionClientEventService.hpp +--- rstudio-0.98.1103/src/cpp/session/SessionClientEventService.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionClientEventService.hpp 2015-03-08 22:23:10.459944007 +0100 +@@ -44,7 +44,7 @@ + public: + // COPYING: boost::noncopyable + +- core::Error start(const std::string& clientId); ++ ::core::Error start(const std::string& clientId); + void stop(); + + void setClientId(const std::string& clientId, bool clearEvents); +@@ -57,8 +57,8 @@ + + void erasePreviouslyDeliveredEvents(int lastClientEventIdSeen); + bool havePendingClientEvents(); +- void addClientEvent(const core::json::Object& eventObject); +- void setClientEventResult(core::json::JsonRpcResponse* pResponse); ++ void addClientEvent(const ::core::json::Object& eventObject); ++ void setClientEventResult(::core::json::JsonRpcResponse* pResponse); + + + private: +@@ -66,7 +66,7 @@ + boost::thread serviceThread_ ; + + std::string clientId_ ; +- core::json::Array clientEvents_ ; ++ ::core::json::Array clientEvents_ ; + }; + + +diff -ru rstudio-0.98.1103/src/cpp/session/SessionConsoleProcess.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionConsoleProcess.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionConsoleProcess.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionConsoleProcess.cpp 2015-03-08 22:23:10.393943996 +0100 +@@ -62,7 +62,7 @@ + } + + ConsoleProcess::ConsoleProcess(const std::string& command, +- const core::system::ProcessOptions& options, ++ const ::core::system::ProcessOptions& options, + const std::string& caption, + bool dialog, + InteractionMode interactionMode, +@@ -78,7 +78,7 @@ + + ConsoleProcess::ConsoleProcess(const std::string& program, + const std::vector& args, +- const core::system::ProcessOptions& options, ++ const ::core::system::ProcessOptions& options, + const std::string& caption, + bool dialog, + InteractionMode interactionMode, +@@ -102,7 +102,7 @@ + { + regexInit(); + +- handle_ = core::system::generateUuid(false); ++ handle_ = ::core::system::generateUuid(false); + + // always redirect stderr to stdout so output is interleaved + options_.redirectStdErrToStdOut = true; +@@ -135,17 +135,17 @@ + } + #else + // request a pseudoterminal if this is an interactive console process +- options_.pseudoterminal = core::system::Pseudoterminal(80, 1); ++ options_.pseudoterminal = ::core::system::Pseudoterminal(80, 1); + + // define TERM to dumb (but first make sure we have an environment + // block to modify) + if (!options_.environment) + { +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + options_.environment = childEnv; + } +- core::system::setenv(&(options_.environment.get()), "TERM", "dumb"); ++ ::core::system::setenv(&(options_.environment.get()), "TERM", "dumb"); + #endif + } + +@@ -205,7 +205,7 @@ + interrupt_ = true; + } + +-bool ConsoleProcess::onContinue(core::system::ProcessOperations& ops) ++bool ConsoleProcess::onContinue(::core::system::ProcessOperations& ops) + { + // full stop interrupt if requested + if (interrupt_) +@@ -275,7 +275,7 @@ + ClientEvent(client_events::kConsoleProcessOutput, data)); + } + +-void ConsoleProcess::onStdout(core::system::ProcessOperations& ops, ++void ConsoleProcess::onStdout(::core::system::ProcessOperations& ops, + const std::string& output) + { + // convert line endings to posix +@@ -305,7 +305,7 @@ + } + } + +-void ConsoleProcess::maybeConsolePrompt(core::system::ProcessOperations& ops, ++void ConsoleProcess::maybeConsolePrompt(::core::system::ProcessOperations& ops, + const std::string& output) + { + boost::smatch smatch; +@@ -323,7 +323,7 @@ + handleConsolePrompt(ops, output); + } + +-void ConsoleProcess::handleConsolePrompt(core::system::ProcessOperations& ops, ++void ConsoleProcess::handleConsolePrompt(::core::system::ProcessOperations& ops, + const std::string& prompt) + { + // if there is a custom prmopt handler then give it a chance to +@@ -388,7 +388,7 @@ + } + + boost::shared_ptr ConsoleProcess::fromJson( +- core::json::Object &obj) ++ ::core::json::Object &obj) + { + boost::shared_ptr pProc(new ConsoleProcess()); + pProc->handle_ = obj["handle"].get_str(); +@@ -427,7 +427,7 @@ + + core::system::ProcessCallbacks ConsoleProcess::createProcessCallbacks() + { +- core::system::ProcessCallbacks cb; ++ ::core::system::ProcessCallbacks cb; + cb.onContinue = boost::bind(&ConsoleProcess::onContinue, ConsoleProcess::shared_from_this(), _1); + cb.onStdout = boost::bind(&ConsoleProcess::onStdout, ConsoleProcess::shared_from_this(), _1, _2); + cb.onExit = boost::bind(&ConsoleProcess::onExit, ConsoleProcess::shared_from_this(), _1); +@@ -516,7 +516,7 @@ + { + if (!input.interrupt) + { +- error = core::system::crypto::rsaPrivateDecrypt(input.text, ++ error = ::core::system::crypto::rsaPrivateDecrypt(input.text, + &input.text); + if (error) + return error; +@@ -537,7 +537,7 @@ + + boost::shared_ptr ConsoleProcess::create( + const std::string& command, +- core::system::ProcessOptions options, ++ ::core::system::ProcessOptions options, + const std::string& caption, + bool dialog, + InteractionMode interactionMode, +@@ -558,7 +558,7 @@ + boost::shared_ptr ConsoleProcess::create( + const std::string& program, + const std::vector& args, +- core::system::ProcessOptions options, ++ ::core::system::ProcessOptions options, + const std::string& caption, + bool dialog, + InteractionMode interactionMode, +@@ -705,7 +705,7 @@ + return procInfos; + } + +-void onSuspend(core::Settings* pSettings) ++void onSuspend(::core::Settings* pSettings) + { + json::Array array; + for (ProcTable::const_iterator it = s_procs.begin(); +@@ -720,7 +720,7 @@ + pSettings->set("console_procs", ostr.str()); + } + +-void onResume(const core::Settings& settings) ++void onResume(const ::core::Settings& settings) + { + std::string strVal = settings.get("console_procs"); + if (strVal.empty()) +diff -ru rstudio-0.98.1103/src/cpp/session/SessionContentUrls.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionContentUrls.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionContentUrls.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionContentUrls.cpp 2015-03-08 22:23:10.406943998 +0100 +@@ -63,7 +63,7 @@ + + Error contentFileInfo(const std::string& contentUrl, + std::string* pTitle, +- core::FilePath* pFilePath) ++ ::core::FilePath* pFilePath) + { + // extract and parse query string + std::string queryString; +@@ -102,7 +102,7 @@ + std::string provision(const std::string& title, const FilePath& filePath) + { + // calculate content path +- std::string contentFile = core::system::generateUuid(false) + ++ std::string contentFile = ::core::system::generateUuid(false) + + filePath.extension(); + FilePath contentPath = contentUrlPath().complete(contentFile); + +@@ -120,7 +120,7 @@ + const std::string& extension) + { + // calculate content path +- std::string contentFile = core::system::generateUuid(false) + extension; ++ std::string contentFile = ::core::system::generateUuid(false) + extension; + FilePath contentPath = contentUrlPath().complete(contentFile); + + // write the file +@@ -158,7 +158,7 @@ + // If the content looks like valid UTF-8, assume it is. Otherwise, assume + // it's the system encoding. + std::string contents; +- error = core::readStringFromFile(contentFilePath, &contents); ++ error = ::core::readStringFromFile(contentFilePath, &contents); + if (!error) + { + for (std::string::iterator pos = contents.begin(); pos != contents.end(); ) +diff -ru rstudio-0.98.1103/src/cpp/session/SessionMain.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionMain.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionMain.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionMain.cpp 2015-03-08 22:23:10.432944003 +0100 +@@ -425,7 +425,7 @@ + if (options.programMode() == kSessionProgramModeServer) + { + std::string referer = ptrConnection->request().headerValue("referer"); +- core::system::setenv("RSTUDIO_HTTP_REFERER", referer); ++ ::core::system::setenv("RSTUDIO_HTTP_REFERER", referer); + } + + // prepare session info +@@ -601,10 +601,10 @@ + r::session::consoleHistory().capacity(); + + sessionInfo["disable_packages"] = +- !core::system::getenv("RSTUDIO_DISABLE_PACKAGES").empty(); ++ !::core::system::getenv("RSTUDIO_DISABLE_PACKAGES").empty(); + + sessionInfo["disable_check_for_updates"] = +- !core::system::getenv("RSTUDIO_DISABLE_CHECK_FOR_UPDATES").empty(); ++ !::core::system::getenv("RSTUDIO_DISABLE_CHECK_FOR_UPDATES").empty(); + + sessionInfo["allow_vcs_exe_edit"] = options.allowVcsExecutableEdit(); + sessionInfo["allow_cran_repos_edit"] = options.allowCRANReposEdit(); +@@ -656,7 +656,7 @@ + + void endHandleRpcRequestDirect(boost::shared_ptr ptrConnection, + boost::posix_time::ptime executeStartTime, +- const core::Error& executeError, ++ const ::core::Error& executeError, + json::JsonRpcResponse* pJsonRpcResponse) + { + // return error or result then continue waiting for requests +@@ -693,7 +693,7 @@ + + void endHandleRpcRequestIndirect( + const std::string& asyncHandle, +- const core::Error& executeError, ++ const ::core::Error& executeError, + json::JsonRpcResponse* pJsonRpcResponse) + { + json::JsonRpcResponse temp; +@@ -712,7 +712,7 @@ + module_context::enqueClientEvent(evt); + } + +-void handleRpcRequest(const core::json::JsonRpcRequest& request, ++void handleRpcRequest(const ::core::json::JsonRpcRequest& request, + boost::shared_ptr ptrConnection, + ConnectionType connectionType) + { +@@ -742,7 +742,7 @@ + else + { + // indirect return (asyncHandle style) +- std::string handle = core::system::generateUuid(true); ++ std::string handle = ::core::system::generateUuid(true); + json::JsonRpcResponse response; + response.setAsyncHandle(handle); + response.setField(kEventsPending, "false"); +@@ -1212,7 +1212,7 @@ + bool waitForMethod(const std::string& method, + const boost::function& initFunction, + const boost::function& allowSuspend, +- core::json::JsonRpcRequest* pRequest) ++ ::core::json::JsonRpcRequest* pRequest) + { + if (s_wasForked) + { +@@ -1325,7 +1325,7 @@ + bool waitForMethod(const std::string& method, + const ClientEvent& initEvent, + const boost::function& allowSuspend, +- core::json::JsonRpcRequest* pRequest) ++ ::core::json::JsonRpcRequest* pRequest) + { + return waitForMethod(method, + boost::bind(module_context::enqueClientEvent, +@@ -1396,7 +1396,7 @@ + // allow console_input requests to come in when we aren't explicitly waiting + // on them (i.e. waitForMethod("console_input")). place them into into a buffer + // which is then checked by rConsoleRead prior to it calling waitForMethod +-Error bufferConsoleInput(const core::json::JsonRpcRequest& request, ++Error bufferConsoleInput(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + // extract the input +@@ -1411,7 +1411,7 @@ + r::session::suspendForRestart(options); + } + +-Error suspendForRestart(const core::json::JsonRpcRequest& request, ++Error suspendForRestart(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + r::session::RSuspendOptions options; +@@ -1428,7 +1428,7 @@ + } + + +-Error ping(const core::json::JsonRpcRequest& request, ++Error ping(const ::core::json::JsonRpcRequest& request, + json::JsonRpcResponse* pResponse) + { + return Success(); +@@ -1473,7 +1473,7 @@ + Error registerSignalHandlers() + { + using boost::bind; +- using namespace core::system; ++ using namespace ::core::system; + + // USR1 and USR2: perform suspend in server mode + if (session::options().programMode() == kSessionProgramModeServer) +@@ -1512,9 +1512,9 @@ + // run the script (ignore errors and continue no matter what + // the outcome of the script is) + std::string script = preflightScriptPath.absolutePath(); +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + Error error = runCommand(script, +- core::system::ProcessOptions(), ++ ::core::system::ProcessOptions(), + &result); + if (error) + { +@@ -1548,7 +1548,7 @@ + + // execute core initialization functions + using boost::bind; +- using namespace core::system; ++ using namespace ::core::system; + using namespace session::module_context; + ExecBlock initialize ; + initialize.addFunctions() +@@ -1851,7 +1851,7 @@ + // read file contents + FilePath filePath(file); + std::string fileContents; +- Error readError = core::readStringFromFile(filePath, &fileContents); ++ Error readError = ::core::readStringFromFile(filePath, &fileContents); + if (readError) + { + LOG_ERROR(readError); +@@ -1892,7 +1892,7 @@ + + // write the content back to the file (append newline expected by R) + editedFileContents += "\n"; +- Error writeError = core::writeStringToFile(filePath, editedFileContents); ++ Error writeError = ::core::writeStringToFile(filePath, editedFileContents); + if (writeError) + { + LOG_ERROR(writeError); +@@ -2079,7 +2079,7 @@ + session::clientEventQueue().add(browseUrlEvent(url)); + } + +-void rBrowseFile(const core::FilePath& filePath) ++void rBrowseFile(const ::core::FilePath& filePath) + { + // see if any of our handlers want to take it + for (std::vector::const_iterator +@@ -2211,7 +2211,7 @@ + + // terminate all children of the provided process supervisor + // and then wait a brief period to attempt to reap the child +-void terminateAllChildren(core::system::ProcessSupervisor* pSupervisor, ++void terminateAllChildren(::core::system::ProcessSupervisor* pSupervisor, + const ErrorLocation& location) + { + // send kill signal +@@ -2221,7 +2221,7 @@ + if (!pSupervisor->wait(boost::posix_time::milliseconds(10), + boost::posix_time::milliseconds(1000))) + { +- core::log::logWarningMessage( ++ ::core::log::logWarningMessage( + "Process supervisor did not terminate within 1 second", + location); + } +@@ -2361,7 +2361,7 @@ + } + } + +-void ensureRLibsUser(const core::FilePath& userHomePath, ++void ensureRLibsUser(const ::core::FilePath& userHomePath, + const std::string& rLibsUser) + { + FilePath rLibsUserPath = FilePath::resolveAliasedPath(rLibsUser, +@@ -2398,7 +2398,7 @@ + if (result == ParentTerminationAbnormal) + { + LOG_ERROR_MESSAGE("Parent terminated"); +- core::system::abort(); ++ ::core::system::abort(); + } + else if (result == ParentTerminationNormal) + { +@@ -2593,7 +2593,7 @@ + + + Error registerAsyncRpcMethod(const std::string& name, +- const core::json::JsonRpcAsyncFunction& function) ++ const ::core::json::JsonRpcAsyncFunction& function) + { + s_jsonRpcMethods.insert( + std::make_pair(name, std::make_pair(false, function))); +@@ -2601,7 +2601,7 @@ + } + + Error registerRpcMethod(const std::string& name, +- const core::json::JsonRpcFunction& function) ++ const ::core::json::JsonRpcFunction& function) + { + s_jsonRpcMethods.insert( + std::make_pair(name, +@@ -2700,7 +2700,7 @@ + + bool registeredWaitForMethod(const std::string& method, + const ClientEvent& event, +- core::json::JsonRpcRequest* pRequest) ++ ::core::json::JsonRpcRequest* pRequest) + { + // enque the event which notifies the client we want input + module_context::enqueClientEvent(event); +@@ -2726,11 +2726,11 @@ + + namespace { + +-int sessionExitFailure(const core::Error& error, +- const core::ErrorLocation& location) ++int sessionExitFailure(const ::core::Error& error, ++ const ::core::ErrorLocation& location) + { + if (!error.expected()) +- core::log::logError(error, location); ++ ::core::log::logError(error, location); + + return EXIT_FAILURE; + } +@@ -2745,7 +2745,7 @@ + { + #if !defined(_WIN32) && !defined(__APPLE__) + // if no LANG environment variable is already defined +- if (core::system::getenv("LANG").empty()) ++ if (::core::system::getenv("LANG").empty()) + { + // try to read the LANG from the various places it might be defined + std::vector > langDefs; +@@ -2767,7 +2767,7 @@ + std::string value = vars[var]; + if (!value.empty()) + { +- core::system::setenv("LANG", value); ++ ::core::system::setenv("LANG", value); + break; + } + } +@@ -2777,11 +2777,11 @@ + + std::string ctypeEnvName() + { +- if (!core::system::getenv("LC_ALL").empty()) ++ if (!::core::system::getenv("LC_ALL").empty()) + return "LC_ALL"; +- if (!core::system::getenv("LC_CTYPE").empty()) ++ if (!::core::system::getenv("LC_CTYPE").empty()) + return "LC_CTYPE"; +- if (!core::system::getenv("LANG").empty()) ++ if (!::core::system::getenv("LANG").empty()) + return "LANG"; + return "LC_CTYPE"; + } +@@ -2807,7 +2807,7 @@ + return true; + #else + std::string name = ctypeEnvName(); +- std::string ctype = core::system::getenv(name); ++ std::string ctype = ::core::system::getenv(name); + + if (boost::regex_search(ctype, boost::regex("UTF-8$"))) + return true; +@@ -2839,7 +2839,7 @@ + { + if (setlocale(LC_CTYPE, newCType.c_str())) + { +- core::system::setenv(name, newCType); ++ ::core::system::setenv(name, newCType); + setlocale(LC_CTYPE, ""); + return true; + } +@@ -2861,11 +2861,11 @@ + // initialize log so we capture all errors including ones which occur + // reading the config file (if we are in desktop mode then the log + // will get re-initialized below) +- initializeSystemLog("rsession-" + core::system::username(), +- core::system::kLogLevelWarning); ++ initializeSystemLog("rsession-" + ::core::system::username(), ++ ::core::system::kLogLevelWarning); + + // ignore SIGPIPE +- Error error = core::system::ignoreSignal(core::system::SigPipe); ++ Error error = ::core::system::ignoreSignal(::core::system::SigPipe); + if (error) + LOG_ERROR(error); + +@@ -2884,7 +2884,7 @@ + return status.exitCode() ; + + // reflect stderr logging +- core::system::setLogToStderr(options.logStderr()); ++ ::core::system::setLogToStderr(options.logStderr()); + + // initialize monitor + monitor::initializeMonitorClient(kMonitorSocketPath, +@@ -2893,7 +2893,7 @@ + // register monitor log writer (but not in standalone mode) + if (!options.standalone()) + { +- core::system::addLogWriter(monitor::client().createLogWriter( ++ ::core::system::addLogWriter(monitor::client().createLogWriter( + options.programIdentity())); + } + +@@ -2907,12 +2907,12 @@ + if (options.verifyInstallation()) + { + initializeStderrLog(options.programIdentity(), +- core::system::kLogLevelWarning); ++ ::core::system::kLogLevelWarning); + } + else + { + initializeLog(options.programIdentity(), +- core::system::kLogLevelWarning, ++ ::core::system::kLogLevelWarning, + options.userLogPath()); + } + } +@@ -2927,27 +2927,27 @@ + + // set the rstudio environment variable so code can check for + // whether rstudio is running +- core::system::setenv("RSTUDIO", "1"); ++ ::core::system::setenv("RSTUDIO", "1"); + + // set the rstudio user identity environment variable (can differ from + // username in debug configurations). this is provided so that + // rpostback knows what local stream to connect back to +- core::system::setenv(kRStudioUserIdentity, options.userIdentity()); ++ ::core::system::setenv(kRStudioUserIdentity, options.userIdentity()); + if (desktopMode) + { + // do the same for port number, for rpostback in rdesktop configs +- core::system::setenv(kRSessionPortNumber, options.wwwPort()); ++ ::core::system::setenv(kRSessionPortNumber, options.wwwPort()); + } + + // set the standalone port if we are running in standalone mode + if (options.standalone()) + { +- core::system::setenv(kRSessionStandalonePortNumber, options.wwwPort()); ++ ::core::system::setenv(kRSessionStandalonePortNumber, options.wwwPort()); + } + + // ensure we aren't being started as a low (priviliged) account + if (serverMode && +- core::system::currentUserIsPrivilleged(options.minimumUserId())) ++ ::core::system::currentUserIsPrivilleged(options.minimumUserId())) + { + Error error = systemError(boost::system::errc::permission_denied, + ERROR_LOCATION); +@@ -2957,14 +2957,14 @@ + #ifdef RSTUDIO_SERVER + if (serverMode) + { +- Error error = core::system::crypto::rsaInit(); ++ Error error = ::core::system::crypto::rsaInit(); + if (error) + LOG_ERROR(error); + } + #endif + + // start the file monitor +- core::system::file_monitor::initialize(); ++ ::core::system::file_monitor::initialize(); + + // initialize client event queue. this must be done very early + // in main so that any other code which needs to enque an event +@@ -2973,13 +2973,13 @@ + + // detect parent termination + if (desktopMode) +- core::thread::safeLaunchThread(detectParentTermination); ++ ::core::thread::safeLaunchThread(detectParentTermination); + + // set the rpostback absolute path + FilePath rpostback = options.rpostbackPath() + .parent().parent() + .childPath("rpostback"); +- core::system::setenv( ++ ::core::system::setenv( + "RS_RPOSTBACK_PATH", + string_utils::utf8ToSystem(rpostback.absolutePath())); + +@@ -3041,9 +3041,9 @@ + + // install home and doc dir overrides if requested (for debugger mode) + if (!options.rHomeDirOverride().empty()) +- core::system::setenv("R_HOME", options.rHomeDirOverride()); ++ ::core::system::setenv("R_HOME", options.rHomeDirOverride()); + if (!options.rDocDirOverride().empty()) +- core::system::setenv("R_DOC_DIR", options.rDocDirOverride()); ++ ::core::system::setenv("R_DOC_DIR", options.rDocDirOverride()); + + // r options + r::session::ROptions rOptions ; +diff -ru rstudio-0.98.1103/src/cpp/session/SessionModuleContext.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionModuleContext.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionModuleContext.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionModuleContext.cpp 2015-03-08 22:23:10.448944005 +0100 +@@ -199,7 +199,7 @@ + if (!file.empty()) + { + FilePath filePath = module_context::resolveAliasedPath(file); +- Error error = core::system::makeFileHidden(filePath); ++ Error error = ::core::system::makeFileHidden(filePath); + if (error) + LOG_ERROR(error); + } +@@ -298,9 +298,9 @@ + } + + +-void onFilesChanged(const std::vector& changes) ++void onFilesChanged(const std::vector< ::core::system::FileChangeEvent>& changes) + { +- BOOST_FOREACH(const core::system::FileChangeEvent& fileChange, changes) ++ BOOST_FOREACH(const ::core::system::FileChangeEvent& fileChange, changes) + { + FilePath changedFilePath(fileChange.fileInfo().absolutePath()); + for (MonitoredScratchPaths::const_iterator +@@ -321,7 +321,7 @@ + boost::shared_ptr > monitoredPathTree() + { + boost::shared_ptr > pMonitoredTree(new tree()); +- core::system::FileScannerOptions options; ++ ::core::system::FileScannerOptions options; + options.recursive = true; + options.filter = monitoredScratchFilter; + Error scanError = scanFiles(FileInfo(monitoredParentPath()), +@@ -336,9 +336,9 @@ + bool scanForMonitoredPathChanges(boost::shared_ptr > pPrevTree) + { + // check for changes +- std::vector changes; ++ std::vector< ::core::system::FileChangeEvent> changes; + boost::shared_ptr > pCurrentTree = monitoredPathTree(); +- core::system::collectFileChangeEvents(pPrevTree->begin(), ++ ::core::system::collectFileChangeEvents(pPrevTree->begin(), + pPrevTree->end(), + pCurrentTree->begin(), + pCurrentTree->end(), +@@ -373,11 +373,11 @@ + void initializeMonitoredUserScratchDir() + { + // setup callbacks and register +- core::system::file_monitor::Callbacks cb; ++ ::core::system::file_monitor::Callbacks cb; + cb.onRegistrationError = onMonitoringError; + cb.onMonitoringError = onMonitoringError; + cb.onFilesChanged = onFilesChanged; +- core::system::file_monitor::registerMonitor( ++ ::core::system::file_monitor::registerMonitor( + monitoredParentPath(), + true, + monitoredScratchFilter, +@@ -692,7 +692,7 @@ + processSupervisor().poll(); + + // check for file monitor changes +- core::system::file_monitor::checkForChanges(); ++ ::core::system::file_monitor::checkForChanges(); + + // fire event + events().onBackgroundProcessing(isIdle); +@@ -870,14 +870,14 @@ + return true; + + #ifndef _WIN32 +- core::shell_utils::ShellCommand cmd("file"); ++ ::core::shell_utils::ShellCommand cmd("file"); + cmd << "--dereference"; + cmd << "--mime"; + cmd << "--brief"; + cmd << targetPath; +- core::system::ProcessResult result; +- Error error = core::system::runCommand(cmd, +- core::system::ProcessOptions(), ++ ::core::system::ProcessResult result; ++ Error error = ::core::system::runCommand(cmd, ++ ::core::system::ProcessOptions(), + &result); + if (error) + { +@@ -899,7 +899,7 @@ + + // read contents of file + std::string contents; +- Error error = core::readStringFromFile(targetPath, &contents); ++ Error error = ::core::readStringFromFile(targetPath, &contents); + if (error) + { + LOG_ERROR(error); +@@ -916,7 +916,7 @@ + + } + +-Error rBinDir(core::FilePath* pRBinDirPath) ++Error rBinDir(::core::FilePath* pRBinDirPath) + { + std::string rHomeBin; + r::exec::RFunction rHomeBinFunc("R.home", "bin"); +@@ -944,7 +944,7 @@ + return Success(); + } + +-shell_utils::ShellCommand rCmd(const core::FilePath& rBinDir) ++shell_utils::ShellCommand rCmd(const ::core::FilePath& rBinDir) + { + #ifdef _WIN32 + return shell_utils::ShellCommand(rBinDir.childPath("Rcmd.exe")); +@@ -1015,14 +1015,14 @@ + return error; + + // setup options and command +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + #ifdef _WIN32 + shell_utils::ShellCommand installCommand(rBinDir.childPath("R.exe")); + #else + shell_utils::ShellCommand installCommand(rBinDir.childPath("R")); + #endif + +- installCommand << core::shell_utils::EscapeFilesOnly; ++ installCommand << ::core::shell_utils::EscapeFilesOnly; + + // for packrat projects we execute the profile and set the working + // directory to the project directory; for other contexts we just +@@ -1034,11 +1034,11 @@ + else + { + installCommand << "--vanilla"; +- core::system::Options env; +- core::system::environment(&env); ++ ::core::system::Options env; ++ ::core::system::environment(&env); + std::string libPaths = libPathsString(); + if (!libPaths.empty()) +- core::system::setenv(&env, "R_LIBS", libPathsString()); ++ ::core::system::setenv(&env, "R_LIBS", libPathsString()); + options.environment = env; + } + +@@ -1053,10 +1053,10 @@ + + // add pakage path + installCommand << "\"" + pkgPath + "\""; +- core::system::ProcessResult result; ++ ::core::system::ProcessResult result; + + // run the command +- error = core::system::runCommand(installCommand, ++ error = ::core::system::runCommand(installCommand, + options, + &result); + +@@ -1074,7 +1074,7 @@ + } + + +-std::string packageNameForSourceFile(const core::FilePath& sourceFilePath) ++std::string packageNameForSourceFile(const ::core::FilePath& sourceFilePath) + { + // check whether we are in a package + FilePath sourceDir = sourceFilePath.parent(); +@@ -1158,7 +1158,7 @@ + + Error sourceModuleRFileWithResult(const std::string& rSourceFile, + const FilePath& workingDir, +- core::system::ProcessResult* pResult) ++ ::core::system::ProcessResult* pResult) + { + // R binary + FilePath rProgramPath; +@@ -1177,27 +1177,27 @@ + boost::format fmt("source('%1%')"); + FilePath modulesPath = session::options().modulesRSourcePath(); + FilePath srcFilePath = modulesPath.complete(rSourceFile); +- std::string srcPath = core::string_utils::utf8ToSystem( ++ std::string srcPath = ::core::string_utils::utf8ToSystem( + srcFilePath.absolutePath()); + std::string escapedSrcPath = string_utils::jsLiteralEscape(srcPath); + std::string cmd = boost::str(fmt % escapedSrcPath); + args.push_back(cmd); + + // options +- core::system::ProcessOptions options; ++ ::core::system::ProcessOptions options; + options.terminateChildren = true; + options.workingDir = workingDir; + + // allow child process to inherit our R_LIBS +- core::system::Options childEnv; +- core::system::environment(&childEnv); ++ ::core::system::Options childEnv; ++ ::core::system::environment(&childEnv); + std::string libPaths = libPathsString(); + if (!libPaths.empty()) +- core::system::setenv(&childEnv, "R_LIBS", libPaths); ++ ::core::system::setenv(&childEnv, "R_LIBS", libPaths); + options.environment = childEnv; + + // run the child +- return core::system::runProgram(rBin, args, "", options, pResult); ++ return ::core::system::runProgram(rBin, args, "", options, pResult); + } + + +@@ -1228,10 +1228,10 @@ + } + } + +-bool fileListingFilter(const core::FileInfo& fileInfo) ++bool fileListingFilter(const ::core::FileInfo& fileInfo) + { + // check extension for special file types which are always visible +- core::FilePath filePath(fileInfo.absolutePath()); ++ ::core::FilePath filePath(fileInfo.absolutePath()); + std::string ext = filePath.extensionLowerCase(); + std::string name = filePath.filename(); + if (ext == ".rprofile" || +@@ -1261,7 +1261,7 @@ + namespace { + // enque file changed event + void enqueFileChangedEvent( +- const core::system::FileChangeEvent& event, ++ const ::core::system::FileChangeEvent& event, + boost::shared_ptr pCtx) + { + // create file change object +@@ -1280,7 +1280,7 @@ + } + } // namespace + +-void enqueFileChangedEvent(const core::system::FileChangeEvent &event) ++void enqueFileChangedEvent(const ::core::system::FileChangeEvent &event) + { + FilePath filePath = FilePath(event.fileInfo().absolutePath()); + +@@ -1291,8 +1291,8 @@ + enqueFileChangedEvent(event, pCtx); + } + +-void enqueFileChangedEvents(const core::FilePath& vcsStatusRoot, +- const std::vector& events) ++void enqueFileChangedEvents(const ::core::FilePath& vcsStatusRoot, ++ const std::vector< ::core::system::FileChangeEvent>& events) + { + using namespace modules::source_control; + +@@ -1301,7 +1301,7 @@ + + // try to find the common parent of the events + FilePath commonParentPath = FilePath(events.front().fileInfo().absolutePath()).parent(); +- BOOST_FOREACH(const core::system::FileChangeEvent& event, events) ++ BOOST_FOREACH(const ::core::system::FileChangeEvent& event, events) + { + // if not within the common parent then revert to the vcs status root + if (!FilePath(event.fileInfo().absolutePath()).isWithin(commonParentPath)) +@@ -1316,7 +1316,7 @@ + fileDecorationContext(commonParentPath); + + // fire client events as necessary +- BOOST_FOREACH(const core::system::FileChangeEvent& event, events) ++ BOOST_FOREACH(const ::core::system::FileChangeEvent& event, events) + { + enqueFileChangedEvent(event, pCtx); + } +@@ -1406,7 +1406,7 @@ + } + } + +-std::string createFileUrl(const core::FilePath& filePath) ++std::string createFileUrl(const ::core::FilePath& filePath) + { + // determine url based on whether this is in ~ or not + std::string url ; +@@ -1425,7 +1425,7 @@ + } + + +-void showContent(const std::string& title, const core::FilePath& filePath) ++void showContent(const std::string& title, const ::core::FilePath& filePath) + { + // first provision a content url + std::string contentUrl = content_urls::provision(title, filePath); +@@ -1535,7 +1535,7 @@ + + core::system::ProcessSupervisor& processSupervisor() + { +- static core::system::ProcessSupervisor instance; ++ static ::core::system::ProcessSupervisor instance; + return instance; + } + +@@ -1593,8 +1593,8 @@ + // identifies this invocation. In the meantime, kick off the actual + // operation on a new thread. + +- std::string handle = core::system::generateUuid(true); +- core::thread::safeLaunchThread(bind(beginRpcHandler, ++ std::string handle = ::core::system::generateUuid(true); ++ ::core::thread::safeLaunchThread(bind(beginRpcHandler, + function, + request, + handle)); +@@ -1619,7 +1619,7 @@ + return url; + } + +-shell_utils::ShellCommand RCommand::buildRCmd(const core::FilePath& rBinDir) ++shell_utils::ShellCommand RCommand::buildRCmd(const ::core::FilePath& rBinDir) + { + #if defined(_WIN32) + shell_utils::ShellCommand rCmd(rBinDir.childPath("Rcmd.exe")); +@@ -1630,8 +1630,8 @@ + return rCmd; + } + +-core::Error recursiveCopyDirectory(const core::FilePath& fromDir, +- const core::FilePath& toDir) ++core::Error recursiveCopyDirectory(const ::core::FilePath& fromDir, ++ const ::core::FilePath& toDir) + { + using namespace string_utils; + r::exec::RFunction fileCopy("file.copy"); +diff -ru rstudio-0.98.1103/src/cpp/session/SessionModuleContextInternal.hpp rstudio-0.98.1103-fix/src/cpp/session/SessionModuleContextInternal.hpp +--- rstudio-0.98.1103/src/cpp/session/SessionModuleContextInternal.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionModuleContextInternal.hpp 2015-03-08 22:23:10.452944006 +0100 +@@ -39,8 +39,8 @@ + // suspend and resume + + void onSuspended(const r::session::RSuspendOptions& options, +- core::Settings* pPersistentState); +-void onResumed(const core::Settings& persistentState); ++ ::core::Settings* pPersistentState); ++void onResumed(const ::core::Settings& persistentState); + + // notify of backgound processing + void onBackgroundProcessing(bool isIdle); +diff -ru rstudio-0.98.1103/src/cpp/session/SessionOptions.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionOptions.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionOptions.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionOptions.cpp 2015-03-08 22:23:10.457944007 +0100 +@@ -55,12 +55,12 @@ + using namespace boost::program_options ; + + // get the shared secret +- monitorSharedSecret_ = core::system::getenv(kMonitorSharedSecretEnvVar); +- core::system::unsetenv(kMonitorSharedSecretEnvVar); ++ monitorSharedSecret_ = ::core::system::getenv(kMonitorSharedSecretEnvVar); ++ ::core::system::unsetenv(kMonitorSharedSecretEnvVar); + + // compute the resource path + FilePath resourcePath; +- Error error = core::system::installPath("..", argv[0], &resourcePath); ++ Error error = ::core::system::installPath("..", argv[0], &resourcePath); + if (error) + { + LOG_ERROR_MESSAGE("Unable to determine install path: "+error.summary()); +@@ -279,7 +279,7 @@ + "Path to pandoc binaries"); + + // user options (default user identity to current username) +- std::string currentUsername = core::system::username(); ++ std::string currentUsername = ::core::system::username(); + options_description user("user") ; + user.add_options() + (kUserIdentitySessionOption "," kUserIdentitySessionOptionShort, +@@ -297,7 +297,7 @@ + FilePath defaultConfigPath("/etc/rstudio/rsession.conf"); + std::string configFile = defaultConfigPath.exists() ? + defaultConfigPath.absolutePath() : ""; +- core::program_options::OptionsDescription optionsDesc("rsession", ++ ::core::program_options::OptionsDescription optionsDesc("rsession", + configFile); + + optionsDesc.commandLine.add(verify); +@@ -328,7 +328,7 @@ + optionsDesc.configFile.add(overlay); + + // read configuration +- ProgramStatus status = core::program_options::read(optionsDesc, argc,argv); ++ ProgramStatus status = ::core::program_options::read(optionsDesc, argc,argv); + if (status.exit()) + return status; + +@@ -366,7 +366,7 @@ + LOG_ERROR(error); + return ProgramStatus::exitFailure(); + } +- core::system::setenv("R_USER", verifyInstallationHomeDir_); ++ ::core::system::setenv("R_USER", verifyInstallationHomeDir_); + } + } + +@@ -383,7 +383,7 @@ + // set HOME if we are in standalone mode (this enables us to reflect + // R_USER back into HOME on Linux) + if (standalone()) +- core::system::setenv("HOME", userHomePath_); ++ ::core::system::setenv("HOME", userHomePath_); + + // session timeout seconds is always -1 in desktop mode + if (programMode_ == kSessionProgramModeDesktop) +@@ -428,7 +428,7 @@ + resolvePandocPath(resourcePath, &pandocPath_); + + // shared secret with parent +- secret_ = core::system::getenv("RS_SHARED_SECRET"); ++ secret_ = ::core::system::getenv("RS_SHARED_SECRET"); + /* SECURITY: Need RS_SHARED_SECRET to be available to + rpostback. However, we really ought to communicate + it in a more secure manner than this, at least on +@@ -437,27 +437,27 @@ + levels) than others. For example, using a named pipe + with proper SACL to retrieve the shared secret, where + the name of the pipe is in an environment variable. */ +- //core::system::unsetenv("RS_SHARED_SECRET"); ++ //::core::system::unsetenv("RS_SHARED_SECRET"); + + // initial working dir override +- initialWorkingDirOverride_ = core::system::getenv(kRStudioInitialWorkingDir); +- core::system::unsetenv(kRStudioInitialWorkingDir); ++ initialWorkingDirOverride_ = ::core::system::getenv(kRStudioInitialWorkingDir); ++ ::core::system::unsetenv(kRStudioInitialWorkingDir); + + // initial environment file override +- initialEnvironmentFileOverride_ = core::system::getenv(kRStudioInitialEnvironment); +- core::system::unsetenv(kRStudioInitialEnvironment); ++ initialEnvironmentFileOverride_ = ::core::system::getenv(kRStudioInitialEnvironment); ++ ::core::system::unsetenv(kRStudioInitialEnvironment); + + // initial project +- initialProjectPath_ = core::system::getenv(kRStudioInitialProject); +- core::system::unsetenv(kRStudioInitialProject); ++ initialProjectPath_ = ::core::system::getenv(kRStudioInitialProject); ++ ::core::system::unsetenv(kRStudioInitialProject); + + // limit rpc client uid + limitRpcClientUid_ = -1; +- std::string limitUid = core::system::getenv(kRStudioLimitRpcClientUid); ++ std::string limitUid = ::core::system::getenv(kRStudioLimitRpcClientUid); + if (!limitUid.empty()) + { +- limitRpcClientUid_ = core::safe_convert::stringTo(limitUid, -1); +- core::system::unsetenv(kRStudioLimitRpcClientUid); ++ limitRpcClientUid_ = ::core::safe_convert::stringTo(limitUid, -1); ++ ::core::system::unsetenv(kRStudioLimitRpcClientUid); + } + + // return status +diff -ru rstudio-0.98.1103/src/cpp/session/SessionPersistentState.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionPersistentState.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionPersistentState.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionPersistentState.cpp 2015-03-08 22:23:10.418944000 +0100 +@@ -72,7 +72,7 @@ + { + if (serverMode_) + { +- std::string newId = core::system::generateUuid(); ++ std::string newId = ::core::system::generateUuid(); + settings_.set(kActiveClientId, newId); + return newId; + } +diff -ru rstudio-0.98.1103/src/cpp/session/SessionSourceDatabase.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionSourceDatabase.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionSourceDatabase.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionSourceDatabase.cpp 2015-03-08 22:23:10.484944011 +0100 +@@ -321,7 +321,7 @@ + if (lastKnownWriteTime_ == 0) + return; + +- core::FilePath filePath = module_context::resolveAliasedPath(path_); ++ ::core::FilePath filePath = module_context::resolveAliasedPath(path_); + if (!filePath.exists()) + return; + +@@ -336,7 +336,7 @@ + if (path_.empty()) + return; + +- core::FilePath filePath = module_context::resolveAliasedPath(path_); ++ ::core::FilePath filePath = module_context::resolveAliasedPath(path_); + if (!filePath.exists()) + return; + +diff -ru rstudio-0.98.1103/src/cpp/session/SessionSourceDatabaseSupervisor.hpp rstudio-0.98.1103-fix/src/cpp/session/SessionSourceDatabaseSupervisor.hpp +--- rstudio-0.98.1103/src/cpp/session/SessionSourceDatabaseSupervisor.hpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionSourceDatabaseSupervisor.hpp 2015-03-08 22:23:10.434944003 +0100 +@@ -25,7 +25,7 @@ + namespace source_database { + namespace supervisor { + +-core::Error attachToSourceDatabase(core::FilePath* pSessionDir); ++core::Error attachToSourceDatabase(::core::FilePath* pSessionDir); + + core::Error detachFromSourceDatabase(); + +diff -ru rstudio-0.98.1103/src/cpp/session/SessionSSH.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionSSH.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionSSH.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionSSH.cpp 2015-03-08 22:23:10.476944010 +0100 +@@ -35,12 +35,12 @@ + env_.erase(name); + } + +-void ProcessOptionsCreator::addToPath(const core::FilePath& dir) ++void ProcessOptionsCreator::addToPath(const ::core::FilePath& dir) + { + pathDirs_.push_back(dir); + } + +-void ProcessOptionsCreator::setWorkingDirectory(const core::FilePath& dir) ++void ProcessOptionsCreator::setWorkingDirectory(const ::core::FilePath& dir) + { + workingDir_ = dir; + } +@@ -52,23 +52,23 @@ + + core::system::ProcessOptions ProcessOptionsCreator::processOptions() const + { +- core::system::ProcessOptions options = baseOptions_; ++ ::core::system::ProcessOptions options = baseOptions_; + + // Set up environment +- core::system::Options envOpts; +- core::system::environment(&envOpts); ++ ::core::system::Options envOpts; ++ ::core::system::environment(&envOpts); + typedef std::pair StringPair; + BOOST_FOREACH(StringPair var, env_) + { + if (var.second.empty()) +- core::system::unsetenv(&envOpts, var.first); ++ ::core::system::unsetenv(&envOpts, var.first); + else +- core::system::setenv(&envOpts, var.first, var.second); ++ ::core::system::setenv(&envOpts, var.first, var.second); + } + + if (!pathDirs_.empty()) + { +- std::string path = core::system::getenv(envOpts, "PATH"); ++ std::string path = ::core::system::getenv(envOpts, "PATH"); + BOOST_FOREACH(FilePath pathDir, pathDirs_) + { + #ifdef _WIN32 +@@ -78,7 +78,7 @@ + #endif + path += pathDir.absolutePathNative(); + } +- core::system::setenv(&envOpts, "PATH", path); ++ ::core::system::setenv(&envOpts, "PATH", path); + } + + if (!workingDir_.empty()) +diff -ru rstudio-0.98.1103/src/cpp/session/SessionUserSettings.cpp rstudio-0.98.1103-fix/src/cpp/session/SessionUserSettings.cpp +--- rstudio-0.98.1103/src/cpp/session/SessionUserSettings.cpp 2015-03-06 23:12:51.000000000 +0100 ++++ rstudio-0.98.1103-fix/src/cpp/session/SessionUserSettings.cpp 2015-03-08 22:23:10.397943997 +0100 +@@ -114,13 +114,13 @@ + + // make sure we have a context id + if (contextId().empty()) +- setContextId(core::system::generateShortenedUuid()); ++ setContextId(::core::system::generateShortenedUuid()); + + return Success(); + } + + void UserSettings::onSettingsFileChanged( +- const core::system::FileChangeEvent& changeEvent) ++ const ::core::system::FileChangeEvent& changeEvent) + { + // ensure this is for our target file + if (settingsFilePath_.absolutePath() != +@@ -197,14 +197,14 @@ + { + std::string value = settings_.get(kUiPrefs, "{}"); + json::Value jsonValue; +- bool success = core::json::parse(value, &jsonValue); ++ bool success = ::core::json::parse(value, &jsonValue); + if (success) + return jsonValue.get_obj(); + else + return json::Object(); + } + +-void UserSettings::setUiPrefs(const core::json::Object& prefsObject) ++void UserSettings::setUiPrefs(const ::core::json::Object& prefsObject) + { + std::ostringstream output; + json::writeFormatted(prefsObject, output); +@@ -266,7 +266,7 @@ + std::string spellingLanguage = readPref(prefs, "spelling_dictionary_language", "en_US"); + pSpellingLanguage_.reset(new std::string(spellingLanguage)); + +- json::Array spellingCustomDicts = readPref(prefs, "spelling_custom_dictionaries", core::json::Array()); ++ json::Array spellingCustomDicts = readPref< ::core::json::Array>(prefs, "spelling_custom_dictionaries", ::core::json::Array()); + pSpellingCustomDicts_.reset(new json::Array(spellingCustomDicts)); + + bool handleErrorsInUserCodeOnly = readPref(prefs, "handle_errors_in_user_code_only", true); diff --git a/rstudio.spec b/rstudio.spec new file mode 100644 index 0000000..34745e2 --- /dev/null +++ b/rstudio.spec @@ -0,0 +1,144 @@ +%global ver_major 0 +%global ver_minor 98 +%global ver_patch 1103 + +Name: rstudio +Version: %{ver_major}.%{ver_minor}.%{ver_patch} +Release: 1mamba +Summary: RStudio is an integrated development environment (IDE) for R +Group: Graphical Desktop/Applications/Scientific +Vendor: openmamba +Distribution: openmamba +Packager: Davide Madrisan +URL: http://www.rstudio.org +Source0: https://github.com/rstudio/rstudio/tarball/v%{version}/%{name}-%{version}.tar.gz +# see: dependencies/common/install-common +# ./install-gwt +Source1: https://s3.amazonaws.com/rstudio-buildtools/gwt-2.6.0.zip +Source2: https://s3.amazonaws.com/rstudio-buildtools/gin-1.5.zip +# ./install-dictionaries +Source3: https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip +# ./install-mathjax +Source4: https://s3.amazonaws.com/rstudio-buildtools/mathjax-23.zip +# ./install-pandoc +Source5: https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.12.4.2.zip +# patch created by executing the command: +# find . \( -name *.cpp -or -name *.hpp \) -exec sed \ +# -e 's@= 2.11.1 +#BuildRequires: java-junit3, java-junit48 +#BuildRequires: jdk +Requires: R >= 2.11.1 +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +RStudio is an integrated development environment (IDE) for the R programming language. + +%prep +%setup -q +%patch0 -p1 +install -d src/gwt/lib/gwt +install -d src/gwt/lib/gin/1.5 +unzip -qq %{S:1} -d src/gwt/lib/gwt +unzip -qq %{S:2} -d src/gwt/lib/gin/1.5 +mv src/gwt/lib/gwt/gwt-2.6.0 src/gwt/lib/gwt/2.6.0 + +install -d dependencies/common/dictionaries +unzip -qq %{S:3} -d dependencies/common/dictionaries +unzip -qq %{S:4} -d dependencies/common + +# see: src/cpp/session/CMakeLists.txt +install -d dependencies/common/{pandoc,rmarkdown,packrat,shinyapps} + +%build +export PATH="$PATH:%{_datadir}/ant/bin" +export RSTUDIO_VERSION_MAJOR=%{ver_major} +export RSTUDIO_VERSION_MINOR=%{ver_minor} +export RSTUDIO_VERSION_PATCH=%{ver_patch} +%cmake -d build \ + -DRSTUDIO_TARGET=Desktop \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} + +BOOST_SIGNALS_NO_DEPRECATION_WARNING=1; \ +export BOOST_SIGNALS_NO_DEPRECATION_WARNING \ +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +make -C build install/fast DESTDIR=%{buildroot} + +install -d %{buildroot}%{_bindir} +ln -s %{_libdir}/%{name}/bin/rstudio %{buildroot}%{_bindir} + +# remove unpackaged files +rm -f %{buildroot}%{_libdir}/rstudio/{COPYING,INSTALL,NOTICE,README.md,SOURCE,VERSION} +rm -f %{buildroot}%{_libdir}/rstudio/www/.gitignore + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/%{name} +%dir %{_libdir}/rstudio +%{_libdir}/rstudio/rstudio.png +%{_libdir}/rstudio/R/ +%{_libdir}/rstudio/bin/ +%{_libdir}/rstudio/resources/ +# %{_libdir}/rstudio/resources/dictionaries +# %{_libdir}/rstudio/resources/mathjax-23 +# %{_libdir}/rstudio/resources/pdfjs +# %{_libdir}/rstudio/resources/presentation +# %{_libdir}/rstudio/resources/templates +%{_libdir}/rstudio/www/ +%{_libdir}/rstudio/www-symbolmaps/ +%{_datadir}/applications/rstudio.desktop +%{_datadir}/icons/hicolor/*/apps/rstudio.png +%{_datadir}/icons/hicolor/*/mimetypes/application-x-r-*.png +%{_datadir}/mime/packages/rstudio.xml +%{_datadir}/pixmaps/rstudio.png +%doc COPYING + +%changelog +* Sun Mar 08 2015 Davide Madrisan 0.98.1103-1mamba +- update to 0.98.1103 + +* Sun Nov 09 2014 Davide Madrisan 0.98.1091-1mamba +- package created by autospec