MSVC 7.1 build fixes

This commit is contained in:
Aleksandar Fabijanic 2013-03-30 13:02:16 -05:00
parent 6719d3448f
commit 5cde6d34df
4 changed files with 44 additions and 15 deletions

View File

@ -48,6 +48,9 @@
namespace Poco { namespace Poco {
class Any;
namespace Dynamic { namespace Dynamic {
class Var; class Var;
@ -103,7 +106,11 @@ public:
return pHolder; return pHolder;
} }
private: // MSVC71 doesn't extend friendship to nested class (Any::Holder)
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSVC_VERSION > 71))
private:
#endif
PlaceholderT* pHolder; PlaceholderT* pHolder;
mutable unsigned char holder[SizeV + 1]; mutable unsigned char holder[SizeV + 1];

View File

@ -271,7 +271,7 @@ inline void BSONReader::read<Timestamp>(Timestamp& to)
{ {
Poco::Int64 value; Poco::Int64 value;
_reader >> value; _reader >> value;
to = Timestamp::fromEpochTime(value / 1000); to = Timestamp::fromEpochTime(static_cast<std::time_t>(value / 1000));
to += (value % 1000 * 1000); to += (value % 1000 * 1000);
} }

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
Name="SQLToMongo"
Version="7.10"
ProjectType="Visual C++" ProjectType="Visual C++"
Version="7.10"
Name="SQLToMongo"
ProjectGUID="{D0381ECF-E750-32DA-8EEF-92D56B172D15}" ProjectGUID="{D0381ECF-E750-32DA-8EEF-92D56B172D15}"
RootNamespace="SQLToMongo" RootNamespace="SQLToMongo"
Keyword="Win32Proj"> Keyword="Win32Proj">
@ -20,7 +20,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\MongoDB\include" AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\MongoDB\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;"
StringPooling="TRUE" StringPooling="TRUE"
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
@ -84,7 +84,7 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="TRUE" OmitFramePointers="TRUE"
OptimizeForWindowsApplication="TRUE" OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\MongoDB\include" AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\MongoDB\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="2" RuntimeLibrary="2"
@ -143,7 +143,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\MongoDB\include" AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\MongoDB\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;"
StringPooling="TRUE" StringPooling="TRUE"
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
@ -207,7 +207,7 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="TRUE" OmitFramePointers="TRUE"
OptimizeForWindowsApplication="TRUE" OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\MongoDB\include" AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\MongoDB\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="0"
@ -266,7 +266,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\MongoDB\include" AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\MongoDB\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;"
StringPooling="TRUE" StringPooling="TRUE"
MinimalRebuild="TRUE" MinimalRebuild="TRUE"
@ -330,7 +330,7 @@
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="TRUE" OmitFramePointers="TRUE"
OptimizeForWindowsApplication="TRUE" OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\MongoDB\include" AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\MongoDB\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="2" RuntimeLibrary="2"
@ -381,15 +381,19 @@
Name="VCAuxiliaryManagedWrapperGeneratorTool"/> Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References/> <References>
</References>
<Files> <Files>
<Filter <Filter
Name="Header Files"/> Name="Header Files">
</Filter>
<Filter <Filter
Name="Source Files"> Name="Source Files">
<File <File
RelativePath=".\src\SQLToMongo.cpp"/> RelativePath=".\src\SQLToMongo.cpp">
</File>
</Filter> </Filter>
</Files> </Files>
<Globals/> <Globals>
</Globals>
</VisualStudioProject> </VisualStudioProject>

View File

@ -268,9 +268,27 @@
#if defined(POCO_HAVE_ADDRINFO) #if defined(POCO_HAVE_ADDRINFO)
#if !defined(AI_ADDRCONFIG) #ifndef AI_PASSIVE
#define AI_PASSIVE 0
#endif
#ifndef AI_CANONNAME
#define AI_CANONNAME 0
#endif
#ifndef AI_NUMERICHOST
#define AI_NUMERICHOST 0
#endif
#ifndef AI_NUMERICSERV
#define AI_NUMERICSERV 0
#endif
#ifndef AI_ALL
#define AI_ALL 0
#endif
#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0 #define AI_ADDRCONFIG 0
#endif #endif
#ifndef AI_V4MAPPED
#define AI_V4MAPPED 0
#endif
#endif #endif