Commit 7f62ff04 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58495 954022d7-b5bf-4e40-9824-e11837661b57
parent bf5beabc
......@@ -100,17 +100,16 @@ namespace OOX
{
bool CSystemUtility::CreateFile(const CString& strFileName)
{
BSTR strPath = strFileName.AllocSysString();
HANDLE hResult = ::CreateFile(strPath, GENERIC_READ, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
SysFreeString(strPath);
if (hResult == INVALID_HANDLE_VALUE)
return false;
if (!CloseHandle(hResult))
return false;
return true;
std::string path_string = stringWstingToUtf8String(strFileName);
FILE * pFile = fopen (path_string.c_str(), "wb");
if (NULL != pFile)
{
fclose (pFile);
return true;
}
return false;
}
bool CSystemUtility::IsFileExist(const CString& strFileName)
......
......@@ -9,7 +9,12 @@ DateTime::DateTime()
time_t oNow;
tm oLocal;
time( &oNow );
#ifdef _WIN32
localtime_s( &oLocal, &oNow );
#else
localtime_r( &oNow, &oLocal );
#endif
m_nYear = oLocal.tm_year + 1900;
m_nMonth = oLocal.tm_mon + 1;
......@@ -74,4 +79,4 @@ const int DateTime::ParseValue(const CString &sValue, const CString &sPatte
return _wtoi( sNumeric );
}
return 0;
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment