Commit b5ace90e authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #538 from TTimo/master

MSVC fixes
parents 1e7db60e 44df35cb
......@@ -28,19 +28,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......
......@@ -28,19 +28,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......
......@@ -28,19 +28,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......
......@@ -28,19 +28,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......
......@@ -27,19 +27,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......
......@@ -27,19 +27,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......
......@@ -43,38 +43,46 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='WithOpenPGM|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='StaticRelease|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='StaticDebug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
......@@ -154,21 +162,25 @@
<PreBuildEvent>
<Command>copy ..\platform.hpp ..\..\..\src</Command>
</PreBuildEvent>
<ClCompile>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='StaticDebug|Win32'">
<PreBuildEvent>
<Command>copy ..\platform.hpp ..\..\..\src</Command>
</PreBuildEvent>
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\address.cpp" />
<ClCompile Include="..\..\..\src\clock.cpp" />
<ClCompile Include="..\..\..\src\ctx.cpp" />
<ClCompile Include="..\..\..\src\dealer.cpp" />
<ClCompile Include="..\..\..\src\decoder.cpp" />
<ClCompile Include="..\..\..\src\devpoll.cpp" />
<ClCompile Include="..\..\..\src\dist.cpp" />
<ClCompile Include="..\..\..\src\encoder.cpp" />
<ClCompile Include="..\..\..\src\epoll.cpp" />
<ClCompile Include="..\..\..\src\err.cpp" />
<ClCompile Include="..\..\..\src\fq.cpp" />
......@@ -221,6 +233,8 @@
<ClCompile Include="..\..\..\src\trie.cpp" />
<ClCompile Include="..\..\..\src\v1_decoder.cpp" />
<ClCompile Include="..\..\..\src\v1_encoder.cpp" />
<ClCompile Include="..\..\..\src\v2_decoder.cpp" />
<ClCompile Include="..\..\..\src\v2_encoder.cpp" />
<ClCompile Include="..\..\..\src\xpub.cpp" />
<ClCompile Include="..\..\..\src\xsub.cpp" />
<ClCompile Include="..\..\..\src\zmq.cpp" />
......
......@@ -23,18 +23,12 @@
<ClCompile Include="..\..\..\src\dealer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\decoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\devpoll.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\dist.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\encoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\epoll.cpp">
<Filter>Source Files</Filter>
</ClCompile>
......@@ -197,6 +191,12 @@
<ClCompile Include="..\..\..\src\raw_encoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\v2_decoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\v2_encoder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\zmq.h">
......

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzmq", "libzmq\libzmq.vcxproj", "{641C5F36-32EE-4323-B740-992B651CF9D6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_lat", "c_local_lat\c_local_lat.vcxproj", "{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}"
......@@ -22,7 +22,9 @@ Global
Release|Win32 = Release|Win32
Release|x64 = Release|x64
StaticDebug|Win32 = StaticDebug|Win32
StaticDebug|x64 = StaticDebug|x64
StaticRelease|Win32 = StaticRelease|Win32
StaticRelease|x64 = StaticRelease|x64
WithOpenPGM|Win32 = WithOpenPGM|Win32
WithOpenPGM|x64 = WithOpenPGM|x64
EndGlobalSection
......@@ -37,8 +39,10 @@ Global
{641C5F36-32EE-4323-B740-992B651CF9D6}.Release|x64.Build.0 = Release|x64
{641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.ActiveCfg = StaticDebug|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.Build.0 = StaticDebug|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|x64.ActiveCfg = StaticDebug|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.ActiveCfg = StaticRelease|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.Build.0 = StaticRelease|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|x64.ActiveCfg = StaticRelease|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.ActiveCfg = WithOpenPGM|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.Build.0 = WithOpenPGM|Win32
{641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|x64.ActiveCfg = WithOpenPGM|x64
......@@ -51,6 +55,10 @@ Global
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.Build.0 = Release|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|x64.ActiveCfg = Release|x64
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|x64.Build.0 = Release|x64
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticDebug|Win32.ActiveCfg = Debug|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticDebug|x64.ActiveCfg = Debug|x64
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticRelease|Win32.ActiveCfg = Release|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticRelease|x64.ActiveCfg = Release|x64
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.Build.0 = Release|Win32
{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|x64.ActiveCfg = Release|x64
......@@ -63,6 +71,10 @@ Global
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.Build.0 = Release|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|x64.ActiveCfg = Release|x64
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|x64.Build.0 = Release|x64
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticDebug|Win32.ActiveCfg = Debug|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticDebug|x64.ActiveCfg = Debug|x64
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticRelease|Win32.ActiveCfg = Release|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticRelease|x64.ActiveCfg = Release|x64
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.Build.0 = Release|Win32
{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|x64.ActiveCfg = Release|x64
......@@ -75,6 +87,10 @@ Global
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.Build.0 = Release|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|x64.ActiveCfg = Release|x64
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|x64.Build.0 = Release|x64
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticDebug|Win32.ActiveCfg = Debug|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticDebug|x64.ActiveCfg = Debug|x64
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticRelease|Win32.ActiveCfg = Release|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticRelease|x64.ActiveCfg = Release|x64
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.Build.0 = Release|Win32
{8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|x64.ActiveCfg = Release|x64
......@@ -87,6 +103,10 @@ Global
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|x64.ActiveCfg = Release|x64
{B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|x64.Build.0 = Release|x64
{B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticDebug|Win32.ActiveCfg = Debug|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticDebug|x64.ActiveCfg = Debug|x64
{B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticRelease|Win32.ActiveCfg = Release|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticRelease|x64.ActiveCfg = Release|x64
{B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32
{B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|x64.ActiveCfg = Release|x64
......@@ -99,6 +119,10 @@ Global
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.Build.0 = Release|Win32
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|x64.ActiveCfg = Release|x64
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|x64.Build.0 = Release|x64
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticDebug|Win32.ActiveCfg = Debug|Win32
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticDebug|x64.ActiveCfg = Debug|x64
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticRelease|Win32.ActiveCfg = Release|Win32
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticRelease|x64.ActiveCfg = Release|x64
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.Build.0 = Release|Win32
{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|x64.ActiveCfg = Release|x64
......@@ -111,6 +135,10 @@ Global
{1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.Build.0 = Release|Win32
{1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|x64.ActiveCfg = Release|x64
{1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|x64.Build.0 = Release|x64
{1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticDebug|Win32.ActiveCfg = Debug|Win32
{1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticDebug|x64.ActiveCfg = Debug|x64
{1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticRelease|Win32.ActiveCfg = Release|Win32
{1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticRelease|x64.ActiveCfg = Release|x64
{1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
{1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.Build.0 = Release|Win32
{1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|x64.ActiveCfg = Release|x64
......
......@@ -26,7 +26,12 @@
#include <string.h>
#include <time.h>
#include <limits.h>
#include "platform.hpp"
#ifndef ZMQ_HAVE_WINDOWS
#include <sys/time.h>
#endif
#define ZMSG 1
#define DATA 0
......@@ -41,9 +46,23 @@ struct US_TIMER{
/* Records the current timer state
*/
void tm_init( US_TIMER *t){
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
#if defined ZMQ_HAVE_WINDOWS
// Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond;
QueryPerformanceFrequency (&ticksPerSecond);
// What time is it?
LARGE_INTEGER tick;
if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_init()" ); }
// Seconds
t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
// Microseconds
t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
#else
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_init()");}
#endif
t->time_was = t->time_now;
}
......@@ -54,9 +73,22 @@ void tm_init( US_TIMER *t){
float tm_secs( US_TIMER *t){
register float seconds;
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
#if defined ZMQ_HAVE_WINDOWS
// Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond;
QueryPerformanceFrequency (&ticksPerSecond);
// What time is it?
LARGE_INTEGER tick;
if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_secs()" ); }
// Seconds
t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
// Microseconds
t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
#else
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_secs()");}
#endif
seconds = ( ((float)( t->time_now.tv_sec - t->time_was.tv_sec)) +
(((float)( t->time_now.tv_usec - t->time_was.tv_usec)) / 1000000.0));
......
......@@ -23,11 +23,9 @@
#include "../include/zmq_utils.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <limits.h>
#include <sys/time.h>
#include "platform.hpp"
......@@ -35,6 +33,8 @@
#include <windows.h>
#include <process.h>
#else
#include <unistd.h>
#include <sys/time.h>
#include <pthread.h>
#endif
......@@ -61,11 +61,25 @@ struct US_TIMER{
/* Records the current timer state
*/
void tm_init( US_TIMER *t){
#if defined ZMQ_HAVE_WINDOWS
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
// Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond;
QueryPerformanceFrequency (&ticksPerSecond);
t->time_was = t->time_now;
// What time is it?
LARGE_INTEGER tick;
if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_init()" ); }
// Seconds
t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
// Microseconds
t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
#else
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_init()");}
#endif
t->time_was = t->time_now;
}
/* Returns the time passed in microsecond precision in seconds since last init
......@@ -75,14 +89,28 @@ float tm_secs( US_TIMER *t){
register float seconds;
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
#if defined ZMQ_HAVE_WINDOWS
// Get the high resolution counter's accuracy.
LARGE_INTEGER ticksPerSecond;
QueryPerformanceFrequency (&ticksPerSecond);
// What time is it?
LARGE_INTEGER tick;
if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_secs()" ); }
// Seconds
t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
// Microseconds
t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
#else
if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_secs()");}
#endif
seconds = ( ((float)( t->time_now.tv_sec - t->time_was.tv_sec)) +
(((float)( t->time_now.tv_usec - t->time_was.tv_usec)) / 1000000.0));
t->time_was = t->time_now;
return( seconds);
return seconds;
}
void my_free (void *data, void *hint)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment