Changeset - d363189d97b8
[Not reviewed]
0 4 0
Vitaly Takmazov - 8 years ago 2017-06-14 18:40:45
vitalyster@gmail.com
MSVC compatibility fixes
4 files changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
cmake_modules/SwiftenConfig.cmake
Show inline comments
 
FIND_LIBRARY(SWIFTEN_LIBRARY NAMES Swiften Swiften3 HINTS ../lib)
 
FIND_LIBRARY(SWIFTEN_LIBRARY NAMES Swiften Swiften3 Swiften4 HINTS ../lib)
 
FIND_PATH(SWIFTEN_INCLUDE_DIR NAMES "Swiften/Swiften.h" PATH_SUFFIXES libSwiften Swiften HINTS ../include)
 

	
 
if( SWIFTEN_LIBRARY AND SWIFTEN_INCLUDE_DIR )
 
	find_program(SWIFTEN_CONFIG_EXECUTABLE NAMES swiften-config DOC "swiften-config executable" HINTS ../bin)
 
	set( SWIFTEN_CFLAGS "" )
 
	if (SWIFTEN_CONFIG_EXECUTABLE)
 
@@ -37,13 +37,13 @@ if( SWIFTEN_LIBRARY AND SWIFTEN_INCLUDE_DIR )
 
			COMMAND ${SWIFTEN_CONFIG_EXECUTABLE} --version
 
			OUTPUT_VARIABLE SWIFTEN_VERSION)
 
		string(REGEX REPLACE "[\r\n]"                  " " SWIFTEN_VERSION "${SWIFTEN_VERSION}")
 
		string(REGEX REPLACE " +$"                     ""  SWIFTEN_VERSION "${SWIFTEN_VERSION}")
 
		string(REGEX REPLACE "swiften-config "          ""  SWIFTEN_VERSION "${SWIFTEN_VERSION}")
 

	
 
		if("${SWIFTEN_VERSION}" STRGREATER "4")
 
		if("${SWIFTEN_VERSION}" STRGREATER "4" AND NOT MSVC)
 
			message( STATUS "Found Swiften > 4 requesting C++11")
 
			add_definitions(-std=c++11)
 
		endif()
 
		
 
		set( SWIFTEN_FOUND 1 )
 
	else()
include/Swiften/TLS/Schannel/SchannelServerContext.h
Show inline comments
 
@@ -7,12 +7,13 @@
 
#pragma once
 

	
 
#include "Swiften/TLS/TLSServerContext.h"
 
#include "Swiften/TLS/Schannel/SchannelUtil.h"
 
#include <Swiften/TLS/CertificateWithKey.h>
 
#include "Swiften/Base/ByteArray.h"
 
#include "Swiften/SwiftenCompat.h"
 

	
 
#define SECURITY_WIN32
 
#include <Windows.h>
 
#include <Schannel.h>
 
#include <security.h>
 
#include <schnlsp.h>
tests/libtransport/HTTPRequest.cpp
Show inline comments
 
@@ -17,12 +17,16 @@
 
using namespace Transport;
 

	
 
#if !HAVE_SWIFTEN_3
 
#define get_value_or(X) substr()
 
#endif
 

	
 
#ifdef _MSC_VER
 
#define sleep Sleep
 
#endif
 

	
 
class HTTPRequestTest : public CPPUNIT_NS :: TestFixture, public BasicTest {
 
	CPPUNIT_TEST_SUITE(HTTPRequestTest);
 
	CPPUNIT_TEST(GETThreadPool);
 
	CPPUNIT_TEST_SUITE_END();
 

	
 
	public:
tests/libtransport/main.cpp
Show inline comments
 
@@ -7,18 +7,18 @@
 
#include <cppunit/BriefTestProgressListener.h>
 
#ifdef WITH_LOG4CXX
 
#include "log4cxx/logger.h"
 
#include "log4cxx/fileappender.h"
 
#include "log4cxx/patternlayout.h"
 
#include "log4cxx/propertyconfigurator.h"
 
using namespace log4cxx;
 
#endif
 

	
 
#include "transport/protocol.pb.h"
 
#include "transport/HTTPRequest.h"
 

	
 
using namespace log4cxx;
 
#endif
 

	
 

	
 
int main (int argc, char* argv[])
 
{
 
#ifdef WITH_LOG4CXX
 
	LoggerPtr root = Logger::getRootLogger();
0 comments (0 inline, 0 general)