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
ccf2b9b4
Commit
ccf2b9b4
authored
Feb 19, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #517 from SRombauts/master
Windows CE support : using standard _WIN32_WCE flag instead of WINCE
parents
a5ef5014
57f84d68
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
10 deletions
+26
-10
errno.cpp
builds/msvc/errno.cpp
+1
-1
errno.hpp
builds/msvc/errno.hpp
+1
-1
zmq.h
include/zmq.h
+1
-1
clock.cpp
src/clock.cpp
+1
-1
err.cpp
src/err.cpp
+1
-1
err.hpp
src/err.hpp
+1
-1
signaler.cpp
src/signaler.cpp
+13
-1
socket_base.cpp
src/socket_base.cpp
+1
-1
tcp_listener.cpp
src/tcp_listener.cpp
+4
-0
thread.cpp
src/thread.cpp
+1
-1
windows.hpp
src/windows.hpp
+1
-1
No files found.
builds/msvc/errno.cpp
View file @
ccf2b9b4
#if defined
WIN
CE
#if defined
_WIN32_W
CE
//#include "..\..\include\zmq.h"
#include "..\..\src\err.hpp"
...
...
builds/msvc/errno.hpp
View file @
ccf2b9b4
...
...
@@ -13,7 +13,7 @@
//#define ECHILD 10
#define EAGAIN 11
//#define ENOMEM 12
//
#define EACCES 13
#define EACCES 13
#define EFAULT 14
//#define EOSERR 15 // rk
//#define EBUSY 16
...
...
include/zmq.h
View file @
ccf2b9b4
...
...
@@ -27,7 +27,7 @@
extern
"C"
{
#endif
#if !defined
WIN
CE
#if !defined
_WIN32_W
CE
#include <errno.h>
#endif
#include <stddef.h>
...
...
src/clock.cpp
View file @
ccf2b9b4
...
...
@@ -27,7 +27,7 @@
#include <stddef.h>
#if defined _MSC_VER
#if defined
WIN
CE
#if defined
_WIN32_W
CE
#include <cmnintrin.h>
#else
#include <intrin.h>
...
...
src/err.cpp
View file @
ccf2b9b4
...
...
@@ -203,7 +203,7 @@ const char *zmq::wsa_error_no (int no_)
void
zmq
::
win_error
(
char
*
buffer_
,
size_t
buffer_size_
)
{
DWORD
errcode
=
GetLastError
();
#if defined
WIN
CE
#if defined
_WIN32_W
CE
DWORD
rc
=
FormatMessage
(
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
errcode
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
(
LPWSTR
)
buffer_
,
buffer_size_
/
sizeof
(
wchar_t
),
NULL
);
...
...
src/err.hpp
View file @
ccf2b9b4
...
...
@@ -26,7 +26,7 @@
#include "../include/zmq.h"
#include <assert.h>
#if defined
WIN
CE
#if defined
_WIN32_W
CE
#include "..\builds\msvc\errno.hpp"
#else
#include <errno.h>
...
...
src/signaler.cpp
View file @
ccf2b9b4
...
...
@@ -238,6 +238,8 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
return
0
;
#elif defined ZMQ_HAVE_WINDOWS
#if !defined _WIN32_WCE
// Windows CE does not manage security attributes
SECURITY_DESCRIPTOR
sd
;
SECURITY_ATTRIBUTES
sa
;
memset
(
&
sd
,
0
,
sizeof
(
sd
));
...
...
@@ -248,6 +250,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
sa
.
nLength
=
sizeof
(
SECURITY_ATTRIBUTES
);
sa
.
lpSecurityDescriptor
=
&
sd
;
#endif
// This function has to be in a system-wide critical section so that
// two instances of the library don't accidentally create signaler
...
...
@@ -256,7 +259,11 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
// Note that if the event object already exists, the CreateEvent requests
// EVENT_ALL_ACCESS access right. If this fails, we try to open
// the event object asking for SYNCHRONIZE access only.
#if !defined _WIN32_WCE
HANDLE
sync
=
CreateEvent
(
&
sa
,
FALSE
,
TRUE
,
TEXT
(
"Global
\\
zmq-signaler-port-sync"
));
#else
HANDLE
sync
=
CreateEvent
(
NULL
,
FALSE
,
TRUE
,
TEXT
(
"Global
\\
zmq-signaler-port-sync"
));
#endif
if
(
sync
==
NULL
&&
GetLastError
()
==
ERROR_ACCESS_DENIED
)
sync
=
OpenEvent
(
SYNCHRONIZE
|
EVENT_MODIFY_STATE
,
FALSE
,
TEXT
(
"Global
\\
zmq-signaler-port-sync"
));
...
...
@@ -303,9 +310,13 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
*
w_
=
WSASocket
(
AF_INET
,
SOCK_STREAM
,
0
,
NULL
,
0
,
0
);
wsa_assert
(
*
w_
!=
INVALID_SOCKET
);
#if !defined _WIN32_WCE
// On Windows, preventing sockets to be inherited by child processes.
BOOL
brc
=
SetHandleInformation
((
HANDLE
)
*
w_
,
HANDLE_FLAG_INHERIT
,
0
);
win_assert
(
brc
);
#else
BOOL
brc
;
#endif
// Set TCP_NODELAY on writer socket.
rc
=
setsockopt
(
*
w_
,
IPPROTO_TCP
,
TCP_NODELAY
,
...
...
@@ -341,10 +352,11 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
win_assert
(
brc
!=
0
);
if
(
*
r_
!=
INVALID_SOCKET
)
{
#if !defined _WIN32_WCE
// On Windows, preventing sockets to be inherited by child processes.
brc
=
SetHandleInformation
((
HANDLE
)
*
r_
,
HANDLE_FLAG_INHERIT
,
0
);
win_assert
(
brc
);
#endif
return
0
;
}
else
{
// Cleanup writer if connection failed
...
...
src/socket_base.cpp
View file @
ccf2b9b4
...
...
@@ -29,7 +29,7 @@
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#if defined _MSC_VER
#if defined
WIN
CE
#if defined
_WIN32_W
CE
#include <cmnintrin.h>
#else
#include <intrin.h>
...
...
src/tcp_listener.cpp
View file @
ccf2b9b4
...
...
@@ -174,9 +174,11 @@ int zmq::tcp_listener_t::set_address (const char *addr_)
errno
=
wsa_error_to_errno
(
WSAGetLastError
());
return
-
1
;
}
#if !defined _WIN32_WCE
// On Windows, preventing sockets to be inherited by child processes.
BOOL
brc
=
SetHandleInformation
((
HANDLE
)
s
,
HANDLE_FLAG_INHERIT
,
0
);
win_assert
(
brc
);
#endif
#else
if
(
s
==
-
1
)
return
-
1
;
...
...
@@ -258,9 +260,11 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
WSAGetLastError
()
==
WSAENOBUFS
);
return
retired_fd
;
}
#if !defined _WIN32_WCE
// On Windows, preventing sockets to be inherited by child processes.
BOOL
brc
=
SetHandleInformation
((
HANDLE
)
sock
,
HANDLE_FLAG_INHERIT
,
0
);
win_assert
(
brc
);
#endif
#else
if
(
sock
==
-
1
)
{
errno_assert
(
errno
==
EAGAIN
||
errno
==
EWOULDBLOCK
||
...
...
src/thread.cpp
View file @
ccf2b9b4
...
...
@@ -43,7 +43,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
{
tfn
=
tfn_
;
arg
=
arg_
;
#if defined
WIN
CE
#if defined
_WIN32_W
CE
descriptor
=
(
HANDLE
)
CreateThread
(
NULL
,
0
,
&::
thread_routine
,
this
,
0
,
NULL
);
#else
...
...
src/windows.hpp
View file @
ccf2b9b4
...
...
@@ -170,7 +170,7 @@
#include <ws2tcpip.h>
#include <ipexport.h>
#if !defined
WIN
CE
#if !defined
_WIN32_W
CE
#include <process.h>
#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