Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
bf14b1f9
Commit
bf14b1f9
authored
Dec 21, 2015
by
Constantin Rack
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1680 from hintjens/master
Fixes for Windows, and poller API
parents
78c3ba0d
7893a6ac
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
23 deletions
+26
-23
libzmq.vcproj
builds/msvc/vs2008/libzmq/libzmq.vcproj
+5
-5
libzmq.props
builds/msvc/vs2010/libzmq/libzmq.props
+1
-1
libzmq.props
builds/msvc/vs2012/libzmq/libzmq.props
+1
-1
libzmq.props
builds/msvc/vs2013/libzmq/libzmq.props
+1
-1
libzmq.props
builds/msvc/vs2015/libzmq/libzmq.props
+1
-1
zmq.h
include/zmq.h
+4
-4
zmq.cpp
src/zmq.cpp
+11
-8
test_poller.cpp
tests/test_poller.cpp
+1
-1
test_timers.cpp
tests/test_timers.cpp
+1
-1
No files found.
builds/msvc/vs2008/libzmq/libzmq.vcproj
View file @
bf14b1f9
...
...
@@ -15,7 +15,7 @@
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib"
OutputFile=
"../../../../lib/libzmq.dll"
LinkDLL=
"true"
GenerateDebugInformation=
"true"
TargetMachine=
"1"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib
Iphlpapi.lib
"
OutputFile=
"../../../../lib/libzmq.dll"
LinkDLL=
"true"
GenerateDebugInformation=
"true"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
...
...
@@ -34,7 +34,7 @@
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib"
OutputFile=
"../../../../lib/libzmq.dll"
LinkDLL=
"true"
GenerateDebugInformation=
"true"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib
Iphlpapi.lib
"
OutputFile=
"../../../../lib/libzmq.dll"
LinkDLL=
"true"
GenerateDebugInformation=
"true"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
...
...
@@ -53,7 +53,7 @@
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLibrarianTool"
AdditionalOptions=
"/ignore:4006"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib"
OutputFile=
"../../../../lib/libzmq_d.lib"
/>
<Tool
Name=
"VCLibrarianTool"
AdditionalOptions=
"/ignore:4006"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib
Iphlpapi.lib
"
OutputFile=
"../../../../lib/libzmq_d.lib"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
...
...
@@ -70,7 +70,7 @@
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLibrarianTool"
AdditionalOptions=
"/ignore:4006"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib"
OutputFile=
"../../../../lib/libzmq.lib"
/>
<Tool
Name=
"VCLibrarianTool"
AdditionalOptions=
"/ignore:4006"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib
Iphlpapi.lib
"
OutputFile=
"../../../../lib/libzmq.lib"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
...
...
@@ -87,7 +87,7 @@
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib libpgm.lib"
OutputFile=
"../../../../lib/libzmq.dll"
AdditionalLibraryDirectories=
"../../../../../OpenPGM/lib"
LinkDLL=
"true"
GenerateDebugInformation=
"true"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Ws2_32.lib Rpcrt4.lib Advapi32.lib
Iphlpapi.lib
libpgm.lib"
OutputFile=
"../../../../lib/libzmq.dll"
AdditionalLibraryDirectories=
"../../../../../OpenPGM/lib"
LinkDLL=
"true"
GenerateDebugInformation=
"true"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
...
...
builds/msvc/vs2010/libzmq/libzmq.props
View file @
bf14b1f9
...
...
@@ -31,7 +31,7 @@
<PreprocessorDefinitions
Condition=
"'$(ConfigurationType)' == 'DynamicLibrary'"
>
DLL_EXPORT;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;
Iphlpapi.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</Link>
<Lib
Condition=
"'$(ConfigurationType)'=='StaticLibrary'"
>
<AdditionalOptions>
/ignore:4221 %(AdditionalOptions)
</AdditionalOptions>
...
...
builds/msvc/vs2012/libzmq/libzmq.props
View file @
bf14b1f9
...
...
@@ -31,7 +31,7 @@
<PreprocessorDefinitions
Condition=
"'$(ConfigurationType)' == 'DynamicLibrary'"
>
DLL_EXPORT;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;
Iphlpapi.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</Link>
<Lib
Condition=
"'$(ConfigurationType)'=='StaticLibrary'"
>
<AdditionalOptions>
/ignore:4221 %(AdditionalOptions)
</AdditionalOptions>
...
...
builds/msvc/vs2013/libzmq/libzmq.props
View file @
bf14b1f9
...
...
@@ -31,7 +31,7 @@
<PreprocessorDefinitions
Condition=
"'$(ConfigurationType)' == 'DynamicLibrary'"
>
DLL_EXPORT;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;
Iphlpapi.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</Link>
<Lib
Condition=
"'$(ConfigurationType)'=='StaticLibrary'"
>
<AdditionalOptions>
/ignore:4221 %(AdditionalOptions)
</AdditionalOptions>
...
...
builds/msvc/vs2015/libzmq/libzmq.props
View file @
bf14b1f9
...
...
@@ -31,7 +31,7 @@
<PreprocessorDefinitions
Condition=
"'$(ConfigurationType)' == 'DynamicLibrary'"
>
DLL_EXPORT;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
Advapi32.lib;Ws2_32.lib;Rpcrt4.lib;
Iphlpapi.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</Link>
<Lib
Condition=
"'$(ConfigurationType)'=='StaticLibrary'"
>
<AdditionalOptions>
/ignore:4221 %(AdditionalOptions)
</AdditionalOptions>
...
...
include/zmq.h
View file @
bf14b1f9
...
...
@@ -434,8 +434,8 @@ typedef struct zmq_poller_event_t
short
events
;
}
zmq_poller_event_t
;
ZMQ_EXPORT
void
*
zmq_poller_new
();
ZMQ_EXPORT
int
zmq_poller_
close
(
void
*
poller
);
ZMQ_EXPORT
void
*
zmq_poller_new
(
void
);
ZMQ_EXPORT
int
zmq_poller_
destroy
(
void
**
poller_p
);
ZMQ_EXPORT
int
zmq_poller_add
(
void
*
poller
,
void
*
socket
,
void
*
user_data
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_modify
(
void
*
poller
,
void
*
socket
,
short
events
);
ZMQ_EXPORT
int
zmq_poller_remove
(
void
*
poller
,
void
*
socket
);
...
...
@@ -457,8 +457,8 @@ ZMQ_EXPORT int zmq_poller_remove_fd (void *poller, int fd);
typedef
void
(
zmq_timer_fn
)(
int
timer_id
,
void
*
arg
);
ZMQ_EXPORT
void
*
zmq_timers_new
();
ZMQ_EXPORT
int
zmq_timers_
close
(
void
*
timers
);
ZMQ_EXPORT
void
*
zmq_timers_new
(
void
);
ZMQ_EXPORT
int
zmq_timers_
destroy
(
void
**
timers_p
);
ZMQ_EXPORT
int
zmq_timers_add
(
void
*
timers
,
size_t
interval
,
zmq_timer_fn
handler
,
void
*
arg
);
ZMQ_EXPORT
int
zmq_timers_cancel
(
void
*
timers
,
int
timer_id
);
ZMQ_EXPORT
int
zmq_timers_set_interval
(
void
*
timers
,
int
timer_id
,
size_t
interval
);
...
...
src/zmq.cpp
View file @
bf14b1f9
...
...
@@ -1045,21 +1045,23 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
// The poller functionality
void
*
zmq_poller_new
(
)
void
*
zmq_poller_new
(
void
)
{
zmq
::
socket_poller_t
*
poller
=
new
(
std
::
nothrow
)
zmq
::
socket_poller_t
;
alloc_assert
(
poller
);
return
poller
;
}
int
zmq_poller_
close
(
void
*
poller
_
)
int
zmq_poller_
destroy
(
void
**
poller_p
_
)
{
if
(
!
poller_
||
!
((
zmq
::
socket_poller_t
*
)
poller_
)
->
check_tag
())
{
void
*
poller
=
*
poller_p_
;
if
(
!
poller
||
!
((
zmq
::
socket_poller_t
*
)
poller
)
->
check_tag
())
{
errno
=
EFAULT
;
return
-
1
;
}
delete
((
zmq
::
socket_poller_t
*
)
poller_
);
delete
((
zmq
::
socket_poller_t
*
)
poller
);
*
poller_p_
=
NULL
;
return
0
;
}
...
...
@@ -1185,14 +1187,15 @@ void *zmq_timers_new ()
return
timers
;
}
int
zmq_timers_
close
(
void
*
timers
_
)
int
zmq_timers_
destroy
(
void
**
timers_p
_
)
{
if
(
!
timers_
||
!
((
zmq
::
timers_t
*
)
timers_
)
->
check_tag
())
{
void
*
timers
=
*
timers_p_
;
if
(
!
timers
||
!
((
zmq
::
timers_t
*
)
timers
)
->
check_tag
())
{
errno
=
EFAULT
;
return
-
1
;
}
delete
((
zmq
::
timers_t
*
)
timers_
)
;
delete
((
zmq
::
timers_t
*
)
timers
);
*
timers_p_
=
NULL
;
return
0
;
}
...
...
tests/test_poller.cpp
View file @
bf14b1f9
...
...
@@ -134,7 +134,7 @@ int main (void)
assert
(
event
.
events
==
ZMQ_POLLOUT
);
// Destory poller, sockets and ctx
rc
=
zmq_poller_
close
(
poller
);
rc
=
zmq_poller_
destroy
(
&
poller
);
assert
(
rc
==
0
);
rc
=
zmq_close
(
sink
);
assert
(
rc
==
0
);
...
...
tests/test_timers.cpp
View file @
bf14b1f9
...
...
@@ -119,7 +119,7 @@ int main (void)
assert
(
rc
==
0
);
assert
(
!
timer_invoked
);
rc
=
zmq_timers_
close
(
timers
);
rc
=
zmq_timers_
destroy
(
&
timers
);
assert
(
rc
==
0
);
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment