Set cmake produced shared libraries numbering to standard scheme (trunk = 12)

Sync latest Foundation changes from 1.4.2
This commit is contained in:
Marian Krivos
2011-09-15 08:31:51 +00:00
parent 54a7860bff
commit eb266f8a57
25 changed files with 270 additions and 292 deletions

View File

@@ -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;
}