Skip to content
This repository

MSVC fixes #538

Merged
merged 3 commits into from over 1 year ago

3 participants

Timothee "TTimo" Besset Steven McCoy Pieter Hintjens
Timothee "TTimo" Besset
Collaborator
TTimo commented

I think 2010 can still read those projects after the conversion to 2012. If not I can fork out a different set of project files.

Pieter Hintjens hintjens merged commit b5ace90 into from
Pieter Hintjens hintjens closed this
Steven McCoy

This overwrote the MSVC2010 solution file with MSVC2012?

Executables for Win32 should be v110_xp if going this route.

Collaborator

That's the part I'm not sure about. It looked like both 2010 and 2012 would be able to read those project files. Do you have 2010? Does it complain about those new project files? Should be able to obtain a set for 2010 by just removing the v110 blocks (which I don't mind doing if necessary, but I'd rather someone with access to 2010 look at it)

Collaborator
Collaborator
Collaborator

There is a prebuild event in the MSVC 2012 project that copies platform.hpp to the right spot:
copy ..\platform.hpp ......\src

Maybe you can add it to MSVC 2010 solution and submit a patch?

Collaborator
Steven McCoy

Why not just revert commit a22714d? I see no value reproducing the zmq::clock_t code here.

Collaborator

I have no opinion about removing code that landed more than a month ago. I assume that if it's still there, it has some useful purpose. It seemed appropriate to do some simple fixes so it would compile on Windows. I am not sure what those two tools do.

I'm waiting on that commit for feedback on what constitutes "better timing".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
4 builds/msvc/c_local_lat/c_local_lat.vcxproj
@@ -28,19 +28,23 @@
28 28 <ConfigurationType>Application</ConfigurationType>
29 29 <CharacterSet>MultiByte</CharacterSet>
30 30 <WholeProgramOptimization>true</WholeProgramOptimization>
  31 + <PlatformToolset>v110</PlatformToolset>
31 32 </PropertyGroup>
32 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
33 34 <ConfigurationType>Application</ConfigurationType>
34 35 <CharacterSet>MultiByte</CharacterSet>
35 36 <WholeProgramOptimization>true</WholeProgramOptimization>
  37 + <PlatformToolset>v110</PlatformToolset>
36 38 </PropertyGroup>
37 39 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
38 40 <ConfigurationType>Application</ConfigurationType>
39 41 <CharacterSet>MultiByte</CharacterSet>
  42 + <PlatformToolset>v110</PlatformToolset>
40 43 </PropertyGroup>
41 44 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42 45 <ConfigurationType>Application</ConfigurationType>
43 46 <CharacterSet>MultiByte</CharacterSet>
  47 + <PlatformToolset>v110</PlatformToolset>
44 48 </PropertyGroup>
45 49 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
46 50 <ImportGroup Label="ExtensionSettings" />
4 builds/msvc/c_local_thr/c_local_thr.vcxproj
@@ -28,19 +28,23 @@
28 28 <ConfigurationType>Application</ConfigurationType>
29 29 <CharacterSet>MultiByte</CharacterSet>
30 30 <WholeProgramOptimization>true</WholeProgramOptimization>
  31 + <PlatformToolset>v110</PlatformToolset>
31 32 </PropertyGroup>
32 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
33 34 <ConfigurationType>Application</ConfigurationType>
34 35 <CharacterSet>MultiByte</CharacterSet>
35 36 <WholeProgramOptimization>true</WholeProgramOptimization>
  37 + <PlatformToolset>v110</PlatformToolset>
36 38 </PropertyGroup>
37 39 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
38 40 <ConfigurationType>Application</ConfigurationType>
39 41 <CharacterSet>MultiByte</CharacterSet>
  42 + <PlatformToolset>v110</PlatformToolset>
40 43 </PropertyGroup>
41 44 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42 45 <ConfigurationType>Application</ConfigurationType>
43 46 <CharacterSet>MultiByte</CharacterSet>
  47 + <PlatformToolset>v110</PlatformToolset>
44 48 </PropertyGroup>
45 49 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
46 50 <ImportGroup Label="ExtensionSettings" />
4 builds/msvc/c_remote_lat/c_remote_lat.vcxproj
@@ -28,19 +28,23 @@
28 28 <ConfigurationType>Application</ConfigurationType>
29 29 <CharacterSet>MultiByte</CharacterSet>
30 30 <WholeProgramOptimization>true</WholeProgramOptimization>
  31 + <PlatformToolset>v110</PlatformToolset>
31 32 </PropertyGroup>
32 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
33 34 <ConfigurationType>Application</ConfigurationType>
34 35 <CharacterSet>MultiByte</CharacterSet>
35 36 <WholeProgramOptimization>true</WholeProgramOptimization>
  37 + <PlatformToolset>v110</PlatformToolset>
36 38 </PropertyGroup>
37 39 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
38 40 <ConfigurationType>Application</ConfigurationType>
39 41 <CharacterSet>MultiByte</CharacterSet>
  42 + <PlatformToolset>v110</PlatformToolset>
40 43 </PropertyGroup>
41 44 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42 45 <ConfigurationType>Application</ConfigurationType>
43 46 <CharacterSet>MultiByte</CharacterSet>
  47 + <PlatformToolset>v110</PlatformToolset>
44 48 </PropertyGroup>
45 49 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
46 50 <ImportGroup Label="ExtensionSettings" />
4 builds/msvc/c_remote_thr/c_remote_thr.vcxproj
@@ -28,19 +28,23 @@
28 28 <ConfigurationType>Application</ConfigurationType>
29 29 <CharacterSet>MultiByte</CharacterSet>
30 30 <WholeProgramOptimization>true</WholeProgramOptimization>
  31 + <PlatformToolset>v110</PlatformToolset>
31 32 </PropertyGroup>
32 33 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
33 34 <ConfigurationType>Application</ConfigurationType>
34 35 <CharacterSet>MultiByte</CharacterSet>
35 36 <WholeProgramOptimization>true</WholeProgramOptimization>
  37 + <PlatformToolset>v110</PlatformToolset>
36 38 </PropertyGroup>
37 39 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
38 40 <ConfigurationType>Application</ConfigurationType>
39 41 <CharacterSet>MultiByte</CharacterSet>
  42 + <PlatformToolset>v110</PlatformToolset>
40 43 </PropertyGroup>
41 44 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
42 45 <ConfigurationType>Application</ConfigurationType>
43 46 <CharacterSet>MultiByte</CharacterSet>
  47 + <PlatformToolset>v110</PlatformToolset>
44 48 </PropertyGroup>
45 49 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
46 50 <ImportGroup Label="ExtensionSettings" />
6 builds/msvc/inproc_lat/inproc_lat.vcxproj
@@ -27,19 +27,23 @@
27 27 <ConfigurationType>Application</ConfigurationType>
28 28 <CharacterSet>MultiByte</CharacterSet>
29 29 <WholeProgramOptimization>true</WholeProgramOptimization>
  30 + <PlatformToolset>v110</PlatformToolset>
30 31 </PropertyGroup>
31 32 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
32 33 <ConfigurationType>Application</ConfigurationType>
33 34 <CharacterSet>MultiByte</CharacterSet>
34 35 <WholeProgramOptimization>true</WholeProgramOptimization>
  36 + <PlatformToolset>v110</PlatformToolset>
35 37 </PropertyGroup>
36 38 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
37 39 <ConfigurationType>Application</ConfigurationType>
38 40 <CharacterSet>MultiByte</CharacterSet>
  41 + <PlatformToolset>v110</PlatformToolset>
39 42 </PropertyGroup>
40 43 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41 44 <ConfigurationType>Application</ConfigurationType>
42 45 <CharacterSet>MultiByte</CharacterSet>
  46 + <PlatformToolset>v110</PlatformToolset>
43 47 </PropertyGroup>
44 48 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
45 49 <ImportGroup Label="ExtensionSettings" />
@@ -103,4 +107,4 @@
103 107 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
104 108 <ImportGroup Label="ExtensionTargets">
105 109 </ImportGroup>
106   -</Project>
  110 +</Project>
6 builds/msvc/inproc_thr/inproc_thr.vcxproj
@@ -27,19 +27,23 @@
27 27 <ConfigurationType>Application</ConfigurationType>
28 28 <CharacterSet>MultiByte</CharacterSet>
29 29 <WholeProgramOptimization>true</WholeProgramOptimization>
  30 + <PlatformToolset>v110</PlatformToolset>
30 31 </PropertyGroup>
31 32 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
32 33 <ConfigurationType>Application</ConfigurationType>
33 34 <CharacterSet>MultiByte</CharacterSet>
34 35 <WholeProgramOptimization>true</WholeProgramOptimization>
  36 + <PlatformToolset>v110</PlatformToolset>
35 37 </PropertyGroup>
36 38 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
37 39 <ConfigurationType>Application</ConfigurationType>
38 40 <CharacterSet>MultiByte</CharacterSet>
  41 + <PlatformToolset>v110</PlatformToolset>
39 42 </PropertyGroup>
40 43 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41 44 <ConfigurationType>Application</ConfigurationType>
42 45 <CharacterSet>MultiByte</CharacterSet>
  46 + <PlatformToolset>v110</PlatformToolset>
43 47 </PropertyGroup>
44 48 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
45 49 <ImportGroup Label="ExtensionSettings" />
@@ -103,4 +107,4 @@
103 107 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
104 108 <ImportGroup Label="ExtensionTargets">
105 109 </ImportGroup>
106   -</Project>
  110 +</Project>
18 builds/msvc/libzmq/libzmq.vcxproj
@@ -43,38 +43,46 @@
43 43 <ConfigurationType>DynamicLibrary</ConfigurationType>
44 44 <CharacterSet>MultiByte</CharacterSet>
45 45 <WholeProgramOptimization>true</WholeProgramOptimization>
  46 + <PlatformToolset>v110</PlatformToolset>
46 47 </PropertyGroup>
47 48 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='WithOpenPGM|x64'" Label="Configuration">
48 49 <ConfigurationType>DynamicLibrary</ConfigurationType>
49 50 <CharacterSet>MultiByte</CharacterSet>
50 51 <WholeProgramOptimization>true</WholeProgramOptimization>
  52 + <PlatformToolset>v110</PlatformToolset>
51 53 </PropertyGroup>
52 54 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
53 55 <ConfigurationType>DynamicLibrary</ConfigurationType>
54 56 <CharacterSet>MultiByte</CharacterSet>
55 57 <WholeProgramOptimization>true</WholeProgramOptimization>
  58 + <PlatformToolset>v110</PlatformToolset>
56 59 </PropertyGroup>
57 60 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
58 61 <ConfigurationType>DynamicLibrary</ConfigurationType>
59 62 <CharacterSet>MultiByte</CharacterSet>
60 63 <WholeProgramOptimization>true</WholeProgramOptimization>
  64 + <PlatformToolset>v110</PlatformToolset>
61 65 </PropertyGroup>
62 66 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
63 67 <ConfigurationType>DynamicLibrary</ConfigurationType>
64 68 <CharacterSet>MultiByte</CharacterSet>
  69 + <PlatformToolset>v110</PlatformToolset>
65 70 </PropertyGroup>
66 71 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
67 72 <ConfigurationType>DynamicLibrary</ConfigurationType>
68 73 <CharacterSet>MultiByte</CharacterSet>
  74 + <PlatformToolset>v110</PlatformToolset>
69 75 </PropertyGroup>
70 76 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='StaticRelease|Win32'" Label="Configuration">
71 77 <ConfigurationType>StaticLibrary</ConfigurationType>
72 78 <CharacterSet>MultiByte</CharacterSet>
73 79 <WholeProgramOptimization>true</WholeProgramOptimization>
  80 + <PlatformToolset>v110</PlatformToolset>
74 81 </PropertyGroup>
75 82 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='StaticDebug|Win32'" Label="Configuration">
76 83 <ConfigurationType>StaticLibrary</ConfigurationType>
77 84 <CharacterSet>MultiByte</CharacterSet>
  85 + <PlatformToolset>v110</PlatformToolset>
78 86 </PropertyGroup>
79 87 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
80 88 <ImportGroup Label="ExtensionSettings" />
@@ -154,21 +162,25 @@
154 162 <PreBuildEvent>
155 163 <Command>copy ..\platform.hpp ..\..\..\src</Command>
156 164 </PreBuildEvent>
  165 + <ClCompile>
  166 + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
  167 + </ClCompile>
157 168 </ItemDefinitionGroup>
158 169 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='StaticDebug|Win32'">
159 170 <PreBuildEvent>
160 171 <Command>copy ..\platform.hpp ..\..\..\src</Command>
161 172 </PreBuildEvent>
  173 + <ClCompile>
  174 + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
  175 + </ClCompile>
162 176 </ItemDefinitionGroup>
163 177 <ItemGroup>
164 178 <ClCompile Include="..\..\..\src\address.cpp" />
165 179 <ClCompile Include="..\..\..\src\clock.cpp" />
166 180 <ClCompile Include="..\..\..\src\ctx.cpp" />
167 181 <ClCompile Include="..\..\..\src\dealer.cpp" />
168   - <ClCompile Include="..\..\..\src\decoder.cpp" />
169 182 <ClCompile Include="..\..\..\src\devpoll.cpp" />
170 183 <ClCompile Include="..\..\..\src\dist.cpp" />
171   - <ClCompile Include="..\..\..\src\encoder.cpp" />
172 184 <ClCompile Include="..\..\..\src\epoll.cpp" />
173 185 <ClCompile Include="..\..\..\src\err.cpp" />
174 186 <ClCompile Include="..\..\..\src\fq.cpp" />
@@ -221,6 +233,8 @@
221 233 <ClCompile Include="..\..\..\src\trie.cpp" />
222 234 <ClCompile Include="..\..\..\src\v1_decoder.cpp" />
223 235 <ClCompile Include="..\..\..\src\v1_encoder.cpp" />
  236 + <ClCompile Include="..\..\..\src\v2_decoder.cpp" />
  237 + <ClCompile Include="..\..\..\src\v2_encoder.cpp" />
224 238 <ClCompile Include="..\..\..\src\xpub.cpp" />
225 239 <ClCompile Include="..\..\..\src\xsub.cpp" />
226 240 <ClCompile Include="..\..\..\src\zmq.cpp" />
12 builds/msvc/libzmq/libzmq.vcxproj.filters
@@ -23,18 +23,12 @@
23 23 <ClCompile Include="..\..\..\src\dealer.cpp">
24 24 <Filter>Source Files</Filter>
25 25 </ClCompile>
26   - <ClCompile Include="..\..\..\src\decoder.cpp">
27   - <Filter>Source Files</Filter>
28   - </ClCompile>
29 26 <ClCompile Include="..\..\..\src\devpoll.cpp">
30 27 <Filter>Source Files</Filter>
31 28 </ClCompile>
32 29 <ClCompile Include="..\..\..\src\dist.cpp">
33 30 <Filter>Source Files</Filter>
34 31 </ClCompile>
35   - <ClCompile Include="..\..\..\src\encoder.cpp">
36   - <Filter>Source Files</Filter>
37   - </ClCompile>
38 32 <ClCompile Include="..\..\..\src\epoll.cpp">
39 33 <Filter>Source Files</Filter>
40 34 </ClCompile>
@@ -197,6 +191,12 @@
197 191 <ClCompile Include="..\..\..\src\raw_encoder.cpp">
198 192 <Filter>Source Files</Filter>
199 193 </ClCompile>
  194 + <ClCompile Include="..\..\..\src\v2_decoder.cpp">
  195 + <Filter>Source Files</Filter>
  196 + </ClCompile>
  197 + <ClCompile Include="..\..\..\src\v2_encoder.cpp">
  198 + <Filter>Source Files</Filter>
  199 + </ClCompile>
200 200 </ItemGroup>
201 201 <ItemGroup>
202 202 <ClInclude Include="..\..\..\include\zmq.h">
32 builds/msvc/msvc10.sln
... ... @@ -1,6 +1,6 @@
1 1 
2   -Microsoft Visual Studio Solution File, Format Version 11.00
3   -# Visual Studio 2010
  2 +Microsoft Visual Studio Solution File, Format Version 12.00
  3 +# Visual Studio Express 2012 for Windows Desktop
4 4 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzmq", "libzmq\libzmq.vcxproj", "{641C5F36-32EE-4323-B740-992B651CF9D6}"
5 5 EndProject
6 6 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
22 22 Release|Win32 = Release|Win32
23 23 Release|x64 = Release|x64
24 24 StaticDebug|Win32 = StaticDebug|Win32
  25 + StaticDebug|x64 = StaticDebug|x64
25 26 StaticRelease|Win32 = StaticRelease|Win32
  27 + StaticRelease|x64 = StaticRelease|x64
26 28 WithOpenPGM|Win32 = WithOpenPGM|Win32
27 29 WithOpenPGM|x64 = WithOpenPGM|x64
28 30 EndGlobalSection
@@ -37,8 +39,10 @@ Global
37 39 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|x64.Build.0 = Release|x64
38 40 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.ActiveCfg = StaticDebug|Win32
39 41 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.Build.0 = StaticDebug|Win32
  42 + {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|x64.ActiveCfg = StaticDebug|Win32
40 43 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.ActiveCfg = StaticRelease|Win32
41 44 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.Build.0 = StaticRelease|Win32
  45 + {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|x64.ActiveCfg = StaticRelease|Win32
42 46 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.ActiveCfg = WithOpenPGM|Win32
43 47 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.Build.0 = WithOpenPGM|Win32
44 48 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|x64.ActiveCfg = WithOpenPGM|x64
@@ -51,6 +55,10 @@ Global
51 55 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.Build.0 = Release|Win32
52 56 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|x64.ActiveCfg = Release|x64
53 57 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|x64.Build.0 = Release|x64
  58 + {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticDebug|Win32.ActiveCfg = Debug|Win32
  59 + {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticDebug|x64.ActiveCfg = Debug|x64
  60 + {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticRelease|Win32.ActiveCfg = Release|Win32
  61 + {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticRelease|x64.ActiveCfg = Release|x64
54 62 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
55 63 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.Build.0 = Release|Win32
56 64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|x64.ActiveCfg = Release|x64
@@ -63,6 +71,10 @@ Global
63 71 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.Build.0 = Release|Win32
64 72 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|x64.ActiveCfg = Release|x64
65 73 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|x64.Build.0 = Release|x64
  74 + {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticDebug|Win32.ActiveCfg = Debug|Win32
  75 + {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticDebug|x64.ActiveCfg = Debug|x64
  76 + {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticRelease|Win32.ActiveCfg = Release|Win32
  77 + {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticRelease|x64.ActiveCfg = Release|x64
66 78 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
67 79 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.Build.0 = Release|Win32
68 80 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|x64.ActiveCfg = Release|x64
@@ -75,6 +87,10 @@ Global
75 87 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.Build.0 = Release|Win32
76 88 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|x64.ActiveCfg = Release|x64
77 89 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|x64.Build.0 = Release|x64
  90 + {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticDebug|Win32.ActiveCfg = Debug|Win32
  91 + {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticDebug|x64.ActiveCfg = Debug|x64
  92 + {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticRelease|Win32.ActiveCfg = Release|Win32
  93 + {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticRelease|x64.ActiveCfg = Release|x64
78 94 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
79 95 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.Build.0 = Release|Win32
80 96 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|x64.ActiveCfg = Release|x64
@@ -87,6 +103,10 @@ Global
87 103 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32
88 104 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|x64.ActiveCfg = Release|x64
89 105 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|x64.Build.0 = Release|x64
  106 + {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticDebug|Win32.ActiveCfg = Debug|Win32
  107 + {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticDebug|x64.ActiveCfg = Debug|x64
  108 + {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticRelease|Win32.ActiveCfg = Release|Win32
  109 + {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticRelease|x64.ActiveCfg = Release|x64
90 110 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
91 111 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32
92 112 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|x64.ActiveCfg = Release|x64
@@ -99,6 +119,10 @@ Global
99 119 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.Build.0 = Release|Win32
100 120 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|x64.ActiveCfg = Release|x64
101 121 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|x64.Build.0 = Release|x64
  122 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticDebug|Win32.ActiveCfg = Debug|Win32
  123 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticDebug|x64.ActiveCfg = Debug|x64
  124 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticRelease|Win32.ActiveCfg = Release|Win32
  125 + {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticRelease|x64.ActiveCfg = Release|x64
102 126 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
103 127 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.Build.0 = Release|Win32
104 128 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|x64.ActiveCfg = Release|x64
@@ -111,6 +135,10 @@ Global
111 135 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.Build.0 = Release|Win32
112 136 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|x64.ActiveCfg = Release|x64
113 137 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|x64.Build.0 = Release|x64
  138 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticDebug|Win32.ActiveCfg = Debug|Win32
  139 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticDebug|x64.ActiveCfg = Debug|x64
  140 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticRelease|Win32.ActiveCfg = Release|Win32
  141 + {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticRelease|x64.ActiveCfg = Release|x64
114 142 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32
115 143 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.Build.0 = Release|Win32
116 144 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|x64.ActiveCfg = Release|x64
44 perf/local_thr.cpp
@@ -26,7 +26,12 @@
26 26 #include <string.h>
27 27 #include <time.h>
28 28 #include <limits.h>
  29 +
  30 +#include "platform.hpp"
  31 +
  32 +#ifndef ZMQ_HAVE_WINDOWS
29 33 #include <sys/time.h>
  34 +#endif
30 35
31 36 #define ZMSG 1
32 37 #define DATA 0
@@ -41,9 +46,23 @@ struct US_TIMER{
41 46 /* Records the current timer state
42 47 */
43 48 void tm_init( US_TIMER *t){
44   -
45   - if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
46   -
  49 +#if defined ZMQ_HAVE_WINDOWS
  50 +
  51 + // Get the high resolution counter's accuracy.
  52 + LARGE_INTEGER ticksPerSecond;
  53 + QueryPerformanceFrequency (&ticksPerSecond);
  54 +
  55 + // What time is it?
  56 + LARGE_INTEGER tick;
  57 + if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_init()" ); }
  58 +
  59 + // Seconds
  60 + t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
  61 + // Microseconds
  62 + t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
  63 +#else
  64 + if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_init()");}
  65 +#endif
47 66 t->time_was = t->time_now;
48 67
49 68 }
@@ -54,9 +73,22 @@ void tm_init( US_TIMER *t){
54 73 float tm_secs( US_TIMER *t){
55 74
56 75 register float seconds;
57   -
58   - if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
59   -
  76 +#if defined ZMQ_HAVE_WINDOWS
  77 + // Get the high resolution counter's accuracy.
  78 + LARGE_INTEGER ticksPerSecond;
  79 + QueryPerformanceFrequency (&ticksPerSecond);
  80 +
  81 + // What time is it?
  82 + LARGE_INTEGER tick;
  83 + if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_secs()" ); }
  84 +
  85 + // Seconds
  86 + t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
  87 + // Microseconds
  88 + t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
  89 +#else
  90 + if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_secs()");}
  91 +#endif
60 92 seconds = ( ((float)( t->time_now.tv_sec - t->time_was.tv_sec)) +
61 93 (((float)( t->time_now.tv_usec - t->time_was.tv_usec)) / 1000000.0));
62 94
42 perf/remote_thr.cpp
@@ -23,11 +23,9 @@
23 23 #include "../include/zmq_utils.h"
24 24 #include <stdio.h>
25 25 #include <stdlib.h>
26   -#include <unistd.h>
27 26 #include <string.h>
28 27 #include <time.h>
29 28 #include <limits.h>
30   -#include <sys/time.h>
31 29
32 30 #include "platform.hpp"
33 31
@@ -35,6 +33,8 @@
35 33 #include <windows.h>
36 34 #include <process.h>
37 35 #else
  36 +#include <unistd.h>
  37 +#include <sys/time.h>
38 38 #include <pthread.h>
39 39 #endif
40 40
@@ -61,11 +61,25 @@ struct US_TIMER{
61 61 /* Records the current timer state
62 62 */
63 63 void tm_init( US_TIMER *t){
  64 +#if defined ZMQ_HAVE_WINDOWS
64 65
65   - if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
  66 + // Get the high resolution counter's accuracy.
  67 + LARGE_INTEGER ticksPerSecond;
  68 + QueryPerformanceFrequency (&ticksPerSecond);
66 69
67   - t->time_was = t->time_now;
  70 + // What time is it?
  71 + LARGE_INTEGER tick;
  72 + if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_init()" ); }
  73 +
  74 + // Seconds
  75 + t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
  76 + // Microseconds
  77 + t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
  78 +#else
  79 + if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_init()");}
  80 +#endif
68 81
  82 + t->time_was = t->time_now;
69 83 }
70 84
71 85 /* Returns the time passed in microsecond precision in seconds since last init
@@ -75,14 +89,28 @@ float tm_secs( US_TIMER *t){
75 89
76 90 register float seconds;
77 91
78   - if( gettimeofday( &t->time_now, NULL) < 0){ perror( "d_timer_init()");}
79   -
  92 +#if defined ZMQ_HAVE_WINDOWS
  93 + // Get the high resolution counter's accuracy.
  94 + LARGE_INTEGER ticksPerSecond;
  95 + QueryPerformanceFrequency (&ticksPerSecond);
  96 +
  97 + // What time is it?
  98 + LARGE_INTEGER tick;
  99 + if ( !QueryPerformanceCounter (&tick) ) { perror( "tm_secs()" ); }
  100 +
  101 + // Seconds
  102 + t->time_now.tv_sec = (long)( tick.QuadPart / ticksPerSecond.QuadPart );
  103 + // Microseconds
  104 + t->time_now.tv_usec = (long)( ( tick.QuadPart - t->time_now.tv_sec * ticksPerSecond.QuadPart ) * 1000000 / ticksPerSecond.QuadPart );
  105 +#else
  106 + if( gettimeofday( &t->time_now, NULL) < 0){ perror( "tm_secs()");}
  107 +#endif
80 108 seconds = ( ((float)( t->time_now.tv_sec - t->time_was.tv_sec)) +
81 109 (((float)( t->time_now.tv_usec - t->time_was.tv_usec)) / 1000000.0));
82 110
83 111 t->time_was = t->time_now;
84 112
85   - return( seconds);
  113 + return seconds;
86 114 }
87 115
88 116 void my_free (void *data, void *hint)

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.