[xmltooling] 10/65: CPPXT-106 Start to make XMLTooling compile with VC14

Ferenc Wágner wferi-guest at moszumanska.debian.org
Thu Jun 30 13:07:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to branch debian/master
in repository xmltooling.

commit 0a9bb47c593098a461e066a107c630ef90c11269
Author: Rod Widdowson <rdw at steadingsoftware.com>
Date:   Mon May 2 11:01:15 2016 +0100

    CPPXT-106 Start to make XMLTooling compile with VC14
    
    https://issues.shibboleth.net/jira/browse/CPPXT-106
    
    This checkin fixes all the trivial issues with compilation,
    moving up from deprecated timezone to _timezone, a missed
    header include and supress a warning because std::exception
    isnt exported.
    
    This does not compile because of boost issues. (CPPXT-107)
    the next checkin will bodge that by excluding the failing modules.
---
 projects/vc14/xmltooling/xmltooling-lite.vcxproj    | 8 ++++++--
 projects/vc14/xmltooling/xmltooling.vcxproj         | 4 ++++
 projects/vc14/xmltoolingtest/xmltoolingtest.vcxproj | 8 ++++++--
 xmltooling/security/impl/PKIXPathValidator.cpp      | 6 +++++-
 xmltooling/util/DateTime.cpp                        | 5 ++++-
 xmltooling/util/Win32Threads.cpp                    | 1 +
 6 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/projects/vc14/xmltooling/xmltooling-lite.vcxproj b/projects/vc14/xmltooling/xmltooling-lite.vcxproj
index 2565b91..a6d94f9 100644
--- a/projects/vc14/xmltooling/xmltooling-lite.vcxproj
+++ b/projects/vc14/xmltooling/xmltooling-lite.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -106,6 +106,7 @@
       <BrowseInformation>true</BrowseInformation>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -136,6 +137,7 @@
       <BrowseInformation>true</BrowseInformation>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -158,6 +160,7 @@
       </PrecompiledHeaderFile>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -187,6 +190,7 @@
       </PrecompiledHeaderFile>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -294,4 +298,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/projects/vc14/xmltooling/xmltooling.vcxproj b/projects/vc14/xmltooling/xmltooling.vcxproj
index 6205832..2f8df29 100644
--- a/projects/vc14/xmltooling/xmltooling.vcxproj
+++ b/projects/vc14/xmltooling/xmltooling.vcxproj
@@ -104,6 +104,7 @@
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -132,6 +133,7 @@
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <ResourceCompile>
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -153,6 +155,7 @@
       </PrecompiledHeaderFile>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>wsock32.lib;log4shib1.lib;xerces-c_3.lib;xsec_1.lib;libeay32.lib;ssleay32.lib;libcurl5_imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -176,6 +179,7 @@
       </PrecompiledHeaderFile>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>wsock32.lib;log4shib1.lib;xerces-c_3.lib;xsec_1.lib;libeay32.lib;ssleay32.lib;libcurl5_imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
diff --git a/projects/vc14/xmltoolingtest/xmltoolingtest.vcxproj b/projects/vc14/xmltoolingtest/xmltoolingtest.vcxproj
index f25eca5..d33def9 100644
--- a/projects/vc14/xmltoolingtest/xmltoolingtest.vcxproj
+++ b/projects/vc14/xmltoolingtest/xmltoolingtest.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -99,6 +99,7 @@
       <BrowseInformation>true</BrowseInformation>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>xerces-c_3D.lib;xsec_1D.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -123,6 +124,7 @@
       <BrowseInformation>true</BrowseInformation>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>xerces-c_3D.lib;xsec_1D.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -139,6 +141,7 @@
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>xerces-c_3.lib;xsec_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -162,6 +165,7 @@
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4275</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>xerces-c_3.lib;xsec_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -441,4 +445,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/xmltooling/security/impl/PKIXPathValidator.cpp b/xmltooling/security/impl/PKIXPathValidator.cpp
index ce8d894..3ac8308 100644
--- a/xmltooling/security/impl/PKIXPathValidator.cpp
+++ b/xmltooling/security/impl/PKIXPathValidator.cpp
@@ -38,6 +38,7 @@
 #include <memory>
 #include <algorithm>
 #include <fstream>
+#include <time.h>
 #include <openssl/x509_vfy.h>
 #include <openssl/x509v3.h>
 #include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
@@ -94,8 +95,11 @@ namespace {
             t.tm_mon--;
 #if defined(HAVE_TIMEGM)
             return timegm(&t);
+#elif defined(WIN32)
+            // Windows
+            return mktime(&t) - _timezone;
 #else
-            // Windows, and hopefully most others...?
+            // Hopefully most others...?
             return mktime(&t) - timezone;
 #endif
         }
diff --git a/xmltooling/util/DateTime.cpp b/xmltooling/util/DateTime.cpp
index 64fe2eb..a118879 100644
--- a/xmltooling/util/DateTime.cpp
+++ b/xmltooling/util/DateTime.cpp
@@ -546,8 +546,11 @@ time_t DateTime::getEpoch(bool duration) const
         t.tm_isdst=0;
 #if defined(HAVE_TIMEGM)
         return timegm(&t);
+#elif defined(WIN32)
+        // Windows
+        return mktime(&t) - _timezone;
 #else
-        // Windows, and hopefully most others...?
+        // Hopefully most others...?
         return mktime(&t) - timezone;
 #endif
     }
diff --git a/xmltooling/util/Win32Threads.cpp b/xmltooling/util/Win32Threads.cpp
index 237c496..bd244cb 100644
--- a/xmltooling/util/Win32Threads.cpp
+++ b/xmltooling/util/Win32Threads.cpp
@@ -29,6 +29,7 @@
 #include "util/Threads.h"
 
 #include <algorithm>
+#include<xfunctional>
 
 #ifndef WIN32
 # error "This implementation is for WIN32 platforms."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git



More information about the Pkg-shibboleth-devel mailing list