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
62d27b7a
Commit
62d27b7a
authored
Mar 14, 2012
by
Ian Barber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #273 from BoresExpress/wm5
Add WinCE support.
parents
f9674308
318ba883
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
130 additions
and
3 deletions
+130
-3
errno.cpp
builds/msvc/errno.cpp
+33
-0
errno.hpp
builds/msvc/errno.hpp
+57
-0
libzmq.vcproj
builds/msvc/libzmq/libzmq.vcproj
+8
-0
zmq.h
include/zmq.h
+2
-0
clock.cpp
src/clock.cpp
+4
-0
err.cpp
src/err.cpp
+6
-0
err.hpp
src/err.hpp
+4
-0
msg.cpp
src/msg.cpp
+0
-1
signaler.cpp
src/signaler.cpp
+1
-1
socket_base.cpp
src/socket_base.cpp
+4
-0
thread.cpp
src/thread.cpp
+9
-0
windows.hpp
src/windows.hpp
+2
-0
zmq.cpp
src/zmq.cpp
+0
-1
No files found.
builds/msvc/errno.cpp
0 → 100644
View file @
62d27b7a
#if defined WINCE
//#include "..\..\include\zmq.h"
#include "..\..\src\err.hpp"
int
errno
;
int
_doserrno
;
int
_sys_nerr
;
char
*
error_desc_buff
=
NULL
;
char
*
strerror
(
int
errno
)
{
if
(
NULL
!=
error_desc_buff
)
{
LocalFree
(
error_desc_buff
);
error_desc_buff
=
NULL
;
}
FormatMessage
(
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
|
FORMAT_MESSAGE_ALLOCATE_BUFFER
,
NULL
,
errno
,
0
,
(
LPTSTR
)
&
error_desc_buff
,
1024
,
NULL
);
return
error_desc_buff
;
}
#endif
\ No newline at end of file
builds/msvc/errno.hpp
0 → 100644
View file @
62d27b7a
#ifndef ERRNO_H
#define ERRNO_H 1
//#define EPERM 1
//#define ENOENT 2
//#define ESRCH 3
#define EINTR 4
//#define EIO 5
//#define ENXIO 6
//#define E2BIG 7
//#define ENOEXEC 8
#define EBADF 9
//#define ECHILD 10
#define EAGAIN 11
//#define ENOMEM 12
//#define EACCES 13
#define EFAULT 14
//#define EOSERR 15 // rk
//#define EBUSY 16
//#define EEXIST 17
//#define EXDEV 18
//#define ENODEV 19
//#define ENOTDIR 20
//#define EISDIR 21
#define EINVAL 22
//#define ENFILE 23
#define EMFILE 24
//#define ENOTTY 25
//#define EFBIG 27
//#define ENOSPC 28
//#define ESPIPE 29
//#define EROFS 30
//#define EMLINK 31
//#define EPIPE 32
//#define EDOM 33
//#define ERANGE 34
//#define EDEADLK 36
//#define ENOSYS 37
#ifdef __cplusplus
extern
"C"
{
#endif
extern
int
errno
;
extern
int
_doserrno
;
extern
int
_sys_nerr
;
char
*
strerror
(
int
errno
);
#define sys_nerr _sys_nerr
#ifdef __cplusplus
};
#endif
#endif
\ No newline at end of file
builds/msvc/libzmq/libzmq.vcproj
View file @
62d27b7a
...
...
@@ -282,6 +282,10 @@
RelativePath=
"..\..\..\src\err.cpp"
>
</File>
<File
RelativePath=
"..\errno.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\fq.cpp"
>
...
...
@@ -528,6 +532,10 @@
RelativePath=
"..\..\..\src\err.hpp"
>
</File>
<File
RelativePath=
"..\errno.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\fd.hpp"
>
...
...
include/zmq.h
View file @
62d27b7a
...
...
@@ -27,7 +27,9 @@
extern
"C"
{
#endif
#if !defined WINCE
#include <errno.h>
#endif
#include <stddef.h>
#include <stdio.h>
#if defined _WIN32
...
...
src/clock.cpp
View file @
62d27b7a
...
...
@@ -27,8 +27,12 @@
#include <stddef.h>
#if defined _MSC_VER
#if defined WINCE
#include <cmnintrin.h>
#else
#include <intrin.h>
#endif
#endif
#if !defined ZMQ_HAVE_WINDOWS
#include <sys/time.h>
...
...
src/err.cpp
View file @
62d27b7a
...
...
@@ -202,9 +202,15 @@ const char *zmq::wsa_error_no (int no_)
void
zmq
::
win_error
(
char
*
buffer_
,
size_t
buffer_size_
)
{
DWORD
errcode
=
GetLastError
();
#if defined WINCE
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
);
#else
DWORD
rc
=
FormatMessageA
(
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
errcode
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
buffer_
,
(
DWORD
)
buffer_size_
,
NULL
);
#endif
zmq_assert
(
rc
);
}
...
...
src/err.hpp
View file @
62d27b7a
...
...
@@ -26,7 +26,11 @@
#include "../include/zmq.h"
#include <assert.h>
#if defined WINCE
#include "..\builds\msvc\errno.hpp"
#else
#include <errno.h>
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
...
...
src/msg.cpp
View file @
62d27b7a
...
...
@@ -23,7 +23,6 @@
#include "../include/zmq.h"
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <new>
...
...
src/signaler.cpp
View file @
62d27b7a
...
...
@@ -238,7 +238,7 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
// two instances of the library don't accidentally create signaler
// crossing the process boundary.
// We'll use named event object to implement the critical section.
HANDLE
sync
=
CreateEvent
(
NULL
,
FALSE
,
TRUE
,
"zmq-signaler-port-sync"
);
HANDLE
sync
=
CreateEvent
(
NULL
,
FALSE
,
TRUE
,
TEXT
(
"zmq-signaler-port-sync"
)
);
win_assert
(
sync
!=
NULL
);
// Enter the critical section.
...
...
src/socket_base.cpp
View file @
62d27b7a
...
...
@@ -29,8 +29,12 @@
#if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#if defined _MSC_VER
#if defined WINCE
#include <cmnintrin.h>
#else
#include <intrin.h>
#endif
#endif
#else
#include <unistd.h>
#endif
...
...
src/thread.cpp
View file @
62d27b7a
...
...
@@ -27,7 +27,11 @@
extern
"C"
{
#if defined _WIN32_WCE
static
DWORD
thread_routine
(
LPVOID
arg_
)
#else
static
unsigned
int
__stdcall
thread_routine
(
void
*
arg_
)
#endif
{
zmq
::
thread_t
*
self
=
(
zmq
::
thread_t
*
)
arg_
;
self
->
tfn
(
self
->
arg
);
...
...
@@ -39,8 +43,13 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
{
tfn
=
tfn_
;
arg
=
arg_
;
#if defined WINCE
descriptor
=
(
HANDLE
)
CreateThread
(
NULL
,
0
,
&::
thread_routine
,
this
,
0
,
NULL
);
#else
descriptor
=
(
HANDLE
)
_beginthreadex
(
NULL
,
0
,
&::
thread_routine
,
this
,
0
,
NULL
);
#endif
win_assert
(
descriptor
!=
NULL
);
}
...
...
src/windows.hpp
View file @
62d27b7a
...
...
@@ -170,7 +170,9 @@
#include <ws2tcpip.h>
#include <ipexport.h>
#if !defined WINCE
#include <process.h>
#endif
// In MinGW environment AI_NUMERICSERV is not defined.
#ifndef AI_NUMERICSERV
...
...
src/zmq.cpp
View file @
62d27b7a
...
...
@@ -65,7 +65,6 @@ struct iovec {
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <new>
...
...
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