aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2004-12-18 11:06:05 +0000
committerVincent Richard <[email protected]>2004-12-18 11:06:05 +0000
commit835cb4a8edc532153b5bb2a945f36eb6928e1186 (patch)
tree65c509437404b6f486695f769c73398c31d23fef
parentAdded #ifdefs's to fix bugs when compiling without messaging or file-system s... (diff)
downloadvmime-835cb4a8edc532153b5bb2a945f36eb6928e1186.tar.gz
vmime-835cb4a8edc532153b5bb2a945f36eb6928e1186.zip
Added #ifdefs's to fix bugs when compiling without messaging or file-system support.
-rw-r--r--src/platforms/posix/handler.cpp12
-rw-r--r--src/platforms/posix/handler.hpp5
2 files changed, 15 insertions, 2 deletions
diff --git a/src/platforms/posix/handler.cpp b/src/platforms/posix/handler.cpp
index f2861584..35f0a21b 100644
--- a/src/platforms/posix/handler.cpp
+++ b/src/platforms/posix/handler.cpp
@@ -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
}
diff --git a/src/platforms/posix/handler.hpp b/src/platforms/posix/handler.hpp
index 145595b2..252d45d3 100644
--- a/src/platforms/posix/handler.hpp
+++ b/src/platforms/posix/handler.hpp
@@ -69,8 +69,13 @@ public:
private:
+#if VMIME_HAVE_MESSAGING_FEATURES
posixSocketFactory* m_socketFactory;
+#endif
+
+#if VMIME_HAVE_FILESYSTEM_FEATURES
posixFileSystemFactory* m_fileSysFactory;
+#endif
};