From cce1c28bcecec87f34983599441ce16f7c2cf829 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 1 Nov 2012 18:20:06 +0100 Subject: Migrated build system to CMake. Conditional file compilation. Automatic selection of platform handler. --- src/platforms/windows/windowsFile.cpp | 12 ++++++++---- src/platforms/windows/windowsHandler.cpp | 11 ++++++++++- src/platforms/windows/windowsSocket.cpp | 10 ++++++++-- 3 files changed, 26 insertions(+), 7 deletions(-) (limited to 'src/platforms/windows') diff --git a/src/platforms/windows/windowsFile.cpp b/src/platforms/windows/windowsFile.cpp index 5da786e5..7a70d364 100644 --- a/src/platforms/windows/windowsFile.cpp +++ b/src/platforms/windows/windowsFile.cpp @@ -21,6 +21,12 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_FILESYSTEM_FEATURES + + #include "vmime/platforms/windows/windowsFile.hpp" #include @@ -30,9 +36,6 @@ #include "vmime/utility/stringUtils.hpp" -#if VMIME_HAVE_FILESYSTEM_FEATURES - - namespace vmime { namespace platforms { namespace windows { @@ -546,4 +549,5 @@ void windowsFileWriterOutputStream::flush() } // vmime -#endif // VMIME_HAVE_FILESYSTEM_FEATURES +#endif // VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_FILESYSTEM_FEATURES + diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp index 1a37c839..1ed4025b 100644 --- a/src/platforms/windows/windowsHandler.cpp +++ b/src/platforms/windows/windowsHandler.cpp @@ -21,9 +21,14 @@ // the GNU General Public License cover the whole combination. // -#include "vmime/platforms/windows/windowsHandler.hpp" #include "vmime/config.hpp" + +#if VMIME_PLATFORM_IS_WINDOWS + + +#include "vmime/platforms/windows/windowsHandler.hpp" + #include #include #include @@ -270,3 +275,7 @@ void windowsHandler::wait() const } // posix } // platforms } // vmime + + +#endif // VMIME_PLATFORM_IS_WINDOWS + diff --git a/src/platforms/windows/windowsSocket.cpp b/src/platforms/windows/windowsSocket.cpp index 430c8ea0..27cbcaa7 100644 --- a/src/platforms/windows/windowsSocket.cpp +++ b/src/platforms/windows/windowsSocket.cpp @@ -21,13 +21,18 @@ // the GNU General Public License cover the whole combination. // +#include "vmime/config.hpp" + + +#if VMIME_PLATFORM_IS_WINDOWS && VMIME_HAVE_MESSAGING_FEATURES + + #pragma warning(disable: 4267) #include "vmime/platforms/windows/windowsSocket.hpp" #include "vmime/exception.hpp" -#if VMIME_HAVE_MESSAGING_FEATURES namespace vmime { namespace platforms { @@ -193,4 +198,5 @@ ref windowsSocketFactory::create(ref