mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
Set cmake produced shared libraries numbering to standard scheme (trunk = 12)
Sync latest Foundation changes from 1.4.2
This commit is contained in:
@@ -44,10 +44,10 @@ namespace Poco {
|
||||
|
||||
std::string PathImpl::currentImpl()
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = GetCurrentDirectoryA(sizeof(buffer), buffer);
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = GetCurrentDirectoryA(sizeof(buffer), buffer);
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
{
|
||||
std::string result(buffer, n);
|
||||
if (result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
@@ -70,18 +70,18 @@ std::string PathImpl::homeImpl()
|
||||
|
||||
std::string PathImpl::tempImpl()
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = GetTempPathA(sizeof(buffer), buffer);
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
{
|
||||
n = GetLongPathNameA(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
|
||||
n = GetLongPathNameA(buffer, buffer, static_cast<DWORD>(sizeof buffer));
|
||||
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
|
||||
std::string result(buffer, n);
|
||||
if (result[n - 1] != '\\')
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
else throw SystemException("Cannot get temporary directory");
|
||||
result.append("\\");
|
||||
return result;
|
||||
}
|
||||
else throw SystemException("Cannot get temporary directory");
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,10 @@ std::string PathImpl::nullImpl()
|
||||
|
||||
std::string PathImpl::expandImpl(const std::string& path)
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = ExpandEnvironmentStringsA(path.c_str(), buffer, sizeof(buffer));
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
return std::string(buffer, n - 1);
|
||||
char buffer[MAX_PATH];
|
||||
DWORD n = ExpandEnvironmentStringsA(path.c_str(), buffer, sizeof(buffer));
|
||||
if (n > 0 && n < sizeof(buffer))
|
||||
return std::string(buffer, n - 1);
|
||||
else
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user