From 3feb7cc3f014bf1b2806b3b6819d80d684434e8f Mon Sep 17 00:00:00 2001 From: jhurst Date: Mon, 7 Mar 2011 06:46:37 +0000 Subject: *** empty log message *** --- src/KM_fileio.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/KM_fileio.cpp') diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index b9257ab..0bc8b8e 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -343,7 +343,7 @@ Kumu::PathMakeAbsolute(const std::string& Path, char separator) return Path; char cwd_buf [MaxFilePath]; - if ( getcwd(cwd_buf, MaxFilePath) == 0 ) + if ( _getcwd(cwd_buf, MaxFilePath) == 0 ) { DefaultLogSink().Error("Error retrieving current working directory."); return ""; @@ -649,7 +649,7 @@ Kumu::FileReader::OpenRead(const char* filename) const // suppress popup window on error UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - const_cast(this)->m_Handle = ::CreateFile(filename, + const_cast(this)->m_Handle = ::CreateFileA(filename, (GENERIC_READ), // open for reading FILE_SHARE_READ, // share for reading NULL, // no security @@ -774,7 +774,7 @@ Kumu::FileWriter::OpenWrite(const char* filename) // suppress popup window on error UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - m_Handle = ::CreateFile(filename, + m_Handle = ::CreateFileA(filename, (GENERIC_WRITE|GENERIC_READ), // open for reading FILE_SHARE_READ, // share for reading NULL, // no security @@ -1413,7 +1413,7 @@ Kumu::CreateDirectoriesInPath(const std::string& Path) if ( ! PathIsDirectory(tmp_path) ) { #ifdef KM_WIN32 - if ( mkdir(tmp_path.c_str()) != 0 ) + if ( _mkdir(tmp_path.c_str()) != 0 ) #else // KM_WIN32 if ( mkdir(tmp_path.c_str(), 0775) != 0 ) #endif // KM_WIN32 @@ -1433,7 +1433,7 @@ Kumu::CreateDirectoriesInPath(const std::string& Path) Result_t Kumu::DeleteFile(const std::string& filename) { - if ( unlink(filename.c_str()) == 0 ) + if ( _unlink(filename.c_str()) == 0 ) return RESULT_OK; switch ( errno ) @@ -1486,7 +1486,7 @@ h__DeletePath(const std::string& pathname) } } - if ( rmdir(pathname.c_str()) != 0 ) + if ( _rmdir(pathname.c_str()) != 0 ) { switch ( errno ) { @@ -1533,7 +1533,7 @@ Kumu::FreeSpaceForPath(const std::string& path, Kumu::fsize_t& free_space, Kumu: ULARGE_INTEGER lTotalNumberOfBytes; ULARGE_INTEGER lTotalNumberOfFreeBytes; - BOOL fResult = ::GetDiskFreeSpaceEx(path.c_str(), NULL, &lTotalNumberOfBytes, &lTotalNumberOfFreeBytes); + BOOL fResult = ::GetDiskFreeSpaceExA(path.c_str(), NULL, &lTotalNumberOfBytes, &lTotalNumberOfFreeBytes); if (fResult) { free_space = static_cast(lTotalNumberOfFreeBytes.QuadPart); total_space = static_cast(lTotalNumberOfBytes.QuadPart); -- cgit v1.2.3