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
a0db7f6b
Commit
a0db7f6b
authored
Sep 22, 2009
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
POSIX error codes unsupported on win platform faked
parent
e136d923
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
zmq.h
bindings/c/zmq.h
+13
-3
zmq.cpp
src/zmq.cpp
+13
-0
No files found.
bindings/c/zmq.h
View file @
a0db7f6b
...
...
@@ -24,6 +24,7 @@
extern
"C"
{
#endif
#include <errno.h>
#include <stddef.h>
// Microsoft Visual Studio uses non-standard way to export/import symbols.
...
...
@@ -43,9 +44,18 @@ extern "C" {
// different OSes. The assumption is that error_t is at least 32-bit type.
#define ZMQ_HAUSNUMERO 156384712
#define EMTHREAD (ZMQ_HAUSNUMERO + 1)
#define EFSM (ZMQ_HAUSNUMERO + 2)
#define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 3)
// On Windows platform some of the standard POSIX errnos are not defined.
#ifndef ENOTSUP
#define ENOTSUP (ZMQ_HAUSNUMERO + 1)
#endif
#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT (ZMQ_HAUSNUMERO + 2)
#endif
// Native 0MQ error codes.
#define EMTHREAD (ZMQ_HAUSNUMERO + 50)
#define EFSM (ZMQ_HAUSNUMERO + 51)
#define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52)
// Resolves system errors and 0MQ errors to human-readable string.
ZMQ_EXPORT
const
char
*
zmq_strerror
(
int
errnum
);
...
...
src/zmq.cpp
View file @
a0db7f6b
...
...
@@ -39,6 +39,12 @@
const
char
*
zmq_strerror
(
int
errnum_
)
{
switch
(
errnum_
)
{
#if defined ZMQ_HAVE_WINDOWS
case
ENOTSUP
:
return
"Not supported"
;
case
EPROTONOSUPPORT
:
return
"Protocol not supported"
;
#endif
case
EMTHREAD
:
return
"Number of preallocated application threads exceeded"
;
case
EFSM
:
...
...
@@ -46,7 +52,14 @@ const char *zmq_strerror (int errnum_)
case
ENOCOMPATPROTO
:
return
"The protocol is not compatible with the socket type"
;
default:
#if defined _MSC_VER
#pragma warning (push)
#pragma warning (disable:4996)
#endif
return
strerror
(
errnum_
);
#if defined _MSC_VER
#pragma warning (pop)
#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