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
4b60023b
Commit
4b60023b
authored
Jun 19, 2011
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:zeromq/libzmq
parents
d7923f08
9b795de4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
143 additions
and
44 deletions
+143
-44
zmq.h
include/zmq.h
+1
-1
ctx.cpp
src/ctx.cpp
+7
-7
select.cpp
src/select.cpp
+5
-6
tcp_connecter.cpp
src/tcp_connecter.cpp
+2
-1
windows.hpp
src/windows.hpp
+128
-29
No files found.
include/zmq.h
View file @
4b60023b
...
@@ -28,7 +28,7 @@ extern "C" {
...
@@ -28,7 +28,7 @@ extern "C" {
#include <errno.h>
#include <errno.h>
#include <stddef.h>
#include <stddef.h>
#if defined _WIN32
#if defined _WIN32
#include
"winsock2.h"
#include
<winsock2.h>
#endif
#endif
/* Handle DSO symbol visibility */
/* Handle DSO symbol visibility */
...
...
src/ctx.cpp
View file @
4b60023b
...
@@ -18,24 +18,24 @@
...
@@ -18,24 +18,24 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include "platform.hpp"
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#else
#include <unistd.h>
#endif
#include <new>
#include <new>
#include <string.h>
#include <string.h>
#include "ctx.hpp"
#include "ctx.hpp"
#include "socket_base.hpp"
#include "socket_base.hpp"
#include "io_thread.hpp"
#include "io_thread.hpp"
#include "platform.hpp"
#include "reaper.hpp"
#include "reaper.hpp"
#include "pipe.hpp"
#include "pipe.hpp"
#include "err.hpp"
#include "err.hpp"
#include "msg.hpp"
#include "msg.hpp"
#if defined ZMQ_HAVE_WINDOWS
#include "windows.h"
#else
#include "unistd.h"
#endif
zmq
::
ctx_t
::
ctx_t
(
uint32_t
io_threads_
)
:
zmq
::
ctx_t
::
ctx_t
(
uint32_t
io_threads_
)
:
tag
(
0xbadcafe0
),
tag
(
0xbadcafe0
),
terminating
(
false
)
terminating
(
false
)
...
...
src/select.cpp
View file @
4b60023b
...
@@ -19,12 +19,8 @@
...
@@ -19,12 +19,8 @@
*/
*/
#include "platform.hpp"
#include "platform.hpp"
#if defined ZMQ_HAVE_WINDOWS
#include <string.h>
#include "windows.hpp"
#include <algorithm>
#ifdef ZMQ_HAVE_WINDOWS
#include "winsock2.h"
#elif defined ZMQ_HAVE_HPUX
#elif defined ZMQ_HAVE_HPUX
#include <sys/param.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/types.h>
...
@@ -36,6 +32,9 @@
...
@@ -36,6 +32,9 @@
#include <sys/select.h>
#include <sys/select.h>
#endif
#endif
#include <string.h>
#include <algorithm>
#include "select.hpp"
#include "select.hpp"
#include "err.hpp"
#include "err.hpp"
#include "config.hpp"
#include "config.hpp"
...
...
src/tcp_connecter.cpp
View file @
4b60023b
...
@@ -295,7 +295,8 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
...
@@ -295,7 +295,8 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
// Networking problems are OK. No need to assert.
// Networking problems are OK. No need to assert.
errno
=
err
;
errno
=
err
;
errno_assert
(
errno
==
ECONNREFUSED
||
errno
==
ECONNRESET
||
errno_assert
(
errno
==
ECONNREFUSED
||
errno
==
ECONNRESET
||
errno
==
ETIMEDOUT
||
errno
==
EHOSTUNREACH
);
errno
==
ETIMEDOUT
||
errno
==
EHOSTUNREACH
||
errno
==
ENETUNREACH
);
return
retired_fd
;
return
retired_fd
;
}
}
...
...
src/windows.hpp
View file @
4b60023b
...
@@ -21,58 +21,157 @@
...
@@ -21,58 +21,157 @@
#ifndef __ZMQ_WINDOWS_HPP_INCLUDED__
#ifndef __ZMQ_WINDOWS_HPP_INCLUDED__
#define __ZMQ_WINDOWS_HPP_INCLUDED__
#define __ZMQ_WINDOWS_HPP_INCLUDED__
//
The purpose of this header file is to turn on only the items actually needed
//
The purpose of this header file is to turn on only the items actually
// on the windows platform.
//
needed
on the windows platform.
#define _WINSOCKAPI_
// Disable deprecation warnings.
#ifndef NOMINMAX
#define NOMINMAX // No min and max functions, these clash with C++.
#endif
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#ifndef WIN32_LEAN_AND_MEAN
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#endif
#ifndef NO
USER // No USER defines and routines.
#ifndef NO
GDICAPMASKS
#define NO
USER
#define NO
GDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_
#endif
#endif
#ifndef NO
MCX // No Modem Configuration Extensions.
#ifndef NO
VIRTUALKEYCODES
#define NO
MCX
#define NO
VIRTUALKEYCODES // VK_*
#endif
#endif
#ifndef NO
IME // No Input Method Editor.
#ifndef NO
WINMESSAGES
#define NO
IME
#define NO
WINMESSAGES // WM_*, EM_*, LB_*, CB_*
#endif
#endif
#ifndef NO
SOUND // No Sound driver routines.
#ifndef NO
WINSTYLES
#define NO
SOUND
#define NO
WINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
#endif
#endif
#ifndef NOSYSMETRICS
#ifdef ZMQ_HAVE_MINGW32
#define NOSYSMETRICS // SM_*
#ifdef WINVER
#undef WINVER
#endif
#endif
#define WINVER 0x0501
#ifndef NOMENUS
#define NOMENUS // MF_*
#endif
#ifndef NOICONS
#define NOICONS // IDI_*
#endif
#ifndef NOKEYSTATES
#define NOKEYSTATES // MK_*
#endif
#ifndef NOSYSCOMMANDS
#define NOSYSCOMMANDS // SC_*
#endif
#ifndef NORASTEROPS
#define NORASTEROPS // Binary and Tertiary raster ops
#endif
#ifndef NOSHOWWINDOW
#define NOSHOWWINDOW // SW_*
#endif
#ifndef OEMRESOURCE
#define OEMRESOURCE // OEM Resource values
#endif
#ifndef NOATOM
#define NOATOM // Atom Manager routines
#endif
#ifndef NOCLIPBOARD
#define NOCLIPBOARD // Clipboard routines
#endif
#ifndef NOCOLOR
#define NOCOLOR // Screen colors
#endif
#ifndef NOCTLMGR
#define NOCTLMGR // Control and Dialog routines
#endif
#ifndef NODRAWTEXT
#define NODRAWTEXT // DrawText() and DT_*
#endif
#ifndef NOGDI
#define NOGDI // All GDI defines and routines
#endif
#ifndef NOKERNEL
#define NOKERNEL // All KERNEL defines and routines
#endif
#ifndef NOUSER
#define NOUSER // All USER defines and routines
#endif
#ifndef NONLS
#define NONLS // All NLS defines and routines
#endif
#ifndef NOMB
#define NOMB // MB_* and MessageBox()
#endif
#ifndef NOMEMMGR
#define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines
#endif
#ifndef NOMETAFILE
#define NOMETAFILE // typedef METAFILEPICT
#endif
#ifndef NOMINMAX
#define NOMINMAX // Macros min(a,b) and max(a,b)
#endif
#ifndef NOMSG
#define NOMSG // typedef MSG and associated routines
#endif
#ifndef NOOPENFILE
#define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_*
#endif
#ifndef NOSCROLL
#define NOSCROLL // SB_* and scrolling routines
#endif
#ifndef NOSERVICE
#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc.
#endif
#ifndef NOSOUND
#define NOSOUND // Sound driver routines
#endif
#ifndef NOTEXTMETRIC
#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines
#endif
#ifndef NOWH
#define NOWH // SetWindowsHook and WH_*
#endif
#ifndef NOWINOFFSETS
#define NOWINOFFSETS // GWL_*, GCL_*, associated routines
#endif
#ifndef NOCOMM
#define NOCOMM // COMM driver routines
#endif
#ifndef NOKANJI
#define NOKANJI // Kanji support stuff.
#endif
#ifndef NOHELP
#define NOHELP // Help engine interface.
#endif
#ifndef NOPROFILER
#define NOPROFILER // Profiler interface.
#endif
#ifndef NODEFERWINDOWPOS
#define NODEFERWINDOWPOS // DeferWindowPos routines
#endif
#ifndef NOMCX
#define NOMCX // Modem Configuration ExtensionsA
#endif
#endif
#include <windows.h>
// Set target version to Windows Server 2003, Windows XP/SP1 or higher.
// MSVC++ 2005 on Win2000 does not define _WIN32_WINNT.
#ifndef _WIN32_WINNT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT
WINVER
#define _WIN32_WINNT
0x0501
#endif
#endif
// Enable winsock (not included when WIN32_LEAN_AND_MEAN is defined).
#include <windows.h>
#if(_WIN32_WINNT >= 0x0400)
#include <winsock2.h>
#ifdef __MINGW32__
#include <mswsock.h>
// Require Windows XP or higher with MinGW for getaddrinfo().
#if(_WIN32_WINNT >= 0x0501)
#else
#else
#include <winsock.h>
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#endif
#endif
#include <winsock2.h>
#include <mswsock.h>
#include <ws2tcpip.h>
#include <ws2tcpip.h>
#include <ipexport.h>
#include <ipexport.h>
#include <process.h>
#include <process.h>
//
On mingw environment AI_NUMERICSERV is not defined, needed in ip.cpp
.
//
In MinGW environment AI_NUMERICSERV is not defined
.
#ifndef AI_NUMERICSERV
#ifndef AI_NUMERICSERV
#define AI_NUMERICSERV 0x0400
#define AI_NUMERICSERV 0x0400
#endif
#endif
...
...
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