porting rev. 1994 from 1.4.4

This commit is contained in:
Aleksandar Fabijanic 2012-09-08 02:54:42 +00:00
parent 889f420a0b
commit 3f23af80c3
3 changed files with 104 additions and 103 deletions

View File

@ -46,6 +46,7 @@ Release 1.4.4p1 (2012-??-??)
- fixed SF# 3558012 Compilation fails when building with -ansi or -std=c++0x
- fixed SF# 3563517 Get rid of loss-of-precision warnings on x64 MacOS
- fixed SF#3562244: Portability fix for AF_LINK
- fixed SF #3562400: DatagramSocketImpl'comment is faile
Release 1.4.4 (2012-09-03)

View File

@ -482,15 +482,15 @@ private:
#else
class DefaultDirectoryWatcherStrategy: public DirectoryWatcherStrategy
class PollingDirectoryWatcherStrategy: public DirectoryWatcherStrategy
{
public:
DefaultDirectoryWatcherStrategy(DirectoryWatcher& owner):
PollingDirectoryWatcherStrategy(DirectoryWatcher& owner):
DirectoryWatcherStrategy(owner)
{
}
~DefaultDirectoryWatcherStrategy()
~PollingDirectoryWatcherStrategy()
{
}
@ -586,7 +586,7 @@ void DirectoryWatcher::init()
#elif POCO_OS == POCO_OS_MAC_OS_X || POCO_OS == POCO_OS_FREE_BSD
_pStrategy = new BSDDirectoryWatcherStrategy(*this);
#else
_pStrategy = new DefaultDirectoryWatcherStrategy(*this);
_pStrategy = new PollingDirectoryWatcherStrategy(*this);
#endif
_thread.start(*this);
}

View File

@ -433,36 +433,36 @@ void FileImpl::handleLastErrorImpl(const std::string& path)
switch (errno)
{
case EIO:
throw IOException(path);
throw IOException(path, errno);
case EPERM:
throw FileAccessDeniedException("insufficient permissions", path);
throw FileAccessDeniedException("insufficient permissions", path, errno);
case EACCES:
throw FileAccessDeniedException(path);
throw FileAccessDeniedException(path, errno);
case ENOENT:
throw FileNotFoundException(path);
throw FileNotFoundException(path, errno);
case ENOTDIR:
throw OpenFileException("not a directory", path);
throw OpenFileException("not a directory", path, errno);
case EISDIR:
throw OpenFileException("not a file", path);
throw OpenFileException("not a file", path, errno);
case EROFS:
throw FileReadOnlyException(path);
throw FileReadOnlyException(path, errno);
case EEXIST:
throw FileExistsException(path);
throw FileExistsException(path, errno);
case ENOSPC:
throw FileException("no space left on device", path);
throw FileException("no space left on device", path, errno);
case EDQUOT:
throw FileException("disk quota exceeded", path);
throw FileException("disk quota exceeded", path, errno);
#if !defined(_AIX)
case ENOTEMPTY:
throw FileException("directory not empty", path);
throw FileException("directory not empty", path, errno);
#endif
case ENAMETOOLONG:
throw PathSyntaxException(path);
throw PathSyntaxException(path, errno);
case ENFILE:
case EMFILE:
throw FileException("too many open files", path);
throw FileException("too many open files", path, errno);
default:
throw FileException(std::strerror(errno), path);
throw FileException(std::strerror(errno), path, errno);
}
}