summaryrefslogtreecommitdiff
path: root/lib/common/Utils.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-03 00:25:52 +0100
committerChris Wilson <chris+github@qwirx.com>2016-09-09 20:54:12 +0100
commit98a6ad72ee819774a398440055abd87bc44e9ba0 (patch)
tree55a5c7eff8deaab2ab7d44ed0357576aa0687a96 /lib/common/Utils.cpp
parent11a8c444875d8b7912fa07bdc3854e3adb27aa4e (diff)
Fix Unix compilation using CMake.
Add platform detection that's compatible with the old buildsystem and its m4 autoconfigury. Make Travis build and test using CMake as a separate target. Remove unused function BoxGetTemporaryDirectoryName() to fixes compile using CMake on Unix.
Diffstat (limited to 'lib/common/Utils.cpp')
-rw-r--r--lib/common/Utils.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp
index 4325dd88..0915f29a 100644
--- a/lib/common/Utils.cpp
+++ b/lib/common/Utils.cpp
@@ -381,30 +381,3 @@ std::string FormatUsageLineStart(const std::string& rName,
return result.str();
}
-std::string BoxGetTemporaryDirectoryName()
-{
-#ifdef WIN32
- // http://msdn.microsoft.com/library/default.asp?
- // url=/library/en-us/fileio/fs/creating_and_using_a_temporary_file.asp
-
- DWORD dwRetVal;
- char lpPathBuffer[1024];
- DWORD dwBufSize = sizeof(lpPathBuffer);
-
- // Get the temp path.
- dwRetVal = GetTempPath(dwBufSize, // length of the buffer
- lpPathBuffer); // buffer for path
- if (dwRetVal > dwBufSize)
- {
- THROW_EXCEPTION(CommonException, TempDirPathTooLong)
- }
-
- return std::string(lpPathBuffer);
-#elif defined TEMP_DIRECTORY_NAME
- return std::string(TEMP_DIRECTORY_NAME);
-#else
- #error non-static temporary directory names not supported yet
-#endif
-}
-
-