Added #ifdefs's to fix bugs when compiling without messaging or file-system support.

This commit is contained in:
Vincent Richard 2004-12-18 11:06:05 +00:00
parent f31b224aa0
commit 835cb4a8ed
2 changed files with 15 additions and 2 deletions

View File

@ -40,16 +40,24 @@ namespace posix {
posixHandler::posixHandler()
: m_socketFactory(new posixSocketFactory()),
m_fileSysFactory(new posixFileSystemFactory())
{
#if VMIME_HAVE_MESSAGING_FEATURES
m_socketFactory = new posixSocketFactory();
#endif
#if VMIME_HAVE_FILESYSTEM_FEATURES
m_fileSysFactory = new posixFileSystemFactory();
#endif
}
posixHandler::~posixHandler()
{
#if VMIME_HAVE_MESSAGING_FEATURES
delete (m_socketFactory);
#endif
#if VMIME_HAVE_FILESYSTEM_FEATURES
delete (m_fileSysFactory);
#endif
}

View File

@ -69,8 +69,13 @@ public:
private:
#if VMIME_HAVE_MESSAGING_FEATURES
posixSocketFactory* m_socketFactory;
#endif
#if VMIME_HAVE_FILESYSTEM_FEATURES
posixFileSystemFactory* m_fileSysFactory;
#endif
};